@automattic/newspack-blocks 2.2.0 → 2.2.1

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
+ ## [2.2.1](https://github.com/Automattic/newspack-blocks/compare/v2.2.0...v2.2.1) (2023-11-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **homepage-posts:** placement for inline styles ([#1611](https://github.com/Automattic/newspack-blocks/issues/1611)) ([1831ba0](https://github.com/Automattic/newspack-blocks/commit/1831ba0a2d0eb44a00e65a891c9fdf11bdd99f0a))
7
+
1
8
  # [2.2.0](https://github.com/Automattic/newspack-blocks/compare/v2.1.0...v2.2.0) (2023-11-27)
2
9
 
3
10
 
@@ -7,7 +7,7 @@
7
7
  * Author URI: https://newspack.com/
8
8
  * Text Domain: newspack-blocks
9
9
  * Domain Path: /languages
10
- * Version: 2.2.0
10
+ * Version: 2.2.1
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', '2.2.0' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '2.2.1' );
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": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "author": "Automattic",
5
5
  "devDependencies": {
6
6
  "@rushstack/eslint-patch": "^1.5.1",
@@ -229,7 +229,7 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
229
229
  $block_name = apply_filters( 'newspack_blocks_block_name', 'newspack-blocks/homepage-articles' );
230
230
 
231
231
  // Gather all Homepage Articles blocks on the page and output only the needed CSS.
232
- // This CSS will be printed right after .entry-content.
232
+ // This CSS will be printed along with the first found block markup.
233
233
  global $newspack_blocks_hpb_all_blocks;
234
234
  $inline_style_html = '';
235
235
  if ( ! is_array( $newspack_blocks_hpb_all_blocks ) ) {
@@ -358,6 +358,7 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
358
358
  class="<?php echo esc_attr( $classes ); ?>"
359
359
  style="<?php echo esc_attr( $styles ); ?>"
360
360
  >
361
+ <?php echo $inline_style_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
361
362
  <div data-posts data-current-post-id="<?php the_ID(); ?>">
362
363
  <?php if ( '' !== $attributes['sectionHeader'] ) : ?>
363
364
  <h2 class="article-section-title">
@@ -404,7 +405,7 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
404
405
  $content = ob_get_clean();
405
406
  Newspack_Blocks::enqueue_view_assets( 'homepage-articles' );
406
407
 
407
- return $inline_style_html . $content;
408
+ return $content;
408
409
  }
409
410
 
410
411
  /**
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
22
22
 
23
23
  require_once __DIR__ . '/composer/autoload_real.php';
24
24
 
25
- return ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16::getLoader();
25
+ return ComposerAutoloaderInit1245a45aec3c828e40fadb14462a814e::getLoader();
@@ -2,7 +2,7 @@
2
2
 
3
3
  // autoload_real.php @generated by Composer
4
4
 
5
- class ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16
5
+ class ComposerAutoloaderInit1245a45aec3c828e40fadb14462a814e
6
6
  {
7
7
  private static $loader;
8
8
 
@@ -22,12 +22,12 @@ class ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16
22
22
  return self::$loader;
23
23
  }
24
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16', 'loadClassLoader'), true, true);
25
+ spl_autoload_register(array('ComposerAutoloaderInit1245a45aec3c828e40fadb14462a814e', 'loadClassLoader'), true, true);
26
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
- spl_autoload_unregister(array('ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16', 'loadClassLoader'));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit1245a45aec3c828e40fadb14462a814e', 'loadClassLoader'));
28
28
 
29
29
  require __DIR__ . '/autoload_static.php';
30
- call_user_func(\Composer\Autoload\ComposerStaticInit71572603e90630c212f3dbb0a10c0c16::getInitializer($loader));
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit1245a45aec3c828e40fadb14462a814e::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 ComposerStaticInit71572603e90630c212f3dbb0a10c0c16
7
+ class ComposerStaticInit1245a45aec3c828e40fadb14462a814e
8
8
  {
9
9
  public static $classMap = array (
10
10
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
@@ -13,7 +13,7 @@ class ComposerStaticInit71572603e90630c212f3dbb0a10c0c16
13
13
  public static function getInitializer(ClassLoader $loader)
14
14
  {
15
15
  return \Closure::bind(function () use ($loader) {
16
- $loader->classMap = ComposerStaticInit71572603e90630c212f3dbb0a10c0c16::$classMap;
16
+ $loader->classMap = ComposerStaticInit1245a45aec3c828e40fadb14462a814e::$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-master',
5
5
  'version' => 'dev-master',
6
- 'reference' => '5a2c83bff83cfdcc95fe94c11a039ab718ef76ef',
6
+ 'reference' => '1831ba0a2d0eb44a00e65a891c9fdf11bdd99f0a',
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-master',
15
15
  'version' => 'dev-master',
16
- 'reference' => '5a2c83bff83cfdcc95fe94c11a039ab718ef76ef',
16
+ 'reference' => '1831ba0a2d0eb44a00e65a891c9fdf11bdd99f0a',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),