Plugin Directory

Changeset 901322


Ignore:
Timestamp:
04/23/2014 11:35:07 PM (12 years ago)
Author:
pmenard
Message:

Media-Tags 3.2.0.1

Location:
media-tags/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • media-tags/trunk/media_tags.php

    r900295 r901322  
    55Description: Provides ability to tag media/attachments via Media Management screens
    66Author: Paul Menard
    7 Version: 3.2
     7Version: 3.2.0.1
    88Author URI: http://www.codehooligans.com
    99*/
     
    149149    function get_attachments_by_media_tags($args='')
    150150    {
    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 );
    159171       
    160172        //echo "args<pre>"; print_r($args); echo "</pre>";
     
    166178    }       
    167179   
    168     function get_attachments_by_media_tags_legacy($args='') {
     180    function get_attachments_by_media_tags_legacy($r='') {
    169181
    170182        global $post;
    171183
     184/*
    172185        $defaults = array(
    173186            'call_source' => '',
     
    187200        );
    188201        $r = wp_parse_args( $args, $defaults );
    189        
     202*/     
    190203        if ((!$r['media_tags']) || (strlen($r['media_tags']) == 0))
    191204            return;
     
    403416    [media-tags media_tags="flowers" orderby="title" query="wp_query"]
    404417*/     
    405     function get_attachments_by_media_tags_query($args='')
     418    function get_attachments_by_media_tags_query($r='')
    406419    {
    407420        global $post;
    408 
     421/*
    409422        $defaults = array(
    410423            'call_source' => '',
     
    426439        );
    427440        $r = wp_parse_args( $args, $defaults );
    428        
     441*/     
    429442        // IF the media_tags item is empty then we can't do anything.
    430443        if ((!$r['media_tags']) || (strlen($r['media_tags']) == 0))
  • media-tags/trunk/readme.txt

    r900333 r901322  
    55Requires at least: 3.7
    66Tested up to: 3.9
    7 Stable tag: 3.2
     7Stable tag: 3.2.0.1
    88License: GPLv2
    99License URI: http://www.opensource.org/licenses/GPL-2.0
     
    5858== Changelog ==
    5959
     60= 3.2.0.1 =
     612014-04-23
     62* Corrected issue where calls to get_attachments_by_media_tags() function where properly processing.
     63
    6064= 3.2 =
     652014-04-21
    6166* 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
    6267* 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.