Created
September 22, 2019 21:08
-
-
Save Njengah/c311fd8ed0cdd2b889cdd5c9d964e45c to your computer and use it in GitHub Desktop.
Adding a Settings link to your plugin settings page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//adding settings link to wordpress plugin | |
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'njengah_admin_page_settings_link'); | |
function njengah_admin_page_settings_link( $links ) { | |
$links[] = '<a href="' . | |
admin_url( 'admin.php?page=njengah_admin_page' ) . // replace this with your admin page | |
'">' . __('Settings') . '</a>'; | |
return $links; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment