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


PHP WP_Upgrader::__construct方法代码示例

本文整理汇总了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();
 }
开发者ID:nikintharan,项目名称:campaign,代码行数:28,代码来源:restorer.php

示例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();
 }
开发者ID:aaronfrey,项目名称:PepperLillie-Cambridge,代码行数:38,代码来源:restorer.php

示例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);
 }
开发者ID:luxifel,项目名称:Bionerd,代码行数:11,代码来源:td-old-class-tgm-plugin-activation.php

示例4:

 function __construct($skin = null)
 {
     parent::__construct($skin);
     $this->init();
     $this->backup_strings();
 }
开发者ID:jeanpage,项目名称:ca_learn,代码行数:6,代码来源:restorer.php

示例5: WPtouchIconSetSkin

 function __construct()
 {
     $skin = new WPtouchIconSetSkin();
     parent::__construct($skin);
 }
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:5,代码来源:icon-set-installer.php

示例6: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->init();
 }
开发者ID:visitcasabacardi,项目名称:backup-nov-08-2015,代码行数:8,代码来源:Upgrader.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:Gnarwind,项目名称:BoatPunkMeetup,代码行数:4,代码来源:class-tpg-upgrader.php

示例8:

 function __construct()
 {
     parent::__construct();
     $this->init();
     $this->backup_strings();
 }
开发者ID:brandmobility,项目名称:kikbak,代码行数:6,代码来源:restorer.php


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