Move is_element_empty to nav.php
This commit is contained in:
@@ -3,14 +3,8 @@
|
||||
namespace Roots\Sage\Utils;
|
||||
|
||||
/**
|
||||
* Utility functions
|
||||
* Tell WordPress to use searchform.php from the templates/ directory
|
||||
*/
|
||||
function is_element_empty($element) {
|
||||
$element = trim($element);
|
||||
return !empty($element);
|
||||
}
|
||||
|
||||
// Tell WordPress to use searchform.php from the templates/ directory
|
||||
function get_search_form() {
|
||||
$form = '';
|
||||
locate_template('/templates/searchform.php', true, false);
|
||||
@@ -22,7 +16,6 @@ add_filter('get_search_form', __NAMESPACE__ . '\\get_search_form');
|
||||
* Add page slug to body_class() classes if it doesn't exist
|
||||
*/
|
||||
function body_class($classes) {
|
||||
// Add post/page slug
|
||||
if (is_single() || is_page() && !is_front_page()) {
|
||||
if (!in_array(basename(get_permalink()), $classes)) {
|
||||
$classes[] = basename(get_permalink());
|
||||
|
||||
Reference in New Issue
Block a user