If you are a theme developer, then it becomes handy to keep a record of various pieces of code you are adding in your theme’s functions.php file. so that you can reuse them. In this post, I’m sharing a little piece of code that allows you to add additional options to your settings menu with a link to “all settings”. By adding this tiny piece of code, it shows you a complete list of all the settings you have within your database related to your WordPress site.
The best thing of this code is that, the link is available to admin only and it is hidden for all other users. Here is the code:
function all_settings_link() { add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php'); } add_action('admin_menu', 'all_settings_link');
Isn’t it a great way to track all settings of your database? Like this post, then share it will all your friends and do not forget to follow WebGuide4U on Twitter for more updates on Theme Development.
[via] StackExchange
Leave a Reply