diff --git a/inc/core/admin.php b/inc/core/admin.php
index 5569b25a38..b3c3ac7868 100644
--- a/inc/core/admin.php
+++ b/inc/core/admin.php
@@ -265,11 +265,12 @@ public function welcome_notice_content() {
$options_page_btn
);
$notice_documentation = sprintf(
- '
',
+ '
',
__( 'Documentation', 'neve' ),
// translators: %s - Theme name
sprintf( esc_html__( 'Need more details? Please check our full documentation for detailed information on how to use %s.', 'neve' ), $name ),
'https://docs.themeisle.com/article/946-neve-doc',
+ esc_html__( '(opens in a new tab)', 'neve' ),
esc_html__( 'Read full documentation', 'neve' ),
$ob_return_dashboard
);
diff --git a/inc/core/settings/config.php b/inc/core/settings/config.php
index ad21a4e10f..1f95ea0a8b 100644
--- a/inc/core/settings/config.php
+++ b/inc/core/settings/config.php
@@ -181,8 +181,8 @@ class Config {
self::CSS_SELECTOR_SINGLE_POST_TITLE => '.single h1.entry-title',
self::CSS_SELECTOR_SINGLE_POST_META => '.single .nv-meta-list li',
self::CSS_SELECTOR_SINGLE_POST_COMMENT_TITLE => '.single .comment-reply-title',
- self::CSS_SELECTOR_FORM_INPUTS_WITH_SPACING => 'form:not([role="search"]):not(.woocommerce-cart-form):not(.woocommerce-ordering):not(.cart) input:read-write:not(#coupon_code), form textarea, form select',
- self::CSS_SELECTOR_FORM_INPUTS => 'form input:read-write, form textarea, form select, form select option, form.wp-block-search input.wp-block-search__input',
+ self::CSS_SELECTOR_FORM_INPUTS_WITH_SPACING => 'form:not([role="search"]):not(.woocommerce-cart-form):not(.woocommerce-ordering):not(.cart) input:read-write:not(#coupon_code), form textarea, form select, .widget select',
+ self::CSS_SELECTOR_FORM_INPUTS => 'form input:read-write, form textarea, form select, form select option, form.wp-block-search input.wp-block-search__input, .widget select',
self::CSS_SELECTOR_FORM_INPUTS_LABELS => 'form label, .wpforms-container .wpforms-field-label',
self::CSS_SELECTOR_FORM_BUTTON => 'form input[type="submit"]',
self::CSS_SELECTOR_FORM_SEARCH_INPUTS => 'form.search-form input:read-write',
diff --git a/inc/core/styles/frontend.php b/inc/core/styles/frontend.php
index ec1420aeaf..fe54ad6bfc 100644
--- a/inc/core/styles/frontend.php
+++ b/inc/core/styles/frontend.php
@@ -646,6 +646,11 @@ private function setup_form_fields_style() {
Dynamic_Selector::META_KEY => Config::MODS_FORM_FIELDS_PADDING,
Dynamic_Selector::META_IS_RESPONSIVE => false,
],
+ Config::CSS_PROP_TEXT_TRANSFORM => [
+ Dynamic_Selector::META_KEY => Config::MODS_FORM_FIELDS_TYPEFACE . '.textTransform',
+ Dynamic_Selector::META_IS_RESPONSIVE => false,
+ Dynamic_Selector::META_SUFFIX => '',
+ ],
Config::CSS_PROP_FONT_SIZE => [
Dynamic_Selector::META_KEY => Config::MODS_FORM_FIELDS_TYPEFACE . '.fontSize',
Dynamic_Selector::META_IS_RESPONSIVE => true,
diff --git a/inc/customizer/controls/js/upsell.js b/inc/customizer/controls/js/upsell.js
index 1f8c007da8..932c009fbd 100644
--- a/inc/customizer/controls/js/upsell.js
+++ b/inc/customizer/controls/js/upsell.js
@@ -4,10 +4,13 @@ wp.customize.bind( 'ready', function () {
const markup =
'
';
const elChild = document.createElement( 'li' );
elChild.innerHTML = markup;
diff --git a/inc/customizer/controls/react/src/common/ColorControl.js b/inc/customizer/controls/react/src/common/ColorControl.js
index 71d0253642..8f7e84357a 100644
--- a/inc/customizer/controls/react/src/common/ColorControl.js
+++ b/inc/customizer/controls/react/src/common/ColorControl.js
@@ -1,9 +1,12 @@
import PropTypes from 'prop-types';
import GlobalColorsPicker from '../common/GlobalColorsPicker';
-import { ColorPicker, Button, Dropdown } from '@wordpress/components';
+// we can add back ColorPicker here when issue https://github.com/WordPress/gutenberg/issues/30798 is resolved
+import { Button, Dropdown } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
+import ColorPickerFix from './ColorPickerFix';
+
const ColorControl = ({
label,
selectedColor,
@@ -67,7 +70,7 @@ const ColorControl = ({
<>
{/* eslint-disable-next-line jsx-a11y/anchor-has-content */}
-
diff --git a/inc/customizer/controls/react/src/common/ColorPickerFix.js b/inc/customizer/controls/react/src/common/ColorPickerFix.js
new file mode 100644
index 0000000000..053aa4c13e
--- /dev/null
+++ b/inc/customizer/controls/react/src/common/ColorPickerFix.js
@@ -0,0 +1,70 @@
+import { ColorPicker } from '@wordpress/components';
+
+const dataToColors = (oldColors, { source, valueKey, value }) => {
+ if (source === 'hex') {
+ return {
+ source,
+ [source]: value,
+ };
+ }
+ return {
+ source,
+ ...{ ...oldColors[source], ...{ [valueKey]: value } },
+ };
+};
+
+const isValueEmpty = (data) => {
+ if (data.source === 'hex' && data.hex === undefined) {
+ return true;
+ }
+
+ if (
+ data.source === 'hsl' &&
+ (data.h === undefined || data.s === undefined || data.l === undefined)
+ ) {
+ return true;
+ }
+
+ /**
+ * Check that if source is `rgb`:
+ * `r`, `g` or `b` properties are not undefined
+ * OR (||) `h`, `s`, `v` or `a` properties are not undefined
+ * OR (||) `h`, `s`, `l` or `a` properties are not undefined
+ *
+ * before it was checking with NOT(!) statement witch for `0` (bool|int) values returns `true`
+ * this is a typecasting issue only visible for hex values that derive from #000000
+ */
+ return (
+ data.source === 'rgb' &&
+ (data.r === undefined ||
+ data.g === undefined ||
+ data.b === undefined) &&
+ (data.h === undefined ||
+ data.s === undefined ||
+ data.v === undefined ||
+ data.a === undefined) &&
+ (data.h === undefined ||
+ data.s === undefined ||
+ data.l === undefined ||
+ data.a === undefined)
+ );
+};
+
+export default class ColorPickerFix extends ColorPicker {
+ handleInputChange(data) {
+ switch (data.state) {
+ case 'reset':
+ this.resetDraftValues();
+ break;
+ case 'commit':
+ const colors = dataToColors(this.state, data);
+ if (!isValueEmpty(colors)) {
+ this.commitValues(colors);
+ }
+ break;
+ case 'draft':
+ this.setDraftValues(dataToColors(this.state, data));
+ break;
+ }
+ }
+}
diff --git a/inc/customizer/controls/react/src/common/ControlWithLink.js b/inc/customizer/controls/react/src/common/ControlWithLink.js
index 8277943847..9b17875b9d 100644
--- a/inc/customizer/controls/react/src/common/ControlWithLink.js
+++ b/inc/customizer/controls/react/src/common/ControlWithLink.js
@@ -1,4 +1,5 @@
/* global NeveProReactCustomize */
+import { ExternalLink } from '@wordpress/components';
const ControlWithLink = ({ link, children }) => {
if (typeof NeveProReactCustomize !== 'undefined') {
@@ -22,6 +23,10 @@ const ControlWithLink = ({ link, children }) => {
);
}
+ if (link.new_tab) {
+ return
{link.string};
+ }
+
return
{link.string};
};
diff --git a/inc/customizer/controls/react/src/global-colors/PaletteColors.js b/inc/customizer/controls/react/src/global-colors/PaletteColors.js
index 043a5d744b..bf264c674e 100644
--- a/inc/customizer/controls/react/src/global-colors/PaletteColors.js
+++ b/inc/customizer/controls/react/src/global-colors/PaletteColors.js
@@ -43,7 +43,7 @@ const PaletteColors = ({ values, defaults, save }) => {
{globalPaletteColors.map((group, index) => {
return (
-
+
{index > 0 &&
}
{Object.keys(group).map((slug) => {
return (
diff --git a/inc/customizer/controls/simple_upsell.php b/inc/customizer/controls/simple_upsell.php
index d3ebcad199..17b3a8ac6d 100644
--- a/inc/customizer/controls/simple_upsell.php
+++ b/inc/customizer/controls/simple_upsell.php
@@ -59,8 +59,9 @@ public function render_content() {
text ); ?>
link ) && ! empty( $this->button_text ) ) { ?>
-
+
button_text ); ?>
+
diff --git a/inc/customizer/controls/simple_upsell_section.php b/inc/customizer/controls/simple_upsell_section.php
index 787a667d4e..bb78f4c061 100644
--- a/inc/customizer/controls/simple_upsell_section.php
+++ b/inc/customizer/controls/simple_upsell_section.php
@@ -48,10 +48,11 @@ class Simple_Upsell_Section extends \WP_Customize_Section {
* @return array The array to be exported to the client as JSON.
*/
public function json() {
- $json = parent::json();
- $json['button_text'] = $this->button_text;
- $json['link'] = $this->link;
- $json['text'] = $this->text;
+ $json = parent::json();
+ $json['button_text'] = $this->button_text;
+ $json['link'] = $this->link;
+ $json['text'] = $this->text;
+ $json['screen_reader'] = $this->screen_reader;
return $json;
}
@@ -67,8 +68,9 @@ protected function render_template() {
{{data.text}}
<# } #>
<# if( data.link && data.button_text ) { #>
-
+
{{data.button_text}}
+ {{data.screen_reader}}
<# } #>
diff --git a/inc/customizer/controls/upsell_control.php b/inc/customizer/controls/upsell_control.php
index 0e77f8a540..a11db6d554 100644
--- a/inc/customizer/controls/upsell_control.php
+++ b/inc/customizer/controls/upsell_control.php
@@ -67,6 +67,14 @@ class Upsell_Control extends \WP_Customize_Control {
*/
public $pro_label = '';
+ /**
+ * Screen reader text.
+ *
+ * @since 2.11.2
+ * @var string
+ */
+ public $screen_reader = '';
+
/**
* Boolean to check if the pro label is displayed or not.
*
@@ -101,6 +109,7 @@ public function json() {
$json['explained_features'] = $this->explained_features;
$json['show_pro_label'] = $this->show_pro_label;
$json['pro_label'] = $this->pro_label;
+ $json['screen_reader'] = $this->screen_reader;
return $json;
}
@@ -126,8 +135,10 @@ public function content_template() {
<# } #>
<# if ( data.button_text && data.button_url ) { #>
-