當前位置: 首頁>>代碼示例>>PHP>>正文


PHP load_plugin_textdomain函數代碼示例

本文整理匯總了PHP中load_plugin_textdomain函數的典型用法代碼示例。如果您正苦於以下問題:PHP load_plugin_textdomain函數的具體用法?PHP load_plugin_textdomain怎麽用?PHP load_plugin_textdomain使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了load_plugin_textdomain函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: lingotek_wordpress_importer_init

 function lingotek_wordpress_importer_init()
 {
     $class = new ReflectionClass('WP_Import');
     load_plugin_textdomain('wordpress-importer', false, basename(dirname($class->getFileName())) . '/languages');
     $GLOBALS['wp_import'] = new Lingotek_WP_Import();
     register_importer('wordpress', 'WordPress', __('Import <strong>posts, pages, comments, custom fields, categories, and tags</strong> from a WordPress export file.', 'wordpress-importer'), array($GLOBALS['wp_import'], 'dispatch'));
 }
開發者ID:Gordondalos,項目名稱:expert,代碼行數:7,代碼來源:plugins-compat.php

示例2: cherry_plugin_settings

 function cherry_plugin_settings()
 {
     global $wpdb;
     if (!function_exists('get_plugin_data')) {
         require_once ABSPATH . 'wp-admin/includes/plugin.php';
     }
     $upload_dir = wp_upload_dir();
     $plugin_data = get_plugin_data(plugin_dir_path(__FILE__) . 'cherry-plugin.php');
     //Cherry plugin constant variables
     define('CHERRY_PLUGIN_DIR', plugin_dir_path(__FILE__));
     define('CHERRY_PLUGIN_URL', plugin_dir_url(__FILE__));
     define('CHERRY_PLUGIN_DOMAIN', $plugin_data['TextDomain']);
     define('CHERRY_PLUGIN_DOMAIN_DIR', $plugin_data['DomainPath']);
     define('CHERRY_PLUGIN_VERSION', $plugin_data['Version']);
     define('CHERRY_PLUGIN_NAME', $plugin_data['Name']);
     define('CHERRY_PLUGIN_SLUG', plugin_basename(__FILE__));
     define('CHERRY_PLUGIN_DB', $wpdb->prefix . CHERRY_PLUGIN_DOMAIN);
     define('CHERRY_PLUGIN_REMOTE_SERVER', esc_url('http://tmbhtest.com/cherryframework.com/components_update/'));
     //Other constant variables
     define('CURRENT_THEME_DIR', get_stylesheet_directory());
     define('CURRENT_THEME_URI', get_stylesheet_directory_uri());
     define('UPLOAD_BASE_DIR', str_replace("\\", "/", $upload_dir['basedir']));
     define('UPLOAD_DIR', str_replace("\\", "/", $upload_dir['path'] . '/'));
     // if ( !defined('API_URL') ) {
     // 	define( 'API_URL', esc_url( 'http://updates.cherry.template-help.com/cherrymoto/v3/api/' ) );
     // }
     load_plugin_textdomain(CHERRY_PLUGIN_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/' . CHERRY_PLUGIN_DOMAIN_DIR);
     do_action('cherry_plugin_settings');
 }
開發者ID:drupalninja,項目名稱:schome_org,代碼行數:29,代碼來源:cherry-plugin.php

示例3: geodir_load_translation_geodirpayment

function geodir_load_translation_geodirpayment()
{
    $locale = apply_filters('plugin_locale', get_locale(), GEODIRPAYMENT_TEXTDOMAIN);
    load_textdomain(GEODIRPAYMENT_TEXTDOMAIN, WP_LANG_DIR . '/' . GEODIRPAYMENT_TEXTDOMAIN . '/' . GEODIRPAYMENT_TEXTDOMAIN . '-' . $locale . '.mo');
    load_plugin_textdomain(GEODIRPAYMENT_TEXTDOMAIN, false, dirname(plugin_basename(__FILE__)) . '/geodir-payment-languages');
    include_once 'language.php';
}
開發者ID:poweronio,項目名稱:mbsite,代碼行數:7,代碼來源:geodir_payment_manager.php

示例4: init

 public function init()
 {
     add_filter('jpeg_quality', $this->get_static_method('jpeg_quality'));
     add_filter('wp_editor_set_quality', $this->get_static_method('jpeg_quality'));
     add_filter('wp_generate_attachment_metadata', $this->get_method('compress_on_upload'), 10, 2);
     load_plugin_textdomain(self::NAME, false, dirname(plugin_basename(__FILE__)) . '/languages');
 }
開發者ID:mattywebb,項目名稱:cyclery-northside,代碼行數:7,代碼來源:class-tiny-plugin.php

示例5: kebo_twitter_plugin_setup

function kebo_twitter_plugin_setup()
{
    /**
     * Include Plugin Options.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/options.php';
    /**
     * Include Menu Page.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/menu.php';
    /**
     * Include Custom Widget.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/widget.php';
    /**
     * Include Request for the Twitter Feed.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/get_tweets.php';
    /**
     * Include Shortcode.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/shortcode.php';
    /**
     * Include AJAX.
     */
    require_once KEBO_TWITTER_PLUGIN_PATH . 'inc/ajax.php';
    /**
     * Load Text Domain for Translations.
     */
    load_plugin_textdomain('kebo_twitter', false, dirname(plugin_basename(__FILE__)) . '/languages');
}
開發者ID:karenwingyee,項目名稱:Superdry-blog,代碼行數:31,代碼來源:kebo-twitter-feed.php

示例6: registerLocale

 public static function registerLocale($dir)
 {
     if (!defined("DAQ_DOMAIN")) {
         define("DAQ_DOMAIN", "daq-framework-locale");
         load_plugin_textdomain(DAQ_DOMAIN, false, $dir);
     }
 }
開發者ID:robjcordes,項目名稱:nexnewwp,代碼行數:7,代碼來源:Loader.php

示例7: load_textdomain

 /**
  * Load textdomain
  */
 function load_textdomain()
 {
     $domain = 'wp_jwt_auth';
     $locale = apply_filters('plugin_locale', get_locale(), $domain);
     load_textdomain($domain, WP_LANG_DIR . '/wp-jwt-authentication/' . $domain . '-' . $locale . '.mo');
     load_plugin_textdomain($domain, FALSE, dirname(plugin_basename(__FILE__)) . '/languages/');
 }
開發者ID:YanikPei,項目名稱:wp-jwt-authentication,代碼行數:10,代碼來源:wp-authentication-kit.php

示例8: ywctm_premium_init

function ywctm_premium_init()
{
    /* Load YWCTM text domain */
    load_plugin_textdomain('ywctm', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    global $YITH_WC_Catalog_Mode;
    $YITH_WC_Catalog_Mode = new YITH_WC_Catalog_Mode_Premium();
}
開發者ID:GolgoSoft,項目名稱:KeenerWP,代碼行數:7,代碼來源:init.php

示例9: __construct

 public function __construct()
 {
     load_plugin_textdomain('mapboxadv', false, basename(dirname(__FILE__)) . '/languages');
     //widget builder
     $this->wbuilder = new Mapbox_Builder();
     parent::__construct('Mapboxadv', 'Mapbox for WP Advanced', array('description' => 'Mapbox for WP Advanced'));
 }
開發者ID:erikb85,項目名稱:mapbox-for-wp-advanced,代碼行數:7,代碼來源:mapboxwidgetadv.php

示例10: ft_op_init

function ft_op_init()
{
    if (!file_exists(get_template_directory() . '/ft-options.php')) {
        return;
    }
    //  If user can't edit theme options, exit
    if (!current_user_can('edit_theme_options')) {
        return;
    }
    // Load translation files
    load_plugin_textdomain('ft_optionsframework', false, dirname(plugin_basename(__FILE__)) . '/languages/');
    // Loads the required Options Framework classes.
    require plugin_dir_path(__FILE__) . 'includes/class-options-framework.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-framework-admin.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-interface.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-media-uploader.php';
    require plugin_dir_path(__FILE__) . 'includes/class-options-sanitization.php';
    // Instantiate the main plugin class.
    $options_framework = new FT_OP();
    $options_framework->init();
    // Instantiate the options page.
    $options_framework_admin = new FT_OP_Admin();
    $options_framework_admin->init();
    // Instantiate the media uploader class
    $options_framework_media_uploader = new FT_OP_Media_Uploader();
    $options_framework_media_uploader->init();
}
開發者ID:dev-wl,項目名稱:torani,代碼行數:27,代碼來源:options-framework.php

示例11: eshop_load_lang

 function eshop_load_lang()
 {
     $eshoplanguage = apply_filters('eshop_language_dir', dirname(plugin_basename(__FILE__)));
     load_plugin_textdomain('eshop', false, $eshoplanguage);
     //grab all options here in one go
     $eshopoptions = get_option('eshop_plugin_settings');
 }
開發者ID:BlessySoftwares,項目名稱:anvelocom,代碼行數:7,代碼來源:eshop.php

示例12: run_woorule

function run_woorule()
{
    $lang_dir = basename(dirname(__FILE__ . '/languages'));
    load_plugin_textdomain('woorule', false, $lang_dir);
    $plugin = new WooRule();
    $plugin->run();
}
開發者ID:rulecom,項目名稱:woorule,代碼行數:7,代碼來源:woorule.php

示例13: init

 /**
  * Set up our panel
  */
 public function init()
 {
     load_plugin_textdomain(self::DBS_NAME, false, dirname(plugin_basename(__FILE__)) . '/languages/');
     $this->title(__('Shortcodes', self::DBS_NAME));
     add_action('wp_enqueue_scripts', array($this, 'dbs_enqueue_scripts'));
     add_action('admin_enqueue_scripts', array($this, 'dbs_enqueue_scripts'));
 }
開發者ID:proj-2014,項目名稱:vlan247-test-wp2,代碼行數:10,代碼來源:class-debug-bar-shortcodes.php

示例14: load_translation

 public function load_translation()
 {
     $this->l = get_locale();
     if (!empty($this->l)) {
         load_plugin_textdomain('gd-bbpress-attachments', false, 'gd-bbpress-attachments/languages');
     }
 }
開發者ID:alvarpoon,項目名稱:anbig,代碼行數:7,代碼來源:class.php

示例15: limit_login_setup

function limit_login_setup()
{
    load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));
    limit_login_setup_options();
    /* Filters and actions */
    add_action('wp_login_failed', 'limit_login_failed');
    if (limit_login_option('cookies')) {
        limit_login_handle_cookies();
        add_action('auth_cookie_bad_username', 'limit_login_failed_cookie');
        global $wp_version;
        if (version_compare($wp_version, '3.0', '>=')) {
            add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie_hash');
            add_action('auth_cookie_valid', 'limit_login_valid_cookie', 10, 2);
        } else {
            add_action('auth_cookie_bad_hash', 'limit_login_failed_cookie');
        }
    }
    add_filter('wp_authenticate_user', 'limit_login_wp_authenticate_user', 99999, 2);
    add_filter('shake_error_codes', 'limit_login_failure_shake');
    add_action('login_head', 'limit_login_add_error_message');
    add_action('login_errors', 'limit_login_fixup_error_messages');
    add_action('admin_menu', 'limit_login_admin_menu');
    /*
     * This action should really be changed to the 'authenticate' filter as
     * it will probably be deprecated. That is however only available in
     * later versions of WP.
     */
    add_action('wp_authenticate', 'limit_login_track_credentials', 10, 2);
}
開發者ID:fernflores0463,項目名稱:RandolphTimesWeb,代碼行數:29,代碼來源:limit-login-attempts.php


注:本文中的load_plugin_textdomain函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。