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]
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- 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
- Custom Post Type causes Page Not Found
- 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
- 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
- How do I remove the entire left nav bar in admin for certain level users?
- Change wording of admin menu item?
- 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?
- 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
- Add a custom form on the post-new.php admin page
- 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)
- 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”
- WordPress Admin Menu defining function is seperate file
- Create WordPress posts from JSON array using plugin in admin
- Plugin getting Cannot modify header information errors
- Simply poll & Events Calendar plugins clashing
- How to use the CSS of the WordPress core in the development of my administration page?
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- getting notifications about updates only in the “core” page
- Remove value from array within post meta ajax admin
- Add logo to admin menu in my plugin
- Equivalent of admin.php for public pages
- Plugin permissions for Editor role
- Error: Can´t access facebook comment plugin admin page
- How to add an admin alert for missing plugins
- How to hide plugin options for editors via functions.php
- Ajax request sends url rather than data
- Gathering all Custom Post Type posts in to array/object the proper way
- How to add captcha to publish widget
- Adding a jQuery modal dialog to the admin area
- Redirect plugin after form submit or show errors
- How to create a plugin page that shows XML?
- What is the most efficient way of adding additional functionaliy for admin only
- How to create admin setting for this small plugin
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Admin Custom Plugin List Files in admin Table
- Hide all Admin Notices and move on a separate page
- How To Remove “All, Publish, Draft and Expired” in Events Dashboard
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Echo custom admin field into a is_single()
- Add_Meta_box to custom page (formidable edit post)
- Get content and send to 3rd party
- Adding featured image to post display widget
- How to enable Admins to see Plugins
- Defined user role to access plugin’s pages
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Add a checkbox in plugin options page and make it actually work
- Embedding code snippets in posts with indentation
- Getting 404 page not found error while trying to access add new plugin / themes
- admin panel save option with ajax
- What would cause edit buttons for plugins to disappear?
- 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?
- Display Any Field fromAdmin Panel in Frontend via Shortcode?