{"id":20406734,"url":"https://github.com/xwp/wp-better-find-posts","last_synced_at":"2025-10-25T05:16:12.612Z","repository":{"id":20187997,"uuid":"23459085","full_name":"xwp/wp-better-find-posts","owner":"xwp","description":"Better Find Posts WordPress plugin","archived":false,"fork":false,"pushed_at":"2014-08-29T22:03:14.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-06-03T14:42:39.013Z","etag":null,"topics":[],"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/xwp.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-08-29T09:19:50.000Z","updated_at":"2014-11-03T17:39:49.000Z","dependencies_parsed_at":"2022-07-27T01:02:18.321Z","dependency_job_id":null,"html_url":"https://github.com/xwp/wp-better-find-posts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xwp/wp-better-find-posts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-better-find-posts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-better-find-posts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-better-find-posts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-better-find-posts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwp","download_url":"https://codeload.github.com/xwp/wp-better-find-posts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-better-find-posts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266732815,"owners_count":23976104,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-15T05:19:04.389Z","updated_at":"2025-10-25T05:16:07.576Z","avatar_url":"https://github.com/xwp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Better Find Posts\n\nExtensible JavaScript-centric replacement for the WordPress 3.1 `find_posts_div()`/`findPosts`\nAPI. Add to page via `\\Better_Find_Posts::instance()-\u003eenqueue()` then create\na control via `BetterFindPosts.create()`.\n\nExample code:\n\n```php\n\nadd_action( 'add_meta_boxes', function () {\n\t$id = 'linked-post-metabox';\n\t$title = __( 'Linked Post' );\n\t$post_type = 'post';\n\t$context = 'normal';\n\t$priority = 'high';\n\t$callback = 'linked_post_metabox';\n\tadd_meta_box( $id, $title, $callback, $post_type, $context, $priority );\n} );\n\nfunction linked_post_metabox() {\n\t\\Better_Find_Posts::instance()-\u003eenqueue();\n\t?\u003e\n\t\u003cdiv class=\"search-form\"\u003e\u003c/div\u003e\n\t\u003cdiv class=\"results-table\"\u003e\u003c/div\u003e\n\t\u003c?php\n\tadd_action( 'admin_footer', 'linked_post_footer_js', 20 );\n}\n\nfunction linked_post_footer_js() {\n\twp_print_scripts( array( 'better-find-posts' ) );\n\t?\u003e\n\t\u003cscript\u003e\n\tBetterFindPosts.ready.done( function () {\n\t\tvar control = BetterFindPosts.create( {\n\t\t\tsearchFormContainer: '#linked-post-metabox .search-form',\n\t\t\tresultsTableContainer: '#linked-post-metabox .results-table',\n\t\t\tdefaultQueryArgs: {\n\t\t\t\t'post_type': 'post',\n\t\t\t\t'post_status': 'publish'\n\t\t\t},\n\t\t\thiddenColumns: [ 'type', 'status', 'time' ]\n\t\t} );\n\n\t\t// @todo Need some built-in events here\n\n\t\tcontrol.resultsTableContainer.on( 'click', 'input', function () {\n\t\t\tvar post_id = jQuery( this ).val();\n\t\t\t// Do something with this\n\t\t} );\n\t} );\n\t\u003c/script\u003e\n\t\u003c?php\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-better-find-posts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwp%2Fwp-better-find-posts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-better-find-posts/lists"}