{"id":28252,"date":"2014-03-08T04:13:46","date_gmt":"2014-03-08T04:13:46","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/jpd2\/"},"modified":"2022-02-24T19:44:00","modified_gmt":"2022-02-24T19:44:00","slug":"jpd2","status":"publish","type":"plugin","link":"https:\/\/tr.wordpress.org\/plugins\/jpd2\/","author":9688619,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.8.7","stable_tag":"0.8.7","tested":"3.8.41","requires":"3.8","requires_php":"","requires_plugins":"","header_name":"JPD2","header_author":"Josh Pollock","header_description":"","assets_banners_color":"","last_updated":"2022-02-24 19:44:00","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/JoshPress.net","header_plugin_uri":"http:\/\/joshpress.net\/blog\/jpd2\/","header_author_uri":"http:\/\/www.JoshPress.net","rating":0,"author_block_rating":0,"active_installs":0,"downloads":3866,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.0.0.1":{"tag":"0.0.0.1","author":"Shelob9","date":"2018-05-24 16:08:07"},"0.0.1":{"tag":"0.0.1","author":"Shelob9","date":"2014-03-08 04:13:55"},"0.0.2":{"tag":"0.0.2","author":"Shelob9","date":"2014-03-08 04:18:37"},"0.1.0":{"tag":"0.1.0","author":"Shelob9","date":"2016-07-28 06:29:16"},"0.8.3":{"tag":"0.8.3","author":"Shelob9","date":"2022-02-24 15:35:57"},"0.8.4":{"tag":"0.8.4","author":"Shelob9","date":"2022-02-24 15:39:40"},"0.8.6":{"tag":"0.8.6","author":"Shelob9","date":"2022-02-24 19:35:40"},"0.8.7":{"tag":"0.8.7","author":"Shelob9","date":"2022-02-24 19:44:00"}},"upgrade_notice":{"":"<p>Nothing to notice for now.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.0.1","0.0.1","0.0.2","0.1.0","0.8.3","0.8.4","0.8.6","0.8.7"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Example usage."}},"plugin_section":[],"plugin_tags":[144,12113],"plugin_category":[52],"plugin_contributors":[78444],"plugin_business_model":[],"class_list":["post-28252","plugin","type-plugin","status-publish","hentry","plugin_tags-caching","plugin_tags-transients","plugin_category-performance","plugin_contributors-shelob9","plugin_committers-shelob9"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/jpd2.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Makes caching the results of a WP_Query, WP_User_Query and WP_Meta_Query, via the transients API easy. Realize increased performance, by caching the results of your queries, with one simple function.<\/p>\n\n<p>All saved queries are automatically reset when any post is updated.<\/p>\n\n<p>Basic usage:<\/p>\n\n<ul>\n<li>Specify arguments for the query ($args)<\/li>\n<li>Give the query a name ($name)<\/li>\n<li>$query = jpd2_better_query( $args, $name );<\/li>\n<li>Use $query like you would any other WP_Query object.<\/li>\n<li>See FAQ for other usages<\/li>\n<\/ul>\n\n<!--section=installation-->\n<h4>Using The WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Search for 'JPD2'<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin on the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Uploading in WordPress Dashboard<\/h4>\n\n<ol>\n<li>Navigate to the 'Add New' in the plugins dashboard<\/li>\n<li>Navigate to the 'Upload' area<\/li>\n<li>Select <code>JPD2.zip<\/code> from your computer<\/li>\n<li>Click 'Install Now'<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<h4>Using FTP<\/h4>\n\n<ol>\n<li>Download <code>JPD2.zip<\/code><\/li>\n<li>Extract the <code>JPD2<\/code> directory to your computer<\/li>\n<li>Upload the <code>JPD2<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin in the Plugin dashboard<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20i%20so%20awesome%20about%20transient%20cacheing%3F'><h3>What I So Awesome About Transient Cacheing?<\/h3><\/dt>\n<dd><p>The <a href=\"http:\/\/codex.wordpress.org\/Transients_API\">Transients API<\/a> creates temporary entries into your database. One great use is to store the result of complex queries, which allows WordPress to run one query--to get the transient--instead of many queries, and get the same results.<\/p>\n\n<p><a href=\"http:\/\/www.doitwithwp.com\/introduction-transients-wordpress\/\">This article<\/a> explains very well how that works. This plugin automates the process for you.<\/p><\/dd>\n<dt id='is%20it%20safe%20to%20call%20this%20function%20in%20my%20theme%20or%20plugin%3F'><h3>Is It Safe To Call This Function In My Theme Or Plugin?<\/h3><\/dt>\n<dd><p>The safest method would be to wrap the call in a check of function_exists().<\/p>\n\n<p>For example code see: <a href=\"https:\/\/gist.github.com\/Shelob9\/9425101#file-use_jpd2-php\">https:\/\/gist.github.com\/Shelob9\/9425101#file-use_jpd2-php<\/a><\/p>\n\n<p>This way if the JPD2 plugin is not activated, WordPress will run WP_Query directly, instead of returning a fatal error, which would suck.<\/p><\/dd>\n<dt id='how%20long%20does%20the%20transient%20last%3F'><h3>How Long Does The Transient Last?<\/h3><\/dt>\n<dd><p>The transient lasts up to the default transient expiration time, unless an expiration value is set with the $expire argument.<\/p><\/dd>\n<dt id='how%20do%20i%20change%20the%20default%20transient%20expiration%20time%3F'><h3>How Do I Change The Default Transient Expiration Time?<\/h3><\/dt>\n<dd><p>Two ways:<\/p>\n\n<ol>\n<li>Define the JPD2_EXP constant in wp-config, or anytime before this plugin is loaded.<\/li>\n<li>Use the 'JPD2_expire' action<\/li>\n<\/ol>\n\n<p>The action, if used, will override the constant.<\/p><\/dd>\n<dt id='how%20do%20i%20use%20a%20wp_user_query%20or%20wp_meta_query%3F'><h3>How Do I Use A WP_User_Query or WP_Meta_Query?<\/h3><\/dt>\n<dd><p>By default arguments are passed to WP_Query. You may use the $type argument. You can set it to 'wp_query', which is the default, 'wp_user_query', or 'wp_meta_query'.<\/p><\/dd>\n<dt id='why%20is%20this%20plugin%20called%20jpd2%3F'><h3>Why Is This Plugin Called JPD2?<\/h3><\/dt>\n<dd><p>Because Star Wars.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>The first version on WordPress.org.<\/li>\n<\/ul>\n\n<h4>0.0.2<\/h4>\n\n<ul>\n<li>Readme change for better readability in FAQ<\/li>\n<li>Update plugin URI<\/li>\n<\/ul>\n\n<p>= 0.1.0\n* Fix conditional logic preventing non WP_Query queries from working.\n* Fix args in main function.\n* Support for Pods queries.<\/p>","raw_excerpt":"Makes caching WordPress queries via the Transients API easy.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/28252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=28252"}],"author":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/shelob9"}],"wp:attachment":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=28252"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=28252"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=28252"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=28252"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=28252"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=28252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}