WordPress.org

Make WordPress Core

Ticket #35225: 35225.diff

File 35225.diff, 1.6 KB (added by barryceelen, 6 years ago)

Fix wp_filter_object_list() and get_post_types() documentation.

  • wp-includes/functions.php

    diff --git wp-includes/functions.php wp-includes/functions.php
    index c245af9..31612d3 100644
    function wp_is_numeric_array( $data ) { 
    32873287 *                              against each object. Default empty array.
    32883288 * @param string      $operator Optional. The logical operation to perform. 'or' means
    32893289 *                              only one element from the array needs to match; 'and'
    3290  *                              means all elements must match. Default 'and'.
     3290 *                              means all elements must match. 'not' means no elements may
     3291 *                              match. Default 'and'.
    32913292 * @param bool|string $field    A field from the object to place instead of the entire object.
    32923293 *                              Default false.
    32933294 * @return array A list of objects or object fields.
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 59506f8..03cdad0 100644
    function get_post_type_object( $post_type ) { 
    864864 *                               or 'objects'. Default 'names'.
    865865 * @param string       $operator Optional. The logical operation to perform. 'or' means only one
    866866 *                               element from the array needs to match; 'and' means all elements
    867  *                               must match. Accepts 'or' or 'and'. Default 'and'.
     867 *                               must match. 'not' means no elements may match. Default 'and'.
    868868 * @return array A list of post type names or objects.
    869869 */
    870870function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) {