Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* allow other user to delete attachments */
- add_action(
- 'init',
- function () {
- if ( class_exists( '\JNews_Frontend_Template' ) ) {
- remove_action( 'delete_attachment', array( \JNews_Frontend_Template::getInstance(), 'disable_delete_attachment' ) );
- }
- if ( class_exists( '\JNEWS_VIDEO\Frontend\Frontend_Video_Endpoint' ) ) {
- remove_action( 'delete_attachment', array( \JNEWS_VIDEO\Frontend\Frontend_Video_Endpoint::getInstance(), 'disable_delete_attachment' ) );
- }
- if ( class_exists( '\JNEWS_VIDEO\Playlist\Playlist_Dashboard' ) ) {
- remove_action( 'delete_attachment', array( \JNEWS_VIDEO\Playlist\Playlist_Dashboard::class, 'disable_delete_attachment' ) );
- }
- remove_action( 'delete_attachment', array( JNews\AccountPage::getInstance(), 'disable_delete_attachment' ) );
- },
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement