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 |
---|---|
4932 | return $this->error; |
4933 |
|
4934 | do_action('xmlrpc_call', 'metaWeblog.newMediaObject'); |
4935 |
|
4936 | if ( !current_user_can('upload_files') ) { |
4937 | $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) ); |
4938 | return $this->error; |
4939 | } |
4940 |
|
4941 | if ( $upload_err = apply_filters( 'pre_upload_error', false ) ) |
4942 | return new IXR_Error(500, $upload_err); |
4943 |
|
4944 | if ( !empty($data['overwrite']) && ($data['overwrite'] == true) ) { |
4945 | // Get postmeta info on the object. |
4946 | $old_file = $wpdb->get_row(" |
4947 | SELECT ID |
4948 | FROM {$wpdb->posts} |
4949 | WHERE post_title = '{$name}' |
4950 | AND post_type = 'attachment' |