{"id":21239850,"url":"https://github.com/horttcore/wp-customizer","last_synced_at":"2025-07-10T19:32:41.563Z","repository":{"id":56985833,"uuid":"167431049","full_name":"Horttcore/wp-customizer","owner":"Horttcore","description":"A helper package for working with the WordPress Customizer","archived":false,"fork":false,"pushed_at":"2023-07-27T16:02:15.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T00:57:34.337Z","etag":null,"topics":["customizer","fields","wordpress","wordpress-customizer"],"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/Horttcore.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":"2019-01-24T20:16:38.000Z","updated_at":"2022-06-15T20:13:46.000Z","dependencies_parsed_at":"2022-08-21T09:40:09.642Z","dependency_job_id":null,"html_url":"https://github.com/Horttcore/wp-customizer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-customizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-customizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-customizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-customizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Horttcore","download_url":"https://codeload.github.com/Horttcore/wp-customizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225653802,"owners_count":17502940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["customizer","fields","wordpress","wordpress-customizer"],"created_at":"2024-11-21T00:45:59.248Z","updated_at":"2024-11-21T00:45:59.750Z","avatar_url":"https://github.com/Horttcore.png","language":"PHP","readme":"# WordPress Customizer Composer Package\n\nA helper package for working with the WordPress Customizer\n\n## Installation\n\n`composer require horttcore/wp-customizer`\n\n## Usage\n\n### Basics\n\n```php\n\u003c?php\nuse Horttcore\\Customizer\\Customize;\n\n(new Customize)\n    -\u003epanel( __('My Panel', 'textdomain') )\n        -\u003esection( __('My Section', 'textdomain') )\n            -\u003echeckbox( 'my-checkbox', __('Checkbox', 'textdomain') )\n            -\u003ecolor( 'my-color', __('Color', 'textdomain') )\n            -\u003efile( 'my-file', __('File', 'textdomain') )\n            -\u003eimage( 'my-image', __('Image', 'textdomain') )\n            -\u003epage( 'my-page', __('Page', 'textdomain') )\n            -\u003eradio( 'my-radio', __('Radio', 'textdomain'), ['option1' =\u003e 'Option 1', 'option2' =\u003e 'Option 2'] );\n            -\u003eselect( 'my-select', __('Select', 'textdomain'), ['option1' =\u003e 'Option 1', 'option2' =\u003e 'Option 2'] );\n            -\u003etext( 'my-text', __('Text', 'textdomain') )\n            -\u003etextarea( 'my-textarea', __('Textarea', 'textdomain') )\n            -\u003eurl( 'my-url', __('Url', 'textdomain') )\n    -\u003eregister();\n```\n\n### Advanced\n\n#### Save as option instead of theme_mod\n\n```php\n\u003c?php\nuse Horttcore\\Customizer\\Customize;\n\n(new Customize)\n    -\u003epanel( __('My Panel', 'textdomain')  )\n        -\u003esection( __('My Section', 'textdomain') )\n            -\u003etext( 'my-text', __('My Text', 'textdomain'), ['type' =\u003e 'option'] )\n            -\u003eregister();\n```\n\n#### Check for a capability\n\n```php\n\u003c?php\nuse Horttcore\\Customizer\\Customize;\n\n(new Customize)\n    -\u003epanel( 'My Panel' )\n        -\u003esection( __('My Section', 'textdomain') )\n            -\u003etext( 'my-text', __('My Text', 'textdomain'), ['capability' =\u003e 'edit_posts'] )\n            -\u003eregister();\n```\n\n#### Add a description\n\n```php\n\u003c?php\nuse Horttcore\\Customizer\\Customize;\n\n(new Customize)\n    -\u003epanel( 'My Panel' )\n        -\u003esection( 'My Section' )\n            -\u003etext( 'my-text', 'Text', [], ['description' =\u003e __('This is awesome', 'textdomain')] )\n            -\u003eregister();\n```\n\n#### Retrieving data\n\n```php\n\u003c?php\n$mod = get_theme_mod('my-text');\n```\n\n#### Adding a setting in an existing panel\n\n```php\n\u003c?php\n(new Customize)\n    -\u003eimage( 'mobile logo', __('Mobile Logo', 'textdomain'), [], [\n        'section' =\u003e 'title_tagline',\n        'priority' =\u003e 1\n    ] )\n    -\u003eregister();\n```\n\n## Changelog\n\n### v2.1.0\n\n-   Adding support for including elements in existing panels\n\n### v2.0.0\n\n-   Rename `Manager` to `Customize`\n\n### v1.0.0\n\n-   Initial release\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorttcore%2Fwp-customizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhorttcore%2Fwp-customizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorttcore%2Fwp-customizer/lists"}