This little piece of code does something pretty cool. It will add an additional option to your settings menu with a link to “all settings” which will show you a complete list of all the settings you have within your database related to your WordPress site.
The code below will only made this link visible to an administrator user and hide it for all other users.
1 2 3 4 5 6 7 8 | /** * CUSTOM ADMIN MENU LINK FOR ALL SETTINGS. */ function all_settings_link() { add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php'); } add_action('admin_menu', 'all_settings_link'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.