Changeset 901322
- Timestamp:
- 04/23/2014 11:35:07 PM (12 years ago)
- Location:
- media-tags/trunk
- Files:
-
- 2 edited
-
media_tags.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-tags/trunk/media_tags.php
r900295 r901322 5 5 Description: Provides ability to tag media/attachments via Media Management screens 6 6 Author: Paul Menard 7 Version: 3.2 7 Version: 3.2.0.1 8 8 Author URI: http://www.codehooligans.com 9 9 */ … … 149 149 function get_attachments_by_media_tags($args='') 150 150 { 151 if ((!isset($args['query'])) || (empty($args['query']))) { 152 if (defined('MEDIA_TAGS_QUERY')) { 153 $args['query'] = MEDIA_TAGS_QUERY; 154 } else { 155 $args['query'] = 'wp_query'; 156 } 157 } 158 151 $defaults = array( 152 'call_source' => '', 153 'return_type' => '', 154 'display_item_callback' => 'default_item_callback', 155 'media_tags' => '', 156 'media_types' => null, 157 'numberposts' => '-1', 158 'orderby' => 'menu_order', 159 'order' => 'ASC', 160 'offset' => '0', 161 'paged' => 1, 162 'post_type' => 'attachment', 163 'search_by' => 'slug', 164 'size' => 'medium', 165 'tags_compare' => 'IN', 166 'nopaging' => false, 167 'post_status' => 'inherit', 168 'query' => defined('MEDIA_TAGS_QUERY') ? MEDIA_TAGS_QUERY : 'wp_query' 169 ); 170 $args = wp_parse_args( $args, $defaults ); 159 171 160 172 //echo "args<pre>"; print_r($args); echo "</pre>"; … … 166 178 } 167 179 168 function get_attachments_by_media_tags_legacy($ args='') {180 function get_attachments_by_media_tags_legacy($r='') { 169 181 170 182 global $post; 171 183 184 /* 172 185 $defaults = array( 173 186 'call_source' => '', … … 187 200 ); 188 201 $r = wp_parse_args( $args, $defaults ); 189 202 */ 190 203 if ((!$r['media_tags']) || (strlen($r['media_tags']) == 0)) 191 204 return; … … 403 416 [media-tags media_tags="flowers" orderby="title" query="wp_query"] 404 417 */ 405 function get_attachments_by_media_tags_query($ args='')418 function get_attachments_by_media_tags_query($r='') 406 419 { 407 420 global $post; 408 421 /* 409 422 $defaults = array( 410 423 'call_source' => '', … … 426 439 ); 427 440 $r = wp_parse_args( $args, $defaults ); 428 441 */ 429 442 // IF the media_tags item is empty then we can't do anything. 430 443 if ((!$r['media_tags']) || (strlen($r['media_tags']) == 0)) -
media-tags/trunk/readme.txt
r900333 r901322 5 5 Requires at least: 3.7 6 6 Tested up to: 3.9 7 Stable tag: 3.2 7 Stable tag: 3.2.0.1 8 8 License: GPLv2 9 9 License URI: http://www.opensource.org/licenses/GPL-2.0 … … 58 58 == Changelog == 59 59 60 = 3.2.0.1 = 61 2014-04-23 62 * Corrected issue where calls to get_attachments_by_media_tags() function where properly processing. 63 60 64 = 3.2 = 65 2014-04-21 61 66 * Converted older get_posts query style for media-tags shortcode to use WP_Query object. A new shortcode parameter query="wp_query" can be used to force specific shortcodes to use WP_Query. Or set define('MEDIA_TAGS_QUERY', 'wp_query') in your wp-config.php 62 67 * Added new shortcode for multiple post_parent ID. post_parent="1,16,32" or for current post use post_parent="this" so you don't have to hard code the post->ID
Note: See TracChangeset
for help on using the changeset viewer.