updated theme GeneratePress
version 3.0.3
This commit is contained in:
parent
a60ce58ddd
commit
a366a73cba
@ -76,15 +76,6 @@ jQuery( document ).ready( function( $ ) {
|
|||||||
body.addClass( 'content-title-hidden' );
|
body.addClass( 'content-title-hidden' );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
if ( generate_block_editor.show_editor_styles ) {
|
|
||||||
var text_color = tinycolor( generate_block_editor.text_color ).toHex8(),
|
|
||||||
isTextDark = tinycolor( text_color ).isDark();
|
|
||||||
|
|
||||||
if ( ! isTextDark ) {
|
|
||||||
$( 'body' ).addClass( 'is-dark-theme' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery( window ).on( 'load', function() {
|
jQuery( window ).on( 'load', function() {
|
||||||
@ -95,4 +86,18 @@ jQuery( window ).on( 'load', function() {
|
|||||||
post_title_block.append( '<button class="content-title-visibility disable-content-title" title="' + generate_block_editor.disable_content_title + '" aria-hidden="true"></button>' );
|
post_title_block.append( '<button class="content-title-visibility disable-content-title" title="' + generate_block_editor.disable_content_title + '" aria-hidden="true"></button>' );
|
||||||
post_title_block.append( '<button class="content-title-visibility show-content-title" title="' + generate_block_editor.show_content_title + '" aria-hidden="true"></button>' );
|
post_title_block.append( '<button class="content-title-visibility show-content-title" title="' + generate_block_editor.show_content_title + '" aria-hidden="true"></button>' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a fallback in case the core editor check for the dark theme fails.
|
||||||
|
// If the background is using a gradient or rgba, the WP method can be wrong.
|
||||||
|
// So instead, we check for text color, as it's a better indicator of the true background color.
|
||||||
|
if ( generate_block_editor.show_editor_styles ) {
|
||||||
|
var text_color = tinycolor( generate_block_editor.text_color ).toHex8(),
|
||||||
|
isTextDark = tinycolor( text_color ).isDark();
|
||||||
|
|
||||||
|
if ( ! isTextDark ) {
|
||||||
|
document.body.classList.add( 'is-dark-theme' );
|
||||||
|
} else {
|
||||||
|
document.body.classList.remove( 'is-dark-theme' );
|
||||||
|
}
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set our theme version.
|
// Set our theme version.
|
||||||
define( 'GENERATE_VERSION', '3.0.2' );
|
define( 'GENERATE_VERSION', '3.0.3' );
|
||||||
|
|
||||||
if ( ! function_exists( 'generate_setup' ) ) {
|
if ( ! function_exists( 'generate_setup' ) ) {
|
||||||
add_action( 'after_setup_theme', 'generate_setup' );
|
add_action( 'after_setup_theme', 'generate_setup' );
|
||||||
|
@ -381,6 +381,18 @@ function generate_do_inline_block_editor_css() {
|
|||||||
$css->add_property( 'font-size', absint( $font_settings['buttons_font_size'] ), false, 'px' );
|
$css->add_property( 'font-size', absint( $font_settings['buttons_font_size'] ), false, 'px' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( version_compare( $GLOBALS['wp_version'], '5.7-alpha.1', '>' ) ) {
|
||||||
|
$css->set_selector( '.block-editor__container .edit-post-visual-editor' );
|
||||||
|
$css->add_property( 'background-color', generate_get_option( 'background_color' ) );
|
||||||
|
|
||||||
|
$css->set_selector( '.block-editor__container .editor-styles-wrapper' );
|
||||||
|
|
||||||
|
if ( $color_settings['content_background_color'] ) {
|
||||||
|
$css->add_property( 'background-color', $color_settings['content_background_color'] );
|
||||||
|
} else {
|
||||||
|
$css->add_property( 'background-color', generate_get_option( 'background_color' ) );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$css->set_selector( 'body .editor-styles-wrapper' );
|
$css->set_selector( 'body .editor-styles-wrapper' );
|
||||||
$css->add_property( 'background-color', generate_get_option( 'background_color' ) );
|
$css->add_property( 'background-color', generate_get_option( 'background_color' ) );
|
||||||
|
|
||||||
@ -390,6 +402,7 @@ function generate_do_inline_block_editor_css() {
|
|||||||
|
|
||||||
$css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' );
|
$css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' );
|
$css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' );
|
||||||
|
|
||||||
|
@ -160,12 +160,12 @@ function generate_do_layout_meta_box( $post ) {
|
|||||||
|
|
||||||
<select name="_generate-footer-widget-meta" id="generate-footer-widget">
|
<select name="_generate-footer-widget-meta" id="generate-footer-widget">
|
||||||
<option value="" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '' ); ?>><?php esc_html_e( 'Default', 'generatepress' ); ?></option>
|
<option value="" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '' ); ?>><?php esc_html_e( 'Default', 'generatepress' ); ?></option>
|
||||||
<option value="0" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '0' ); ?>><?php esc_html_e( '0 Widgets', 'generatepress' ); ?></option>
|
<option value="0" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '0' ); ?>><?php esc_html_e( '0 Widgets', 'generatepress' ); ?></option>
|
||||||
<option value="1" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '1' ); ?>><?php esc_html_e( '1 Widgets', 'generatepress' ); ?></option>
|
<option value="1" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '1' ); ?>><?php esc_html_e( '1 Widgets', 'generatepress' ); ?></option>
|
||||||
<option value="2" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '2' ); ?>><?php esc_html_e( '2 Widgets', 'generatepress' ); ?></option>
|
<option value="2" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '2' ); ?>><?php esc_html_e( '2 Widgets', 'generatepress' ); ?></option>
|
||||||
<option value="3" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '3' ); ?>><?php esc_html_e( '3 Widgets', 'generatepress' ); ?></option>
|
<option value="3" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '3' ); ?>><?php esc_html_e( '3 Widgets', 'generatepress' ); ?></option>
|
||||||
<option value="4" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '4' ); ?>><?php esc_html_e( '4 Widgets', 'generatepress' ); ?></option>
|
<option value="4" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '4' ); ?>><?php esc_html_e( '4 Widgets', 'generatepress' ); ?></option>
|
||||||
<option value="5" <?php selected( $stored_meta['_generate-sidebar-layout-meta'][0], '5' ); ?>><?php esc_html_e( '5 Widgets', 'generatepress' ); ?></option>
|
<option value="5" <?php selected( $stored_meta['_generate-footer-widget-meta'][0], '5' ); ?>><?php esc_html_e( '5 Widgets', 'generatepress' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,8 +5,8 @@ License: GPLv2 or later
|
|||||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
||||||
Requires at least: 4.5
|
Requires at least: 4.5
|
||||||
Tested up to: 5.5
|
Tested up to: 5.7
|
||||||
Stable tag: 3.0.2
|
Stable tag: 3.0.3
|
||||||
|
|
||||||
GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.
|
GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.
|
||||||
|
|
||||||
@ -95,6 +95,13 @@ MIT License: https://github.com/bgrins/TinyColor/blob/master/LICENSE
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 3.0.3 =
|
||||||
|
|
||||||
|
Release date: March 2, 2021
|
||||||
|
|
||||||
|
* Fix: is-dark-theme class in editor in WP 5.7
|
||||||
|
* Fix: Saving footer widget post meta in editor
|
||||||
|
|
||||||
= 3.0.2 =
|
= 3.0.2 =
|
||||||
|
|
||||||
Release date: October 14, 2020
|
Release date: October 14, 2020
|
||||||
|
@ -4,19 +4,19 @@ Theme URI: https://generatepress.com
|
|||||||
Author: Tom Usborne
|
Author: Tom Usborne
|
||||||
Author URI: https://tomusborne.com
|
Author URI: https://tomusborne.com
|
||||||
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the new block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS and is translated into over 25 languages by our amazing community of users. A few of our many features include microdata integration, 9 widget areas, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover) and navigation color presets. Learn more and check out our powerful premium version at https://generatepress.com
|
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the new block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS and is translated into over 25 languages by our amazing community of users. A few of our many features include microdata integration, 9 widget areas, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover) and navigation color presets. Learn more and check out our powerful premium version at https://generatepress.com
|
||||||
Version: 3.0.2
|
Version: 3.0.3
|
||||||
Requires at least: 4.5.0
|
Requires at least: 4.5.0
|
||||||
Tested up to: 5.5
|
Tested up to: 5.7
|
||||||
Requires PHP: 5.4.0
|
Requires PHP: 5.4.0
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: generatepress
|
Text Domain: generatepress
|
||||||
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
|
||||||
|
|
||||||
GeneratePress, Copyright 2014-2020 EDGE22 Studios LTD.
|
GeneratePress, Copyright 2014-2021 EDGE22 Studios LTD.
|
||||||
GeneratePress is distributed under the terms of the GNU GPL
|
GeneratePress is distributed under the terms of the GNU GPL
|
||||||
|
|
||||||
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2020 Automattic, Inc.
|
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2021 Automattic, Inc.
|
||||||
|
|
||||||
Actual CSS can be found in /assets/css/ folder.
|
Actual CSS can be found in /assets/css/ folder.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user