array(
'label' => __( 'Appearance', 'fv-player' ),
'items' => array(
array(
'label' => __( 'Autoplay', 'fv-player' ),
'name' => 'autoplay',
'description' => __( 'Video will autoplay when it\'s in browser viewport.', 'fv-player' ),
'default' => in_array( $fv_fp->_get_option('autoplay_preload'), array( 'sticky', 'viewport' ) ),
'children' => array(
array(
'label' => __( 'Muted Autoplay', 'fv-player' ),
'name' => 'autoplay_muted'
), // TODO: Save properly
)
),
/*array(
'label' => __( 'Player Alignment', 'fv-player' ),
'name' => 'align',
'description' => __( 'Allows the article text to wrap around the player.', 'fv-player' ),
'children' => array(
array(
'label' => __( 'Position', 'fv-player' ),
'name' => 'align',
'options' => array(
'Left',
'Right',
'Centered'
),
'type' => 'select'
),
array(
'label' => __( 'Width', 'fv-player' ),
'name' => 'lightbox_width',
'type' => 'number'
)
)
),*/
array(
'label' => __( 'Playlist Auto Advance', 'fv-player' ),
'name' => 'playlist_advance',
'default' => !$fv_fp->_get_option('playlist_advance'),
'scope' => 'playlist'
),
array(
'label' => __( 'Playlist Style', 'fv-player' ),
'name' => 'playlist',
'dependencies' => array( 'lightbox' => false ),
'options' => array(
array( '', 'Default' ),
array( 'horizontal', 'Horizontal' ),
array( 'tabs', 'Tabland' ),
array( 'prevnext', 'Big arrows (deprecated)' ),
array( 'vertical', 'Vertical' ),
array( 'slider', 'Scrollslider' ),
array( 'season', 'Episodes' ),
array( 'polaroid', 'Polaroid' ),
array( 'text', 'Text' ),
array( 'version-one', 'Sliderland' ),
array( 'version-two', 'Sliderbar' ),
),
'scope' => 'playlist',
'type' => 'select',
),
array(
'label' => __( 'Sticky video', 'fv-player' ),
'name' => 'sticky',
'description' => __( 'Watch the playing video when scrolling down the page.', 'fv-player' ),
'default' => in_array( $fv_fp->_get_option('sticky_video'), array( 'desktop', 'all' ) ),
'dependencies' => array( 'lightbox' => false )
)
)
),
'controls' => array(
'label' => __( 'Controls', 'fv-player' ),
'items' => array(
array(
'label' => __( 'Controlbar', 'fv-player' ),
'name' => 'controlbar',
'description' => __( 'Without the controlbar seeking in video is impossible.', 'fv-player' ),
'default' => true,
'sticky' => true
),
array(
'label' => __( 'LMS | Teaching', 'fv-player' ),
'name' => 'lms_teaching',
'description' => __( 'Seeking forward not allowed if user did not see the full video.', 'fv-player' ),
'dependencies' => array( 'controlbar' => true )
),
array(
'label' => __( 'Speed Buttons', 'fv-player' ),
'name' => 'speed',
'description' => __( 'Allows user to speed up or slow down the video.', 'fv-player' ),
'default' => $fv_fp->_get_option('ui_speed'),
'dependencies' => array( 'controlbar' => true )
)
)
),
'header' => array(
'label' => __( 'Sharing', 'fv-player' ),
'items' => array(
array(
'label' => __( 'Embedding', 'fv-player' ),
'name' => 'embed',
'description' => __( 'Allows users to embed your player on their websites.', 'fv-player' ),
'default' => $fv_fp->_get_option( 'ui_embed' )
),
array(
'label' => __( 'Sharing Buttons', 'fv-player' ),
'name' => 'share',
'description' => __( 'Provides a quick way of sharing your article on Facebook, Twitter or via Email.', 'fv-player' ),
'default' => $fv_fp->_get_option( 'ui_sharing' )
), // TODO: Custom URL setting
)
)
));
fv_player_editor_input_group( $player_options );
?>
_get_option('overlay_show_after');
$actions = array(
'actions' => array(
'items' => array(
array(
'label' => __( 'End of Video Action', 'fv-player' ),
'name' => 'toggle_end_action',
'description' => __( 'What should happen at the end of the video.', 'fv-player' ),
'children' => array(
array(
'label' => __( 'Pick the action', 'fv-player' ),
'name' => 'end_actions',
'options' => array(
array('', 'Default'),
array('no', 'Nothing'),
array('redirect', 'Redirect'),
array('loop', 'Loop'),
array('popup', 'Show popup'),
array('splashend', 'Show splash screen'),
array('email_list', 'Collect Emails')
),
'type' => 'select',
'visible' => true
),
array(
'label' => __( 'Redirect', 'fv-player' ),
'name' => 'redirect',
'type' => 'text'
),
array(
'label' => __( 'Popup', 'fv-player' ),
'name' => 'popup_id',
'type' => 'select',
'options' => fv_flowplayer_admin_select_popups()
),
array(
'label' => __( 'Email list', 'fv-player' ),
'name' => 'email_list',
'type' => 'select',
'options' => fv_player_email_lists()
),
),
'visible' => true
),
array(
'label' => __( 'Show Overlay', 'fv-player' ),
'name' => 'toggle_overlay',
'description' => __( 'Enter text or HTML to show on top of video while it\'s playing.', 'fv-player' ),
'children' => array(
array(
'label' => __( 'Overlay Code', 'fv-player' ),
'name' => 'overlay',
'description' => $overlay_show_after ? sprintf( __( 'Shows after %d seconds.', 'fv-player' ), $overlay_show_after ) : false,
'type' => 'textarea',
'visible' => true
),
array(
'label' => __( 'Width', 'fv-player' ),
'name' => 'overlay_width',
'type' => 'number',
'visible' => true
),
array(
'label' => __( 'Height', 'fv-player' ),
'name' => 'overlay_height',
'type' => 'number',
'visible' => true
)
),
'visible' => true,
'dependencies' => array( 'overlay_skip' => false )
),
),
'sort' => false
)
);
if( $fv_fp->_get_option('overlay') ) {
$actions['actions']['items'][] = array(
'label' => __( 'Do not show global overlay', 'fv-player' ),
'name' => 'overlay_skip',
'description' => sprintf( __( 'Use to disable overlay set in
Actions -> Overlays', 'fv-player' ), admin_url('admin.php?page=fvplayer#postbox-container-tab_actions') ),
'visible' => true,
'dependencies' => array( 'toggle_overlay' => false )
);
}
if ( ! current_user_can( 'edit_others_posts' ) ) {
$actions['actions']['items'] = array(
array(
'name' => 'actions_info',
'type' => 'notice_info',
'content' => '
- ' . __( 'You do not have permission to edit video actions.', 'fv-player' ) . '
',
'visible' => true,
),
);
}
$actions = apply_filters('fv_player_editor_actions', $actions );
fv_player_editor_input_group( $actions );
// Legacy
echo "
\n";
// TODO: Will these still actually work?
do_action('fv_flowplayer_shortcode_editor_after');
do_action('fv_flowplayer_shortcode_editor_tab_actions');
echo "
\n";
?>