Skip to content

Commit

Permalink
Merge pull request #88 from tomusborne/release/2.2.2
Browse files Browse the repository at this point in the history
Release/2.2.2
  • Loading branch information
tomusborne authored Jan 30, 2019
2 parents 9a6b6a1 + 54abb37 commit 6067ee6
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 21 deletions.
14 changes: 14 additions & 0 deletions css/admin/block-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,24 @@ button.content-title-visibility:before {
opacity: 0.4;
}

.edit-post-text-editor .editor-post-title__block .editor-post-title__input {
color: initial;
opacity: 1;
}

/*--------------------------------------------------------------
# Columns
--------------------------------------------------------------*/

.editor-block-list__block .wp-block-columns .wp-block-column {
margin-bottom: 0;
}

/*--------------------------------------------------------------
# Fix shortcode block label color
--------------------------------------------------------------*/

.wp-block-shortcode label,
.wp-block-shortcode .editor-plain-text {
color: initial;
}
3 changes: 2 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

// Set our theme version.
define( 'GENERATE_VERSION', '2.2.1' );
define( 'GENERATE_VERSION', '2.2.2' );

if ( ! function_exists( 'generate_setup' ) ) {
add_action( 'after_setup_theme', 'generate_setup' );
Expand All @@ -35,6 +35,7 @@ function generate_setup() {
add_theme_support( 'customize-selective-refresh-widgets' );
add_theme_support( 'align-wide' );
add_theme_support( 'editor-color-palette', array() );
add_theme_support( 'responsive-embeds' );

add_theme_support( 'custom-logo', array(
'height' => 70,
Expand Down
22 changes: 13 additions & 9 deletions inc/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ function generate_enqueue_backend_block_editor_assets() {
generate_spacing_get_defaults()
);

$background_color = generate_get_option( 'background_color' );
$text_color = generate_get_option( 'text_color' );

if ( $color_settings['content_background_color'] ) {
$background_color = $color_settings['content_background_color'];
if ( $color_settings['content_text_color'] ) {
$text_color = $color_settings['content_text_color'];
}

wp_localize_script( 'generate-block-editor-scripts', 'generate_block_editor', array(
Expand All @@ -132,7 +132,7 @@ function generate_enqueue_backend_block_editor_assets() {
'content_title' => generate_get_block_editor_show_content_title() ? 'true' : 'false',
'disable_content_title' => esc_html( 'Disable Content Title', 'generatepress' ),
'show_content_title' => esc_html( 'Show Content Title', 'generatepress' ),
'background_color' => $background_color,
'text_color' => $text_color,
) );
}

Expand Down Expand Up @@ -176,6 +176,9 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'max-width', $content_width_calc );
}

$css->set_selector( 'html body.gutenberg-editor-page .editor-block-list__block[data-align="full"]' );
$css->add_property( 'max-width', 'none' );

$css->set_selector( '.edit-post-visual-editor .editor-block-list__block[data-align=wide]' );
$css->add_property( 'max-width', absint( $content_width ), false, 'px' );

Expand Down Expand Up @@ -289,7 +292,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_5_transform'] ) );

if ( '' !== $font_settings['heading_5_font_size'] ) {
$css->add_property( 'font-size', absint( $font_settings['heading_5_font_size'] ), $og_defaults['heading_5_font_size'], 'px' );
$css->add_property( 'font-size', absint( $font_settings['heading_5_font_size'] ), false, 'px' );
} else {
$css->add_property( 'font-size', 'inherit' );
}
Expand Down Expand Up @@ -330,12 +333,13 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'font-size', absint( $font_settings['buttons_font_size'] ), false, 'px' );
}

$css->set_selector( 'body .edit-post-layout__content' );
$css->set_selector( 'body .editor-styles-wrapper' );
$css->add_property( 'background-color', esc_attr( generate_get_option( 'background_color' ) ) );

if ( $color_settings['content_background_color'] ) {
$css->add_property( 'background-color', esc_attr( $color_settings['content_background_color'] ) );
} else {
$css->add_property( 'background-color', esc_attr( generate_get_option( 'background_color' ) ) );
$body_background = esc_attr( generate_get_option( 'background_color' ) );
$content_background = esc_attr( $color_settings['content_background_color'] );
$css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' );
}

$css->set_selector( '.editor-block-list__block a, .editor-block-list__block a:visited' );
Expand Down
4 changes: 2 additions & 2 deletions inc/css-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function generate_spacing_css() {
$css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' );
$css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ), generate_padding_css( $og_defaults['content_top'], $og_defaults['content_right'], $og_defaults['content_bottom'], $og_defaults['content_left'] ) );

$content_padding = $spacing_settings['content_right'] + $spacing_settings['content_left'];
$content_padding = absint( $spacing_settings['content_right'] ) + absint( $spacing_settings['content_left'] );
$css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' );
$css->add_property( 'margin-left', '-' . absint( $spacing_settings['content_left'] ) . 'px' );
$css->add_property( 'width', 'calc(100% + ' . absint( $content_padding ) . 'px)' );
Expand All @@ -511,7 +511,7 @@ function generate_spacing_css() {
$css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' );
$css->add_property( 'padding', generate_padding_css( $spacing_settings['mobile_content_top'], $spacing_settings['mobile_content_right'], $spacing_settings['mobile_content_bottom'], $spacing_settings['mobile_content_left'] ) );

$mobile_content_padding = $spacing_settings['mobile_content_right'] + $spacing_settings['mobile_content_left'];
$mobile_content_padding = absint( $spacing_settings['mobile_content_right'] ) + absint( $spacing_settings['mobile_content_left'] );
$css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' );
$css->add_property( 'margin-left', '-' . absint( $spacing_settings['mobile_content_left'] ) . 'px' );
$css->add_property( 'width', 'calc(100% + ' . absint( $mobile_content_padding ) . 'px)' );
Expand Down
2 changes: 1 addition & 1 deletion inc/markup.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function generate_get_microdata( $context ) {
}

if ( 'sidebar' === $context ) {
$data = 'itemtype="https://schema.org/WPSidebar" itemscope';
$data = 'itemtype="https://schema.org/WPSideBar" itemscope';
}

if ( 'footer' === $context ) {
Expand Down
2 changes: 1 addition & 1 deletion inc/structure/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function start_el( &$output, $page, $depth = 0, $args = array(), $current_page =

if ( isset( $args['pages_with_children'][ $page->ID ] ) ) {
$css_class[] = 'menu-item-has-children';
$button = '<span role="presentation" class="dropdown-menu-toggle" aria-expanded="false"></span>';
$button = '<span role="presentation" class="dropdown-menu-toggle"></span>';
}

if ( ! empty( $current_page ) ) {
Expand Down
6 changes: 3 additions & 3 deletions js/admin/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jQuery( document ).ready( function( $ ) {
}
} );

var background_color = tinycolor( generate_block_editor.background_color ).toHex8(),
isDarkMode = tinycolor( background_color ).isDark();
var text_color = tinycolor( generate_block_editor.text_color ).toHex8(),
isTextDark = tinycolor( text_color ).isDark();

if ( isDarkMode ) {
if ( ! isTextDark ) {
$( 'body' ).addClass( 'is-dark-theme' );
}
} );
Expand Down
16 changes: 15 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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
Requires at least: 4.5
Tested up to: 5.0
Stable tag: 2.2.1
Stable tag: 2.2.2

GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.

Expand Down Expand Up @@ -95,6 +95,20 @@ MIT License: https://github.com/bgrins/TinyColor/blob/master/LICENSE

== Changelog ==

= 2.2.2 =

Release date: January 30, 2019

* New: Add support for responsive embeds (videos etc..)
* Fix: Background/text color conflict in block editor if content background is using rgba
* Fix: Remove aria-expanded attribute from menu dropdown arrows when no menu is set
* Fix: Notice in block editor when h5 font size is set
* Fix: Notice if right/left content padding values are non-numeric
* Fix: Microdata spelling of WPSideBar
* Fix: Align-full alignment issue in block editor when Gutenberg plugin is active
* Fix: Shortcode block label text color when using light text
* Fix: Content title color in Gutenberg while in code editor

= 2.2.1 =

Release date: November 21, 2018
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Theme URI: https://generatepress.com
Author: Tom Usborne
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 15kb (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: 2.2.1
Version: 2.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
GeneratePress, Copyright 2014-2018 EDGE22 Studios LTD.
GeneratePress, Copyright 2014-2019 EDGE22 Studios LTD.
GeneratePress is distributed under the terms of the GNU GPL
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2018 Automattic, Inc.
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2019 Automattic, Inc.
*/

/*--------------------------------------------------------------
Expand Down

0 comments on commit 6067ee6

Please sign in to comment.