Making WordPress.org


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php

    r10768 r8899  
    4040
    4141    function load_filters() {
     42        $this->post_types = array_map( array( $this, 'append_suffix' ), $this->post_types );
     43
    4244        if ( is_singular( $this->post_types ) && ! is_embed() ) {
    4345            add_filter( 'the_content', array( $this, 'add_toc' ) );
    4446        }
     47    }
     48
     49    function append_suffix( $t ) {
     50        if ( in_array( $t, array( 'handbook', 'page' ) ) ) {
     51            return $t;
     52        }
     53
     54        return $t . '-handbook';
    4555    }
    4656
Note: See TracChangeset for help on using the changeset viewer.