Plugin Directory

Changeset 577218


Ignore:
Timestamp:
07/25/2012 03:33:09 PM (14 years ago)
Author:
tickee
Message:

shortcode added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tickee-widget/tags/0.1/tickee-widget.php

    r544820 r577218  
    1414
    1515
    16 
    1716/**
    1817 * The default Tickee Widget result (if there is one).
     
    2423 * @return  string  Tickee Widget iframe tag   
    2524 */
    26     function tickee() {
     25    function tickee( $atts = null ) {
    2726        global $post;
    2827   
    29     #   Check if the tickee account is set in dashboard settings
    30         if( !$account = get_option('tickee_account'))
     28    #   Check if the tickee account is set in dashboard settings or shortcode
     29        if( $atts['slug'])
     30            $account = array('slug'=> $atts['slug']);
     31       
     32        else if( !$account = get_option('tickee_account'))
    3133            return no_tickee( 'stop' );
    3234   
     
    4547
    4648    }
     49   
     50   
     51/**
     52 * Add Shortcode
     53 *
     54 */
     55 
     56 add_shortcode('tickee', 'tickee');
    4757
    4858
Note: See TracChangeset for help on using the changeset viewer.