mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 09:13:38 +01:00
Matthias Kretschmann
91ac84e9c7
- update & properly name all custom image sizes - new full column image size, expose it to editor too - use custom post excerpt as lead paragraph when set - move excerpt after title in WP editor - embedded media styles
34 lines
569 B
PHP
34 lines
569 B
PHP
<?php
|
|
/*
|
|
*
|
|
* All the blog related custom functions
|
|
*
|
|
*/
|
|
|
|
/*
|
|
*
|
|
* Add some custom image sizes to editor
|
|
*
|
|
*/
|
|
function ascribe_blog_image_sizes( $sizes ) {
|
|
return array_merge( $sizes, array(
|
|
'blog-full-column' => __( 'Blog Full Column' ),
|
|
) );
|
|
}
|
|
add_filter('image_size_names_choose', 'ascribe_blog_image_sizes');
|
|
|
|
|
|
/*
|
|
*
|
|
* Put excerpt meta-box before editor
|
|
*
|
|
*/
|
|
add_action(
|
|
'admin_menu', function () {
|
|
remove_meta_box('postexcerpt', 'post', 'normal');
|
|
}, 999
|
|
);
|
|
add_action('edit_form_after_title', 'post_excerpt_meta_box');
|
|
|
|
?>
|