I figured it out by looking in WP Core. When you update a post it actually takes you back to the edit posts screen (post.php) with a GET parameter of message=1
. And then it erases that parameter from the url with javascript quickly. So you can find out if posts were uploaded in a plugin by checking:
if ($_GET['message'] == 1) {
// do something because the post was just updated
}
Related Posts:
- How to pass parameters to admin_notices?
- Use latest jQuery in WordPress (admin interface)
- How to add a link to the tax term in the admin Edit page?
- Admin Notices coding standard issue
- remove_action with profile_personal_options
- How to notify the admin about something that happened during a cron job
- Admin: global $post empty
- Is there a way to hook into the update-core page for custom messages?
- How do I add an admin notice within javascript in the admin interface for posts?
- How to display a WordPress notice on create_term action
- Display popup or admin-notice after add new categories
- How to pass multiple parameter in add_action()
- Getting admin notices to appear after page refresh
- Hide post title input for all roles except admin
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- Hide admin notice when user profile updated
- Other than save_post any other actions on add / edit post screen?
- Is it possible to push admin notices to one specific user instead of all users?
- Show only content in page after action click in WordPress admin
- Form submit in admin does not set is_admin() true
- ‘Conflict’ with action deleted_post and is_admin()
- Unable to render Admin Notices
- Unsure how to add simple checkboxes that write to a small table to admin
- Display notice in block editor after wp_insert_post_data hook
- Hide other users’ posts in admin panel
- Editor Styles and Typekit
- WordPress admin stylesheet
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- Can an admin check passwords of registered users?
- Prevent author from changing their posts if admin has modified
- Showing WP_Error message with admin_notice action hook
- Taxonomy/category hierarchy lost when editing posts [closed]
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Customize the upload screen
- How to print the output of the get_num_queries function from frontend to backend?
- Javascript not working in admin
- Setting Login with User Name and Password default option for Jetpack Admin Login
- Actions that Run on Admin Edit Page Load After Posts Are Queried
- Is there an action that is called when a post is restored from the trash?
- Adminstering Large Number of WordPress Sites
- How to remove “publish metabox” from each post type
- Add html to cpt main page / admin edit.php
- Admin doesn’t have sufficient permissions to plugin’s page
- How to restrict the editors from viewing/editing pages created by admin?
- How do I add a contact form?
- Unable to login, old site with previous developer gone
- How to default display name to first name and last and disable the profile field
- Adding html format on tinymce visual editor
- How can I show the contents of only a few users
- WordPress ACL (folder + permissions)
- Editors change a permalink on an unpublished post, but only admins change a permalink on a post that has ever been published?
- How-to turn off mobile admin mode?
- Show error message after exception handled
- How can I make the user names of commentors clickable links to the user’s profile from the admin comment screen?
- Grabbing the first image attached to a post and use it with the admin columns
- Keep Logged in Users out of Admin Panel
- Add Custom Script in Other Plugin’s Options page
- Is there a wp-config.php option or constant that I can set to allow me to download nightly / beta builds?
- Output the admin menu_position for each item
- Admin login not working
- WordPress custom admin functions security
- Adding and removing columns from the admin pages panel
- paginate_links on custom query in admin – ‘sufficient permissions’ error
- Live reload preview just reloads forever
- I need help using pre_get_comments to limit comments in the comments admin screen
- WordPress Screen options does not show any fields
- Locked out of WordPress website from wrong amount of login attempts
- current_user_can(‘administrator’) not working in custom login
- Echo string in admin panel footer beside version no
- Black admin bar is being hidden by page elements
- admin edit link from a specific page
- Set Link Target Checkbox chcked on Edit Image MOdal Window in Admin Post Edit Screen?
- Username was changed to “admin”
- [Multisite]How can I update custom blog option?
- Top toolbar is not showing in wordpress admin panel
- Problem with implenting Uploadify with WordPress
- Authorize subdomain to access and read user and admin cookies
- Can’t see past events on admin dashboard
- WordPress Admin Page
- require/include php file in add_menu()
- How can I restrict ‘edit_form_after_’ to a specific post/page?
- Can you check if https is enabled on frontend from admin
- Can’t access dashboard after 4.8.1 automatic upgrade
- exclude ID on avatar
- Missing content on website. Admins cant sign in
- Is Post-Form Resubmission somehow prevented in WordPress 4.2.2?
- WordPress login not working
- Enqueue script throws error in console
- How to sort post_meta in edit.php?
- Scripts are not called until I login from wordpress backend
- Link to all posts page?
- WP Logs me out after updating anything on dashboard
- Adding additional text fields and image upload to a Page?
- Calculate and save an average in a meta
- If the only thing I use MySQL for is WordPress, do I need MySQL’s timezone tables?
- plugin to upload to youtube via wordpress [closed]
- My Account Lost Administrator permission
- WordPress admin panel is blank
- deploying a standard build of wordpress in WHM/cPanel