Changeset 52268
- Timestamp:
- 11/29/2021 11:41:50 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r52186 r52268 268 268 $request->set_param( 'context', 'edit' ); 269 269 270 $post = get_post( $template->wp_id ); 271 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ 272 do_action( "rest_after_insert_{$this->post_type}", $post, $request, false ); 273 270 274 $response = $this->prepare_item_for_response( $template, $request ); 271 275 … … 311 315 } 312 316 $id = $posts[0]->id; 317 $post = get_post( $post_id ); 313 318 $template = get_block_template( $id, $this->post_type ); 314 319 $fields_update = $this->update_additional_fields_for_object( $template, $request ); … … 316 321 return $fields_update; 317 322 } 323 324 /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */ 325 do_action( "rest_after_insert_{$this->post_type}", $post, $request, true ); 318 326 319 327 $response = $this->prepare_item_for_response( $template, $request );
Note: See TracChangeset
for help on using the changeset viewer.