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

hide dropCap panel in wordpress 5.7 #29827

Closed
jens-struct opened this issue Mar 12, 2021 · 3 comments
Closed

hide dropCap panel in wordpress 5.7 #29827

jens-struct opened this issue Mar 12, 2021 · 3 comments
Labels
[Status] Needs More Info Follow-up required in order to be actionable.

Comments

@jens-struct
Copy link

jens-struct commented Mar 12, 2021

Description

hiding the dropCap has stopped working since wordpress 5.7

before wordpress 5.7 dropCaps could be disabled with:

add_action( 'init', function() {
  add_filter(
    'block_editor_settings',
    function ($editor_settings) {
      $editor_settings['__experimentalFeatures']['global']['typography']['dropCap'] = false;
      return $editor_settings;
    }
  );
});

in my research i found disabling the dropcap feature should work with the experimental-theme.json in wordpress 5.7, there is no official information so maybe i'm wrong.

i tested various formats of the experimental-theme.json and researched for hours, but the file seems to be always ignored.

the add_theme_support function seems also outdated or is just not working anymore, without any information about the deprecation in the official docs.

is there any information on how to integrate the experimental-theme.json, just adding the file to the theme has no effect.

thanks.

@skorasaurus skorasaurus added the [Status] Needs More Info Follow-up required in order to be actionable. label Mar 29, 2021
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting.

Could you share if you're able to reproduce this using the Gutenberg plugin and also what add_theme_support function that you were using to disable the dropcap ?

@jens-struct
Copy link
Author

Hello.

Yes, i also tried the latest version of the gutenberg plugin, but the experimental-theme.json is always ignored.

Do you know another way to disable dropcaps in wordpress 5.7?

I didn't use the add_theme_support function to disable the dropcap, as far as i know that's not possible. That was just an additional info, that some add_theme_support features (i.e. "disable-custom-colors") are also not working anymore in the current release, and that there is no deprecation notice in the docs.

@skorasaurus
Copy link
Member

Thanks for the clarification.

I found this snippet and am able to disable dropcaps in 5.7 using that. You'll need to change global to defaults, not unlike https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#settings

As a result, I am closing the issue.

As for the add_theme_support; I am still able to disable custom colors in 5.7;

Be sure that you are properly hooking into it; like I am in the example below.

function twentynineteen_setup {
		add_theme_support( 'disable-custom-colors' );
	}
add_action( 'after_setup_theme', 'twentynineteen_setup' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

No branches or pull requests

2 participants