コード例 #1
0
ファイル: metaboxes.php プロジェクト: renzotello/gitWebTrevor
function easmedia_metabox_work()
{
    $meta_box = array('id' => 'easmedia_metaboxmediatypeselect', 'title' => __('Media Options', 'easmedia'), 'description' => __('' . (easy_get_option('easymedia_disen_admnotify') == '1' ? '<div class="emginfobox"><span class="emg_blink">Upgrade to PRO</span> and you can select <a href="http://goo.gl/PLlJwS" target="_blank">Photo Albums</a>, <a href="http://goo.gl/bZ53YR" target="_blank">Grid Gallery</a>, <a href="http://goo.gl/JAvlsq" target="_blank">Filterable Media</a>, HTML5 Video/Audio, Google Maps/Street View, embed from Soundcloud or Reverbnation and also Link to specific URL. You can learn more and see version comparison <a href="edit.php?post_type=easymediagallery&page=comparison">here</a> or go to Pro Version DEMO <a href="http://goo.gl/qG29Me" target="_blank">here</a></div>' : '') . '<br>Select videos, images, gallery or audio files.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Media Type', 'easmedia'), 'desc' => __('Choose the item type.', 'easmedia'), 'id' => 'easmedia_metabox_media_type', 'type' => 'select', 'defflimit' => '0', 'options' => array('Select', 'Multiple Images (Slider)', 'Single Image', 'Video', 'Audio', 'Link (PRO ONLY)', 'Google Maps (PRO ONLY)'), 'std' => 'Select')));
    easmedia_add_meta_box($meta_box);
    // VIDEO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediavideo', 'title' => __('Video Options', 'easmedia'), 'description' => __('Paste video URL to field below.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Video URL', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_video', 'type' => 'video', 'defflimit' => '0', 'std' => ''), array('name' => __('Video Size', 'easmedia'), 'desc' => __('If ON, video size will use the default settings on the control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_video_size', 'type' => 'checkboxopt', 'defflimit' => '0', 'width' => 'vidw', 'height' => 'vidh', 'std' => 'on', "pixopr" => 'px')));
    easmedia_add_meta_box($meta_box);
    // GALLERY METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediagallery', 'title' => __('Select Multiple Images', 'easmedia'), 'description' => __('Click Add Images button to select image from your Wordpress Media Library.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('<span class="gtips">Tips:</span>', 'easmedia'), 'desc' => __('<ul class="gtipslist"><li>Use <b>Ctrl + Click</b> on each image to select multiple images at once.</li><li>You also can drag and drop images to re-order.</li><li>Click on image to edit title/subtitle ( <i>Pro Version only</i> )</li><li class="messivideo" data-yvid="https://www.youtube.com/embed/H1Z3fidyEbE?rel=0">Tutorial How to Create Gallery</li>
<li class="messivideo" data-yvid="https://www.youtube.com/embed/H1Z3fidyEbE?rel=0">Tutorial How to Create Album</li></ul>', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery', 'gallid' => 'easmedia_metabox_media_gallery_id', 'type' => 'gallery', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easmedia'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on'), array('name' => __('Use information of each image', 'easmedia'), 'desc' => __('If ON, each image will use individual title based on Wordpress Media informations. If OFF, this gallery will use title, sub title and description from Media Information below.', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery_opt2', 'type' => 'checkboxoptdef', 'defflimit' => '0', 'std' => 'off')));
    easmedia_add_meta_box($meta_box);
    // AUDIO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediaaudio', 'title' => __('Audio Options', 'easmedia'), 'description' => __('Upload audio or paste audio URL on field below. Is it possible to use audio external source.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Audio Path', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_audio', 'type' => 'audio', 'defflimit' => '0', 'std' => '')));
    easmedia_add_meta_box($meta_box);
    // SINGLE IMAGE (FOR ALL MEDIA)
    $meta_box = array('id' => 'emediaimagediv', 'title' => __('Select Image', 'easmedia'), 'description' => __('You can upload image with supported file types: jpg, jpeg, gif, png.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Image URL', 'easmedia'), 'desc' => __('Select or upload your image.', 'easmedia'), 'id' => 'easmedia_metabox_img', 'type' => 'images', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easmedia'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_image_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on')));
    easmedia_add_meta_box($meta_box);
    // MEDIA DESC METABOX
    $meta_box = array('id' => 'easmedia_metabox_media_desc', 'title' => __('Media Information', 'easmedia'), 'description' => __('Input basic info for this media.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'low', 'fields' => array(array('name' => __('Media Title', 'easmedia'), 'desc' => __('Enter a media title.', 'easmedia'), 'id' => 'easmedia_metabox_title', 'type' => 'text', 'defflimit' => '0', 'std' => ''), array('name' => __('Media Subtitle', 'easmedia'), 'desc' => __('You can use this field for (ex: author, title track, etc.)', 'easmedia'), 'id' => 'easmedia_metabox_sub_title', 'type' => 'text', 'defflimit' => '0', 'std' => '')));
    easmedia_add_meta_box($meta_box);
}
コード例 #2
0
ファイル: metaboxes.php プロジェクト: paulcherrypipka/wptest
function easmedia_metabox_work()
{
    $meta_box = array('id' => 'easmedia_metaboxmediatypeselect', 'title' => __('Media Options', 'easy-media-gallery'), 'description' => '', 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Media Type', 'easy-media-gallery'), 'desc' => __('Choose the item type.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_type', 'type' => 'select', 'defflimit' => '0', 'options' => array('Select', 'Multiple Images (Slider)', 'Single Image', 'Video', 'Audio', 'Link (PRO ONLY)', 'Google Maps (PRO ONLY)'), 'std' => 'Select')));
    easmedia_add_meta_box($meta_box);
    // VIDEO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediavideo', 'title' => __('Video Options', 'easy-media-gallery'), 'description' => __('Paste video URL to field below.', 'easy-media-gallery'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Video URL', 'easy-media-gallery'), 'desc' => '', 'id' => 'easmedia_metabox_media_video', 'type' => 'video', 'defflimit' => '0', 'std' => ''), array('name' => __('Video Size', 'easy-media-gallery'), 'desc' => __('If ON, video size will use the default settings on the control panel.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_video_size', 'type' => 'checkboxopt', 'defflimit' => '0', 'width' => 'vidw', 'height' => 'vidh', 'std' => 'on', "pixopr" => 'px')));
    easmedia_add_meta_box($meta_box);
    // GALLERY METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediagallery', 'title' => __('Select Multiple Images', 'easy-media-gallery'), 'description' => __('Click Add Images button to select image from your Wordpress Media Library.', 'easy-media-gallery'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('<span class="gtips">Tips:</span>', 'easy-media-gallery'), 'desc' => __('<ul class="gtipslist"><li>Use <b>Ctrl + Click</b> on each image to select multiple images at once.</li><li>You also can drag and drop images to re-order.</li><li>Click on image to edit title/subtitle ( <i>Pro Version only</i> )</li><li class="messivideo" data-yvid="https://www.youtube.com/embed/H1Z3fidyEbE?rel=0">Tutorial How to Create Gallery</li>
<li class="messivideo" data-yvid="https://www.youtube.com/embed/pjHvRoV2Bn8?rel=0">Tutorial How to Create Album</li></ul>', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_gallery', 'gallid' => 'easmedia_metabox_media_gallery_id', 'type' => 'gallery', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easy-media-gallery'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_gallery_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on'), array('name' => __('Use information of each image', 'easy-media-gallery'), 'desc' => __('If ON, each image will use individual title based on Wordpress Media informations. If OFF, this gallery will use title, sub title and description from Media Information below.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_gallery_opt2', 'type' => 'checkboxoptdef', 'defflimit' => '0', 'std' => 'off')));
    easmedia_add_meta_box($meta_box);
    // AUDIO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediaaudio', 'title' => __('Audio Options', 'easy-media-gallery'), 'description' => __('Upload audio or paste audio URL on field below. Is it possible to use audio external source.', 'easy-media-gallery'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Audio Path', 'easy-media-gallery'), 'desc' => '', 'id' => 'easmedia_metabox_media_audio', 'type' => 'audio', 'defflimit' => '0', 'std' => '')));
    easmedia_add_meta_box($meta_box);
    // SINGLE IMAGE (FOR ALL MEDIA)
    $meta_box = array('id' => 'emediaimagediv', 'title' => __('Select Image', 'easy-media-gallery'), 'description' => __('You can upload image with supported file types: jpg, jpeg, gif, png.', 'easy-media-gallery'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Image URL', 'easy-media-gallery'), 'desc' => __('Select or upload your image.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_img', 'type' => 'images', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easy-media-gallery'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_media_image_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on')));
    easmedia_add_meta_box($meta_box);
    // MEDIA DESC METABOX
    $meta_box = array('id' => 'easmedia_metabox_media_desc', 'title' => __('Media Information', 'easy-media-gallery'), 'description' => __('Input basic info for this media.', 'easy-media-gallery'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'low', 'fields' => array(array('name' => __('Media Title', 'easy-media-gallery'), 'desc' => __('Enter a media title.', 'easy-media-gallery'), 'id' => 'easmedia_metabox_title', 'type' => 'text', 'defflimit' => '0', 'std' => ''), array('name' => __('Media Subtitle', 'easy-media-gallery'), 'desc' => __('You can use this field for (ex: author, title track, etc.)', 'easy-media-gallery'), 'id' => 'easmedia_metabox_sub_title', 'type' => 'text', 'defflimit' => '0', 'std' => '')));
    easmedia_add_meta_box($meta_box);
}
コード例 #3
0
ファイル: metaboxes.php プロジェクト: 10Dimensional/InspOrg
function easmedia_metabox_work()
{
    $meta_box = array('id' => 'easmedia_metaboxmediatypeselect', 'title' => __('Media Options', 'easmedia'), 'description' => __('Select videos, images, gallery or audio files.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Media Type', 'easmedia'), 'desc' => __('Choose the item type.', 'easmedia'), 'id' => 'easmedia_metabox_media_type', 'type' => 'select', 'defflimit' => '0', 'options' => array('Select', 'Single Image', 'Multiple Images (Slider)', 'Video', 'Audio', 'Google Maps', 'Link'), 'std' => 'Select')));
    easmedia_add_meta_box($meta_box);
    // VIDEO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediavideo', 'title' => __('Video Options', 'easmedia'), 'description' => __('<div id="videofrmt" style="text-decoration:underline;font-weight:bold;cursor:Pointer; color:#1A91F2 !important; margin-bottom:8px;">Sample video format</div>
				<div id="medvidtut" style="text-decoration:underline;font-weight:bold;cursor:Pointer; color:#1A91F2 !important; margin-bottom:8px;">Video Tutorial</div><br>Paste video URL to field below.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Video URL (Embed/MP4/WMV)', 'easmedia'), 'desc' => __('Use this field to embed video, MP4 video type or WMV video type.', 'easmedia'), 'id' => 'easmedia_metabox_media_video', 'type' => 'video', 'defflimit' => '0', 'std' => ''), array('name' => __('WebM Video Type', 'easmedia'), 'desc' => __('Use this field if you want to add WebM Video Type, or leave blank if no need it.', 'easmedia'), 'id' => 'easmedia_metabox_media_video_webm', 'type' => 'video', 'defflimit' => '0', 'std' => ''), array('name' => __('Ogg/Vorbis Video Type', 'easmedia'), 'desc' => __('Use this field if you want to add Ogg/Vorbis Video Type, or leave blank if no need it.', 'easmedia'), 'id' => 'easmedia_metabox_media_video_ogg', 'type' => 'video', 'defflimit' => '0', 'std' => ''), array('name' => __('Video Size', 'easmedia'), 'desc' => __('If ON, video size will use the default settings on the control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_video_size', 'type' => 'checkboxopt', 'defflimit' => '0', 'width' => 'vidw', 'height' => 'vidh', 'std' => 'on', "pixopr" => 'px')));
    easmedia_add_meta_box($meta_box);
    // GALLERY METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediagallery', 'title' => __('Gallery Options', 'easmedia'), 'description' => __('', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery', 'gallid' => 'easmedia_metabox_media_gallery_id', 'type' => 'gallery', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easmedia'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on'), array('name' => __('Use information of each image', 'easmedia'), 'desc' => __('If ON, each image will use individual title, sub title and description based on Wordpress Media informations. If OFF, this gallery will use title, sub title and description from Media Information below.<div id="medgallindividual" style="text-decoration:underline;font-weight:bold;cursor:Pointer; color:#1A91F2 !important;">Learn More Here</div>', 'easmedia'), 'id' => 'easmedia_metabox_media_gallery_opt2', 'type' => 'checkboxoptdef', 'defflimit' => '0', 'std' => 'off')));
    easmedia_add_meta_box($meta_box);
    // GOOGLE MAPS METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediagmap', 'title' => __('Map Options', 'easmedia'), 'description' => __('Paste Google Maps URL to field below.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Google Maps URL', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_gmap', 'type' => 'gmap', 'defflimit' => '0', 'std' => ''), array('name' => __('Maps Size', 'easmedia'), 'desc' => __('If ON, maps size will use the default settings on the control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_gmap_size', 'type' => 'checkboxoptmap', 'width' => 'gmidw', 'height' => 'gmidh', 'defflimit' => '0', 'std' => 'on', "pixopr" => 'px')));
    easmedia_add_meta_box($meta_box);
    // LINK METABOX
    $meta_box = array('id' => 'easmedia_metaboxmedialink', 'title' => __('Link Options', 'easmedia'), 'description' => __('Paste internal or external URL / LINK on field below.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Link / URL', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_link', 'type' => 'link', 'defflimit' => '0', 'std' => ''), array('name' => __('Open link in new window', 'easmedia'), 'desc' => __('If ON, your link will open in new window.', 'easmedia'), 'id' => 'easmedia_metabox_media_link_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '0', 'std' => 'on')));
    easmedia_add_meta_box($meta_box);
    // AUDIO METABOX
    $meta_box = array('id' => 'easmedia_metaboxmediaaudio', 'title' => __('Audio Options', 'easmedia'), 'description' => __('Upload audio or paste audio URL on field below.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Audio Source', 'easmedia'), 'desc' => __('Choose the audio source.', 'easmedia'), 'id' => 'easmedia_metabox_media_audio_source', 'type' => 'select', 'defflimit' => '0', 'options' => array('MP3', 'soundcloud.com', 'reverbnation.com'), 'std' => 'MP3'), array('name' => __('Audio Path / ID', 'easmedia'), 'desc' => __('', 'easmedia'), 'id' => 'easmedia_metabox_media_audio', 'type' => 'audio', 'defflimit' => '0', 'std' => '')));
    easmedia_add_meta_box($meta_box);
    // SINGLE IMAGE/GALLERY IMAGE THUMBNAIL (FOR ALL MEDIA)
    $meta_box = array('id' => 'emediaimagediv', 'title' => __('Select Image', 'easmedia'), 'description' => __('You can upload image with supported file types: jpg, jpeg, gif, png.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'default', 'fields' => array(array('name' => __('Auto Generated Youtube/Vimeo Thumbnail', 'easmedia'), 'desc' => __('If ON, Easy Media Gallery Pro will fetch default thumbnail for Youtube or Vimeo video.', 'easmedia'), 'id' => 'easmedia_metabox_media_video_fetch', 'type' => 'checkboxoptdeffetch', 'dvi' => 'easmedia_metabox_media_video_fetchurl', 'defflimit' => '0', 'std' => 'off'), array('name' => __('Image URL', 'easmedia'), 'desc' => __('Select or upload your image.', 'easmedia'), 'id' => 'easmedia_metabox_img', 'type' => 'images', 'defflimit' => '0', 'std' => ''), array('name' => __('Full-size image control', 'easmedia'), 'desc' => __('If ON, image which exceeds the specified size limit will be automatically resized. You can change image size limit through plugin control panel.', 'easmedia'), 'id' => 'easmedia_metabox_media_image_opt1', 'type' => 'checkboxoptdef', 'defflimit' => '1', 'std' => 'on')));
    easmedia_add_meta_box($meta_box);
    // MEDIA DESC METABOX
    $meta_box = array('id' => 'easmedia_metabox_media_desc', 'title' => __('Media Information', 'easmedia'), 'description' => __('Input basic info for this media.', 'easmedia'), 'page' => 'easymediagallery', 'context' => 'normal', 'priority' => 'low', 'fields' => array(array('name' => __('Media Title', 'easmedia'), 'desc' => __('Enter a media title.', 'easmedia'), 'id' => 'easmedia_metabox_title', 'type' => 'text', 'defflimit' => '0', 'std' => ''), array('name' => __('Media Sub Title', 'easmedia'), 'desc' => __('You can use this sub title field for (ex: author, title track, etc...)', 'easmedia'), 'id' => 'easmedia_metabox_sub_title', 'type' => 'text', 'defflimit' => '0', 'std' => ''), array('name' => __('Media Description', 'easmedia'), 'desc' => __('Enter description for your media.', 'easmedia'), 'id' => 'easmedia_metabox_shordesc', 'type' => 'textareackeditor', 'defflimit' => '0', 'std' => __('', 'easmedia'))));
    easmedia_add_meta_box($meta_box);
}