当前位置: 首页>>代码示例>>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;未经允许,请勿转载。