Make WordPress Core

Changeset 16008


Ignore:
Timestamp:
10/27/2010 10:43:43 AM (14 years ago)
Author:
dd32
Message:

Use Absolute URL's & API's in header redirects in more locations. See #14062

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r15904 r16008  
    127127            else
    128128                $query_string = 'page=' . $plugin_page;
    129             wp_redirect( 'tools.php?' . $query_string );
     129            wp_redirect( admin_url('tools.php?' . $query_string) );
    130130            exit;
    131131        }
  • trunk/wp-admin/import.php

    r15326 r16008  
    3838
    3939if ( ! empty( $_GET['invalid'] ) && !empty($popular_importers[$_GET['invalid']][3]) ) {
    40     wp_redirect("import.php?import=" . $popular_importers[$_GET['invalid']][3]);
     40    wp_redirect( admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]) );
    4141    exit;
    4242}
  • trunk/wp-admin/link.php

    r14313 r16008  
    2525    $linkcheck = $_POST['linkcheck'];
    2626
    27 $this_file = 'link-manager.php';
     27$this_file = admin_url('link-manager.php');
    2828
    2929switch ($action) {
  • trunk/wp-admin/media.php

    r15830 r16008  
    4949
    5050    if ( empty( $_GET['attachment_id'] ) ) {
    51         wp_redirect('upload.php');
     51        wp_redirect( admin_url('upload.php') );
    5252        exit();
    5353    }
     
    119119
    120120default:
    121     wp_redirect( 'upload.php' );
     121    wp_redirect( admin_url('upload.php') );
    122122    exit;
    123123
  • trunk/wp-admin/moderation.php

    r8645 r16008  
    99 */
    1010require_once('../wp-load.php');
    11 wp_redirect('edit-comments.php?comment_status=moderated');
     11wp_redirect( admin_url('edit-comments.php?comment_status=moderated') );
    1212?>
  • trunk/wp-admin/plugin-editor.php

    r15853 r16008  
    6868            exit;
    6969        }
    70         wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto");
    71     } else {
    72         wp_redirect("plugin-editor.php?file=$file&scrollto=$scrollto");
     70        wp_redirect( adin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
     71    } else {
     72        wp_redirect( admin_url("plugin-editor.php?file=$file&scrollto=$scrollto") );
    7373    }
    7474    exit;
     
    8888            activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
    8989
    90         wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto");
     90        wp_redirect( admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
    9191        exit;
    9292    }
  • trunk/wp-admin/post.php

    r15857 r16008  
    139139
    140140    if ( empty( $post_id ) ) {
    141         wp_redirect("post.php");
     141        wp_redirect( admin_url('post.php') );
    142142        exit();
    143143    }
     
    266266
    267267default:
    268         wp_redirect('edit.php');
     268        wp_redirect( admin_url('edit.php') );
    269269    exit();
    270270    break;
  • trunk/wp-admin/themes.php

    r15962 r16008  
    1717        check_admin_referer('switch-theme_' . $_GET['template']);
    1818        switch_theme($_GET['template'], $_GET['stylesheet']);
    19         wp_redirect('themes.php?activated=true');
     19        wp_redirect( admin_url('themes.php?activated=true') );
    2020        exit;
    2121    } else if ( 'delete' == $_GET['action'] ) {
     
    2424            wp_die( __( 'Cheatin’ uh?' ) );
    2525        delete_theme($_GET['template']);
    26         wp_redirect('themes.php?deleted=true');
     26        wp_redirect( admin_url('themes.php?deleted=true') );
    2727        exit;
    2828    }
  • trunk/wp-admin/update-core.php

    r16002 r16008  
    432432        $plugins = (array) $_POST['checked'];
    433433    } else {
    434         wp_redirect('update-core.php');
     434        wp_redirect( admin_url('update-core.php') );
    435435        exit;
    436436    }
     
    455455        $themes = (array) $_POST['checked'];
    456456    } else {
    457         wp_redirect('update-core.php');
     457        wp_redirect( admin_url('update-core.php') );
    458458        exit;
    459459    }
  • trunk/wp-admin/update.php

    r15867 r16008  
    7171        check_admin_referer('activate-plugin_' . $plugin);
    7272        if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
    73             wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
     73            wp_redirect( admin_url('update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) );
    7474            activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ) );
    75             wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
     75            wp_redirect( admin_url('update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) );
    7676            die();
    7777        }
  • trunk/wp-admin/widgets.php

    r15132 r16008  
    176176
    177177        if ( !in_array($widget_id, $sidebar, true) ) {
    178             wp_redirect('widgets.php?error=0');
     178            wp_redirect( admin_url('widgets.php?error=0') );
    179179            exit;
    180180        }
     
    209209
    210210    wp_set_sidebars_widgets($sidebars_widgets);
    211     wp_redirect('widgets.php?message=0');
     211    wp_redirect( admin_url('widgets.php?message=0') );
    212212    exit;
    213213}
  • trunk/wp-login.php

    r16000 r16008  
    431431
    432432    if ( is_wp_error($user) ) {
    433         wp_redirect('wp-login.php?action=lostpassword&error=invalidkey');
     433        wp_redirect( site_url('wp-login.php?action=lostpassword&error=invalidkey') );
    434434        exit;
    435435    }
     
    485485    if ( is_multisite() ) {
    486486        // Multisite uses wp-signup.php
    487         wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) );
     487        wp_redirect( apply_filters( 'wp_signup_location', site_url('wp-signup.php') ) );
    488488        exit;
    489489    }
    490490
    491491    if ( !get_option('users_can_register') ) {
    492         wp_redirect('wp-login.php?registration=disabled');
     492        wp_redirect( site_url('wp-login.php?registration=disabled') );
    493493        exit();
    494494    }
  • trunk/wp-register.php

    r7991 r16008  
    1111
    1212require('./wp-load.php');
    13 wp_redirect('wp-login.php?action=register');
     13wp_redirect( site_url('wp-login.php?action=register') );
    1414
    1515?>
  • trunk/wp-signup.php

    r15315 r16008  
    2424
    2525if ( !is_multisite() ) {
    26     wp_redirect( get_option( 'siteurl' ) . "/wp-login.php?action=register" );
     26    wp_redirect( site_url('wp-login.php?action=register') );
    2727    die();
    2828}
Note: See TracChangeset for help on using the changeset viewer.