- File:
-
- 1 edited
-
trunk/wp-admin/edit-form-advanced.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r15183 r17445 109 109 add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core'); 110 110 111 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) ) 112 add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', $post_type, 'side', 'core' ); 113 111 114 // all taxonomies 112 115 foreach ( get_object_taxonomies($post_type) as $tax_name ) { … … 150 153 151 154 if ( post_type_supports($post_type, 'author') ) { 152 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 153 if ( $post->post_author && !in_array($post->post_author, $authors) ) 154 $authors[] = $post->post_author; 155 if ( ( $authors && count( $authors ) > 1 ) || is_super_admin() ) 155 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) 156 156 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core'); 157 157 } … … 167 167 do_action('do_meta_boxes', $post_type, 'side', $post); 168 168 169 add_screen_option('layout_columns', array('max' => 2) ); 170 169 171 if ( 'post' == $post_type ) { 170 172 add_contextual_help($current_screen, 171 '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes that allow you to add metadata to your post using drag and drop, and can minimize or expand them by clicking the title bar of the box. You can also hide any of the boxes by using the Screen Options tab, where you can also choose a 1- or 2-column layout for this screen.') . '</p>' .173 '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of the box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>' . 172 174 '<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '</p>' . 173 '<p>' . __('<strong>Post editor</strong> - Enter the text for your post. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The HTML mode allows you to enter raw HTML along with your post text. You can insert media files by clicking the icons above the post editor and following the directions.') . '</p>' .175 '<p>' . __('<strong>Post editor</strong> - Enter the text for your post. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The screen icon just before that allows you to expand the edit box to full screen. The HTML mode allows you to enter raw HTML along with your post text. You can insert media files by clicking the icons above the post editor and following the directions.') . '</p>' . 174 176 '<p>' . __('<strong>Publish</strong> - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '</p>' . 177 ( ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) ? '<p>' . __( '<strong>Post Format</strong> - This designates how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Please refer to the Codex for <a href="http://codex.wordpress.org/Post_Formats#Supported_Formats">descriptions of each post format</a>.' ) . '</p>' : '' ) . 175 178 '<p>' . __('<strong>Featured Image</strong> - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '</p>' . 176 179 '<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>' . … … 178 181 '<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' . 179 182 '<p><strong>' . __('For more information:') . '</strong></p>' . 180 '<p>' . __('<a href="http://codex.wordpress.org/ Writing_Posts" target="_blank">Documentation on Writing Posts</a>') . '</p>' .183 '<p>' . __('<a href="http://codex.wordpress.org/Posts_Add_New_SubPanel" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' . 181 184 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 182 185 ); … … 188 191 '<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>' . 189 192 '<p><strong>' . __('For more information:') . '</strong></p>' . 190 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_SubPanel" target="_blank">Page Creation Documentation</a>') . '</p>' . 193 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_SubPanel" target="_blank">Documentation on Adding New Pages</a>') . '</p>' . 194 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Pages_SubPanel#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' . 191 195 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 192 196 ); … … 207 211 <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>> 208 212 <?php wp_nonce_field($nonce_action); ?> 213 <input type="hidden" name="parent_id" value="<?php echo esc_attr( $post->post_parent ); ?>" /> 209 214 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 210 <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action) ?>" />211 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action) ?>" />215 <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" /> 216 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ) ?>" /> 212 217 <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> 213 <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type) ?>" />214 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status) ?>" />218 <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ) ?>" /> 219 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status) ?>" /> 215 220 <input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" /> 216 221 <?php … … 239 244 <div id="titlediv"> 240 245 <div id="titlewrap"> 241 <label class="hide-if-no-js" style="visibility:hidden" id="title-prompt-text" for="title"><?php _e('Enter title here')?></label>246 <label class="hide-if-no-js" style="visibility:hidden" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> 242 247 <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" /> 243 248 </div> 244 249 <div class="inside"> 245 250 <?php 246 $sample_permalink_html = get_sample_permalink_html($post->ID);251 $sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : ''; 247 252 $shortlink = wp_get_shortlink($post->ID, 'post'); 248 253 if ( !empty($shortlink) ) 249 254 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 250 255 251 if ( ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>256 if ( ! empty( $post_type_object->publicly_queryable ) && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?> 252 257 <div id="edit-slug-box"> 253 258 <?php
Note: See TracChangeset
for help on using the changeset viewer.