You can try to admin enqueue this script, with jquery dependency:
jQuery( function($) {
$('.edit-php a.submitdelete, .post-php a.submitdelete').click( function( event ) {
if( ! confirm( 'Are you sure you want to move the post to trash?' ) ) {
event.preventDefault();
}
});
});
where we restrict the conformation on the a.submitdelete
clicks to the .edit-php
and .post-php
body classes.
Hope you can adjust it to your needs, e.g. regarding i18n.
Related Posts:
- Ajax Load More Posts in Category Page
- Dynamically update post title in admin page
- How to get new post URL?
- Ajaxify This Code
- Call current post URL in ajax
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Using the loop to set locations for all posts on a single google map
- Many buttons not functioning in WordPress dashboard (as admin)
- Ajax post doesnt call succes after got the response
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- Changing the post date and time with function
- Get current post id in functions.php
- Dynamically add id to heading tags
- Change label of title field for posts in the backend
- Confirmation box when submitting post for review
- Exclude drafts in all() view of edit.php
- How to publish a post with empty title and empty content?
- List latest posts in WP-Admin
- How do I use element instead of tags in WordPress post content having webP support?
- Getting an alphabetic post list with two letters onclick on letter
- Get post from custom REST endpoint in Gutenberg
- Human Time Diff, change mins to minutes
- POST from jQuery to PHP
- How to Use JSON With AJAX?
- How to Display Post View Count
- Remove double space after a period
- Embed WordPress Admin in an iframe
- Can’t publish, edit or delete posts since Gutenberg update
- Add filter-by-tag in the all posts admin console page
- How do I allow users to follow a post and then allow admins to email all users who have followed that post?
- $post object is null
- Create a separate JS application for an individual post?
- The correct way to call posts with ajax
- Custom Theme Want To Remove One Category From All Displays
- How do I use Ajax to show the new posts realtime, on the frontpage
- How to change the page break URL from ../post/2 to …/post/page2/
- Convert a complex webpage into WP theme
- jquery won’t load in footer
- Add scripts on custom post add/edit pages Not Working
- Getting current post ID in functions.php
- Replace menu links with # and add name to its li
- Disable inline_edit() on edit.php
- Ajax Dynamic Archives not showing correct results
- Load post attached images on a single page site with fancybox
- Exclude category from
- Setting posts_per_page for taxonomy term template
- Change post order random through out the entire WordPress
- dynamic dependent select dropdown
- Ajax load more button for comments wordpress
- Can’t get buddypress notifications in front-end; why do I get this error?
- How do I display some posts fully on the homepage, and some as an excerpt only?
- Send post id through ajax and get the post content back
- Simultaneous admin updates causes custom fields to not update
- Change all author links in Blog roll
- Format latest/newest post differently
- is_page Funtion for Posts ?
- Using Foundation 5 in WordPress Administration Area
- How to only publish posts with image in it
- Using system date format
- Sort All Posts by Category Name in the Admin Panel?
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- Creating multiple category drop down
- saving/reading custom field value does not work – no value gets POSTed
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Call javascript functions from each page
- displaying the categories post
- Insert JavaScript in a blog post or a new page?
- Some blog posts containing source code fail to save draft or publish
- How to implement a WordPress comments function?
- How to add content above footer in posts from specific category
- Edit post & page option does not display on latest wordpress
- Custom Fields – How to get the list of a specific active widget each time it rendered
- shortcode // get posts by ids
- My page shows some other content in WP
- Find most used words in post titles
- $post->post_content empty while all other properties are correct
- Post count doesn’t match number of posts shown in list in admin
- How to view a post from the wordpress admin screen
- Update $wpdb query with AJAX
- How to show WP admin edit page within template page/post?
- WordPress load javascript file if something… (after the page is loaded)
- AJAX load more posts not using correct category and repeating the same few posts
- testing result of $.post with json_encode
- How to correctly escape data
- Printable Page with all Posts from Tag
- Automatic add space if user enters number(any digit)
- Admin is showing all posts on page 1
- I moved my site to another server, wp admin works so does the front page, but posts don’t work
- List direct children of page
- How do I get my nav menu to show sub pages?
- Error establishing a database connection
- Post thumbnail is not shown in wp-admin
- Admin panel: Javascript not loading properly. Cannot edit pages/posts [closed]
- Ajax calls in wordpress
- Add News Feed to bespoke website, only to one page on whole site
- How to hide a script ( an ad) from a specific post? [closed]
- WP Rest API feature image breaking react component
- Display posts with id equal to relationship value
- iOS and ajaxComplete
- How to sort posts alphabetically based on a specific parent category