Plugin Directory

Changeset 784463


Ignore:
Timestamp:
10/08/2013 10:57:10 AM (12 years ago)
Author:
ErtyGi
Message:

add new link configure plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • easy-split-test-tab/trunk/easy-split-test-tab.php

    r783982 r784463  
    7070            // Load example settings page
    7171        add_action('admin_menu', array($this,'admin_menu') );   
     72        add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_plugin_action_links' ) );
    7273        }
    7374       
     
    117118        }
    118119   
    119    
     120    /**
     121     * Return the plugin action links.  This will only be called if the plugin
     122     * is active.
     123     *
     124     * @since 0.1
     125     * @param array $actions associative array of action names to anchor tags
     126     * @return array associative array of plugin action links
     127     */
     128    public function add_plugin_action_links( $actions ) {
     129
     130        $custom_actions = array(
     131            'configure' => sprintf( '<a href="%s">%s</a>', admin_url( 'admin.php?page=easy-split-test-tab-setting-admin' ), __( 'Configure', EASY_SPLITTEST_TAB_DOMAIN ) ),
     132            'faq'       => sprintf( '<a href="%s">%s</a>', 'http://wordpress.org/plugins/faq/', __( 'FAQ', EASY_SPLITTEST_TAB_DOMAIN ) ),
     133            'support'   => sprintf( '<a href="%s">%s</a>', 'http://wordpress.org/support/plugin/', __( 'Support', EASY_SPLITTEST_TAB_DOMAIN ) ),
     134        );
     135
     136        // add the links to the front of the actions list
     137        return array_merge( $custom_actions, $actions );
     138    }
    120139       
    121140    /*
Note: See TracChangeset for help on using the changeset viewer.