WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
136 | /** |
137 | * Filters the post data of a Press This post before saving/updating. |
138 | * |
139 | * The {@see 'side_load_images'} action has already run at this point. |
140 | * |
141 | * @since 4.5.0 |
142 | * |
143 | * @param array $post_data The post data. |
144 | */ |
145 | $post_data = apply_filters( 'press_this_save_post', $post_data ); |
146 |
|
147 | $updated = wp_update_post( $post_data, true ); |
148 |
|
149 | if ( is_wp_error( $updated ) ) { |
150 | wp_send_json_error( array( 'errorMessage' => $updated->get_error_message() ) ); |
151 | } else { |
152 | if ( isset( $post_data['post_format'] ) ) { |
153 | if ( current_theme_supports( 'post-formats', $post_data['post_format'] ) ) { |
154 | set_post_format( $post_id, $post_data['post_format'] ); |