upgrade_network [ WordPress Function ]
upgrade_network ( No parameters )
| Defined at: |
|
Benzer Fonksiyonlar: populate_network, can_edit_network, wp_is_large_network, upgrade_260, upgrade_270
Execute network level changes
Source
<?php
function upgrade_network() {
global $wp_current_db_version, $wpdb;
// 2.8
if ( $wp_current_db_version < 11549 ) {
$wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' );
$active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
if ( $wpmu_sitewide_plugins ) {
if ( !$active_sitewide_plugins )
$sitewide_plugins = (array) $wpmu_sitewide_plugins;
else
$sitewide_plugins = array_merge( (array) $active_sitewide_plugins, (array) $wpmu_sitewide_plugins );
update_site_option( 'active_sitewide_plugins', $sitewide_plugins );
}
delete_site_option( 'wpmu_sitewide_plugins' );
delete_site_option( 'deactivated_sitewide_plugins' );
$start = 0;
while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) {
foreach( $rows as $row ) {
$value = $row->meta_value;
if ( !@unserialize( $value ) )
$value = stripslashes( $value );
if ( $value !== $row->meta_value ) {
update_site_option( $row->meta_key, $value );
}
}
$start += 20;
}
}
// 3.0
if ( $wp_current_db_version < 13576 )
update_site_option( 'global_terms_enabled', '1' );
// 3.3
if ( $wp_current_db_version < 19390 )
update_site_option( 'initial_db_version', $wp_current_db_version );
if ( $wp_current_db_version < 19470 ) {
if ( false === get_site_option( 'active_sitewide_plugins' ) )
update_site_option( 'active_sitewide_plugins', array() );
}
// 3.4
if ( $wp_current_db_version < 20148 ) {
// 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
$allowedthemes = get_site_option( 'allowedthemes' );
$allowed_themes = get_site_option( 'allowed_themes' );
if ( false === $allowedthemes && is_array( $allowed_themes ) && $allowed_themes ) {
$converted = array();
$themes = wp_get_themes();
foreach ( $themes as $stylesheet => $theme_data ) {
if ( isset( $allowed_themes[ $theme_data->get('Name') ] ) )
$converted[ $stylesheet ] = true;
}
update_site_option( 'allowedthemes', $converted );
delete_site_option( 'allowed_themes' );
}
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Comcast set to upgrade network in Old Saybrook - The Day
Feb 28, 2012 ... TheDay.com - Comcast set to upgrade network in Old Saybrook | Southeastern Connecticut News, Sports, Weather and Video | The Day ...
www.theday.com - Silent Risk – Why We Must Upgrade Network Software Your network ...
Silent Risk – Why We Must Upgrade Network Software ... How often one should upgrade network software varies with the network size, complexity, security ...
www.cisco.com - GeekITDown: Home Network Upgrade. Network Consultation ...
GeekITDown offers Home Network Upgrade Services which include network card upgrade, wireless networking integration, router upgrade and installation, ...
www.geekitdown.com - Rapid growth Payroll Company reallocates $380000 of technology ...
Rapid growth Payroll Company reallocates $380000 of technology budget to upgrade network. One of the nation's largest outsourced payroll services providers ...
www.methodllc.com