Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: theme_install_action_links

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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&amp;width=600&amp;height=400';
301      if ( !is_array($actions) ) {
302           $actions = array();
303           $actions[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&amp;theme=' . $theme->slug .
304                                                   '&amp;TB_iframe=true&amp;tbWidth=500&amp;tbHeight=350') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install &#8220;%s&#8221;'), $name)) . '">' . __('Install') . '</a>';
305           $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview onclick previewlink" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $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 &#8220;%s&#8221;'), $name)); ?>'>
314 <img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' />
315 </a>