Changeset 51739 for trunk/src/wp-includes/class-walker-page-dropdown.php
- Timestamp:
- 09/08/2021 03:35:32 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-page-dropdown.php
r45932 r51739 45 45 * 46 46 * @since 2.1.0 47 * @since 5.9.0 Renamed `$page` to `$data_object` to match parent class for PHP 8 named parameter support. 47 48 * 48 49 * @see Walker::start_el() 49 50 * 50 * @param string $output Used to append additional content. Passed by reference.51 * @param WP_Post $ pagePage data object.52 * @param int $depth Optional. Depth of page in reference to parent pages. Used for padding.53 * Default 0.54 * @param array $args Optional. Uses 'selected' argument for selected page to set selected HTML55 * attribute for option element. Uses 'value_field' argument to fill "value"56 * attribute. See wp_dropdown_pages(). Default empty array.57 * @param int $id Optional. ID of the current page. Default 0 (unused).51 * @param string $output Used to append additional content. Passed by reference. 52 * @param WP_Post $data_object Page data object. 53 * @param int $depth Optional. Depth of page in reference to parent pages. Used for padding. 54 * Default 0. 55 * @param array $args Optional. Uses 'selected' argument for selected page to set selected HTML 56 * attribute for option element. Uses 'value_field' argument to fill "value" 57 * attribute. See wp_dropdown_pages(). Default empty array. 58 * @param int $id Optional. ID of the current page. Default 0 (unused). 58 59 */ 59 public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) { 60 $pad = str_repeat( ' ', $depth * 3 ); 60 public function start_el( &$output, $data_object, $depth = 0, $args = array(), $id = 0 ) { 61 // Restores the more descriptive, specific name for use within this method. 62 $page = $data_object; 63 $pad = str_repeat( ' ', $depth * 3 ); 61 64 62 65 if ( ! isset( $args['value_field'] ) || ! isset( $page->{$args['value_field']} ) ) {
Note: See TracChangeset
for help on using the changeset viewer.