Docs: Mark optional parameters in Walker_Category methods as such.

Also cleans up some syntax.

See #36300.


git-svn-id: https://develop.svn.wordpress.org/trunk@37047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2016-03-22 17:29:40 +00:00
parent a76c9c6cb2
commit fc63cad200

View File

@ -32,10 +32,10 @@ class Walker_Category extends Walker {
* *
* @since 2.1.0 * @since 2.1.0
* @access public * @access public
* @todo Decouple this
* @var array * @var array
* *
* @see Walker::$db_fields * @see Walker::$db_fields
* @todo Decouple this
*/ */
public $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
@ -47,10 +47,10 @@ class Walker_Category extends Walker {
* *
* @see Walker::start_lvl() * @see Walker::start_lvl()
* *
* @param string $output Passed by reference. Used to append additional content. * @param string $output Used to append additional content. Passed by reference.
* @param int $depth Depth of category. Used for tab indentation. * @param int $depth Optional. Depth of category. Used for tab indentation. Default 0.
* @param array $args An array of arguments. Will only append content if style argument value is 'list'. * @param array $args Optional. An array of arguments. Will only append content if style argument
* See wp_list_categories(). * value is 'list'. See wp_list_categories(). Default empty array.
*/ */
public function start_lvl( &$output, $depth = 0, $args = array() ) { public function start_lvl( &$output, $depth = 0, $args = array() ) {
if ( 'list' != $args['style'] ) if ( 'list' != $args['style'] )
@ -68,10 +68,10 @@ class Walker_Category extends Walker {
* *
* @see Walker::end_lvl() * @see Walker::end_lvl()
* *
* @param string $output Passed by reference. Used to append additional content. * @param string $output Used to append additional content. Passed by reference.
* @param int $depth Depth of category. Used for tab indentation. * @param int $depth Optional. Depth of category. Used for tab indentation. Default 0.
* @param array $args An array of arguments. Will only append content if style argument value is 'list'. * @param array $args Optional. An array of arguments. Will only append content if style argument
* See wp_list_categories(). * value is 'list'. See wp_list_categories(). Default empty array.
*/ */
public function end_lvl( &$output, $depth = 0, $args = array() ) { public function end_lvl( &$output, $depth = 0, $args = array() ) {
if ( 'list' != $args['style'] ) if ( 'list' != $args['style'] )
@ -91,9 +91,9 @@ class Walker_Category extends Walker {
* *
* @param string $output Passed by reference. Used to append additional content. * @param string $output Passed by reference. Used to append additional content.
* @param object $category Category data object. * @param object $category Category data object.
* @param int $depth Depth of category in reference to parents. Default 0. * @param int $depth Optional. Depth of category in reference to parents. Default 0.
* @param array $args An array of arguments. See wp_list_categories(). * @param array $args Optional. An array of arguments. See wp_list_categories(). Default empty array.
* @param int $id ID of the current category. * @param int $id Optional. ID of the current category. Default 0.
*/ */
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
/** This filter is documented in wp-includes/category-template.php */ /** This filter is documented in wp-includes/category-template.php */
@ -221,8 +221,9 @@ class Walker_Category extends Walker {
* *
* @param string $output Passed by reference. Used to append additional content. * @param string $output Passed by reference. Used to append additional content.
* @param object $page Not used. * @param object $page Not used.
* @param int $depth Depth of category. Not used. * @param int $depth Optional. Depth of category. Not used.
* @param array $args An array of arguments. Only uses 'list' for whether should append to output. @see wp_list_categories() * @param array $args Optional. An array of arguments. Only uses 'list' for whether should append
* to output. See wp_list_categories(). Default empty array.
*/ */
public function end_el( &$output, $page, $depth = 0, $args = array() ) { public function end_el( &$output, $page, $depth = 0, $args = array() ) {
if ( 'list' != $args['style'] ) if ( 'list' != $args['style'] )