(.*?)<\/h[1-6].*?>/iu', $the_content, $heading ); if( $heading_count >= get_theme_mod( 'simple_days_toc_dc','3')){ $numif = (get_theme_mod( 'simple_days_toc_numerical','true') == true ? '1' : "0") ; $hieif = (get_theme_mod( 'simple_days_toc_hierarchical',false) == true ? '1' : "0") ; $toc_html = ''; $toc_header_html = ''; $toc_footer_html = ''; $numerical = ''; $top_level = 6; foreach($heading[1] as $data){ if($data < $top_level) $top_level = $data; } $i = $first = $heading_1 = $heading_2 = $heading_3 = $heading_4 = $heading_5 = $heading_6 = $num_heading_1 = $num_heading_2 = $num_heading_3 = $num_heading_4 = $num_heading_5 = $num_heading_6 = 0; $before_level = $top_level; $after_level = $heading[1][1]; $toc_header_html = '