--- a/wp/wp-includes/class-walker-page-dropdown.php Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-includes/class-walker-page-dropdown.php Mon Oct 14 18:28:13 2019 +0200
@@ -35,7 +35,10 @@
* @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',
+ );
/**
* Starts the element output.
@@ -54,15 +57,16 @@
* @param int $id Optional. ID of the current page. Default 0 (unused).
*/
public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) {
- $pad = str_repeat(' ', $depth * 3);
+ $pad = str_repeat( ' ', $depth * 3 );
if ( ! isset( $args['value_field'] ) || ! isset( $page->{$args['value_field']} ) ) {
$args['value_field'] = 'ID';
}
- $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $page->{$args['value_field']} ) . "\"";
- if ( $page->ID == $args['selected'] )
+ $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $page->{$args['value_field']} ) . '"';
+ if ( $page->ID == $args['selected'] ) {
$output .= ' selected="selected"';
+ }
$output .= '>';
$title = $page->post_title;
@@ -76,8 +80,8 @@
*
* @since 3.1.0
*
- * @param string $title Page title.
- * @param object $page Page data object.
+ * @param string $title Page title.
+ * @param WP_Post $page Page data object.
*/
$title = apply_filters( 'list_pages', $title, $page );