Allow dfault post format selections. fixes #15882.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2b0ef40c8
commit
ade50f7e35
|
@ -247,7 +247,7 @@ function post_format_meta_box( $post, $box ) {
|
||||||
if ( is_array( $post_formats[0] ) ) :
|
if ( is_array( $post_formats[0] ) ) :
|
||||||
$post_format = get_post_format( $post->ID );
|
$post_format = get_post_format( $post->ID );
|
||||||
if ( !$post_format )
|
if ( !$post_format )
|
||||||
$post_format = '0';
|
$post_format = get_option('default_post_format', '0');
|
||||||
$post_format_display = get_post_format_string( $post_format );
|
$post_format_display = get_post_format_string( $post_format );
|
||||||
// Add in the current one if it isn't there yet, in case the current theme doesn't support it
|
// Add in the current one if it isn't there yet, in case the current theme doesn't support it
|
||||||
if ( $post_format && !in_array( $post_format, $post_formats[0] ) )
|
if ( $post_format && !in_array( $post_format, $post_formats[0] ) )
|
||||||
|
|
|
@ -318,6 +318,9 @@ function populate_options() {
|
||||||
// 3.0
|
// 3.0
|
||||||
'page_for_posts' => 0,
|
'page_for_posts' => 0,
|
||||||
'page_on_front' => 0,
|
'page_on_front' => 0,
|
||||||
|
|
||||||
|
// 3.1
|
||||||
|
'default_post_format' => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
// 3.0 multisite
|
// 3.0 multisite
|
||||||
|
|
|
@ -56,6 +56,23 @@ wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'o
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if ( current_theme_supports( 'post-formats' ) ) :
|
||||||
|
$post_formats = get_theme_support( 'post-formats' );
|
||||||
|
if ( is_array( $post_formats[0] ) ) :
|
||||||
|
?>
|
||||||
|
<tr valign="top">
|
||||||
|
<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="default_post_format" id="default_post_format">
|
||||||
|
<option value="0"><?php _e('Standard'); ?></option>
|
||||||
|
<?php foreach ( $post_formats[0] as $format ): ?>
|
||||||
|
<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>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; endif; ?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
|
<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -60,7 +60,7 @@ $whitelist_options = array(
|
||||||
'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ),
|
'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ),
|
||||||
'privacy' => array( 'blog_public' ),
|
'privacy' => array( 'blog_public' ),
|
||||||
'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ),
|
'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ),
|
||||||
'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),
|
'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' ),
|
||||||
'options' => array( '' ) );
|
'options' => array( '' ) );
|
||||||
|
|
||||||
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
|
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '3.1-beta2-16997';
|
$wp_version = '3.1-beta2-17056';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 15477;
|
$wp_db_version = 17056;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
|
Loading…
Reference in New Issue