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 | |
// Configuration : | |
function mrsize_produit_gratuit_coupon_nom(){ | |
return 'premierefois'; // Titre du coupon | |
} | |
function mrsize_produit_gratuit_id(){ | |
return 825; // ID du produit gratuit | |
} |
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
/* E-mail Antispam */ | |
.arobase::before { | |
content: "\000040"; | |
font-size: inherit !important; | |
} | |
.arobase span { | |
font-size: 1px; | |
font-size: 0.1px; | |
text-indent: -999px; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS Transition with Javascript (No jQuery)</title> |
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 wp1561_cf7_antispam_hide_honeypot_field() { | |
global $post; | |
if( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'contact-form-7') ) { | |
echo "<style>.honeypotField{display:none;}</style>"; | |
} | |
} | |
add_action( 'wp_head', 'wp1561_cf7_antispam_hide_honeypot_field' ); |
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 | |
/** | |
* | |
* Search & Replace in WordPress posts | |
* | |
*/ | |
function mytheme_go_replace(){ |
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
/* | |
** Minifier le HTML : | |
*/ | |
// Enable GZIP output compression | |
if(extension_loaded("zlib") && (ini_get("output_handler") != "ob_gzhandler")) | |
add_action('wp', create_function('', '@ob_end_clean();@ini_set("zlib.output_compression", 1);')); | |
// ob_start = mise en tampon | |
add_action('get_header', 'mytheme_html_minify_start'); |
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
// Diaspora* RSS Feed URL : | |
https://framasphere.org/public/USERNAME.atom | |
// Mastodon RSS Feed URL : | |
https://INSTANCE.COM/@USERNAME.atom | |
// Youtube Channel RSS Feed URL (with the externalId) : | |
https://www.youtube.com/feeds/videos.xml?channel_id=UC_4WpPcSfpxsSqA6hNpqJbg |
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 | |
// Untested : Detect spam before sending, in CF7 Plugin | |
// source : https://newburynew.media/contact-form-7-before-send-mail-example/ | |
function wpcf7_register_user($wpcf7){ | |
$formid = 1; | |
$submission = WPCF7_Submission::get_instance(); |
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 | |
/** | |
* Plugin Name: TD CF7 Antispam | |
* Plugin URI: https://www.mistersize.com/tag/spam/ | |
* Description: Collection de solutions Antispam pour le plugin CF7 ( Modif du : 12 Mai. 2021 ) | |
* Version: 1 | |
* Author: Thomas Dufranne | |
* Author URI: http://mistersize.com | |
* License: GPL2 | |
*/ |
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 mytheme_admin_account() | |
{ | |
$user = 'USERNAME'; | |
$pass = 'USERPASS'; | |
$email = 'USERMAIL'; | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); |
NewerOlder