Ticket #17470: 17470.diff
File 17470.diff, 8.1 KB (added by , 13 years ago) |
---|
-
wp-admin/edit-form-advanced.php
121 121 add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name )); 122 122 } 123 123 124 124 125 if ( post_type_supports($post_type, 'page-attributes') ) 125 add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');126 add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); 126 127 127 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) ) 128 add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 128 if ( get_post_meta($post->ID, '_system_page', true) != '1' ) { 129 129 130 if ( post_type_supports($post_type, 'excerpt') )131 add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core');130 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) ) 131 add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 132 132 133 if ( post_type_supports($post_type, 'trackbacks') )134 add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core');133 if ( post_type_supports($post_type, 'excerpt') ) 134 add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core'); 135 135 136 if ( post_type_supports($post_type, 'custom-fields') )137 add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core');136 if ( post_type_supports($post_type, 'trackbacks') ) 137 add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core'); 138 138 139 do_action('dbx_post_advanced'); 140 if ( post_type_supports($post_type, 'comments') ) 141 add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); 139 if ( post_type_supports($post_type, 'custom-fields') ) 140 add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core'); 142 141 143 if ( ('publish' == $post->post_status || 'private' == $post->post_status) && post_type_supports($post_type, 'comments') ) 144 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); 142 do_action('dbx_post_advanced'); 143 if ( post_type_supports($post_type, 'comments') ) 144 add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core'); 145 145 146 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts )) )147 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core');146 if ( ('publish' == $post->post_status || 'private' == $post->post_status) && post_type_supports($post_type, 'comments') ) 147 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core'); 148 148 149 if ( post_type_supports($post_type, 'author') ) { 150 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) 151 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core'); 149 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) 150 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core'); 151 152 if ( post_type_supports($post_type, 'author') ) { 153 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) 154 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core'); 155 } 156 157 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) 158 add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); 152 159 } 153 160 154 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) )155 add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core');156 157 161 do_action('add_meta_boxes', $post_type, $post); 158 162 do_action('add_meta_boxes_' . $post_type, $post); 159 163 … … 309 313 </div> 310 314 <?php } ?> 311 315 312 <?php if ( post_type_supports($post_type, 'editor') ) { ?> 316 <?php if ( post_type_supports($post_type, 'editor') && ( get_post_meta($post->ID, '_system_page', true) != '1' ) ) { ?> 317 313 318 <div id="postdivrich" class="postarea"> 314 319 315 320 <?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?> -
wp-admin/includes/class-wp-posts-list-table.php
540 540 541 541 $actions = array(); 542 542 if ( $can_edit_post && 'trash' != $post->post_status ) { 543 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>'; 543 544 if ( get_post_meta($post->ID, '_system_page', true) != '1' ) 545 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID, true ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>'; 546 544 547 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr( __( 'Edit this item inline' ) ) . '">' . __( 'Quick Edit' ) . '</a>'; 545 548 } 546 549 if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) { -
wp-admin/includes/post.php
1247 1247 } 1248 1248 1249 1249 /** 1250 * Outputs the notice message to say that this page is used for posts and content will be ignored. 1251 * 1252 * @since 3.5 1253 * @return none 1254 */ 1255 function _admin_notice_page_for_posts() { 1256 $message = __( 'This page is used to display a list of posts; content here will not be displayed. You can change this in your <a href="%s">Reading Settings</a>.' ); 1257 echo '<div class="error"><p>' . sprintf( $message, esc_url( admin_url( 'options-reading.php' ) ) ) . '</p></div>'; 1258 } 1259 1260 1261 /** 1250 1262 * Creates autosave data for the specified post from $_POST data. 1251 1263 * 1252 1264 * @package WordPress -
wp-admin/options-reading.php
90 90 if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) 91 91 update_option( 'show_on_front', 'posts' ); 92 92 ?> 93 94 <?php 95 if ( get_option('page_for_posts') != '0' ) : 96 97 if ( get_post_meta( get_option('page_for_posts'), '_system_page' ) ) : 98 update_post_meta( get_option('page_for_posts'), '_system_page', '1'); 99 else : 100 add_post_meta( get_option('page_for_posts'), '_system_page', '1', true ); 101 endif; 102 103 if ( get_option('page_for_posts') != get_option('page_for_posts_last') ) : 104 update_post_meta( get_option('page_for_posts_last'), '_system_page', '0'); 105 endif; 106 107 update_option('page_for_posts_last', get_option('page_for_posts') ); 108 109 else: 110 111 update_post_meta( get_option('page_for_posts_last') , '_system_page', '0', '1'); 112 update_option('page_for_posts_last', '0'); 113 114 endif; 115 ?> 116 93 117 <table class="form-table"> 94 118 <tr valign="top"> 95 119 <th scope="row"><?php _e( 'Front page displays' ); ?></th> -
wp-admin/post.php
164 164 wp_enqueue_script('autosave'); 165 165 } 166 166 167 if ( $post_id == get_option( 'page_for_posts' ) ) { 168 add_action( 'admin_notices', '_admin_notice_page_for_posts' ); 169 } 170 167 171 $title = $post_type_object->labels->edit_item; 168 172 $post = get_post_to_edit($post_id); 169 173