This file contains 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
// ------------------------------------------------------ | |
// MAP pour afficher les programmes | |
// ------------------------------------------------------ | |
export const googleMap = () => { | |
let map = document.querySelectorAll(".google_map_js"); | |
if (map) { | |
if (window.initMapsCookiesAllows === undefined) { | |
if (map) { | |
map.forEach(function (item) { |
This file contains 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
esc_html() is more or less lossless — it just turns HTML markup into encoded visible text, so that it's not rendered as markup by browser. | |
Semantically it's escape, so it's meant to be used to make output to page safe. | |
sanitize_text_field() however actually removes all HTML markup, as well as extra whitespace. It leaves nothing but plain text. | |
Semantically it's sanitize, so it's meant to be used to make input being saved safe. | |
This file contains 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
# BEGIN Redirect HTTP to HTTPS | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE,QSA] | |
</IfModule> | |
# END Redirect HTTP to HTTPS |
This file contains 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 responsive container to embeds | |
/* ------------------------------------ */ | |
add_filter( 'embed_oembed_html', 'wrap_oembed_html', 99, 4 ); | |
function wrap_oembed_html( $cached_html, $url, $attr, $post_id ) { | |
return '<div class="embed-responsive embed-responsive-16by9">' . $cached_html . '</div>'; | |
} |
This file contains 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
document.getElementsByTagName('*').length |
This file contains 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
# In functions.php (your WordPress theme) | |
# Add the following lines | |
// REMOVE WP EMOJI | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
This file contains 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
#15 – Bloquer l’accès au fichier readme.html | |
#Les fichiers readme.html et license.txt peuvent révéler des informations sur la version de WordPress utilisée sur votre site. Utilisons le fichier .htaccess afin d’en bloquer l’accès : | |
<files readme.html> | |
deny from all | |
</files> | |
<files license.txt> | |
deny from all | |
</files> |
This file contains 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
function btn_clone(){ | |
$btn_link = get_sub_field('btn_link'); | |
$btn_position = get_sub_field('btn_position'); | |
$btn_color = get_sub_field('btn_color'); | |
$btn_deco = get_sub_field('btn_deco'); | |
$force_line = get_sub_field('btn-force-line'); | |
//----- alignement bouton | |
$row_align = ""; |
This file contains 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
## Dans le plugin redirection il est possible de paramétrer les anciens permalink pour les rediriger : | |
/%post_id%/%postname%/ | |
## Pour tester les regex : | |
https://regexr.com/<br> | |
## Redirection de tous les feeds vers l'accueil | |
^/(.*)\/feed<br> | |
https://nomdedomaine.com/$1<br> |
OlderNewer