X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-admin/includes/misc.php diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index d8ab0fca..14f94fbe 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -196,17 +196,15 @@ function update_recently_edited( $file ) { * * @since 2.1.0 * - * @param unknown_type $old_value - * @param unknown_type $value + * @param string $old_value + * @param string $value */ function update_home_siteurl( $old_value, $value ) { - global $wp_rewrite; - if ( defined( "WP_INSTALLING" ) ) return; // If home changed, write rewrite rules to new location. - $wp_rewrite->flush_rules(); + flush_rewrite_rules(); } add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); @@ -223,10 +221,9 @@ add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); function url_shorten( $url ) { $short_url = str_replace( 'http://', '', stripslashes( $url )); $short_url = str_replace( 'www.', '', $short_url ); - if ('/' == substr( $short_url, -1 )) - $short_url = substr( $short_url, 0, -1 ); + $short_url = untrailingslashit( $short_url ); if ( strlen( $short_url ) > 35 ) - $short_url = substr( $short_url, 0, 32 ).'...'; + $short_url = substr( $short_url, 0, 32 ) . '...'; return $short_url; } @@ -341,7 +338,6 @@ function set_screen_options() { if ( in_array( $type, get_taxonomies()) ) $map_option = 'edit_tags_per_page'; - switch ( $map_option ) { case 'edit_per_page': case 'users_per_page': @@ -368,19 +364,11 @@ function set_screen_options() { } update_user_meta($user->ID, $option, $value); - wp_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) ); + wp_safe_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) ); exit; } } -function wp_menu_unfold() { - if ( isset($_GET['unfoldmenu']) ) { - delete_user_setting('mfold'); - wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes($_SERVER['REQUEST_URI']) ) ); - exit; - } -} - /** * Check if rewrite rule for WordPress already exists in the IIS 7 configuration file * @@ -593,4 +581,12 @@ foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> + +function _ipad_meta() { + if ( wp_is_mobile() ) { + ?> + +