Fix broken full bleed template in post editor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -76,4 +76,18 @@ function so306588_trim_excerpt_custom_restore($text)
|
||||
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
|
||||
|
||||
// add custom filter
|
||||
add_filter('get_the_excerpt', 'so306588_trim_excerpt_custom');
|
||||
add_filter('get_the_excerpt', 'so306588_trim_excerpt_custom');
|
||||
|
||||
/*
|
||||
* Add template class to admin body based on current page's template.
|
||||
*/
|
||||
function mytheme_add_template_class($classes)
|
||||
{
|
||||
$template = get_page_template_slug();
|
||||
if ($template) {
|
||||
$class = preg_replace('/\.php$/', '', $template);
|
||||
$classes .= ' template-' . sanitize_html_class($class);
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
add_filter('admin_body_class', 'mytheme_add_template_class');
|
Reference in New Issue
Block a user