26 </div> |
26 </div> |
27 |
27 |
28 <div id="minor-publishing-actions"> |
28 <div id="minor-publishing-actions"> |
29 <div id="save-action"> |
29 <div id="save-action"> |
30 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> |
30 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> |
31 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" /> |
31 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" /> |
32 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> |
32 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> |
33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" /> |
33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" class="button" /> |
34 <?php } ?> |
34 <?php } ?> |
35 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" /> |
35 <span class="spinner"></span> |
36 </div> |
36 </div> |
37 <?php if ( $post_type_object->public ) : ?> |
37 <?php if ( $post_type_object->public ) : ?> |
38 <div id="preview-action"> |
38 <div id="preview-action"> |
39 <?php |
39 <?php |
40 if ( 'publish' == $post->post_status ) { |
40 if ( 'publish' == $post->post_status ) { |
41 $preview_link = esc_url( get_permalink( $post->ID ) ); |
41 $preview_link = esc_url( get_permalink( $post->ID ) ); |
42 $preview_button = __( 'Preview Changes' ); |
42 $preview_button = __( 'Preview Changes' ); |
43 } else { |
43 } else { |
44 $preview_link = get_permalink( $post->ID ); |
44 $preview_link = set_url_scheme( get_permalink( $post->ID ) ); |
45 if ( is_ssl() ) |
|
46 $preview_link = str_replace( 'http://', 'https://', $preview_link ); |
|
47 $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); |
45 $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); |
48 $preview_button = __( 'Preview' ); |
46 $preview_button = __( 'Preview' ); |
49 } |
47 } |
50 ?> |
48 ?> |
51 <a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview" tabindex="4"><?php echo $preview_button; ?></a> |
49 <a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview"><?php echo $preview_button; ?></a> |
52 <input type="hidden" name="wp-preview" id="wp-preview" value="" /> |
50 <input type="hidden" name="wp-preview" id="wp-preview" value="" /> |
53 </div> |
51 </div> |
54 <?php endif; // public post type ?> |
52 <?php endif; // public post type ?> |
55 <div class="clear"></div> |
53 <div class="clear"></div> |
56 </div><?php // /minor-publishing-actions ?> |
54 </div><!-- #minor-publishing-actions --> |
57 |
55 |
58 <div id="misc-publishing-actions"> |
56 <div id="misc-publishing-actions"> |
59 |
57 |
60 <div class="misc-pub-section"><label for="post_status"><?php _e('Status:') ?></label> |
58 <div class="misc-pub-section"><label for="post_status"><?php _e('Status:') ?></label> |
61 <span id="post-status-display"> |
59 <span id="post-status-display"> |
79 break; |
77 break; |
80 } |
78 } |
81 ?> |
79 ?> |
82 </span> |
80 </span> |
83 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> |
81 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> |
84 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> |
82 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js"><?php _e('Edit') ?></a> |
85 |
83 |
86 <div id="post-status-select" class="hide-if-js"> |
84 <div id="post-status-select" class="hide-if-js"> |
87 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" /> |
85 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" /> |
88 <select name='post_status' id='post_status' tabindex='4'> |
86 <select name='post_status' id='post_status'> |
89 <?php if ( 'publish' == $post->post_status ) : ?> |
87 <?php if ( 'publish' == $post->post_status ) : ?> |
90 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> |
88 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option> |
91 <?php elseif ( 'private' == $post->post_status ) : ?> |
89 <?php elseif ( 'private' == $post->post_status ) : ?> |
92 <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> |
90 <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option> |
93 <?php elseif ( 'future' == $post->post_status ) : ?> |
91 <?php elseif ( 'future' == $post->post_status ) : ?> |
135 <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> /> |
133 <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> /> |
136 <?php endif; ?> |
134 <?php endif; ?> |
137 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" /> |
135 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" /> |
138 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br /> |
136 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br /> |
139 <?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?> |
137 <?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?> |
140 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> tabindex="4" /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span> |
138 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span> |
141 <?php endif; ?> |
139 <?php endif; ?> |
142 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br /> |
140 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br /> |
143 <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>" /><br /></span> |
141 <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>" /><br /></span> |
144 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> |
142 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> |
145 |
143 |
175 |
173 |
176 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> |
174 if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> |
177 <div class="misc-pub-section curtime"> |
175 <div class="misc-pub-section curtime"> |
178 <span id="timestamp"> |
176 <span id="timestamp"> |
179 <?php printf($stamp, $date); ?></span> |
177 <?php printf($stamp, $date); ?></span> |
180 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> |
178 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a> |
181 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div> |
179 <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'), 1); ?></div> |
182 </div><?php // /misc-pub-section ?> |
180 </div><?php // /misc-pub-section ?> |
183 <?php endif; ?> |
181 <?php endif; ?> |
184 |
182 |
185 <?php do_action('post_submitbox_misc_actions'); ?> |
183 <?php do_action('post_submitbox_misc_actions'); ?> |
186 </div> |
184 </div> |
200 <a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php |
198 <a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php |
201 } ?> |
199 } ?> |
202 </div> |
200 </div> |
203 |
201 |
204 <div id="publishing-action"> |
202 <div id="publishing-action"> |
205 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" /> |
203 <span class="spinner"></span> |
206 <?php |
204 <?php |
207 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { |
205 if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { |
208 if ( $can_publish ) : |
206 if ( $can_publish ) : |
209 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> |
207 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> |
210 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> |
208 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> |
211 <?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> |
209 <?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
212 <?php else : ?> |
210 <?php else : ?> |
213 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> |
211 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> |
214 <?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> |
212 <?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
215 <?php endif; |
213 <?php endif; |
216 else : ?> |
214 else : ?> |
217 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> |
215 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> |
218 <?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?> |
216 <?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false, array( 'accesskey' => 'p' ) ); ?> |
219 <?php |
217 <?php |
220 endif; |
218 endif; |
221 } else { ?> |
219 } else { ?> |
222 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> |
220 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> |
223 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Update') ?>" /> |
221 <input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e('Update') ?>" /> |
224 <?php |
222 <?php |
225 } ?> |
223 } ?> |
226 </div> |
224 </div> |
227 <div class="clear"></div> |
225 <div class="clear"></div> |
228 </div> |
226 </div> |
|
227 </div> |
|
228 |
|
229 <?php |
|
230 } |
|
231 |
|
232 /** |
|
233 * Display attachment submit form fields. |
|
234 * |
|
235 * @since 3.5.0 |
|
236 * |
|
237 * @param object $post |
|
238 */ |
|
239 function attachment_submit_meta_box( $post ) { |
|
240 global $action; |
|
241 |
|
242 $post_type = $post->post_type; |
|
243 $post_type_object = get_post_type_object($post_type); |
|
244 $can_publish = current_user_can($post_type_object->cap->publish_posts); |
|
245 ?> |
|
246 <div class="submitbox" id="submitpost"> |
|
247 |
|
248 <div id="minor-publishing"> |
|
249 |
|
250 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> |
|
251 <div style="display:none;"> |
|
252 <?php submit_button( __( 'Save' ), 'button', 'save' ); ?> |
|
253 </div> |
|
254 |
|
255 |
|
256 <div id="misc-publishing-actions"> |
|
257 <?php |
|
258 // translators: Publish box date format, see http://php.net/date |
|
259 $datef = __( 'M j, Y @ G:i' ); |
|
260 $stamp = __('Uploaded on: <b>%1$s</b>'); |
|
261 $date = date_i18n( $datef, strtotime( $post->post_date ) ); |
|
262 ?> |
|
263 <div class="misc-pub-section curtime"> |
|
264 <span id="timestamp"><?php printf($stamp, $date); ?></span> |
|
265 </div><!-- .misc-pub-section --> |
|
266 |
|
267 <?php do_action('attachment_submitbox_misc_actions'); ?> |
|
268 </div><!-- #misc-publishing-actions --> |
|
269 <div class="clear"></div> |
|
270 </div><!-- #minor-publishing --> |
|
271 |
|
272 <div id="major-publishing-actions"> |
|
273 <div id="delete-action"> |
|
274 <?php |
|
275 if ( current_user_can( 'delete_post', $post->ID ) ) |
|
276 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { |
|
277 echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; |
|
278 } else { |
|
279 $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; |
|
280 echo "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; |
|
281 } |
|
282 ?> |
|
283 </div> |
|
284 |
|
285 <div id="publishing-action"> |
|
286 <span class="spinner"></span> |
|
287 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> |
|
288 <input name="save" type="submit" class="button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e('Update') ?>" /> |
|
289 </div> |
|
290 <div class="clear"></div> |
|
291 </div><!-- #major-publishing-actions --> |
|
292 |
229 </div> |
293 </div> |
230 |
294 |
231 <?php |
295 <?php |
232 } |
296 } |
233 |
297 |
286 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> |
350 <?php if ( current_user_can($taxonomy->cap->assign_terms) ) : ?> |
287 <div class="ajaxtag hide-if-no-js"> |
351 <div class="ajaxtag hide-if-no-js"> |
288 <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> |
352 <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> |
289 <div class="taghint"><?php echo $taxonomy->labels->add_new_item; ?></div> |
353 <div class="taghint"><?php echo $taxonomy->labels->add_new_item; ?></div> |
290 <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> |
354 <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> |
291 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" /></p> |
355 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p> |
292 </div> |
356 </div> |
293 <p class="howto"><?php echo esc_attr( $taxonomy->labels->separate_items_with_commas ); ?></p> |
357 <p class="howto"><?php echo esc_attr( $taxonomy->labels->separate_items_with_commas ); ?></p> |
294 <?php endif; ?> |
358 <?php endif; ?> |
295 </div> |
359 </div> |
296 <div class="tagchecklist"></div> |
360 <div class="tagchecklist"></div> |
318 $tax = get_taxonomy($taxonomy); |
382 $tax = get_taxonomy($taxonomy); |
319 |
383 |
320 ?> |
384 ?> |
321 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv"> |
385 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv"> |
322 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs"> |
386 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs"> |
323 <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all" tabindex="3"><?php echo $tax->labels->all_items; ?></a></li> |
387 <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all"><?php echo $tax->labels->all_items; ?></a></li> |
324 <li class="hide-if-no-js"><a href="#<?php echo $taxonomy; ?>-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li> |
388 <li class="hide-if-no-js"><a href="#<?php echo $taxonomy; ?>-pop"><?php _e( 'Most Used' ); ?></a></li> |
325 </ul> |
389 </ul> |
326 |
390 |
327 <div id="<?php echo $taxonomy; ?>-pop" class="tabs-panel" style="display: none;"> |
391 <div id="<?php echo $taxonomy; ?>-pop" class="tabs-panel" style="display: none;"> |
328 <ul id="<?php echo $taxonomy; ?>checklist-pop" class="categorychecklist form-no-clear" > |
392 <ul id="<?php echo $taxonomy; ?>checklist-pop" class="categorychecklist form-no-clear" > |
329 <?php $popular_ids = wp_popular_terms_checklist($taxonomy); ?> |
393 <?php $popular_ids = wp_popular_terms_checklist($taxonomy); ?> |
333 <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel"> |
397 <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel"> |
334 <?php |
398 <?php |
335 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']'; |
399 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']'; |
336 echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. |
400 echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. |
337 ?> |
401 ?> |
338 <ul id="<?php echo $taxonomy; ?>checklist" class="list:<?php echo $taxonomy?> categorychecklist form-no-clear"> |
402 <ul id="<?php echo $taxonomy; ?>checklist" data-wp-lists="list:<?php echo $taxonomy?>" class="categorychecklist form-no-clear"> |
339 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> |
403 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> |
340 </ul> |
404 </ul> |
341 </div> |
405 </div> |
342 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?> |
406 <?php if ( current_user_can($tax->cap->edit_terms) ) : ?> |
343 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> |
407 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> |
344 <h4> |
408 <h4> |
345 <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js" tabindex="3"> |
409 <a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js"> |
346 <?php |
410 <?php |
347 /* translators: %s: add new taxonomy label */ |
411 /* translators: %s: add new taxonomy label */ |
348 printf( __( '+ %s' ), $tax->labels->add_new_item ); |
412 printf( __( '+ %s' ), $tax->labels->add_new_item ); |
349 ?> |
413 ?> |
350 </a> |
414 </a> |
351 </h4> |
415 </h4> |
352 <p id="<?php echo $taxonomy; ?>-add" class="category-add wp-hidden-child"> |
416 <p id="<?php echo $taxonomy; ?>-add" class="category-add wp-hidden-child"> |
353 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php echo $tax->labels->add_new_item; ?></label> |
417 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php echo $tax->labels->add_new_item; ?></label> |
354 <input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" tabindex="3" aria-required="true"/> |
418 <input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php echo esc_attr( $tax->labels->new_item_name ); ?>" aria-required="true"/> |
355 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent"> |
419 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent"> |
356 <?php echo $tax->labels->parent_item_colon; ?> |
420 <?php echo $tax->labels->parent_item_colon; ?> |
357 </label> |
421 </label> |
358 <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —', 'tab_index' => 3 ) ); ?> |
422 <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> |
359 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" class="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" tabindex="3" /> |
423 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> |
360 <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> |
424 <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> |
361 <span id="<?php echo $taxonomy; ?>-ajax-response"></span> |
425 <span id="<?php echo $taxonomy; ?>-ajax-response"></span> |
362 </p> |
426 </p> |
363 </div> |
427 </div> |
364 <?php endif; ?> |
428 <?php endif; ?> |
386 * @since 2.6.0 |
450 * @since 2.6.0 |
387 * |
451 * |
388 * @param object $post |
452 * @param object $post |
389 */ |
453 */ |
390 function post_trackback_meta_box($post) { |
454 function post_trackback_meta_box($post) { |
391 $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" tabindex="7" value="'. esc_attr( str_replace("\n", ' ', $post->to_ping) ) .'" />'; |
455 $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="'. esc_attr( str_replace("\n", ' ', $post->to_ping) ) .'" />'; |
392 if ('' != $post->pinged) { |
456 if ('' != $post->pinged) { |
393 $pings = '<p>'. __('Already pinged:') . '</p><ul>'; |
457 $pings = '<p>'. __('Already pinged:') . '</p><ul>'; |
394 $already_pinged = explode("\n", trim($post->pinged)); |
458 $already_pinged = explode("\n", trim($post->pinged)); |
395 foreach ($already_pinged as $pinged_url) { |
459 foreach ($already_pinged as $pinged_url) { |
396 $pings .= "\n\t<li>" . esc_html($pinged_url) . "</li>"; |
460 $pings .= "\n\t<li>" . esc_html($pinged_url) . "</li>"; |
466 * |
530 * |
467 * @since 2.8.0 |
531 * @since 2.8.0 |
468 * |
532 * |
469 * @param object $post |
533 * @param object $post |
470 */ |
534 */ |
471 function post_comment_meta_box($post) { |
535 function post_comment_meta_box( $post ) { |
472 global $wpdb, $post_ID; |
536 global $wpdb; |
473 |
537 |
474 wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); |
538 wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); |
475 ?> |
539 ?> |
476 <p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post_ID; ?>);return false;"><?php _e('Add comment'); ?></a></p> |
540 <p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e('Add comment'); ?></a></p> |
477 <?php |
541 <?php |
478 |
542 |
479 $total = $wpdb->get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); |
543 $total = get_comments( array( 'post_id' => $post->ID, 'number' => 1, 'count' => true ) ); |
480 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); |
544 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); |
481 $wp_list_table->display( true ); |
545 $wp_list_table->display( true ); |
482 |
546 |
483 if ( 1 > $total ) { |
547 if ( 1 > $total ) { |
484 echo '<p id="no-comments">' . __('No comments yet.') . '</p>'; |
548 echo '<p id="no-comments">' . __('No comments yet.') . '</p>'; |
686 <div id="category-adder" class="wp-hidden-children"> |
750 <div id="category-adder" class="wp-hidden-children"> |
687 <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> |
751 <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> |
688 <p id="link-category-add" class="wp-hidden-child"> |
752 <p id="link-category-add" class="wp-hidden-child"> |
689 <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> |
753 <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> |
690 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> |
754 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> |
691 <input type="button" id="link-category-add-submit" class="add:categorychecklist:linkcategorydiv button" value="<?php esc_attr_e( 'Add' ); ?>" /> |
755 <input type="button" id="link-category-add-submit" data-wp-lists="add:categorychecklist:link-category-add" class="button" value="<?php esc_attr_e( 'Add' ); ?>" /> |
692 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> |
756 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> |
693 <span id="category-ajax-response"></span> |
757 <span id="category-ajax-response"></span> |
694 </p> |
758 </p> |
695 </div> |
759 </div> |
696 </div> |
760 </div> |