Changeset 706 for sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php
- Timestamp:
- 06/17/2014 12:00:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php
r705 r706 11 11 12 12 function __construct( $post_types ) { 13 $this->post_types = $post_types;13 $this->post_types = (array) $post_types; 14 14 add_action( 'template_redirect', array( $this, 'load_filters' ) ); 15 15 } … … 23 23 24 24 function append_suffix( $t ) { 25 if ( 'handbook' == $t )25 if ( in_array( $t, array( 'handbook', 'page' ) ) ) { 26 26 return $t; 27 } 27 28 28 29 return $t . '-handbook'; … … 42 43 $pages_header = 'h3'; 43 44 44 if ( $pages = wp_list_pages( array( 'child_of' => get_the_ID(), 'echo' => false, 'title_li' => false, 'post_type' => $this->post_type) ) )45 if ( $pages = wp_list_pages( array( 'child_of' => get_the_ID(), 'echo' => false, 'title_li' => false, 'post_type' => get_post_type() ) ) ) 45 46 $toc .= "<$pages_header>Pages</$pages_header><ul class=\"items\">$pages</ul>"; 46 47 … … 48 49 $toc .= $this->styles; 49 50 $toc .= '<div class="table-of-contents">'; 50 $toc .= "<$contents_header> Contents</$contents_header><ul class=\"items\">";51 $toc .= "<$contents_header>" . __( 'Topics', 'wporg' ) . "</$contents_header><ul class=\"items\">"; 51 52 $last_item = false; 52 53 foreach ( $items as $item ) { … … 79 80 80 81 if ( ! $first ) { 81 $replacement .= '<p class="toc-jump"><a href="#top"> Top ↑</a></p>';82 $replacement .= '<p class="toc-jump"><a href="#top">' . __( 'Top ↑', 'wporg' ) . '</a></p>'; 82 83 } else { 83 84 $first = false;
Note: See TracChangeset
for help on using the changeset viewer.