';
}
@@ -83,7 +84,8 @@ class WidgetFeatureIntro extends \WP_Widget {
echo '
';
if ($s['media_type'] === 'video' && $s['video_url'] !== '') {
$poster = $s['video_poster'] !== '' ? ' poster="' . esc_url($s['video_poster']) . '"' : '';
- echo '
';
+ $auto = $i === 0 ? ' autoplay' : '';
+ echo '
';
} elseif ($s['image'] !== '') {
echo '
![' . esc_attr($s['tab_label']) . '](' . esc_url($s['image']) . ')
';
}
@@ -101,7 +103,7 @@ class WidgetFeatureIntro extends \WP_Widget {
var panels=[].slice.call(root.querySelectorAll('.aksrt-fi__panel'));
function go(i){
tabs.forEach(function(t,idx){t.classList.toggle('is-active',idx===i);});
- panels.forEach(function(p,idx){p.classList.toggle('is-active',idx===i);});
+ panels.forEach(function(p,idx){p.classList.toggle('is-active',idx===i);var v=p.querySelector('video');if(v){if(idx===i){v.play&&v.play().catch(function(){})}else{v.pause&&v.pause()}}});
}
tabs.forEach(function(t){ t.addEventListener('click', function(){ go(parseInt(t.getAttribute('data-index')||'0',10)); }); });
})();
diff --git a/src/AKSRT/Widgets/WidgetPricingPlans.php b/src/AKSRT/Widgets/WidgetPricingPlans.php
index a6d11bdb..45f94d25 100644
--- a/src/AKSRT/Widgets/WidgetPricingPlans.php
+++ b/src/AKSRT/Widgets/WidgetPricingPlans.php
@@ -41,14 +41,17 @@ class WidgetPricingPlans extends \WP_Widget {
echo '
';
echo '
';
+ $pi = 0;
foreach ($plans as $plan) {
$accent = sanitize_key((string) ($plan['color'] ?? 'blue'));
if (!in_array($accent, ['pink', 'purple', 'blue', 'green', 'yellow', 'cyan'], true)) {
$accent = 'blue';
}
$featured = !empty($plan['is_featured']);
- $class = 'aksrt-pricing__card accent-' . $accent . ($featured ? ' is-featured' : '');
- echo '
';
+ $pack = function_exists('aksrt_obs_animate_attrs') ? aksrt_obs_animate_attrs('slideup', false, $pi * 0.12) : ['class' => '', 'attr' => ''];
+ $class = 'aksrt-pricing__card accent-' . $accent . ($featured ? ' is-featured' : '') . $pack['class'];
+ echo '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+ $pi++;
if ($featured || !empty($plan['tag'])) {
$badge = (string) ($plan['tag'] !== '' ? $plan['tag'] : __('推荐', 'aksrt'));
echo '
' . esc_html($badge) . '';
diff --git a/src/AKSRT/Widgets/WidgetReviews.php b/src/AKSRT/Widgets/WidgetReviews.php
index 370babb5..43d77a01 100644
--- a/src/AKSRT/Widgets/WidgetReviews.php
+++ b/src/AKSRT/Widgets/WidgetReviews.php
@@ -38,9 +38,10 @@ class WidgetReviews extends \WP_Widget {
$style = sprintf('--aksrt-rev-pc:%s;--aksrt-rev-m:%s;', rtrim(rtrim(number_format($pc, 2, '.', ''), '0'), '.'), rtrim(rtrim(number_format($m, 2, '.', ''), '0'), '.'));
echo '