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 |
---|---|
213 | $tags = $themes[$theme_name]['Tags']; |
214 | $thickbox_class = 'thickbox thickbox-preview'; |
215 | $activate_link = wp_nonce_url("themes.php?action=activate&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template); |
216 | $activate_text = esc_attr( sprintf( __('Activate “%s”'), $title ) ); |
217 | $actions = array(); |
218 | $actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __('Activate') . '</a>'; |
219 | $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $theme_name)) . '">' . __('Preview') . '</a>'; |
220 | if ( current_user_can('update_themes') ) |
221 | $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet) . '" onclick="' . "if ( confirm('" . esc_js(sprintf( __("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $theme_name )) . "') ) {return true;}return false;" . '">' . __('Delete') . '</a>'; |
222 | $actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]); |
223 |
|
224 | $actions = implode ( ' | ', $actions ); |
225 | ?> |
226 | <a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot"> |
227 | <?php if ( $screenshot ) : ?> |
228 | <img src="<?php echo $theme_root_uri . '/' . $stylesheet . '/' . $screenshot; ?>" alt="" /> |
229 | <?php endif; ?> |
230 | </a> |
231 | <h3><?php |