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
1440            *
1441            * This filter registers the collection parameter, but does not map the
1442            * collection parameter to an internal WP_Comment_Query parameter. Use the
1443            * `rest_comment_query` filter to set WP_Comment_Query parameters.
1444            *
1445            * @since 4.7.0
1446            *
1447            * @param array $query_params JSON Schema-formatted collection parameters.
1448            */
1449           return apply_filters( 'rest_comment_collection_params', $query_params );
1450      }
1451
1452      /**
1453       * Sets the comment_status of a given comment object when creating or updating a comment.
1454       *
1455       * @since 4.7.0
1456       *
1457       * @param string|int $new_status New comment status.
1458       * @param int        $comment_id Comment ID.