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
1426            *
1427            * This filter registers the collection parameter, but does not map the
1428            * collection parameter to an internal WP_Comment_Query parameter. Use the
1429            * `rest_comment_query` filter to set WP_Comment_Query parameters.
1430            *
1431            * @since 4.7.0
1432            *
1433            * @param $params JSON Schema-formatted collection parameters.
1434            */
1435           return apply_filters( 'rest_comment_collection_params', $query_params );
1436      }
1437
1438      /**
1439       * Sets the comment_status of a given comment object when creating or updating a comment.
1440       *
1441       * @since 4.7.0
1442       * @access protected
1443       *
1444       * @param string|int $new_status New comment status.