function td_add_single_template_class($classes) { if (is_single()) { global $post; $active_single_template = ''; $td_post_theme_settings = get_post_meta($post->ID, 'td_post_theme_settings', true); if (!empty($td_post_theme_settings['td_post_template'])) { // we have a post template set in the post $active_single_template = $td_post_theme_settings['td_post_template']; } else { // we may have a global post template form td panel $td_default_site_post_template = td_util::get_option('td_default_site_post_template'); if (!empty($td_default_site_post_template)) { $active_single_template = $td_default_site_post_template; } } // add the class if we have a post template if (!empty($active_single_template)) { td_global::$cur_single_template = $active_single_template; $classes[] = sanitize_html_class($active_single_template); } } // if main menu background color is white to fix the menu appearance on all headers if (td_util::get_option('tds_menu_color') == '#ffffff' or td_util::get_option('tds_menu_color') == 'ffffff') { $classes[] = 'white-menu'; } // if grid color is white to fix the menu appearance on all headers if (td_util::get_option('tds_grid_line_color') == '#ffffff' or td_util::get_option('tds_grid_line_color') == 'ffffff') { $classes[] = 'white-grid'; } return $classes; }