wp/wp-admin/includes/class-walker-category-checklist.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
    30 	 *
    30 	 *
    31 	 * @since 2.5.1
    31 	 * @since 2.5.1
    32 	 *
    32 	 *
    33 	 * @param string $output Used to append additional content (passed by reference).
    33 	 * @param string $output Used to append additional content (passed by reference).
    34 	 * @param int    $depth  Depth of category. Used for tab indentation.
    34 	 * @param int    $depth  Depth of category. Used for tab indentation.
    35 	 * @param array  $args   An array of arguments. @see wp_terms_checklist()
    35 	 * @param array  $args   An array of arguments. See {@see wp_terms_checklist()}.
    36 	 */
    36 	 */
    37 	public function start_lvl( &$output, $depth = 0, $args = array() ) {
    37 	public function start_lvl( &$output, $depth = 0, $args = array() ) {
    38 		$indent  = str_repeat( "\t", $depth );
    38 		$indent  = str_repeat( "\t", $depth );
    39 		$output .= "$indent<ul class='children'>\n";
    39 		$output .= "$indent<ul class='children'>\n";
    40 	}
    40 	}
    46 	 *
    46 	 *
    47 	 * @since 2.5.1
    47 	 * @since 2.5.1
    48 	 *
    48 	 *
    49 	 * @param string $output Used to append additional content (passed by reference).
    49 	 * @param string $output Used to append additional content (passed by reference).
    50 	 * @param int    $depth  Depth of category. Used for tab indentation.
    50 	 * @param int    $depth  Depth of category. Used for tab indentation.
    51 	 * @param array  $args   An array of arguments. @see wp_terms_checklist()
    51 	 * @param array  $args   An array of arguments. See {@see wp_terms_checklist()}.
    52 	 */
    52 	 */
    53 	public function end_lvl( &$output, $depth = 0, $args = array() ) {
    53 	public function end_lvl( &$output, $depth = 0, $args = array() ) {
    54 		$indent  = str_repeat( "\t", $depth );
    54 		$indent  = str_repeat( "\t", $depth );
    55 		$output .= "$indent</ul>\n";
    55 		$output .= "$indent</ul>\n";
    56 	}
    56 	}
    65 	 *              to match parent class for PHP 8 named parameter support.
    65 	 *              to match parent class for PHP 8 named parameter support.
    66 	 *
    66 	 *
    67 	 * @param string  $output            Used to append additional content (passed by reference).
    67 	 * @param string  $output            Used to append additional content (passed by reference).
    68 	 * @param WP_Term $data_object       The current term object.
    68 	 * @param WP_Term $data_object       The current term object.
    69 	 * @param int     $depth             Depth of the term in reference to parents. Default 0.
    69 	 * @param int     $depth             Depth of the term in reference to parents. Default 0.
    70 	 * @param array   $args              An array of arguments. @see wp_terms_checklist()
    70 	 * @param array   $args              An array of arguments. See {@see wp_terms_checklist()}.
    71 	 * @param int     $current_object_id Optional. ID of the current term. Default 0.
    71 	 * @param int     $current_object_id Optional. ID of the current term. Default 0.
    72 	 */
    72 	 */
    73 	public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) {
    73 	public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) {
    74 		// Restores the more descriptive, specific name for use within this method.
    74 		// Restores the more descriptive, specific name for use within this method.
    75 		$category = $data_object;
    75 		$category = $data_object;
   128 	 * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support.
   128 	 * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support.
   129 	 *
   129 	 *
   130 	 * @param string  $output      Used to append additional content (passed by reference).
   130 	 * @param string  $output      Used to append additional content (passed by reference).
   131 	 * @param WP_Term $data_object The current term object.
   131 	 * @param WP_Term $data_object The current term object.
   132 	 * @param int     $depth       Depth of the term in reference to parents. Default 0.
   132 	 * @param int     $depth       Depth of the term in reference to parents. Default 0.
   133 	 * @param array   $args        An array of arguments. @see wp_terms_checklist()
   133 	 * @param array   $args        An array of arguments. See {@see wp_terms_checklist()}.
   134 	 */
   134 	 */
   135 	public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
   135 	public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
   136 		$output .= "</li>\n";
   136 		$output .= "</li>\n";
   137 	}
   137 	}
   138 }
   138 }