This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('posts_orderby', function($order){ | |
return "DATE(mt1.meta_value) DESC"; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('posts_join_paged', function ($join) { | |
return "LEFT JOIN wpp1_postmeta ON ( wpp1_posts.ID = wpp1_postmeta.post_id AND wpp1_postmeta.meta_key = 'Date de l\'événement')"; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Remove Google ReCaptcha code/badge everywhere apart from select pages | |
add_action('wp_print_scripts', function () { | |
//Add pages you want to allow to array | |
if ( !is_page( array( 'slugs-go-here' ) ) ){ | |
wp_dequeue_script( 'google-recaptcha' ); | |
//wp_dequeue_script( 'google-invisible-recaptcha' ); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Custom translations | |
add_action('wp_enqueue_scripts', function(){ | |
wp_enqueue_script('translations-js', get_stylesheet_directory_uri() . '/assets/js/translations.js'); | |
}); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var medieval = medieval || {}; | |
var start; var end; | |
medieval.calendarFix = function ($) { | |
"use strict"; | |
let initialize = function () { | |
start = jQuery('input.date-start').first(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Short code pour le nombre d'items dans une catégorie | |
add_shortcode('categoryCount', 'nbProductsCategoryShortcode'); | |
function nbProductsCategoryShortcode ($attributes = []) { | |
global $wpdb; | |
$attributes = shortcode_atts([ | |
'category' => null, | |
], $attributes); | |
$category = $attributes['category']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Force https | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,NE] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// output headers so that the file is downloaded rather than displayed | |
header('Content-Type: text/csv; charset=utf-8'); | |
header('Content-Disposition: attachment; filename=rapport.csv'); | |
ob_start(); | |
$dbHostName = ''; | |
$dbDatabase = ''; | |
$dbUsername = ''; | |
$dbPassword = ''; |
NewerOlder