Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: plugin_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
263
264           if( 'active' == $context )
265                $action_links[] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&amp;plugin=' . $plugin_file, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '" class="delete">' . __('Deactivate') . '</a>';
266           else //Available or Recently deactivated
267                $action_links[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>';
268
269           if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
270                $action_links[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';
271
272           $action_links = apply_filters('plugin_action_links', $action_links, $plugin_file, $plugin_data, $context);
273
274           echo "
275      <tr class='$context'>
276           <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . attribute_escape($plugin_file) . "' /></th>
277           <td class='name'>{$plugin_data['Title']}</td>
278           <td class='vers'>{$plugin_data['Version']}</td>
279           <td class='desc'><p>{$plugin_data['Description']}</p></td>
280           <td class='togl action-links'>";  
281           if ( !empty($action_links) )