Skip to content

Commit

Permalink
Increment separately and then return
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya committed Oct 23, 2023
1 parent 780486b commit 11f1cac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7859,7 +7859,9 @@ function wp_unique_prefixed_id( $prefix = '' ) {
$id_counters[ $prefix ] = 0;
}

return $prefix . (string) ++$id_counters[ $prefix ];
$id = ++$id_counters[ $prefix ];

return $prefix . (string) $id;
}

/**
Expand Down

0 comments on commit 11f1cac

Please sign in to comment.