Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: theme_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
147      $tags = $themes[$theme_name]['Tags'];
148      $thickbox_class = 'thickbox thickbox-preview';
149      $activate_link = wp_nonce_url( "themes.php?action=activate&template=".urlencode( $template )."&stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template );
150      $activate_text = esc_attr( sprintf( __( 'Activate “%s”' ), $title ) );
151      $actions = array();
152      $actions[] = '<a href="' . $activate_link .  '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';
153      $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $theme_name ) ) . '">' . __( 'Preview' ) . '</a>';
154      if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
155           $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&amp;template=$stylesheet", 'delete-theme_' . $stylesheet ) . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete." ), $theme_name ) ) . "' );" . '">' . __( 'Delete' ) . '</a>';
156      $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
157
158      $actions = implode ( ' | ', $actions );
159 ?>
160           <a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">
161 <?php if ( $screenshot ) : ?>
162                <img src="<?php echo $theme_root_uri . '/' . $stylesheet . '/' . $screenshot; ?>" alt="" />
163 <?php endif; ?>
164           </a>
165 <h3><?php