Skip to content

fix: invalid _doing_it_wrong() for experimental-link-color - #68408

Merged
carolinan merged 1 commit into
WordPress:trunkfrom
justlevine:fix/doing_it_wrong-experimental-link-color
Jan 27, 2025
Merged

carolinan merged 1 commit into
WordPress:trunkfrom
justlevine:fix/doing_it_wrong-experimental-link-color

Conversation

@justlevine

Copy link
Copy Markdown
Contributor

What?

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()`.

Why?

While this issue was surfaced by PHPStan (via #66693) it can be remediated independently as part of #66598

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Before After

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: justlevine <justlevine@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@carolinan carolinan added the [Type] Bug An existing feature does not function as intended label Jan 27, 2025

@carolinan carolinan left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is showing correctly, thank you.

image

(This change does not need a core backport since this theme support was only available in a few versions of the plugin.)

@carolinan
carolinan merged commit ad2a39d into WordPress:trunk Jan 27, 2025
@github-actions github-actions Bot added this to the Gutenberg 20.2 milestone Jan 27, 2025
@justlevine
justlevine deleted the fix/doing_it_wrong-experimental-link-color branch January 27, 2025 10:31
Kallyan01 pushed a commit to Kallyan01/gutenberg that referenced this pull request Feb 24, 2025
…ress#68408)

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 <justlevine@git.wordpress.org>
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ress#68408)

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 <justlevine@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants