Make WordPress Core

Changeset 25527


Ignore:
Timestamp:
09/20/2013 08:30:13 PM (12 years ago)
Author:
helen
Message:

Allow the "Add New" URL on post edit screens to be filtered via admin_url(). props SergeyBiryukov, jeremyfelt, c3mdigital. fixes #18504.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r25461 r25527  
    316316echo esc_html( $title );
    317317if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
    318     echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
     318    echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    319319?></h2>
    320320<?php if ( $notice ) : ?>
  • trunk/src/wp-admin/edit.php

    r24593 r25527  
    232232echo esc_html( $post_type_object->labels->name );
    233233if ( current_user_can( $post_type_object->cap->create_posts ) )
    234     echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
     234    echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    235235if ( ! empty( $_REQUEST['s'] ) )
    236236    printf( ' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() );
Note: See TracChangeset for help on using the changeset viewer.