Add some missing information to the inline docs for `get_post_types()`.

* Improves the `@see` reference for `register_post_type()` to mention that it contains information about accepted arguments
* Adds a description of the accepted values for the `$operator` parameter
* Fixes a typo

Fixes #29721.


git-svn-id: https://develop.svn.wordpress.org/trunk@29752 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes (DrewAPicture) 2014-09-21 08:54:37 +00:00
parent 4c1462f2ff
commit 191a7ead45
1 changed files with 3 additions and 3 deletions

View File

@ -1161,15 +1161,15 @@ function get_post_type_object( $post_type ) {
* *
* @global array $wp_post_types List of post types. * @global array $wp_post_types List of post types.
* *
* @see register_post_type() * @see register_post_type() for accepted arguments.
* *
* @param array|string $args Optional. An array of key => value arguments to match against * @param array|string $args Optional. An array of key => value arguments to match against
* the post type objects. Default empty array. * the post type objects. Default empty array.
* @param string $output Optional. The type of output to return. Accepts post type 'names' * @param string $output Optional. The type of output to return. Accepts post type 'names'
* or 'objects'. Default 'names'. * or 'objects'. Default 'names'.
* @param string $operator Optaionl. The logical operation to perform. 'or' means only one * @param string $operator Optional. The logical operation to perform. 'or' means only one
* element from the array needs to match; 'and' means all elements * element from the array needs to match; 'and' means all elements
* must match. Default 'and'. * must match. Accepts 'or' or 'and'. Default 'and'.
* @return array A list of post type names or objects. * @return array A list of post type names or objects.
*/ */
function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) { function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) {