Plugin Directory

Changeset 1490862


Ignore:
Timestamp:
09/06/2016 09:47:48 AM (9 years ago)
Author:
havengr
Message:

Menu settings addition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • language-icons-flags-switcher/trunk/functionsfile.php

    r1490379 r1490862  
    128128    function safely_add_stylesheet() {
    129129
    130         wp_enqueue_style( 'prefix-style', plugins_url('style.css', __FILE__) ); } ?>
     130        wp_enqueue_style( 'prefix-style', plugins_url('style.css', __FILE__) ); }
     131
     132
     133// Add settings link on plugin page
     134function your_plugin_settings_link_fl($links) {
     135  $settings_link = '<a href="options-general.php?page=my_plugin_menu_flags">Settings</a>';
     136  array_unshift($links, $settings_link);
     137  return $links;
     138}
     139 
     140$plugin = plugin_basename(__FILE__);
     141add_filter("plugin_action_links_$plugin", 'your_plugin_settings_link_fl' );
     142
     143
     144        ?>
Note: See TracChangeset for help on using the changeset viewer.