Skip to content

Commit

Permalink
fix: invalid _doing_it_wrong() for experimental-link-color (#68408)
Browse files Browse the repository at this point in the history
This PR fixes an issue in WP_Theme_JSON_Resolver_Gutenberg::get_theme_data() where the _doing_it_wrong() executes the $function_name, instead of providing a string.
The parameter has been updated to the string "add_theme_support( 'experimental-link-color' )" since that's where the user is "doing_it_wrong()`.


Co-authored-by: justlevine <[email protected]>
  • Loading branch information
justlevine and justlevine authored Jan 27, 2025
1 parent 271ec7b commit ad2a39d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public static function get_theme_data( $deprecated = array(), $options = array()
}
if ( current_theme_supports( 'experimental-link-color' ) ) {
_doing_it_wrong(
current_theme_supports( 'experimental-link-color' ),
"add_theme_support( 'experimental-link-color' )",
__( '`experimental-link-color` is no longer supported. Use `link-color` instead.', 'gutenberg' ),
'6.3.0'
);
Expand Down

0 comments on commit ad2a39d

Please sign in to comment.