_redirect_to_about_wordpress [ WordPress Function ]
_redirect_to_about_wordpress ( $new_version )
| Defined at: |
|
Benzer Fonksiyonlar: redirect_post, get_the_author_posts, redirect_this_site, _response_to_rss, get_the_category_rss
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_version, esc_url( self_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_version, esc_url( self_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ý
- Docs for page update-core.php
_redirect_to_about_wordpress (line 650). Redirect to the About WordPress page after a successful upgrade. This function is only needed when the existing ...
phpdoc.wordpress.org - wp-admin/includes/update-core.php source
May 10, 2012 ... 646 * 647 * @since 3.3.0 648 * 649 */ 650 function _redirect_to_about_wordpress( $new_version ) { 651 global $wp_version, $ pagenow, ...
phpxref.ftwr.co.uk - A HitchHackers guide through WordPress | the source for ...
_redirect_to_about_wordpress. December 13, 2011 by Thorsten · 0 Comments · / wp-admin/includes/update-core.php · PHPdoc. This function is only needed ...
hitchhackerguide.com - Source: /wp-admin/includes/update-core.php - PHPCrossRef
605 * 606 * @since 3.3.0 607 * 608 */ 609 function _redirect_to_about_wordpress( $new_version ) { 610 global $wp_version, $ pagenow, $action; 611 612 if ...
phpcrossref.com