Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.