Support » Plugin: Table of Contents Plus » Use title attribute of headings

Viewing 2 replies - 1 through 2 (of 2 total)
  • AlexMuc

    (@alexmuc)

    +1

    toc.php: line 1232
    //$html .= strip_tags($matches[$i][0]) . ‘‘;
    $l_vasu_item = apply_filters(‘vasu_toc_customize’,$matches[$i][0]);
    $html .= strip_tags($l_vasu_item) . ‘‘;

    functions.php

    function vasu_toc_customize($p){
    $l_toc =’vasu_toc’; //’title’;
    $pos1 = strpos($p,$l_toc);
    if ($pos1 !== false){
    $p = substr($p, $pos1 + strlen($l_toc));
    $pos1 = strpos($p,'”‘);
    if ($pos1 !== false){
    $p = substr($p, $pos1+1);
    $pos2 = strpos($p, ‘”‘);
    if ($pos2!==False) {
    $p = substr($p, 0, $pos2);
    }
    }
    }
    return $p;
    }
    add_filter(‘vasu_toc_customize’,’vasu_toc_customize’);

    function vasu_format_TinyMCE($p){
    $p[‘extended_valid_elements’] = ‘h1[vasu_toc],h2[vasu_toc],h3[vasu_toc],h4[vasu_toc],h5[vasu_toc],h6[vasu_toc]’;
    return $p;
    }
    add_filter(‘tiny_mce_before_init’,’vasu_format_TinyMCE’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use title attribute of headings’ is closed to new replies.