@automattic/newspack-blocks 4.14.3 → 4.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [4.14.4](https://github.com/Automattic/newspack-blocks/compare/v4.14.3...v4.14.4) (2025-07-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * make sure RTL styles are loaded ([#2164](https://github.com/Automattic/newspack-blocks/issues/2164)) ([c4387f5](https://github.com/Automattic/newspack-blocks/commit/c4387f530c46c924d6181bab5962b59d0700ed6d))
7
+
1
8
  ## [4.14.3](https://github.com/Automattic/newspack-blocks/compare/v4.14.2...v4.14.3) (2025-07-08)
2
9
 
3
10
 
@@ -315,14 +315,16 @@ class Newspack_Blocks {
315
315
  * Enqueue block styles stylesheet.
316
316
  */
317
317
  public static function enqueue_block_styles_assets() {
318
- $style_path = NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . 'block_styles' . ( is_rtl() ? '.rtl' : '' ) . '.css';
318
+ $style_path = NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . 'block_styles.css';
319
319
  if ( file_exists( NEWSPACK_BLOCKS__PLUGIN_DIR . $style_path ) ) {
320
+ $handle = 'newspack-blocks-block-styles-stylesheet';
320
321
  wp_enqueue_style(
321
- 'newspack-blocks-block-styles-stylesheet',
322
+ $handle,
322
323
  plugins_url( $style_path, NEWSPACK_BLOCKS__PLUGIN_FILE ),
323
324
  array(),
324
325
  NEWSPACK_BLOCKS__VERSION
325
326
  );
327
+ wp_style_add_data( $handle, 'rtl', 'replace' );
326
328
  }
327
329
  }
328
330
 
@@ -334,18 +336,20 @@ class Newspack_Blocks {
334
336
  public static function enqueue_view_assets( $type ) {
335
337
  $style_path = apply_filters(
336
338
  'newspack_blocks_enqueue_view_assets',
337
- NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css',
339
+ NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . $type . '/view.css',
338
340
  $type,
339
341
  is_rtl()
340
342
  );
341
343
 
342
344
  if ( file_exists( NEWSPACK_BLOCKS__PLUGIN_DIR . $style_path ) ) {
345
+ $handle = "newspack-blocks-{$type}";
343
346
  wp_enqueue_style(
344
- "newspack-blocks-{$type}",
347
+ $handle,
345
348
  plugins_url( $style_path, NEWSPACK_BLOCKS__PLUGIN_FILE ),
346
349
  array(),
347
350
  NEWSPACK_BLOCKS__VERSION
348
351
  );
352
+ wp_style_add_data( $handle, 'rtl', 'replace' );
349
353
  }
350
354
  $script_data = static::script_enqueue_helper( NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . $type . '/view.js' );
351
355
  if ( $script_data ) {
@@ -7,7 +7,7 @@
7
7
  * Author URI: https://newspack.com/
8
8
  * Text Domain: newspack-blocks
9
9
  * Domain Path: /languages
10
- * Version: 4.14.3
10
+ * Version: 4.14.4
11
11
  *
12
12
  * @package Newspack_Blocks
13
13
  */
@@ -15,7 +15,7 @@
15
15
  define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
16
16
  define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
17
17
  define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
18
- define( 'NEWSPACK_BLOCKS__VERSION', '4.14.3' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '4.14.4' );
19
19
 
20
20
  require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
21
21
  require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/newspack-blocks",
3
- "version": "4.14.3",
3
+ "version": "4.14.4",
4
4
  "author": "Automattic",
5
5
  "devDependencies": {
6
6
  "@rushstack/eslint-patch": "^1.11.0",
@@ -70,13 +70,14 @@ class Newspack_Blocks_Donate_Renderer {
70
70
  wp_script_add_data( $handle, 'async', true );
71
71
 
72
72
  if ( $has_css ) {
73
- $style_path = NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . $filename . ( is_rtl() ? '.rtl' : '' ) . '.css';
73
+ $style_path = NEWSPACK_BLOCKS__BLOCKS_DIRECTORY . $filename . '.css';
74
74
  wp_enqueue_style(
75
75
  $handle,
76
76
  plugins_url( $style_path, NEWSPACK_BLOCKS__PLUGIN_FILE ),
77
77
  [],
78
78
  NEWSPACK_BLOCKS__VERSION
79
79
  );
80
+ wp_style_add_data( $handle, 'rtl', 'replace' );
80
81
  }
81
82
  }
82
83
 
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
22
22
 
23
23
  require_once __DIR__ . '/composer/autoload_real.php';
24
24
 
25
- return ComposerAutoloaderInitbed10c17b9fada2b6607b15302d863da::getLoader();
25
+ return ComposerAutoloaderInitdfd76daebf50d879d14fda8fdb16270c::getLoader();
@@ -2,7 +2,7 @@
2
2
 
3
3
  // autoload_real.php @generated by Composer
4
4
 
5
- class ComposerAutoloaderInitbed10c17b9fada2b6607b15302d863da
5
+ class ComposerAutoloaderInitdfd76daebf50d879d14fda8fdb16270c
6
6
  {
7
7
  private static $loader;
8
8
 
@@ -22,12 +22,12 @@ class ComposerAutoloaderInitbed10c17b9fada2b6607b15302d863da
22
22
  return self::$loader;
23
23
  }
24
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitbed10c17b9fada2b6607b15302d863da', 'loadClassLoader'), true, true);
25
+ spl_autoload_register(array('ComposerAutoloaderInitdfd76daebf50d879d14fda8fdb16270c', 'loadClassLoader'), true, true);
26
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
- spl_autoload_unregister(array('ComposerAutoloaderInitbed10c17b9fada2b6607b15302d863da', 'loadClassLoader'));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitdfd76daebf50d879d14fda8fdb16270c', 'loadClassLoader'));
28
28
 
29
29
  require __DIR__ . '/autoload_static.php';
30
- call_user_func(\Composer\Autoload\ComposerStaticInitbed10c17b9fada2b6607b15302d863da::getInitializer($loader));
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitdfd76daebf50d879d14fda8fdb16270c::getInitializer($loader));
31
31
 
32
32
  $loader->register(true);
33
33
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  namespace Composer\Autoload;
6
6
 
7
- class ComposerStaticInitbed10c17b9fada2b6607b15302d863da
7
+ class ComposerStaticInitdfd76daebf50d879d14fda8fdb16270c
8
8
  {
9
9
  public static $classMap = array (
10
10
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
@@ -13,7 +13,7 @@ class ComposerStaticInitbed10c17b9fada2b6607b15302d863da
13
13
  public static function getInitializer(ClassLoader $loader)
14
14
  {
15
15
  return \Closure::bind(function () use ($loader) {
16
- $loader->classMap = ComposerStaticInitbed10c17b9fada2b6607b15302d863da::$classMap;
16
+ $loader->classMap = ComposerStaticInitdfd76daebf50d879d14fda8fdb16270c::$classMap;
17
17
 
18
18
  }, null, ClassLoader::class);
19
19
  }
@@ -3,7 +3,7 @@
3
3
  'name' => 'automattic/newspack-blocks',
4
4
  'pretty_version' => 'dev-trunk',
5
5
  'version' => 'dev-trunk',
6
- 'reference' => 'c9ba6ec285e2da43d1178451e9d80bba8044974a',
6
+ 'reference' => 'c4387f530c46c924d6181bab5962b59d0700ed6d',
7
7
  'type' => 'wordpress-plugin',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  'automattic/newspack-blocks' => array(
14
14
  'pretty_version' => 'dev-trunk',
15
15
  'version' => 'dev-trunk',
16
- 'reference' => 'c9ba6ec285e2da43d1178451e9d80bba8044974a',
16
+ 'reference' => 'c4387f530c46c924d6181bab5962b59d0700ed6d',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),