@automattic/newspack-blocks 4.33.0 → 4.33.2
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 +14 -0
- package/dist/iframe/view.asset.php +1 -1
- package/dist/iframe/view.js +1 -1
- package/includes/class-newspack-blocks.php +70 -0
- package/languages/newspack-blocks-de_DE.po +19 -19
- package/languages/newspack-blocks-es_ES.po +19 -19
- package/languages/newspack-blocks-fr_BE.po +19 -19
- package/languages/newspack-blocks-nb_NO.po +19 -19
- package/languages/newspack-blocks-pt_PT.po +19 -19
- package/languages/newspack-blocks.pot +20 -20
- package/newspack-blocks.php +2 -2
- package/package.json +1 -1
- package/src/blocks/carousel/view.php +6 -0
- package/src/blocks/homepage-articles/view.php +6 -0
- package/src/blocks/iframe/view.js +15 -2
- package/src/blocks/iframe/view.test.js +32 -4
- package/vendor/composer/installed.php +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## @automattic/newspack-blocks [4.33.2](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.33.1...newspack-blocks@4.33.2) (2026-09-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* skip Content Loop/Carousel render for REST revisions and autosaves ([26b84c9](https://github.com/Automattic/newspack-workspace/commit/26b84c9e2bbf0021a534c20984eb95b0b33aec43))
|
|
7
|
+
|
|
8
|
+
## @automattic/newspack-blocks [4.33.1](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.33.0...newspack-blocks@4.33.1) (2026-09-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **iframe:** stop lazy-loaded embeds loading the page inside them ([#1115](https://github.com/Automattic/newspack-workspace/issues/1115)) ([bb97d4c](https://github.com/Automattic/newspack-workspace/commit/bb97d4c46864b3260f24b22690bb570eaf91e404))
|
|
14
|
+
|
|
1
15
|
# @automattic/newspack-blocks [4.33.0](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.32.1...newspack-blocks@4.33.0) (2026-09-18)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-dom-ready'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-dom-ready'), 'version' => '99e53b29d2f8cbe6ee9e');
|
package/dist/iframe/view.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var
|
|
1
|
+
(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;e.n(t)()(()=>{Array.from(document.querySelectorAll(".wp-block-newspack-blocks-iframe iframe")).forEach(e=>{let t=0;const n=setInterval(()=>{!(e=>Boolean(e.getAttribute("src")))(e)||!(e=>{const t=e.contentDocument;return null!==t&&"about:blank"===t.URL})(e)||t>=10?clearInterval(n):(t++,e.contentWindow.location.replace(e.src))},2e3);window.addEventListener("message",function(t){if(t.origin!==new URL(e.src).origin||e.contentWindow!==t.source)return;let n=0;t.data&&t.data.height&&("number"==typeof t.data.height?n=t.data.height:"string"==typeof t.data.height&&(n=Number(t.data.height))),!isNaN(n)&&n>0&&(e.parentElement&&"auto"!==e.parentElement.style.height&&(e.parentElement.style.height="auto"),e.style.height=n+"px")})})})})();
|
|
@@ -28,6 +28,19 @@ class Newspack_Blocks {
|
|
|
28
28
|
*/
|
|
29
29
|
private static $content_render_depth = 0;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Stack of routes for the REST requests currently being served, innermost
|
|
33
|
+
* last. Pushed on `rest_request_before_callbacks` and popped on
|
|
34
|
+
* `rest_request_after_callbacks`, which bracket the endpoint callback on every
|
|
35
|
+
* dispatch path (HTTP, `rest_do_request()`, batch, embeds, preload). Using a
|
|
36
|
+
* stack, rather than a single value cleared on `rest_post_dispatch`, keeps an
|
|
37
|
+
* in-process request from leaving its route set after it returns, and restores
|
|
38
|
+
* the outer route when a nested request completes.
|
|
39
|
+
*
|
|
40
|
+
* @var string[]
|
|
41
|
+
*/
|
|
42
|
+
private static $rest_route_stack = [];
|
|
43
|
+
|
|
31
44
|
/**
|
|
32
45
|
* Add hooks and filters.
|
|
33
46
|
*/
|
|
@@ -42,6 +55,8 @@ class Newspack_Blocks {
|
|
|
42
55
|
add_filter( 'the_content', [ __CLASS__, 'end_content_render_pass' ], PHP_INT_MAX );
|
|
43
56
|
add_filter( 'body_class', [ __CLASS__, 'add_body_classes' ] );
|
|
44
57
|
add_filter( 'admin_body_class', [ __CLASS__, 'add_body_classes' ] );
|
|
58
|
+
add_filter( 'rest_request_before_callbacks', [ __CLASS__, 'push_rest_route' ], 10, 3 );
|
|
59
|
+
add_filter( 'rest_request_after_callbacks', [ __CLASS__, 'pop_rest_route' ], 10, 3 );
|
|
45
60
|
|
|
46
61
|
/**
|
|
47
62
|
* Disable NextGEN's `C_NextGen_Shortcode_Manager`.
|
|
@@ -679,6 +694,61 @@ class Newspack_Blocks {
|
|
|
679
694
|
return ! $is_front_end;
|
|
680
695
|
}
|
|
681
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Remember the route of the REST request whose callback is about to run.
|
|
699
|
+
*
|
|
700
|
+
* WordPress has no accessor for the request currently in flight, so track it
|
|
701
|
+
* around the endpoint callback. `rest_request_before_callbacks` fires on every
|
|
702
|
+
* dispatch path, including in-process `rest_do_request()` calls that never
|
|
703
|
+
* reach `rest_post_dispatch`, so pairing it with `rest_request_after_callbacks`
|
|
704
|
+
* keeps the route from leaking past the request. Passes the value through
|
|
705
|
+
* unchanged.
|
|
706
|
+
*
|
|
707
|
+
* @param mixed $response Callback result to be replaced, unused here.
|
|
708
|
+
* @param array $handler Matched route handler, unused here.
|
|
709
|
+
* @param WP_REST_Request $request The request being dispatched.
|
|
710
|
+
* @return mixed The unchanged $response.
|
|
711
|
+
*/
|
|
712
|
+
public static function push_rest_route( $response, $handler, $request ) {
|
|
713
|
+
self::$rest_route_stack[] = $request->get_route();
|
|
714
|
+
return $response;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Forget the route once its callback has run, so it never leaks into later work
|
|
719
|
+
* in a long-running process. `rest_request_after_callbacks` fires even when the
|
|
720
|
+
* permission check or callback returned an error, so it always balances the
|
|
721
|
+
* matching `push_rest_route()`.
|
|
722
|
+
*
|
|
723
|
+
* @param mixed $response Callback result to be served, passed through.
|
|
724
|
+
* @param array $handler Matched route handler, unused here.
|
|
725
|
+
* @param WP_REST_Request $request The request that was dispatched, unused here.
|
|
726
|
+
* @return mixed The unchanged $response.
|
|
727
|
+
*/
|
|
728
|
+
public static function pop_rest_route( $response, $handler, $request ) {
|
|
729
|
+
array_pop( self::$rest_route_stack );
|
|
730
|
+
return $response;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Whether the current render is happening while a revision or autosave is being
|
|
735
|
+
* prepared for the REST API.
|
|
736
|
+
*
|
|
737
|
+
* The revisions and autosaves endpoints render a revision's `content.rendered`
|
|
738
|
+
* through `the_content`, which runs every dynamic block's render callback. That
|
|
739
|
+
* output is never displayed, so a Content Loop or Carousel block can skip its
|
|
740
|
+
* query entirely, which matters on sites where the editor autosaves against a
|
|
741
|
+
* large post set. Checks the innermost in-flight route so a nested request is
|
|
742
|
+
* judged on its own endpoint, not an outer one.
|
|
743
|
+
*
|
|
744
|
+
* @return bool
|
|
745
|
+
*/
|
|
746
|
+
public static function is_rest_revision_or_autosave_render() {
|
|
747
|
+
$route = end( self::$rest_route_stack );
|
|
748
|
+
return ! empty( $route )
|
|
749
|
+
&& (bool) preg_match( '#/(?:revisions|autosaves)(?:/\d+)?$#', $route );
|
|
750
|
+
}
|
|
751
|
+
|
|
682
752
|
/**
|
|
683
753
|
* Forget which posts have been rendered so far, so the next Content Loop or
|
|
684
754
|
* Carousel block starts deduplicating from scratch.
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
5
|
-
"POT-Creation-Date: 2026-09-
|
|
5
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:45-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -309,45 +309,45 @@ msgstr ""
|
|
|
309
309
|
msgid "Newspack Subscribe"
|
|
310
310
|
msgstr ""
|
|
311
311
|
|
|
312
|
-
#: includes/class-newspack-blocks.php:
|
|
312
|
+
#: includes/class-newspack-blocks.php:1132
|
|
313
313
|
msgid "Common"
|
|
314
314
|
msgstr ""
|
|
315
315
|
|
|
316
316
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
317
|
-
#: includes/class-newspack-blocks.php:
|
|
317
|
+
#: includes/class-newspack-blocks.php:1233
|
|
318
318
|
msgid " and "
|
|
319
319
|
msgstr " und "
|
|
320
320
|
|
|
321
321
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
322
|
-
#: includes/class-newspack-blocks.php:
|
|
322
|
+
#: includes/class-newspack-blocks.php:1236
|
|
323
323
|
msgid ", "
|
|
324
324
|
msgstr ""
|
|
325
325
|
|
|
326
|
-
#: includes/class-newspack-blocks.php:
|
|
326
|
+
#: includes/class-newspack-blocks.php:1571
|
|
327
327
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
328
328
|
msgstr ""
|
|
329
329
|
|
|
330
|
-
#: includes/class-newspack-blocks.php:
|
|
330
|
+
#: includes/class-newspack-blocks.php:1604 dist/editor.js:30
|
|
331
331
|
#: src/shared/js/utils.js:54
|
|
332
332
|
msgid "Draft"
|
|
333
333
|
msgstr ""
|
|
334
334
|
|
|
335
|
-
#: includes/class-newspack-blocks.php:
|
|
335
|
+
#: includes/class-newspack-blocks.php:1605 dist/editor.js:30
|
|
336
336
|
#: src/shared/js/utils.js:54
|
|
337
337
|
msgid "Scheduled"
|
|
338
338
|
msgstr ""
|
|
339
339
|
|
|
340
340
|
#. Translators: %s is the %s is the frequency.
|
|
341
|
-
#: includes/class-newspack-blocks.php:
|
|
341
|
+
#: includes/class-newspack-blocks.php:1803 dist/editor.js:52
|
|
342
342
|
#, php-format
|
|
343
343
|
msgid "per %s"
|
|
344
344
|
msgstr ""
|
|
345
345
|
|
|
346
|
-
#: includes/class-newspack-blocks.php:
|
|
346
|
+
#: includes/class-newspack-blocks.php:1834
|
|
347
347
|
msgid " once"
|
|
348
348
|
msgstr ""
|
|
349
349
|
|
|
350
|
-
#: includes/class-newspack-blocks.php:
|
|
350
|
+
#: includes/class-newspack-blocks.php:1837
|
|
351
351
|
msgid " per "
|
|
352
352
|
msgstr ""
|
|
353
353
|
|
|
@@ -561,24 +561,24 @@ msgid "Centered"
|
|
|
561
561
|
msgstr ""
|
|
562
562
|
|
|
563
563
|
#. translators: %d: Slide number.
|
|
564
|
-
#: src/blocks/carousel/view.php:
|
|
564
|
+
#: src/blocks/carousel/view.php:243
|
|
565
565
|
#, php-format
|
|
566
566
|
msgid "Go to slide %d"
|
|
567
567
|
msgstr "Gehe zu Bild %d"
|
|
568
568
|
|
|
569
|
-
#: src/blocks/carousel/view.php:
|
|
569
|
+
#: src/blocks/carousel/view.php:264
|
|
570
570
|
msgid "Previous Slide"
|
|
571
571
|
msgstr "Vorheriger Slide"
|
|
572
572
|
|
|
573
|
-
#: src/blocks/carousel/view.php:
|
|
573
|
+
#: src/blocks/carousel/view.php:265
|
|
574
574
|
msgid "Next Slide"
|
|
575
575
|
msgstr "Nächste Folie"
|
|
576
576
|
|
|
577
|
-
#: src/blocks/carousel/view.php:
|
|
577
|
+
#: src/blocks/carousel/view.php:309
|
|
578
578
|
msgid "Pause Slideshow"
|
|
579
579
|
msgstr "Diashow pausieren"
|
|
580
580
|
|
|
581
|
-
#: src/blocks/carousel/view.php:
|
|
581
|
+
#: src/blocks/carousel/view.php:310
|
|
582
582
|
msgid "Play Slideshow"
|
|
583
583
|
msgstr "Diashow abspielen"
|
|
584
584
|
|
|
@@ -634,20 +634,20 @@ msgstr "Spendenbetrag"
|
|
|
634
634
|
msgid "Other"
|
|
635
635
|
msgstr "Andere"
|
|
636
636
|
|
|
637
|
-
#: src/blocks/homepage-articles/view.php:
|
|
637
|
+
#: src/blocks/homepage-articles/view.php:415 dist/editor.js:64
|
|
638
638
|
msgid "Load more posts"
|
|
639
639
|
msgstr "Mehr Beiträge laden"
|
|
640
640
|
|
|
641
|
-
#: src/blocks/homepage-articles/view.php:
|
|
641
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
642
642
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
643
643
|
msgstr ""
|
|
644
644
|
|
|
645
|
-
#: src/blocks/homepage-articles/view.php:
|
|
645
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
646
646
|
msgctxt "post author"
|
|
647
647
|
msgid "by"
|
|
648
648
|
msgstr "von"
|
|
649
649
|
|
|
650
|
-
#: src/blocks/homepage-articles/view.php:
|
|
650
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
651
651
|
msgctxt "post author"
|
|
652
652
|
msgid " and "
|
|
653
653
|
msgstr " und "
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
5
|
-
"POT-Creation-Date: 2026-09-
|
|
5
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2025-08-12T14:56:45+00:00\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -301,45 +301,45 @@ msgstr ""
|
|
|
301
301
|
msgid "Newspack Subscribe"
|
|
302
302
|
msgstr ""
|
|
303
303
|
|
|
304
|
-
#: includes/class-newspack-blocks.php:
|
|
304
|
+
#: includes/class-newspack-blocks.php:1132
|
|
305
305
|
msgid "Common"
|
|
306
306
|
msgstr ""
|
|
307
307
|
|
|
308
308
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
309
|
-
#: includes/class-newspack-blocks.php:
|
|
309
|
+
#: includes/class-newspack-blocks.php:1233
|
|
310
310
|
msgid " and "
|
|
311
311
|
msgstr " y "
|
|
312
312
|
|
|
313
313
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
314
|
-
#: includes/class-newspack-blocks.php:
|
|
314
|
+
#: includes/class-newspack-blocks.php:1236
|
|
315
315
|
msgid ", "
|
|
316
316
|
msgstr ""
|
|
317
317
|
|
|
318
|
-
#: includes/class-newspack-blocks.php:
|
|
318
|
+
#: includes/class-newspack-blocks.php:1571
|
|
319
319
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
320
320
|
msgstr ""
|
|
321
321
|
|
|
322
|
-
#: includes/class-newspack-blocks.php:
|
|
322
|
+
#: includes/class-newspack-blocks.php:1604 dist/editor.js:30
|
|
323
323
|
#: src/shared/js/utils.js:54
|
|
324
324
|
msgid "Draft"
|
|
325
325
|
msgstr ""
|
|
326
326
|
|
|
327
|
-
#: includes/class-newspack-blocks.php:
|
|
327
|
+
#: includes/class-newspack-blocks.php:1605 dist/editor.js:30
|
|
328
328
|
#: src/shared/js/utils.js:54
|
|
329
329
|
msgid "Scheduled"
|
|
330
330
|
msgstr ""
|
|
331
331
|
|
|
332
332
|
#. Translators: %s is the %s is the frequency.
|
|
333
|
-
#: includes/class-newspack-blocks.php:
|
|
333
|
+
#: includes/class-newspack-blocks.php:1803 dist/editor.js:52
|
|
334
334
|
#, php-format
|
|
335
335
|
msgid "per %s"
|
|
336
336
|
msgstr ""
|
|
337
337
|
|
|
338
|
-
#: includes/class-newspack-blocks.php:
|
|
338
|
+
#: includes/class-newspack-blocks.php:1834
|
|
339
339
|
msgid " once"
|
|
340
340
|
msgstr ""
|
|
341
341
|
|
|
342
|
-
#: includes/class-newspack-blocks.php:
|
|
342
|
+
#: includes/class-newspack-blocks.php:1837
|
|
343
343
|
msgid " per "
|
|
344
344
|
msgstr ""
|
|
345
345
|
|
|
@@ -553,24 +553,24 @@ msgid "Centered"
|
|
|
553
553
|
msgstr ""
|
|
554
554
|
|
|
555
555
|
#. translators: %d: Slide number.
|
|
556
|
-
#: src/blocks/carousel/view.php:
|
|
556
|
+
#: src/blocks/carousel/view.php:243
|
|
557
557
|
#, php-format
|
|
558
558
|
msgid "Go to slide %d"
|
|
559
559
|
msgstr ""
|
|
560
560
|
|
|
561
|
-
#: src/blocks/carousel/view.php:
|
|
561
|
+
#: src/blocks/carousel/view.php:264
|
|
562
562
|
msgid "Previous Slide"
|
|
563
563
|
msgstr ""
|
|
564
564
|
|
|
565
|
-
#: src/blocks/carousel/view.php:
|
|
565
|
+
#: src/blocks/carousel/view.php:265
|
|
566
566
|
msgid "Next Slide"
|
|
567
567
|
msgstr ""
|
|
568
568
|
|
|
569
|
-
#: src/blocks/carousel/view.php:
|
|
569
|
+
#: src/blocks/carousel/view.php:309
|
|
570
570
|
msgid "Pause Slideshow"
|
|
571
571
|
msgstr ""
|
|
572
572
|
|
|
573
|
-
#: src/blocks/carousel/view.php:
|
|
573
|
+
#: src/blocks/carousel/view.php:310
|
|
574
574
|
msgid "Play Slideshow"
|
|
575
575
|
msgstr ""
|
|
576
576
|
|
|
@@ -626,20 +626,20 @@ msgstr "Monto de la donación"
|
|
|
626
626
|
msgid "Other"
|
|
627
627
|
msgstr "Otro"
|
|
628
628
|
|
|
629
|
-
#: src/blocks/homepage-articles/view.php:
|
|
629
|
+
#: src/blocks/homepage-articles/view.php:415 dist/editor.js:64
|
|
630
630
|
msgid "Load more posts"
|
|
631
631
|
msgstr ""
|
|
632
632
|
|
|
633
|
-
#: src/blocks/homepage-articles/view.php:
|
|
633
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
634
634
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
635
635
|
msgstr ""
|
|
636
636
|
|
|
637
|
-
#: src/blocks/homepage-articles/view.php:
|
|
637
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
638
638
|
msgctxt "post author"
|
|
639
639
|
msgid "by"
|
|
640
640
|
msgstr "por"
|
|
641
641
|
|
|
642
|
-
#: src/blocks/homepage-articles/view.php:
|
|
642
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
643
643
|
msgctxt "post author"
|
|
644
644
|
msgid " and "
|
|
645
645
|
msgstr " y "
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
5
|
-
"POT-Creation-Date: 2026-09-
|
|
5
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -301,45 +301,45 @@ msgstr ""
|
|
|
301
301
|
msgid "Newspack Subscribe"
|
|
302
302
|
msgstr ""
|
|
303
303
|
|
|
304
|
-
#: includes/class-newspack-blocks.php:
|
|
304
|
+
#: includes/class-newspack-blocks.php:1132
|
|
305
305
|
msgid "Common"
|
|
306
306
|
msgstr ""
|
|
307
307
|
|
|
308
308
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
309
|
-
#: includes/class-newspack-blocks.php:
|
|
309
|
+
#: includes/class-newspack-blocks.php:1233
|
|
310
310
|
msgid " and "
|
|
311
311
|
msgstr " et "
|
|
312
312
|
|
|
313
313
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
314
|
-
#: includes/class-newspack-blocks.php:
|
|
314
|
+
#: includes/class-newspack-blocks.php:1236
|
|
315
315
|
msgid ", "
|
|
316
316
|
msgstr ""
|
|
317
317
|
|
|
318
|
-
#: includes/class-newspack-blocks.php:
|
|
318
|
+
#: includes/class-newspack-blocks.php:1571
|
|
319
319
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
320
320
|
msgstr ""
|
|
321
321
|
|
|
322
|
-
#: includes/class-newspack-blocks.php:
|
|
322
|
+
#: includes/class-newspack-blocks.php:1604 dist/editor.js:30
|
|
323
323
|
#: src/shared/js/utils.js:54
|
|
324
324
|
msgid "Draft"
|
|
325
325
|
msgstr ""
|
|
326
326
|
|
|
327
|
-
#: includes/class-newspack-blocks.php:
|
|
327
|
+
#: includes/class-newspack-blocks.php:1605 dist/editor.js:30
|
|
328
328
|
#: src/shared/js/utils.js:54
|
|
329
329
|
msgid "Scheduled"
|
|
330
330
|
msgstr ""
|
|
331
331
|
|
|
332
332
|
#. Translators: %s is the %s is the frequency.
|
|
333
|
-
#: includes/class-newspack-blocks.php:
|
|
333
|
+
#: includes/class-newspack-blocks.php:1803 dist/editor.js:52
|
|
334
334
|
#, php-format
|
|
335
335
|
msgid "per %s"
|
|
336
336
|
msgstr ""
|
|
337
337
|
|
|
338
|
-
#: includes/class-newspack-blocks.php:
|
|
338
|
+
#: includes/class-newspack-blocks.php:1834
|
|
339
339
|
msgid " once"
|
|
340
340
|
msgstr ""
|
|
341
341
|
|
|
342
|
-
#: includes/class-newspack-blocks.php:
|
|
342
|
+
#: includes/class-newspack-blocks.php:1837
|
|
343
343
|
msgid " per "
|
|
344
344
|
msgstr ""
|
|
345
345
|
|
|
@@ -553,24 +553,24 @@ msgid "Centered"
|
|
|
553
553
|
msgstr ""
|
|
554
554
|
|
|
555
555
|
#. translators: %d: Slide number.
|
|
556
|
-
#: src/blocks/carousel/view.php:
|
|
556
|
+
#: src/blocks/carousel/view.php:243
|
|
557
557
|
#, php-format
|
|
558
558
|
msgid "Go to slide %d"
|
|
559
559
|
msgstr "Allez à la diapositive %d"
|
|
560
560
|
|
|
561
|
-
#: src/blocks/carousel/view.php:
|
|
561
|
+
#: src/blocks/carousel/view.php:264
|
|
562
562
|
msgid "Previous Slide"
|
|
563
563
|
msgstr "Diapositive précédente"
|
|
564
564
|
|
|
565
|
-
#: src/blocks/carousel/view.php:
|
|
565
|
+
#: src/blocks/carousel/view.php:265
|
|
566
566
|
msgid "Next Slide"
|
|
567
567
|
msgstr "Diapositive suivante"
|
|
568
568
|
|
|
569
|
-
#: src/blocks/carousel/view.php:
|
|
569
|
+
#: src/blocks/carousel/view.php:309
|
|
570
570
|
msgid "Pause Slideshow"
|
|
571
571
|
msgstr "Mettre le diaporama en pause"
|
|
572
572
|
|
|
573
|
-
#: src/blocks/carousel/view.php:
|
|
573
|
+
#: src/blocks/carousel/view.php:310
|
|
574
574
|
msgid "Play Slideshow"
|
|
575
575
|
msgstr "Démarrer le diaporama"
|
|
576
576
|
|
|
@@ -626,21 +626,21 @@ msgstr "Montant du don"
|
|
|
626
626
|
msgid "Other"
|
|
627
627
|
msgstr "Autre"
|
|
628
628
|
|
|
629
|
-
#: src/blocks/homepage-articles/view.php:
|
|
629
|
+
#: src/blocks/homepage-articles/view.php:415 dist/editor.js:64
|
|
630
630
|
msgid "Load more posts"
|
|
631
631
|
msgstr "Charger plus d’articles"
|
|
632
632
|
|
|
633
|
-
#: src/blocks/homepage-articles/view.php:
|
|
633
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
634
634
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
635
635
|
msgstr ""
|
|
636
636
|
"Un problème est survenu. Veuillez actualiser la page et / ou réessayer."
|
|
637
637
|
|
|
638
|
-
#: src/blocks/homepage-articles/view.php:
|
|
638
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
639
639
|
msgctxt "post author"
|
|
640
640
|
msgid "by"
|
|
641
641
|
msgstr "par"
|
|
642
642
|
|
|
643
|
-
#: src/blocks/homepage-articles/view.php:
|
|
643
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
644
644
|
msgctxt "post author"
|
|
645
645
|
msgid " and "
|
|
646
646
|
msgstr " et "
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
5
|
-
"POT-Creation-Date: 2026-09-
|
|
5
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -300,45 +300,45 @@ msgstr ""
|
|
|
300
300
|
msgid "Newspack Subscribe"
|
|
301
301
|
msgstr ""
|
|
302
302
|
|
|
303
|
-
#: includes/class-newspack-blocks.php:
|
|
303
|
+
#: includes/class-newspack-blocks.php:1132
|
|
304
304
|
msgid "Common"
|
|
305
305
|
msgstr ""
|
|
306
306
|
|
|
307
307
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
308
|
-
#: includes/class-newspack-blocks.php:
|
|
308
|
+
#: includes/class-newspack-blocks.php:1233
|
|
309
309
|
msgid " and "
|
|
310
310
|
msgstr " og "
|
|
311
311
|
|
|
312
312
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
313
|
-
#: includes/class-newspack-blocks.php:
|
|
313
|
+
#: includes/class-newspack-blocks.php:1236
|
|
314
314
|
msgid ", "
|
|
315
315
|
msgstr ""
|
|
316
316
|
|
|
317
|
-
#: includes/class-newspack-blocks.php:
|
|
317
|
+
#: includes/class-newspack-blocks.php:1571
|
|
318
318
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
319
319
|
msgstr ""
|
|
320
320
|
|
|
321
|
-
#: includes/class-newspack-blocks.php:
|
|
321
|
+
#: includes/class-newspack-blocks.php:1604 dist/editor.js:30
|
|
322
322
|
#: src/shared/js/utils.js:54
|
|
323
323
|
msgid "Draft"
|
|
324
324
|
msgstr ""
|
|
325
325
|
|
|
326
|
-
#: includes/class-newspack-blocks.php:
|
|
326
|
+
#: includes/class-newspack-blocks.php:1605 dist/editor.js:30
|
|
327
327
|
#: src/shared/js/utils.js:54
|
|
328
328
|
msgid "Scheduled"
|
|
329
329
|
msgstr ""
|
|
330
330
|
|
|
331
331
|
#. Translators: %s is the %s is the frequency.
|
|
332
|
-
#: includes/class-newspack-blocks.php:
|
|
332
|
+
#: includes/class-newspack-blocks.php:1803 dist/editor.js:52
|
|
333
333
|
#, php-format
|
|
334
334
|
msgid "per %s"
|
|
335
335
|
msgstr ""
|
|
336
336
|
|
|
337
|
-
#: includes/class-newspack-blocks.php:
|
|
337
|
+
#: includes/class-newspack-blocks.php:1834
|
|
338
338
|
msgid " once"
|
|
339
339
|
msgstr ""
|
|
340
340
|
|
|
341
|
-
#: includes/class-newspack-blocks.php:
|
|
341
|
+
#: includes/class-newspack-blocks.php:1837
|
|
342
342
|
msgid " per "
|
|
343
343
|
msgstr ""
|
|
344
344
|
|
|
@@ -552,24 +552,24 @@ msgid "Centered"
|
|
|
552
552
|
msgstr ""
|
|
553
553
|
|
|
554
554
|
#. translators: %d: Slide number.
|
|
555
|
-
#: src/blocks/carousel/view.php:
|
|
555
|
+
#: src/blocks/carousel/view.php:243
|
|
556
556
|
#, php-format
|
|
557
557
|
msgid "Go to slide %d"
|
|
558
558
|
msgstr ""
|
|
559
559
|
|
|
560
|
-
#: src/blocks/carousel/view.php:
|
|
560
|
+
#: src/blocks/carousel/view.php:264
|
|
561
561
|
msgid "Previous Slide"
|
|
562
562
|
msgstr ""
|
|
563
563
|
|
|
564
|
-
#: src/blocks/carousel/view.php:
|
|
564
|
+
#: src/blocks/carousel/view.php:265
|
|
565
565
|
msgid "Next Slide"
|
|
566
566
|
msgstr ""
|
|
567
567
|
|
|
568
|
-
#: src/blocks/carousel/view.php:
|
|
568
|
+
#: src/blocks/carousel/view.php:309
|
|
569
569
|
msgid "Pause Slideshow"
|
|
570
570
|
msgstr ""
|
|
571
571
|
|
|
572
|
-
#: src/blocks/carousel/view.php:
|
|
572
|
+
#: src/blocks/carousel/view.php:310
|
|
573
573
|
msgid "Play Slideshow"
|
|
574
574
|
msgstr ""
|
|
575
575
|
|
|
@@ -625,20 +625,20 @@ msgstr "Mengde donasjon"
|
|
|
625
625
|
msgid "Other"
|
|
626
626
|
msgstr "Annet"
|
|
627
627
|
|
|
628
|
-
#: src/blocks/homepage-articles/view.php:
|
|
628
|
+
#: src/blocks/homepage-articles/view.php:415 dist/editor.js:64
|
|
629
629
|
msgid "Load more posts"
|
|
630
630
|
msgstr "Last flere innlegg"
|
|
631
631
|
|
|
632
|
-
#: src/blocks/homepage-articles/view.php:
|
|
632
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
633
633
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
634
634
|
msgstr "Noe gikk galt. Oppdater siden og/eller prøv igjen."
|
|
635
635
|
|
|
636
|
-
#: src/blocks/homepage-articles/view.php:
|
|
636
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
637
637
|
msgctxt "post author"
|
|
638
638
|
msgid "by"
|
|
639
639
|
msgstr "av"
|
|
640
640
|
|
|
641
|
-
#: src/blocks/homepage-articles/view.php:
|
|
641
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
642
642
|
msgctxt "post author"
|
|
643
643
|
msgid " and "
|
|
644
644
|
msgstr " og "
|
|
@@ -2,7 +2,7 @@ msgid ""
|
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n"
|
|
4
4
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
5
|
-
"POT-Creation-Date: 2026-09-
|
|
5
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
6
6
|
"PO-Revision-Date: 2024-08-30 08:46-0700\n"
|
|
7
7
|
"Last-Translator: \n"
|
|
8
8
|
"Language-Team: \n"
|
|
@@ -299,45 +299,45 @@ msgstr ""
|
|
|
299
299
|
msgid "Newspack Subscribe"
|
|
300
300
|
msgstr ""
|
|
301
301
|
|
|
302
|
-
#: includes/class-newspack-blocks.php:
|
|
302
|
+
#: includes/class-newspack-blocks.php:1132
|
|
303
303
|
msgid "Common"
|
|
304
304
|
msgstr ""
|
|
305
305
|
|
|
306
306
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
307
|
-
#: includes/class-newspack-blocks.php:
|
|
307
|
+
#: includes/class-newspack-blocks.php:1233
|
|
308
308
|
msgid " and "
|
|
309
309
|
msgstr " e "
|
|
310
310
|
|
|
311
311
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
312
|
-
#: includes/class-newspack-blocks.php:
|
|
312
|
+
#: includes/class-newspack-blocks.php:1236
|
|
313
313
|
msgid ", "
|
|
314
314
|
msgstr ""
|
|
315
315
|
|
|
316
|
-
#: includes/class-newspack-blocks.php:
|
|
316
|
+
#: includes/class-newspack-blocks.php:1571
|
|
317
317
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
318
318
|
msgstr ""
|
|
319
319
|
|
|
320
|
-
#: includes/class-newspack-blocks.php:
|
|
320
|
+
#: includes/class-newspack-blocks.php:1604 dist/editor.js:30
|
|
321
321
|
#: src/shared/js/utils.js:54
|
|
322
322
|
msgid "Draft"
|
|
323
323
|
msgstr ""
|
|
324
324
|
|
|
325
|
-
#: includes/class-newspack-blocks.php:
|
|
325
|
+
#: includes/class-newspack-blocks.php:1605 dist/editor.js:30
|
|
326
326
|
#: src/shared/js/utils.js:54
|
|
327
327
|
msgid "Scheduled"
|
|
328
328
|
msgstr ""
|
|
329
329
|
|
|
330
330
|
#. Translators: %s is the %s is the frequency.
|
|
331
|
-
#: includes/class-newspack-blocks.php:
|
|
331
|
+
#: includes/class-newspack-blocks.php:1803 dist/editor.js:52
|
|
332
332
|
#, php-format
|
|
333
333
|
msgid "per %s"
|
|
334
334
|
msgstr ""
|
|
335
335
|
|
|
336
|
-
#: includes/class-newspack-blocks.php:
|
|
336
|
+
#: includes/class-newspack-blocks.php:1834
|
|
337
337
|
msgid " once"
|
|
338
338
|
msgstr ""
|
|
339
339
|
|
|
340
|
-
#: includes/class-newspack-blocks.php:
|
|
340
|
+
#: includes/class-newspack-blocks.php:1837
|
|
341
341
|
msgid " per "
|
|
342
342
|
msgstr ""
|
|
343
343
|
|
|
@@ -551,24 +551,24 @@ msgid "Centered"
|
|
|
551
551
|
msgstr ""
|
|
552
552
|
|
|
553
553
|
#. translators: %d: Slide number.
|
|
554
|
-
#: src/blocks/carousel/view.php:
|
|
554
|
+
#: src/blocks/carousel/view.php:243
|
|
555
555
|
#, php-format
|
|
556
556
|
msgid "Go to slide %d"
|
|
557
557
|
msgstr ""
|
|
558
558
|
|
|
559
|
-
#: src/blocks/carousel/view.php:
|
|
559
|
+
#: src/blocks/carousel/view.php:264
|
|
560
560
|
msgid "Previous Slide"
|
|
561
561
|
msgstr "Slide Anterior"
|
|
562
562
|
|
|
563
|
-
#: src/blocks/carousel/view.php:
|
|
563
|
+
#: src/blocks/carousel/view.php:265
|
|
564
564
|
msgid "Next Slide"
|
|
565
565
|
msgstr "Próximo Slide"
|
|
566
566
|
|
|
567
|
-
#: src/blocks/carousel/view.php:
|
|
567
|
+
#: src/blocks/carousel/view.php:309
|
|
568
568
|
msgid "Pause Slideshow"
|
|
569
569
|
msgstr "Pausa na apresentação"
|
|
570
570
|
|
|
571
|
-
#: src/blocks/carousel/view.php:
|
|
571
|
+
#: src/blocks/carousel/view.php:310
|
|
572
572
|
msgid "Play Slideshow"
|
|
573
573
|
msgstr ""
|
|
574
574
|
|
|
@@ -624,20 +624,20 @@ msgstr "Valor da Doação"
|
|
|
624
624
|
msgid "Other"
|
|
625
625
|
msgstr "Outro"
|
|
626
626
|
|
|
627
|
-
#: src/blocks/homepage-articles/view.php:
|
|
627
|
+
#: src/blocks/homepage-articles/view.php:415 dist/editor.js:64
|
|
628
628
|
msgid "Load more posts"
|
|
629
629
|
msgstr "Carregar mais posts"
|
|
630
630
|
|
|
631
|
-
#: src/blocks/homepage-articles/view.php:
|
|
631
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
632
632
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
633
633
|
msgstr ""
|
|
634
634
|
|
|
635
|
-
#: src/blocks/homepage-articles/view.php:
|
|
635
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
636
636
|
msgctxt "post author"
|
|
637
637
|
msgid "by"
|
|
638
638
|
msgstr "por"
|
|
639
639
|
|
|
640
|
-
#: src/blocks/homepage-articles/view.php:
|
|
640
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
641
641
|
msgctxt "post author"
|
|
642
642
|
msgid " and "
|
|
643
643
|
msgstr " e "
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
# This file is distributed under the same license as the Newspack Blocks plugin.
|
|
3
3
|
msgid ""
|
|
4
4
|
msgstr ""
|
|
5
|
-
"Project-Id-Version: Newspack Blocks 4.
|
|
5
|
+
"Project-Id-Version: Newspack Blocks 4.33.1\n"
|
|
6
6
|
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/newspack-blocks\n"
|
|
7
7
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
8
8
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
9
9
|
"MIME-Version: 1.0\n"
|
|
10
10
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
11
11
|
"Content-Transfer-Encoding: 8bit\n"
|
|
12
|
-
"POT-Creation-Date: 2026-09-
|
|
12
|
+
"POT-Creation-Date: 2026-09-26T16:11:48+00:00\n"
|
|
13
13
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
14
14
|
"X-Generator: WP-CLI 2.12.0\n"
|
|
15
15
|
"X-Domain: newspack-blocks\n"
|
|
@@ -294,48 +294,48 @@ msgstr ""
|
|
|
294
294
|
msgid "Newspack Subscribe"
|
|
295
295
|
msgstr ""
|
|
296
296
|
|
|
297
|
-
#: includes/class-newspack-blocks.php:
|
|
297
|
+
#: includes/class-newspack-blocks.php:1132
|
|
298
298
|
msgid "Common"
|
|
299
299
|
msgstr ""
|
|
300
300
|
|
|
301
301
|
#. translators: separates last two sponsor names; needs a space on either side.
|
|
302
|
-
#: includes/class-newspack-blocks.php:
|
|
302
|
+
#: includes/class-newspack-blocks.php:1233
|
|
303
303
|
msgid " and "
|
|
304
304
|
msgstr ""
|
|
305
305
|
|
|
306
306
|
#. translators: separates all but the last two sponsor names; needs a space at the end.
|
|
307
|
-
#: includes/class-newspack-blocks.php:
|
|
307
|
+
#: includes/class-newspack-blocks.php:1236
|
|
308
308
|
msgid ", "
|
|
309
309
|
msgstr ""
|
|
310
310
|
|
|
311
|
-
#: includes/class-newspack-blocks.php:
|
|
311
|
+
#: includes/class-newspack-blocks.php:1571
|
|
312
312
|
msgid "Jetpack donations is disabled in favour of Newspack donations."
|
|
313
313
|
msgstr ""
|
|
314
314
|
|
|
315
|
-
#: includes/class-newspack-blocks.php:
|
|
315
|
+
#: includes/class-newspack-blocks.php:1604
|
|
316
316
|
#: dist/editor.js:30
|
|
317
317
|
#: src/shared/js/utils.js:54
|
|
318
318
|
msgid "Draft"
|
|
319
319
|
msgstr ""
|
|
320
320
|
|
|
321
|
-
#: includes/class-newspack-blocks.php:
|
|
321
|
+
#: includes/class-newspack-blocks.php:1605
|
|
322
322
|
#: dist/editor.js:30
|
|
323
323
|
#: src/shared/js/utils.js:54
|
|
324
324
|
msgid "Scheduled"
|
|
325
325
|
msgstr ""
|
|
326
326
|
|
|
327
327
|
#. Translators: %s is the %s is the frequency.
|
|
328
|
-
#: includes/class-newspack-blocks.php:
|
|
328
|
+
#: includes/class-newspack-blocks.php:1803
|
|
329
329
|
#: dist/editor.js:52
|
|
330
330
|
#, php-format,js-format
|
|
331
331
|
msgid "per %s"
|
|
332
332
|
msgstr ""
|
|
333
333
|
|
|
334
|
-
#: includes/class-newspack-blocks.php:
|
|
334
|
+
#: includes/class-newspack-blocks.php:1834
|
|
335
335
|
msgid " once"
|
|
336
336
|
msgstr ""
|
|
337
337
|
|
|
338
|
-
#: includes/class-newspack-blocks.php:
|
|
338
|
+
#: includes/class-newspack-blocks.php:1837
|
|
339
339
|
msgid " per "
|
|
340
340
|
msgstr ""
|
|
341
341
|
|
|
@@ -565,24 +565,24 @@ msgid "Centered"
|
|
|
565
565
|
msgstr ""
|
|
566
566
|
|
|
567
567
|
#. translators: %d: Slide number.
|
|
568
|
-
#: src/blocks/carousel/view.php:
|
|
568
|
+
#: src/blocks/carousel/view.php:243
|
|
569
569
|
#, php-format
|
|
570
570
|
msgid "Go to slide %d"
|
|
571
571
|
msgstr ""
|
|
572
572
|
|
|
573
|
-
#: src/blocks/carousel/view.php:
|
|
573
|
+
#: src/blocks/carousel/view.php:264
|
|
574
574
|
msgid "Previous Slide"
|
|
575
575
|
msgstr ""
|
|
576
576
|
|
|
577
|
-
#: src/blocks/carousel/view.php:
|
|
577
|
+
#: src/blocks/carousel/view.php:265
|
|
578
578
|
msgid "Next Slide"
|
|
579
579
|
msgstr ""
|
|
580
580
|
|
|
581
|
-
#: src/blocks/carousel/view.php:
|
|
581
|
+
#: src/blocks/carousel/view.php:309
|
|
582
582
|
msgid "Pause Slideshow"
|
|
583
583
|
msgstr ""
|
|
584
584
|
|
|
585
|
-
#: src/blocks/carousel/view.php:
|
|
585
|
+
#: src/blocks/carousel/view.php:310
|
|
586
586
|
msgid "Play Slideshow"
|
|
587
587
|
msgstr ""
|
|
588
588
|
|
|
@@ -637,21 +637,21 @@ msgstr ""
|
|
|
637
637
|
msgid "Other"
|
|
638
638
|
msgstr ""
|
|
639
639
|
|
|
640
|
-
#: src/blocks/homepage-articles/view.php:
|
|
640
|
+
#: src/blocks/homepage-articles/view.php:415
|
|
641
641
|
#: dist/editor.js:64
|
|
642
642
|
msgid "Load more posts"
|
|
643
643
|
msgstr ""
|
|
644
644
|
|
|
645
|
-
#: src/blocks/homepage-articles/view.php:
|
|
645
|
+
#: src/blocks/homepage-articles/view.php:422
|
|
646
646
|
msgid "Something went wrong. Please refresh the page and/or try again."
|
|
647
647
|
msgstr ""
|
|
648
648
|
|
|
649
|
-
#: src/blocks/homepage-articles/view.php:
|
|
649
|
+
#: src/blocks/homepage-articles/view.php:497
|
|
650
650
|
msgctxt "post author"
|
|
651
651
|
msgid "by"
|
|
652
652
|
msgstr ""
|
|
653
653
|
|
|
654
|
-
#: src/blocks/homepage-articles/view.php:
|
|
654
|
+
#: src/blocks/homepage-articles/view.php:514
|
|
655
655
|
msgctxt "post author"
|
|
656
656
|
msgid " and "
|
|
657
657
|
msgstr ""
|
package/newspack-blocks.php
CHANGED
|
@@ -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.33.
|
|
10
|
+
* Version: 4.33.2
|
|
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.33.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '4.33.2' );
|
|
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.33.
|
|
3
|
+
"version": "4.33.2",
|
|
4
4
|
"author": "Automattic",
|
|
5
5
|
"description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,12 @@ function newspack_blocks_render_block_carousel( $attributes ) {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Skip the query when a revision or autosave is being prepared for the REST
|
|
23
|
+
// API: the output is never shown, and the query is costly on large sites.
|
|
24
|
+
if ( Newspack_Blocks::is_rest_revision_or_autosave_render() ) {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
static $newspack_blocks_carousel_id = 0;
|
|
23
29
|
global $newspack_blocks_post_id;
|
|
24
30
|
|
|
@@ -256,6 +256,12 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
|
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
// Skip the query when a revision or autosave is being prepared for the REST
|
|
260
|
+
// API: the output is never shown, and the query is costly on large sites.
|
|
261
|
+
if ( Newspack_Blocks::is_rest_revision_or_autosave_render() ) {
|
|
262
|
+
return '';
|
|
263
|
+
}
|
|
264
|
+
|
|
259
265
|
$block_name = apply_filters( 'newspack_blocks_block_name', 'newspack-blocks/homepage-articles' );
|
|
260
266
|
$article_query = new WP_Query( Newspack_Blocks::build_articles_query( $attributes, $block_name ) );
|
|
261
267
|
if ( ! $article_query->have_posts() ) {
|
|
@@ -26,6 +26,18 @@ const isStillBlank = iframe => {
|
|
|
26
26
|
return doc !== null && doc.URL === 'about:blank';
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Whether the frame has an address of its own to retry. A lazy loader can hold it
|
|
31
|
+
* back until the frame nears the viewport (perfmatters moves it to data-src). With
|
|
32
|
+
* no src, iframe.src is '', which location.replace() resolves to this page, and an
|
|
33
|
+
* empty src attribute reads back as this page's URL. Either way a retry would load
|
|
34
|
+
* the page inside its own frame, where this script runs again on the copy's frames.
|
|
35
|
+
*
|
|
36
|
+
* @param {HTMLIFrameElement} iframe The iframe.
|
|
37
|
+
* @return {boolean} Whether the frame has a src to load.
|
|
38
|
+
*/
|
|
39
|
+
const hasOwnSrc = iframe => Boolean( iframe.getAttribute( 'src' ) );
|
|
40
|
+
|
|
29
41
|
/**
|
|
30
42
|
* Re-navigations before giving up on a frame that never loads. A 204 resolves in a
|
|
31
43
|
* retry or two; without a bound, a permanently blank embed keeps requesting for as
|
|
@@ -39,10 +51,11 @@ domReady( () => {
|
|
|
39
51
|
// Don't wait for the load event: it may have fired before this script ran
|
|
40
52
|
// (delayed JS). Navigate with location.replace(), since resetting src on a
|
|
41
53
|
// loaded frame adds a history entry and makes readers press Back twice
|
|
42
|
-
// (NPPM-3180).
|
|
54
|
+
// (NPPM-3180). The src check runs on each tick rather than once here, so a
|
|
55
|
+
// frame a lazy loader fills in before the first tick still gets its retries.
|
|
43
56
|
let attempts = 0;
|
|
44
57
|
const retry = setInterval( () => {
|
|
45
|
-
if ( ! isStillBlank( iframe ) || attempts >= MAX_RETRIES ) {
|
|
58
|
+
if ( ! hasOwnSrc( iframe ) || ! isStillBlank( iframe ) || attempts >= MAX_RETRIES ) {
|
|
46
59
|
clearInterval( retry );
|
|
47
60
|
return;
|
|
48
61
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The iframe block's retry (NPPM-3180) must leave a frame that already holds a
|
|
3
|
-
* document alone,
|
|
3
|
+
* document alone, must never reset `src`, which adds a history entry, and must
|
|
4
|
+
* never navigate a frame with no src of its own, which would load the page inside it.
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
7
|
const SRC = 'https://embed.example.test/widget';
|
|
@@ -14,10 +15,12 @@ const SRC = 'https://embed.example.test/widget';
|
|
|
14
15
|
* null once a cross-origin document has loaded.
|
|
15
16
|
* A detached frame reports null, as does its
|
|
16
17
|
* contentWindow.
|
|
18
|
+
* @param {string} attributes The frame's markup attributes. A lazy loader may have
|
|
19
|
+
* moved the address out of src.
|
|
17
20
|
* @return {Object} The iframe, its state holder, and the `replace` and `setSrc` spies.
|
|
18
21
|
*/
|
|
19
|
-
function renderIframe( contentDocument ) {
|
|
20
|
-
document.body.innerHTML = `<figure class="wp-block-newspack-blocks-iframe"><div class="wp-block-embed__wrapper"><iframe
|
|
22
|
+
function renderIframe( contentDocument, attributes = `src="${ SRC }"` ) {
|
|
23
|
+
document.body.innerHTML = `<figure class="wp-block-newspack-blocks-iframe"><div class="wp-block-embed__wrapper"><iframe ${ attributes }></iframe></div></figure>`;
|
|
21
24
|
const iframe = document.querySelector( 'iframe' );
|
|
22
25
|
const state = { contentDocument };
|
|
23
26
|
const replace = jest.fn();
|
|
@@ -25,7 +28,12 @@ function renderIframe( contentDocument ) {
|
|
|
25
28
|
const contentWindow = { location: { replace } };
|
|
26
29
|
Object.defineProperty( iframe, 'contentDocument', { configurable: true, get: () => ( iframe.isConnected ? state.contentDocument : null ) } );
|
|
27
30
|
Object.defineProperty( iframe, 'contentWindow', { configurable: true, get: () => ( iframe.isConnected ? contentWindow : null ) } );
|
|
28
|
-
|
|
31
|
+
// Read src back as a browser does: '' with no attribute, otherwise the value resolved against the page.
|
|
32
|
+
Object.defineProperty( iframe, 'src', {
|
|
33
|
+
configurable: true,
|
|
34
|
+
get: () => ( iframe.hasAttribute( 'src' ) ? new URL( iframe.getAttribute( 'src' ), document.baseURI ).href : '' ),
|
|
35
|
+
set: setSrc,
|
|
36
|
+
} );
|
|
29
37
|
jest.isolateModules( () => require( './view' ) );
|
|
30
38
|
return { iframe, state, replace, setSrc };
|
|
31
39
|
}
|
|
@@ -73,6 +81,26 @@ describe( 'iframe block view script', () => {
|
|
|
73
81
|
expect( setSrc ).not.toHaveBeenCalled();
|
|
74
82
|
} );
|
|
75
83
|
|
|
84
|
+
it.each( [
|
|
85
|
+
// perfmatters' markup: the address waits in data-src until the frame nears the viewport.
|
|
86
|
+
[ 'no src', `class="perfmatters-lazy" data-src="${ SRC }"` ],
|
|
87
|
+
[ 'an empty src', 'src=""' ],
|
|
88
|
+
] )( 'never navigates a blank frame with %s, which would load this page inside it', ( _, attributes ) => {
|
|
89
|
+
const { replace, setSrc } = renderIframe( { URL: 'about:blank' }, attributes );
|
|
90
|
+
jest.advanceTimersByTime( 20000 );
|
|
91
|
+
expect( replace ).not.toHaveBeenCalled();
|
|
92
|
+
expect( setSrc ).not.toHaveBeenCalled();
|
|
93
|
+
expect( jest.getTimerCount() ).toBe( 0 );
|
|
94
|
+
} );
|
|
95
|
+
|
|
96
|
+
it( 'retries a lazy-loaded frame that has its src by the first check', () => {
|
|
97
|
+
const { iframe, replace } = renderIframe( { URL: 'about:blank' }, `class="perfmatters-lazy" data-src="${ SRC }"` );
|
|
98
|
+
// The lazy loader copies data-src into src as the frame nears the viewport.
|
|
99
|
+
iframe.setAttribute( 'src', SRC );
|
|
100
|
+
jest.advanceTimersByTime( 2000 );
|
|
101
|
+
expect( replace ).toHaveBeenCalledWith( SRC );
|
|
102
|
+
} );
|
|
103
|
+
|
|
76
104
|
it( 'gives up after 10 attempts on a frame that never loads', () => {
|
|
77
105
|
const { replace } = renderIframe( { URL: 'about:blank' } );
|
|
78
106
|
jest.advanceTimersByTime( 20000 );
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => 'automattic/newspack-blocks',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '61635411a8da066e76232eed8f277cd636741e36',
|
|
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-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '61635411a8da066e76232eed8f277cd636741e36',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|