Make WordPress Core

Changeset 31550

Timestamp:
02/26/2015 02:46:40 AM (9 years ago)
Author:
helen
Message:

Hide irrelevant UI and display a message when editing the page for posts.

Users are frequently confused as to why the content they've entered or the page template they've selected doesn't apply for this one page. Showing and saving items that don't do anything hurts trust.

Developers can elect to turn on the editor should they be using it for something. If the content isn't empty, the editor will show so that users still have access to their content.

props alexkingorg for the initial, long-suffering patch.
fixes #17470.

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

Legend:

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

    r31131 r31550  
    4545$user_ID = isset($user_ID) ? (int) $user_ID : 0;
    4646$action = isset($action) ? $action : '';
     47
     48
     49
     50
     51
    4752
    4853$thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' );
  • trunk/src/wp-admin/includes/meta-boxes.php

    r31331 r31550  
    740740        } // end empty pages check
    741741    } // end hierarchical check.
    742     if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) ) {
     742    if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) ) {
    743743        $template = !empty($post->page_template) ? $post->page_template : false;
    744744        ?>
  • trunk/src/wp-admin/includes/template.php

    r31446 r31550  
    21702170    echo '</div>';
    21712171}
     2172
     2173
     2174
     2175
     2176
     2177
     2178
     2179
     2180
Note: See TracChangeset for help on using the changeset viewer.