Make WordPress Core

Ticket #24096: 24096.diff

File 24096.diff, 1.9 KB (added by DrewAPicture, 12 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

     
    10251025        <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_cap' ) ?>
    10261026
    10271027                        </div>
     1028
     1029        <?php if ( $bulk ) : // post formats bulk edit
     1030                $all_post_formats = get_post_format_strings();
     1031                unset( $all_post_formats['standard'] );
     1032                ?>
     1033                <div class="inline-edit-group">
     1034                        <label class="alignleft" for="post_format">
     1035                        <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
     1036                        <select name="post_format">
     1037                                <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1038                                <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>
     1039                        <?php foreach ( $all_post_formats as $slug => $format ) : ?>
     1040                                <option value="<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $format ); ?></option>
     1041                        <?php endforeach; ?>
     1042                        </select></label>
     1043                </div>
     1044        <?php endif; // $bulk ?>
     1045
    10281046                </div></fieldset>
    10291047
    10301048        <?php
  • wp-admin/includes/post.php

     
    356356                }
    357357        }
    358358
     359        if ( isset( $post_data['post_format'] ) && '0' == $post_data['post_format'] )
     360                $post_data['post_format'] = false;
     361
    359362        $updated = $skipped = $locked = array();
    360363        foreach ( $post_IDs as $post_ID ) {
    361364                $post_type_object = get_post_type_object( get_post_type( $post_ID ) );
     
    405408                        else
    406409                                unstick_post( $post_ID );
    407410                }
     411
     412                if ( isset( $post_data['post_format'] ) )
     413                        set_post_format( $post_ID, $post_data['post_format'] );
    408414        }
    409415
    410416        return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );