Changeset 3476607
- Timestamp:
- 03/06/2026 05:51:02 PM (4 weeks ago)
- Location:
- gutentools
- Files:
-
- 2 edited
-
tags/1.1.4/core/blocks/post-ticker.php (modified) (1 diff)
-
trunk/core/blocks/post-ticker.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gutentools/tags/1.1.4/core/blocks/post-ticker.php
r3476597 r3476607 127 127 128 128 $animation = $this->get_slider_direction( $attrs[ 'animation' ]); 129 129 130 $block_id = isset($attrs['block_id']) ? sanitize_html_class($attrs['block_id']) : ''; 131 $type = isset($animation[0]) ? $animation[0] : 'horizontal'; 132 $direction = isset($animation[1]) ? $animation[1] : 'right'; 133 $speed = isset($animation[2]) ? intval($animation[2]) : 2000; 134 130 135 ob_start(); 131 136 ?> 132 137 133 138 134 jQuery('#<?php echo esc_js($block_id); ?> .gutentools-ticker-content').AcmeTicker({ 135 type:'<?php echo esc_js( $animation[0] ) ?>', 136 speed: <?php echo esc_js( $animation[2] ) ?>, 137 direction: '<?php echo esc_js( $animation[1] ) ?>', 138 controls: { 139 prev: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-prev'), 140 toggle: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-toggle'), 141 next: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-next') 142 } 143 144 }); 145 139 jQuery('#<?php echo esc_js( $block_id ); ?> .gutentools-ticker-content').AcmeTicker({ 140 type: '<?php echo esc_js( $type ); ?>', 141 speed: <?php echo $speed; ?>, 142 direction: '<?php echo esc_js( $direction ); ?>', 143 controls: { 144 prev: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-prev'), 145 toggle: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-toggle'), 146 next: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-next') 147 } 148 }); 146 149 jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-pause').on('click', function() { 147 150 jQuery(this).hide(); -
gutentools/trunk/core/blocks/post-ticker.php
r3476597 r3476607 127 127 128 128 $animation = $this->get_slider_direction( $attrs[ 'animation' ]); 129 129 130 $block_id = isset($attrs['block_id']) ? sanitize_html_class($attrs['block_id']) : ''; 131 $type = isset($animation[0]) ? $animation[0] : 'horizontal'; 132 $direction = isset($animation[1]) ? $animation[1] : 'right'; 133 $speed = isset($animation[2]) ? intval($animation[2]) : 2000; 134 130 135 ob_start(); 131 136 ?> 132 137 133 138 134 jQuery('#<?php echo esc_js($block_id); ?> .gutentools-ticker-content').AcmeTicker({ 135 type:'<?php echo esc_js( $animation[0] ) ?>', 136 speed: <?php echo esc_js( $animation[2] ) ?>, 137 direction: '<?php echo esc_js( $animation[1] ) ?>', 138 controls: { 139 prev: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-prev'), 140 toggle: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-toggle'), 141 next: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-next') 142 } 143 144 }); 145 139 jQuery('#<?php echo esc_js( $block_id ); ?> .gutentools-ticker-content').AcmeTicker({ 140 type: '<?php echo esc_js( $type ); ?>', 141 speed: <?php echo $speed; ?>, 142 direction: '<?php echo esc_js( $direction ); ?>', 143 controls: { 144 prev: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-prev'), 145 toggle: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-toggle'), 146 next: jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-next') 147 } 148 }); 146 149 jQuery('#<?php echo esc_js($block_id); ?> .gutentools-post-ticker-pause').on('click', function() { 147 150 jQuery(this).hide();
Note: See TracChangeset
for help on using the changeset viewer.