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: WooCommerce Custom Checkout Fields | |
* Description: Add some custom "emergency level" extra fields on the WooCommerce Checkout page. Save this custom data in each order metadata. | |
* Author: Pierre Saïkali | |
* Author URI: https://saika.li | |
* Text Domain: wc_ccf | |
* Domain Path: /languages/ | |
* Version: 1.0.0 | |
* Full Tutorial: https://mosaika.fr/personnaliser-tunnel-commande-woocommerce/ |
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: Contact Form 7 WooCommerce Order Select Field | |
* Description: Use the <code>[wc_order]</code> field in CF7 forms | |
* Author: Pierre Saïkali | |
* Author URI: https://saika.li | |
* Text Domain: cf7wcp | |
* Domain Path: /languages/ | |
* Version: 1.0.0 | |
*/ |
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 | |
namespace Mosaika; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Register our custom commands. |
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 | |
namespace Mosaika; | |
/** | |
* Handle a custom 'vendor' query var to get products of a specific Vendor. | |
* Handle a custom 'featured_by_vendor' query var to get featured products of a specific Vendor. | |
* | |
* @param array $query_args - WP_Query args | |
* @param array $query_vars - WC_Product_Query args |
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 | |
namespace MSK\Blog\Mailchimp; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Inscrit un utilisateur dans une liste MailChimp | |
* |
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 | |
/** | |
* Inspect/list functions called on hooks containing specific term | |
* | |
* @param array Array of terms that the hook should contain | |
* @return array | |
*/ | |
function inspect_hooks( $terms = [ 'wp_' ] ) { | |
global $wp_filter; | |
$related_hooks = []; |
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 | |
/** | |
* Intercept form submission and process it | |
*/ | |
function gf_intercept_form_submission( $data, $form ) { | |
if ( (int) $form['id'] !== (int) get_field( 'submit_project_gf_form_id', 'option' ) ) { | |
return; | |
} | |
// Do something with $data |
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 | |
/** | |
* Populate ACF select field options with Gravity Forms forms | |
*/ | |
function acf_populate_gf_forms_ids( $field ) { | |
if ( class_exists( 'GFFormsModel' ) ) { | |
$choices = []; | |
foreach ( \GFFormsModel::get_forms() as $form ) { | |
$choices[ $form->id ] = $form->title; |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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 | |
// Article/tutoriel complet sur https://mosaika.fr/astuces-developpement-acf/ | |
// Documentation officielle https://www.advancedcustomfields.com/resources/acf-update_value/ | |
/** | |
* Comparer la valeur de 2 champs pour accepter/refuser leur validation | |
* Filtre : acf/update_value | |
*/ |
NewerOlder