PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/timeline-item/render.php +2 -20 2.1.3 → 2.1.8 View file →
@@ -1,29 +1,11 @@
1 1 <?php
2 -/**
3 - * Timeline Item Block server-side render.
4 - *
5 - * One entry on a Timeline: the card holding the inner blocks, the SVG marker
6 - * that sits on the line, and the date beside it. Like its parent the markup is
7 - * rendered here rather than on the client — the card's content is InnerBlocks
8 - * — and view.js only mounts the generated <style> into the empty host below.
9 - *
10 - * The side an entry sits on is normally decided in CSS from its position in
11 - * the list, so nothing about ordering needs to be known at render time. A
12 - * `side` set in the sidebar adds a class that outranks that rule; it mirrors
13 - * utils/functions.js.
14 - *
15 - * @package bBlocks
16 - *
17 - * @var array $attributes Block attributes.
18 - * @var string $content Rendered inner blocks.
19 - */
20 -
21 2 if ( ! defined( 'ABSPATH' ) ) {
22 3 exit;
23 4 }
24 5
25 -$id = wp_unique_id( 'timeline-item-' );
6 +$id = wp_unique_id( 'bBlocksTimelineItem-' );
7 +$attributes = BBlocks\Inc\Sanitize::attributes( $attributes );
26 8
27 9 $item = isset( $attributes['item'] ) && is_array( $attributes['item'] ) ? $attributes['item'] : array();
28 10
29 11 $side = isset( $item['side'] ) ? sanitize_key( (string) $item['side'] ) : '';