WordPress.org

Plugin Directory

Changeset 553454


Ignore:
Timestamp:
06/05/12 16:15:26 (23 months ago)
Author:
coffee2code
Message:
  • Update to v1.9
  • Fix to show HTML entity encoding in tooltip instead of the character
  • Change how scripts and styles are enqueued
  • Add version() to return plugin version
  • Re-license as GPLv2 or later (from X11)
  • Add 'Text Domain', 'License', and 'License URI' header tags to readme.txt and plugin file
  • Add banner image for plugin page
  • Remove ending PHP close tag
  • Note compatibility through WP 3.4+
Location:
html-special-characters-helper
Files:
2 added
2 edited
10 copied

Legend:

Unmodified
Added
Removed
  • html-special-characters-helper/tags/1.9/html-special-characters-helper.php

    r472617 r553454  
    33 * @package HTML_Special_Characters_Helper 
    44 * @author Scott Reilly 
    5  * @version 1.8 
     5 * @version 1.9 
    66 */ 
    77/* 
    88Plugin Name: HTML Special Characters Helper 
    9 Version: 1.8 
     9Version: 1.9 
    1010Plugin URI: http://coffee2code.com/wp-plugins/html-special-characters-helper/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
     13Text Domain: html-special-characters-helper 
    1314Domain Path: /lang/ 
     15License: GPLv2 or later 
     16License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1417Description: Admin widget on the Write Post page for inserting HTML encodings of special characters into the post. 
    1518 
    16 Compatible with WordPress 2.8+, 2.9+, 3.0+, 3.1+, 3.2+, 3.3+. 
     19Compatible with WordPress 2.8 through 3.4+. 
    1720 
    1821=>> Read the accompanying readme.txt file for instructions and documentation. 
     
    2629 
    2730/* 
    28 Copyright (c) 2007-2012 by Scott Reilly (aka coffee2code) 
    29  
    30 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    31 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    32 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    33 Software is furnished to do so, subject to the following conditions: 
    34  
    35 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
    36  
    37 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    38 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    39 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    40 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     31    Copyright (c) 2007-2012 by Scott Reilly (aka coffee2code) 
     32 
     33    This program is free software; you can redistribute it and/or 
     34    modify it under the terms of the GNU General Public License 
     35    as published by the Free Software Foundation; either version 2 
     36    of the License, or (at your option) any later version. 
     37 
     38    This program is distributed in the hope that it will be useful, 
     39    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     40    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     41    GNU General Public License for more details. 
     42 
     43    You should have received a copy of the GNU General Public License 
     44    along with this program; if not, write to the Free Software 
     45    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    4146*/ 
    4247 
     
    4752 
    4853    /** 
     54     * Returns version of the plugin. 
     55     * 
     56     * @since 1.9 
     57     */ 
     58    public static function version() { 
     59        return '1.9'; 
     60    } 
     61 
     62    /** 
    4963     * Constructor 
    5064     * 
     
    6175     */ 
    6276    public static function do_init() { 
    63         global $pagenow; 
    6477        load_plugin_textdomain( 'c2c_hsch', false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
    6578        self::$title = __( 'HTML Special Characters', 'c2c_hsch' ); 
    66         if ( in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ) ) ) { 
    67             // Enqueues JS for admin page 
    68             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_js' ) ); 
    69             // Register and enqueue styles for admin page 
    70             self::register_styles(); 
    71             add_action( 'admin_print_styles',    array( __CLASS__, 'enqueue_admin_css' ) ); 
    72         } 
     79        add_action( 'load-page.php',     array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     80        add_action( 'load-page-new.php', array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     81        add_action( 'load-post.php',     array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     82        add_action( 'load-post-new.php', array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     83 
    7384        $post_types = apply_filters( 'c2c_html_special_characters_helper_post_types', array( 'page', 'post' ) ); 
    7485        foreach ( $post_types as $post_type ) 
    7586            add_meta_box( 'htmlspecialchars', self::$title, array( __CLASS__, 'add_meta_box' ), $post_type, 'side' ); 
     87    } 
     88 
     89    /** 
     90     * Enqueues scripts and styles. 
     91     * 
     92     * @since 1.9 
     93     */ 
     94    public static function enqueue_scripts_and_styles() { 
     95        // Enqueues JS for admin page 
     96        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_js' ) ); 
     97        // Register and enqueue styles for admin page 
     98        self::register_styles(); 
     99        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_css' ) ); 
    76100    } 
    77101 
     
    309333                $moreinnards .= "<dt>$cat:</dt><dd>"; 
    310334            foreach ( $codes[$cat] as $code => $description ) { 
    311                     $ecode = esc_attr( $code ); 
     335                    $ecode = str_replace( '&', '&amp;', esc_attr( $code ) ); 
    312336                    $description = esc_attr( $description ); 
    313                     $item = "<acronym onclick=\"send_to_editor('$ecode');\" title='$ecode $description'> $code</acronym>"; 
     337                    $item = "<acronym onclick=\"send_to_editor('$ecode');\" title='$ecode $description'>$code</acronym> "; 
    314338                    if ( 'common' == $cat ) 
    315339                        $innards .= $item; 
     
    380404    public static function enqueue_admin_js() { 
    381405        wp_enqueue_script( 'jquery' ); 
    382         wp_enqueue_script( __CLASS__ . '_admin', plugins_url( 'admin.js', __FILE__ ), array( 'jquery' ), '1.0', true ); 
     406        wp_enqueue_script( __CLASS__ . '_admin', plugins_url( 'admin.js', __FILE__ ), array( 'jquery' ), self::version(), true ); 
    383407    } 
    384408 
     
    388412 
    389413endif; // end if !class_exists() 
    390  
    391 ?> 
  • html-special-characters-helper/tags/1.9/readme.txt

    r472617 r553454  
    33Donate link: http://coffee2code.com/donate 
    44Tags: post, admin widget, html special characters, write post, dbx, entity codes, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 2.8 
    6 Tested up to: 3.3 
    7 Stable tag: 1.8 
    8 Version: 1.8 
     8Tested up to: 3.4 
     9Stable tag: 1.9 
     10Version: 1.9 
    911 
    1012Admin widget on the Write Post page for inserting HTML encodings of special characters into the post. 
     
    109111 
    110112== Changelog == 
     113 
     114= 1.9 = 
     115* Fix to show HTML entity encoding in tooltip instead of the character 
     116* Change how scripts and styles are enqueued 
     117* Add version() to return plugin version 
     118* Re-license as GPLv2 or later (from X11) 
     119* Add 'Text Domain', 'License', and 'License URI' header tags to readme.txt and plugin file 
     120* Add banner image for plugin page 
     121* Remove ending PHP close tag 
     122* Note compatibility through WP 3.4+ 
    111123 
    112124= 1.8 = 
     
    181193== Upgrade Notice == 
    182194 
     195= 1.9 = 
     196Recommended minor update: minor fix to show HTML entity encoding in tooltip instead of the special character itself; minor improvements; noted compatibility through WP 3.4+; explicitly stated license 
     197 
    183198= 1.8 = 
    184199Recommended update: added support for other post_types (via filter); enqueue JS/CSS; support localization; updated screenshots; compatibility is now WP 2.8-3.3+. 
  • html-special-characters-helper/trunk/html-special-characters-helper.php

    r472617 r553454  
    33 * @package HTML_Special_Characters_Helper 
    44 * @author Scott Reilly 
    5  * @version 1.8 
     5 * @version 1.9 
    66 */ 
    77/* 
    88Plugin Name: HTML Special Characters Helper 
    9 Version: 1.8 
     9Version: 1.9 
    1010Plugin URI: http://coffee2code.com/wp-plugins/html-special-characters-helper/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
     13Text Domain: html-special-characters-helper 
    1314Domain Path: /lang/ 
     15License: GPLv2 or later 
     16License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1417Description: Admin widget on the Write Post page for inserting HTML encodings of special characters into the post. 
    1518 
    16 Compatible with WordPress 2.8+, 2.9+, 3.0+, 3.1+, 3.2+, 3.3+. 
     19Compatible with WordPress 2.8 through 3.4+. 
    1720 
    1821=>> Read the accompanying readme.txt file for instructions and documentation. 
     
    2629 
    2730/* 
    28 Copyright (c) 2007-2012 by Scott Reilly (aka coffee2code) 
    29  
    30 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    31 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    32 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    33 Software is furnished to do so, subject to the following conditions: 
    34  
    35 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
    36  
    37 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    38 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    39 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    40 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     31    Copyright (c) 2007-2012 by Scott Reilly (aka coffee2code) 
     32 
     33    This program is free software; you can redistribute it and/or 
     34    modify it under the terms of the GNU General Public License 
     35    as published by the Free Software Foundation; either version 2 
     36    of the License, or (at your option) any later version. 
     37 
     38    This program is distributed in the hope that it will be useful, 
     39    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     40    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     41    GNU General Public License for more details. 
     42 
     43    You should have received a copy of the GNU General Public License 
     44    along with this program; if not, write to the Free Software 
     45    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    4146*/ 
    4247 
     
    4752 
    4853    /** 
     54     * Returns version of the plugin. 
     55     * 
     56     * @since 1.9 
     57     */ 
     58    public static function version() { 
     59        return '1.9'; 
     60    } 
     61 
     62    /** 
    4963     * Constructor 
    5064     * 
     
    6175     */ 
    6276    public static function do_init() { 
    63         global $pagenow; 
    6477        load_plugin_textdomain( 'c2c_hsch', false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
    6578        self::$title = __( 'HTML Special Characters', 'c2c_hsch' ); 
    66         if ( in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ) ) ) { 
    67             // Enqueues JS for admin page 
    68             add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_js' ) ); 
    69             // Register and enqueue styles for admin page 
    70             self::register_styles(); 
    71             add_action( 'admin_print_styles',    array( __CLASS__, 'enqueue_admin_css' ) ); 
    72         } 
     79        add_action( 'load-page.php',     array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     80        add_action( 'load-page-new.php', array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     81        add_action( 'load-post.php',     array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     82        add_action( 'load-post-new.php', array( __CLASS__, 'enqueue_scripts_and_styles' ) ); 
     83 
    7384        $post_types = apply_filters( 'c2c_html_special_characters_helper_post_types', array( 'page', 'post' ) ); 
    7485        foreach ( $post_types as $post_type ) 
    7586            add_meta_box( 'htmlspecialchars', self::$title, array( __CLASS__, 'add_meta_box' ), $post_type, 'side' ); 
     87    } 
     88 
     89    /** 
     90     * Enqueues scripts and styles. 
     91     * 
     92     * @since 1.9 
     93     */ 
     94    public static function enqueue_scripts_and_styles() { 
     95        // Enqueues JS for admin page 
     96        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_js' ) ); 
     97        // Register and enqueue styles for admin page 
     98        self::register_styles(); 
     99        add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin_css' ) ); 
    76100    } 
    77101 
     
    309333                $moreinnards .= "<dt>$cat:</dt><dd>"; 
    310334            foreach ( $codes[$cat] as $code => $description ) { 
    311                     $ecode = esc_attr( $code ); 
     335                    $ecode = str_replace( '&', '&amp;', esc_attr( $code ) ); 
    312336                    $description = esc_attr( $description ); 
    313                     $item = "<acronym onclick=\"send_to_editor('$ecode');\" title='$ecode $description'> $code</acronym>"; 
     337                    $item = "<acronym onclick=\"send_to_editor('$ecode');\" title='$ecode $description'>$code</acronym> "; 
    314338                    if ( 'common' == $cat ) 
    315339                        $innards .= $item; 
     
    380404    public static function enqueue_admin_js() { 
    381405        wp_enqueue_script( 'jquery' ); 
    382         wp_enqueue_script( __CLASS__ . '_admin', plugins_url( 'admin.js', __FILE__ ), array( 'jquery' ), '1.0', true ); 
     406        wp_enqueue_script( __CLASS__ . '_admin', plugins_url( 'admin.js', __FILE__ ), array( 'jquery' ), self::version(), true ); 
    383407    } 
    384408 
     
    388412 
    389413endif; // end if !class_exists() 
    390  
    391 ?> 
  • html-special-characters-helper/trunk/readme.txt

    r472617 r553454  
    33Donate link: http://coffee2code.com/donate 
    44Tags: post, admin widget, html special characters, write post, dbx, entity codes, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 2.8 
    6 Tested up to: 3.3 
    7 Stable tag: 1.8 
    8 Version: 1.8 
     8Tested up to: 3.4 
     9Stable tag: 1.9 
     10Version: 1.9 
    911 
    1012Admin widget on the Write Post page for inserting HTML encodings of special characters into the post. 
     
    109111 
    110112== Changelog == 
     113 
     114= 1.9 = 
     115* Fix to show HTML entity encoding in tooltip instead of the character 
     116* Change how scripts and styles are enqueued 
     117* Add version() to return plugin version 
     118* Re-license as GPLv2 or later (from X11) 
     119* Add 'Text Domain', 'License', and 'License URI' header tags to readme.txt and plugin file 
     120* Add banner image for plugin page 
     121* Remove ending PHP close tag 
     122* Note compatibility through WP 3.4+ 
    111123 
    112124= 1.8 = 
     
    181193== Upgrade Notice == 
    182194 
     195= 1.9 = 
     196Recommended minor update: minor fix to show HTML entity encoding in tooltip instead of the special character itself; minor improvements; noted compatibility through WP 3.4+; explicitly stated license 
     197 
    183198= 1.8 = 
    184199Recommended update: added support for other post_types (via filter); enqueue JS/CSS; support localization; updated screenshots; compatibility is now WP 2.8-3.3+. 
Note: See TracChangeset for help on using the changeset viewer.