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
<?php | |
function my_setup_theme() { | |
add_theme_support( 'editor-styles' ); // add support for styles to the editor | |
add_editor_style( get_stylesheet_uri() ); // add the site styles to the editor | |
} | |
add_action( 'after_setup_theme', 'my_setup_theme' ); |
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
<?php | |
/** | |
* Remplacement du logo WP de la page de login | |
*/ | |
function my_login_head() { | |
if ( has_custom_logo() ) { | |
if ( $logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'medium' ) ) { | |
printf( |
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
<?php | |
remove_action( 'wp_head', 'wp_generator' ); |
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
<?php | |
// remove emoji support | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
// remove emoji support from admin | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
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
# delete local tag 'vx.y.z' | |
git tag -d vx.y.z | |
# delete remote tag | |
git push --delete origin vx.y.z |
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
<?php | |
// constant for the theme version | |
$theme_data = wp_get_theme(); | |
define( 'THEME_VERSION', $theme_data->get( 'Version' ) ); | |
// use it in the enqueues | |
wp_enqueue_style( 'style-name', get_stylesheet_uri(), array(), THEME_VERSION ); | |
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), THEME_VERSION, true ); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="CanonicalHTTPSRule" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{HTTP_HOST}" pattern="^www\.my-domain\.com$" negate="true" /> | |
<add input="{HTTPS}" pattern="off" /> |
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
#!/bin/bash | |
# Thanks to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# Original version modified & translated by Patrick Pézier | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# More information about semantic versioning: |
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
<?php | |
// suppression de la barre de choix de couleurs d'interface pour les utilisateurs lambda | |
if ( is_admin() && ! current_user_can( 'manage_options' ) ) { | |
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | |
} | |
// définition de la couleur par défaut de l'interface en "océan" | |
function set_default_admin_color( int $user_id ) { | |
$args = array( |
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
<cfscript> | |
json = deserializeJSON( cfhttp.fileContent.toString("utf-8") ); | |
</cfscript> |
NewerOlder