Docs: Improve inline documentation for property and methods in `Walker_Category`.
Props raimy for the initial patch. See #36300. Built from https://develop.svn.wordpress.org/trunk@37046 git-svn-id: http://core.svn.wordpress.org/trunk@37013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
51e322e0ef
commit
9953858514
|
@ -15,36 +15,42 @@
|
||||||
* @see Walker
|
* @see Walker
|
||||||
*/
|
*/
|
||||||
class Walker_Category extends Walker {
|
class Walker_Category extends Walker {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* What the class handles.
|
* What the class handles.
|
||||||
*
|
*
|
||||||
* @see Walker::$tree_type
|
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
* @var string
|
* @var string
|
||||||
|
*
|
||||||
|
* @see Walker::$tree_type
|
||||||
*/
|
*/
|
||||||
public $tree_type = 'category';
|
public $tree_type = 'category';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database fields to use.
|
* Database fields to use.
|
||||||
*
|
*
|
||||||
* @see Walker::$db_fields
|
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
* @todo Decouple this
|
* @todo Decouple this
|
||||||
* @var array
|
* @var array
|
||||||
|
*
|
||||||
|
* @see Walker::$db_fields
|
||||||
*/
|
*/
|
||||||
public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the list before the elements are added.
|
* Starts the list before the elements are added.
|
||||||
*
|
*
|
||||||
* @see Walker::start_lvl()
|
|
||||||
*
|
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @see Walker::start_lvl()
|
||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of category. Used for tab indentation.
|
* @param int $depth Depth of category. Used for tab indentation.
|
||||||
* @param array $args An array of arguments. Will only append content if style argument value is 'list'.
|
* @param array $args An array of arguments. Will only append content if style argument value is 'list'.
|
||||||
* @see wp_list_categories()
|
* See wp_list_categories().
|
||||||
*/
|
*/
|
||||||
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'] )
|
||||||
|
@ -57,14 +63,15 @@ class Walker_Category extends Walker {
|
||||||
/**
|
/**
|
||||||
* Ends the list of after the elements are added.
|
* Ends the list of after the elements are added.
|
||||||
*
|
*
|
||||||
* @see Walker::end_lvl()
|
|
||||||
*
|
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @see Walker::end_lvl()
|
||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of category. Used for tab indentation.
|
* @param int $depth Depth of category. Used for tab indentation.
|
||||||
* @param array $args An array of arguments. Will only append content if style argument value is 'list'.
|
* @param array $args An array of arguments. Will only append content if style argument value is 'list'.
|
||||||
* @wsee wp_list_categories()
|
* See wp_list_categories().
|
||||||
*/
|
*/
|
||||||
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'] )
|
||||||
|
@ -75,16 +82,17 @@ class Walker_Category extends Walker {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the element output.
|
* Starts the element output.
|
||||||
*
|
|
||||||
* @see Walker::start_el()
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @see Walker::start_el()
|
||||||
*
|
*
|
||||||
* @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 Depth of category in reference to parents. Default 0.
|
||||||
* @param array $args An array of arguments. @see wp_list_categories()
|
* @param array $args An array of arguments. See wp_list_categories().
|
||||||
* @param int $id ID of the current category.
|
* @param int $id ID of the current category.
|
||||||
*/
|
*/
|
||||||
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
||||||
|
@ -206,9 +214,10 @@ class Walker_Category extends Walker {
|
||||||
/**
|
/**
|
||||||
* Ends the element output, if needed.
|
* Ends the element output, if needed.
|
||||||
*
|
*
|
||||||
* @see Walker::end_el()
|
|
||||||
*
|
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @see Walker::end_el()
|
||||||
*
|
*
|
||||||
* @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.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-beta4-37045';
|
$wp_version = '4.5-beta4-37046';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue