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 |
---|---|
156 | * Filter the URL to redirect to when Press This saves. |
157 | * |
158 | * @since 4.2.0 |
159 | * |
160 | * @param string $url Redirect URL. If `$status` is 'publish', this will be the post permalink. |
161 | * Otherwise, the default is false resulting in no redirect. |
162 | * @param int $post_id Post ID. |
163 | * @param string $status Post status. |
164 | */ |
165 | $redirect = apply_filters( 'press_this_save_redirect', $redirect, $post_id, $post['post_status'] ); |
166 |
|
167 | if ( $redirect ) { |
168 | wp_send_json_success( array( 'redirect' => $redirect ) ); |
169 | } else { |
170 | wp_send_json_success( array( 'postSaved' => true ) ); |
171 | } |
172 | } |
173 | } |
174 |
|