Changeset 1151550
- Timestamp:
- 05/02/2015 03:09:55 AM (11 years ago)
- Location:
- quiz/trunk
- Files:
-
- 2 edited
-
quiz.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
quiz/trunk/quiz.php
r1134170 r1151550 294 294 if( current_user_can('manage_options') ) { 295 295 $page = add_options_page( __( 'Comment Quiz', 'quiz' ), __( 'Quiz', 'quiz' ), 'manage_options', 'quiz', array( $this, 'settings_page' ) ); 296 add_filter( 'plugin_action_links ', array( $this, 'filter_plugin_actions' ), 10, 2);296 add_filter( 'plugin_action_links_'.plugin_basename( __FILE__ ), array( $this, 'filter_plugin_actions' ) ); 297 297 add_action( 'load-' . $page, array( $this, 'save_options' ) ); 298 298 return $page; … … 302 302 303 303 // Add action link(s) to plugins page 304 function filter_plugin_actions( $links, $file ){ 305 //Static so we don't call plugin_basename on every plugin row. 306 static $this_plugin; 307 if( ! $this_plugin ) $this_plugin = plugin_basename( __FILE__ ); 308 309 if( $file == $this_plugin ){ 310 $settings_link = '<a href="' . $this->options_url() . '">' . __( 'Settings' ) . '</a>'; 311 array_unshift( $links, $settings_link ); 312 } 304 function filter_plugin_actions( $links ){ 305 $settings_link = '<a href="' . $this->options_url() . '">' . __( 'Settings' ) . '</a>'; 306 array_unshift( $links, $settings_link ); 313 307 return $links; 314 308 } -
quiz/trunk/readme.txt
r1134179 r1151550 49 49 50 50 == Changelog == 51 52 = 1.3.2 = 53 * by SR 54 * Improved hook for Settings link on Plugins page 51 55 52 56 = 1.3.1 =
Note: See TracChangeset
for help on using the changeset viewer.