diff --git a/languages/newspack-blocks-de_DE.po b/languages/newspack-blocks-de_DE.po index 75fda48d8..273ab3ebc 100644 --- a/languages/newspack-blocks-de_DE.po +++ b/languages/newspack-blocks-de_DE.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: 2024-08-30 08:45-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -496,24 +496,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "Gehe zu Bild %d" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "Vorheriger Slide" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "Nächste Folie" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "Diashow pausieren" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "Diashow abspielen" @@ -657,17 +657,17 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "" "Unfortunately your order cannot be processed. Please attempt your purchase " "again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/languages/newspack-blocks-es_ES.po b/languages/newspack-blocks-es_ES.po index ba8a79e15..28fdf9d36 100644 --- a/languages/newspack-blocks-es_ES.po +++ b/languages/newspack-blocks-es_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: 2025-08-12T14:56:45+00:00\n" "Last-Translator: \n" "Language-Team: \n" @@ -488,24 +488,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "" @@ -649,17 +649,17 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "" "Unfortunately your order cannot be processed. Please attempt your purchase " "again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/languages/newspack-blocks-fr_BE.po b/languages/newspack-blocks-fr_BE.po index 0ed081853..779817270 100644 --- a/languages/newspack-blocks-fr_BE.po +++ b/languages/newspack-blocks-fr_BE.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "Allez à la diapositive %d" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "Diapositive précédente" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "Diapositive suivante" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "Mettre le diaporama en pause" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "Démarrer le diaporama" @@ -648,17 +648,17 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "" "Unfortunately your order cannot be processed. Please attempt your purchase " "again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/languages/newspack-blocks-nb_NO.po b/languages/newspack-blocks-nb_NO.po index 32a0f4731..aac1d1bc6 100644 --- a/languages/newspack-blocks-nb_NO.po +++ b/languages/newspack-blocks-nb_NO.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "" @@ -647,17 +647,17 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "" "Unfortunately your order cannot be processed. Please attempt your purchase " "again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/languages/newspack-blocks-pt_PT.po b/languages/newspack-blocks-pt_PT.po index 4c8f7e82f..3be593e44 100644 --- a/languages/newspack-blocks-pt_PT.po +++ b/languages/newspack-blocks-pt_PT.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -486,24 +486,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "Slide Anterior" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "Próximo Slide" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "Pausa na apresentação" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "" @@ -647,17 +647,17 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "" "Unfortunately your order cannot be processed. Please attempt your purchase " "again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/languages/newspack-blocks.pot b/languages/newspack-blocks.pot index d290bb7da..a9782ab9d 100644 --- a/languages/newspack-blocks.pot +++ b/languages/newspack-blocks.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" +"POT-Creation-Date: 2025-12-03T17:31:19+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: newspack-blocks\n" @@ -480,24 +480,24 @@ msgid "Subscribe Pattern 7" msgstr "" #. translators: %d: Slide number. -#: src/blocks/carousel/view.php:221 +#: src/blocks/carousel/view.php:227 #, php-format msgid "Go to slide %d" msgstr "" -#: src/blocks/carousel/view.php:242 +#: src/blocks/carousel/view.php:248 msgid "Previous Slide" msgstr "" -#: src/blocks/carousel/view.php:243 +#: src/blocks/carousel/view.php:249 msgid "Next Slide" msgstr "" -#: src/blocks/carousel/view.php:287 +#: src/blocks/carousel/view.php:293 msgid "Pause Slideshow" msgstr "" -#: src/blocks/carousel/view.php:288 +#: src/blocks/carousel/view.php:294 msgid "Play Slideshow" msgstr "" @@ -638,15 +638,15 @@ msgstr "" msgid "Recipient: " msgstr "" -#: src/modal-checkout/templates/thankyou.php:79 +#: src/modal-checkout/templates/thankyou.php:78 msgid "Unfortunately your order cannot be processed. Please attempt your purchase again." msgstr "" -#: src/modal-checkout/templates/thankyou.php:82 +#: src/modal-checkout/templates/thankyou.php:81 msgid "Pay" msgstr "" -#: src/modal-checkout/templates/thankyou.php:84 +#: src/modal-checkout/templates/thankyou.php:83 msgid "My account" msgstr "" diff --git a/newspack-blocks.php b/newspack-blocks.php index b5e27a658..2ab437f6c 100755 --- a/newspack-blocks.php +++ b/newspack-blocks.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.com/ * Text Domain: newspack-blocks * Domain Path: /languages - * Version: 4.19.0 + * Version: 4.20.0-alpha.1 * * @package Newspack_Blocks */ @@ -15,7 +15,7 @@ define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ ); define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' ); define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) ); -define( 'NEWSPACK_BLOCKS__VERSION', '4.19.0' ); +define( 'NEWSPACK_BLOCKS__VERSION', '4.20.0-alpha.1' ); require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php'; diff --git a/src/blocks/carousel/view.php b/src/blocks/carousel/view.php index 372e65fb2..04497a9cd 100644 --- a/src/blocks/carousel/view.php +++ b/src/blocks/carousel/view.php @@ -13,6 +13,12 @@ * @return string Returns the post content with latest posts added. */ function newspack_blocks_render_block_carousel( $attributes ) { + + // Don't output the block inside RSS feeds. + if ( is_feed() ) { + return; + } + static $newspack_blocks_carousel_id = 0; global $newspack_blocks_post_id; diff --git a/src/modal-checkout/templates/thankyou.php b/src/modal-checkout/templates/thankyou.php index 714c4f776..ff5e07443 100644 --- a/src/modal-checkout/templates/thankyou.php +++ b/src/modal-checkout/templates/thankyou.php @@ -29,63 +29,59 @@ * order-received.php template with an order details summary so the experience * matches whether or not the email address used is already associated with an * existing customer account. + * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound */ -function newspack_blocks_replace_login_with_order_summary() { - $order = isset( $_GET['order_id'] ) ? \wc_get_order( \absint( \wp_unslash( $_GET['order_id'] ) ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $key = isset( $_GET['key'] ) ? \wc_clean( \sanitize_text_field( \wp_unslash( $_GET['key'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $is_valid = $order && is_a( $order, 'WC_Order' ) && hash_equals( $order->get_order_key(), $key ); // Validate order key to prevent CSRF. +$key = isset( $_GET['key'] ) ? \wc_clean( \sanitize_text_field( \wp_unslash( $_GET['key'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended +$is_valid = $order && is_a( $order, 'WC_Order' ) && hash_equals( $order->get_order_key(), $key ); // Validate order key to prevent CSRF. - if ( ! $is_valid ) { - return; - } - - $is_success = ! $order->has_status( 'failed' ); - $after_success_behavior = isset( $_GET['after_success_behavior'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_behavior'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $after_success_url = isset( $_GET['after_success_url'] ) ? esc_url( \sanitize_url( \wp_unslash( $_GET['after_success_url'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $after_success_label = isset( $_GET['after_success_button_label'] ) ? \sanitize_text_field( \wp_unslash( $_GET['after_success_button_label'] ) ) : \Newspack_Blocks\Modal_Checkout::get_modal_checkout_labels( 'after_success' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $checkout_data = Checkout_Data::get_checkout_data( $order ); - ?> -
- - - -
-- -
-