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


PHP pre_schema_upgrade函数代码示例

本文整理汇总了PHP中pre_schema_upgrade函数的典型用法代码示例。如果您正苦于以下问题:PHP pre_schema_upgrade函数的具体用法?PHP pre_schema_upgrade怎么用?PHP pre_schema_upgrade使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: wp_upgrade

 /**
  * Run WordPress Upgrade functions.
  *
  * {@internal Missing Long Description}}
  *
  * @since unknown
  *
  * @return null
  */
 function wp_upgrade()
 {
     global $wp_current_db_version, $wp_db_version, $wpdb;
     $wp_current_db_version = __get_option('db_version');
     // We are up-to-date.  Nothing to do.
     if ($wp_db_version == $wp_current_db_version) {
         return;
     }
     if (!is_blog_installed()) {
         return;
     }
     wp_check_mysql_version();
     wp_cache_flush();
     pre_schema_upgrade();
     make_db_current_silent();
     upgrade_all();
     if (is_multisite() && is_main_site()) {
         upgrade_network();
     }
     wp_cache_flush();
     if (is_multisite()) {
         if ($wpdb->get_row("SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'")) {
             $wpdb->query("UPDATE {$wpdb->blog_versions} SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'");
         } else {
             $wpdb->query("INSERT INTO {$wpdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());");
         }
     }
 }
开发者ID:beaucollins,项目名称:wp,代码行数:37,代码来源:upgrade.php

示例2: hq_upgrade

 /**
  * Runs HiveQueen Upgrade functions.
  *
  * Upgrades the database if needed during a site update.
  *
  * @since 0.0.1
  *
  * @global int  $hq_current_db_version
  * @global int  $hq_db_version
  * @global hqdb $hqdb
  */
 function hq_upgrade()
 {
     global $hq_current_db_version, $hq_db_version, $hqdb;
     $hq_current_db_version = __get_option('db_version');
     // We are up-to-date. Nothing to do.
     if ($hq_db_version == $hq_current_db_version) {
         return;
     }
     if (!is_blog_installed()) {
         return;
     }
     hq_check_mysql_version();
     hq_cache_flush();
     pre_schema_upgrade();
     // TODO: DEbug
     //make_db_current_silent();
     make_db_current();
     upgrade_all();
     if (is_multisite() && is_main_site()) {
         upgrade_network();
     }
     hq_cache_flush();
     if (is_multisite()) {
         if ($hqdb->get_row("SELECT blog_id FROM {$hqdb->blog_versions} WHERE blog_id = '{$hqdb->blogid}'")) {
             $hqdb->query("UPDATE {$hqdb->blog_versions} SET db_version = '{$hq_db_version}' WHERE blog_id = '{$hqdb->blogid}'");
         } else {
             $hqdb->query("INSERT INTO {$hqdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$hqdb->blogid}', '{$hq_db_version}', NOW());");
         }
     }
     /**
      * Fires after a site is fully upgraded.
      *
      * @since 0.0.1
      *
      * @param int $hq_db_version         The new $hq_db_version.
      * @param int $hq_current_db_version The old (current) $hq_db_version.
      */
     do_action('hq_upgrade', $hq_db_version, $hq_current_db_version);
 }
开发者ID:gcorral,项目名称:hivequeen,代码行数:50,代码来源:upgrade.php

示例3: wp_upgrade

 /**
  * Run WordPress Upgrade functions.
  *
  * {@internal Missing Long Description}}
  *
  * @since unknown
  *
  * @return null
  */
 function wp_upgrade()
 {
     global $wp_current_db_version, $wp_db_version;
     $wp_current_db_version = __get_option('db_version');
     // We are up-to-date.  Nothing to do.
     if ($wp_db_version == $wp_current_db_version) {
         return;
     }
     if (!is_blog_installed()) {
         return;
     }
     wp_check_mysql_version();
     wp_cache_flush();
     pre_schema_upgrade();
     make_db_current_silent();
     upgrade_all();
     wp_cache_flush();
 }
开发者ID:ericandrewlewis,项目名称:wordpress-mu,代码行数:27,代码来源:upgrade.php

示例4: wp_upgrade

 /**
  * Runs WordPress Upgrade functions.
  *
  * Upgrades the database if needed during a site update.
  *
  * @since 2.1.0
  *
  * @global int  $wp_current_db_version
  * @global int  $wp_db_version
  * @global wpdb $wpdb WordPress database abstraction object.
  */
 function wp_upgrade()
 {
     global $wp_current_db_version, $wp_db_version, $wpdb;
     $wp_current_db_version = __get_option('db_version');
     // We are up-to-date. Nothing to do.
     if ($wp_db_version == $wp_current_db_version) {
         return;
     }
     if (!is_blog_installed()) {
         return;
     }
     wp_check_mysql_version();
     wp_cache_flush();
     pre_schema_upgrade();
     make_db_current_silent();
     upgrade_all();
     wp_cache_flush();
     /**
      * Fires after a site is fully upgraded.
      *
      * @since 3.9.0
      *
      * @param int $wp_db_version         The new $wp_db_version.
      * @param int $wp_current_db_version The old (current) $wp_db_version.
      */
     do_action('wp_upgrade', $wp_db_version, $wp_current_db_version);
 }
开发者ID:7press,项目名称:7press,代码行数:38,代码来源:upgrade.php


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