Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: plugin_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
204                                    $action_links[] = '<a href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $status['version'] ) ) . '">' . sprintf( __( 'Update Now' ), $status['version'] ) . '</a>';
205                               break;
206                          case 'latest_installed':
207                          case 'newer_installed':
208                               $action_links[] = '<span title="' . esc_attr__( 'This plugin is already installed and is up to date' ) . ' ">' . __( 'Installed' ) . '</span>';
209                               break;
210                     }
211                }
212
213                $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
214           ?>
215           <tr>
216                <td class="name column-name"<?php echo $style['name']; ?>><strong><?php echo $title; ?></strong>
217                     <div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div>
218                </td>
219                <td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
220                <td class="vers column-rating"<?php echo $style['rating']; ?>>
221                     <div class="star-holder" title="<?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?>">
222                          <div class="star star-rating" style="width: <?php echo esc_attr( $plugin['rating'] ) ?>px"></div>