Revert [15742]. Custom post types and sticky posts don't mix. fixes #12702.

git-svn-id: https://develop.svn.wordpress.org/trunk@16680 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-12-02 03:39:26 +00:00
parent c821bc7ca2
commit e86dc10b71
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -114,7 +114,7 @@ if ( 'private' == $post->post_status ) {
} elseif ( !empty( $post->post_password ) ) {
$visibility = 'password';
$visibility_trans = __('Password protected');
} elseif ( post_type_supports( $post->post_type, 'sticky' ) && is_sticky( $post->ID ) ) {
} elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
$visibility = 'public';
$visibility_trans = __('Public, Sticky');
} else {
@@ -128,15 +128,15 @@ echo esc_html( $visibility_trans ); ?></span>
<div id="post-visibility-select" class="hide-if-js">
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
<?php if ( post_type_supports( $post->post_type, 'sticky' ) ): ?>
<?php if ($post_type == 'post'): ?>
<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> />
<?php endif; ?>
<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_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 />
<?php if ( post_type_supports( $post->post_type, 'sticky' ) ): ?>
<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 to the front page') ?></label><br /></span>
<?php if ($post_type == 'post'): ?>
<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>
<?php endif; ?>
<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 esc_attr($post->post_password); ?>" /><br /></span>