Ticket #33625: edit_template_link_meta.diff
File edit_template_link_meta.diff, 1.1 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/meta-boxes.php
788 788 } // end hierarchical check. 789 789 if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) && get_option( 'page_for_posts' ) != $post->ID ) { 790 790 $template = !empty($post->page_template) ? $post->page_template : false; 791 792 $theme_directory = basename( get_template_directory_uri() ); 793 $template_file = basename( get_page_template() ); 794 795 $url = get_admin_url( null, 'theme-editor.php' ); 796 $url = add_query_arg( 'theme', $theme_directory, $url ); 797 $url = add_query_arg( 'file', $template_file, $url ); 798 791 799 ?> 792 <p><strong><?php _e('Template') ?></strong> </p>800 <p><strong><?php _e('Template') ?></strong> <a href="<?php echo esc_url( $url ); ?>"><?php _e( 'Edit' )?></a></p> 793 801 <label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> 794 802 <?php 795 803 /**