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
1680            *
1681            * This filter registers the collection parameter, but does not map the
1682            * collection parameter to an internal WP_Comment_Query parameter. Use the
1683            * `rest_comment_query` filter to set WP_Comment_Query parameters.
1684            *
1685            * @since 4.7.0
1686            *
1687            * @param array $query_params JSON Schema-formatted collection parameters.
1688            */
1689           return apply_filters( 'rest_comment_collection_params', $query_params );
1690      }
1691
1692      /**
1693       * Sets the comment_status of a given comment object when creating or updating a comment.
1694       *
1695       * @since 4.7.0
1696       *
1697       * @param string|int $new_status New comment status.
1698       * @param int        $comment_id Comment ID.