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
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&amp;width=600&amp;height=400';
140      if ( !is_array($actions) ) {
141           $actions = array();
142           $actions[] = '<a href="' . self_admin_url('theme-install.php?tab=theme-information&amp;theme=' . $theme->slug .
143                                                   '&amp;TB_iframe=true&amp;tbWidth=500&amp;tbHeight=385') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install &#8220;%s&#8221;'), $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 &#8220;%s&#8221;'), $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 &#8220;%s&#8221;'), $name)); ?>'>
154 <img src='<?php echo esc_url($theme->screenshot_url); ?>' width='150' />
155 </a>