WordPress.org

Plugin Directory

Changeset 871265


Ignore:
Timestamp:
03/07/14 15:16:51 (4 years ago)
Author:
iwebsolutions
Message:

Move localisation functions to admin file as there are no public facing strings.

Location:
background-update-notification-email-address/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • background-update-notification-email-address/trunk/README.txt

    r866537 r871265  
    44Requires at least: 3.7 
    55Tested up to: 3.8.1 
    6 Stable tag: 1.0.2 
     6Stable tag: 1.0.3 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    4343== Changelog == 
    4444 
     45= 1.0.3 = 
     46* Move localisation functions to admin file as there are no public facing strings. 
     47 
    4548= 1.0.2 = 
    4649* Prepare option if it does't exist. 
  • background-update-notification-email-address/trunk/admin/class-update-notification-email-address-admin.php

    r866537 r871265  
    3838 
    3939    /** 
    40      * Initialize the plugin by adding a settings page and menu. 
     40     * Initialize the plugin by setting localization, adding a settings page 
     41     * and menu. 
    4142     * 
    4243     * @since 1.0.0 
     
    5152        $this->plugin_slug = $plugin->get_plugin_slug(); 
    5253 
     54        // Load plugin text domain. 
     55        add_action( 'init', array( $this, 'load_plugin_textdomain' ) ); 
     56 
    5357        // Add the options page and menu item. 
    5458        add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) ); 
     
    8084 
    8185        return self::$instance; 
     86    } 
     87 
     88    /** 
     89     * Load the plugin text domain for translation. 
     90     * 
     91     * @since 1.0.0 
     92     */ 
     93    public function load_plugin_textdomain() { 
     94 
     95        $domain = $this->plugin_slug; 
     96        $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 
     97 
     98        load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' ); 
     99        load_plugin_textdomain( $domain, FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' ); 
     100 
    82101    } 
    83102 
  • background-update-notification-email-address/trunk/public/class-update-notification-email-address.php

    r866537 r871265  
    2626     * @var string 
    2727     */ 
    28     const VERSION = '1.0.2'; 
     28    const VERSION = '1.0.3'; 
    2929 
    3030    /** 
     
    5151 
    5252    /** 
    53      * Initialize the plugin by setting localization and loading public scripts 
    54      * and styles. 
     53     * Initialize the plugin by hooking our function to auto_core_update_email. 
    5554     * 
    5655     * @since 1.0.0 
    5756     */ 
    5857    private function __construct() { 
    59  
    60         // Load plugin text domain. 
    61         add_action( 'init', array( $this, 'load_plugin_textdomain' ) ); 
    6258 
    6359        // Filter the background update notification email. 
     
    9591 
    9692    /** 
    97      * Load the plugin text domain for translation. 
    98      * 
    99      * @since 1.0.0 
    100      */ 
    101     public function load_plugin_textdomain() { 
    102  
    103         $domain = $this->plugin_slug; 
    104         $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 
    105  
    106         load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' ); 
    107         load_plugin_textdomain( $domain, FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' ); 
    108  
    109     } 
    110  
    111     /** 
    11293     * Filter the background update notification email 
    11394     * 
  • background-update-notification-email-address/trunk/update-notification-email-address.php

    r866537 r871265  
    1616 * Plugin URI: http://wordpress.org/plugins/background-update-notification-email-address/ 
    1717 * Description: Change the email address update notifications are sent to following an automatic background update. 
    18  * Version: 1.0.2 
     18 * Version: 1.0.3 
    1919 * Author: Interactive Web Solutions Ltd 
    2020 * Author URI: http://www.iwebsolutions.co.uk/ 
Note: See TracChangeset for help on using the changeset viewer.