Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_comment_collection_params

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1458            *
1459            * This filter registers the collection parameter, but does not map the
1460            * collection parameter to an internal WP_Comment_Query parameter. Use the
1461            * `rest_comment_query` filter to set WP_Comment_Query parameters.
1462            *
1463            * @since 4.7.0
1464            *
1465            * @param array $query_params JSON Schema-formatted collection parameters.
1466            */
1467           return apply_filters( 'rest_comment_collection_params', $query_params );
1468      }
1469
1470      /**
1471       * Sets the comment_status of a given comment object when creating or updating a comment.
1472       *
1473       * @since 4.7.0
1474       * @access protected
1475       *
1476       * @param string|int $new_status New comment status.