{"id":13810298,"url":"https://github.com/CMB2/CMB2-Post-Search-field","last_synced_at":"2025-05-14T10:32:44.124Z","repository":{"id":21046332,"uuid":"24345087","full_name":"CMB2/CMB2-Post-Search-field","owner":"CMB2","description":"Custom field for CMB2 which adds a post-search dialog for searching/attaching other post IDs","archived":false,"fork":false,"pushed_at":"2019-05-06T18:50:40.000Z","size":113,"stargazers_count":67,"open_issues_count":16,"forks_count":26,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-08T19:01:49.072Z","etag":null,"topics":["cmb2","php","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/CMB2.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":"2014-09-22T20:50:11.000Z","updated_at":"2024-07-22T03:44:44.000Z","dependencies_parsed_at":"2022-08-08T22:15:11.499Z","dependency_job_id":null,"html_url":"https://github.com/CMB2/CMB2-Post-Search-field","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMB2%2FCMB2-Post-Search-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMB2%2FCMB2-Post-Search-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMB2%2FCMB2-Post-Search-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMB2%2FCMB2-Post-Search-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CMB2","download_url":"https://codeload.github.com/CMB2/CMB2-Post-Search-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254012740,"owners_count":21999304,"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":["cmb2","php","wordpress"],"created_at":"2024-08-04T02:00:50.085Z","updated_at":"2025-05-14T10:32:44.058Z","avatar_url":"https://github.com/CMB2.png","language":"PHP","readme":"CMB2 Post Search field\n======================\n\nCustom field for CMB2 which adds a post-search dialog for searching/attaching other post IDs.\n\nAdds a new text field type (with a button), `post_search_text` that adds a quick post search dialog for saving post IDs to a text input.\n\n## Example\n\n```php\n// Classic CMB2 declaration\n$cmb = new_cmb2_box( array(\n\t'id'           =\u003e 'prefix-metabox-id',\n\t'title'        =\u003e __( 'Post Info' ),\n\t'object_types' =\u003e array( 'post', ), // Post type\n) );\n\n// Add new field\n$cmb-\u003eadd_field( array(\n\t'name'        =\u003e __( 'Related post' ),\n\t'id'          =\u003e 'prefix_related_post',\n\t'type'        =\u003e 'post_search_text', // This field type\n\t// post type also as array\n\t'post_type'   =\u003e 'post',\n\t// Default is 'checkbox', used in the modal view to select the post type\n\t'select_type' =\u003e 'radio',\n\t// Will replace any selection with selection from modal. Default is 'add'\n\t'select_behavior' =\u003e 'replace',\n) );\n```\n\n## Screenshots\n\n1. Field display  \n![Field display](https://raw.githubusercontent.com/WebDevStudios/CMB2-Post-Search-field/master/post-search-field.png)\n\n2. Search Modal  \n![Search Modal](https://raw.githubusercontent.com/WebDevStudios/CMB2-Post-Search-field/master/post-search-dialog.png)\n\n----\n\nIf you're looking for a more general way to attach posts (or other custom post types) with a drag and drop interface, you might consider [CMB2 Attached Posts Field](https://github.com/WebDevStudios/cmb2-attached-posts) instead.\n","funding_links":[],"categories":["WordPress Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCMB2%2FCMB2-Post-Search-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCMB2%2FCMB2-Post-Search-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCMB2%2FCMB2-Post-Search-field/lists"}