Plugin Directory

Changeset 1258857


Ignore:
Timestamp:
10/03/2015 04:08:38 PM (11 years ago)
Author:
PluginCentral
Message:

Modified code to ensure that the text domain was used correctly for translations.

Location:
limit-posts/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • limit-posts/trunk/limit-posts.php

    r1231986 r1258857  
    2929
    3030//Plugin name
    31 if (!defined('CB_LIMIT_POSTS_PLUGIN_NAME'))
     31if (!defined('CB_LIMIT_POSTS_PLUGIN_NAME')) {
    3232    define('CB_LIMIT_POSTS_PLUGIN_NAME', trim(dirname(plugin_basename(__FILE__)), '/'));
     33}
    3334
    3435// Plugin url
    35 if (!defined('CB_LIMIT_POSTS_PLUGIN_URL'))
     36if (!defined('CB_LIMIT_POSTS_PLUGIN_URL')) {
    3637    define('CB_LIMIT_POSTS_PLUGIN_URL', WP_PLUGIN_URL . '/' . CB_LIMIT_POSTS_PLUGIN_NAME);
     38}
    3739
    3840class CBLimitPosts{
     
    7173    public function createSettingsMenu(){
    7274        if($this->multiSite){
    73             add_options_page(__(self::$pageTitle, self::$textDomain), __(self::$menuTitle, self::$textDomain), 'manage_network', 'limit_posts_menu', array($this, 'outputSettingsPage'));
     75            add_options_page(__(self::$pageTitle, 'limit-posts'), __(self::$menuTitle, 'limit-posts'), 'manage_network', 'limit_posts_menu', array($this, 'outputSettingsPage'));
    7476        }
    7577        else{
    76             add_options_page(__(self::$pageTitle, self::$textDomain), __(self::$menuTitle, self::$textDomain), 'manage_options', 'limit_posts_menu', array($this, 'outputSettingsPage'));
     78            add_options_page(__(self::$pageTitle, 'limit-posts'), __(self::$menuTitle, 'limit-posts'), 'manage_options', 'limit_posts_menu', array($this, 'outputSettingsPage'));
    7779        }
    7880    }
     
    8587    public function outputSettingsPage(){
    8688        if($this->multiSite && !current_user_can('manage_network')){
    87             wp_die( __('You do not have sufficient permissions to access this page.'));
     89            wp_die( __('You do not have sufficient permissions to access this page.', 'limit-posts'));
    8890        }
    8991        elseif(!current_user_can('manage_options')){
    90             wp_die( __('You do not have sufficient permissions to access this page.'));
     92            wp_die( __('You do not have sufficient permissions to access this page.', 'limit-posts'));
    9193        }
    9294           
  • limit-posts/trunk/readme.txt

    r1231986 r1258857  
    115115Bug fix - Post type not being shown correctly when editing a rule.
    116116
     117= 1.0.8 =
     118Sorted out some issues with the text domain, for translation purposes.
     119
    117120== Upgrade Notice ==
    118121
Note: See TracChangeset for help on using the changeset viewer.