- File:
-
- 1 edited
-
trunk/wp-admin/edit-form-advanced.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r17445 r15183 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 114 111 // all taxonomies 115 112 foreach ( get_object_taxonomies($post_type) as $tax_name ) { … … 153 150 154 151 if ( post_type_supports($post_type, 'author') ) { 155 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) 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() ) 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 171 169 if ( 'post' == $post_type ) { 172 170 add_contextual_help($current_screen, 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>' .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>' . 174 172 '<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>' . 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. TheHTML 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>' .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>' . 176 174 '<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>' : '' ) .178 175 '<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>' . 179 176 '<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>' . … … 181 178 '<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' . 182 179 '<p><strong>' . __('For more information:') . '</strong></p>' . 183 '<p>' . __('<a href="http://codex.wordpress.org/ Posts_Add_New_SubPanel" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .180 '<p>' . __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Documentation on Writing Posts</a>') . '</p>' . 184 181 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 185 182 ); … … 191 188 '<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>' . 192 189 '<p><strong>' . __('For more information:') . '</strong></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>' . 190 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_SubPanel" target="_blank">Page Creation Documentation</a>') . '</p>' . 195 191 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 196 192 ); … … 211 207 <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>> 212 208 <?php wp_nonce_field($nonce_action); ?> 213 <input type="hidden" name="parent_id" value="<?php echo esc_attr( $post->post_parent ); ?>" />214 209 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 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) ?>" />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) ?>" /> 217 212 <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> 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) ?>" />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) ?>" /> 220 215 <input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" /> 221 216 <?php … … 244 239 <div id="titlediv"> 245 240 <div id="titlewrap"> 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>241 <label class="hide-if-no-js" style="visibility:hidden" id="title-prompt-text" for="title"><?php _e('Enter title here') ?></label> 247 242 <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" /> 248 243 </div> 249 244 <div class="inside"> 250 245 <?php 251 $sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : '';246 $sample_permalink_html = get_sample_permalink_html($post->ID); 252 247 $shortlink = wp_get_shortlink($post->ID, 'post'); 253 248 if ( !empty($shortlink) ) 254 249 $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>'; 255 250 256 if ( ! empty( $post_type_object->publicly_queryable ) && !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>251 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?> 257 252 <div id="edit-slug-box"> 258 253 <?php
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)