Changeset 514852
- Timestamp:
- 03/05/2012 06:38:20 PM (14 years ago)
- File:
-
- 1 edited
-
database-peek/trunk/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
database-peek/trunk/settings.php
r513959 r514852 10 10 add_options_page('Database Peek', 'Database Peek', 'manage_options', 'ab-database-peek', 11 11 array($this,'settings_page')); 12 13 add_filter('plugin_action_links', array($this, 'add_settings_link'), 10, 2 ); 12 14 } 13 15 16 function add_settings_link($links, $file) { 17 static $this_plugin; 18 if (!$this_plugin) $this_plugin = plugin_basename(__FILE__); 19 20 $pos = strpos($file, '/'); 21 if (substr($file, 0, $pos) == substr($this_plugin, 0, $pos)) { 22 $settings = __("Settings"); 23 $url = admin_url('options-general.php?page=ab-database-peek'); 24 $settings_link = "<a href=\"$url\">$settings</a>"; 25 array_unshift($links, $settings_link); 26 } 27 28 return $links; 29 } 14 30 15 31 function register_mysettings() { // whitelist options
Note: See TracChangeset
for help on using the changeset viewer.