Plugin Directory

Changeset 516415 for wpide


Ignore:
Timestamp:
03/08/2012 07:33:40 PM (13 years ago)
Author:
WPsites
Message:

Small tweak to 1.0.5 to make V2 Dev install easier

Location:
wpide
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpide/tags/1.0.5/WPide.php

    r516364r516415 
    2929
    3030    }
    31 
    32 
     31   
    3332    public static function add_admin_head()
    3433    {
    โ€ฆโ€ฆ 
    144143    add_action( 'init', create_function( '', 'new WPide();' ) );
    145144}
     145
     146       
     147    add_filter("plugin_row_meta", 'wpide_dev_links', 10, 2);
     148
     149    function wpide_dev_links($links, $file) {
     150        static $this_plugin;
     151     
     152        if (!$this_plugin) {
     153        $this_plugin = plugin_basename(__FILE__);
     154        }
     155     
     156        // check to make sure we are on the correct plugin
     157       if ($file === $this_plugin) {
     158        // the anchor tag and href to the URL we want. For a "Settings" link, this needs to be the url of your settings page
     159        $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/plugins.php?page=install-required-plugins" style="font-weight:bold;">Download and install V2 Development version</a>';
     160        // add the link to the list
     161        array_push($links, $settings_link);
     162       }
     163        return $links;
     164    }
    146165
    147166
  • wpide/trunk/WPide.php

    r516364r516415 
    2929
    3030    }
    31 
    32 
     31   
    3332    public static function add_admin_head()
    3433    {
    โ€ฆโ€ฆ 
    144143    add_action( 'init', create_function( '', 'new WPide();' ) );
    145144}
     145
     146       
     147    add_filter("plugin_row_meta", 'wpide_dev_links', 10, 2);
     148
     149    function wpide_dev_links($links, $file) {
     150        static $this_plugin;
     151     
     152        if (!$this_plugin) {
     153        $this_plugin = plugin_basename(__FILE__);
     154        }
     155     
     156        // check to make sure we are on the correct plugin
     157       if ($file === $this_plugin) {
     158        // the anchor tag and href to the URL we want. For a "Settings" link, this needs to be the url of your settings page
     159        $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/plugins.php?page=install-required-plugins" style="font-weight:bold;">Download and install V2 Development version</a>';
     160        // add the link to the list
     161        array_push($links, $settings_link);
     162       }
     163        return $links;
     164    }
    146165
    147166
Note: See TracChangeset for help on using the changeset viewer.