本文整理汇总了PHP中WP_Upgrader::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_Upgrader::__construct方法的具体用法?PHP WP_Upgrader::__construct怎么用?PHP WP_Upgrader::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_Upgrader
的用法示例。
在下文中一共展示了WP_Upgrader::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($skin = null, $info = null, $shortinit = false)
{
global $wpdb;
// Line up a wpdb-like object to use
$this->use_wpdb = !function_exists('mysql_query') && !function_exists('mysqli_query') || !$wpdb->is_mysql || !$wpdb->ready ? true : false;
$this->our_siteurl = untrailingslashit(site_url());
if (false == $this->use_wpdb) {
// We have our own extension which drops lots of the overhead on the query
$wpdb_obj = new UpdraftPlus_WPDB(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
// Was that successful?
if (!$wpdb_obj->is_mysql || !$wpdb_obj->ready) {
$this->use_wpdb = true;
} else {
$this->wpdb_obj = $wpdb_obj;
$this->mysql_dbh = $wpdb_obj->updraftplus_getdbh();
$this->use_mysqli = $wpdb_obj->updraftplus_use_mysqli();
}
}
if ($shortinit) {
return;
}
$this->ud_backup_info = $info;
$this->ud_foreign = empty($info['meta_foreign']) ? false : $info['meta_foreign'];
parent::__construct($skin);
$this->init();
$this->backup_strings();
$this->is_multisite = is_multisite();
}
示例2: __construct
public function __construct($skin = null, $info = null, $shortinit = false, $restore_options = array())
{
global $wpdb;
// Line up a wpdb-like object
$this->use_wpdb = !function_exists('mysql_query') && !function_exists('mysqli_query') || !$wpdb->is_mysql || !$wpdb->ready ? true : false;
$this->our_siteurl = untrailingslashit(site_url());
if (false == $this->use_wpdb) {
// We have our own extension which drops lots of the overhead on the query
$wpdb_obj = new UpdraftPlus_WPDB(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
// Was that successful?
if (!$wpdb_obj->is_mysql || !$wpdb_obj->ready) {
$this->use_wpdb = true;
} else {
$this->wpdb_obj = $wpdb_obj;
$this->mysql_dbh = $wpdb_obj->updraftplus_getdbh();
$this->use_mysqli = $wpdb_obj->updraftplus_use_mysqli();
}
}
if ($shortinit) {
return;
}
$this->ud_backup_info = $info;
do_action('updraftplus_restorer_restore_options', $restore_options);
$this->ud_multisite_selective_restore = is_array($restore_options) && !empty($restore_options['updraft_restore_ms_whichsites']) && $restore_options['updraft_restore_ms_whichsites'] > 0 ? $restore_options['updraft_restore_ms_whichsites'] : false;
$this->ud_restore_options = $restore_options;
$this->ud_foreign = empty($info['meta_foreign']) ? false : $info['meta_foreign'];
if (isset($info['is_multisite'])) {
$this->ud_backup_is_multisite = $info['is_multisite'];
}
if (isset($info['created_by_version'])) {
$this->created_by_version = $info['created_by_version'];
}
add_filter('updraftplus_logline', array($this, 'updraftplus_logline'), 10, 5);
parent::__construct($skin);
$this->init();
$this->backup_strings();
$this->is_multisite = is_multisite();
}
示例3: __construct
/**
* References parent constructor and sets defaults for class.
*
* @since 2.2.0
*/
public function __construct($skin = null)
{
// Get TGMPA class instance
$this->tgmpa = call_user_func(array(get_class($GLOBALS['tgmpa']), 'get_instance'));
parent::__construct($skin);
}
示例4:
function __construct($skin = null)
{
parent::__construct($skin);
$this->init();
$this->backup_strings();
}
示例5: WPtouchIconSetSkin
function __construct()
{
$skin = new WPtouchIconSetSkin();
parent::__construct($skin);
}
示例6: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->init();
}
示例7: __construct
public function __construct()
{
parent::__construct();
}
示例8:
function __construct()
{
parent::__construct();
$this->init();
$this->backup_strings();
}