mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 09:13:38 +01:00
refine excerpt move function
This commit is contained in:
parent
0e3736bf0e
commit
209d13a167
@ -23,11 +23,19 @@ add_filter('image_size_names_choose', 'ascribe_blog_image_sizes');
|
|||||||
* Put excerpt meta-box before editor
|
* Put excerpt meta-box before editor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
add_action(
|
function ascribe_move_excerpt_meta_box( $post ) {
|
||||||
'admin_menu', function () {
|
if ( in_array( $post->post_type, array( 'post' ) ) ) {
|
||||||
remove_meta_box('postexcerpt', 'post', 'normal');
|
remove_meta_box( 'postexcerpt', $post->post_type, 'normal' );
|
||||||
}, 999
|
echo "<h2 style='padding: 10px 0 0;'>Excerpt</h2>";
|
||||||
);
|
post_excerpt_meta_box( $post );
|
||||||
add_action('edit_form_after_title', 'post_excerpt_meta_box');
|
|
||||||
|
echo "<style>
|
||||||
|
#excerpt { min-height: 90px }
|
||||||
|
#excerpt + p { display: none }
|
||||||
|
|
||||||
|
</style>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'edit_form_after_title', 'ascribe_move_excerpt_meta_box' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user