Plugin Directory

Changeset 434396


Ignore:
Timestamp:
09/07/2011 01:13:49 AM (15 years ago)
Author:
dyerware
Message:

v1.6

Location:
easy-spoiler/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • easy-spoiler/trunk/easy-spoiler-settings.php

    r429733 r434396  
    9898            'text' => 'Render the title in a bold font',               
    9999            'help' => 'If checked, the title will be bold.' ),
    100            
     100   
    101101        (object) array(
    102102            'title' => 'Font Size',
     
    104104            'text' => 'The size of the font (in percent)',             
    105105            'help' => 'Provide a number as a percent for the title size.  It may be larger than 100 (120 is the default).' ),
     106           
     107        (object) array(
     108            'title' => 'Embed shortcodes within Title',
     109            'key' => 'GBL_TITLEPARSE',
     110            'style' => 'max-width: 5em',
     111            'text' => 'Tells Easy Spoiler to parse the spoiler title for additional embedded shortcodes.',             
     112            'help' => 'If checked, ensure you set the open and close tokens below.  You must choose tokens different than the angular brackets [, ].  For example, you may use (, ):  (myshortcode)xx(/myshortcode)' ),
     113           
     114        (object) array(
     115            'title' => 'Shortcode Open character',
     116            'key' => 'GBL_TITLEPARSECHAROPEN',
     117            'text' => 'The character to start a Title shortcode with.  [ is disallowed.',               
     118            'help' => 'Relevant only if Embed Shortcodes Within Title is entabled.  This is the character (or string) to match signifying the start of a shortcode.   Do not use brackets.' ),
     119
     120        (object) array(
     121            'title' => 'Shortcode Close character',
     122            'key' => 'GBL_TITLEPARSECHARCLOSE',
     123            'text' => 'The character to end a Title shortcode with.  ] is disallowed.',             
     124            'help' => 'Relevant only if Embed Shortcodes Within Title is entabled.  This is the character (or string) to match signifying the end of a shortcode.   Do not use brackets.' ),
     125
    106126    )),
    107127       
  • easy-spoiler/trunk/easy-spoiler.php

    r429733 r434396  
    22/*
    33Plugin Name: Easy Spoiler
    4 Version: 1.5
     4Version: 1.6
    55Plugin URI: http://www.dyerware.com/main/products/easy-spoiler
    66Description: Creates an attractive container to hide a spoiler within a post or page.  Works in comments and widgets as well.  Also supports clustering spoilers into groups.
     
    7474    var $GBL_TITLEBOLD = false;
    7575    var $GBL_TITLESIZE = 120;
     76   
     77    var $GBL_TITLEPARSE = false;
     78    var $GBL_TITLEPARSECHAROPEN =  '(';
     79    var $GBL_TITLEPARSECHARCLOSE = ')';
    7680   
    7781   
     
    167171            'GBL_TITLECOLOR', 'GBL_OUTERBKGCOLOR', 'GBL_INNERBKGCOLOR', 'GBL_BUTTONCOLOR', 'GBL_BUTTONTEXT',
    168172            'GBL_INNERTEXTCOLOR', 'GBL_BUTTONLINE', 'GBL_REFRESHIFRAMES', 'GBL_ANIMATIONSPEED', 'GBL_TITLEBARBUTTON',
    169             'GBL_SHOWSELECT', 'GBL_SELECT', 'GBL_TITLEBOLD', 'GBL_TITLESIZE',
     173            'GBL_SHOWSELECT', 'GBL_SELECT', 'GBL_TITLEBOLD', 'GBL_TITLESIZE', 'GBL_TITLEPARSE', 'GBL_TITLEPARSECHAROPEN',
     174            'GBL_TITLEPARSECHARCLOSE',
    170175        );
    171176        $this->op = (object) array();
     
    391396               if ($keyval != 0 || strpos($key, "0") === 0)
    392397               {
    393                     $haveIssue = TRUE;
     398                    //$haveIssue = TRUE;
    394399                    $nearKey = $keyval;
    395400                    $nearValue = $att;
     
    411416        // Translate strings to numerics
    412417        array_walk($spoilerConfig, array($this, 'translate_numerics'));
    413              
    414                    
     418                           
    415419        $this->spoilerNum++;
    416420       
     
    435439        else
    436440        {
    437           $spoilertitle = $spoilerConfig['intro'] . ': ' . $spoilerConfig['title'];
     441            // Use embedded shortcodes within title?
     442            if ($this->GBL_TITLEPARSE)
     443            {
     444                $spoilerConfig['title'] = str_replace($this->GBL_TITLEPARSECHAROPEN,  "[", $spoilerConfig['title']);
     445                $spoilerConfig['title'] = str_replace($this->GBL_TITLEPARSECHARCLOSE, "]", $spoilerConfig['title']);
     446                $spoilerConfig['title'] = do_shortcode($spoilerConfig['title']);
     447            }
     448           
     449            $spoilertitle = $spoilerConfig['intro'] . ': ' . $spoilerConfig['title'];
    438450        }
    439451         
  • easy-spoiler/trunk/readme.txt

    r429733 r434396  
    66Requires at least: 2.8
    77Tested up to: 3.2.1
    8 Stable tag: 1.5
     8Stable tag: 1.6
    99
    1010This plugin allows you to create a container for spoilers within pages, posts, comments, and widgets.  Also supports spoiler groups.
     
    6969== Upgrade Notice ==
    7070
     71= 1.6 =
     72 * You can now embed shortcodes within the spoiler title via a new enable/disable checkbox on the admin panel.  Note you cannot use the angular brackets.  Rather, you use parens: (myshortcode)xxx(/myshortcode).  You can replace the use of parens with something else in the admin panel as well.
     73
    7174= 1.5 =
    7275 * Brought back original button style
     
    120123== Changelog ==
    121124
     125= 1.6 =
     126 * You can now embed shortcodes within the spoiler title via a new enable/disable checkbox on the admin panel.  Note you cannot use the angular brackets.  Rather, you use parens: (myshortcode)xxx(/myshortcode).  You can replace the use of parens with something else in the admin panel as well.
     127
    122128= 1.5 =
    123129 * Brought back original button style
Note: See TracChangeset for help on using the changeset viewer.