Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Twenty Twenty Custom CSS
|
|
|
|
|
*
|
|
|
|
|
* @package WordPress
|
|
|
|
|
* @subpackage Twenty_Twenty
|
2019-12-07 14:56:06 +01:00
|
|
|
|
* @since Twenty Twenty 1.0
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Generate CSS.
|
|
|
|
|
*
|
|
|
|
|
* @param string $selector The CSS selector.
|
|
|
|
|
* @param string $style The CSS style.
|
|
|
|
|
* @param string $value The CSS value.
|
|
|
|
|
* @param string $prefix The CSS prefix.
|
|
|
|
|
* @param string $suffix The CSS suffix.
|
|
|
|
|
* @param bool $echo Echo the styles.
|
|
|
|
|
*/
|
|
|
|
|
function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $echo = true ) {
|
|
|
|
|
|
|
|
|
|
$return = '';
|
|
|
|
|
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46271], see https://github.com/WordPress/twentytwenty/compare/932b16248...dd7032f
Props anlino, ianbelanger, nielslange, acosmin, netweb, williampatton, adhitya03, phpdocs, acalfieri, itowhid06, littlebigthing, aristath, karmatosed, poena.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46357
git-svn-id: http://core.svn.wordpress.org/trunk@46156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 19:41:57 +02:00
|
|
|
|
/*
|
|
|
|
|
* Bail early if we have no $selector elements or properties and $value.
|
|
|
|
|
*/
|
|
|
|
|
if ( ! $value || ! $selector ) {
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$return = sprintf( '%s { %s: %s; }', $selector, $style, $prefix . $value . $suffix );
|
|
|
|
|
|
|
|
|
|
if ( $echo ) {
|
|
|
|
|
|
2020-01-29 01:45:18 +01:00
|
|
|
|
echo $return; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;)
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get CSS Built from Customizer Options.
|
|
|
|
|
* Build CSS reflecting colors, fonts and other options set in the Customizer, and return them for output.
|
|
|
|
|
*
|
|
|
|
|
* @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
|
|
|
|
|
*/
|
|
|
|
|
function twentytwenty_get_customizer_css( $type = 'front-end' ) {
|
|
|
|
|
|
|
|
|
|
// Get variables.
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.
Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.
Built from https://develop.svn.wordpress.org/trunk@46571
git-svn-id: http://core.svn.wordpress.org/trunk@46368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 20:27:08 +02:00
|
|
|
|
$body = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
|
|
|
|
|
$body_default = '#000000';
|
|
|
|
|
$secondary = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'secondary' ) );
|
|
|
|
|
$secondary_default = '#6d6d6d';
|
|
|
|
|
$borders = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'borders' ) );
|
|
|
|
|
$borders_default = '#dcd7ca';
|
|
|
|
|
$accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
|
|
|
|
|
$accent_default = '#cd2653';
|
|
|
|
|
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
// Header.
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.
Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.
Built from https://develop.svn.wordpress.org/trunk@46571
git-svn-id: http://core.svn.wordpress.org/trunk@46368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 20:27:08 +02:00
|
|
|
|
$header_footer_background = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'background' ) );
|
|
|
|
|
$header_footer_background_default = '#ffffff';
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
|
|
|
|
|
// Cover.
|
|
|
|
|
$cover = sanitize_hex_color( get_theme_mod( 'cover_template_overlay_text_color' ) );
|
|
|
|
|
$cover_default = '#ffffff';
|
|
|
|
|
|
|
|
|
|
// Background.
|
|
|
|
|
$background = sanitize_hex_color_no_hash( get_theme_mod( 'background_color' ) );
|
|
|
|
|
$background_default = 'f5efe0';
|
|
|
|
|
|
|
|
|
|
ob_start();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Note – Styles are applied in this order:
|
|
|
|
|
* 1. Element specific
|
|
|
|
|
* 2. Helper classes
|
|
|
|
|
*
|
|
|
|
|
* This enables all helper classes to overwrite base element styles,
|
|
|
|
|
* meaning that any color classes applied in the block editor will
|
|
|
|
|
* have a higher priority than the base element styles.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Front-End Styles.
|
|
|
|
|
if ( 'front-end' === $type ) {
|
|
|
|
|
|
|
|
|
|
// Auto-calculated colors.
|
|
|
|
|
$elements_definitions = twentytwenty_get_elements_array();
|
|
|
|
|
foreach ( $elements_definitions as $context => $props ) {
|
|
|
|
|
foreach ( $props as $key => $definitions ) {
|
|
|
|
|
foreach ( $definitions as $property => $elements ) {
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46271], see https://github.com/WordPress/twentytwenty/compare/932b16248...dd7032f
Props anlino, ianbelanger, nielslange, acosmin, netweb, williampatton, adhitya03, phpdocs, acalfieri, itowhid06, littlebigthing, aristath, karmatosed, poena.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46357
git-svn-id: http://core.svn.wordpress.org/trunk@46156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 19:41:57 +02:00
|
|
|
|
/*
|
|
|
|
|
* If we don't have an elements array or it is empty
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`'s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46357], see https://github.com/WordPress/twentytwenty/compare/7157870...7246fd6.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, netweb, joyusly, luminuu, itowhid06, cbravobernal, intimez, glauberglauber, ocean90, amolv, briceduclos, aristath, mukesh27, garrett-eclipse, audrasjb, afercia, dianeco, utsav72640, mahesh901122, tobifjellner.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46445
git-svn-id: http://core.svn.wordpress.org/trunk@46243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-08 21:08:07 +02:00
|
|
|
|
* then skip this iteration early;
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46271], see https://github.com/WordPress/twentytwenty/compare/932b16248...dd7032f
Props anlino, ianbelanger, nielslange, acosmin, netweb, williampatton, adhitya03, phpdocs, acalfieri, itowhid06, littlebigthing, aristath, karmatosed, poena.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46357
git-svn-id: http://core.svn.wordpress.org/trunk@46156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 19:41:57 +02:00
|
|
|
|
*/
|
|
|
|
|
if ( ! is_array( $elements ) || empty( $elements ) ) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
$val = twentytwenty_get_color_for_area( $context, $key );
|
|
|
|
|
if ( $val ) {
|
|
|
|
|
twentytwenty_generate_css( implode( ',', $elements ), $property, $val );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( $cover && $cover !== $cover_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46271], see https://github.com/WordPress/twentytwenty/compare/932b16248...dd7032f
Props anlino, ianbelanger, nielslange, acosmin, netweb, williampatton, adhitya03, phpdocs, acalfieri, itowhid06, littlebigthing, aristath, karmatosed, poena.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46357
git-svn-id: http://core.svn.wordpress.org/trunk@46156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 19:41:57 +02:00
|
|
|
|
twentytwenty_generate_css( '.overlay-header .header-inner', 'color', $cover );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
twentytwenty_generate_css( '.cover-header .entry-header *', 'color', $cover );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Block Editor Styles.
|
|
|
|
|
} elseif ( 'block-editor' === $type ) {
|
|
|
|
|
|
|
|
|
|
// Colors.
|
|
|
|
|
// Accent color.
|
|
|
|
|
if ( $accent && $accent !== $accent_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.
Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.
Built from https://develop.svn.wordpress.org/trunk@46571
git-svn-id: http://core.svn.wordpress.org/trunk@46368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 20:27:08 +02:00
|
|
|
|
twentytwenty_generate_css( '.has-accent-color, .editor-styles-wrapper .editor-block-list__layout a, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, .editor-styles-wrapper .wp-block-pullquote::before, .editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent );
|
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' );
|
|
|
|
|
twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Background color.
|
|
|
|
|
if ( $background && $background !== $background_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC4, see https://github.com/WordPress/twentytwenty/compare/c267289...898792b.
Props williampatton, poena, andersnoren, desrosj, schlessera, leprincenoir, alextran, aristath, b-07.
See #48110, #48386, #48450, #48505.
Fixes #48557.
Built from https://develop.svn.wordpress.org/trunk@46701
git-svn-id: http://core.svn.wordpress.org/trunk@46501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-11 13:29:01 +01:00
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper', 'background-color', '#' . $background );
|
|
|
|
|
twentytwenty_generate_css( '.has-background.has-primary-background-color:not(.has-text-color),.has-background.has-primary-background-color *:not(.has-text-color),.has-background.has-accent-background-color:not(.has-text-color),.has-background.has-accent-background-color *:not(.has-text-color)', 'color', '#' . $background );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
}
|
|
|
|
|
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.
Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.
Built from https://develop.svn.wordpress.org/trunk@46571
git-svn-id: http://core.svn.wordpress.org/trunk@46368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 20:27:08 +02:00
|
|
|
|
// Borders color.
|
|
|
|
|
if ( $borders && $borders !== $borders_default ) {
|
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-code, .editor-styles-wrapper pre, .editor-styles-wrapper .wp-block-preformatted pre, .editor-styles-wrapper .wp-block-verse pre, .editor-styles-wrapper fieldset, .editor-styles-wrapper .wp-block-table, .editor-styles-wrapper .wp-block-table *, .editor-styles-wrapper .wp-block-table.is-style-stripes, .editor-styles-wrapper .wp-block-latest-posts.is-grid li', 'border-color', $borders );
|
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-table caption, .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color', $borders );
|
|
|
|
|
}
|
|
|
|
|
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
// Text color.
|
|
|
|
|
if ( $body && $body !== $body_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings `trunk`’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.
Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.
Built from https://develop.svn.wordpress.org/trunk@46571
git-svn-id: http://core.svn.wordpress.org/trunk@46368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-22 20:27:08 +02:00
|
|
|
|
twentytwenty_generate_css( 'body .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Secondary color.
|
|
|
|
|
if ( $secondary && $secondary !== $secondary_default ) {
|
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper figcaption, .editor-styles-wrapper cite, .editor-styles-wrapper .wp-block-quote__citation, .editor-styles-wrapper .wp-block-quote cite, .editor-styles-wrapper .wp-block-quote footer, .editor-styles-wrapper .wp-block-pullquote__citation, .editor-styles-wrapper .wp-block-pullquote cite, .editor-styles-wrapper .wp-block-pullquote footer, .editor-styles-wrapper ul.wp-block-archives li, .editor-styles-wrapper ul.wp-block-categories li, .editor-styles-wrapper ul.wp-block-latest-posts li, .editor-styles-wrapper ul.wp-block-categories__list li, .editor-styles-wrapper .wp-block-latest-comments time, .editor-styles-wrapper .wp-block-latest-posts time', 'color', $secondary );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Header Footer Background Color.
|
|
|
|
|
if ( $header_footer_background && $header_footer_background !== $header_footer_background_default ) {
|
|
|
|
|
twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-pullquote::before', 'background-color', $header_footer_background );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
}
|
|
|
|
|
} elseif ( 'classic-editor' === $type ) {
|
|
|
|
|
|
|
|
|
|
// Colors.
|
|
|
|
|
// Accent color.
|
|
|
|
|
if ( $accent && $accent !== $accent_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings trunk’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46571], see https://github.com/WordPress/twentytwenty/compare/4549fd9...dea9290.
Props anlino, ianbelanger, poena, williampatton, collet, erikkroes, torres126, intimez, byalextran, mehidi258, swapnild, nielslange.
Fixes #48450.
Built from https://develop.svn.wordpress.org/trunk@46613
git-svn-id: http://core.svn.wordpress.org/trunk@46410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-29 15:55:05 +01:00
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content a, body#tinymce.wp-editor.content a:focus, body#tinymce.wp-editor.content a:hover', 'color', $accent );
|
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content blockquote, body#tinymce.wp-editor.content .wp-block-quote', 'border-color', $accent, '', ' !important' );
|
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content button, body#tinymce.wp-editor.content .faux-button, body#tinymce.wp-editor.content .wp-block-button__link, body#tinymce.wp-editor.content .wp-block-file__button, body#tinymce.wp-editor.content input[type=\'button\'], body#tinymce.wp-editor.content input[type=\'reset\'], body#tinymce.wp-editor.content input[type=\'submit\']', 'background-color', $accent );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Background color.
|
|
|
|
|
if ( $background && $background !== $background_default ) {
|
Bundled Themes: Update Twenty Twenty.
This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC4, see https://github.com/WordPress/twentytwenty/compare/c267289...898792b.
Props williampatton, poena, andersnoren, desrosj, schlessera, leprincenoir, alextran, aristath, b-07.
See #48110, #48386, #48450, #48505.
Fixes #48557.
Built from https://develop.svn.wordpress.org/trunk@46701
git-svn-id: http://core.svn.wordpress.org/trunk@46501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-11 13:29:01 +01:00
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background-color', '#' . $background );
|
Bundled Themes: Update Twenty Twenty.
This brings trunk’s version of Twenty Twenty in-sync with GitHub.
For a complete list of changes since [46571], see https://github.com/WordPress/twentytwenty/compare/4549fd9...dea9290.
Props anlino, ianbelanger, poena, williampatton, collet, erikkroes, torres126, intimez, byalextran, mehidi258, swapnild, nielslange.
Fixes #48450.
Built from https://develop.svn.wordpress.org/trunk@46613
git-svn-id: http://core.svn.wordpress.org/trunk@46410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-29 15:55:05 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Text color.
|
|
|
|
|
if ( $body && $body !== $body_default ) {
|
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'color', $body );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Secondary color.
|
|
|
|
|
if ( $secondary && $secondary !== $secondary_default ) {
|
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content hr:not(.is-style-dots), body#tinymce.wp-editor.content cite, body#tinymce.wp-editor.content figcaption, body#tinymce.wp-editor.content .wp-caption-text, body#tinymce.wp-editor.content .wp-caption-dd, body#tinymce.wp-editor.content .gallery-caption', 'color', $secondary );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Borders color.
|
|
|
|
|
if ( $borders && $borders !== $borders_default ) {
|
|
|
|
|
twentytwenty_generate_css( 'body#tinymce.wp-editor.content pre, body#tinymce.wp-editor.content hr, body#tinymce.wp-editor.content fieldset,body#tinymce.wp-editor.content input, body#tinymce.wp-editor.content textarea', 'border-color', $borders );
|
Bundled Themes: Import Twenty Twenty, the new default theme for WordPress 5.3.
Welcome to the bundled themes family!
Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwenty/.
Props anlino, ianbelanger, audrasjb, nielslange, fabiankaegy, mukesh27, poena, joyously, emiluzelac, williampatton, dingo-d, dkarfa, acosmin, rabmalin, kafleg, jeffpaul, hareesh-pillai, burhandodhy, afercia, juanfra, soean, presskopp, justinahinon, jrf, netweb, garyj, pento, flixos90, vbaimas, zebulan, byalextran, mor10, kjellr, allancole, tdh, karmatosed, mapk, matt, andrewtaylor-1, ismailelkorchi, garrett-eclipse, gsayed786, dianeco, celloexpressions, aristath, nadir, cbravobernal, intimez, hometowntrailers, collet, littlebigthing, tobifjellner, kevinkovadia, jarretc.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46271
git-svn-id: http://core.svn.wordpress.org/trunk@46083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 22:16:00 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Return the results.
|
|
|
|
|
return ob_get_clean();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|