Permalink
Browse files

Allow dfault post format selections. fixes #15882.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
nacin
nacin committed Dec 19, 2010
1 parent d2b0ef4 commit ade50f7e352708da578a9a6ac51947cb20e9ea47
@@ -247,7 +247,7 @@ function post_format_meta_box( $post, $box ) {
if ( is_array( $post_formats[0] ) ) :
$post_format = get_post_format( $post->ID );
if ( !$post_format )
- $post_format = '0';
+ $post_format = get_option('default_post_format', '0');
$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
if ( $post_format && !in_array( $post_format, $post_formats[0] ) )
@@ -318,6 +318,9 @@ function populate_options() {
// 3.0
'page_for_posts' => 0,
'page_on_front' => 0,
+
+ // 3.1
+ 'default_post_format' => 0,
);
// 3.0 multisite
@@ -56,6 +56,23 @@
?>
</td>
</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">
<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
<td>
View
@@ -60,7 +60,7 @@
'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' ),
'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( '' ) );
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
View
@@ -8,14 +8,14 @@
*
* @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.
*
* @global int $wp_db_version
*/
-$wp_db_version = 15477;
+$wp_db_version = 17056;
/**
* Holds the TinyMCE version

0 comments on commit ade50f7

Please sign in to comment.