
<center><h2><strong>Ubuntu</strong></h2>
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
/**
 * Functions and definitions
 *
 */

/*
 * Let WordPress manage the document title.
 */
add_theme_support( 'title-tag' );

/*
 * Enable support for Post Thumbnails on posts and pages.
 */
add_theme_support( 'post-thumbnails' );

/*
 * Ajout du logo
*/
add_theme_support( 'custom-logo' );

/*
  * Amélioration des perfs Elementor
*/

add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
add_action('elementor/frontend/after_register_styles',function() {
	foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
		wp_deregister_style( 'elementor-icons-fa-' . $style );
	}
}, 20 );

/**
 * Load Custom Comments Layout file.
 */
require get_template_directory() . '/template-parts/comments-helper.php';

/*
 * Switch default core markup for search form, comment form, and comments
 * to output valid HTML5.
 */
add_theme_support( 'html5', array(
	'search-form',
	'comment-form',
	'comment-list',
	'gallery',
	'caption',
) );

/**
 * Include primary navigation menu
 */
function airmob_nav_init() {
	register_nav_menus( array(
		'header-menu' => 'Header Menu',
	) );
}
add_action( 'init', 'airmob_nav_init' );

/**
 * Register widget area.
 *
 */
function airmob_widgets_init() {
	register_sidebar( array(
		'name'          => 'Footer 1',
		'id'            => 'footer-1',
		'description'   => 'Add widgets',
		'before_title'  => '<h3>',
		'after_title'   => '</h3>',
	) );
	register_sidebar( array(
		'name'          => 'Footer 2',
		'id'            => 'footer-2',
		'description'   => 'Add widgets',
		'before_title'  => '<h3>',
		'after_title'   => '</h3>',
	) );
	register_sidebar( array(
		'name'          => 'Footer 3',
		'id'            => 'footer-3',
		'description'   => 'Add widgets',
		'before_title'  => '<h3>',
		'after_title'   => '</h3>',
	) );
	register_sidebar( array(
		'name'          => 'Copyright',
		'id'            => 'copyright',
		'description'   => 'Add widgets',
		'before_title'  => '<p>',
		'after_title'   => '</p>',
	) );
}
add_action( 'widgets_init', 'airmob_widgets_init' );

/**
 * Enqueue scripts and styles.
 */
function airmob_scripts() {
	wp_enqueue_style( 'airmob-style', get_stylesheet_uri() );
	wp_enqueue_style( 'airmob-custom-style', get_template_directory_uri() . '/assets/css/style.css' );
	wp_enqueue_style( 'custom', get_template_directory_uri() . '/assets/css/custom.css' );
	wp_enqueue_style( 'responsive', get_template_directory_uri() . '/assets/css/responsive.css' );
	wp_enqueue_style( 'comfortaa', 'https://fonts.googleapis.com/css?family=Comfortaa&display=swap' );
	wp_enqueue_script( 'font-awesome',  "https://kit.fontawesome.com/bc48331839.js", array(), false, true );
	wp_enqueue_script( 'airmob-scripts', get_template_directory_uri() . '/assets/js/scripts.js',  array( 'jquery' ), false, true  );
}


add_action( 'wp_enqueue_scripts', 'airmob_scripts' );

/**
 * Comment Form Placeholder Author, Email, URL
*/
function placeholder_author_email_url_form_fields($fields) {
  global $req;
  global $aria_req;
  global $commenter;
  $replace_author = __('Your Name', 'airmob');
  $replace_email = __('Your Email', 'airmob');
  $replace_url = __('Your Website', 'airmob');

  $fields['author'] = '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'airmob' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
                  '<input id="author" name="author" type="text" placeholder="'.$replace_author.'" value="' . esc_attr( $commenter['comment_author'] ) . '" size="20"' . $aria_req . ' /></p>';

  $fields['email'] = '<p class="comment-form-email"><label for="email">' . __( 'Email', 'airmob' ) . '</label> ' .
  ( $req ? '<span class="required">*</span>' : '' ) .
  '<input id="email" name="email" type="text" placeholder="'.$replace_email.'" value="' . esc_attr(  $commenter['comment_author_email'] ) .
  '" size="30"' . $aria_req . ' /></p>';

  $fields['url'] = '<p class="comment-form-url"><label for="url">' . __( 'Website', 'airmob' ) . '</label>' .
  '<input id="url" name="url" type="text" placeholder="'.$replace_url.'" value="' . esc_attr( $commenter['comment_author_url'] ) .
  '" size="30" /></p>';

  return $fields;
}
add_filter('comment_form_default_fields','placeholder_author_email_url_form_fields');

/**
* Comment Form Placeholder Comment Field
*/
function placeholder_comment_form_field($fields) {
  $replace_comment = __('Your Comment', 'airmob');

  $fields['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) .
  '</label><textarea id="comment" name="comment" cols="45" rows="8" placeholder="'.$replace_comment.'" aria-required="true"></textarea></p>';

  return $fields;
}
add_filter( 'comment_form_defaults', 'placeholder_comment_form_field' );


function my_theme_load_theme_textdomain() {
    load_theme_textdomain( 'airmob', get_template_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'my_theme_load_theme_textdomain' );
