| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 3 |
|
| 4 |
function mbt_themes_init() { |
| 5 |
add_filter('body_class', 'mbt_override_twentyseventeen_body_classes', 20); |
| 6 |
} |
| 7 |
add_action('mbt_init', 'mbt_themes_init', 11); |
| 8 |
|
| 9 |
function mbt_override_twentyseventeen_body_classes($classes) { |
| 10 |
if(get_template() === 'twentyseventeen' && mbt_is_mbt_page()) { |
| 11 |
$index = array_search('has-sidebar', $classes); |
| 12 |
if($index) { array_splice($classes, $index, 1); } |
| 13 |
} |
| 14 |
return $classes; |
| 15 |
} |
| 16 |
|