. */ global $fv_wp_flowplayer_ver, $fv_fp; global $post; $post_id = isset($post->ID) ? $post->ID : 0; $script_fv_player_editor_defaults = array(); $script_fv_player_editor_fields = array(); $script_fv_player_editor_fields_with_language = array(); $fv_flowplayer_conf = get_option( 'fvwpflowplayer' ); function fv_flowplayer_admin_select_popups() { $aPopupData = get_option('fv_player_popups'); $aPopups = array( array( '' , 'Use site default' ), array( 'no' , 'None' ), array( 'random' , 'Random') ); if( !empty($aPopupData) && is_array($aPopupData) ) { foreach( $aPopupData AS $key => $aPopupAd ) { $value = !empty($aPopupAd['name']) ? $aPopupAd['name'] : 'Popup - ' . $key; if( $aPopupAd['disabled'] == 1 ) $value .= ' (currently disabled)'; $aPopups[] = array( $key , $value ); } } return $aPopups; } function fv_player_email_lists() { $rawLists = get_option('fv_player_email_lists'); $aLists = array(); foreach($rawLists as $key => $val) { if(!is_numeric($key)) continue; $aLists[] = array( $key , (empty($val->name) ? "List " . $key : "$val->name" ) ); } return $aLists; } function fv_player_shortcode_row( $args ) { $fv_flowplayer_conf = get_option( 'fvwpflowplayer' ); $args = wp_parse_args( $args, array( 'class' => false, 'dropdown' => array( 'Default', 'On', 'Off' ), 'id' => false, 'label' => '', 'name' => '', 'playlist_label' => false, ) ); extract($args); $class .= !isset($fv_flowplayer_conf["interface"][$name]) || $fv_flowplayer_conf["interface"][$name] !== 'true' ? ' fv_player_interface_hide' : ''; ?> > class="components-base-control__field"> class="components-base-control__field"> class="components-base-control">
class="components-base-control__field">
class="components-base-control">
class="components-base-control">
">
components-text-control__input" type="text" id="" name="" />
class="components-base-control">
and
false, 'children' => false, 'class' => false, 'content' => false, 'default' => false, 'dependencies' => false, 'dropdown' => array( 'Default', 'On', 'Off' ), 'id' => false, 'label' => '', 'label_signular' => '', 'multiple' => false, // applies to type = select 'name' => '', 'no_data' => false, // do not save any data based on this input 'options' => array(), 'playlist_label' => false, 'scope' => false, 'language' => false, 'type' => false, 'player_meta' => false, 'video_meta' => false, 'visible' => false, 'width' => false, ) ); extract($args); if ( ! isset( $script_fv_player_editor_fields[ $name ] ) ) { $script_fv_player_editor_fields[ $name ] = array(); } if ( $player_meta ) { $script_fv_player_editor_fields[ $name ]['store'] = 'player_meta'; } if ( $video_meta ) { $script_fv_player_editor_fields[ $name ]['store'] = 'video_meta'; } // This tells JavaScript to upgrade the text input to a select box with all the languages if ( $language ) { $script_fv_player_editor_fields_with_language[] = $name; } if( !empty($dependencies) ) { global $script_fv_player_editor_dependencies; foreach( $dependencies AS $parent => $value ) { if( empty($script_fv_player_editor_dependencies[$parent]) ) { $script_fv_player_editor_dependencies[$parent] = array(); } if( empty($script_fv_player_editor_dependencies[$parent][$value]) ) { $script_fv_player_editor_dependencies[$parent][$value] = array(); } $script_fv_player_editor_dependencies[$parent][$value][] = $name; } } if( !$visible ) { $class .= ' fv_player_interface_hide'; } if ( $width && in_array( $width, array( 'half' ) ) ) { $class .= ' fv-player-editor-field-' . esc_attr( $width ); } if( $scope == 'playlist' ) { $class .= ' hide-if-singular'; } // TODO: Not needed? $playlist_label = $playlist_label ? ' data-playlist-label="' . esc_attr( $playlist_label ) . '" data-single-label="' . esc_attr( $label ) . '"' : ''; if( !$is_child ) { $class .= ' components-base-control'; } if( $children ) { $class .= ' fv-player-editor-children-wrap'; } ?>

$group_options ) { $group_options = wp_parse_args( $group_options, array( 'sort' => true, ) ); // Determine if each field should be shown // and if there is anything to show at all in this group $have_visible_setting = false; foreach( $group_options['items'] AS $k => $v ) { if( isset($conf["interface"][$v['name']]) && $conf["interface"][$v['name']] == 'true' ) { $group_options['items'][$k]['visible'] = true; $have_visible_setting = true; } if( !empty($v['visible']) ) { $have_visible_setting = true; } } $class = $have_visible_setting ? 'is-open' : 'fv_player_interface_hide'; echo "
\n"; if( !empty($group_options['label']) ) { echo "

\n"; } if( $group_options['sort'] ) { usort( $group_options['items'], 'fv_player_editor_input_sort' ); } echo "
\n"; foreach( $group_options['items'] AS $input ) { if( isset($input['default']) ) { $script_fv_player_editor_defaults[$input['name']] = $input['default']; } fv_player_editor_input( $input ); } echo "
\n"; echo "
\n"; } } // Sort inputs alphabetically, but the one with sticky always wins function fv_player_editor_input_sort( $a, $b ) { if( !empty($a["sticky"]) ) { return -1; } return strnatcasecmp($a["label"], $b["label"]); } $fv_flowplayer_helper_tag = ( is_plugin_active('jetpack/jetpack.php') ) ? 'b' : 'span'; ?>
var fv_player_editor_defaults = ".wp_json_encode($script_fv_player_editor_defaults)."\n"; echo "\n"; echo "\n"; // This tells JavaScript to upgrade the text input to a select box with all the languages echo "\n"; ?>