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 |
---|---|
372 | <?php |
373 | } |
374 |
|
375 | /** |
376 | * {@internal Missing Short Description}} |
377 | * |
378 | * @since 2.5.0 |
379 | */ |
380 | function media_buttons($editor_id = 'content') { |
381 | $context = apply_filters('media_buttons_context', __('Upload/Insert %s')); |
382 |
|
383 | $img = '<img src="' . esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) . '" width="15" height="15" />'; |
384 |
|
385 | echo '<a href="' . esc_url( get_upload_iframe_src() ) . '" class="thickbox add_media" id="' . esc_attr( $editor_id ) . '-add_media" title="' . esc_attr__( 'Add Media' ) . '" onclick="return false;">' . sprintf( $context, $img ) . '</a>'; |
386 | } |
387 | add_action( 'media_buttons', 'media_buttons' ); |
388 |
|
389 | function _media_button($title, $icon, $type, $id) { |
390 | return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='{$id}-add_{$type}' class='thickbox add_$type' title='" . esc_attr( $title ) . "'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>"; |