Skip to content

Commit

Permalink
Update version_compare to handle WP alpha version comparisons effic…
Browse files Browse the repository at this point in the history
…iently

Co-authored-by: Weston Ruter <westonruter@google.com>
  • Loading branch information
thelovekesh and westonruter authored Oct 6, 2023
1 parent 8810a3f commit 30736fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/php/validation/test-class-amp-validation-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ public function test_decorate_shortcode_and_filter_source() {

// This will be called after `do_shortcode` in WP 6.4 and later.
// @see <https://core.trac.wordpress.org/ticket/58853>.
if ( version_compare( get_bloginfo( 'version' ), '6.4-alpha', '<' ) ) {
if ( version_compare( strtok( get_bloginfo( 'version' ), '-' ), '6.4', '<' ) ) {
$sources[] = [
'type' => 'core',
'name' => 'wp-includes',
Expand Down

0 comments on commit 30736fe

Please sign in to comment.