Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider re-adding link color support for classic themes #41857

Closed
carolinan opened this issue Jun 22, 2022 · 5 comments · Fixed by #51775
Closed

Consider re-adding link color support for classic themes #41857

carolinan opened this issue Jun 22, 2022 · 5 comments · Fixed by #51775
Assignees
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Regression Related to a regression in the latest release

Comments

@carolinan
Copy link
Contributor

What problem does this address?

Originally reported here: https://core.trac.wordpress.org/ticket/55028

Before 5.9, classic themes could support the link color option with the help of add_theme_support( 'experimental-link-color' );
From 5.9, I believe there is no way for classic themes to have link color option without adding a theme.json file?

In WordPress 5.8, this setting did work without Gutenberg active:
https://core.trac.wordpress.org/browser/branches/5.8/src/wp-includes/class-wp-theme-json.php#L1226

In 5.9, it is removed: https://core.trac.wordpress.org/browser/branches/5.9/src/wp-includes/class-wp-theme-json.php

In the Gutenberg 5.9 compat file, we can find a related comment:
https://github.com/WordPress/gutenberg/blob/trunk/lib/compat/wordpress-5.9/class-wp-theme-json-5-9.php#L1923

What is your proposed solution?

Re-add theme support, but no longer as "experimental".

@carolinan carolinan added the [Type] Regression Related to a regression in the latest release label Jun 22, 2022
@bph bph added the [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. label Jul 20, 2022
@carolinan

This comment was marked as outdated.

@carolinan

This comment was marked as outdated.

@carolinan carolinan reopened this Sep 29, 2022
@desrosj
Copy link
Contributor

desrosj commented Sep 29, 2022

I'd like to see this solved in the broader context of "moving features and functionality out of experimental" and "not merging experimental features into Core" (#40316). Is there any reason why the block editor cannot implement something to keep track of things like this, fire __doing_it_wrong() errors when the old way is being used to inform developers that their code needs updating, and then attempt to seamlessly use the non-experimental way?

I don't think that question can be answered in the context of just this report, but wanted to mention it.

@carolinan
Copy link
Contributor Author

carolinan commented Sep 30, 2022

I agree that the problem was that

  1. the theme included experimental feature in the first place
  2. in 5.8, the feature was available in core, but still named experimental
  3. in 5.9 it was removed -without replacement or doing it wrong notice.

@carolinan
Copy link
Contributor Author

carolinan commented May 3, 2023

I have hidden my comments on this ticket that mentioned that the link color can be re-added to the classic themes using theme support, because the theme support only works if Gutenberg is active, and has side effects like enabling block gap.
The theme support was tested in core but was eventually reverted because it enabled block gap, which does not work in classic themes.

I suggest enabling the link color by default for all theme types.
Developers need to be able to disable the link color option in case they have clients that should not be able to edit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Regression Related to a regression in the latest release
Projects
None yet
4 participants