Some cleanup for edit-page-form.php and edit-form-advanced.php, props simek, fixes #9501
git-svn-id: http://svn.automattic.com/wordpress/trunk@11183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1aa5637881
commit
84591d777c
|
@ -104,7 +104,7 @@ if ( 'publish' == $post->post_status ) {
|
||||||
<div id="misc-publishing-actions">
|
<div id="misc-publishing-actions">
|
||||||
|
|
||||||
<div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label>
|
<div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label>
|
||||||
<b><span id="post-status-display">
|
<span id="post-status-display">
|
||||||
<?php
|
<?php
|
||||||
switch ( $post->post_status ) {
|
switch ( $post->post_status ) {
|
||||||
case 'private':
|
case 'private':
|
||||||
|
@ -124,7 +124,7 @@ switch ( $post->post_status ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</span></b>
|
</span>
|
||||||
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
|
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ switch ( $post->post_status ) {
|
||||||
</div><?php // /misc-pub-section ?>
|
</div><?php // /misc-pub-section ?>
|
||||||
|
|
||||||
<div class="misc-pub-section " id="visibility">
|
<div class="misc-pub-section " id="visibility">
|
||||||
<?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php
|
<?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php
|
||||||
|
|
||||||
if ( 'private' == $post->post_status ) {
|
if ( 'private' == $post->post_status ) {
|
||||||
$post->post_password = '';
|
$post->post_password = '';
|
||||||
|
@ -166,7 +166,7 @@ if ( 'private' == $post->post_status ) {
|
||||||
$visibility_trans = __('Public');
|
$visibility_trans = __('Public');
|
||||||
}
|
}
|
||||||
|
|
||||||
?><?php echo wp_specialchars( $visibility_trans ); ?></span></b> <?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
|
?><?php echo wp_specialchars( $visibility_trans ); ?></span> <?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
|
||||||
|
|
||||||
<div id="post-visibility-select" class="hide-if-js">
|
<div id="post-visibility-select" class="hide-if-js">
|
||||||
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
|
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
|
||||||
|
@ -210,8 +210,8 @@ if ( 0 != $post->ID ) {
|
||||||
$stamp = __('Publish <b>immediately</b>');
|
$stamp = __('Publish <b>immediately</b>');
|
||||||
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||||
<div class="misc-pub-section curtime misc-pub-section-last">
|
<div class="misc-pub-section curtime misc-pub-section-last">
|
||||||
<span id="timestamp">
|
<span id="timestamp">
|
||||||
<?php printf($stamp, $date); ?></span>
|
<?php printf($stamp, $date); ?></span>
|
||||||
|
@ -235,23 +235,25 @@ if ( ( 'edit' == $action ) && current_user_can('delete_post', $post->ID) ) { ?>
|
||||||
|
|
||||||
<div id="publishing-action">
|
<div id="publishing-action">
|
||||||
<?php
|
<?php
|
||||||
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?>
|
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
|
||||||
<?php if ( current_user_can('publish_posts') ) : ?>
|
if ( current_user_can('publish_posts') ) :
|
||||||
<?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
|
if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
|
||||||
<?php endif; ?>
|
<?php endif;
|
||||||
<?php else : ?>
|
else : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" />
|
||||||
<?php endif; ?>
|
<?php
|
||||||
<?php } else { ?>
|
endif;
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Post') ?>" />
|
} else { ?>
|
||||||
<input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Post') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Post') ?>" />
|
||||||
<?php } ?>
|
<input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Post') ?>" />
|
||||||
|
<?php
|
||||||
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -317,13 +319,13 @@ function post_categories_meta_box($post) {
|
||||||
|
|
||||||
<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
|
<div id="categories-pop" class="ui-tabs-panel" style="display: none;">
|
||||||
<ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >
|
<ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >
|
||||||
<?php $popular_ids = wp_popular_terms_checklist('category'); ?>
|
<?php $popular_ids = wp_popular_terms_checklist('category'); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="categories-all" class="ui-tabs-panel">
|
<div id="categories-all" class="ui-tabs-panel">
|
||||||
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
||||||
<?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
|
<?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -331,12 +333,11 @@ function post_categories_meta_box($post) {
|
||||||
<div id="category-adder" class="wp-hidden-children">
|
<div id="category-adder" class="wp-hidden-children">
|
||||||
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
|
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
|
||||||
<p id="category-add" class="wp-hidden-child">
|
<p id="category-add" class="wp-hidden-child">
|
||||||
<label class="invisible" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _ea( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
|
<label class="invisible" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _ea( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
|
||||||
<label class="invisible" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
|
<label class="invisible" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
|
||||||
<input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _ea( 'Add' ); ?>" tabindex="3" />
|
<input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _ea( 'Add' ); ?>" tabindex="3" />
|
||||||
<?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
|
<?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
|
||||||
<span id="category-ajax-response"></span>
|
<span id="category-ajax-response"></span></p>
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
@ -353,9 +354,7 @@ add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post'
|
||||||
*/
|
*/
|
||||||
function post_password_meta_box($post) {
|
function post_password_meta_box($post) {
|
||||||
?>
|
?>
|
||||||
<p>
|
<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label></p>
|
||||||
<label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label>
|
|
||||||
</p>
|
|
||||||
<h4><?php _e( 'Post Password' ); ?></h4>
|
<h4><?php _e( 'Post Password' ); ?></h4>
|
||||||
<p><label class="invisible" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p>
|
<p><label class="invisible" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p>
|
||||||
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p>
|
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p>
|
||||||
|
@ -419,8 +418,7 @@ function post_custom_meta_box($post) {
|
||||||
<?php
|
<?php
|
||||||
$metadata = has_meta($post->ID);
|
$metadata = has_meta($post->ID);
|
||||||
list_meta($metadata);
|
list_meta($metadata);
|
||||||
meta_form();
|
meta_form(); ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
@ -441,8 +439,7 @@ function post_comment_status_meta_box($post) {
|
||||||
<input name="advanced_view" type="hidden" value="1" />
|
<input name="advanced_view" type="hidden" value="1" />
|
||||||
<p class="meta-options">
|
<p class="meta-options">
|
||||||
<label for="comment_status" class="selectit"> <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e('Allow comments on this post') ?></label><br />
|
<label for="comment_status" class="selectit"> <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> <?php _e('Allow comments on this post') ?></label><br />
|
||||||
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label>
|
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label></p>
|
||||||
</p>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'post', 'normal', 'core');
|
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'post', 'normal', 'core');
|
||||||
|
@ -468,16 +465,12 @@ function post_comment_meta_box($post) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
|
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
|
||||||
<thead>
|
<thead><tr>
|
||||||
<tr>
|
|
||||||
<th scope="col" class="column-author"><?php _e('Author') ?></th>
|
<th scope="col" class="column-author"><?php _e('Author') ?></th>
|
||||||
<th scope="col" class="column-comment">
|
<th scope="col" class="column-comment">
|
||||||
<?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?>
|
<?php /* translators: field name in comment form */ echo _x('Comment', 'noun'); ?></th>
|
||||||
</th>
|
</tr></thead>
|
||||||
</tr>
|
<tbody id="the-comment-list" class="list:comment"></tbody>
|
||||||
</thead>
|
|
||||||
<tbody id="the-comment-list" class="list:comment">
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="images/wpspin.gif" alt="" /></p>
|
<p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="images/wpspin.gif" alt="" /></p>
|
||||||
<?php
|
<?php
|
||||||
|
@ -580,12 +573,13 @@ else
|
||||||
<input type="hidden" id="post_type" name="post_type" value="<?php echo attr($post->post_type) ?>" />
|
<input type="hidden" id="post_type" name="post_type" value="<?php echo attr($post->post_type) ?>" />
|
||||||
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo attr($post->post_status) ?>" />
|
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo attr($post->post_status) ?>" />
|
||||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
||||||
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
|
<?php
|
||||||
|
if ( 'draft' != $post->post_status )
|
||||||
|
wp_original_referer_field(true, 'previous');
|
||||||
|
|
||||||
<?php echo $form_extra ?>
|
echo $form_extra ?>
|
||||||
|
|
||||||
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
||||||
|
|
||||||
<div id="side-info-column" class="inner-sidebar">
|
<div id="side-info-column" class="inner-sidebar">
|
||||||
|
|
||||||
<?php do_action('submitpost_box'); ?>
|
<?php do_action('submitpost_box'); ?>
|
||||||
|
@ -601,14 +595,17 @@ else
|
||||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
|
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
<?php
|
||||||
<?php if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?>
|
$sample_permalink_html = get_sample_permalink_html($post->ID);
|
||||||
|
if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?>
|
||||||
<div id="edit-slug-box">
|
<div id="edit-slug-box">
|
||||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
<?php
|
||||||
echo $sample_permalink_html;
|
if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||||
|
echo $sample_permalink_html;
|
||||||
endif; ?>
|
endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -630,17 +627,16 @@ endif; ?>
|
||||||
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||||
}
|
}
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
} ?>
|
||||||
?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
|
|
||||||
|
<?php
|
||||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
wp_nonce_field( 'autosave', 'autosavenonce', false );
|
||||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
wp_nonce_field( 'getpermalink', 'getpermalinknonce', false );
|
||||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
||||||
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -651,9 +647,7 @@ do_action('edit_form_advanced');
|
||||||
|
|
||||||
do_meta_boxes('post', 'advanced', $post);
|
do_meta_boxes('post', 'advanced', $post);
|
||||||
|
|
||||||
do_action('dbx_post_sidebar');
|
do_action('dbx_post_sidebar'); ?>
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -98,7 +98,7 @@ if ( 'publish' == $post->post_status ) {
|
||||||
<div id="misc-publishing-actions">
|
<div id="misc-publishing-actions">
|
||||||
|
|
||||||
<div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label>
|
<div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label>
|
||||||
<b><span id="post-status-display">
|
<span id="post-status-display">
|
||||||
<?php
|
<?php
|
||||||
switch ( $post->post_status ) {
|
switch ( $post->post_status ) {
|
||||||
case 'private':
|
case 'private':
|
||||||
|
@ -118,7 +118,7 @@ switch ( $post->post_status ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</span></b>
|
</span>
|
||||||
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
|
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ switch ( $post->post_status ) {
|
||||||
</div><?php // /misc-pub-section ?>
|
</div><?php // /misc-pub-section ?>
|
||||||
|
|
||||||
<div class="misc-pub-section " id="visibility">
|
<div class="misc-pub-section " id="visibility">
|
||||||
<?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php
|
<?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php
|
||||||
|
|
||||||
if ( 'private' == $post->post_status ) {
|
if ( 'private' == $post->post_status ) {
|
||||||
$post->post_password = '';
|
$post->post_password = '';
|
||||||
|
@ -158,22 +158,21 @@ if ( 'private' == $post->post_status ) {
|
||||||
$visibility_trans = __('Public');
|
$visibility_trans = __('Public');
|
||||||
}
|
}
|
||||||
|
|
||||||
?><?php echo wp_specialchars( $visibility_trans ); ?></span></b> <?php if ( $can_publish ) { ?> <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
|
echo wp_specialchars( $visibility_trans ); ?></span>
|
||||||
|
<?php if ( $can_publish ) { ?>
|
||||||
|
<a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
|
||||||
|
|
||||||
<div id="post-visibility-select" class="hide-if-js">
|
<div id="post-visibility-select" class="hide-if-js">
|
||||||
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
|
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
|
||||||
<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attr( $visibility ); ?>" />
|
<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attr( $visibility ); ?>" />
|
||||||
|
|
||||||
|
|
||||||
<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 />
|
<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 />
|
||||||
<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 />
|
<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 />
|
||||||
<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo attr($post->post_password); ?>" /><br /></span>
|
<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo attr($post->post_password); ?>" /><br /></span>
|
||||||
<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 />
|
<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 />
|
||||||
|
|
||||||
<p>
|
<p><a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>
|
||||||
<a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>
|
<a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a></p>
|
||||||
<a href="#visibility" class="cancel-post-visibility hide-if-no-js"><?php _e('Cancel'); ?></a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
@ -199,15 +198,14 @@ if ( 0 != $post->ID ) {
|
||||||
$stamp = __('Publish <b>immediately</b>');
|
$stamp = __('Publish <b>immediately</b>');
|
||||||
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||||
<div class="misc-pub-section curtime misc-pub-section-last">
|
<div class="misc-pub-section curtime misc-pub-section-last">
|
||||||
<span id="timestamp">
|
<span id="timestamp"><?php printf($stamp, $date); ?></span>
|
||||||
<?php printf($stamp, $date); ?></span>
|
|
||||||
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
|
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
|
||||||
<div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div>
|
<div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'),1,4); ?></div>
|
||||||
</div><?php // /misc-pub-section ?>
|
</div><?php // /misc-pub-section
|
||||||
<?php endif; ?>
|
endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
@ -225,22 +223,25 @@ if ( ( 'edit' == $action ) && current_user_can('delete_page', $post->ID) ) { ?>
|
||||||
<div id="publishing-action">
|
<div id="publishing-action">
|
||||||
<?php
|
<?php
|
||||||
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?>
|
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?>
|
||||||
<?php if ( $can_publish ) : ?>
|
<?php
|
||||||
<?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
|
if ( $can_publish ) :
|
||||||
|
if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
|
||||||
<?php endif; ?>
|
<?php endif;
|
||||||
<?php else : ?>
|
else : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
|
||||||
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" />
|
<input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" />
|
||||||
<?php endif; ?>
|
<?php
|
||||||
<?php } else { ?>
|
endif;
|
||||||
|
} else { ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Page') ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Page') ?>" />
|
||||||
<input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Page') ?>" />
|
<input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Page') ?>" />
|
||||||
<?php } ?>
|
<?php
|
||||||
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -280,8 +281,7 @@ function page_attributes_meta_box($post){
|
||||||
<?php wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>
|
<?php wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?>
|
||||||
<p><?php _e('You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
|
<p><?php _e('You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
if ( 0 != count( get_page_templates() ) ) {
|
if ( 0 != count( get_page_templates() ) ) { ?>
|
||||||
?>
|
|
||||||
<h5><?php _e('Template') ?></h5>
|
<h5><?php _e('Template') ?></h5>
|
||||||
<label class="invisible" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
|
<label class="invisible" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
|
||||||
<option value='default'><?php _e('Default Template'); ?></option>
|
<option value='default'><?php _e('Default Template'); ?></option>
|
||||||
|
@ -289,8 +289,7 @@ function page_attributes_meta_box($post){
|
||||||
</select>
|
</select>
|
||||||
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p>
|
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
} ?>
|
||||||
?>
|
|
||||||
<h5><?php _e('Order') ?></h5>
|
<h5><?php _e('Order') ?></h5>
|
||||||
<p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo attr($post->menu_order) ?>" /></p>
|
<p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo attr($post->menu_order) ?>" /></p>
|
||||||
<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it’ll be better in future releases.)'); ?></p>
|
<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it’ll be better in future releases.)'); ?></p>
|
||||||
|
@ -309,11 +308,10 @@ function page_custom_meta_box($post){
|
||||||
?>
|
?>
|
||||||
<div id="postcustomstuff">
|
<div id="postcustomstuff">
|
||||||
<?php
|
<?php
|
||||||
$metadata = has_meta($post->ID);
|
$metadata = has_meta($post->ID);
|
||||||
list_meta($metadata);
|
list_meta($metadata);
|
||||||
meta_form();
|
meta_form(); ?>
|
||||||
?>
|
<div id="ajax-response"></div>
|
||||||
<div id="ajax-response"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
@ -428,13 +426,9 @@ if (isset($mode) && 'bookmarklet' == $mode)
|
||||||
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
||||||
|
|
||||||
<div id="side-info-column" class="inner-sidebar">
|
<div id="side-info-column" class="inner-sidebar">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
do_action('submitpage_box');
|
do_action('submitpage_box');
|
||||||
$side_meta_boxes = do_meta_boxes('page', 'side', $post);
|
$side_meta_boxes = do_meta_boxes('page', 'side', $post); ?>
|
||||||
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="post-body">
|
<div id="post-body">
|
||||||
|
@ -475,19 +469,18 @@ endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
|
|
||||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
<?php
|
||||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
wp_nonce_field( 'autosave', 'autosavenonce', false );
|
||||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
wp_nonce_field( 'getpermalink', 'getpermalinknonce', false );
|
||||||
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
||||||
|
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
do_meta_boxes('page', 'normal', $post);
|
do_meta_boxes('page', 'normal', $post);
|
||||||
do_action('edit_page_form');
|
do_action('edit_page_form');
|
||||||
do_meta_boxes('page', 'advanced', $post);
|
do_meta_boxes('page', 'advanced', $post);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -309,6 +309,11 @@ form p.submit a.cancel:hover {
|
||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#post-status-display,
|
||||||
|
#post-visibility-display {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.side-info {
|
.side-info {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
Loading…
Reference in New Issue