<?php

/*POST IMAGE*/
add_theme_support( 'post-thumbnails' );


add_action('after_setup_theme', function () {
    register_nav_menus([
        'nav_menu' => 'Nav menu',
        'footer_menu' => 'Footer menu',
        'mobile_menu' => 'Mobile Menu',
        'service_menu' => 'Service Menu',
    ]);
});

if( function_exists('acf_add_options_page') ) {
	
	acf_add_options_page(array(
		'page_title' 	=> 'Theme General Settings',
		'menu_title'	=> 'Theme Settings',
		'menu_slug' 	=> 'theme-general-settings',
		'capability'	=> 'edit_posts',
		'redirect'		=> false
	));
	
	
}


function wpdocs_custom_excerpt_length( $length ) {
    return 13;
}
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );

//WPML - Add a floating language switcher to the footer
 add_action('wp_footer', 'wpml_floating_language_switcher'); 
  
 function wpml_floating_language_switcher() { 
    echo '<div class="wpml-floating-language-switcher">';
        //PHP action to display the language switcher (see https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#using-php-actions)
        do_action('wpml_add_language_selector');
    echo '</div>'; 
}


