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
- Invalid post type when click “Filter” or “Apply” button in WordPress admin Post list [closed]
- How can I list random authors from current post category?
- Disable single post page
- How to change the title url on the edit post screen?
- Change Order of Admin Posts Depending on Meta
- jquery won’t load in footer
- Enabling post thumbnails for custom post type
- Run a function when post is deleted?
- Checking is user author of number of posts?
- How to speed up admin-ajax.php in wordpress
- JQuery not working on WordPress Admin page [closed]
- Add scripts on custom post add/edit pages Not Working
- How to create a load more post entries like Twitter?
- Create cron job without a plugin?
- Disable Jquery UI post tabs
- Injecting JavaScript into a Post with WP3.x
- WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false
- How can I get a post field value using javascript?
- Diplay comment date on WP_Post_Comments_List_Table
- Getting current post ID in functions.php
- Change default Posts page
- How to rename “Publish” metabox title in post screen
- Can’t load a class into WordPress post editor’s content field
- jQuery UI inside widget on admin page
- jQuery inluclude still seems ncessary for script to work within post
- Action hook for new pending posts?
- Replace menu links with # and add name to its li
- Uppercase first sentence in every post
- Add icon/badge next to posttitle of specific category
- Ajax posts filter by date, comments, top views, top likes
- Prepend or add an Image to the content of a Post
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Why content_arr[‘extended’] removes paragraph tags?
- Loading CDN that requires jQuery in WordPress
- I am unable to publish/update post
- Custom post preview without saving
- Disable inline_edit() on edit.php
- Ajax load more button in Recent posts widget
- Ajax Dynamic Archives not showing correct results
- Load post attached images on a single page site with fancybox
- WP_Query with ajax handler returns the same posts
- WordPress’ ALL post count info on its dashboard does not match phpMyAdmin’s ALL post count!
- Block Editor: Reset Reusable Blocks to last saved record
- remove wp floating submenu in wp dashboard
- Exclude category from
- Setting posts_per_page for taxonomy term template
- Scripts not appending to element in AJAX call – why?
- Change post order random through out the entire WordPress
- Classic editor throws 403 error based on post content
- How to display the link (title) and thumbnail post?
- Ajax post filters not working
- dynamic dependent select dropdown
- Force the “Choose from the most used tags” meta box section to always be expanded
- Show the content that is after the excerpt using child theme
- Display Meta Values in Custom Filter – Admin Custom Posts
- How to allow users to post only in certain category and hide elements from edit page?
- Ajax load more button for comments wordpress
- How to do set post permalinks using 6 digit random unique function?
- Can’t get buddypress notifications in front-end; why do I get this error?
- How to search using ajax for exact phrase or words in an input field?
- Lost draft under all posts and drafts
- how to en-queue jQuery to load before the tag
- How do I display some posts fully on the homepage, and some as an excerpt only?
- Integrate OpenStreetMap on WordPress
- Genesis + Ajax + Jquery | Failling to call action
- I can’t enqueue my scripts – They literally aren’t being added to my site
- Post repeating with infinite scroll
- Send post id through ajax and get the post content back
- Simultaneous admin updates causes custom fields to not update
- Hook in to add new post link wp admin?
- Display post x of y within category
- Force authors to Preview a post before publishing
- WordPress Automatic Filename Changer
- How do I locate the exact location where this error is occurring 404 page not found
- plugin to post from admin to flickr [closed]
- Redirect to another page using contact form 7? [closed]
- Order posts alphabetically: how to set order=asc in mysql query?
- Do all wordpress themes a similar class name for content?
- Only show a Post once in 10 visits
- Retrieve only posts from a specific user in wp-admin/edit.php
- Adding an Archive button to posts page for administrators
- Security to delete post by Admin
- Develop Admin Panel Page
- How show categories in admin and get that selected to show posts in index
- Change all author links in Blog roll
- disable Tab post on nav-menus page (Admin)
- Adding bootstrap classes to video shortcodes
- Change post-slug using wordpress API? Change permalink of a post using php / jquery?
- add bootstrap post slider with tabs
- Every second post different class in blog view