__('Espania Video Options', 'espania'), 'id' => 'espania_format_video_options', 'pages' => array( 'post' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __('Embed Code', 'espania'), 'id' => "{$prefix}embed_code", 'type' => 'textarea', 'std' => '', 'clone' => false, ), array( 'name' => __('Youtube / Vimeo Video Url', 'espania'), 'id' => "{$prefix}video_url", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('MP4 file Url', 'espania'), 'id' => "{$prefix}video_mp4", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('WebM file Url', 'espania'), 'id' => "{$prefix}video_webm", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('OGV file Url', 'espania'), 'id' => "{$prefix}video_ogv", 'type' => 'text', 'std' => '', 'clone' => false, ), ) ); // Metabox for Post Format: Audio $meta_boxes[] = array( 'title' => __('Espania Audio Options', 'espania'), 'id' => 'espania_format_audio_options', 'pages' => array( 'post' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __('Mp3 file Url', 'espania'), 'id' => "{$prefix}audio_mp3", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('OGG file Url', 'espania'), 'id' => "{$prefix}audio_ogg", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Wav file Url', 'espania'), 'id' => "{$prefix}audio_wav", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('iFrame', 'espania'), 'id' => "{$prefix}iframe_audio", 'type' => 'textarea', 'std' => '', 'clone' => false, ), ) ); // Metabox for Portfolio $meta_boxes[] = array( 'title' => __('Espania Postfolio Settings', 'espania'), 'id' => 'espania_portfolio_options', 'pages' => array( 'portfolio' ), 'context' => 'normal', // Where the meta box appear: normal (default), advanced, side. Optional. 'priority' => 'high', 'fields' => array( array( 'name' => __('Add Images for Portfolio', 'espania'), 'id' => "{$prefix}gallery", 'type' => 'image_advanced', 'max_file_uploads' => 20, ), array( 'name' => __('Follow text on scrolling.', 'espania'), 'id' => "{$prefix}follow_text", 'type' => 'checkbox', 'std' => 1, ), array( 'name' => __('Portfolio back link', 'espania'), 'id' => "{$prefix}back_link", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Portfolio navigation', 'espania'), 'id' => "{$prefix}layout_portfolio_postnav", 'type' => 'select', 'placeholder' => 'Portfolio navigation', 'options' => array( 'show' => __('Show prev/next portfolio block', 'espania'), 'hide' => __('Hide prev/next portfolio block', 'espania') ), 'multiple' => false, ), array( 'name' => __('Share Block', 'espania'), 'id' => "{$prefix}layout_portfolio_share", 'type' => 'select', 'placeholder' => 'Share Block', 'options' => array( 'show' => __('Show share portfolio block', 'espania'), 'hide' => __('Hide share portfolio block', 'espania') ), 'multiple' => false, ), ) ); // Metabox for Layouts $meta_boxes[] = array( 'title' => __('Espania Layout Settings', 'espania'), 'id' => 'espania_page_options', 'pages' => array( 'post', 'page' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __('Footer Settings', 'espania'), 'id' => "{$prefix}layout_footer", 'type' => 'select', 'placeholder' => 'Footer layout', 'options' => array( 'all' => __( 'Display the footer widgets & socket', 'espania' ), 'widgets' => __( 'Display only the footer widgets (no socket)', 'espania' ), 'socket' => __( 'Display only the socket (no footer widgets)', 'espania' ), 'none' => __( 'Don\'t display the socket & footer widgets', 'espania' ) ), 'multiple' => false, ), array( 'name' => __('Header Settings', 'espania'), 'id' => "{$prefix}layout_header", 'type' => 'select', 'placeholder' => 'Header layout', 'options' => array( 'header-standard' => __('Standard header', 'espania'), 'header-fixed' => __('Standard sticky header', 'espania'), 'header-alt' => __('Alternative header', 'espania'), 'header-none' => __('Hide header', 'espania') ), 'multiple' => false, ), array( 'name' => __('Title Settings', 'espania'), 'id' => "{$prefix}layout_title", 'type' => 'select', 'placeholder' => 'Title layout', 'options' => array( 'show' => __('Show title', 'espania'), 'hide' => __('Hide title', 'espania') ), 'multiple' => false, ), array( 'name' => __('Sidebar Settings', 'espania'), 'id' => "{$prefix}layout_sidebar", 'type' => 'select', 'placeholder' => 'Sidebar layout', 'options' => array( 'show' => __('Show sidebar', 'espania'), 'hide' => __('Hide sidebar', 'espania') ), 'multiple' => false, ), ) ); // Metabox for Posts $meta_boxes[] = array( 'title' => __('Espania Single Post Settings', 'espania'), 'id' => 'espania_post_options', 'pages' => array( 'post' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __('Post layout', 'espania'), 'id' => "{$prefix}layout_single_post", 'type' => 'select', 'placeholder' => 'Post layout', 'options' => array( 'standard' => __('Standard post layout', 'espania'), 'altern' => __('Alternative post layout', 'espania') ), 'multiple' => false, ), array( 'name' => __('Post navigation', 'espania'), 'id' => "{$prefix}layout_single_postnav", 'type' => 'select', 'placeholder' => 'Post navigation', 'options' => array( 'show' => __('Show prev/next post block', 'espania'), 'hide' => __('Hide prev/next post block', 'espania') ), 'multiple' => false, ), array( 'name' => __('Tags Block', 'espania'), 'id' => "{$prefix}layout_single_tags", 'type' => 'select', 'placeholder' => 'Tags Block', 'options' => array( 'show' => __('Show tags post block', 'espania'), 'hide' => __('Hide tags post block', 'espania') ), 'multiple' => false, ), array( 'name' => __('Share Block', 'espania'), 'id' => "{$prefix}layout_single_share", 'type' => 'select', 'placeholder' => 'Share Block', 'options' => array( 'show' => __('Show share post block', 'espania'), 'hide' => __('Hide share post block', 'espania') ), 'multiple' => false, ), array( 'name' => __('Random posts', 'espania'), 'id' => "{$prefix}layout_single_random", 'type' => 'select', 'placeholder' => 'Random posts', 'options' => array( 'show' => __('Show random posts block', 'espania'), 'hide' => __('Hide random posts block', 'espania') ), 'multiple' => false, ), ) ); // Metabox for Contact Page $meta_boxes[] = array( 'title' => __('Espania Contact Page Settings', 'espania'), 'id' => 'espania_contact_page', 'pages' => array( 'page' ), 'context' => 'normal', // Where the meta box appear: normal (default), advanced, side. Optional. 'priority' => 'high', 'fields' => array( array( 'name' => __('Contact Form 7 Shortcode', 'espania'), 'id' => "{$prefix}cf7_shortcode", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Show Map', 'espania'), 'desc' => __('Show google map for contact page?', 'espania'), 'id' => "{$prefix}show_map", 'type' => 'checkbox', 'std' => 1, ), array( 'name' => __('Map Center Latitude', 'espania'), 'id' => "{$prefix}map_latitude", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Map Center Longitude', 'espania'), 'id' => "{$prefix}map_longitude", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Address', 'espania'), 'id' => "{$prefix}contact_adress", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Email', 'espania'), 'id' => "{$prefix}contact_email", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Phone Number', 'espania'), 'id' => "{$prefix}contact_phone", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Phone Number №2', 'espania'), 'id' => "{$prefix}contact_phone2", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Site Address', 'espania'), 'id' => "{$prefix}contact_site", 'type' => 'text', 'std' => '', 'clone' => false, ), array( 'name' => __('Contact Site Address №2', 'espania'), 'id' => "{$prefix}contact_site2", 'type' => 'text', 'std' => '', 'clone' => false, ), ) ); /*-----------------------------------------------------------------------------------*/ /* Registering metaboxes /*-----------------------------------------------------------------------------------*/ function addons_espania_register_meta_boxes() { // Make sure there's no errors when the plugin is deactivated or during upgrade if ( !class_exists( 'RW_Meta_Box' ) ) return; global $meta_boxes; foreach ( $meta_boxes as $meta_box ) { new RW_Meta_Box( $meta_box ); } } // Hook to 'admin_init' to make sure the meta box class is loaded before // (in case using the meta box class in another plugin) // This is also helpful for some conditionals like checking page template, categories, etc. add_action( 'admin_init', 'addons_espania_register_meta_boxes' ); ?>