Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_redirect_to_about_wordpress [ WordPress Function ]

_redirect_to_about_wordpress ( $new_version )
Defined at:



Redirect to the About WordPress page after a successful upgrade.

This function is only needed when the existing install is older than 3.3.0 (3.4.0 for multisite).

Source


<?php
function _redirect_to_about_wordpress$new_version ) {
    global 
$wp_version$pagenow$action;

    if ( 
is_multisite() ) {
        
// Change to self_admin_url().
        
if ( version_compare$wp_version'3.4-alpha''>=' ) )
            return;
    } elseif ( 
version_compare$wp_version'3.3''>=' ) ) {
        return;
    }

    
// Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.
    
if ( 'update-core.php' != $pagenow )
        return;

     if ( 
'do-core-upgrade' != $action && 'do-core-reinstall' != $action )
         return;

    
// Load the updated default text localization domain for new strings
    
load_default_textdomain();

    
// See do_core_upgrade()
    
show_message__('WordPress updated successfully') );
    
show_message'<span class="hide-if-no-js">' sprintf__'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_versionesc_urlself_admin_url'about.php?updated' ) ) ) . '</span>' );
    
show_message'<span class="hide-if-js">' sprintf__'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_versionesc_urlself_admin_url'about.php?updated' ) ) ) . '</span>' );
    echo 
'</div>';
    
?>
<script type="text/javascript">
window.location = '<?php echo self_admin_url'about.php?updated' ); ?>';
</script>
    <?php

    
// Include admin-footer.php and exit
    
include(ABSPATH 'wp-admin/admin-footer.php');
    exit();
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics