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


PHP pb_backupbuddy::start_time方法代码示例

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


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

示例1: init

 public static function init($pluginbuddy_settings, $pluginbuddy_init = 'init.php')
 {
     self::$start_time = microtime(true);
     self::$_settings = array_merge((array) self::$_settings, (array) $pluginbuddy_settings);
     // Merge settings over framework defaults.
     if (function_exists('plugin_dir_url')) {
         // URL and path functions available (not in ImportBuddy but inside WordPress).
         self::$_plugin_path = rtrim(plugin_dir_path(dirname(__FILE__)), '/\\');
         self::$_plugin_url = rtrim(plugin_dir_url(dirname(__FILE__)), '/\\');
     } else {
         // Generate URL and paths old way (old WordPress versions or inside ImportBuddy).
         self::$_plugin_path = dirname(dirname(__FILE__));
         $relative_path = ltrim(str_replace('\\', '/', str_replace(rtrim(ABSPATH, '\\\\/'), '', self::$_plugin_path)), '\\\\/');
         if (defined('PB_STANDALONE') && PB_STANDALONE === true) {
             self::$_plugin_url = 'importbuddy';
             // Relative importbuddy path.
         } else {
             // Normal full path.
             self::$_plugin_url = site_url() . '/' . ltrim($relative_path, '/');
             if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
                 // Handle https URLs properly.
                 self::$_plugin_url = str_replace('http://', 'https://', self::$_plugin_url);
             }
         }
     }
     if (isset($_GET['page'])) {
         // If in an admin page then append page querystring.
         $arr = explode('?', $_SERVER['REQUEST_URI']);
         // avoid reference error by setting here.
         self::$_self_link = array_shift($arr) . '?page=' . htmlentities($_GET['page']);
         unset($arr);
     }
     // Set the init file.
     self::$_settings['init'] = $pluginbuddy_init;
     // filesystem class controller.
     if (isset(self::$_settings['modules']['filesystem']) && self::$_settings['modules']['filesystem'] === true) {
         self::init_class_controller('filesystem');
     }
     // format class controller.
     if (isset(self::$_settings['modules']['format']) && self::$_settings['modules']['format'] === true) {
         self::init_class_controller('format');
     }
     if (is_admin()) {
         // Load UI system.
         self::init_class_controller('ui');
         // Load activation hook if in admin and activation file exists.
         if (file_exists(self::$_plugin_path . '/controllers/activation.php')) {
             $escaped_plugin_path = preg_replace('#^\\\\\\\\#', '\\\\\\\\\\\\\\\\', self::$_plugin_path);
             // Replace a path starting with \\ to be \\\\ so that when create_function parses the backslash it will return back to \\.
             register_activation_hook(self::$_plugin_path . '/' . pb_backupbuddy::settings('init'), create_function('', "require_once('" . $escaped_plugin_path . "/controllers/activation.php');"));
             // Run some code when plugin is activated in dashboard.
         }
     } else {
         // Public side.
         // Do nothing.
     }
 }
开发者ID:bunnywong,项目名称:freshlinker,代码行数:57,代码来源:_pluginbuddy.php

示例2: init

 public static function init($pluginbuddy_settings, $pluginbuddy_init = 'init.php')
 {
     self::$start_time = microtime(true);
     self::$_settings = array_merge((array) self::$_settings, (array) $pluginbuddy_settings);
     // Merge settings over framework defaults.
     // Set up various path variables.
     self::$_plugin_path = dirname(dirname(__FILE__));
     $relative_path = ltrim(str_replace('\\', '/', str_replace(rtrim(ABSPATH, '\\\\/'), '', self::$_plugin_path)), '\\\\/');
     self::$_plugin_url = site_url() . '/' . ltrim($relative_path, '/');
     if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
         self::$_plugin_url = str_replace('http://', 'https://', self::$_plugin_url);
     }
     // Handle https URLs properly.
     if (isset($_GET['page'])) {
         // If in an admin page then append page querystring.
         self::$_self_link = array_shift(explode('?', $_SERVER['REQUEST_URI'])) . '?page=' . htmlentities($_GET['page']);
     }
     // Set the init file.
     self::$_settings['init'] = $pluginbuddy_init;
     // Removed. see add_page(). Now using create_function() to bypass need for this. self::$_callbacks = new pluginbuddy_callbacks();
     // Load thumbnail live downsizer if needed.
     if (isset(self::$_settings['modules']['downsizer']) && self::$_settings['modules']['downsizer'] === true) {
         require_once self::$_plugin_path . '/pluginbuddy/_image_downsize.php';
     }
     // filesystem class controller.
     if (isset(self::$_settings['modules']['filesystem']) && self::$_settings['modules']['filesystem'] === true) {
         self::init_class_controller('filesystem');
     }
     // format class controller.
     if (isset(self::$_settings['modules']['format']) && self::$_settings['modules']['format'] === true) {
         self::init_class_controller('format');
     }
     if (is_admin()) {
         // Load automatic upgrades system if needed.
         if (isset(self::$_settings['modules']['updater']) && self::$_settings['modules']['updater'] === true) {
             require_once self::$_plugin_path . '/pluginbuddy/lib/updater/updater.php';
             $preloader_class = 'pb_' . self::settings('slug') . '_updaterpreloader';
             $updater_preloader = new $preloader_class(self::settings('slug'));
         }
         // Load UI system.
         self::init_class_controller('ui');
         // Load media library system if needed.
         if (isset(self::$_settings['modules']['media_library']) && self::$_settings['modules']['media_library'] === true) {
             self::add_ajax('media_library');
         }
         // Add troubleshooting sending system.
         self::add_ajax('pbframework_troubleshooting');
         // Load activation hook if in admin and activation file exists.
         if (file_exists(self::$_plugin_path . '/controllers/activation.php')) {
             register_activation_hook(self::$_plugin_path . '/' . pb_backupbuddy::settings('init'), create_function('', "require_once('" . self::$_plugin_path . "/controllers/activation.php');"));
             // Run some code when plugin is activated in dashboard.
         }
     } else {
         // Public side.
         // Do nothing.
     }
 }
开发者ID:verbazend,项目名称:AWFA,代码行数:57,代码来源:_pluginbuddy.php


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