Unverified

Name

add Move to Trash back to editor UI

About

Puts the "Move to Trash" button back in the editor UI. h/t to George Mamadashvili for the code.

Language

Javascript

Rating

Voted: 0 by 0 user(s)

Codevault

Vault13

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.4

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://mburnette.com

Snippet Source:

https://gist.github.com/Mamaduka/da9b42160b66c9ece628c477440d7864

History

Last modified:

03/09/2024

Important Note

This snippet has the following status:

Unverified

This snippet has not been verified, use with caution and at your own risk. See details provided by author in sidebar and click below to find out more.

add Move to Trash back to editor UI

 
                    
1const el = wp.element.createElement;
2const registerPlugin = wp.plugins.registerPlugin;
3const { PluginPostStatusInfo, PostTrashCheck, PostTrash } = wp.editor;
4 
5function ReturnOfTheTrashButton() {
6 return el(
7 PluginPostStatusInfo,
8 {},
9 el( PostTrashCheck, {}, el( PostTrash ) )
10 );
11}
12 
13registerPlugin( 'return-of-the-trash-button', {
14 render: ReturnOfTheTrashButton,
15} );

0

Related Snippets

Please see some snippets below related to this snippet..

WordPress Admin

AI Verified

1

Add links to admin bar

Added: 2 years ago

Last Updated: 6 months ago

WordPress Admin

AI Verified

0

Custom Color Key

Added: 9 months ago

Last Updated: 9 months ago

Adds a color-coded key at the top of specific admin page.

WordPress Admin

AI Verified

0

ACF Backend

Added: 2 years ago

Last Updated: 1 year ago

customizes the ACF where you edit pages and posts

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

Unverified

0

add Move to Trash back to editor UI

Added: 2 weeks ago

Last Updated: 2 weeks ago

Puts the "Move to Trash" button back in the editor UI. h/t to George Mamadashvili for the code.