[medical_profile]

/** * Shortcode: [medical_profile] * Collects (current_smoker, diabetes, heart_attack_stroke) * Shows them in a 3-column layout with Syncfusion radio buttons. * AJAX => ‘medical_profile_submit’ */ add_shortcode(‘medical_profile’, function() { if (!is_user_logged_in()) { return “ You must be logged in to update…Continue reading

[cvd_risk_assessment]

/** * Plugin Name: CVD Risk Assessment (Matching Refresh Button Style) * Description: Shortcode [cvd_risk_assessment] with a 4-column layout and a gauge aligned similarly to MetS, plus a matching Refresh button. */ add_action(‘wp_ajax_get_cvd_data’,’handle_get_cvd_data’); function handle_get_cvd_data(){ if(!is_user_logged_in()){ wp_send_json_error([‘message’=>’Not logged in’]); }…Continue reading

[metabolic_syndrome]

/** * Plugin Name: Metabolic Syndrome (Aligned with CVD Code) * Description: Adds AJAX + Shortcode [metabolic_syndrome] with a grid-based layout, bigger gauge, and factor badges aligned with the style used in CVD code. */ /******************************************************* * 1) AJAX Handler…Continue reading

Cardioxon Multi-Page Modal with Cache

/** * Plugin Name: Cardioxon Multi-Page Modal (Optimized) * Description: A single reusable Bootstrap modal that loads multiple WP pages by slug with server-side & client-side caching. * Version: 1.0 * Author: YourName */ /** * 1) AJAX endpoint: get_cdx_modal_content…Continue reading

[advanced_metrics]

/** * Plugin Name: Advanced Metrics (Bootstrap & LaTeX) * Description: Provides a [advanced_metrics] shortcode with a Bootstrap table, AJAX calculations, LaTeX formulas, and an info icon that opens a modal (placeholder). * Version: 2.0 * Author: YourName */ //…Continue reading

[cdx_4scores]

/** * Plugin Name: CDX 8 Scores (Bootstrap, Centered Formulas) * Description: Shortcode [cdx_4scores] => shows 8 body composition scores (BMR, TDEE, TBW, BFP, IBW, ABW, LBM, FFMI) in a responsive Bootstrap table with centered MathJax formulas. * Version: 1.0…Continue reading

Envira Gallery – Control Lightbox Transition Speed

/* Speed up or slow down the transition speed for lightbox images * * @link https://enviragallery.com/docs/changing-the-transition-speed-for-lightbox-images/ */ add_filter( ‘envira_gallery_get_config’, ‘my_envira_gallery_get_config’, 10, 2 ); function my_envira_gallery_get_config( $data_config, $key ) { $data_config[‘transition_duration’] = 5000; $data_config[‘animation_duration’] = 5000; return $data_config; }Continue reading

Empeche les liens dans les commentaires pour les abonnés

function restrict_links_in_buddypress_comments($content) { if (!is_user_logged_in()) { return $content; } $user = wp_get_current_user(); $allowed_roles = [‘administrator’, ‘contributor’]; // Vérifier si l’utilisateur est un contributeur ou un administrateur $user_can_post_links = array_intersect($allowed_roles, (array) $user->roles); // Si l’utilisateur n’est ni admin ni contributeur, bloquer…Continue reading