metabox-fields-general-advanced.php
5 years ago
metabox-fields-general-custom-logo.php
5 years ago
metabox-fields-general-footer-template-settings.php
6 years ago
metabox-fields-general-footer-template.php
6 years ago
metabox-fields-general-footer.php
5 years ago
metabox-fields-general-header-template-settings.php
5 years ago
metabox-fields-general-header-template.php
5 years ago
metabox-fields-general-header.php
5 years ago
metabox-fields-general-top-header.php
5 years ago
metabox-fields-page-template.php
5 years ago
metabox-fields-post-audio.php
5 years ago
metabox-fields-post-gallery.php
5 years ago
metabox-fields-post-quote.php
5 years ago
metabox-fields-post-video.php
5 years ago
metabox-fields-post-video.php
74 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Add Video Option meta box for video post format |
| 4 | * |
| 5 | * |
| 6 | * @package Auxin |
| 7 | * @license LICENSE.txt |
| 8 | * @author averta |
| 9 | * @link http://phlox.pro/ |
| 10 | * @copyright (c) 2010-2021 averta |
| 11 | */ |
| 12 | |
| 13 | // no direct access allowed |
| 14 | if ( ! defined('ABSPATH') ) exit; |
| 15 | |
| 16 | |
| 17 | /*======================================================================*/ |
| 18 | |
| 19 | function auxin_metabox_fields_post_video(){ |
| 20 | |
| 21 | $model = new Auxin_Metabox_Model(); |
| 22 | $model->id = 'post-video'; |
| 23 | $model->title = __('Video Post options', 'auxin-elements'); |
| 24 | $model->css_class = 'aux-format-tab'; |
| 25 | $model->fields = array( |
| 26 | |
| 27 | array( |
| 28 | 'title' => __('Video file', 'auxin-elements'), |
| 29 | 'description' => __('Please upload an MP4/OGG/WEBM file for self hosted video player.', 'auxin-elements'), |
| 30 | 'id' => '_format_video_attachment', |
| 31 | 'type' => 'video', |
| 32 | 'default' => '' |
| 33 | ), |
| 34 | array( |
| 35 | 'title' => __('Poster image', 'auxin-elements'), |
| 36 | 'description' => __('Please specify an image as a poster for self hosted video player.', 'auxin-elements'), |
| 37 | 'id' => '_format_video_attachment_poster', |
| 38 | 'type' => 'image', |
| 39 | 'default' => '' |
| 40 | ), |
| 41 | array( |
| 42 | 'title' => __('Video URL (oEmbed)', 'auxin-elements'), |
| 43 | 'description' => __('Youtube, Vimeo, TED, SmugMug, Kickstarter, Hulu, Flickr, DailyMotion, Blip, Animoto, Wistia link or iFrame code.', 'auxin-elements'), |
| 44 | 'id' => '_format_video_embed', |
| 45 | 'id_deprecated' => 'youtube', |
| 46 | 'type' => 'textarea', |
| 47 | 'default' => '' |
| 48 | ), |
| 49 | array( |
| 50 | 'title' => __('Player Skin', 'auxin-elements'), |
| 51 | 'description' => __('Specifies the skin for audio player.', 'auxin-elements'), |
| 52 | 'id' => '_format_video_player_skin', |
| 53 | 'type' => 'radio-image', |
| 54 | 'default' => 'default', |
| 55 | 'choices' => array( |
| 56 | 'default' => array( |
| 57 | 'label' => __('Default (set in theme options)', 'auxin-elements'), |
| 58 | 'image' => AUXIN_URL . 'images/visual-select/default2.svg' |
| 59 | ), |
| 60 | 'light' => array( |
| 61 | 'label' => __('Light', 'auxin-elements'), |
| 62 | 'image' => AUXIN_URL . 'images/visual-select/audio-player-light.svg' |
| 63 | ), |
| 64 | 'dark' => array( |
| 65 | 'label' => __('Dark', 'auxin-elements'), |
| 66 | 'image' => AUXIN_URL . 'images/visual-select/audio-player-dark.svg' |
| 67 | ) |
| 68 | ) |
| 69 | ) |
| 70 | ); |
| 71 | |
| 72 | return $model; |
| 73 | } |
| 74 |