'1', 'quickwebp_settings_conversion_quality' => 'high', 'quickwebp_settings_conversion_ignore_webp' => array('checked'), 'quickwebp_settings_conversion_save_original' => array(), 'quickwebp_settings_conversion_display_webp_mode' => 'disabled', 'quickwebp_settings_resize' => '1', 'quickwebp_settings_resize_value' => 2000, 'quickwebp_settings_completion' => '1', 'quickwebp_settings_completion_options' => array( 'title', 'caption', 'alt', 'description' ), 'quickwebp_settings_cleanup' => '1', 'quickwebp_settings_paste_image' => '0', ); return isset($settings_arr[$id]) ? $settings_arr[$id] : ''; } /** * Allowed tags for SVG files */ function quickwebp_allowed_tags_for_svg_files() { $allowedtags = array( 'svg' => array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'preserveaspectratio' => true, 'fill' => true, 'aria-hidden' => true, 'focusable' => true, 'role' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, 'stroke' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), 'rect' => array( 'fill' => true, 'fill-rule' => true, 'height' => true, 'width' => true, 'x' => true, 'y' => true, ), 'line' => array( 'fill' => true, 'fill-rule' => true, 'x1' => true, 'x2' => true, 'y1' => true, 'y2' => true, 'stroke' => true, 'stroke-width' => true, 'transform' => true, ), 'defs' => array( 'id' => true, ), 'clipPath' => array( 'id' => true, ), 'g' => array( 'clip-path' => true, 'mask' => true, ), 'circle' => array( 'cx' => true, 'cy' => true, 'r' => true, 'fill' => true, 'stroke' => true, 'stroke-width' => true, 'stroke-dasharray' => true, 'stroke-linecap' => true, ), 'mask' => array( 'id' => true, 'fill' => true, 'style' => true, 'maskUnits' => true, 'x' => true, 'y' => true, 'width' => true, 'height' => true, ), 'image' => array( 'id' => true, 'href' => true, 'x' => true, 'y' => true, 'width' => true, 'height' => true, 'clip' => true, 'mask' => true, 'opacity' => true, 'xlink:href' => true, ), 'defs' => array( 'id' => true, ), 'pattern' => array( 'id' => true, 'x' => true, 'y' => true, 'width' => true, 'height' => true, 'patternUnits' => true, 'patternContentUnits' => true, ), 'use' => array( 'id' => true, 'x' => true, 'y' => true, 'xlink:href' => true, 'transform' => true, ), ); return $allowedtags; } /** * Build a QuickWebP Pro URL with tracking parameters. * * @param string $context Stable location identifier for the CTA. * @param array $additional_args Optional additional query args. * * @return string */ function quickwebp_get_pro_url( $context, $additional_args = array() ) { $base_url = 'https://solutions.leyoweb.com/products/quickwebp/'; if ( class_exists( 'Quickwebp_Settings' ) && defined( 'Quickwebp_Settings::QUICKWEBP_GET_LICENSE_URL' ) ) { $base_url = Quickwebp_Settings::QUICKWEBP_GET_LICENSE_URL; } return add_query_arg( array_merge( $additional_args, array( 'utm_source' => 'quickwebp-plugin', 'utm_medium' => 'plugin', 'utm_campaign' => 'upgrade-pro', 'utm_content' => sanitize_key( $context ), ) ), $base_url ); }