Plugin Directory

Changeset 1397471


Ignore:
Timestamp:
04/16/2016 09:08:42 PM (10 years ago)
Author:
Moisture
Message:

Add conditional shortcodes for categories and venues

Location:
am-events/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • am-events/trunk/am-events.php

    r1249123 r1397471  
    44  Plugin URI: http://wordpress.org/extend/plugins/am-events/
    55  Description: Adds a post type for events and a customizable widget for displaying upcoming events.
    6   Version: 1.10.0
     6  Version: 1.11.0
    77  Author: Atte Moisio
    88  Author URI: http://attemoisio.fi
     
    6363 *     [if cond="startday-is-endday"]
    6464 *     [if cond="startday-not-endday"]
     65 *     [if cond="has-venue"]
     66 *     [if cond="has-category"]
    6567 *
    6668 * Template tags:
  • am-events/trunk/readme.txt

    r1249126 r1397471  
    33Tags: event list, events, upcoming events, event list, custom post type, custom taxonomy, plugin, widget
    44Requires at least: 3.3.1
    5 Tested up to: 4.3.1
    6 Stable tag: 1.10.0
     5Tested up to: 4.5
     6Stable tag: 1.11.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5555
    5656== Changelog ==
     57
     58= 1.11.0 =
     59* Added new conditional shortcodes for venues and categories
    5760
    5861= 1.10.0 =
     
    141144
    142145== Upgrade Notice ==
     146
     147= 1.11.0 =
     148* Adds new conditional shortcodes for venues and categories
    143149
    144150= 1.10.0 =
     
    242248 * [if cond="startday-is-endday"]
    243249 * [if cond="startday-not-endday"]
    244  
    245 
     250 * [if cond="has-venue"]
     251 * [if cond="has-category"]
    246252
    247253The title can be linked to the event post with the 'link' attribute, e.g. [event-title link=true]
  • am-events/trunk/widget-upcoming-events.php

    r1249123 r1397471  
    348348                        $result = am_get_the_startdate() === am_get_the_enddate() ? $m[1] . $m[5] . $m[6] : '';
    349349                        return $this->parse_event($result);
     350                       
     351                    case 'has-venue':
     352                        $result = am_get_the_venue() == true ? $m[1] . $m[5] . $m[6] : '';
     353                        return $this->parse_event($result);
     354                       
     355                    case 'has-category':
     356                        $result = am_get_the_event_category() == true ? $m[1] . $m[5] . $m[6] : '';
     357                        return $this->parse_event($result);
    350358                   
    351359                    case 'startday-is-endday':
Note: See TracChangeset for help on using the changeset viewer.