{"id":13171,"date":"2011-05-08T11:56:10","date_gmt":"2011-05-08T11:56:10","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-query-fields\/"},"modified":"2011-05-10T18:03:34","modified_gmt":"2011-05-10T18:03:34","slug":"custom-query-fields","status":"publish","type":"plugin","link":"https:\/\/azb.wordpress.org\/plugins\/custom-query-fields\/","author":2224128,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.2b","stable_tag":"trunk","tested":"3.1.4","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Custom Query Fields","header_author":"Julian Lannigan","header_description":"","assets_banners_color":"","last_updated":"2011-05-10 18:03:34","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=9BBXFXSUG2D6U","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/custom-query-fields\/","header_author_uri":"http:\/\/julianlannigan.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3937,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.1.2b":"<p>Fixed alot of major bugs. Also, added backward compatibility with version 3.0. Some code efficiency improved.<\/p>","0.1b":"<p>Initial build.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2b"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"None yet."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2010,5914,1626],"plugin_category":[],"plugin_contributors":[89725],"plugin_business_model":[],"class_list":["post-13171","plugin","type-plugin","status-publish","hentry","plugin_tags-custom-fields","plugin_tags-meta_query","plugin_tags-query","plugin_contributors-julian1828","plugin_committers-julian1828"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/custom-query-fields.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>THIS PLUGIN IS IN HEAVY DEVELOPMENT!<\/p>\n\n<p>Extend your site's querying and sorting functionality using custom field values.<\/p>\n\n<p>The following function registers queryable fields.\n    register_custom_queryable_field($fieldName, $options);<\/p>\n\n<p>Simple Example:\n    register_custom_queryable_field('city');\n(The above registers the custom field 'city' to be searchable using query variables)\n    http:\/\/www.yoursite.com\/?city=Anahiem\n(displays posts which have a meta key 'city' and a value of 'Anahiem')<\/p>\n\n<p>Advanced Example:\n    register_custom_queryable_field(\"price\", array(\"dataType\"=&gt;\"numeric\"));\n(The above registers the custom field \"price\" to be searchable as a number using query variables)\n    http:\/\/www.yoursite.com\/?price=500\n(displays posts which have a meta key 'price' and a exact value of '500')\n    http:\/\/www.yoursite.com\/?price_min=200&amp;price_max=800&amp;order_by=price\n(displays posts, sorted by 'price', which have a meta key 'price' and a value between '200' and '800')<\/p>\n\n<p>Available Options:<\/p>\n\n<ul>\n<li>dataType\n<ul>\n<li>text (default)<\/li>\n<li>numeric (receive min\/max query variables, see above example)<\/li>\n<\/ul><\/li>\n<li>order\n<ul>\n<li>If the user uses the \"order_by\" query variable then this option determines the order. Available options are \"ASC\" and \"DESC\"(default)<\/li>\n<\/ul><\/li>\n<li>compare\n<ul>\n<li>Compare method for text types. Defaults to '='. Recommend 'LIKE'<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>There is a \"order_by\" query var made available.  This is used by adding <code>&amp;order_by=price<\/code> to the URL.  In this instance, the query would sort based on the \"price\" field only.<\/p>\n\n<p>Note: This plugin does not alter any queries when in the backend.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>custom-query-fields<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>See Description on how to enable the custom variables.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>When will you have some FAQ's?<\/dt>\n<dd><p>Soon.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.2b<\/h4>\n\n<ul>\n<li>Fixed some foreach bugs that threw warnings if no fields were registered.<\/li>\n<li>The plugin is now only using one global variable.<\/li>\n<li>Added backward compatibility with version 3.0.<\/li>\n<li>Improved code efficiency.<\/li>\n<li>Added enable and disable functions to allow you to apply custom field query to external query's.<\/li>\n<\/ul>\n\n<h4>0.1.1b<\/h4>\n\n<ul>\n<li>Added the ability to control whether the query altering function is run only once.<\/li>\n<li>Added the compare option to the registered fields. This compare is ignored for numeric comparisons.<\/li>\n<\/ul>\n\n<h4>0.1b<\/h4>\n\n<ul>\n<li>Initial build.<\/li>\n<\/ul>","raw_excerpt":"Extend your site&#039;s querying and sorting functionality using custom field values.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13171"}],"author":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/julian1828"}],"wp:attachment":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13171"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13171"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13171"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13171"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13171"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}