getTOCList(); } /** * Display the current post's TOC list or supplied post's TOC list. * * @access public * @since 2.0 * * @param null|WP_Post $post An instance of WP_Post * @param bool $apply_content_filter Whether or not to apply `the_content` filter when processing post for headings. */ function ez_toc_list( $post = null, $apply_content_filter = true ) { echo get_ez_toc_list( $post, $apply_content_filter ); } /** * Get the current post's TOC content block or supplied post's TOC content block. * * @access public * @since 2.0 * * @param int|null|WP_Post $post An instance of WP_Post or post ID. Defaults to current post. * @param bool $apply_content_filter Whether or not to apply `the_content` filter when processing post for headings. * * @return string */ function get_ez_toc_block( $post = null, $apply_content_filter = true ) { if ( ! $post instanceof WP_Post ) { $post = get_post( $post ); } if ( $apply_content_filter ) { $ezPost = new ezTOC_Post( $post ); } else { $ezPost = new ezTOC_Post( $post, false ); } return $ezPost->getTOC(); } /** * Display the current post's TOC content or supplied post's TOC content. * * @access public * @since 2.0 * * @param null|WP_Post $post An instance of WP_Post * @param bool $apply_content_filter Whether or not to apply `the_content` filter when processing post for headings. */ function ez_toc_block( $post = null, $apply_content_filter = true ) { echo get_ez_toc_block( $post, $apply_content_filter ); } function ez_toc_inline_styles(){ echo ""; } if (ezTOC_Option::get( 'inline_css' )) { add_action('wp_head', 'ez_toc_inline_styles'); } add_action( 'woocommerce_archive_description', 'ez_toc_woo_category_desc' ); function ez_toc_woo_category_desc() { if (!function_exists('vtde_php_upgrade_notice')) { return false; } $term_object = get_queried_object(); $desc = $term_object->description; preg_match_all( '@
' . esc_html_e('Table of Contents', 'easy-table-of-contents') . '
' . ezTOC::getTOCToggleIcon() . '"; print_r($content); echo ""; } /** * EzDumper method * to var_dump content with pre tags * @since 2.0.34 * @param $content * @return void */ function EzDumper($content){ echo "
"; var_dump($content); echo ""; }