post_status ) { /* translators: %s: how to ask for a permanent delete, e.g. "--force". */ return sprintf( __( 'It is already in the trash. To delete it permanently, call this again with %s.', 'gripmcp' ), $how ); } $trash_on = defined( 'EMPTY_TRASH_DAYS' ) && EMPTY_TRASH_DAYS > 0; if ( ! $trash_on ) { /* translators: %s: how to ask for a permanent delete, e.g. "--force". */ return sprintf( __( 'The trash is turned off on this site (EMPTY_TRASH_DAYS is 0), so this can only be deleted permanently: call this again with %s.', 'gripmcp' ), $how ); } if ( 'attachment' === $post->post_type && ! ( defined( 'MEDIA_TRASH' ) && MEDIA_TRASH ) ) { return __( 'WordPress has no trash for media on this site, so a media file can only be deleted permanently: use wp_media_delete.', 'gripmcp' ); } if ( in_array( $post->post_type, self::NO_TRASH_TYPES, true ) ) { /* translators: %s: how to ask for a permanent delete, e.g. "--force". */ return sprintf( __( 'WordPress has no trash for this kind of item, so it can only be deleted permanently: call this again with %s.', 'gripmcp' ), $how ); } return ''; } }