Improve the UX and flow of the Image post format.
* Drag-and-drop
* Textarea for HTML/URL hidden to start
* Bigger click target for entering Media modal
* Image preview height-contrained to 300 pixels
* Hid the alignment, size, etc options that didn't have an effect anyway
* Got wp-format-{format} into the <body> class
props DrewAPicture, aaroncampbell, markjaquith, azaozz. see #24291.
git-svn-id: http://core.svn.wordpress.org/trunk@24226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -24,7 +24,7 @@ function get_post_format( $post = null ) {
|
||||
$_format = get_the_terms( $post->ID, 'post_format' );
|
||||
|
||||
if ( empty( $_format ) )
|
||||
return false;
|
||||
return '';
|
||||
|
||||
$format = array_shift( $_format );
|
||||
|
||||
@@ -1012,4 +1012,4 @@ function _post_formats_fix_empty_title( $data, $postarr ) {
|
||||
$data['post_title'] = _post_formats_generate_title( $data['post_content'], $post_format );
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'comma' => _x( ',', 'tag delimiter' ),
|
||||
) );
|
||||
|
||||
$scripts->add( 'post-formats', "/wp-admin/js/post-formats$suffix.js", array( 'media-models' ), false, 1 );
|
||||
$scripts->add( 'post-formats', "/wp-admin/js/post-formats$suffix.js", array( 'media-models', 'wp-plupload' ), false, 1 );
|
||||
|
||||
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user