<?php
/* -------------------------------
 * Remove admin navbar
 * -------------------------------
 */
add_action('get_header', 'remove_admin_login_header');

function remove_admin_login_header() {
    remove_action('wp_head', '_admin_bar_bump_cb');
}

/*-------------------------------------------------------------------------------
 Theme config
-------------------------------------------------------------------------------*/
if( function_exists('acf_add_options_page') ) {
    acf_add_options_page(array(
        'page_title'    => 'Configuración General',
        'menu_title'    => 'Configuración General',
        'menu_slug'     => 'theme-options',
        'capability'    => 'edit_posts',
        'parent_slug'   => '',
        'position'      => false,
        'icon-url'      => false,
        'redirect'      => false,
        'menu_position' => 4,
    ));

    acf_add_options_page(array(
        'page_title'    => 'Información de contacto',
        'menu_title'    => 'Contacto',
        'menu_slug'     => 'theme-options-contact',
        'capability'    => 'edit_posts',
        'parent_slug'   => 'theme-options',
        'position'      => false,
        'icon-url'      => false
    ));

    acf_add_options_page(array(
        'page_title'    => 'Configuraciond el footer',
        'menu_title'    => 'Footer',
        'menu_slug'     => 'theme-options-footer',
        'capability'    => 'edit_posts',
        'parent_slug'   => 'theme-options',
        'position'      => false,
        'icon-url'      => false
    ));

    acf_add_options_page(array(
        'page_title'    => 'Datos Estadisticos',
        'menu_title'    => 'Estadisticas',
        'menu_slug'     => 'theme-stats',
        'capability'    => 'edit_posts',
        'parent_slug'   => 'theme-options',
        'position'      => false,
        'icon-url'      => false
    ));
    acf_add_options_page(array(
        'page_title'    => 'Nuestros Valores',
        'menu_title'    => 'Valores',
        'menu_slug'     => 'theme-values',
        'capability'    => 'edit_posts',
        'parent_slug'   => 'theme-options',
        'position'      => false,
        'icon-url'      => false
    ));


    acf_add_options_page(array(
        'page_title'    => 'Lo que se ofrece',
        'menu_title'    => 'Lo que se ofrece',
        'menu_slug'     => 'theme-offers',
        'capability'    => 'edit_posts',
        'parent_slug'   => 'theme-options',
        'position'      => false,
        'icon-url'      => false
    ));
}