{"id":22437540,"url":"https://github.com/builtnorth/extended-cpts-extras","last_synced_at":"2025-08-01T15:32:18.594Z","repository":{"id":255693917,"uuid":"853328913","full_name":"builtnorth/extended-cpts-extras","owner":"builtnorth","description":"Composer package that add some extra functionality to johnbillion/extended-cpts","archived":false,"fork":false,"pushed_at":"2024-11-03T21:05:22.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-11-22T12:18:41.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/builtnorth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T12:48:07.000Z","updated_at":"2024-10-08T15:30:48.000Z","dependencies_parsed_at":"2024-09-10T06:56:11.883Z","dependency_job_id":"5c281792-3cb7-4f1b-adfc-b25774d0570a","html_url":"https://github.com/builtnorth/extended-cpts-extras","commit_stats":null,"previous_names":["builtnorth/extended-cpts-extras"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/builtnorth%2Fextended-cpts-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/builtnorth%2Fextended-cpts-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/builtnorth%2Fextended-cpts-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/builtnorth%2Fextended-cpts-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/builtnorth","download_url":"https://codeload.github.com/builtnorth/extended-cpts-extras/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228389145,"owners_count":17912189,"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":[],"created_at":"2024-12-06T00:13:18.142Z","updated_at":"2025-08-01T15:32:18.584Z","avatar_url":"https://github.com/builtnorth.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extended CPTs Extras\n\nExtended CPTs Extras is a companion package for the [Extended CPTs](https://github.com/johnbillion/extended-cpts) library, providing additional functionality for managing post types in WordPress.\n\n## Features\n\n1. **Featured Image Column Width**: Customize the width of the featured image column in the admin list view.\n2. **Remove Meta Boxes**: Easily remove unwanted meta boxes from the post edit screen (useful for Gutenberg).\n3. **Register Meta**: Register custom meta fields for your post types with support for the REST API.\n4. **Modify Existing Post Types**: Add additional features to existing post types. Note that the the below features work correctly out of the box on the Extended CPTs package when registeting a **new** post type. It is only necessary to use the `extended_post_type_modify_existing()` function when modifying an **existing** post type. Theses features include:\n\n    - Custom templates\n    - Template locking\n    - Menu position\n    - Menu icon\n\n## Installation\n\n1. Require the package in your `composer.json`:\n\n    ```json\n    {\n    \t\"require\": {\n    \t\t\"builtnorth/extended-cpts-extras\": \"^1.0\"\n    \t}\n    }\n    ```\n\n2. Run `composer install` or `composer update`.\n\n## Usage\n\n### Use the `extended_post_type_extras()` function to apply extra configurations to post types:\n\n```php\nextended_post_type_extras(['post', 'page'], [\n\t'featured_image_column_width' =\u003e 80,\n\t'remove_meta_boxes' =\u003e ['postcustom', 'commentstatusdiv'],\n\t'register_meta' =\u003e [\n\t\t'my_custom_field' =\u003e [\n\t\t\t'type' =\u003e 'string',\n\t\t\t'description' =\u003e 'A custom field for this post type',\n\t\t\t'single' =\u003e true,\n\t\t\t'show_in_rest' =\u003e true,\n\t\t],\n\t]\n]);\n```\n\n### Use function `extended_post_type_modify_existing()` function to modify existing post types:\n\n```php\nextended_post_type_modify_existing('post', [\n\t'menu_icon' =\u003e 'dashicons-index-card',\n\t'menu_position' =\u003e 30,\n\t'template' =\u003e [\n\t\t['core/image', []],\n\t],\n\n]);\n```\n\n## Functions\n\n### extended_post_type_extras($post_types, $options)\n\nApply extra configurations to specified post types.\n\nParameters:\n\n- `$post_types`: String or array of post type names\n- `$options`: Array of configuration options\n    - `featured_image_column_width`: Set width for featured image column\n    - `remove_meta_boxes`: Array of meta box IDs to remove\n    - `register_meta`: Array of meta fields to register\n\n### extended_post_type_modify_existing($post_types, $options)\n\nModify existing post types with additional features that are not available in the original Extended CPTs package. This function allows you to apply certain options to existing post types that normally only work when registering a new post type with `register_extended_post_type()`. Specifically, it enables you to modify the following attributes for existing post types:\n\n- `$post_types`: String or array of post type names\n- `$options`: Array of configuration options\n    - `template`: Custom template for the post type\n    - `template_lock`: Lock the template to prevent changes\n    - `menu_position`: Set the menu position\n    - `menu_icon`: Set the menu icon\n\n## Contributing\n\nContributions are welcome. Please feel free to submit a Pull Request.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuiltnorth%2Fextended-cpts-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuiltnorth%2Fextended-cpts-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuiltnorth%2Fextended-cpts-extras/lists"}