BP_REST_Reply_Actions_Endpoint::action_items( WP_REST_Request $request )
Actions on Reply.
Description
Parameters
- $request
-
(Required) Full details about the request.
Return
(WP_REST_Response) | WP_Error
Source
File: bp-forums/classes/class-bp-rest-reply-actions-endpoint.php
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | public function action_items( $request ) { $action = $request ->get_param( 'action' ); $value = $request ->get_param( 'value' ); $reply_id = $request ->get_param( 'id' ); $retval = '' ; switch ( $action ) { case 'spam' : $retval = $this ->rest_update_reply_spam( $reply_id , $value ); break ; case 'trash' : $retval = $this ->rest_update_reply_trash( $reply_id , $value ); break ; } if ( is_wp_error( $retval ) ) { return $retval ; } return $this ->get_item( array ( 'id' => $reply_id , 'context' => 'view' , ) ); } |
Changelog
Version | Description |
---|---|
0.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.