Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Branch 2.20.3 #85

Merged
merged 5 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ Crio is a WordPress SuperTheme that allows front-end designers, developers and o

## Changelog ##

### 2.20.3 ###
* Bug Fix: PHP 8.1 + Crio Fatal Error | DreamHost [#82](https://github.com/BoldGrid/crio/issues/82)
* Bug Fix: PHP 8.2 Deprecated: Using ${var} in strings is deprecated, use {$var} instead [#81](https://github.com/BoldGrid/crio/issues/81)
* Bug Fix: DH PHP 8.2 & WP 6.2 Fatal Error [#78](https://github.com/BoldGrid/crio/issues/78)

### 2.20.2 ###
* Improvement: Add Border Radius to Blog > Blog Page > Border [#60](https://github.com/BoldGrid/crio/issues/60)
* Bug Fix: Selecting transparent color color palette causes css syntax error[#66](https://github.com/BoldGrid/crio/issues/66)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldgrid-theme-framework",
"version": "2.20.2",
"version": "2.20.3",
"description": "BoldGrid Theme Framework",
"main": "index.js",
"engines": {
Expand Down Expand Up @@ -154,14 +154,14 @@
"jarallax": "^1.12.4",
"jquery-goup": "^1.1.0",
"jquery.nicescroll": "^3.6.8",
"kirki-toolkit": "https://github.com/kirki-framework/kirki.git#v3.1.4",
"kirki-toolkit": "https://github.com/boldgrid/kirki.git#crio-kirki",
"lodash.camelcase": "^4.3.0",
"lodash.kebabcase": "^4.1.1",
"lodash.lowercase": "^4.3.0",
"lodash.startcase": "^4.4.0",
"postcss": "^8.2.13",
"sass.js": "~0.11.1",
"scssphp": "https://github.com/scssphp/scssphp#v1.10.0",
"scssphp": "https://github.com/boldgrid/scssphp#crio-scss",
"smartmenus": "^1.1.0",
"snyk": "1.685.0",
"wow.js": "^1.2.2"
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: news, blog, e-commerce, sticky-post, theme-options, threaded-comments, ful
Requires PHP: 5.6
Requires at least: 4.8
Tested up to: 6.2
Stable tag: 2.20.2
Stable tag: 2.20.3
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0-standalone.html

Expand All @@ -22,6 +22,11 @@ This version changes the way the color palette CSS is generated. If you are usin

## Changelog ##

== 2.20.3 ==
* Bug Fix: PHP 8.1 + Crio Fatal Error | DreamHost [#82](https://github.com/BoldGrid/crio/issues/82)
* Bug Fix: PHP 8.2 Deprecated: Using ${var} in strings is deprecated, use {$var} instead [#81](https://github.com/BoldGrid/crio/issues/81)
* Bug Fix: DH PHP 8.2 & WP 6.2 Fatal Error [#78](https://github.com/BoldGrid/crio/issues/78)

== 2.20.2 ==
* Improvement: Add Border Radius to Blog > Blog Page > Border [#60](https://github.com/BoldGrid/crio/issues/60)
* Bug Fix: Selecting transparent color color palette causes css syntax error[#66](https://github.com/BoldGrid/crio/issues/66)
Expand Down
2 changes: 1 addition & 1 deletion src/boldgrid-theme-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: BoldGrid Theme Framework
* Plugin URI: https://www.boldgrid.com/docs/configuration-file
* Description: BoldGrid Theme Framework is a library that allows you to easily make BoldGrid themes. Please see our reference guide for more information: https://www.boldgrid.com/docs/configuration-file
* Version: 2.20.2
* Version: 2.20.3
* Author: BoldGrid.com <wpb@boldgrid.com>
* Author URI: https://www.boldgrid.com/
* Text Domain: bgtfw
Expand Down
18 changes: 18 additions & 0 deletions src/includes/class-boldgrid-framework-activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ class Boldgrid_Framework_Activate {
*/
protected $configs;

/**
* SCSS
*
* @since 2.20.3
*
* @var Boldgrid_Framework_SCSS
*/
public $scss;

/**
* Color
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Customizer_Colors
*/
public $color;

/**
* Initialize the class and set its properties.
*
Expand Down
18 changes: 14 additions & 4 deletions src/includes/class-boldgrid-framework-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1107,13 +1107,23 @@ public static function get_column_widths( $theme_mod, $preset, $layout_type ) {
// if the theme_mod is a json array, we need to decode it to use it as a php array.
$raw_col_widths = get_theme_mod(
'bgtfw_' . $type . '_layout_col_width',
$configs['customizer']['controls']['bgtfw_header_layout_col_width']['default'] );
$configs['customizer']['controls']['bgtfw_header_layout_col_width']['default']
);

/**
* Because of various versions users may be coming from,
* we have to validate the form of this theme mod. If it
* is a string, or contains a string in the array,
* we decode it as a json_encoded array.
*/
if ( is_string( $raw_col_widths ) ) {
$col_width_theme_mod = json_decode( $raw_col_widths, true );
} elseif ( isset( $raw_col_widths['media'] ) && is_string( $raw_col_widths['media'] ) ) {
$col_width_theme_mod = json_decode( $raw_col_widths['media'], true );
} elseif ( isset( $raw_col_widths[0]['media'] ) ) {
$col_width_theme_mod = $raw_col_widths[0]['media'];
} else {
$col_width_theme_mod = isset( $raw_col_widths['media'] )
? json_decode( $raw_col_widths['media'], true )
: $raw_col_widths[0]['media'];
return array();
}

foreach ( $col_width_theme_mod as $device => $values ) {
Expand Down
2 changes: 2 additions & 0 deletions src/includes/class-boldgrid-framework-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ public function boldgrid_bootstrap_comment( $comment, $args, $depth ) {
$button_class = get_theme_mod( 'bgtfw_comment_reply_button_class', 'button-primary' );
$classes = apply_filters( 'bgtfw_button_classes', array() );

$comment_reply_link = $comment_reply_link ? $comment_reply_link : '';

if ( isset( $classes[ $button_class ] ) ) {
$comment_reply_link = preg_replace(
'/comment-reply-link/',
Expand Down
30 changes: 15 additions & 15 deletions src/includes/class-boldgrid-framework-links.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function add_styles_frontend() {
$css_prefix = str_replace( '_', '-', $prefix );
$styles = $this->get_styles( $prefix );
if ( ! empty( $styles ) ) {
Boldgrid_Framework_Customizer_Generic::add_inline_style( "${css_prefix}-link", $styles );
Boldgrid_Framework_Customizer_Generic::add_inline_style( "{$css_prefix}-link", $styles );
}
}
}
Expand Down Expand Up @@ -137,16 +137,16 @@ public function add_styles_editor( $css ) {
*/
public function get_styles( $prefix ) {
$css = '';
if ( empty( $this->configs['customizer']['controls'][ "${prefix}_link_color_display" ] ) || 'custom' === get_theme_mod( "${prefix}_link_color_display" ) ) {
$color = get_theme_mod( "${prefix}_link_color" ) ?: '';
$color_hover = get_theme_mod( "${prefix}_link_color_hover" ) ?: 0;
$decoration = get_theme_mod( "${prefix}_link_decoration" );
$decoration_hover = get_theme_mod( "${prefix}_link_decoration_hover" );
if ( empty( $this->configs['customizer']['controls'][ "{$prefix}_link_color_display" ] ) || 'custom' === get_theme_mod( "{$prefix}_link_color_display" ) ) {
$color = get_theme_mod( "{$prefix}_link_color" ) ?: '';
$color_hover = get_theme_mod( "{$prefix}_link_color_hover" ) ?: 0;
$decoration = get_theme_mod( "{$prefix}_link_decoration" );
$decoration_hover = get_theme_mod( "{$prefix}_link_decoration_hover" );

// Apply color as CSS variable.
list( $color_variable ) = explode( ':', $color );
$color = BoldGrid::color_from_class( $color_variable );
$color_variable = "var(--${color_variable})";
$color_variable = "var(--{$color_variable})";

if ( empty( $color ) ) {
return $css;
Expand All @@ -161,13 +161,13 @@ public function get_styles( $prefix ) {
$excludes = '';

// Grab the filtered selectors.
if ( ! empty( $this->configs['customizer']['controls'][ "${prefix}_link_color" ]['choices']['selectors'] ) ) {
$selectors = $this->configs['customizer']['controls'][ "${prefix}_link_color" ]['choices']['selectors'];
if ( ! empty( $this->configs['customizer']['controls'][ "{$prefix}_link_color" ]['choices']['selectors'] ) ) {
$selectors = $this->configs['customizer']['controls'][ "{$prefix}_link_color" ]['choices']['selectors'];

foreach ( $selectors as $selector ) {
$selector = $selector . $excludes;
$css .= "${selector} {color: ${color_variable};text-decoration: ${decoration};}";
$css .= "${selector}:hover, ${selector}:focus {color: ${color_hover};text-decoration: ${decoration_hover};}";
$css .= "{$selector} {color: {$color_variable};text-decoration: {$decoration};}";
$css .= "{$selector}:hover, {$selector}:focus {color: {$color_hover};text-decoration: {$decoration_hover};}";
}

if ( 'bgtfw_body' === $prefix ) {
Expand All @@ -184,7 +184,7 @@ public function get_styles( $prefix ) {
)
)[1];
$footer_ari_color = ariColor::newColor( $footer_link_color );
$footer_color_hover = get_theme_mod( "${prefix}_link_color_hover" ) ?: 0;
$footer_color_hover = get_theme_mod( "{$prefix}_link_color_hover" ) ?: 0;
$footer_lightness = min( $footer_ari_color->lightness + $footer_color_hover, 100 );
$footer_lightness = max( $footer_lightness, 0 );
$footer_color_hover = $footer_ari_color->getNew( 'lightness', $footer_lightness )->toCSS( 'hsla' );
Expand All @@ -197,11 +197,11 @@ public function get_styles( $prefix ) {
$sidebar_lightness = max( $sidebar_lightness, 0 );
$sidebar_color_hover = $sidebar_ari_color->getNew( 'lightness', $sidebar_lightness )->toCSS( 'hsla' );

$css .= ".sidebar.color-${sidebar_color_class}-link-color a:not( .btn ):hover, .sidebar.color-${sidebar_color_class}-link-color a:not( .btn ):focus { color: ${sidebar_color_hover} !important; }";
$css .= ".sidebar.color-{$sidebar_color_class}-link-color a:not( .btn ):hover, .sidebar.color-{$sidebar_color_class}-link-color a:not( .btn ):focus { color: {$sidebar_color_hover} !important; }";
}

$css .= "#colophon .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ) { text-decoration: ${decoration};}";
$css .= "#colophon .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ):hover, .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ):focus {color: ${footer_color_hover};text-decoration: ${decoration_hover};}";
$css .= "#colophon .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ) { text-decoration: {$decoration};}";
$css .= "#colophon .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ):hover, .bgtfw-footer.footer-content .attribution-theme-mods > .link > a:not( .btn ):focus {color: {$footer_color_hover};text-decoration: {$decoration_hover};}";
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/includes/class-boldgrid-framework-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
*/
class Boldgrid_Framework_Menu {

/**
* Edit Enabled
*
* @since 2.20.3
*
* @var bool
*/
public $edit_enabled;

/**
* The BoldGrid Theme Framework configurations.
*
Expand Down
6 changes: 5 additions & 1 deletion src/includes/class-boldgrid-framework-pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ public function format( $pages = [] ) {
// Create an instance of DOMDocument
$dom = new \DOMDocument();

$internal_errors = libxml_use_internal_errors( true );

// Handle UTF-8, otherwise problems will occur with UTF-8 characters.
$dom->loadHTML( mb_convert_encoding( $output, 'HTML-ENTITIES', 'UTF-8' ) );
$dom->loadHTML( htmlspecialchars_decode( htmlentities( $output, ENT_COMPAT, 'UTF-8', false ) ) );

libxml_use_internal_errors( $internal_errors );

// Create an instance of DOMXpath and all elements with the class 'page-numbers'
$xpath = new \DOMXpath( $dom );
Expand Down
27 changes: 27 additions & 0 deletions src/includes/class-boldgrid-framework-scss-compile.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@ class Boldgrid_Framework_Scss_Compile implements Boldgrid_Framework_Compile {
*/
protected $configs;

/**
* WPFS
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Wp_Fs
*/
public $wpfs;

/**
* Colors
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Compile_Colors
*/
public $colors;

/**
* Staging
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Staging
*/
public $staging;

/**
* Initialize the class and set its properties.
*
Expand Down
36 changes: 36 additions & 0 deletions src/includes/class-boldgrid-framework-scss.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,42 @@ class Boldgrid_Framework_SCSS {
*/
public $compiled_content;

/**
* WPFS
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Wp_Fs
*/
public $wpfs;

/**
* Colors
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Compile_Colors
*/
public $colors;

/**
* Staging
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Staging
*/
public $staging;

/**
* Buttons
*
* @since 2.20.3
*
* @var Boldgrid_Framework_Scss_Compile
*/
public $buttons;

/**
* Initialize the class and set its properties.
*
Expand Down
11 changes: 11 additions & 0 deletions src/includes/class-boldgrid-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ public function get_configs() {
return $this->configs;
}

/**
* Colors
*
* @since 2.20.3
*
* @var boolean
*
* @access private
*/
private $doing_cron;

/**
* Define the core functionality of the plugin.
*
Expand Down
10 changes: 6 additions & 4 deletions src/includes/configs/customizer/controls/blog-page.controls.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@
'size' => $bgtfw_palette->get_palette_size( $bgtfw_formatted_palette ),
),
'sanitize_callback' => array( $bgtfw_color_sanitize, 'sanitize_palette_selector' ),
array(
'selector' => '.blog .entry-content',
'label' => 'Post Content Background',
'description' => 'Change the color of the Post Content Background',
'edit_vars' => array(
array(
'selector' => '.blog .entry-content',
'label' => 'Post Content Background',
'description' => 'Change the color of the Post Content Background',
),
),
),
'bgtfw_blog_post_header_title_display' => array(
Expand Down
Loading