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 |
|---|---|
| 5318 | * Filter whether to preempt the XML-RPC media upload. |
| 5319 | * |
| 5320 | * Passing a truthy value will effectively short-circuit the media upload, |
| 5321 | * returning that value as a 500 error instead. |
| 5322 | * |
| 5323 | * @since 2.1.0 |
| 5324 | * |
| 5325 | * @param bool $error Whether to pre-empt the media upload. Default false. |
| 5326 | */ |
| 5327 | if ( $upload_err = apply_filters( 'pre_upload_error', false ) ) { |
| 5328 | return new IXR_Error( 500, $upload_err ); |
| 5329 | } |
| 5330 | |
| 5331 | if ( !empty($data['overwrite']) && ($data['overwrite'] == true) ) { |
| 5332 | // Get postmeta info on the object. |
| 5333 | $old_file = $wpdb->get_row(" |
| 5334 | SELECT ID |
| 5335 | FROM {$wpdb->posts} |
| 5336 | WHERE post_title = '{$name}' |