Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$prefix}plugin_action_links_{$plugin_file}

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
357                     } // end if $is_active
358                 } // end if $screen->in_admin( 'network' )
359
360                if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
361                     $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . esc_attr__('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';
362           } // end if $context
363
364           $prefix = $screen->in_admin( 'network' ) ? 'network_admin_' : '';
365           $actions = apply_filters( $prefix . 'plugin_action_links', array_filter( $actions ), $plugin_file, $plugin_data, $context );
366           $actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context );
367
368           $class = $is_active ? 'active' : 'inactive';
369           $checkbox_id =  "checkbox_" . md5($plugin_data['Name']);
370           if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
371                $checkbox = '';
372           } else {
373                $checkbox = "<label class='screen-reader-text' for='" . $checkbox_id . "' >" . sprintf( __( 'Select %s' ), $plugin_data['Name'] ) . "</label>"
374                     . "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' />";
375           }