Skip to content

Commit

Permalink
fix(封面视频): 选项cover_video_loop实际效果与描述不一致
Browse files Browse the repository at this point in the history
  • Loading branch information
KotoriK committed Sep 15, 2021
1 parent e196bdc commit 6bf46ce
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,14 @@ function sakura_scripts()
}

// 20161116 @Louie
$mv_live = iro_opt('cover_video_loop') ? 'open' : 'close';
$movies = iro_opt('cover_video') ? array('url' => iro_opt('cover_video_link'), 'name' => iro_opt('cover_video_title'), 'live' => $mv_live) : 'close';
$movies = iro_opt('cover_video') ?
array(
'url' => iro_opt('cover_video_link'),
'name' => iro_opt('cover_video_title'),
'live' => iro_opt('cover_video_live') ? true : false,
'loop'=>iro_opt('cover_video_loop') ? true : false
)
: 'close';
$auto_height = !iro_opt('cover_full_screen') ? 'fixed' : 'auto';
/* $code_lamp = 'close';
*/ // if (wp_is_mobile()) {
Expand Down
11 changes: 10 additions & 1 deletion opt/options/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,16 @@
'type' => 'switcher',
'title' => __('Cover Video Loop','sakurairo_csf'),
'dependency' => array( 'cover_video', '==', 'true' ),
'label' => __('Video will loop automatically when enabled, Pjax needed','sakurairo_csf'),
'label' => __('Video will loop automatically when enabled.','sakurairo_csf'),
'default' => false
),

array(
'id' => 'cover_video_live',
'type' => 'switcher',
'title' => __('Cover Video Auto Resume','sakurairo_csf'),
'dependency' => array( 'cover_video', '==', 'true' ),
'label' => __('Cover Video will resume automatically when coming back to homepage while Pjax enabled.','sakurairo_csf'),
'default' => false
),

Expand Down

0 comments on commit 6bf46ce

Please sign in to comment.