PluginProbe
Countdown Timer Block – build urgency for events and launches / 1.2.8
Countdown Timer Block – build urgency for events and launches v1.2.8
1.3.3 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 All 32 releases
← All changes | build/render.php +5 -16 trunk1.2.8 View file →
@@ -1,22 +1,11 @@
1 1 <?php
2 -/**
3 - * Block rendering template.
4 - *
5 - * @var array $attributes Block attributes.
6 - * @var string $content Block inner content.
7 - * @var WP_Block $block Block registration object.
8 - *
9 - * @package CTB
10 - */
11 -
12 -if ( !defined( 'ABSPATH' ) ) { exit; }
13 -
14 2 $id = wp_unique_id( 'ctbCountdownTime-' );
3 +$planClass = ctbIsPremium() ? 'premium' : 'free';
15 4 ?>
16 5 <div
17 - <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_block_wrapper_attributes() is properly escaped ?>
18 - <?php echo get_block_wrapper_attributes(); ?>
6 + <?php echo get_block_wrapper_attributes( [ 'class' => $planClass ] ); ?>
19 7 id='<?php echo esc_attr( $id ); ?>'
20 - data-attributes='<?php echo esc_attr( wp_json_encode( $attributes ?? [] ) ); ?>'
21 - data-content='<?php echo esc_attr( wp_json_encode( $content ?? '' ) ); ?>'
8 + data-nonce='<?php echo esc_attr( wp_json_encode( wp_create_nonce( 'wp_ajax' ) ) ); ?>'
9 + data-attributes='<?php echo esc_attr( wp_json_encode( $attributes ) ); ?>'
10 + data-content='<?php echo esc_attr( wp_json_encode( $content ) ); ?>'
22 11 ></div>