// ========================================== // 1. 建立「FluentCRM ➔ Teachable 監視器」面板 // ========================================== add_action(‘admin_notices’, ‘display_fc_tea_monitor_panel’); function display_fc_tea_monitor_panel() { $log = get_option(‘fc_tea_debug_log’, ‘目前尚未有任何同步紀錄。’); if (isset($_GET[‘clear_fc_tea_log’])) { update_option(‘fc_tea_debug_log’, ”); $log = ‘紀錄已清空,等待下一次測試…’; } echo ‘ ‘; echo ‘ 🎓 FluentCRM ➔ Teachable 雙向同步監視器 清空紀錄 ‘;…Continue reading
/** * This will fire at the very end of a (successful) form entry. * * @link https://wpforms.com/developers/wpforms_process_complete/ * * @param array $fields Sanitized entry field values/properties. * @param array $entry Original $_POST global. * @param array $form_data Form data…Continue reading
add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_archive() && get_theme_mod(‘universal_toggle_post_badge’, ‘true’)) { $sticky_posts = get_option(‘sticky_posts’); if (!empty($sticky_posts)) { add_filter(‘posts_orderby’, function($orderby, $query) use ($sticky_posts) { global $wpdb; $sticky_list = implode(‘,’, array_map(‘intval’, $sticky_posts)); return “FIELD({$wpdb->posts}.ID, {$sticky_list}) DESC, {$orderby}”; }, 10, 2);…Continue reading
/** * RUTPLAN – Ana Sayfa 3 KM Online Esnaflar * WPCode > PHP Snippet > Run Everywhere */ /* ——————————————————- * Yardımcı: Kullanıcı koordinatlarını farklı meta adlarından çek * ——————————————————- */ function rp_get_user_lat_lng($user_id) { $lat_keys = [‘lat’, ‘latitude’, ‘enlem’,…Continue reading
add_shortcode(‘bet365_promo’, function($atts) { $atts = shortcode_atts([‘id’ => ”], $atts, ‘bet365_promo’); if (!$atts[‘id’]) return ‘Promo ID missing.’; $promo_name = esc_attr($atts[‘id’]); $container_id = ‘b365_’ . uniqid(); ob_start(); ?>Continue reading
/** * Plugin Name: AffiliateWP – Affiliate Referrals CSV Export * Description: Adds a “Download Referrals CSV” button to the Affiliate Area referrals tab. * When WooCommerce is active, the export includes full order details * (customer name, email, items…Continue reading
add_action( ‘wp_ajax_validate_vanity_code’, ‘send_vanity_coupon_request_notification’, 9 ); function send_vanity_coupon_request_notification() { if ( ! isset( $_REQUEST[‘vccNonce’] ) || ! wp_verify_nonce( $_REQUEST[‘vccNonce’], ‘request_vanity_coupon_code’ ) ) { return; } $affiliate_id = isset( $_REQUEST[‘affiliateID’] ) ? sanitize_text_field( $_REQUEST[‘affiliateID’] ) : false; $coupon_id = isset( $_REQUEST[‘couponID’] )…Continue reading
/** * Fix: Force query string format for all affiliate referral URLs. * * Part 1: Updates the in-memory settings so the portal URL generator * and affwp_get_affiliate_referral_url() both produce ?ref=value * format instead of /ref/value/ format. No database change.…Continue reading
/** * PN FluentCommunity Auto-Delete Diagnostics * No debug.log required */ if (!defined(‘ABSPATH’)) { exit; } /* |————————————————————————– | Enable main snippet internal logs too |————————————————————————– */ add_filter(‘pn_fcom_enable_debug_log’, ‘__return_true’); /* |————————————————————————– | Constants |————————————————————————– */ if (!defined(‘PN_FCOM_DIAG_OPTION’)) { define(‘PN_FCOM_DIAG_OPTION’, ‘pn_fcom_diag_entries’);…Continue reading