registerPage( 'WRIO_StatisticFolders', $admin_path . '/class-rio-statistic-folders-page.php' ); if ( wrio_is_active_nextgen_gallery() ) { WRIO_Plugin::app()->registerPage( 'WRIO_StatisticNextgenPage', $admin_path . '/class-rio-statistic-nextgen-page.php' ); } } catch ( Exception $e ) { // nothing } } ); } } // add_action( 'plugins_loaded', 'wrio_premium_load', 20 ); } /** * Function is performed when the parent plugin Robin image optimizer is activated. * * @since 1.0.4 */ function wrio_premium_activate() { require_once __DIR__ . '/includes/classes/format/class-format-converter-factory.php'; require_once __DIR__ . '/includes/classes/webp/class-webp-server.php'; require_once __DIR__ . '/includes/classes/webp/class-webp-delivery.php'; $is_apache = WRIO\WEBP\Server::is_apache(); $is_use_htaccess = WRIO\WEBP\Server::server_use_htaccess(); if ( WRIO\WEBP\HTML\Delivery::should_use_converted_images() && WRIO\WEBP\HTML\Delivery::is_redirect_delivery_mode() ) { if ( $is_apache && $is_use_htaccess ) { WRIO\WEBP\Server::htaccess_update_webp_rules(); } } } /** * Function is performed when the parent plugin Robin image optimizer is deactivated. * * @since 1.0.4 */ function wrio_premium_deactivate() { require_once __DIR__ . '/includes/classes/webp/class-webp-server.php'; $is_apache = WRIO\WEBP\Server::is_apache(); $is_use_htaccess = WRIO\WEBP\Server::server_use_htaccess(); if ( $is_apache && $is_use_htaccess ) { WRIO\WEBP\Server::htaccess_clear_webp_rules(); } }