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 |
---|---|
190 | * Filters the URL to redirect to when Press This saves. |
191 | * |
192 | * @since 4.2.0 |
193 | * |
194 | * @param string $url Redirect URL. If `$status` is 'publish', this will be the post permalink. |
195 | * Otherwise, the default is false resulting in no redirect. |
196 | * @param int $post_id Post ID. |
197 | * @param string $status Post status. |
198 | */ |
199 | $redirect = apply_filters( 'press_this_save_redirect', $redirect, $post_id, $post_data['post_status'] ); |
200 |
|
201 | if ( $redirect ) { |
202 | wp_send_json_success( array( 'redirect' => $redirect, 'force' => $forceRedirect ) ); |
203 | } else { |
204 | wp_send_json_success( array( 'postSaved' => true ) ); |
205 | } |
206 | } |
207 | } |
208 |
|