add_action( 'admin_init', 'do_something_152677' );
function do_something_152677 () {
// Global object containing current admin page
global $pagenow;
// If current page is post.php and post isset than query for its post type
// if the post type is 'event' do something
if ( 'post.php' === $pagenow && isset($_GET['post']) && 'post' === get_post_type( $_GET['post'] ) )
// Do something
}
}
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- How to check if user is in back end?
- Create tabs inside Plugins Admin Page [closed]
- Changing the “Plugin Activated” Message Default
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- What are the best practices for updating?
- How to set back-end language per user?
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Is There a WordPress Hook to Filter the Edit Posts View?
- Changing wp login url without .htaccess
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Admin plugin, how can I output a different content-type?
- Plugin or mod for wordpress to make content publication SUPER easy
- How can I log a user out of WordPress before the page loads?
- How do I only load a plugin js on it’s settings pages?
- How to enable Admins to see Plugins
- How to add a help tab to all admin pages – including plugin pages
- Custom plugin settings: clicking “save changes” does not display success message
- Creating button next to “add media” that allows you to choose a single post
- Bad Request (Invalid Hostname) on working server, database problem
- How to develop a community feature in the dashboard for multiauthor site
- Twillio How To Send SMS for Custom Post Type
- Trying to add admin file upload form plugin
- WordPress Plugin Look & Feel
- Custom Post Type causes Page Not Found
- Is there an action that is called when a post is restored from the trash?
- What’s the point of using WordPress’s built in admin-ajax.php?
- How can I get a list of plugins and which blogs are using them?
- Filter or action hook to insert content on admin pages before tag
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- why in my wordpress admin panel the membership option is not showing
- How to set CORS header?
- How to edit/delete single row items in a table on my own menu page
- Admin Dashboard with Custom Tab for Client
- Moving WordPress from host without FTP?
- How do I remove the entire left nav bar in admin for certain level users?
- Making menu link open in new tab?
- Change wording of admin menu item?
- How to handle admin and passwords requests from plugins developers?
- wordpress reusable content blocks
- Cannot access wp-admin after disabling all plugin
- Undefined property: WP_Post_Type::$ID
- Set of plugins to control the Admin UI
- How to send little data between admin pages of my plugin?
- Which plugin will let me decide what users have access to on their side bar in wp-admin?
- How can I make uploaded images in the editor load with HTTPS?
- What would be the advantages/disadvantages of remote plugin installation?
- Editing admin pages in WordPress [closed]
- Hook to plugins admin settings
- Layout Plugin Admin Pages: Use BootStrap? [closed]
- Remove Duplicator plugin from admin menu if not an administrator
- Doubt using $wpbd->get_col for a single column
- See which user installed a plugin?
- Edit default comments page in WP Admin
- Add a custom form on the post-new.php admin page
- All Users > User List > Update User Meta Field Inline
- Globally register styles but enqueue them selectively
- Admin Panel pagination link styles
- Is this the right way to execute some PHP in my plugin after a button click on an options page?
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Display update notification messages like ‘What’s New’
- Adding sections in the ‘Pages’ post type
- Admin accounts unable to see plugins from external IP
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Plugin dependencies: show notice like theme plugins dependencies
- WordPress wp-admin/network/plugin-install
- how to access all user dashboard on fronted page [closed]
- How to set add question capability for author role in wp pro quiz plugin
- do_action() hook into load-(page)
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Sync User to cPanel webmail?
- Adding CSS to custom post type admin page causes error
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- What’s causing this error? “Warning: Invalid argument”
- Move plugin-settings to ‘Settings’-menu in the admin
- WordPress Admin Menu defining function is seperate file
- How do I add some javascript validation to the admin interface form’s onsubmit?
- remove all submenus from plugin
- Create WordPress posts from JSON array using plugin in admin
- admin panel save option with ajax
- Custom Form only for admin
- how to call jQuery in admin as well as in homepage
- What would cause edit buttons for plugins to disappear?
- WordPress plugins not showing after switching servers
- Adding hero images to blog posts
- How to create plugin list groups?
- Frontpage Admin Bar Disappeared
- What is the recommended way to be notified of security updates to my plugins? [closed]
- Why plugin’s icon for the menu not found?
- Need help with restricted page for users
- Allow direct access to files/folders within WordPress to replace wp-admin
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- What plugin presents these extra columns in wp-admin -> plugins
- How can I hide Dashboard notifications for just one particular plugin?
- Remove 3rd party plugin notices from within own plugin
- How is wp_admin_notice supposed to work?