Changeset 3447303
- Timestamp:
- 01/26/2026 06:42:24 PM (2 months ago)
- Location:
- smart-content-blocks
- Files:
-
- 12 added
- 3 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/build (added)
-
tags/1.0.1/build/block.js (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/css (added)
-
tags/1.0.1/includes/css/scba-admin.css (added)
-
tags/1.0.1/includes/js (added)
-
tags/1.0.1/includes/js/scba-admin.js (added)
-
tags/1.0.1/includes/js/scba-utils.js (added)
-
tags/1.0.1/includes/scba-helpers.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/smart-content-blocks.php (added)
-
trunk/includes/scba-helpers.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/smart-content-blocks.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smart-content-blocks/trunk/includes/scba-helpers.php
r3426401 r3447303 133 133 1 134 134 ); 135 } 136 137 /** 138 * Generate and attach accompanying JSON+LD for a Tyle. 139 */ 140 function scba_script_add_json_ld( string $aid ): string { 141 if ( $aid === '' ) { 142 return ''; 143 } 144 145 $data = [ 146 '@context' => 'https://schema.org/', 147 '@type' => 'WebPageElement', 148 '@id' => '#tiq-unit-' . $aid, 149 'isBasedOn' => [ 150 '@id' => 'https://cdn.tyleiq.com/tyles/' . $aid . '.json' 151 ] 152 ]; 153 154 return '<script type="application/ld+json">' . json_encode($data, JSON_UNESCAPED_SLASHES) . '</script>'; 135 155 } 136 156 -
smart-content-blocks/trunk/readme.txt
r3426401 r3447303 3 3 Requires at least: 6.6 4 4 Tested up to: 6.9 5 Stable tag: 1.0. 05 Stable tag: 1.0.1 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 42 42 Developer docs, use cases, and customization tips are available at [TyleIQ Docs](https://tyleiq.com/docs/getting-started/?utm_source=wpadmin&utm_medium=readme&utm_campaign=tyleiq-wp-plugin). 43 44 == Changelog == 45 46 = 1.0.1 = 47 48 Release date: 2026-01-26 49 50 * Improvements to schema markup for better content detection by AI models. -
smart-content-blocks/trunk/smart-content-blocks.php
r3426401 r3447303 3 3 * Plugin Name: Smart Content Blocks With Analytics 4 4 * Description: TyleIQ.com provides intelligent content units with analytics built-in. Embed them into your WooCommerce store or any page using Smart Content Blocks. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Author: TyleIQ 7 7 * Author URI: https://tyleiq.com … … 17 17 18 18 // Set plugin version 19 define( 'SMART_CONTENT_BLOCKS_VERSION', '1.0. 0' );19 define( 'SMART_CONTENT_BLOCKS_VERSION', '1.0.1' ); 20 20 21 21 /* … … 149 149 150 150 /* 151 * Block render callback 151 * Block render callback. Renders final HTML output. 152 152 */ 153 153 function scba_block_render( $attributes ): string { … … 159 159 } 160 160 161 $ valid= scba_sanitize_script( $script_tag );162 if ( ! $ valid) {161 $tag = scba_sanitize_script( $script_tag ); 162 if ( ! $tag ) { 163 163 return ''; 164 164 } 165 165 166 $ valid = scba_script_add_unique_id_if_missing( $valid, 'scba-block-' );166 $tag = scba_script_add_unique_id_if_missing( $tag, 'scba-block-' ); 167 167 168 168 $allowed = wp_kses_allowed_html( 'post' ); … … 175 175 ); 176 176 177 return wp_kses( $valid, $allowed ); 177 // Append JSON+LD 178 $tag = $tag . scba_script_add_json_ld( $attributes['aid'] ); 179 180 return wp_kses( $tag, $allowed ); 178 181 } 179 182 … … 514 517 } 515 518 if ( scba_should_display( $snippet ) ) { 516 $script = scba_get_snippet_html( $snippet['script'] );519 $script = scba_get_snippet_html( $snippet['script'] ); 517 520 $script = scba_script_add_unique_id_if_missing( $script, 'scba-wc-php-' ); 518 521 … … 599 602 ]; 600 603 601 602 604 foreach ( $snippets as $i => $snippet ) { 603 605 $hook = $snippet['hook'] ?? '';
Note: See TracChangeset
for help on using the changeset viewer.