<commit_before><?php
/**
 * Ligue BN functions and definitions
 *
 * Set up the theme and provides some helper functions, which are used in the
 * theme as custom template tags. Others are attached to action and filter
 * hooks in WordPress to change core functionality.
 *
 * When using a child theme you can override certain functions (those wrapped
 * in a function_exists() call) by defining them first in your child theme's
 * functions.php file. The child theme's functions.php file is included before
 * the parent theme's file, so the child theme functions would be used.
 *
 * @link https://codex.wordpress.org/Theme_Development
 * @link https://codex.wordpress.org/Child_Themes
 *
 * Functions that are not pluggable (not wrapped in function_exists()) are
 * instead attached to a filter or action hook.
 *
 * For more information on hooks, actions, and filters,
 * {@link https://codex.wordpress.org/Plugin_API}
 *
 * @package WordPress
 * @subpackage Ligue_BN
 */

/**
 * Set the content width based on the theme's design and stylesheet.
 *
 */

if ( ! function_exists( 'liguebn_setup' ) ) :
function liguebn_setup() {
    load_theme_textdomain( 'liguebn', get_template_directory() . '/languages' );

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	/*
	 * Let WordPress manage the document title.
	 * By adding theme support, we declare that this theme does not use a
	 * hard-coded <title> tag in the document head, and expect WordPress to
	 * provide it for us.
	 */
	add_theme_support( 'title-tag' );

	/*
	 * Enable support for Post Thumbnails on posts and pages.
	 *
	 * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
	 */
	add_theme_support( 'post-thumbnails' );
	set_post_thumbnail_size( 750, 345, true );
	add_image_size( 'list-post-thumbnails',  750, 345, array( 'center', 'center') );

	// This theme uses wp_nav_menu() in two locations.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu',      'liguebn' ),
		'social'  => __( 'Social Links Menu', 'liguebn' ),
	) );

	/*
	 * 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'
	) );

	/*
	 * Enable support for Post Formats.
	 *
	 * See: https://codex.wordpress.org/Post_Formats
	 */
	add_theme_support( 'post-formats', array(
		'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
	) );
	add_post_type_support( 'page', 'post-formats');
}
endif; // liguebn_setup
add_action( 'after_setup_theme', 'liguebn_setup' );

/**
 * JavaScript Detection.
 *
 * Adds a `js` class to the root `<html>` element when JavaScript is detected.
 */
function liguebn_javascript_detection() {
	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
}
add_action( 'wp_head', 'liguebn_javascript_detection', 0 );

/**
 * Enqueue scripts and styles.
 */
function liguebn_scripts() {
	// Load our libs stylesheet.
	wp_enqueue_style( 'liguebn-libs-style', get_template_directory_uri() . '/dist/libs.min.css' );
	// Load our main stylesheet.
	wp_enqueue_style( 'liguebn-style', get_template_directory_uri() . '/dist/app.min.css' );
	// Load our libs javascript.
	wp_enqueue_script( 'liguebn-libs', get_template_directory_uri() . '/dist/libs.min.js' );
	// Load our main javascript.
	wp_enqueue_script( 'liguebn-app', get_template_directory_uri() . '/dist/app.min.js' );
}
add_action( 'wp_enqueue_scripts', 'liguebn_scripts' );


if ( ! function_exists( 'liguebn_entry_meta' ) ) :
/**
 * Prints HTML with meta information for the categories, tags.
 */
function liguebn_entry_meta() {
	if ( is_sticky() && is_home() && ! is_paged() ) {
		printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'liguebn' ) );
	}

	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
		echo '<span class="comments-link">';
		/* translators: %s: post title */
		comments_popup_link( __( 'Leave a comment', 'liguebn' ), __( '1 Comment', 'liguebn' ), __( '% Comments', 'liguebn' ) );
		echo '</span>';
	}

	if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
		$time_string = '<time class="entry-date published updated clearfix" datetime="%1$s">%2$s</time>';

		$time_string = sprintf( $time_string,
			esc_attr( get_the_date( 'c' ) ),
			'<span class="day">' . get_the_date('j') . '</span><span class="month">' . get_the_date('F') . '</span><span class="year">' . get_the_date('Y') . '</span>',
			esc_attr( get_the_modified_date( 'c' ) ),
			get_the_modified_date()
		);

		printf( '<span class="posted-on"><h2 class="screen-reader-text">%1$s </h2>%2$s</span> ',
			_x( 'Posted on', 'Used before publish date.', 'liguebn' ),
			$time_string
		);
	}

	if ( 'post' == get_post_type() ) {
		if ( is_singular() && get_the_author_meta( 'description' ) ) {
			get_template_part( 'author-bio' );
		}
		else if (is_multi_author() ) {
			printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span> ',
				_x( 'By', 'Used before post author name.', 'liguebn' ),
				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
				get_the_author()<commit_msg>restore spaces between date elements on lists<commit_after><?php
/**
 * Ligue BN functions and definitions
 *
 * Set up the theme and provides some helper functions, which are used in the
 * theme as custom template tags. Others are attached to action and filter
 * hooks in WordPress to change core functionality.
 *
 * When using a child theme you can override certain functions (those wrapped
 * in a function_exists() call) by defining them first in your child theme's
 * functions.php file. The child theme's functions.php file is included before
 * the parent theme's file, so the child theme functions would be used.
 *
 * @link https://codex.wordpress.org/Theme_Development
 * @link https://codex.wordpress.org/Child_Themes
 *
 * Functions that are not pluggable (not wrapped in function_exists()) are
 * instead attached to a filter or action hook.
 *
 * For more information on hooks, actions, and filters,
 * {@link https://codex.wordpress.org/Plugin_API}
 *
 * @package WordPress
 * @subpackage Ligue_BN
 */

/**
 * Set the content width based on the theme's design and stylesheet.
 *
 */

if ( ! function_exists( 'liguebn_setup' ) ) :
function liguebn_setup() {
    load_theme_textdomain( 'liguebn', get_template_directory() . '/languages' );

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	/*
	 * Let WordPress manage the document title.
	 * By adding theme support, we declare that this theme does not use a
	 * hard-coded <title> tag in the document head, and expect WordPress to
	 * provide it for us.
	 */
	add_theme_support( 'title-tag' );

	/*
	 * Enable support for Post Thumbnails on posts and pages.
	 *
	 * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
	 */
	add_theme_support( 'post-thumbnails' );
	set_post_thumbnail_size( 750, 345, true );
	add_image_size( 'list-post-thumbnails',  750, 345, array( 'center', 'center') );

	// This theme uses wp_nav_menu() in two locations.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu',      'liguebn' ),
		'social'  => __( 'Social Links Menu', 'liguebn' ),
	) );

	/*
	 * 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'
	) );

	/*
	 * Enable support for Post Formats.
	 *
	 * See: https://codex.wordpress.org/Post_Formats
	 */
	add_theme_support( 'post-formats', array(
		'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
	) );
	add_post_type_support( 'page', 'post-formats');
}
endif; // liguebn_setup
add_action( 'after_setup_theme', 'liguebn_setup' );

/**
 * JavaScript Detection.
 *
 * Adds a `js` class to the root `<html>` element when JavaScript is detected.
 */
function liguebn_javascript_detection() {
	echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
}
add_action( 'wp_head', 'liguebn_javascript_detection', 0 );

/**
 * Enqueue scripts and styles.
 */
function liguebn_scripts() {
	// Load our libs stylesheet.
	wp_enqueue_style( 'liguebn-libs-style', get_template_directory_uri() . '/dist/libs.min.css' );
	// Load our main stylesheet.
	wp_enqueue_style( 'liguebn-style', get_template_directory_uri() . '/dist/app.min.css' );
	// Load our libs javascript.
	wp_enqueue_script( 'liguebn-libs', get_template_directory_uri() . '/dist/libs.min.js' );
	// Load our main javascript.
	wp_enqueue_script( 'liguebn-app', get_template_directory_uri() . '/dist/app.min.js' );
}
add_action( 'wp_enqueue_scripts', 'liguebn_scripts' );


if ( ! function_exists( 'liguebn_entry_meta' ) ) :
/**
 * Prints HTML with meta information for the categories, tags.
 */
function liguebn_entry_meta() {
	if ( is_sticky() && is_home() && ! is_paged() ) {
		printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'liguebn' ) );
	}

	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
		echo '<span class="comments-link">';
		/* translators: %s: post title */
		comments_popup_link( __( 'Leave a comment', 'liguebn' ), __( '1 Comment', 'liguebn' ), __( '% Comments', 'liguebn' ) );
		echo '</span>';
	}

	if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
		$time_string = '<time class="entry-date published updated clearfix" datetime="%1$s">%2$s</time>';

		$time_string = sprintf( $time_string,
			esc_attr( get_the_date( 'c' ) ),
			'<span class="day">' . get_the_date('j') . ' </span><span class="month">' . get_the_date('F') . ' </span><span class="year">' . get_the_date('Y') . '</span>',
			esc_attr( get_the_modified_date( 'c' ) ),
			get_the_modified_date()
		);

		printf( '<span class="posted-on"><h2 class="screen-reader-text">%1$s </h2>%2$s</span> ',
			_x( 'Posted on', 'Used before publish date.', 'liguebn' ),
			$time_string
		);
	}

	if ( 'post' == get_post_type() ) {
		if ( is_singular() && get_the_author_meta( 'description' ) ) {
			get_template_part( 'author-bio' );
		}
		else if (is_multi_author() ) {
			printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span> ',
				_x( 'By', 'Used before post author name.', 'liguebn' ),
				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
				get_the_author()
{'fraction_non_alphanumeric': 0.1597644027240935, 'fraction_numerical': 0.004601509295048776, 'mean_word_length': 4.303562713518789, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 63, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4373044', 'n_tokens_mistral': 3845, 'n_tokens_neox': 3622, 'n_words': 957}