add_action( ‘wp_enqueue_scripts’, function() { wp_add_inline_script( ‘jquery’, ‘ jQuery(document).on(“click”, “.uvri-tab-btn”, function() { jQuery(“.uvri-tab-btn”).removeClass(“active”); jQuery(“.uvri-tab-panel”).removeClass(“active”); jQuery(this).addClass(“active”); jQuery(“#” + jQuery(this).data(“tab”)).addClass(“active”); }); ‘ ); } ); function uvri_podcast_episodes_shortcode() { $year_season = array( 2023 => 1, 2024 => 2, 2025 => 3, 2026 => 4,…Continue reading
if ( ! defined( ‘COMPEER_PODCAST_CURRENT_SEASON’ ) ) { define( ‘COMPEER_PODCAST_CURRENT_SEASON’, ‘5’ ); } add_action( ‘save_post’, function ( $post_id, $post ) { if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) { return; } if ( ! $post instanceof WP_Post || $post->post_type…Continue reading
google-site-verification=2qRnmMOU51GWk3rx-tL2TwbUAd1kOVvjw9caXI6AvrA google-site-verification=2qRnmMOU51GWk3rx-tL2TwbUAd1kOVvjw9caXI6AvrAContinue reading
add_filter( ‘pre_do_shortcode_tag’, static function ( $output, $tag, $atts ) { if ( ‘frm-reset-password’ !== $tag || ! is_user_logged_in() || ! isset( $_GET[‘key’], $_GET[‘login’] ) || ! class_exists( ‘FrmRegResetPWForm’ ) ) { return $output; } $key = sanitize_text_field( wp_unslash( $_GET[‘key’] )…Continue reading
/** * BwC — Campus term helpers * [bwc_campus field=”school_name|location|url”] */ function bwc_campus_shortcode( $atts ) { $atts = shortcode_atts( array( ‘field’ => ‘school_name’, ‘link’ => ‘yes’, ‘new_tab’ => ‘yes’, ‘fallback’ => ”, ), $atts, ‘bwc_campus’ ); $terms = get_the_terms( get_the_ID(),…Continue reading
add_filter( ‘plugin_action_links’, ‘disable_all_plugin_deactivation’, 10, 4 ); function disable_all_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) { if ( get_current_user_id() !== 1 ) { // Replace 1 with your admin user ID unset( $actions[‘deactivate’] ); } return $actions; }Continue reading
/* * Snippet #113: GTranslate language switch — auto reload * * GTranslate with url_structure=none sets the googtrans cookie client-side but * does not trigger a page reload. This means PHP-rendered content (e.g. the LTL * banner PDF link) and…Continue reading