[2 lines collapsed] * Plugin Name: IIVR STQC Complete Fix * Plugin URI: https://icariivr.org.in/ * Description: STQC — W3C HTML, axe accessibility, Elementor kit CSS parse fix, Hindi /hi/ URLs. * Version: 2.5.20 * Version: 2.5.21 * Author: ICAR-IIVR * Requires at least: 5.8 * Requires PHP: 7.4 [4741 lines collapsed] } /** * EDP popup flyer URL — bundled plugin image, ya wp-config override. * Local EDP 04 flyer paths (same folder as this PHP, then assets/). * * @return array */ function iivr_edp_popup_flyer_paths() { $dir = dirname( __FILE__ ); return array( $dir . '/edp-04-2026-flyer.jpg', $dir . '/assets/edp-04-2026-flyer.jpg', ); } /** * Serve flyer from plugin folder: /?iivr_edp04_flyer=1 * * @return void */ function iivr_edp_popup_serve_image() { if ( ! isset( $_GET['iivr_edp04_flyer'] ) ) { return; } foreach ( iivr_edp_popup_flyer_paths() as $path ) { if ( is_readable( $path ) ) { header( 'Content-Type: image/jpeg' ); header( 'Cache-Control: public, max-age=86400' ); header( 'Content-Length: ' . (string) filesize( $path ) ); readfile( $path ); exit; } } status_header( 404 ); exit; } add_action( 'init', 'iivr_edp_popup_serve_image', -1 ); /** * EDP popup flyer URL — plugin endpoint (jpg ke saath PHP upload). * * @return string */ function iivr_edp_popup_image_url() { if ( defined( 'IIVR_EDP_POPUP_IMAGE' ) && is_string( IIVR_EDP_POPUP_IMAGE ) && '' !== trim( IIVR_EDP_POPUP_IMAGE ) ) { return trim( IIVR_EDP_POPUP_IMAGE ); $custom = trim( IIVR_EDP_POPUP_IMAGE ); if ( false === stripos( $custom, '4-1.png' ) ) { return $custom; } } $relative = 'assets/edp-04-2026-flyer.jpg'; $path = dirname( __FILE__ ) . '/' . $relative; if ( is_readable( $path ) ) { return plugins_url( $relative, __FILE__ ); } return ''; return add_query_arg( 'iivr_edp04_flyer', '1', home_url( '/' ) ); } /** * Active site ad popup slides (EDP flyer, SHITIJ, training brochure PDF). * Active site ad popup slides — EDP 04/2026 flyer only. * * @return array */ function iivr_shitij_popup_get_slides() { $slides = array(); if ( IIVR_EDP_POPUP_ENABLED ) { $image = iivr_edp_popup_image_url(); if ( is_string( $image ) && '' !== trim( $image ) ) { $slides[] = array( 'image' => trim( $image ), 'alt' => 'EDP04/2026 — Organic and Natural Farming for Soil Health and Microbial Diversity. 05–09 October 2026 at ICAR-IIVR, Varanasi. Last date to register: 30 September 2026. Fee ₹6000.', 'label' => 'EDP 04/2026 — Organic & Natural Farming', 'link' => defined( 'IIVR_EDP_POPUP_LINK' ) ? IIVR_EDP_POPUP_LINK : 'https://icariivr.org.in/events/', ); } $image = iivr_edp_popup_image_url(); if ( is_string( $image ) && '' !== trim( $image ) ) { $slides[] = array( 'image' => trim( $image ), 'alt' => 'EDP04/2026 — Organic and Natural Farming for Soil Health and Microbial Diversity. 05–09 October 2026 at ICAR-IIVR, Varanasi. Last date to register: 30 September 2026. Fee ₹6000.', 'label' => 'EDP 04/2026 — Organic & Natural Farming', 'link' => defined( 'IIVR_EDP_POPUP_LINK' ) ? IIVR_EDP_POPUP_LINK : 'https://icariivr.org.in/events/', ); } if ( IIVR_SHITIJ_POPUP_ENABLED ) { $image = IIVR_SHITIJ_POPUP_IMAGE; if ( is_string( $image ) && '' !== trim( $image ) ) { $slides[] = array( 'image' => trim( $image ), 'alt' => 'SHITIJ 2.0 — Incubate Your Innovation. Application window: 01 July to 21 July 2026.', 'label' => 'SHITIJ 2.0', ); } } if ( defined( 'IIVR_TRAINING_POPUP_ENABLED' ) && IIVR_TRAINING_POPUP_ENABLED ) { $pdf = defined( 'IIVR_TRAINING_POPUP_PDF' ) ? IIVR_TRAINING_POPUP_PDF : ''; if ( is_string( $pdf ) && '' !== trim( $pdf ) ) { $slides[] = array( 'type' => 'pdf', 'pdf' => trim( $pdf ), 'image' => trim( $pdf ), 'alt' => 'ICAR-IIVR Training Brochure — Training Calendar 2026-27. Last date for 10-day training on Opportunity Vegetable crops (21–30 September 2026) extended to 18 September 2026.', 'label' => 'Training Brochure 2026-27', 'notice' => defined( 'IIVR_TRAINING_EXTEND_NOTICE_ENABLED' ) && IIVR_TRAINING_EXTEND_NOTICE_ENABLED, ); } } return $slides; } [1014 lines collapsed] Login - ICAR-IIVR | Indian Institute of Vegetable Research
Text size