/* For Show ALl Media */ if ( is_admin() ) { /* If can access admin dashboard */ /* For Show ALl Media in Grid View */ function show_all_media($query) { $query['author'] = ''; return $query; } add_filter('ajax_query_attachments_args', 'show_all_media', 99); /* For Show ALl Media in List View */ remove_action( 'pre_get_posts', array( JNews\AccountPage::getInstance(), 'users_own_attachments' ) ); /* For Delete Attachment */ remove_action( 'delete_attachment', array( JNews\AccountPage::getInstance(), 'disable_delete_attachment' ) ); }