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
SELECT | |
p.ID, | |
m.meta_value, | |
md.post_author, | |
wp_users.user_nicename, | |
p.post_parent, | |
p.menu_order, | |
md.post_title | |
FROM | |
wp_posts AS p |
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
<div class="row"> | |
<div class="col-lg-12"> | |
<form action="https://forms.octantis.ca/index.php" method="post" id="form"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<div class="form-group"> | |
<input class="form-control" id="firstname" name="firstname" type="text" placeholder="First Name *" data-required="true"> | |
<p class="help-block text-danger"></p> | |
</div> | |
<div class="form-group"> |
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 = ''; |
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
// 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
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
<?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
<?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
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')"; | |
}); |
OlderNewer