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 |
---|---|
297 | //if ( strlen($desc) > 30 ) |
298 | // $desc = substr($desc, 0, 15) . '<span class="dots">...</span><span>' . substr($desc, -15) . '</span>'; |
299 |
|
300 | $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; |
301 | if ( !is_array($actions) ) { |
302 | $actions = array(); |
303 | $actions[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . |
304 | '&TB_iframe=true&tbWidth=500&tbHeight=350') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install “%s”'), $name)) . '">' . __('Install') . '</a>'; |
305 | $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview onclick previewlink" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>'; |
306 | $actions = apply_filters('theme_install_action_links', $actions, $theme); |
307 | } |
308 |
|
309 | $actions = implode ( ' | ', $actions ); |
310 | ?> |
311 | <a class='thickbox thickbox-preview screenshot' |
312 | href='<?php echo esc_url($preview_link); ?>' |
313 | title='<?php echo esc_attr(sprintf(__('Preview “%s”'), $name)); ?>'> |
314 | <img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' /> |
315 | </a> |