Plugin Directory

Changeset 167341


Ignore:
Timestamp:
10/26/2009 08:31:05 PM (16 years ago)
Author:
pantsonhead
Message:

v0.2.4 added shortcode support

Location:
randomtext/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • randomtext/trunk/randomtext.php

    r156974 r167341  
    55Plugin URI: http://www.pantsonhead.com/wordpress/randomtext/
    66Description: A widget to display randomized text on your site
    7 Version: 0.2.3
     7Version: 0.2.4
    88Author: Greg Jackson
    99Author URI: http://www.pantsonhead.com
     
    184184if(is_admin())
    185185    include 'randomtext_admin.php';
     186   
     187   
     188// Shortcode implementation
     189function randomtext_shortcode($attribs) {
     190    extract(shortcode_atts(array('category' => '', 'random' => FALSE, ), $attribs));
     191    $randomtext = new randomtext;
     192    return $randomtext->get_randomtext($category,$random);
     193}
     194
     195add_shortcode('randomtext', 'randomtext_shortcode');
    186196
    187197?>
  • randomtext/trunk/readme.txt

    r156974 r167341  
    29292. Text management page
    3030
     31== Frequently Asked Questions ==
     32
     33= Can I use shortcodes? =
     34
     35Yes, you can use [randomtext] or [randomtext category="funny"] or even [randomtext category="funny" random="1"].
     36
     37
    3138== Changelog ==
     39
     40= v0.2.4 2009-09-22 =
     41
     42* Added shortcode support
    3243
    3344= v0.2.3 2009-09-22 =
Note: See TracChangeset for help on using the changeset viewer.