WordPress.org

Plugin Directory

Changeset 553414


Ignore:
Timestamp:
06/05/12 14:39:07 (23 months ago)
Author:
coffee2code
Message:
  • Update to v1.5
  • Recursively hide nested broken shortcodes
  • Re-license as GPLv2 or later (from X11)
  • Add 'License' and 'License URI' header tags to readme.txt and plugin file
  • Remove ending PHP close tag
  • Note compatibility through WP 3.4+
  • Fix error in example code in readme.txt
Location:
hide-broken-shortcodes
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • hide-broken-shortcodes/tags/1.5/hide-broken-shortcodes.php

    r472896 r553414  
    33 * @package Hide_Broken_Shortcodes 
    44 * @author Scott Reilly 
    5  * @version 1.4 
     5 * @version 1.5 
    66 */ 
    77/* 
    88Plugin Name: Hide Broken Shortcodes 
    9 Version: 1.4 
     9Version: 1.5 
    1010Plugin URI: http://coffee2code.com/wp-plugins/hide-broken-shortcodes/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
     13License: GPLv2 or later 
     14License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1315Description: Prevent broken shortcodes from appearing in posts and pages. 
    1416 
    15 Compatible with WordPress 2.5+, 2.6+, 2.7+, 2.8+, 2.9+, 3.0+, 3.1+, 3.2+, 3.3+. 
     17Compatible with WordPress 2.5 through 3.4+. 
    1618 
    1719=>> Read the accompanying readme.txt file for instructions and documentation. 
     
    2527 
    2628/* 
    27 Copyright (c) 2009-2012 by Scott Reilly (aka coffee2code) 
     29    Copyright (c) 2009-2012 by Scott Reilly (aka coffee2code) 
    2830 
    29 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    30 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    31 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    32 Software is furnished to do so, subject to the following conditions: 
     31    This program is free software; you can redistribute it and/or 
     32    modify it under the terms of the GNU General Public License 
     33    as published by the Free Software Foundation; either version 2 
     34    of the License, or (at your option) any later version. 
    3335 
    34 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
     36    This program is distributed in the hope that it will be useful, 
     37    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     38    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     39    GNU General Public License for more details. 
    3540 
    36 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    37 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    38 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    39 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     41    You should have received a copy of the GNU General Public License 
     42    along with this program; if not, write to the Free Software 
     43    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    4044*/ 
    4145 
     
    4650    /** 
    4751     * Returns version of the plugin. 
     52     * 
     53     * @since 1.4 
    4854     */ 
    4955    public static function version() { 
    50         return '1.4'; 
     56        return '1.5'; 
    5157    } 
    5258 
     
    138144 
    139145        // If text is being wrapped by opening and closing shortcode tag, show text. Otherwise, show nothing. 
    140         $default_display = ( isset( $m[5] ) ? $m[5] : '' ); 
     146        $default_display = ( isset( $m[5] ) ? self::do_shortcode( $m[5] ) : '' ); 
    141147 
    142148        // The filter is sending these arguments; apply_filters('hide_broken_shortcode', $default_display, $shortcode_name, $match_array) 
     
    149155 
    150156endif; // end if !class_exists() 
    151  
    152 ?> 
  • hide-broken-shortcodes/tags/1.5/readme.txt

    r472896 r553414  
    33Donate link: http://coffee2code.com/donate 
    44Tags: shortcode, shortcodes, content, post, page, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 2.5 
    6 Tested up to: 3.3 
    7 Stable tag: 1.4 
    8 Version: 1.4 
     8Tested up to: 3.4 
     9Stable tag: 1.5 
     10Version: 1.5 
    911 
    1012Prevent broken shortcodes from appearing in posts and pages. 
     
    5658    $shortcodes_not_to_hide = array( 'abc', 'gallery' ); 
    5759    if ( in_array( $shortcode_name, $shortcodes_not_to_hide ) ) 
    58         $default_display = $m[0]; 
    59     return $default_display; 
     60        $display = $m[0]; 
     61    return $display; 
    6062} 
    6163add_filter( 'hide_broken_shortcode', 'allowed_broken_shortcodes', 10, 3 ); 
     
    98100 
    99101== Changelog == 
     102 
     103= 1.5 = 
     104* Recursively hide nested broken shortcodes 
     105* Re-license as GPLv2 or later (from X11) 
     106* Add 'License' and 'License URI' header tags to readme.txt and plugin file 
     107* Remove ending PHP close tag 
     108* Note compatibility through WP 3.4+ 
     109* Fix error in example code in readme.txt 
    100110 
    101111= 1.4 = 
     
    144154== Upgrade Notice == 
    145155 
     156= 1.5 = 
     157Recommended minor update: recursively hide nested broken shortcodes; noted compatibility through WP 3.4+; explicitly stated license 
     158 
    146159= 1.4 = 
    147160Minor update: support shortcode escaping syntax; noted compatibility through WP 3.3+. BE AWARE: An incompatible change has been made in third argument sent to 'hide_broken_shortcode' filter. 
  • hide-broken-shortcodes/trunk/hide-broken-shortcodes.php

    r472896 r553414  
    33 * @package Hide_Broken_Shortcodes 
    44 * @author Scott Reilly 
    5  * @version 1.4 
     5 * @version 1.5 
    66 */ 
    77/* 
    88Plugin Name: Hide Broken Shortcodes 
    9 Version: 1.4 
     9Version: 1.5 
    1010Plugin URI: http://coffee2code.com/wp-plugins/hide-broken-shortcodes/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
     13License: GPLv2 or later 
     14License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1315Description: Prevent broken shortcodes from appearing in posts and pages. 
    1416 
    15 Compatible with WordPress 2.5+, 2.6+, 2.7+, 2.8+, 2.9+, 3.0+, 3.1+, 3.2+, 3.3+. 
     17Compatible with WordPress 2.5 through 3.4+. 
    1618 
    1719=>> Read the accompanying readme.txt file for instructions and documentation. 
     
    2527 
    2628/* 
    27 Copyright (c) 2009-2012 by Scott Reilly (aka coffee2code) 
     29    Copyright (c) 2009-2012 by Scott Reilly (aka coffee2code) 
    2830 
    29 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    30 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    31 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    32 Software is furnished to do so, subject to the following conditions: 
     31    This program is free software; you can redistribute it and/or 
     32    modify it under the terms of the GNU General Public License 
     33    as published by the Free Software Foundation; either version 2 
     34    of the License, or (at your option) any later version. 
    3335 
    34 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
     36    This program is distributed in the hope that it will be useful, 
     37    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     38    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     39    GNU General Public License for more details. 
    3540 
    36 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    37 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    38 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    39 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     41    You should have received a copy of the GNU General Public License 
     42    along with this program; if not, write to the Free Software 
     43    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    4044*/ 
    4145 
     
    4650    /** 
    4751     * Returns version of the plugin. 
     52     * 
     53     * @since 1.4 
    4854     */ 
    4955    public static function version() { 
    50         return '1.4'; 
     56        return '1.5'; 
    5157    } 
    5258 
     
    138144 
    139145        // If text is being wrapped by opening and closing shortcode tag, show text. Otherwise, show nothing. 
    140         $default_display = ( isset( $m[5] ) ? $m[5] : '' ); 
     146        $default_display = ( isset( $m[5] ) ? self::do_shortcode( $m[5] ) : '' ); 
    141147 
    142148        // The filter is sending these arguments; apply_filters('hide_broken_shortcode', $default_display, $shortcode_name, $match_array) 
     
    149155 
    150156endif; // end if !class_exists() 
    151  
    152 ?> 
  • hide-broken-shortcodes/trunk/readme.txt

    r472896 r553414  
    33Donate link: http://coffee2code.com/donate 
    44Tags: shortcode, shortcodes, content, post, page, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 2.5 
    6 Tested up to: 3.3 
    7 Stable tag: 1.4 
    8 Version: 1.4 
     8Tested up to: 3.4 
     9Stable tag: 1.5 
     10Version: 1.5 
    911 
    1012Prevent broken shortcodes from appearing in posts and pages. 
     
    5658    $shortcodes_not_to_hide = array( 'abc', 'gallery' ); 
    5759    if ( in_array( $shortcode_name, $shortcodes_not_to_hide ) ) 
    58         $default_display = $m[0]; 
    59     return $default_display; 
     60        $display = $m[0]; 
     61    return $display; 
    6062} 
    6163add_filter( 'hide_broken_shortcode', 'allowed_broken_shortcodes', 10, 3 ); 
     
    98100 
    99101== Changelog == 
     102 
     103= 1.5 = 
     104* Recursively hide nested broken shortcodes 
     105* Re-license as GPLv2 or later (from X11) 
     106* Add 'License' and 'License URI' header tags to readme.txt and plugin file 
     107* Remove ending PHP close tag 
     108* Note compatibility through WP 3.4+ 
     109* Fix error in example code in readme.txt 
    100110 
    101111= 1.4 = 
     
    144154== Upgrade Notice == 
    145155 
     156= 1.5 = 
     157Recommended minor update: recursively hide nested broken shortcodes; noted compatibility through WP 3.4+; explicitly stated license 
     158 
    146159= 1.4 = 
    147160Minor update: support shortcode escaping syntax; noted compatibility through WP 3.3+. BE AWARE: An incompatible change has been made in third argument sent to 'hide_broken_shortcode' filter. 
Note: See TracChangeset for help on using the changeset viewer.