{"id":36976362,"url":"https://github.com/chandrapatel/wp-custom-settings","last_synced_at":"2026-01-13T22:12:59.986Z","repository":{"id":62500965,"uuid":"287727238","full_name":"chandrapatel/wp-custom-settings","owner":"chandrapatel","description":"Allows developers to create a custom admin menu page with settings using Settings API without registering callbacks to every settings section and field.","archived":false,"fork":false,"pushed_at":"2020-10-24T11:38:17.000Z","size":343,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T01:44:07.488Z","etag":null,"topics":["settings-api","wordpress","wordpress-php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chandrapatel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-15T10:43:53.000Z","updated_at":"2022-09-19T16:36:28.000Z","dependencies_parsed_at":"2022-11-02T11:47:31.599Z","dependency_job_id":null,"html_url":"https://github.com/chandrapatel/wp-custom-settings","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chandrapatel/wp-custom-settings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandrapatel%2Fwp-custom-settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandrapatel%2Fwp-custom-settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandrapatel%2Fwp-custom-settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandrapatel%2Fwp-custom-settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chandrapatel","download_url":"https://codeload.github.com/chandrapatel/wp-custom-settings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandrapatel%2Fwp-custom-settings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28403202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["settings-api","wordpress","wordpress-php-library"],"created_at":"2026-01-13T22:12:59.490Z","updated_at":"2026-01-13T22:12:59.977Z","avatar_url":"https://github.com/chandrapatel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP Custom Settings\n\nAllows developers to create a custom admin menu page with settings using Settings API without registering callbacks to every settings section and field.\n\n## Supported form elements and input types\n\n- Textarea\n- Select\n- Input Types\n  - Text\n  - Password\n  - Email\n  - Url\n  - Tel\n  - Number\n  - Color\n  - Date\n  - Datetime-local\n  - Month\n  - Week\n  - Time\n\n## Installation\n\nThe plugin is available as a [Composer package](https://packagist.org/packages/chandrapatel/wp-custom-settings).\n\n```\ncomposer require chandrapatel/wp-custom-settings\n```\n\n**Note:** If you are not using Composer then I'd suggest to add WP Custom Settings main file in your theme or plugin instead of adding as standalone plugin. This way you can modify it as per your need and avoid dependency.\n\n## Usage\n\nYou need to create an object of `WP_Custom_Settings` class and it accepts three arguments to create menu page, register setting and sections \u0026 fields.\n\nPlease check [example.php](https://github.com/chandrapatel/wp-custom-settings/blob/master/example.php) file.\n\n```php\n$custom_settings = new WP_Custom_Settings(\n\t// Arguments to add menu page. Following arguments are same as add_menu_page() function arguments.\n\t// Callback argument does not needed.\n\t[\n\t\t'page_title' =\u003e __( 'Custom Settings', 'wp-custom-settings' ),\n\t\t'menu_title' =\u003e __( 'Custom Settings', 'wp-custom-settings' ),\n\t\t'capability' =\u003e 'manage_options',\n\t\t'menu_slug'  =\u003e 'wp-custom-settings-page',\n\t\t'icon_url'   =\u003e '',\n\t\t'position'   =\u003e null,\n\t],\n\t// Arguments to register setting. Following arguments are same as register_setting() function arguments.\n\t[\n\t\t'option_group' =\u003e 'wp_custom_settings_group',\n\t\t'option_name'  =\u003e 'wp_custom_settings_options',\n\t\t'args'         =\u003e array(\n\t\t\t'type'              =\u003e 'array',\n\t\t\t'description'       =\u003e 'Description of Custom Settings.',\n\t\t\t'show_in_rest'      =\u003e true,\n\t\t\t'default'           =\u003e array(),\n\t\t\t'sanitize_callback' =\u003e null,\n\t\t),\n\t],\n\t// Arguments to add sections and fields.\n\t[\n\t\tnew WP_Custom_Settings_Section(\n\t\t\t'wp_custom_settings_section', // ID.\n\t\t\t__( 'Section Title.', 'wp-custom-settings' ), // Title.\n\t\t\t__( 'Section Description.', 'wp-custom-settings' ), // Description.\n\t\t\t[\n\t\t\t\tnew WP_Custom_Settings_Field(\n\t\t\t\t\t'text', // Field type.\n\t\t\t\t\t'wp_custom_settings_field', // ID. Also, it will used for \"name\" attribute.\n\t\t\t\t\t__( 'Field Title', 'wp-settings-api-wrapper' ), // Title.\n\t\t\t\t\t[ // Pass additional arguments.\n\t\t\t\t\t\t'description' =\u003e 'Description of Custom Settings.',\n\t\t\t\t\t\t'label_for'   =\u003e 'wp_custom_settings_field',\n\t\t\t\t\t\t'class'       =\u003e 'regular-text',\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t]\n\t\t),\n\t]\n);\n```\n\n## Screenshot\n\n![alt text](screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandrapatel%2Fwp-custom-settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchandrapatel%2Fwp-custom-settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandrapatel%2Fwp-custom-settings/lists"}