Make WordPress Core

Changeset 17056


Ignore:
Timestamp:
12/19/2010 05:36:11 AM (14 years ago)
Author:
nacin
Message:

Allow dfault post format selections. fixes #15882.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r17001 r17056  
    248248        $post_format = get_post_format( $post->ID );
    249249        if ( !$post_format )
    250             $post_format = '0';
     250            $post_format = get_option('default_post_format', '0');
    251251        $post_format_display = get_post_format_string( $post_format );
    252252        // Add in the current one if it isn't there yet, in case the current theme doesn't support it
  • trunk/wp-admin/includes/schema.php

    r17012 r17056  
    319319    'page_for_posts' => 0,
    320320    'page_on_front' => 0,
     321
     322    // 3.1
     323    'default_post_format' => 0,
    321324    );
    322325
  • trunk/wp-admin/options-writing.php

    r16980 r17056  
    5757</td>
    5858</tr>
     59<?php
     60if ( current_theme_supports( 'post-formats' ) ) :
     61    $post_formats = get_theme_support( 'post-formats' );
     62    if ( is_array( $post_formats[0] ) ) :
     63?>
     64<tr valign="top">
     65<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
     66<td>
     67    <select name="default_post_format" id="default_post_format">
     68        <option value="0"><?php _e('Standard'); ?></option>
     69<?php foreach ( $post_formats[0] as $format ): ?>
     70        <option<?php selected( get_option('default_post_format'), $format ); ?> value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
     71<?php endforeach; ?>
     72    </select></label>
     73</td>
     74</tr>
     75<?php endif; endif; ?>
    5976<tr valign="top">
    6077<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
  • trunk/wp-admin/options.php

    r16706 r17056  
    6161    'privacy' => array( 'blog_public' ),
    6262    'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ),
    63     'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),
     63    'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format', 'enable_app', 'enable_xmlrpc' ),
    6464    'options' => array( '' ) );
    6565
  • trunk/wp-includes/version.php

    r16997 r17056  
    99 * @global string $wp_version
    1010 */
    11 $wp_version = '3.1-beta2-16997';
     11$wp_version = '3.1-beta2-17056';
    1212
    1313/**
     
    1616 * @global int $wp_db_version
    1717 */
    18 $wp_db_version = 15477;
     18$wp_db_version = 17056;
    1919
    2020/**
Note: See TracChangeset for help on using the changeset viewer.