There is number of dynamic hooks in admin-header.php that allows to precisely target on which pages to load your code.
And naturally current_user_can() check so it only runs for admins.
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- Disable plugin / plugin action via theme
- Shared functionality in plugins and themes
- Need to create a Theme demo site that features multiple themes
- Declare a function before plugin does on the theme functions.php file
- Custom plugin settings: clicking “save changes” does not display success message
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- What’s the point of using WordPress’s built in admin-ajax.php?
- Override the core function locate_template
- How to set CORS header?
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Making menu link open in new tab?
- Add get_option to jquery
- Globally register styles but enqueue them selectively
- Admin Theme customization
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- All sites themes functions.php have been changed
- How to create an option page for this simple plugin
- Redirect to another page using contact form 7? [closed]
- Display Custom Field Value on Admin Page Column
- Overwrite category head title
- Proper way to use plugin functions in functions.php
- Plugin getting Cannot modify header information errors
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Changing plugin options from theme functions file?
- Removing the custom_image_header from wp_head
- Creating an array from form inputs before it is posted to the options database
- Hide Plugin Custom Post Type Menu Link
- Securing langugae folder
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Echo custom admin field into a is_single()
- why my wordpress dont have toolbar like, plugin, themes and other?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to Call Function From Separate WordPress Install on Same Server?
- Add a checkbox in plugin options page and make it actually work
- pluggable function in theme, to be overridden by plugin
- Saving an array to get_options
- Can’t get custom user meta to show in header
- Secure way to add JS Script to WordPress filesystem
- Why nested REPLY not working in WP Comments?
- Hook specific functions if on a specific admin page
- Serialize data for wp options
- How to create TEMPORARY Download links in a wordpress POST?
- Conditionally add apt. Open Graph meta data to different pages on WordPress site
- PHP Fatal error: Call to undefined function plugin_basename
- Which plugin will let me decide what users have access to on their side bar in wp-admin?
- How can I add an options page for my class based plugin?
- How can I make uploaded images in the editor load with HTTPS?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- plugin development: problem with functions
- What would be the advantages/disadvantages of remote plugin installation?
- add_query_arg not working
- problems with wordpress and php version 5.3.3-1
- How can I display/hide certain content based on a Theme Option field?
- Not able to open category post [closed]
- Why slash is removed after domain?
- Shortcode button dosent work for all posts. Work for first post only
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- Is there a way I can find wordpress posts that don’t contain a word?
- Reusable functions and tools (Framework)
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- Do I still need a theme to use page builders?
- Prevent shortcode from being wrapped in tags
- How to prevent users to download videos from lms website?
- How to add a default value to get_option if it’s used as a variable?
- AJAX button run function
- Editing admin pages in WordPress [closed]
- Dropdown menu on custom page with product to choose number of products per page
- How to get current post user id
- Change wordpress current_time function to different timezone
- Only Homepage not loading properly
- Inserting HTML tag with ACF into shortcode
- Hook to plugins admin settings
- Uncode theme content block header ignoring saved changes/not updating?
- Two (or more) looks, with one set of content
- Using custom JS plugins with WordPress?
- Different UI in WordPress
- Theme and plugin install or update display error in localhost
- Executing my function once on a specific time
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Re-naming a theme/child theme whilst maintaining updates
- How to stop or remove an action being called inside a function of an extended class
- Missing Argument
- Can I make a super plugin that also has a theme?
- load_plugin_textdomain error
- Reduce Drop down Menu Width in WordPress
- How to override a plugin function wrapped in a class?
- WordPress get_option and update_option returned entered on the textbox field
- Bootstrap Drop Down menu is not working
- Layout Plugin Admin Pages: Use BootStrap? [closed]
- Remove Duplicator plugin from admin menu if not an administrator
- plugin style conflicts, how to override? [closed]
- How to Display a Plugin function (content) on frontpage using index.php
- Doubt using $wpbd->get_col for a single column
- Unable to upload wordpress plugins
- Get plugin option in another PHP file
- The problem with WordPress Importer
- Create mobile navigation header with settings integration