I had the same problem and solved it by replacing
if( !current_user_can( 'edit_post' ) ) return;
by:
if ( !current_user_can('edit_post', $post_id) ) return;
Related Posts:
- Get Post ID in Admin Edit screen otherwise generate it?
- Disable dragging of meta boxes?
- Taxonomy dropdown metabox in the back-end
- Color picker for posts and pages
- wp_nonce_url to users.php for deleting user not working
- lock meta box position on post edit screen for contributors
- special characters after saving draft interpreted as �
- meta box on new admin page
- Why do Metabox use Nonces?
- displaying an error before update_post_meta
- Dashboard : remove Safari navigator message
- Add a custom field when adding / editing a page / post in admin panel
- CSRF attack to create USER
- Changing the ‘wp-admin’ URL to whatever I want
- How to display a static HTML page while setting up a WordPress site?
- How can I uninstall a language?
- Best way to present options for home page in admin?
- Why won’t my metabox data save?
- How to make ajax call in wordpress in right way?
- Delete Post From front Page ( With Wp-admin restriction )
- Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
- Add mass action to wp-admin/users.php
- Only allow administrators and editors to access wp-admin
- Add button in TinyMCE editor to insert text
- Add column to pages table
- wp-admin – save options without refreshing?
- How to get the password and username of the add new user form (admin back end) in wordpress
- WordPress Error establishing a database connection For Admin login only
- How do you modify CSS files via admin panel?
- Image editing: “Edit Original” and “Replace” buttons missing on old posts
- WooCommerce – filter by featured products in admin
- How to prevent parent admin page from appearring as a child admin page
- Replace wordpress login logo with custom text
- How to clone wp-admin and make a new dashboard controlled by your code?
- What is an “Options Framework” for WordPress
- How WordPress autosave can save plugin fields?
- show/hide toggle for subpages in wordpress admin area
- After login get “403 Forbidden”
- How to display a Ninja Form on the WordPress admin pages
- Support auto-save and revisions for custom fields
- Why are my frontend theme styles bleeding into the backend?
- Show Welcome Panel on Dashboard for every user
- Is it possible to add an item the Post Publish panel?
- Uncheck the box “Send User Notification” by default on new-user.php
- WordPress Options Page not working
- Admin account locked out/redirect loop. Other accounts work?
- Add count for new registered user in Users tab
- How To Differentiate Drafted product and Publish Product through Color?
- WP admin page gives 404
- No access local wordpress website after PC formating
- How to prevent the editor from redirecting to website within iframe?
- is_admin() not working when updating a post in the admin panel
- Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)
- How to inform the user that the save was not successful?
- An update has caused my client’s site to be non-existent after new update of WordPress [closed]
- wp-admin throwing 500 errors after update to 4.2.1
- White screen of death for wp-admin and error for wp-login.php after entering credentials
- Bypass nonce value while trashing a post
- How do you force the wordpress dashboard to be 1 coulmn by default?
- Separate tags with semicolon
- Migrated wordpress site give “Undefined variable: php” warnings
- How to verify nonces in bulk?
- I am unable to login into my wp-admin
- Is it possible to take over a WordPress site if the old administrator is MIA?
- How can I prevent redirects from mysite/page to mysite/wp path/page?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- Usage of call back function of add_meta_box()
- How can I prevent a function from loading in the admin screens?
- Redirect an entire WordPress site on a subdomain, except wp-admin
- WP Core hard coded to use http://www.w3.org/1999/xhtml not HTTPS
- 404 Admin Error
- Fix Admin Dashboard Posts tab
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- View all comments on post one click
- wordpress wp-admin/includes/shema.php file has been modify alone
- Broken Customizer page
- I can’t access my wp admin dashboard
- Weird white space in admin area
- How to logout the current user without notices and warnings?
- Updated to wordpress 5.5.1 doesn’t work
- How can I change block editors suggested links to display another url (i.e. from api.mysite to www.mysite)
- How to change labels in the projects page
- Can’t access Network Admin dashboard in wp-admin
- Remove View details option from plugin listing
- wp-admin won’t load for users behind a Barracuda F600 firewall
- WordPress wp-admin login problem
- Failed to load resource: the server responded with a status of 431 ()
- Database problem
- Disabling WP-Admin Caching in htaccess
- Can I rename the wp-admin folder?
- SSL doesn’t deliver parts of WordPress Administration Module
- WordPress admin option, I can’t use jquery ajax to access my content from another file
- Why WordPress not logout after I have close my browser?
- Save data of select list after clicking save
- Images on admin backend not showing up
- How to troubleshoot 404s in WordPress admin
- Launch wordpress site to local computer from live website backed-up
- wp-admin won’t “remember me” in Chrome & Firefox
- My website does not load since two days!
- how to Hide all products except the General Manager role in the WordPress admin panel?