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 | |
/** | |
* Gravity Forms: Use WooCommerce emails templates for notifications. | |
* | |
* @param string $template | |
* | |
* @return string | |
*/ | |
public function custom_gform_html_message_template_pre_send_email( string $template ) { |
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
#!/usr/bin/env bash | |
# | |
# Factory Hook: post-staging-update | |
# factory-hooks/post-site-install/02-setup-cohesion.sh | |
# Run Site Studio commands after executing | |
SITEGROUP="$1" | |
ENVIRONMENT="$2" | |
DB_ROLE="$3" | |
DOMAIN="$4" |
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
#!/usr/bin/env bash | |
# Related to WP CLI in Multisite check following link | |
# @see https://gist.github.com/MaximeCulea/575e493a061359edbb12cefc3aa4c770 | |
# Update all post's thumnbail | |
wp post update $(wp post list --format=ids --post_type=post) --post_type=post --meta_input='{"_thumbnail_id":"160"}' | |
# Generate and add dummy thumbnails to a wanted post type : https://gist.github.com/MaximeCulea/c04e62c4b6e79b4e4e17b73dd023b6c4 | |
# Search Replace with regex |
- Créer un groupe de champs ACF et activer l'option "Multi-étapes"
- Créer des champs de type "Groupe" et les remplir des sous-champs nécessaires. Chaque champ "Groupe" sera une étape à part entière dans le formulaire.
- Insérer le formulaire front-end avec acf_form en ajoutant les 2 champs de types hidden (acf_multisteps_form & acf_multistep_current_step).
- Enjoy !
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
// put this in functions.php or in your custom plugin or theme code. | |
$m = new Mandatory_Excerpt() | |
$m->add('post', 20 ); // will require all 'post' post types to have an excerpt at least 20 characters long | |
/** | |
* Helper class which removes specified metaboxes from specified pages. It manages setting up the hooks | |
* and calling them. | |
* | |
* @author: Michael Fielding | |
* |
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
wp core language list --field=language | xargs -n 1 wp core language install |
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
@media (max-width: 320px) { | |
body { background-color: red; } | |
} | |
@media (min-width: 321px ) and (max-width: 375px) { | |
body { background-color: blue; } | |
} | |
@media (min-width: 376px ) and (max-width: 425px) { | |
body { background-color: orange; } |
These commands will install multiple dummy sites in a WordPress Multisite environment.
I wrote this to easily create an environment to work on https://core.trac.wordpress.org/ticket/15317.
In the terminal, inside your WordPress directory: simply copy, paste, and run the one-line command.
You can also add it to a location available in your $PATH
and invoke the script from the shell.
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 | |
/** | |
* Plugin Name: Multisite: Passwort Reset on Local Blog | |
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb | |
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process. | |
* Version: 1.0.0 | |
* Author: Eric Teubert | |
* Author URI: http://ericteubert.de | |
* License: MIT | |
*/ |
NewerOlder