/** * WPCode Snippet: GravityView Views CPT Registration * Description: Registers custom post type for GravityView with full REST API support * Location: Run Everywhere * Priority: 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function() { $labels =…Continue reading
/** * Username Field * Description: Adds a username field to WC Vendors Signup and uses it when creating the user. */ defined( ‘ABSPATH’ ) || exit; add_filter( ‘wcv_signup_form_config’, function( $config ) { $config = is_array( $config ) ? $config…Continue reading
/** * Main LifterLMS Course Sync Engine * * PURPOSE: * – Syncs LifterLMS courses to llms_content_sync CPT * – Handles both automatic and manual synchronization * – Fires completion action for detail population extensions * – Cloudflare-safe with proper…Continue reading
/** * LifterLMS Course Sync – Detail Population Module * * PURPOSE: * – Hooks into main sync completion * – Populates comprehensive course data (lessons, sections, quizzes, etc.) * – Populates ACF fields on llms_content_sync CPT * – Uses…Continue reading
add_filter(‘get_avatar’, function($avatar_html, $id_or_email, $size) { // Force width/height attributes to match the requested avatar size $size = intval($size) ?: 26; // Remove existing width/height to avoid duplicates $avatar_html = preg_replace(‘/\s(width|height)=”\d+”/i’, ”, $avatar_html); // Add explicit width/height $avatar_html = preg_replace( ‘/]+)>/’,…Continue reading
add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading
add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading
… document.addEventListener(“DOMContentLoaded”, () => { // Customize this to match your sticky header (or set to null if not needed) const HEADER_SELECTOR = “#site-header”; const getHeaderOffset = () => { const header = HEADER_SELECTOR && document.querySelector(HEADER_SELECTOR); return header ? header.getBoundingClientRect().height…Continue reading
/** * Remove the “Have a coupon?” text and field from the cart page. Amiru アミル さん */ function woo_remove_coupon_form_on_cart() { remove_action( ‘woocommerce_before_cart_table’, ‘woocommerce_output_all_notices’, 10 ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_cart_totals’, 10 ); } add_action( ‘woocommerce_cart_is_empty’, ‘woo_remove_coupon_form_on_cart’ ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_form_coupon’, 10…Continue reading