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 |
---|---|
137 | // $desc = substr($desc, 0, 15) . '<span class="dots">...</span><span>' . substr($desc, -15) . '</span>'; |
138 |
|
139 | $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; |
140 | if ( !is_array($actions) ) { |
141 | $actions = array(); |
142 | $actions[] = '<a href="' . self_admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . |
143 | '&TB_iframe=true&tbWidth=500&tbHeight=385') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install “%s”'), $name)) . '">' . __('Install') . '</a>'; |
144 | if ( !is_network_admin() ) |
145 | $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview onclick previewlink" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>'; |
146 | $actions = apply_filters('theme_install_action_links', $actions, $theme); |
147 | } |
148 |
|
149 | $actions = implode ( ' | ', $actions ); |
150 | ?> |
151 | <a class='thickbox thickbox-preview screenshot' |
152 | href='<?php echo esc_url($preview_link); ?>' |
153 | title='<?php echo esc_attr(sprintf(__('Preview “%s”'), $name)); ?>'> |
154 | <img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' /> |
155 | </a> |