Skip to content

Commit 58dcb83

Browse files
committed
chore(release): merge in release v6.42.0
2 parents c9dcead + d7afaf8 commit 58dcb83

11 files changed

Lines changed: 66 additions & 37 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [6.42.1](https://github.com/Automattic/newspack-plugin/compare/v6.42.0...v6.42.1) (2026-06-02)
2+
3+
4+
### Bug Fixes
5+
6+
* prevent content-gate editor.scss styles from getting chunked into the common.css file ([#4716](https://github.com/Automattic/newspack-plugin/issues/4716)) ([4d4c557](https://github.com/Automattic/newspack-plugin/commit/4d4c5572fb32a73b54c76e916273acc695f00163))
7+
18
# [6.42.0](https://github.com/Automattic/newspack-plugin/compare/v6.41.3...v6.42.0) (2026-06-01)
29

310

includes/content-gate/class-block-visibility.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ public static function enqueue_block_editor_assets() {
186186
true
187187
);
188188

189+
wp_enqueue_style(
190+
'newspack-content-gate-block-visibility',
191+
Newspack::plugin_url() . '/dist/content-gate-block-visibility.css',
192+
[],
193+
$asset['version']
194+
);
195+
189196
wp_localize_script(
190197
'newspack-content-gate-block-visibility',
191198
'newspackBlockVisibility',

newspack.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Newspack
44
* Description: An advanced open-source publishing and revenue-generating platform for news organizations.
5-
* Version: 6.42.0
5+
* Version: 6.42.1
66
* Author: Automattic
77
* Author URI: https://newspack.com/
88
* License: GPL2
@@ -14,7 +14,7 @@
1414

1515
defined( 'ABSPATH' ) || exit;
1616

17-
define( 'NEWSPACK_PLUGIN_VERSION', '6.42.0' );
17+
define( 'NEWSPACK_PLUGIN_VERSION', '6.42.1' );
1818

1919
// Path to the main Newspack plugin file.
2020
if ( ! defined( 'NEWSPACK_PLUGIN_FILE' ) ) {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "newspack",
3-
"version": "6.42.0",
3+
"version": "6.42.1",
44
"description": "The Newspack plugin. https://newspack.com",
55
"bugs": {
66
"url": "https://github.com/Automattic/newspack-plugin/issues"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@use "~@wordpress/base-styles/variables" as wp-vars;
2+
3+
.newspack-access-control-block-visibility-panel {
4+
.components-base-control,
5+
.components-form-token-field {
6+
width: 100%;
7+
}
8+
// Gutenberg's `.block-editor-block-inspector p:not(.components-base-control__help)` rule
9+
// strips the emotion margin-top on FormTokenField's help text. Nested here to bump
10+
// specificity above Gutenberg's and restore the gap.
11+
.components-form-token-field .components-form-token-field__help {
12+
margin-top: wp-vars.$grid-unit-10;
13+
}
14+
.components-toggle-control {
15+
margin-top: wp-vars.$grid-unit-10;
16+
width: 100%;
17+
.components-base-control__field {
18+
margin-bottom: wp-vars.$grid-unit-05;
19+
}
20+
.components-base-control__help {
21+
margin-top: 0;
22+
}
23+
}
24+
}

src/content-gate/editor/block-visibility.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { __, sprintf } from '@wordpress/i18n';
2222
/**
2323
* Internal dependencies
2424
*/
25-
import './editor.scss';
25+
import './block-visibility.scss';
2626

2727
/**
2828
* Target block types that receive access control attributes.

src/content-gate/editor/editor.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ function GateEdit() {
6666
<p>{ __( "Newspack Campaign prompts won't be displayed when rendering gated content.", 'newspack-plugin' ) }</p>
6767
</PluginPostStatusInfo>
6868
) }
69-
<PluginDocumentSettingPanel name="content-gate-styles-panel" title={ __( 'Styles', 'newspack-plugin' ) }>
69+
<PluginDocumentSettingPanel
70+
name="content-gate-styles-panel"
71+
className="newspack-content-gate-panel"
72+
title={ __( 'Styles', 'newspack-plugin' ) }
73+
>
7074
<div className="newspack-content-gate-style-selector">
7175
{ styles.map( style => (
7276
<Button
@@ -111,7 +115,11 @@ function GateEdit() {
111115
</Fragment>
112116
) }
113117
</PluginDocumentSettingPanel>
114-
<PluginDocumentSettingPanel name="content-gate-settings-panel" title={ __( 'Settings', 'newspack-plugin' ) }>
118+
<PluginDocumentSettingPanel
119+
name="content-gate-settings-panel"
120+
className="newspack-content-gate-panel"
121+
title={ __( 'Settings', 'newspack-plugin' ) }
122+
>
115123
<TextControl
116124
type="number"
117125
min="0"

src/content-gate/editor/editor.scss

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
display: none;
77
}
88

9-
.components-base-control {
10-
margin-bottom: 16px;
9+
.newspack-content-gate-panel .components-base-control {
10+
margin-bottom: wp-vars.$grid-unit-20;
1111
&:last-child {
1212
margin-bottom: 0;
1313
}
@@ -58,28 +58,3 @@
5858
display: none;
5959
}
6060

61-
/**
62-
* Access control block visibility panel.
63-
*/
64-
.newspack-access-control-block-visibility-panel {
65-
.components-base-control,
66-
.components-form-token-field {
67-
width: 100%;
68-
}
69-
// Gutenberg's `.block-editor-block-inspector p:not(.components-base-control__help)` rule
70-
// strips the emotion margin-top on FormTokenField's help text. Nested here to bump
71-
// specificity above Gutenberg's and restore the gap.
72-
.components-form-token-field .components-form-token-field__help {
73-
margin-top: wp-vars.$grid-unit-10;
74-
}
75-
.components-toggle-control {
76-
margin-top: wp-vars.$grid-unit-10;
77-
width: 100%;
78-
.components-base-control__field {
79-
margin-bottom: wp-vars.$grid-unit-05;
80-
}
81-
.components-base-control__help {
82-
margin-top: 0;
83-
}
84-
}
85-
}

src/content-gate/editor/metering-settings.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ function MeteringSettings() {
1616
} );
1717
const { editPost } = useDispatch( 'core/editor' );
1818
return (
19-
<PluginDocumentSettingPanel name="content-gate-metering-panel" title={ __( 'Metering', 'newspack-plugin' ) }>
19+
<PluginDocumentSettingPanel
20+
name="content-gate-metering-panel"
21+
className="newspack-content-gate-panel"
22+
title={ __( 'Metering', 'newspack-plugin' ) }
23+
>
2024
<CheckboxControl
2125
label={ __( 'Enable metering', 'newspack-plugin' ) }
2226
checked={ meta.metering }

0 commit comments

Comments
 (0)