Add Settings Link for WordPress Plugin.

As a WordPress user when you install a plugin then first you look for the plugin settings cause sometimes its really difficult to find the plugins settings.

So while you develop a plugin you must add settings link for your plugin so it will be really helpful for non-techie WordPress users. Check the simple snippet will add this link for your plugin. Just add this code snippet into your plugin and add your plugin settings link.

add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'code_with_mehedi_add_plugin_settings_link');
function code_with_mehedi_add_plugin_settings_link( $settingLink ) {
    $settingLink[] = '<a href="' .admin_url( 'admin.php?page=settings_demo' ) .'">' . __('Settings') . '</a>';
    return $settingLink;
}
Mehedi Hasan
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
shares
0
Would love your thoughts, please comment.x
()
x