/* WCV – Show and save product brand taxonomy on the product edit form */ add_action( ‘wcv_after_product_details’, ‘wcv_product_brand_select2’ ); /** * Add the Brands taxonomy to the vendor product edit form. * * @param int $object_id The post ID. */…Continue reading
function typography_enqueue_styles() { // Enqueue Typeboost.css from Cloudflare CDN wp_enqueue_style(‘typeboost-css’, ‘https://cdnjs.cloudflare.com/ajax/libs/typeboost/1.0.0/typeboost.css’, array(), ‘1.0.0’); // Enqueue webfontloader.js from Cloudflare CDN wp_enqueue_script(‘webfontloader’, ‘https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js’, array(), ‘1.6.28’, true); } add_action(‘wp_enqueue_scripts’, ‘typography_enqueue_styles’);Continue reading
/** * WPCode Snippet: Gravity Forms & Feeds Sync Engine * Description: Manual sync functionality for forms and their feeds * Location: Run Everywhere * Priority: 20 */ defined( ‘ABSPATH’ ) || exit; // Add a manual test button in…Continue reading
/** * WPCode Snippet: Gravity Forms & Feeds ACF Fields * Description: Registers ACF fields for form and feed data * Location: Run Everywhere * Priority: 10 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘acf/init’, function() { if ( !…Continue reading
/** * WPCode Snippet: Gravity Forms & Feeds CPT Registration * Description: Registers custom post type for Gravity Forms with feed tracking * Location: Run Everywhere * Priority: 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function() { $labels…Continue reading
wp_mail( ‘[email protected]’, ‘Test from WP’, ‘If you see this, wp_mail is working!’ );Continue reading
/* Plugin Name: LiteSpeed Daily Purge Description: Automatically purges LiteSpeed cache daily at 7:00 a.m. Pacific, stores purge timestamp for digest reporting. Version: 1.4 */ function run_litespeed_purge_with_digest_only() { // 🕒 Track the last time purge ran $purge_time = current_time( ‘mysql’…Continue reading
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’: new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src= ‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f); })(window,document,’script’,’dataLayer’,’GTM-W23H2FM’);Continue reading
// 設定 WordPress 記憶體限制 define(‘WP_MEMORY_LIMIT’, ‘256M’); define(‘WP_MAX_MEMORY_LIMIT’, ‘512M’); // 設定 PHP 執行層的上傳限制 @ini_set(‘upload_max_filesize’, ’64M’); @ini_set(‘post_max_size’, ’64M’); @ini_set(‘max_execution_time’, ‘300’);Continue reading
add_action(‘init’, function() { global $wp_post_types; if (isset($wp_post_types[‘awb_off_canvas’])) { $wp_post_types[‘awb_off_canvas’]->public = true; } }, 11);Continue reading