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 |
---|---|
799 | border: 2px solid #cfcfcf; |
800 | } |
801 | #{$selector} .gallery-caption { |
802 | margin-left: 0; |
803 | } |
804 | /* see gallery_shortcode() in wp-includes/media.php */ |
805 | </style>"; |
806 | $size_class = sanitize_html_class( $size ); |
807 | $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>"; |
808 | $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div ); |
809 |
|
810 | $i = 0; |
811 | foreach ( $attachments as $id => $attachment ) { |
812 | if ( ! empty( $link ) && 'file' === $link ) |
813 | $image_output = wp_get_attachment_link( $id, $size, false, false ); |
814 | elseif ( ! empty( $link ) && 'none' === $link ) |
815 | $image_output = wp_get_attachment_image( $id, $size, false ); |
816 | else |
817 | $image_output = wp_get_attachment_link( $id, $size, true, false ); |