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

Add option for themes to configure inline styles #16532

Open
wants to merge 2 commits into
base: master
from

Conversation

@jorgefilipecosta
Copy link
Member

commented Jul 11, 2019

Description

Depends on: #16465

This PR extends the work done in #16465 . to allow themes to set the default styles applied to a block.

How has this been tested?

I went to functions.php of the currently enabled theme.
I pasted the following code:

function setup_default_block_styles() {
	add_theme_support(
		'editor-auto-apply-block-styles',
		array(
			'core/quote'     => 'large',
			'core/pullquote' => 'solid-color',
		)
	);
}

add_action( 'after_setup_theme', 'setup_default_block_styles' );

I created a new quote and a new pullquote I verified the default styles were large and solid color respectively.

@jorgefilipecosta jorgefilipecosta force-pushed the add/option-for-themes-to-configure-inline-styles branch from 80d96cb to a97655c Jul 11, 2019

@chrisvanpatten

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

Can I suggest naming it editor-default-block-styles? “Auto apply” is slightly confusing, vs “default”.

@youknowriad youknowriad requested a review from mtias Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.