init(); } public function init(){ add_filter('show_admin_bar', '__return_false'); add_action( 'admin_enqueue_scripts', array( &$this, 'load_admin_style' ) ); add_action( 'login_enqueue_scripts', array( &$this, 'load_login_style') ); add_action( 'admin_menu', array( &$this, 'remove_admin_nodes') ); add_action( 'init', array( &$this, 'add_settings' ) ); add_action( 'init', array( &$this, 'register_my_session' ) ); register_nav_menus( array( 'primary' => __( 'Menu Principal', 'tapihuewines' ), 'secondary' => __( 'Menu Inferior', 'tapihuewines' ), ) ); add_theme_support('post-thumbnails'); add_post_type_support( 'page', 'excerpt' ); add_image_size('hero-thumbnail-1460x640', 1460, 640, true ); add_image_size('hero-thumbnail-1460x540', 1460, 420, true ); add_image_size('hero-thumbnail-800x350', 800, 350, true ); add_image_size('hero-thumbnail-235x150', 235, 150, true ); add_image_size('square-115', 115, 115, true ); } public function add_settings(){ if( function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Configuración', 'menu_title' => 'Configuración', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => true, 'position' => 5.5, )); acf_add_options_sub_page(array( 'page_title' => 'Opciones Generales', 'menu_title' => 'Opciones Generales', 'parent_slug' => 'theme-general-settings', )); } if( function_exists('acf_add_local_field_group') ): acf_add_local_field_group(array ( 'key' => 'group_5a6f200dad060', 'title' => 'Datos Generales', 'fields' => array ( array ( 'key' => 'field_5a6f282dfd563', 'label' => 'Nombre del Sitio', 'name' => 'site_title', 'type' => 'text', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array ( 'key' => 'field_5a6f283bfd564', 'label' => 'Descripción', 'name' => 'site_description', 'type' => 'textarea', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => 3, 'new_lines' => '', ), array ( 'key' => 'field_5a6f521f363c4', 'label' => 'Correo Administrador', 'name' => 'admin_email', 'type' => 'email', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', ), array ( 'key' => 'field_5a6f521f363c8', 'label' => 'Correo Contacto', 'name' => 'contact_email', 'type' => 'email', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', ), array ( 'key' => 'field_5a6f2467e167f', 'label' => 'Dirección', 'name' => 'address', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => 3, 'new_lines' => '', ), array ( 'key' => 'field_5a6f24d3e1680', 'label' => 'Teléfono', 'name' => 'phone', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f211defa11', 'title' => 'Redes Sociales', 'fields' => array ( array ( 'key' => 'field_5a6f253d4482c', 'label' => 'Facebook', 'name' => 'facebook', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => 'http://facebook.com/', ), array ( 'key' => 'field_5a6f25a74482d', 'label' => 'Instagram', 'name' => 'instagram', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => 'http://instagram.com', ), ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 2, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f226b7b371', 'title' => 'Pie de Página', 'fields' => array ( array ( 'key' => 'field_5a6f269030a12', 'label' => 'Copyright', 'name' => 'copyright', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => 2, 'new_lines' => '', ), ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 3, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f226b7b374', 'title' => 'Mapa', 'fields' => array ( array ( 'key' => 'field_5a6f269030a14', 'label' => 'Latitud', 'name' => 'map_lat', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), array ( 'key' => 'field_5a6f269030a15', 'label' => 'Longitud', 'name' => 'map_lon', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', ), ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 3, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f211defa12', 'title' => 'William Cole Vineyards', 'fields' => array ( array ( 'key' => 'field_5a6f253d4482d', 'label' => 'Link', 'name' => 'william_cole_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => 'http://', ) ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 4, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f211defa13', 'title' => 'Alto Vuelo', 'fields' => array ( array ( 'key' => 'field_5a6f253d4482e', 'label' => 'Link', 'name' => 'alto_vuelo_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => 'http://', ) ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 5, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); acf_add_local_field_group(array ( 'key' => 'group_5a6f211defa14', 'title' => 'Qunitay', 'fields' => array ( array ( 'key' => 'field_5a6f253d4482f', 'label' => 'Link', 'name' => 'quintay_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array ( 'width' => '', 'class' => '', 'id' => '', ), 'default_value' => '', 'placeholder' => 'http://', ) ), 'location' => array ( array ( array ( 'param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-opciones-generales', ), ), ), 'menu_order' => 6, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', )); endif; } public function remove_admin_nodes() { remove_menu_page('edit-comments.php'); //Comments remove_submenu_page('index', 'update-core'); // Actualizaciones //remove_submenu_page( 'themes.php', 'themes.php' ); // Editor //remove_submenu_page( 'themes.php', 'theme-editor.php' ); // Editor //remove_submenu_page('themes', 'edit'); //remove_menu_page('edit.php?post_type=home_hero'); //Custom Fields } public function load_admin_style() { wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/admin.css', false, '1.0.0' ); } public function load_login_style() { wp_enqueue_style( 'login_css', get_template_directory_uri() . '/login.css', false, '1.0.0' ); //echo ''; } public function register_my_session() { if( !session_id() ) { session_start(); } } } $Application = new Application();
post_content; ?>

Nuestras Marcas