当前位置: 首页>>代码示例>>PHP>>正文


PHP BackWPup::load_text_domain方法代码示例

本文整理汇总了PHP中BackWPup::load_text_domain方法的典型用法代码示例。如果您正苦于以下问题:PHP BackWPup::load_text_domain方法的具体用法?PHP BackWPup::load_text_domain怎么用?PHP BackWPup::load_text_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BackWPup的用法示例。


在下文中一共展示了BackWPup::load_text_domain方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  *
  */
 private function __construct()
 {
     //Load text domain
     BackWPup::load_text_domain();
     //add admin bar. Works only in init
     add_action('admin_bar_menu', array($this, 'adminbar'), 100);
     //admin css
     add_action('wp_head', array('BackWPup_Admin', 'admin_css'));
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:12,代码来源:class-adminbar.php

示例2: __construct

 /**
  *
  * Set needed filters and actions and load all needed
  *
  * @return \BackWPup_Admin
  */
 public function __construct()
 {
     //Load text domain
     BackWPup::load_text_domain();
     //Add menu pages
     add_filter('backwpup_admin_pages', array($this, 'admin_page_jobs'), 2);
     add_filter('backwpup_admin_pages', array($this, 'admin_page_editjob'), 3);
     add_filter('backwpup_admin_pages', array($this, 'admin_page_logs'), 4);
     add_filter('backwpup_admin_pages', array($this, 'admin_page_backups'), 5);
     add_filter('backwpup_admin_pages', array($this, 'admin_page_settings'), 6);
     add_filter('backwpup_admin_pages', array($this, 'admin_page_about'), 20);
     //Add Menu
     if (is_multisite()) {
         add_action('network_admin_menu', array($this, 'admin_menu'));
     } else {
         add_action('admin_menu', array($this, 'admin_menu'));
     }
     //add Plugin links
     add_filter('plugin_row_meta', array($this, 'plugin_links'), 10, 2);
     //add more actions
     add_action('admin_init', array($this, 'admin_init'));
     add_action('admin_init', array(__CLASS__, 'admin_css'));
     //Save Form posts general
     add_action('admin_post_backwpup', array($this, 'save_post_form'));
     //Save Form posts wizard
     add_action('admin_post_backwpup_wizard', array('BackWPup_Pro_Page_Wizard', 'save_post_form'));
     //Admin Footer Text replacement
     add_filter('admin_footer_text', array($this, 'admin_footer_text'), 100);
     add_filter('update_footer', array($this, 'update_footer'), 100);
     //User Profile fields
     add_action('show_user_profile', array($this, 'user_profile_fields'));
     add_action('edit_user_profile', array($this, 'user_profile_fields'));
     add_action('profile_update', array($this, 'save_profile_update'));
     add_filter('manage_users_columns', array($this, 'manage_users_columns'));
     add_filter('manage_users_custom_column', array($this, 'manage_users_custom_column'), 10, 3);
     //Change Backup message on core updates
     add_filter('gettext', array($this, 'gettext'), 10, 3);
     new BackWPup_EasyCron();
 }
开发者ID:yszar,项目名称:linuxwp,代码行数:45,代码来源:class-admin.php

示例3: start_cli

 /**
  * @param $jobid
  */
 public static function start_cli($jobid)
 {
     if (php_sapi_name() != 'cli') {
         return;
     }
     //define DOING_CRON to prevent caching
     if (!defined('DOING_CRON')) {
         define('DOING_CRON', true);
     }
     //load text domain
     $log_level = get_site_option('backwpup_cfg_loglevel', 'normal_translated');
     if (strstr($log_level, 'translated')) {
         BackWPup::load_text_domain();
     } else {
         add_filter('override_load_textdomain', '__return_true');
         $GLOBALS['l10n'] = array();
     }
     $jobid = absint($jobid);
     //Logs Folder
     $log_folder = get_site_option('backwpup_cfg_logfolder');
     $log_folder = BackWPup_File::get_absolute_path($log_folder);
     //check job id exists
     $jobids = BackWPup_Option::get_job_ids();
     if (!in_array($jobid, $jobids, true)) {
         die(__('Wrong BackWPup JobID', 'backwpup'));
     }
     //check folders
     $log_folder_message = BackWPup_File::check_folder($log_folder);
     if (!empty($log_folder_message)) {
         die($log_folder_message);
     }
     $log_folder_message = BackWPup_File::check_folder(BackWPup::get_plugin_data('TEMP'), true);
     if (!empty($log_folder_message)) {
         die($log_folder_message);
     }
     //check running job
     if (file_exists(BackWPup::get_plugin_data('running_file'))) {
         die(__('A BackWPup job is already running', 'backwpup'));
     }
     //start class
     $backwpup_job_object = new self();
     $backwpup_job_object->create('runcli', (int) $jobid);
     $backwpup_job_object->run();
 }
开发者ID:skinnard,项目名称:FTL-2,代码行数:47,代码来源:class-job.php

示例4: start_wp_cron

 /**
  * @param int $jobid
  */
 public static function start_wp_cron($jobid = 0)
 {
     if (!defined('DOING_CRON') || !DOING_CRON) {
         return;
     }
     //load text domain
     $log_level = get_site_option('backwpup_cfg_loglevel');
     if (strstr($log_level, 'translated')) {
         BackWPup::load_text_domain();
     }
     if (!empty($jobid)) {
         //check folders
         $log_folder = get_site_option('backwpup_cfg_logfolder');
         $folder_message_log = BackWPup_File::check_folder(BackWPup_File::get_absolute_path($log_folder));
         $folder_message_temp = BackWPup_File::check_folder(BackWPup::get_plugin_data('TEMP'), TRUE);
         if (!empty($folder_message_log) || !empty($folder_message_temp)) {
             BackWPup_Admin::message($folder_message_log, TRUE);
             BackWPup_Admin::message($folder_message_temp, TRUE);
             return;
         }
     }
     // Should be preventing doubled running job's on http requests
     $random = rand(1, 9) * 100000;
     usleep($random);
     //get running job
     $backwpup_job_object = self::get_working_data();
     //start/restart class
     if (empty($backwpup_job_object) && !empty($jobid)) {
         //schedule restart event
         wp_schedule_single_event(time() + 60, 'backwpup_cron', array('id' => 'restart'));
         //start job
         $backwpup_job_object = new self();
         $backwpup_job_object->create('cronrun', (int) $jobid);
     }
     if (is_object($backwpup_job_object) && $backwpup_job_object instanceof BackWPup_Job) {
         $backwpup_job_object->run();
     }
 }
开发者ID:Giede,项目名称:backwpup,代码行数:41,代码来源:class-job.php


注:本文中的BackWPup::load_text_domain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。