Ticket #10916: classes_list_page_filters.diff
File classes_list_page_filters.diff, 1.8 KB (added by , 15 years ago) |
---|
-
wp-includes/classes.php
1164 1164 * @param int $depth Depth of page. Used for padding. 1165 1165 * @param int $current_page Page ID. 1166 1166 * @param array $args 1167 * @uses apply_filters Calls 'page_css_class' filter on HTML list item's class attribute value, passing $page 1168 * @uses apply_filters Calls 'page_anchor_attributes' filter on associative array of HTML anchor's attribute names and values, passing $page 1169 * @uses apply_filters Calls 'page_anchor_contents' filter on HTML anchor's contents, passing $page 1167 1170 */ 1168 1171 function start_el(&$output, $page, $depth, $args, $current_page) { 1169 1172 if ( $depth ) … … 1187 1190 1188 1191 $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); 1189 1192 1190 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>'; 1193 $anchor_attributes = apply_filters( 'page_anchor_attributes', array( 1194 'href' => get_page_link($page->ID) 1195 , 'title' => apply_filters('the_title', $page->post_title)) 1196 , $page ); 1197 $anchor_contents = apply_filters( 'page_anchor_contents' 1198 , $link_before . apply_filters('the_title', $page->post_title) . $link_after 1199 , $page ); 1191 1200 1201 $anchor = '<a'; 1202 foreach ( $anchor_attributes as $name => $value ) { 1203 $anchor .= sprintf( ' %1$s="%2$s"', tag_escape($name), esc_attr($value) ); 1204 } 1205 $anchor .= '>' . $anchor_contents . '</a>'; 1206 1207 $output .= $indent . '<li class="' . $css_class . '">' . $anchor; 1208 1192 1209 if ( !empty($show_date) ) { 1193 1210 if ( 'modified' == $show_date ) 1194 1211 $time = $page->post_modified;