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 |
---|---|
3051 |
|
3052 | do_action('xmlrpc_call', 'metaWeblog.newMediaObject'); |
3053 |
|
3054 | if ( !current_user_can('upload_files') ) { |
3055 | logIO('O', '(MW) User does not have upload_files capability'); |
3056 | $this->error = new IXR_Error(401, __('You are not allowed to upload files to this site.')); |
3057 | return $this->error; |
3058 | } |
3059 |
|
3060 | if ( $upload_err = apply_filters( 'pre_upload_error', false ) ) |
3061 | return new IXR_Error(500, $upload_err); |
3062 |
|
3063 | if ( !empty($data['overwrite']) && ($data['overwrite'] == true) ) { |
3064 | // Get postmeta info on the object. |
3065 | $old_file = $wpdb->get_row(" |
3066 | SELECT ID |
3067 | FROM {$wpdb->posts} |
3068 | WHERE post_title = '{$name}' |
3069 | AND post_type = 'attachment' |