const crypto = require(‘crypto’); const secret = ‘•••••••••’; // Your verification secret key const userId = current_user.id // A string UUID to identify your user const hash = crypto.createHmac(‘sha256’, secret).update(userId).digest(‘hex’);Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
// 1. Register the rule under the ‘User’ group add_filter(‘acf/location/rule_types’, function($choices) { $choices[‘User’][‘logged_in_admin’] = ‘Logged-In Admin’; return $choices; }); // 2. Limit to only valid operators for dropdown-based values add_filter(‘acf/location/rule_operators/logged_in_admin’, function($choices) { return [ ‘==’ => ‘is equal to’, ‘!=’…Continue reading
function lw_woocommerce_gpf_feed_item_google( $feed_item, $product ) { $product_name = $product->get_name(); $label = $product_name . ‘ Shopping Product Card’; $feed_item->purchase_link .= ‘?utm_content=’ . rawurlencode( $label ); return $feed_item; } add_filter( ‘woocommerce_gpf_feed_item_google’, ‘lw_woocommerce_gpf_feed_item_google’, 10, 2 );Continue reading
add_filter(‘the_content’, function($content) { if (!is_single()) return $content; $button = ‘ Print Post ‘; $pos = strpos($content, ‘ ‘); if ($pos !== false) { return substr_replace($content, $button, $pos + 4, 0); } return $button . $content; });Continue reading
/** * LifterLMS Content ACF Fields – Course-Focused Version with Edit Links * Registers ACF fields for COURSE records with comprehensive detail textareas * Includes direct edit and reporting links similar to Gravity Forms implementation * WPCode Snippet – Run…Continue reading
/** * LifterLMS Content CPT Registration * Registers custom post type for LifterLMS course content synchronization * WPCode Snippet – Run Everywhere – Priority 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function () { $labels = [ ‘name’…Continue reading
/** * WordPress Roles Sync – Part 1: Button Only * WPCode Snippet – Run Everywhere – Priority 20 * Start with just this to test if it saves */ defined( ‘ABSPATH’ ) || exit; // Simple admin bar button…Continue reading