_e('Autoplay', 'cvm_video'); ?> :</label></th> <td><input type="checkbox" value="1" id="autoplay" name="autoplay"<?php cvm_check((bool) $player_opt['autoplay']); ?> /></td> </tr> <tr valign="top"> <th scope="row"><label for="fullscreen"><?php _e('Allow fullscreen', 'cvm_video'); ?> :</label></th> <td><input type="checkbox" name="fullscreen" id="fullscreen" value="1"<?php cvm_check((bool) $player_opt['fullscreen']); ?> /></td> </tr> <tr valign="top"> <th scope="row"><label for="color"><?php _e('Player color', 'cvm_video'); ?> :</label></th> <td> #<input type="text" name="color" id="color" value="<?php echo $player_opt['color']; ?> " /> </td>
</a> <div id="cvm_check_playlist" class="description"><?php _e('Enter playlist ID or user ID according to Feed Type selection.', 'cvm_video'); ?> </div> </td> </tr> <tr valign="top"> <th scope="row"><label for="playlist_live"><?php _e('Add to import queue?', 'cvm_video'); ?> </label></th> <td> <input type="checkbox" name="playlist_live" id="playlist_live" value="1"<?php cvm_check($options['playlist_live']); ?> /> <span class="description"><?php _e('If checked, playlist will be added to importing queue and will import when its turn comes.', 'cvm_video'); ?> </span> </td> </tr> <?php global $CVM_POST_TYPE; $args = array('show_count' => 1, 'hide_empty' => 0, 'taxonomy' => $CVM_POST_TYPE->get_post_tax(), 'name' => 'native_tax', 'id' => 'native_tax', 'selected' => $options['native_tax'], 'hide_if_empty' => true, 'echo' => false, 'show_option_all' => __('Select category (optional)', 'cvm_video')); $plugin_categories = wp_dropdown_categories($args); if ($plugin_categories) { ?>
public function post_video_settings_meta_box() { global $post; $settings = cvm_get_video_settings($post->ID); wp_nonce_field('cvm-save-video-settings', 'cvm-video-nonce'); ?> <table class="form-table cvm-player-settings-options"> <tbody> <tr> <th><label for="cvm_aspect_ratio"><?php _e('Player size', 'cvm_video'); ?> :</label></th> <td> <label for="cvm_aspect_ratio"><?php _e('Aspect ratio'); ?> :</label> <?php $args = array('options' => array('4x3' => '4x3', '16x9' => '16x9'), 'name' => 'aspect_ratio', 'id' => 'cvm_aspect_ratio', 'class' => 'cvm_aspect_ratio', 'selected' => $settings['aspect_ratio']); cvm_select($args); ?> <label for="cvm_width"><?php _e('Width', 'cvm_video'); ?> :</label> <input type="text" name="width" id="cvm_width" class="cvm_width" value="<?php echo $settings['width']; ?> " size="2" />px | <?php _e('Height', 'cvm_video'); ?> : <span class="cvm_height" id="cvm_calc_height"><?php echo cvm_player_height($settings['aspect_ratio'], $settings['width']); ?> </span>px </td> </tr> <tr> <th><label for="cvm_video_position"><?php _e('Video position', 'cvm_video'); ?> :</label></th> <td> <?php $args = array('options' => array('above-content' => __('Above post content', 'cvm_video'), 'below-content' => __('Below post content', 'cvm_video')), 'name' => 'video_position', 'id' => 'cvm_video_position', 'selected' => $settings['video_position']); cvm_select($args); ?> </td> </tr> <tr> <th><label for="cvm_volume"><?php _e('Volume', 'cvm_video'); ?> :</label></th> <td> <input type="text" name="volume" id="cvm_volume" value="<?php echo $settings['volume']; ?> " size="1" maxlength="3" /> <label for="cvm_volume"><span class="description">( <?php _e('number between 0 (mute) and 100 (max)', 'cvm_video'); ?> )</span></label> </td> </tr> <tr> <th><label for="cvm_autoplay"><?php _e('Autoplay', 'cvm_video'); ?> :</label></th> <td> <input name="autoplay" id="cvm_autoplay" type="checkbox" value="1"<?php cvm_check((bool) $settings['autoplay']); ?> /> <label for="cvm_autoplay"><span class="description">( <?php _e('when checked, video will start playing once page is loaded', 'cvm_video'); ?> )</span></label> </td> </tr> <tr> <th><label for="title"><?php _e('Show video title', 'cvm_video'); ?> :</label></th> <td> <input name="title" id="cvm_title" class="cvm_title" type="checkbox" value="1"<?php cvm_check((bool) $settings['title']); ?> /> <label for="cvm_title"><span class="description">( <?php _e('when checked, player will display video title', 'cvm_video'); ?> )</span></label> </td> </tr> <tr> <th><label for="cvm_fullscreen"><?php _e('Allow full screen', 'cvm_video'); ?> :</label></th> <td> <input name="fullscreen" id="cvm_fullscreen" type="checkbox" value="1"<?php cvm_check((bool) $settings['fullscreen']); ?> /> </td> </tr> <tr> <th><label for="cvm_color"><?php _e('Player color', 'cvm_video'); ?> :</label></th> <td>#<input type="text" name="color" id="cvm_color" value="<?php echo $settings['color']; ?> " /></td> </tr> <tr valign="top"> <th scope="row"><label for="byline"><?php _e('Show video author', 'cvm_video'); ?> :</label></th> <td> <input type="checkbox" value="1" id="byline" name="byline"<?php cvm_check((bool) $settings['byline']); ?> /> <span class="description"><?php _e('When checked, player will display video uploader.', 'cvm_video'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row"><label for="portrait"><?php _e('Author portrait', 'cvm_video'); ?> :</label></th> <td> <input type="checkbox" value="1" id="portrait" name="portrait"<?php cvm_check((bool) $settings['portrait']); ?> /> <span class="description"><?php _e('When checked, player will display uploader image.', 'cvm_video'); ?> </span> </td> </tr> </tbody> </table> <?php }
/** * (non-PHPdoc) * @see WP_Widget::form() */ function form($instance) { $defaults = $this->get_defaults(); $options = wp_parse_args((array) $instance, $defaults); ?> <p> <label for="<?php echo $this->get_field_id('title'); ?> "><?php _e('Title', 'cvm_video'); ?> : </label> <input type="text" name="<?php echo $this->get_field_name('title'); ?> " id="<?php echo $this->get_field_id('title'); ?> " value="<?php echo $options['title']; ?> " class="widefat" /> </p> <p> <input class="checkbox" type="checkbox" name="<?php echo $this->get_field_name('post_count'); ?> " id="<?php echo $this->get_field_id('post_count'); ?> "<?php cvm_check((bool) $options['post_count']); ?> /> <label for="<?php echo $this->get_field_id('post_count'); ?> "><?php _e('Show videos count', 'cvm_video'); ?> </label> <br /> <input class="checkbox" type="checkbox" name="<?php echo $this->get_field_name('hierarchy'); ?> " id="<?php echo $this->get_field_id('hierarchy'); ?> "<?php cvm_check((bool) $options['hierarchy']); ?> /> <label for="<?php echo $this->get_field_id('hierarchy'); ?> "><?php _e('Show hierarchy', 'cvm_video'); ?> </label> </p> <?php }