Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -35,7 +35,10 @@ class Walker_Page extends Walker {
|
|||
* @see Walker::$db_fields
|
||||
* @todo Decouple this.
|
||||
*/
|
||||
public $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' );
|
||||
public $db_fields = array(
|
||||
'parent' => 'post_parent',
|
||||
'id' => 'ID',
|
||||
);
|
||||
|
||||
/**
|
||||
* Outputs the beginning of the current level in the tree before elements are output.
|
||||
|
@ -57,7 +60,7 @@ class Walker_Page extends Walker {
|
|||
$t = '';
|
||||
$n = '';
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "{$n}{$indent}<ul class='children'>{$n}";
|
||||
}
|
||||
|
||||
|
@ -81,7 +84,7 @@ class Walker_Page extends Walker {
|
|||
$t = '';
|
||||
$n = '';
|
||||
}
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$indent = str_repeat( $t, $depth );
|
||||
$output .= "{$indent}</ul>{$n}";
|
||||
}
|
||||
|
||||
|
@ -127,7 +130,7 @@ class Walker_Page extends Walker {
|
|||
} elseif ( $_current_page && $page->ID == $_current_page->post_parent ) {
|
||||
$css_class[] = 'current_page_parent';
|
||||
}
|
||||
} elseif ( $page->ID == get_option('page_for_posts') ) {
|
||||
} elseif ( $page->ID == get_option( 'page_for_posts' ) ) {
|
||||
$css_class[] = 'current_page_parent';
|
||||
}
|
||||
|
||||
|
@ -138,14 +141,14 @@ class Walker_Page extends Walker {
|
|||
*
|
||||
* @see wp_list_pages()
|
||||
*
|
||||
* @param array $css_class An array of CSS classes to be applied
|
||||
* to each list item.
|
||||
* @param WP_Post $page Page data object.
|
||||
* @param int $depth Depth of page, used for padding.
|
||||
* @param array $args An array of arguments.
|
||||
* @param int $current_page ID of the current page.
|
||||
* @param string[] $css_class An array of CSS classes to be applied to each list item.
|
||||
* @param WP_Post $page Page data object.
|
||||
* @param int $depth Depth of page, used for padding.
|
||||
* @param array $args An array of arguments.
|
||||
* @param int $current_page ID of the current page.
|
||||
*/
|
||||
$css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
|
||||
$css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : '';
|
||||
|
||||
if ( '' === $page->post_title ) {
|
||||
/* translators: %d: ID of a post */
|
||||
|
@ -153,10 +156,11 @@ class Walker_Page extends Walker {
|
|||
}
|
||||
|
||||
$args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before'];
|
||||
$args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after'];
|
||||
$args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after'];
|
||||
|
||||
$atts = array();
|
||||
$atts['href'] = get_permalink( $page->ID );
|
||||
$atts = array();
|
||||
$atts['href'] = get_permalink( $page->ID );
|
||||
$atts['aria-current'] = ( $page->ID == $current_page ) ? 'page' : '';
|
||||
|
||||
/**
|
||||
* Filters the HTML attributes applied to a page menu item's anchor element.
|
||||
|
@ -166,7 +170,8 @@ class Walker_Page extends Walker {
|
|||
* @param array $atts {
|
||||
* The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
|
||||
*
|
||||
* @type string $href The href attribute.
|
||||
* @type string $href The href attribute.
|
||||
* @type string $aria_current The aria-current attribute.
|
||||
* }
|
||||
* @param WP_Post $page Page data object.
|
||||
* @param int $depth Depth of page, used for padding.
|
||||
|
@ -178,13 +183,13 @@ class Walker_Page extends Walker {
|
|||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = esc_attr( $value );
|
||||
$value = esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$output .= $indent . sprintf(
|
||||
'<li class="%s"><a%s>%s%s%s</a>',
|
||||
'<li%s><a%s>%s%s%s</a>',
|
||||
$css_classes,
|
||||
$attributes,
|
||||
$args['link_before'],
|
||||
|
@ -201,7 +206,7 @@ class Walker_Page extends Walker {
|
|||
}
|
||||
|
||||
$date_format = empty( $args['date_format'] ) ? '' : $args['date_format'];
|
||||
$output .= " " . mysql2date( $date_format, $time );
|
||||
$output .= ' ' . mysql2date( $date_format, $time );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue