Type: php
Cleanup_Posts_Categories_Tags_06_30
/* Plugin Name: Daily Cleanup with Report Description: Deletes standard blog posts, categories, and tags daily, stores summary data for digest reporting, and avoids interfering with WPCode or other plugin taxonomies. Version: 1.9 */ function delete_all_posts_categories_tags_with_report() { global $wpdb; //…Continue reading
Fix missing view_item from single product pages
// Snippet by MI team – start. add_action(‘woocommerce_after_single_product’, function() { if (class_exists(‘MonsterInsights_eCommerce_WooCommerce_Integration’)) { $mi_ec_woo = MonsterInsights_eCommerce_WooCommerce_Integration::get_instance(); if (method_exists($mi_ec_woo, ‘product_detail’)) { $mi_ec_woo->product_detail(); } } }); // Snippet by MI team – end.Continue reading
VVWC Digest Composer
/* Plugin Name: VVWC Daily Digest Composer Description: Composes and sends a daily email summary after cleanup and purge routines. Uses external helper for Elementor-safe context injection. Version: 2.3 */ function send_daily_vvwc_digest_email() { // 🔒 Suppress warnings and inject dummy…Continue reading
Register Custom Post Type: Changelog
// Register Custom Post Type function create_changelog_cpt() { $labels = array( ‘name’ => _x( ‘Changelogs’, ‘Post Type General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Changelog’, ‘Post Type Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Changelogs’, ‘text_domain’ ), ‘name_admin_bar’ => __(…Continue reading
Gravity Forms PHP Helpers
const IC_REGEXP_KATAKANA = “/\A[ア-ンガ-ボァ-ョヮッーヴ]+\z/u”; const IC_REGEXP_WHITESPACE = “/[\s\x{3000}]+/u”; const IC_REGEXP_POST_CODE_JP = “/\A\d{3}-?\d{4}\z/u”; const IC_REGEXP_PHONE = “/\A\+?\d[\d-]{1,14}\z/u”; // デバッグログは javascript-helpers.js と同じく、クエリパラメータ `debugp` // が付いている場合のみ出力する(例: ?debugp / ?debugp=1) function icDebugp($message) { static $enabled = null; if($enabled === null) $enabled = isset($_REQUEST[‘debugp’]); if(!$enabled)…Continue reading
CustomFonts
/* Plugin Name: MA Custom Fonts Description: Load custom fonts and inject to Gutenberg, Bricks, Oxygen Author: Matthias Altmann Project: Code Snippet MA Custom Fonts Version: 3.4.4 Plugin URI: https://www.altmann.de/en/blog-en/code-snippet-custom-fonts/ Description: en: https://www.altmann.de/en/blog-en/code-snippet-custom-fonts/ de: https://www.altmann.de/blog/code-snippet-eigene-schriftarten/ Copyright: © 2020-2025, Matthias Altmann…Continue reading
_MK – SECURITÉ
_MK – Last connection
// Enregistre la date de connexion de l’utilisateur function enregistrer_derniere_connexion($user_login, $user) { // Met à jour la date de la dernière connexion $last_login = current_time(‘mysql’); update_user_meta($user->ID, ‘last_login’, $last_login); // Debug: Vérifie si la date est bien enregistrée if (false ===…Continue reading
Esconder alerta HPOS do Woocommerce
/*Esconder alerta HPOS do Woocommerce * [email protected], 01/07/25 */ add_action( ‘admin_head’, function() { echo ‘ ‘; });Continue reading