/** * USAGE: * * To display a particular campaign’s button, just add this to your template: ed_charitable_get_campaign_donate_button( 123 ); * Replace 123 with the ID of your campaign. */ /** * Display a donate button for a specific campaign.…Continue reading
// =============================== // ✅ NexSouk.com Performance & Accessibility Optimizer // =============================== add_action(‘init’, function() { // ✅ Remove emoji scripts remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7); remove_action(‘wp_print_styles’, ‘print_emoji_styles’); // ✅ Reduce Heartbeat API frequency (to lower backend resource usage) add_filter(‘heartbeat_settings’, function($settings) { $settings[‘interval’] =…Continue reading
// =============================== // ✅ NexSouk Performance Booster (Safe Version) // PHP performance enhancements for: // – Load speed // – Core Web Vitals // – Accessibility // =============================== add_action(‘init’, function() { // ✅ Disable Emoji Scripts (safe) remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7);…Continue reading
// 1. Ensure ARIA attributes match proper roles function nexsouk_fix_aria_roles($content) { // Simplistic approach: strip aria-* from elements without proper roles // Better: adjust based on your theme/structure with context $valid_roles = array( ‘button’ => [‘aria-pressed’, ‘aria-expanded’], ‘navigation’ => [‘aria-label’,…Continue reading
// Add an Edit Post Link to Archives edit_post_link( __( ‘{Edit}’ ) ); // Add page slug to body class for better styling. function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type…Continue reading
/** * After enabling this snippet, go to Settings > Permalinks and click “Save Changes” * Configure the $enabled_post_types array to specify which post types should support .md URLs */ $enabled_post_types = [ ‘post’, ‘page’ ]; // Add rewrite rule…Continue reading
function my_theme_enqueue_scripts() { wp_enqueue_style( ‘code-block’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/src/front/style.css’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-font’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/fonts/Code-Pro-JetBrains-Mono-NL.ttf’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-css’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/style-index.css’, [], ‘1.0.0’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_scripts’ ); add_filter(‘mpcs_classroom_style_handles’, function($allowed_handles){ $allowed_handles[] = ‘code-block’; $allowed_handles[] = ‘code-block-font’; $allowed_handles[] = ‘code-block-css’;…Continue reading
function send_welcome_email_on_transaction_completed($event) { $txn = $event->get_data(); // Get the transaction data $usr = $txn->user(); // Get the user associated with the transaction MeprUtils::maybe_send_product_welcome_notices($txn, $usr); // Send the membership-specific welcome email } add_action(‘mepr-event-transaction-completed’, ‘send_welcome_email_on_transaction_completed’);Continue reading