wphooks.info - press_this_save_post

press_this_save_post

(trunk - 4.9-alpha-41548)

The hook occurs in the following file:

wp-admin/includes/class-wp-press-this.php:
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
		/**
		 * Filters the post data of a Press This post before saving/updating.
		 *
		 * The {@see 'side_load_images'} action has already run at this point.
		 *
		 * @since 4.5.0
		 *
		 * @param array $post_data The post data.
		 */
		$post_data = apply_filters( 'press_this_save_post', $post_data );

		$updated = wp_update_post( $post_data, true );

		if ( is_wp_error( $updated ) ) {
			wp_send_json_error( array( 'errorMessage' => $updated->get_error_message() ) );
		} else {
			if ( isset( $post_data['post_format'] ) ) {
				if ( current_theme_supports( 'post-formats', $post_data['post_format'] ) ) {
					set_post_format( $post_id, $post_data['post_format'] );