Skip to content

Commit

Permalink
Update modules/custom-status/custom-status.php
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Geatches <[email protected]>
  • Loading branch information
ingeniumed and alecgeatches authored Oct 10, 2024
1 parent fc6e09b commit b7950d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/custom-status/custom-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public static function delete_custom_status( int $status_id ): bool|WP_Error {

$old_status_slug = $old_status->slug;

if ( self::is_restricted_status( $old_status_slug ) && ! self::is_status_banned_from_slug_changes( $old_status_slug ) ) {
if ( self::is_restricted_status( $old_status_slug ) || self::is_status_banned_from_slug_changes( $old_status_slug ) ) {
// translators: %s: Post status, like "Draft"
return new WP_Error( 'restricted', sprintf( __( 'Restricted status (%s) cannot be deleted.', 'vip-workflow' ), $old_status->name ) );
}
Expand Down

0 comments on commit b7950d9

Please sign in to comment.