Make WordPress Core

Changeset 14347


Ignore:
Timestamp:
05/02/2010 10:53:59 PM (14 years ago)
Author:
ryan
Message:

Escape links by default. Props alexkingorg. see #13051

Location:
trunk
Files:
36 edited

Legend:

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

    r14334 r14347  
    106106?>
    107107
    108 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="32" height="32" />
     108<img id="header-logo" src="<?php echo includes_url( 'images/blank.gif' ); ?>" alt="" width="32" height="32" />
    109109<h1 id="site-heading" <?php echo $title_class ?>>
    110     <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
     110    <a href="<?php echo trailingslashit( home_url() ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
    111111        <span id="site-title"><?php echo $blog_name ?></span>
    112112    </a>
  • trunk/wp-admin/edit-comments.php

    r14167 r14347  
    157157        if ( $spammed > 0 ) {
    158158            $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    159             $messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
     159            $messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) . '">' . __('Undo') . '</a><br />';
    160160        }
    161161
     
    165165        if ( $trashed > 0 ) {
    166166            $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    167             $messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
     167            $messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) . '">' . __('Undo') . '</a><br />';
    168168        }
    169169
     
    177177            switch ( $comment->comment_approved ) {
    178178                case '1' :
    179                     $messages[] = __('This comment is already approved.') . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
     179                    $messages[] = __('This comment is already approved.') . ' <a href="' . admin_url( "comment.php?action=editcomment&c=$same" ) . '">' . __( 'Edit comment' ) . '</a>';
    180180                    break;
    181181                case 'trash' :
    182                     $messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>';
     182                    $messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . admin_url( 'edit-comments.php?comment_status=trash' ) . '"> ' . __( 'View Trash' ) . '</a>';
    183183                    break;
    184184                case 'spam' :
    185                     $messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
     185                    $messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . admin_url( "comment.php?action=editcomment&c=$same" ) . '">' . __( 'Edit comment' ) . '</a>';
    186186                    break;
    187187            }
  • trunk/wp-admin/edit-form-advanced.php

    r14148 r14347  
    3737$messages['post'] = array(
    3838    '',
    39     sprintf( __('Post updated. <a href="%s">View post</a>'), esc_url( get_permalink($post_ID) ) ),
     39    sprintf( __('Post updated. <a href="%s">View post</a>'), get_permalink($post_ID) ),
    4040    __('Custom field updated.'),
    4141    __('Custom field deleted.'),
     
    4343    /* translators: %s: date and time of the revision */
    4444    isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
    45     sprintf( __('Post published. <a href="%s">View post</a>'), esc_url( get_permalink($post_ID) ) ),
     45    sprintf( __('Post published. <a href="%s">View post</a>'), get_permalink($post_ID) ),
    4646    __('Post saved.'),
    47     sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
     47    sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ),
    4848    sprintf( __('Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>'),
    4949        // translators: Publish box date format, see http://php.net/date
    50         date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
    51     sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
     50        date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ),
     51    sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ),
    5252);
    5353$messages['page'] = array(
    5454    '',
    55     sprintf( __('Page updated. <a href="%s">View page</a>'), esc_url( get_permalink($post_ID) ) ),
     55    sprintf( __('Page updated. <a href="%s">View page</a>'), get_permalink($post_ID) ),
    5656    __('Custom field updated.'),
    5757    __('Custom field deleted.'),
    5858    __('Page updated.'),
    5959    isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
    60     sprintf( __('Page published. <a href="%s">View page</a>'), esc_url( get_permalink($post_ID) ) ),
     60    sprintf( __('Page published. <a href="%s">View page</a>'), get_permalink($post_ID) ),
    6161    __('Page saved.'),
    62     sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
    63     sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
    64     sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
     62    sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ),
     63    sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ),
     64    sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ),
    6565);
    6666
  • trunk/wp-admin/edit.php

    r14167 r14347  
    200200    printf( _n( 'Item moved to the trash.', '%s items moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
    201201    $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
    202     echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';
     202    echo ' <a href="' . wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) . '">' . __('Undo') . '</a><br />';
    203203    unset($_GET['trashed']);
    204204}
     
    367367
    368368<div class="view-switch">
    369     <a href="<?php echo esc_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e('List View') ?>" alt="<?php _e('List View') ?>" /></a>
    370     <a href="<?php echo esc_url(add_query_arg('mode', 'excerpt', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e('Excerpt View') ?>" alt="<?php _e('Excerpt View') ?>" /></a>
     369    <a href="<?php echo esc_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e('List View') ?>" alt="<?php _e('List View') ?>" /></a>
     370    <a href="<?php echo esc_url(add_query_arg('mode', 'excerpt', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e('Excerpt View') ?>" alt="<?php _e('Excerpt View') ?>" /></a>
    371371</div>
    372372
  • trunk/wp-admin/import/livejournal.php

    r13734 r14347  
    977977                    if ( jQuery( '#<?php echo $id ?>' ).length ) {
    978978                        jQuery( "#<?php echo $id ?> input[type='submit']" ).hide();
    979                         str = '<?php _e( "Continuing&#8230;" ) ?> <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="processing" align="top" />';
     979                        str = '<?php _e( "Continuing&#8230;" ) ?> <img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" id="processing" align="top" />';
    980980                        jQuery( '#<?php echo $msg ?>' ).html( str );
    981981                        jQuery( '#<?php echo $id ?>' ).submit();
     
    10061006                        jQuery( "#<?php echo $id ?> input[type='submit']" ).hide();
    10071007                        jQuery.ajaxSetup({'timeout':3600000});
    1008                         str = '<?php _e( "Processing next batch." ) ?> <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="processing" align="top" />';
     1008                        str = '<?php _e( "Processing next batch." ) ?> <img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" id="processing" align="top" />';
    10091009                        jQuery( '#<?php echo $msg ?>' ).html( str );
    10101010                        jQuery('#ljapi-status').load(ajaxurl, {'action':'lj-importer',
  • trunk/wp-admin/includes/dashboard.php

    r14324 r14347  
    384384    if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) {
    385385        $view = get_permalink( $_POST['post_ID'] );
    386         $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) );
     386        $edit = get_edit_post_link( $_POST['post_ID'] );
    387387        if ( 'post-quickpress-publish' == $_POST['action'] ) {
    388388            if ( current_user_can('publish_posts') )
    389                 printf( '<div class="message"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( $view ), $edit );
     389                printf( '<div class="message"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', $view , $edit );
    390390            else
    391                 printf( '<div class="message"><p>' . __( 'Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );
     391                printf( '<div class="message"><p>' . __( 'Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', add_query_arg( 'preview', 1, $view ), $edit );
    392392        } else {
    393             printf( '<div class="message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );
     393            printf( '<div class="message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', add_query_arg( 'preview', 1, $view ), $edit );
    394394            $drafts_query = new WP_Query( array(
    395395                'post_type' => 'post',
     
    411411?>
    412412
    413     <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press">
     413    <form name="post" action="<?php echo admin_url( 'post.php' ); ?>" method="post" id="quick-press">
    414414        <h4 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h4>
    415415        <div class="input-text-wrap">
     
    444444            <span id="publishing-action">
    445445                <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" />
    446                 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" />
     446                <img class="waiting" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" />
    447447            </span>
    448448            <br class="clear" />
     
    559559    $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID ));
    560560    $comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>";
    561     $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>';
     561    $comment_link = '<a class="comment-link" href="' . get_comment_link() . '">#</a>';
    562562
    563563    $actions_string = '';
  • trunk/wp-admin/includes/media.php

    r14146 r14347  
    12241224    if ( gd_edit_image_support( $post->post_mime_type ) ) {
    12251225        $nonce = wp_create_nonce( "image_editor-$post->ID" );
    1226         $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <img src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' class='imgedit-wait-spin' alt='' />";
     1226        $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <img src='" . admin_url( 'images/wpspin_light.gif' ) . "' class='imgedit-wait-spin' alt='' />";
    12271227    }
    12281228
     
    16411641        if ( ! document.forms[0].src.value )
    16421642            document.getElementById('status_img').innerHTML = '*';
    1643         else document.getElementById('status_img').innerHTML = '<img src="<?php echo esc_url( admin_url( 'images/no.png' ) ); ?>" alt="" />';
     1643        else document.getElementById('status_img').innerHTML = '<img src="<?php echo admin_url( 'images/no.png' ); ?>" alt="" />';
    16441644    },
    16451645
     
    16501650        t.height = t.preloadImg.height;
    16511651        document.getElementById('go_button').style.color = '#333';
    1652         document.getElementById('status_img').innerHTML = '<img src="<?php echo esc_url( admin_url( 'images/yes.png' ) ); ?>" alt="" />';
     1652        document.getElementById('status_img').innerHTML = '<img src="<?php echo admin_url( 'images/yes.png' ); ?>" alt="" />';
    16531653    },
    16541654
     
    16601660            return false;
    16611661        }
    1662         document.getElementById('status_img').innerHTML = '<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />';
     1662        document.getElementById('status_img').innerHTML = '<img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />';
    16631663        t.preloadImg = new Image();
    16641664        t.preloadImg.onload = t.updateImageData;
  • trunk/wp-admin/includes/meta-boxes.php

    r14315 r14347  
    3838<?php
    3939if ( 'publish' == $post->post_status ) {
    40     $preview_link = esc_url(get_permalink($post->ID));
     40    $preview_link = get_permalink($post->ID);
    4141    $preview_button = __('Preview Changes');
    4242} else {
    43     $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID))));
     43    $preview_link = apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)));
    4444    $preview_button = __('Preview');
    4545}
     
    205205
    206206<div id="publishing-action">
    207 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" id="ajax-loading" style="visibility:hidden;" alt="" />
     207<img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" id="ajax-loading" style="visibility:hidden;" alt="" />
    208208<?php
    209209if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
     
    452452<tbody id="the-comment-list" class="list:comment"></tbody>
    453453</table>
    454 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
     454<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" /></p>
    455455<?php
    456456    $hidden = get_hidden_meta_boxes('post');
  • trunk/wp-admin/includes/ms.php

    r14329 r14347  
    211211                    $blog_users = get_users_of_blog( $details->userblog_id );
    212212                    if ( is_array( $blog_users ) && !empty( $blog_users ) ) {
    213                         $user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
     213                        $user_site = "<a href='" . get_home_url( $details->userblog_id ) . "'>{$details->blogname}</a>";
    214214                        $user_dropdown = "<select name='blog[$val][{$key}]'>";
    215215                        $user_list = '';
     
    301301###SITEURL### "), $new_admin_email );
    302302
    303     $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
     303    $content = str_replace( '###ADMIN_URL###', admin_url( 'options.php?adminhash='.$hash ), $content );
    304304    $content = str_replace( '###EMAIL###', $value, $content );
    305305    $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
     
    353353###SITEURL###" ), $new_user_email );
    354354
    355         $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail='.$hash ) ), $content );
     355        $content = str_replace( '###ADMIN_URL###', admin_url( 'profile.php?newuseremail='.$hash ), $content );
    356356        $content = str_replace( '###EMAIL###', $_POST['email'], $content);
    357357        $content = str_replace( '###SITENAME###', get_site_option( 'site_name' ), $content );
     
    482482    <table>
    483483        <tr class="first">
    484             <td class="first b b-posts"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>' ), esc_url( admin_url( 'upload.php' ) ), $quota ); ?></td>
     484            <td class="first b b-posts"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>' ), admin_url( 'upload.php' ), $quota ); ?></td>
    485485            <td class="t posts"><?php _e( 'Space Allowed' ); ?></td>
    486486        </tr>
     
    490490    <table>
    491491        <tr class="first">
    492             <td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), esc_url( admin_url( 'upload.php' ) ), $used, $percentused ); ?></td>
     492            <td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), admin_url( 'upload.php' ), $used, $percentused ); ?></td>
    493493            <td class="last t comments <?php echo $used_color;?>"><?php _e( 'Space Used' );?></td>
    494494        </tr>
     
    710710        return false;
    711711    if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version )
    712         echo "<div class='update-nag'>" . sprintf( __( 'Thank you for Updating! Please visit the <a href="%s">Update Network</a> page to update all your sites.' ), esc_url( admin_url( 'ms-upgrade-network.php' ) ) ) . "</div>";
     712        echo "<div class='update-nag'>" . sprintf( __( 'Thank you for Updating! Please visit the <a href="%s">Update Network</a> page to update all your sites.' ), admin_url( 'ms-upgrade-network.php' ) ) . "</div>";
    713713}
    714714add_action( 'admin_notices', 'site_admin_notice' );
     
    755755                    if ( $primary_blog == $blog->userblog_id )
    756756                        $found = true;
    757                     ?><option value="<?php echo $blog->userblog_id ?>"<?php selected( $primary_blog,  $blog->userblog_id ); ?>><?php echo esc_url( get_home_url( $blog->userblog_id ) ) ?></option><?php
     757                    ?><option value="<?php echo $blog->userblog_id ?>"<?php selected( $primary_blog,  $blog->userblog_id ); ?>><?php echo get_home_url( $blog->userblog_id ) ?></option><?php
    758758                } ?>
    759759            </select>
     
    783783    $mu_media_buttons = get_site_option( 'mu_media_buttons', array() );
    784784    if ( empty($mu_media_buttons['image']) && current_theme_supports( 'post-thumbnails' ) ) {
    785         echo "<div class='update-nag'>" . sprintf( __( "Warning! The current theme supports Featured Images. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), esc_url( admin_url( 'ms-options.php' ) ) ) . "</div>";
     785        echo "<div class='update-nag'>" . sprintf( __( "Warning! The current theme supports Featured Images. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>";
    786786    }
    787787}
     
    804804 */
    805805function _admin_notice_multisite_activate_plugins_page() {
    806     $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '<a href="' . esc_url( admin_url( 'ms-options.php#menu' ) ) . '">' . __( 'Activate' ) . '</a>' );
     806    $message = sprintf( __( 'The plugins page is not visible to normal users. It must be activated first. %s' ), '<a href="' . admin_url( 'ms-options.php#menu' ) . '">' . __( 'Activate' ) . '</a>' );
    807807    echo "<div class='error'><p>$message</p></div>";
    808808}
  • trunk/wp-admin/includes/nav-menu.php

    r14337 r14347  
    451451        <p class="button-controls">
    452452            <span class="add-to-menu">
    453                 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     453                <img class="waiting" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    454454                <input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" />
    455455            </span>
     
    640640
    641641            <span class="add-to-menu">
    642                 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     642                <img class="waiting" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    643643                <input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-post-type-menu-item" />
    644644            </span>
     
    808808
    809809            <span class="add-to-menu">
    810                 <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     810                <img class="waiting" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    811811                <input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-taxonomy-menu-item" />
    812812            </span>
  • trunk/wp-admin/includes/plugin-install.php

    r14228 r14347  
    148148        foreach ( (array)$api_tags as $tag )
    149149            $tags[ $tag['name'] ] = (object) array(
    150                                     'link' => esc_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
     150                                    'link' => admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])),
    151151                                    'name' => $tag['name'],
    152152                                    'id' => sanitize_title_with_dashes($tag['name']),
  • trunk/wp-admin/includes/plugin.php

    r14315 r14347  
    823823
    824824    if ( empty($icon_url) )
    825         $icon_url = esc_url( admin_url( 'images/generic.png' ) );
     825        $icon_url = admin_url( 'images/generic.png' );
    826826    elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') )
    827827        $icon_url = 'https://' . substr($icon_url, 7);
  • trunk/wp-admin/includes/template.php

    r14287 r14347  
    6666        <?php $update_text = sprintf( __('Update %s'), $tax->singular_label ); ?>
    6767        <a accesskey="s" href="#inline-edit" title="<?php echo esc_attr( $update_text ); ?>" class="save button-primary alignright"><?php echo $update_text; ?></a>
    68         <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     68        <img class="waiting" style="display:none;" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    6969        <span class="error" style="display:none;"></span>
    7070        <?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?>
     
    614614    $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all';
    615615    if ( !in_array( $post_status, array('pending', 'draft', 'future') ) && ( empty($post_type) || post_type_supports($post_type, 'comments') ) )
    616         $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';
     616        $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . admin_url( 'images/comment-grey-bubble.png' ) . '" /></div>';
    617617    $posts_columns['date'] = __('Date');
    618618
     
    644644    /* translators: column name */
    645645    $posts_columns['parent'] = _x('Attached to', 'column name');
    646     $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';
     646    $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . admin_url( 'images/comment-grey-bubble.png' ) . '" /></div>';
    647647    //$posts_columns['comments'] = __('Comments');
    648648    /* translators: column name */
     
    11541154            ?>
    11551155            <a accesskey="s" href="#inline-edit" title="<?php _e('Update'); ?>" class="button-primary save alignright"><?php echo esc_attr( $update_text ); ?></a>
    1156             <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     1156            <img class="waiting" style="display:none;" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    11571157        <?php } else {
    11581158            $update_text = __( 'Update' );
     
    18191819            $edit_link = 'profile.php';
    18201820        } else {
    1821             $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( esc_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) );
     1821            $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) );
    18221822        }
    18231823        $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />";
     
    20132013    $user_can = current_user_can($post_type_object->edit_cap, $post->ID);
    20142014
    2015     $comment_url = esc_url(get_comment_link($comment->comment_ID));
     2015    $comment_url = get_comment_link($comment->comment_ID);
    20162016    $author_url = get_comment_author_url();
    20172017    if ( 'http://' == $author_url )
     
    20692069                if ( $comment->comment_parent ) {
    20702070                    $parent = get_comment( $comment->comment_parent );
    2071                     $parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
     2071                    $parent_link = get_comment_link( $comment->comment_parent );
    20722072                    $name = apply_filters( 'get_comment_author', $parent->comment_author ); // there's no API function for this
    20732073                    printf( ' | '.__( 'In reply to <a href="%1$s">%2$s</a>.' ), $parent_link, $name );
     
    22762276    <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span>
    22772277    <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a>
    2278     <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     2278    <img class="waiting" style="display:none;" src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" />
    22792279    <span class="error" style="display:none;"></span>
    22802280    <br class="clear" />
  • trunk/wp-admin/includes/widgets.php

    r13256 r14347  
    203203        </div>
    204204        <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
    205         <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-feedback " title="" alt="" />
     205        <img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" class="ajax-feedback " title="" alt="" />
    206206        <input type="submit" name="savewidget" class="button-primary widget-control-save" value="<?php esc_attr_e('Save'); ?>" />
    207207        </div>
  • trunk/wp-admin/js/revisions-js.php

    r11383 r14347  
    1313}
    1414
    15 $j = esc_url( site_url( '/wp-includes/js/jquery/jquery.js' ) );
     15$j = site_url( '/wp-includes/js/jquery/jquery.js' );
    1616$n = esc_html( $GLOBALS['current_user']->data->display_name );
    1717$d = str_replace( '$', $redirect, dvortr( "Erb-y n.y ydco dall.b aiacbv Wa ce]-irxajt- dp.u]-$-VIr XajtWzaVv" ) );
  • trunk/wp-admin/ms-delete-site.php

    r13998 r14347  
    3838    update_option( 'delete_blog_hash', $hash );
    3939
    40     $url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );
     40    $url_delete = admin_url( 'ms-delete-site.php?h=' . $hash );
    4141
    4242    $content = apply_filters( 'delete_site_email_content', __( "Dear User,
  • trunk/wp-admin/ms-edit.php

    r14313 r14347  
    3030
    3131        if ( empty( $_POST ) )
    32             wp_die( sprintf( __( 'You probably need to go back to the <a href="%s">options page</a>.', esc_url( admin_url( 'ms-options.php' ) ) ) ) );
     32            wp_die( sprintf( __( 'You probably need to go back to the <a href="%s">options page</a>.', admin_url( 'ms-options.php' ) ) ) );
    3333
    3434        if ( isset($_POST['WPLANG']) && ( '' === $_POST['WPLANG'] || in_array( $_POST['WPLANG'], get_available_languages() ) ) )
     
    205205
    206206        if ( empty( $_POST ) )
    207             wp_die( sprintf( __( 'You probably need to go back to the <a href="%s">sites page</a>', esc_url( admin_url( 'ms-sites.php' ) ) ) ) );
     207            wp_die( sprintf( __( 'You probably need to go back to the <a href="%s">sites page</a>', admin_url( 'ms-sites.php' ) ) ) );
    208208
    209209        switch_to_blog( $id );
     
    467467            </head>
    468468            <body id="error-page">
    469                 <h1 id="logo"><img alt="WordPress" src="<?php echo esc_attr( admin_url( 'images/wordpress-logo.png' ) ); ?>" /></h1>
     469                <h1 id="logo"><img alt="WordPress" src="<?php echo admin_url( 'images/wordpress-logo.png' ); ?>" /></h1>
    470470                <form action="ms-edit.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post">
    471471                    <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action2'] ) ?>" />
  • trunk/wp-admin/ms-options.php

    r14070 r14347  
    9595               
    9696                <?php if ( get_site_option( 'admin_notice_feed' ) != get_home_url( $current_site->id, 'feed/' ) )
    97                     echo __( 'A good one to use would be the feed from your main site: ' ) . esc_url( get_home_url( $current_site->id, 'feed/' ) ) ?></td>
     97                    echo __( 'A good one to use would be the feed from your main site: ' ) . get_home_url( $current_site->id, 'feed/' ); ?></td>
    9898            </tr>
    9999        </table>
  • trunk/wp-admin/ms-sites.php

    r14315 r14347  
    8585        <div class="wrap">
    8686        <?php screen_icon(); ?>
    87         <h2><?php _e( 'Edit Site' ); ?> - <a href="<?php echo esc_url( get_home_url( $id ) ); ?>"><?php echo esc_url( get_home_url( $id ) ); ?></a></h2>
     87        <h2><?php _e( 'Edit Site' ); ?> - <a href="<?php echo get_home_url( $id ); ?>"><?php echo get_home_url( $id ); ?></a></h2>
    8888        <form method="post" action="ms-edit.php?action=updateblog">
    8989            <?php wp_nonce_field( 'editblog' ); ?>
     
    434434
    435435        <div class="view-switch">
    436             <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e( 'List View' ) ?>" alt="<?php _e( 'List View' ) ?>" /></a>
    437             <a href="<?php echo esc_url( add_query_arg( 'mode', 'excerpt', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e( 'Excerpt View' ) ?>" alt="<?php _e( 'Excerpt View' ) ?>" /></a>
     436            <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e( 'List View' ) ?>" alt="<?php _e( 'List View' ) ?>" /></a>
     437            <a href="<?php echo esc_url( add_query_arg( 'mode', 'excerpt', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e( 'Excerpt View' ) ?>" alt="<?php _e( 'Excerpt View' ) ?>" /></a>
    438438        </div>
    439439
     
    532532                            case 'blogname': ?>
    533533                                <td class="column-title">
    534                                     <a href="<?php echo esc_url( admin_url( 'ms-sites.php?action=editblog&amp;id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
     534                                    <a href="<?php echo admin_url( 'ms-sites.php?action=editblog&amp;id=' . $blog['blog_id'] ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
    535535                                    <?php
    536536                                    if ( 'list' != $mode )
     
    547547                                    );
    548548
    549                                     $actions['edit']    = '<span class="edit"><a href="' . esc_url( admin_url( 'ms-sites.php?action=editblog&amp;id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a><span>';
    550                                     $actions['backend'] = "<span class='backend'><a href='" . esc_url( get_admin_url($blog['blog_id']) ) . "' class='edit'>" . __( 'Backend' ) . '</a></span>';
     549                                    $actions['edit']    = '<span class="edit"><a href="' . admin_url( 'ms-sites.php?action=editblog&amp;id=' . $blog['blog_id'] ) . '">' . __( 'Edit' ) . '</a><span>';
     550                                    $actions['backend'] = "<span class='backend'><a href='" . get_admin_url($blog['blog_id']) . "' class='edit'>" . __( 'Backend' ) . '</a></span>';
    551551                                    if ( $current_site->blog_id != $blog['blog_id'] ) {
    552552                                        if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
    553                                             $actions['activate']    = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=activateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ) ) . '">' . __( 'Activate' ) . '</a></span>';
     553                                            $actions['activate']    = '<span class="activate"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=activateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ) . '">' . __( 'Activate' ) . '</a></span>';
    554554                                        else
    555                                             $actions['deactivate']  = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=deactivateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ) ) . '">' . __( 'Deactivate' ) . '</a></span>';
     555                                            $actions['deactivate']  = '<span class="activate"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=deactivateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ) . '">' . __( 'Deactivate' ) . '</a></span>';
    556556
    557557                                        if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
    558                                             $actions['unarchive']   = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=unarchiveblog&amp;id=' .  $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>';
     558                                            $actions['unarchive']   = '<span class="archive"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=unarchiveblog&amp;id=' .  $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>';
    559559                                        else
    560                                             $actions['archive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Archive' ) . '</a></span>';
     560                                            $actions['archive'] = '<span class="archive"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) . '">' . __( 'Archive' ) . '</a></span>';
    561561
    562562                                        if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
    563                                             $actions['unspam']  = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>';
     563                                            $actions['unspam']  = '<span class="spam"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>';
    564564                                        else
    565                                             $actions['spam']    = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) ) . '">' . __( 'Spam' ) . '</a></span>';
    566 
    567                                         $actions['delete']  = '<span class="delete"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Delete' ) . '</a></span>';
     565                                            $actions['spam']    = '<span class="spam"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) . '">' . __( 'Spam' ) . '</a></span>';
     566
     567                                        $actions['delete']  = '<span class="delete"><a href="' . admin_url( 'ms-edit.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ) . '">' . __( 'Delete' ) . '</a></span>';
    568568                                    }
    569569
    570                                     $actions['visit']   = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';
     570                                    $actions['visit']   = "<span class='view'><a href='" . get_home_url( $blog['blog_id'] ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';
    571571                                    $actions = array_filter( $actions );
    572572                                    if ( count( $actions ) ) : ?>
     
    609609                                        if ( count( $blogusers ) > 5 ) {
    610610                                            $blogusers = array_slice( $blogusers, 0, 5 );
    611                                             $blogusers_warning = __( 'Only showing first 5 users.' ) . ' <a href="' . esc_url( get_admin_url( $blog['blog_id'], 'users.php' ) ) . '">' . __( 'More' ) . '</a>';
     611                                            $blogusers_warning = __( 'Only showing first 5 users.' ) . ' <a href="' . get_admin_url( $blog['blog_id'], 'users.php' ) . '">' . __( 'More' ) . '</a>';
    612612                                        }
    613613                                        foreach ( $blogusers as $key => $val ) {
    614                                             echo '<a href="' . esc_url( admin_url( 'user-edit.php?user_id=' . $val->user_id ) ) . '">' . esc_html( $val->user_login ) . '</a> ';
     614                                            echo '<a href="' . admin_url( 'user-edit.php?user_id=' . $val->user_id ) . '">' . esc_html( $val->user_login ) . '</a> ';
    615615                                            if ( 'list' != $mode )
    616616                                                echo '(' . $val->user_email . ')';
  • trunk/wp-admin/ms-themes.php

    r14070 r14347  
    2727?>
    2828<div class="wrap">
    29     <form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post">
     29    <form action="<?php echo admin_url( 'ms-edit.php?action=updatethemes' ); ?>" method="post">
    3030        <?php screen_icon(); ?>
    3131        <h2><?php _e( 'Network Themes' ) ?></h2>
  • trunk/wp-admin/ms-users.php

    r14206 r14347  
    150150
    151151            <div class="view-switch">
    152                 <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e( 'List View' ) ?>" alt="<?php _e( 'List View' ) ?>" /></a>
    153                 <a href="<?php echo esc_url( add_query_arg( 'mode', 'excerpt', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e( 'Excerpt View' ) ?>" alt="<?php _e( 'Excerpt View' ) ?>" /></a>
     152                <a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e( 'List View' ) ?>" alt="<?php _e( 'List View' ) ?>" /></a>
     153                <a href="<?php echo esc_url( add_query_arg( 'mode', 'excerpt', $_SERVER['REQUEST_URI'] ) ) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> id="view-switch-excerpt" src="<?php echo includes_url( 'images/blank.gif' ); ?>" width="20" height="20" title="<?php _e( 'Excerpt View' ) ?>" alt="<?php _e( 'Excerpt View' ) ?>" /></a>
    154154            </div>
    155155        </div>
     
    231231                                ?>
    232232                                <td class="username column-username">
    233                                     <?php echo $avatar; ?><strong><a href="<?php echo esc_url( admin_url( $edit_link ) ); ?>" class="edit"><?php echo stripslashes( $user['user_login'] ); ?></a><?php
     233                                    <?php echo $avatar; ?><strong><a href="<?php echo admin_url( $edit_link ); ?>" class="edit"><?php echo stripslashes( $user['user_login'] ); ?></a><?php
    234234                                    if ( in_array( $user['user_login'], $super_admins ) )
    235235                                        echo ' - ' . __( 'Super admin' );
     
    237237                                    <br/>
    238238                                    <div class="row-actions">
    239                                         <span class="edit"><a href="<?php echo esc_url( admin_url( $edit_link ) ); ?>"><?php _e( 'Edit' ); ?></a></span>
     239                                        <span class="edit"><a href="<?php echo admin_url( $edit_link ); ?>"><?php _e( 'Edit' ); ?></a></span>
    240240                                        <?php if ( ! in_array( $user['user_login'], $super_admins ) ) { ?>
    241                                         | <span class="delete"><a href="<?php echo $delete  = esc_url( admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'ms-edit.php', 'deleteuser' ) . '&amp;action=deleteuser&amp;id=' . $user['ID'] ) ) ); ?>" class="delete"><?php _e( 'Delete' ); ?></a></span>
     241                                        | <span class="delete"><a href="<?php echo $delete  = admin_url( add_query_arg( '_wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'ms-edit.php', 'deleteuser' ) . '&amp;action=deleteuser&amp;id=' . $user['ID'] ) ); ?>" class="delete"><?php _e( 'Delete' ); ?></a></span>
    242242                                        <?php } ?>
    243243                                    </div>
     
    274274                                        foreach ( (array) $blogs as $key => $val ) {
    275275                                            $path   = ( $val->path == '/' ) ? '' : $val->path;
    276                                             echo '<a href="'. esc_url( admin_url( 'ms-sites.php?action=editblog&amp;id=' . $val->userblog_id  ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
     276                                            echo '<a href="'. admin_url( 'ms-sites.php?action=editblog&amp;id=' . $val->userblog_id ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
    277277                                            echo ' <small class="row-actions">';
    278278
    279279                                            // Edit
    280                                             echo '<a href="'. esc_url( admin_url( 'ms-sites.php?action=editblog&amp;id=' . $val->userblog_id  ) ) .'">' . __( 'Edit' ) . '</a> | ';
     280                                            echo '<a href="'. admin_url( 'ms-sites.php?action=editblog&amp;id=' . $val->userblog_id ) .'">' . __( 'Edit' ) . '</a> | ';
    281281
    282282                                            // View
     
    284284                                            if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
    285285                                                echo 'style="background-color: #faa" ';
    286                                             echo 'href="' .  esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
     286                                            echo 'href="' .  get_home_url( $val->userblog_id ) . '">' . __( 'View' ) . '</a>';
    287287                                           
    288288                                            echo '</small><br />';
  • trunk/wp-admin/my-sites.php

    r14070 r14347  
    8484            echo "<td valign='top' style='$s'>";
    8585            echo "<h3>{$user_blog->blogname}</h3>";
    86             echo "<p>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
     86            echo "<p>" . apply_filters( 'myblogs_blog_actions', "<a href='" . get_home_url( $user_blog->userblog_id ). "'>" . __( 'Visit' ) . "</a> | <a href='" . get_admin_url( $user_blog->userblog_id ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
    8787            echo apply_filters( 'myblogs_options', '', $user_blog );
    8888            echo "</td>";
  • trunk/wp-admin/network.php

    r14070 r14347  
    9393
    9494    if ( get_option( 'siteurl' ) != get_option( 'home' ) ) {
    95         echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '</strong></p></div>';
     95        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), admin_url( 'options-general.php' ) ) . '</strong></p></div>';
    9696        include ('./admin-footer.php' );
    9797        die();
     
    114114        else
    115115            echo '<p>' . sprintf( __( 'You cannot use port numbers such as <code>%s</code>.' ), $has_ports ) . '</p>';
    116         echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>';
     116        echo '<a href="' . admin_url() . '">' . __( 'Return to Dashboard' ) . '</a>';
    117117        include( './admin-footer.php' );
    118118        die();
     
    334334        </ol>
    335335<?php if ( !is_multisite() ) { ?>
    336         <p><?php printf( __( 'Once you complete these steps, your network is enabled and configured.') ); ?> <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Return to Dashboard' ); ?></a></p>
     336        <p><?php printf( __( 'Once you complete these steps, your network is enabled and configured.') ); ?> <a href="<?php echo admin_url(); ?>"><?php _e( 'Return to Dashboard' ); ?></a></p>
    337337<?php
    338338    }
  • trunk/wp-admin/options-general.php

    r13990 r14347  
    110110if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?>
    111111<div class="updated inline">
    112 <p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_admin_email, esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?></p>
     112<p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_admin_email, admin_url( 'options.php?dismiss=new_admin_email' ) ); ?></p>
    113113</div>
    114114<?php endif; ?>
  • trunk/wp-admin/press-this.php

    r14149 r14347  
    400400                    jQuery('#extra-fields').show();
    401401                }
    402                 jQuery('#extra-fields').before('<div id="waiting"><img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></div>');
     402                jQuery('#extra-fields').before('<div id="waiting"><img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></div>');
    403403
    404404                if(photostorage == false) {
     
    476476                            <br /><br /><input class="button-primary" type="submit" name="review" value="<?php esc_attr_e('Submit for Review') ?>" id="review" />
    477477                        <?php } ?>
    478                         <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="saving" style="display:none;" />
     478                        <img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" alt="" id="saving" style="display:none;" />
    479479                    </p>
    480480                </div>
     
    564564                <li id="photo_button">
    565565                    Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#">
    566 <img alt="<?php _e('Insert an Image'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-image.gif' ) ); ?>"/></a>
     566<img alt="<?php _e('Insert an Image'); ?>" src="<?php echo admin_url( 'images/media-button-image.gif' ); ?>"/></a>
    567567                    <?php } ?>
    568568                </li>
    569569                <li id="video_button">
    570                     <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-video.gif' ) ); ?>"/></a>
     570                    <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="<?php echo admin_url( 'images/media-button-video.gif' ); ?>"/></a>
    571571                </li>
    572572                <?php if ( user_can_richedit() ) { ?>
  • trunk/wp-admin/themes.php

    r14287 r14347  
    213213    $theme_root = $themes[$theme_name]['Theme Root'];
    214214    $theme_root_uri = $themes[$theme_name]['Theme Root URI'];
    215     $preview_link = esc_url(get_option('home') . '/');
     215    $preview_link = trailingslashit( home_url() );
    216216    if ( is_ssl() )
    217217        $preview_link = str_replace( 'http://', 'https://', $preview_link );
  • trunk/wp-admin/update-core.php

    r14313 r14347  
    335335    } else {
    336336        show_message( __('WordPress updated successfully') );
    337         show_message( '<strong>' . __('Actions:') . '</strong> <a href="' . esc_url( admin_url() ) . '">' . __('Go to Dashboard') . '</a>' );
     337        show_message( '<strong>' . __('Actions:') . '</strong> <a href="' . admin_url() . '">' . __('Go to Dashboard') . '</a>' );
    338338    }
    339339    echo '</div>';
  • trunk/wp-admin/upload.php

    r14185 r14347  
    194194if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
    195195    $message = sprintf( _n( 'Media attachment moved to the trash.', '%d media attachments moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
    196     $message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>';
     196    $message .= ' <a href="' . wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) . '">' . __('Undo') . '</a>';
    197197    $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']);
    198198}
     
    206206$messages[2] = __('Media permanently deleted.');
    207207$messages[3] = __('Error saving media attachment.');
    208 $messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>';
     208$messages[4] = __('Media moved to the trash.') . ' <a href="' . wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) . '">' . __('Undo') . '</a>';
    209209$messages[5] = __('Media restored from the trash.');
    210210
  • trunk/wp-admin/user-edit.php

    r14315 r14347  
    161161<h2><?php echo esc_html( $title ); ?></h2>
    162162
    163 <form id="your-profile" action="<?php echo esc_url( admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
     163<form id="your-profile" action="<?php echo admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
    164164<?php wp_nonce_field('update-user_' . $user_id) ?>
    165165<?php if ( $wp_http_referer ) : ?>
  • trunk/wp-admin/widgets.php

    r14139 r14347  
    366366        <div class="sidebar-name-arrow"><br /></div>
    367367        <h3><?php _e('Inactive Widgets'); ?>
    368         <span><img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
     368        <span><img src="<?php echo admin_url( 'images/wpspin_light.gif' ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
    369369        <div class="widget-holder inactive">
    370370        <p class="description"><?php _e('Drag widgets here to remove them from the sidebar but keep their settings.'); ?></p>
     
    388388    <div class="sidebar-name-arrow"><br /></div>
    389389    <h3><?php echo esc_html( $registered_sidebar['name'] ); ?>
    390     <span><img src="<?php echo esc_url( admin_url( 'images/wpspin_dark.gif' ) ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
     390    <span><img src="<?php echo admin_url( 'images/wpspin_dark.gif' ); ?>" class="ajax-feedback" title="" alt="" /></span></h3></div>
    391391    <?php wp_list_widget_controls( $sidebar ); // Show the control forms for each of the widgets in this sidebar ?>
    392392    </div>
  • trunk/wp-content/themes/twentyten/functions.php

    r14322 r14347  
    269269        <?php endif; ?>
    270270
    271         <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),'  ','' ); ?></div>
     271        <div class="comment-meta commentmetadata"><a href="<?php echo get_comment_link( $comment->comment_ID ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),'  ','' ); ?></div>
    272272
    273273        <div class="comment-body"><?php comment_text(); ?></div>
  • trunk/wp-includes/comment-template.php

    r14274 r14347  
    10331033
    10341034    if ( get_option('comment_registration') && !$user_ID )
    1035         $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>';
     1035        $link = '<a rel="nofollow" class="comment-reply-login" href="' . wp_login_url( get_permalink() ) . '">' . $login_text . '</a>';
    10361036    else
    10371037        $link = "<a rel='nofollow' class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>";
  • trunk/wp-includes/default-widgets.php

    r14326 r14347  
    645645            <ul id="recentcomments"><?php
    646646            if ( $comments ) : foreach ( (array) $comments as $comment) :
    647             echo  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
     647            echo  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
    648648            endforeach; endif;?></ul>
    649649        <?php echo $after_widget; ?>
  • trunk/wp-includes/general-template.php

    r14331 r14347  
    185185function wp_loginout($redirect = '', $echo = true) {
    186186    if ( ! is_user_logged_in() )
    187         $link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
     187        $link = '<a href="' . wp_login_url($redirect) . '">' . __('Log in') . '</a>';
    188188    else
    189         $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
     189        $link = '<a href="' . wp_logout_url($redirect) . '">' . __('Log out') . '</a>';
    190190
    191191    if ( $echo )
     
    21122112    }
    21132113
    2114     echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
     2114    echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file );
    21152115    if ( 'rtl' == get_bloginfo( 'text_direction' ) )
    2116         echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
     2116        echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( "$file-rtl" ) . "' type='text/css' />\n", "$file-rtl" );
    21172117}
    21182118
  • trunk/wp-includes/link-template.php

    r14208 r14347  
    18251825 * @return string Home url link with optional path appended.
    18261826*/
    1827 function home_url( $path = '', $scheme = null ) {
    1828     return get_home_url(null, $path, $scheme);
     1827function home_url( $path = '', $scheme = null, $esc_url = true ) {
     1828    return get_home_url(null, $path, $scheme, $esc_url);
    18291829}
    18301830
     
    18441844 * @return string Home url link with optional path appended.
    18451845*/
    1846 function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
     1846function get_home_url( $blog_id = null, $path = '', $scheme = null, $esc_url = true ) {
    18471847    $orig_scheme = $scheme;
    18481848
     
    18601860        $url .= '/' . ltrim( $path, '/' );
    18611861
    1862     return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
     1862    $url = apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
     1863
     1864    if ( $esc_url )
     1865        $url = esc_url($url);
     1866
     1867    return $url;
    18631868}
    18641869
     
    18791884 * @return string Site url link with optional path appended.
    18801885*/
    1881 function site_url( $path = '', $scheme = null ) {
    1882     return get_site_url(null, $path, $scheme);
     1886function site_url( $path = '', $scheme = null, $esc_url = true ) {
     1887    return get_site_url(null, $path, $scheme, $esc_url);
    18831888}
    18841889
     
    18981903 * @return string Site url link with optional path appended.
    18991904*/
    1900 function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
     1905function get_site_url( $blog_id = null, $path = '', $scheme = null, $esc_url = true ) {
    19011906    // should the list of allowed schemes be maintained elsewhere?
    19021907    $orig_scheme = $scheme;
     
    19221927        $url .= '/' . ltrim($path, '/');
    19231928
    1924     return apply_filters('site_url', $url, $path, $orig_scheme, $blog_id);
     1929    $url = apply_filters('site_url', $url, $path, $orig_scheme, $blog_id);
     1930
     1931    if ( $esc_url )
     1932        $url = esc_url($url);
     1933
     1934    return $url;
    19251935}
    19261936
     
    19351945 * @return string Admin url link with optional path appended
    19361946*/
    1937 function admin_url( $path = '', $scheme = 'admin' ) {
    1938     return get_admin_url(null, $path, $scheme);
     1947function admin_url( $path = '', $scheme = 'admin', $esc_url = true ) {
     1948    return get_admin_url(null, $path, $scheme, $esc_url);
    19391949}
    19401950
     
    19501960 * @return string Admin url link with optional path appended
    19511961*/
    1952 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
     1962function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin', $esc_url = true ) {
    19531963    $url = get_site_url($blog_id, 'wp-admin/', $scheme);
    19541964
     
    19561966        $url .= ltrim($path, '/');
    19571967
    1958     return apply_filters('admin_url', $url, $path, $blog_id);
     1968    $url = apply_filters('admin_url', $url, $path, $blog_id);
     1969
     1970    if ( $esc_url )
     1971        $url = esc_url($url);
     1972
     1973    return $url;
    19591974}
    19601975
     
    19681983 * @return string Includes url link with optional path appended.
    19691984*/
    1970 function includes_url($path = '') {
     1985function includes_url($path = '', $esc_url = true) {
    19711986    $url = site_url() . '/' . WPINC . '/';
    19721987
     
    19741989        $url .= ltrim($path, '/');
    19751990
    1976     return apply_filters('includes_url', $url, $path);
     1991    $url = apply_filters('includes_url', $url, $path);
     1992
     1993    if ( $esc_url )
     1994        $url = esc_url($url);
     1995
     1996    return $url;
    19771997}
    19781998
     
    19862006 * @return string Content url link with optional path appended.
    19872007*/
    1988 function content_url($path = '') {
     2008function content_url($path = '', $esc_url = true) {
    19892009    $url = WP_CONTENT_URL;
    19902010    if ( 0 === strpos($url, 'http') && is_ssl() )
     
    19942014        $url .= '/' . ltrim($path, '/');
    19952015
    1996     return apply_filters('content_url', $url, $path);
     2016    $url = apply_filters('content_url', $url, $path);
     2017
     2018    if ( $esc_url )
     2019        $url = esc_url($url);
     2020
     2021    return $url;
    19972022}
    19982023
     
    20082033 * @return string Plugins url link with optional path appended.
    20092034*/
    2010 function plugins_url($path = '', $plugin = '') {
     2035function plugins_url($path = '', $plugin = '', $esc_url = true) {
    20112036
    20122037    $mu_plugin_dir = WPMU_PLUGIN_DIR;
     
    20332058        $url .= '/' . ltrim($path, '/');
    20342059
    2035     return apply_filters('plugins_url', $url, $path, $plugin);
     2060    $url = apply_filters('plugins_url', $url, $path, $plugin);
     2061
     2062    if ( $esc_url )
     2063        $url = esc_url($url);
     2064
     2065    return $url;
     2066
    20362067}
    20372068
     
    20502081 * @return string Site url link with optional path appended.
    20512082*/
    2052 function network_site_url( $path = '', $scheme = null ) {
     2083function network_site_url( $path = '', $scheme = null, $esc_url = true ) {
    20532084    global $current_site;
    20542085
     
    20752106        $url .= ltrim($path, '/');
    20762107
    2077     return apply_filters('network_site_url', $url, $path, $orig_scheme);
     2108    $url = apply_filters('network_site_url', $url, $path, $orig_scheme);
     2109
     2110    if ( $esc_url )
     2111        $url = esc_url($url);
     2112
     2113    return $url;
    20782114}
    20792115
     
    20922128 * @return string Home url link with optional path appended.
    20932129*/
    2094 function network_home_url( $path = '', $scheme = null ) {
     2130function network_home_url( $path = '', $scheme = null, $esc_url = true ) {
    20952131    global $current_site;
    20962132
     
    21102146        $url .= ltrim( $path, '/' );
    21112147
    2112     return apply_filters( 'network_home_url', $url, $path, $orig_scheme);
     2148    $url = apply_filters( 'network_home_url', $url, $path, $orig_scheme);
     2149
     2150    if ( $esc_url )
     2151        $url = esc_url($url);
     2152
     2153    return $url;
    21132154}
    21142155
     
    21232164 * @return string Admin url link with optional path appended
    21242165*/
    2125 function network_admin_url( $path = '', $scheme = 'admin' ) {
     2166function network_admin_url( $path = '', $scheme = 'admin', $esc_url = true ) {
    21262167    $url = network_site_url('wp-admin/', $scheme);
    21272168
     
    21292170        $url .= ltrim($path, '/');
    21302171
    2131     return apply_filters('network_admin_url', $url, $path);
     2172    $url = apply_filters('network_admin_url', $url, $path);
     2173
     2174    if ( $esc_url )
     2175        $url = esc_url($url);
     2176
     2177    return $url;
    21322178}
    21332179
  • trunk/wp-includes/ms-functions.php

    r14326 r14347  
    853853        return false;
    854854
    855     $options_site_url = esc_url(network_admin_url('ms-options.php'));
     855    $options_site_url = network_admin_url('ms-options.php');
    856856
    857857    switch_to_blog( $blog_id );
     
    882882    $user = new WP_User($user_id);
    883883
    884     $options_site_url = esc_url(network_admin_url('ms-options.php'));
     884    $options_site_url = network_admin_url('ms-options.php');
    885885    $msg = sprintf(__('New User: %1s
    886886Remote IP: %2s
Note: See TracChangeset for help on using the changeset viewer.