equal
deleted
inserted
replaced
24 public function __construct() { |
24 public function __construct() { |
25 $widget_ops = array( |
25 $widget_ops = array( |
26 'classname' => 'widget_pages', |
26 'classname' => 'widget_pages', |
27 'description' => __( 'A list of your site’s Pages.' ), |
27 'description' => __( 'A list of your site’s Pages.' ), |
28 'customize_selective_refresh' => true, |
28 'customize_selective_refresh' => true, |
|
29 'show_instance_in_rest' => true, |
29 ); |
30 ); |
30 parent::__construct( 'pages', __( 'Pages' ), $widget_ops ); |
31 parent::__construct( 'pages', __( 'Pages' ), $widget_ops ); |
31 } |
32 } |
32 |
33 |
33 /** |
34 /** |
59 |
60 |
60 if ( 'menu_order' === $sortby ) { |
61 if ( 'menu_order' === $sortby ) { |
61 $sortby = 'menu_order, post_title'; |
62 $sortby = 'menu_order, post_title'; |
62 } |
63 } |
63 |
64 |
64 $out = wp_list_pages( |
65 $output = wp_list_pages( |
65 /** |
66 /** |
66 * Filters the arguments for the Pages widget. |
67 * Filters the arguments for the Pages widget. |
67 * |
68 * |
68 * @since 2.8.0 |
69 * @since 2.8.0 |
69 * @since 4.9.0 Added the `$instance` parameter. |
70 * @since 4.9.0 Added the `$instance` parameter. |
83 ), |
84 ), |
84 $instance |
85 $instance |
85 ) |
86 ) |
86 ); |
87 ); |
87 |
88 |
88 if ( ! empty( $out ) ) { |
89 if ( ! empty( $output ) ) { |
89 echo $args['before_widget']; |
90 echo $args['before_widget']; |
90 if ( $title ) { |
91 if ( $title ) { |
91 echo $args['before_title'] . $title . $args['after_title']; |
92 echo $args['before_title'] . $title . $args['after_title']; |
92 } |
93 } |
93 |
94 |
103 echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">'; |
104 echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">'; |
104 } |
105 } |
105 ?> |
106 ?> |
106 |
107 |
107 <ul> |
108 <ul> |
108 <?php echo $out; ?> |
109 <?php echo $output; ?> |
109 </ul> |
110 </ul> |
110 |
111 |
111 <?php |
112 <?php |
112 if ( 'html5' === $format ) { |
113 if ( 'html5' === $format ) { |
113 echo '</nav>'; |
114 echo '</nav>'; |