Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here I want to have upon activation of my wordpress plugins activation

Before Activation

Activate | Edit | Delete

After Activation

Settings | Edit | Delete

How can this be done in code to add this Menu

share|improve this question
1  
Those are called action links. –  scribu Aug 5 '11 at 2:24

1 Answer 1

Code extracted from my plugin, adapt as necessary.

add_filter( 'plugin_action_links', 'wpse_25030_settings_plugin_link', 10, 2 );

function wpse_25030_settings_plugin_link( $links, $file ) 
{
    if ( $file == plugin_basename(dirname(__FILE__) . '/many-tips-together.php') ) 
    {
        /*
         * Insert the link at the beginning
         */
        $in = '<a href="options-general.php?page=many-tips-together">' . __('Settings','mtt') . '</a>';
        array_unshift($links, $in);

        /*
         * Insert at the end
         */
        // $links[] = '<a href="options-general.php?page=many-tips-together">'.__('Settings','mtt').'</a>';
    }
    return $links;
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.