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 |
---|---|
546 | do_action('import_post_added', $post_id); |
547 | print "</li>\n"; |
548 | } |
549 |
|
550 | function process_post_meta($post_id, $key, $value) { |
551 | // the filter can return false to skip a particular metadata key |
552 | $_key = apply_filters('import_post_meta_key', $key); |
553 | if ( $_key ) { |
554 | add_post_meta( $post_id, $_key, $value ); |
555 | do_action('import_post_meta', $post_id, $_key, $value); |
556 | } |
557 | } |
558 |
|
559 | function process_attachment($postdata, $remote_url) { |
560 | if ($this->fetch_attachments and $remote_url) { |
561 | printf( __('Importing attachment <em>%s</em>... '), htmlspecialchars($remote_url) ); |
562 |
|
563 | // If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable |
564 | if ( preg_match('/^\/[\w\W]+$/', $remote_url) ) |