{"id":21239858,"url":"https://github.com/horttcore/wp-meta-box-contact","last_synced_at":"2026-05-03T23:31:41.358Z","repository":{"id":62533068,"uuid":"222905202","full_name":"Horttcore/wp-meta-box-contact","owner":"Horttcore","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-23T20:08:07.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T09:45:38.233Z","etag":null,"topics":["composer","meta-box","module","wordpress"],"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/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-11-20T09:54:49.000Z","updated_at":"2020-11-23T20:07:11.000Z","dependencies_parsed_at":"2022-11-02T16:01:11.803Z","dependency_job_id":null,"html_url":"https://github.com/Horttcore/wp-meta-box-contact","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-meta-box-contact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-meta-box-contact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-meta-box-contact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Horttcore%2Fwp-meta-box-contact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Horttcore","download_url":"https://codeload.github.com/Horttcore/wp-meta-box-contact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681003,"owners_count":20330155,"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":["composer","meta-box","module","wordpress"],"created_at":"2024-11-21T00:45:59.908Z","updated_at":"2026-05-03T23:31:41.330Z","avatar_url":"https://github.com/Horttcore.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Meta Box Contact data\n\n## Installation\n\n`composer require ralfhortt/wp-meta-box-contact`\n\n## Usage\n\n```php\nnew MetaBoxContact(\n    array $screen = [],\n    string $context = 'advanced',\n    string $priority = 'default'\n)\n```\n\n### Serviceloader\n\n```php\nuse RalfHortt\\MetaBoxContact\\MetaBoxContact;\n\nPluginFactory::create()\n    -\u003eaddService(MetaBoxContact::class, ['page'], 'advanced', 'default')\n    -\u003eboot();\n```\n\n### Standalone\n\n```php\nuse RalfHortt\\MetaBoxContact\\MetaBoxContact;\n\n(new MetaBoxContact(['page'], 'advanced', 'default' ))-\u003eregister();\n```\n\n## Fields\n\n- Phone\n- Fax\n- Mobile\n- E-Mail\n- URL\n\n```php\n\u003c?php\n$phone = get_post_meta( $post-\u003eID, 'contact-phone', TRUE );\n$fax = get_post_meta( $post-\u003eID, 'contact-fax', TRUE );\n$mobile = get_post_meta( $post-\u003eID, 'contact-mobile', TRUE );\n$email = get_post_meta( $post-\u003eID, 'contact-email', TRUE );\n$url = get_post_meta( $post-\u003eID, 'contact-url', TRUE );\n```\n\n## Hooks\n\n### Filter\n\n- `wp-meta-box-contact/identifier` - Change meta box id\n- `wp-meta-box-contact/label` - Change meta box label\n- `wp-meta-box-contact/phone-{$postType}` - Hide phone field for \\$postType\n- `wp-meta-box-contact/fax-{$postType}` - Hide fax field for \\$postType\n- `wp-meta-box-contact/mobile-{$postType}` - Hide mobile field for \\$postType\n- `wp-meta-box-contact/email-{$postType}` - Hide email field for \\$postType\n- `wp-meta-box-contact/url-{$postType}` - Hide url field for \\$postType\n\n#### Example\n\n```php\n\u003c?php\n(new MetaBoxContact(['page'], 'advanced', 'default' ))-\u003eregister();\nadd_filter('wp-meta-box-contact-url-page', '__return_false');\n```\n\n## Action\n\n- `wp-meta-contact/before` - Add fields before the phone field\n- `wp-meta-contact/after` - Add fields after the url field\n- `wp-meta-contact/save` - Save custom fields\n\n## Changelog\n\n### v4.1 - 2020-11-23\n\n- Update dependency\n\n### v4.0 - 2020-11-06\n\n- Update dependency\n- Added translation\n\n### v3.0 - 2020-11-02\n\n- Updated dependency\n\n### v.2.0.0 - 2020-01-15\n\n- Changed: Namespac ed hooks\n- Changed: Removed redundant hooks\n- Fixed: Broke URL field\n\n### v1.0.0 - 2020-01-14\n\n- Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorttcore%2Fwp-meta-box-contact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhorttcore%2Fwp-meta-box-contact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorttcore%2Fwp-meta-box-contact/lists"}