芝麻web文件管理V1.00
编辑当前文件:/home/paymbalq/www/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-cdn.php
args['dev_mode'] ) { // translators: %s: URL. $msg = sprintf( esc_html__( 'If you are developing offline, please download and install the %s plugin/extension to bypass our CDN and avoid this warning', 'redux-framework' ), '
Redux Vendor Support
' ); } // translators: %s: CDN handle. $msg = '
' . esc_html__( 'Redux Framework Warning', 'redux-framework' ) . '
' . sprintf( esc_html__( '%s CDN unavailable. Some controls may not render properly.', 'redux-framework' ), $handle ) . ' ' . $msg; $data = array( 'parent' => self::$parent, 'type' => 'error', 'msg' => $msg, 'id' => $handle . $tran_key, 'dismiss' => false, ); Redux_Admin_Notices::set_notice( $data ); } } else { set_transient( $handle . $tran_key, true, MINUTE_IN_SECONDS * self::$parent->args['cdn_check_time'] ); if ( $register ) { self::register( $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script ); } else { self::enqueue( $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script ); } } } } /** * Register/enqueue file from vendor library. * * @param bool $register Register or enqueue. * @param string $handle File handle. * @param array $deps File deps. * @param string $ver File version. * @param mixed $footer_or_media True or 'all'. * @param bool $is_script Script or style. */ private static function vendor_plugin( bool $register, string $handle, array $deps, string $ver, $footer_or_media, bool $is_script ) { if ( class_exists( 'Redux_Vendor_URL' ) || class_exists( 'Redux_VendorURL' ) ) { if ( class_exists( 'Redux_Vendor_URL' ) ) { $src = Redux_Vendor_URL::get_url( $handle ); } else { $src = Redux_VendorURL::get_url( $handle ); } if ( $register ) { self::register( $handle, $src, $deps, $ver, $footer_or_media, $is_script ); } else { self::enqueue( $handle, $src, $deps, $ver, $footer_or_media, $is_script ); } } elseif ( ! self::$set ) { // translators: %s: Vendor support URL. %s: Admin plugins page. $msg = sprintf( esc_html__( 'The %1$s (or extension) is either not installed or not activated and thus, some controls may not render properly. Please ensure that it is installed and %2$s', 'redux-framework' ), '
Vendor Support plugin
', '
' . esc_html__( 'activated.', 'redux-framework' ) . '
' ); $data = array( 'parent' => self::$parent, 'type' => 'error', 'msg' => $msg, 'id' => $handle, 'dismiss' => false, ); Redux_Admin_Notices::set_notice( $data ); self::$set = true; } } /** * Register style CDN or local. * * @param string $handle File handle. * @param string $src_cdn CDN source. * @param array $deps File deps. * @param string $ver File version. * @param string $media True or 'all'. */ public static function register_style( string $handle, string $src_cdn, array $deps = array(), string $ver = '', string $media = 'all' ) { if ( empty( self::$parent ) || self::$parent->args['use_cdn'] ) { self::cdn( true, $handle, $src_cdn, $deps, $ver, $media, false ); } else { self::vendor_plugin( true, $handle, $deps, $ver, $media, false ); } } /** Register script CDN or local. * * @param string $handle File handle. * @param string $src_cdn CDN source. * @param array $deps File deps. * @param string $ver File version. * @param bool $in_footer Script in footer. */ public static function register_script( string $handle, string $src_cdn, array $deps = array(), string $ver = '', bool $in_footer = false ) { if ( empty( self::$parent ) || self::$parent->args['use_cdn'] ) { self::cdn( true, $handle, $src_cdn, $deps, $ver, $in_footer, true ); } else { self::vendor_plugin( true, $handle, $deps, $ver, $in_footer, true ); } } /** * Enqueue style CDN or local. * * @param string $handle File handle. * @param string $src_cdn CDN source. * @param array $deps File deps. * @param string $ver File version. * @param string $media Media type. */ public static function enqueue_style( string $handle, string $src_cdn, array $deps = array(), string $ver = '', string $media = 'all' ) { if ( self::$parent->args['use_cdn'] ) { self::cdn( false, $handle, $src_cdn, $deps, $ver, $media, false ); } else { self::vendor_plugin( false, $handle, $deps, $ver, $media, false ); } } /** * Enqueue script CDN or local. * * @param string $handle File handle. * @param string $src_cdn CDN source. * @param array $deps File seps. * @param string $ver File version. * @param bool $in_footer Script in footer. */ public static function enqueue_script( string $handle, string $src_cdn, array $deps = array(), string $ver = '', bool $in_footer = false ) { if ( self::$parent->args['use_cdn'] ) { self::cdn( false, $handle, $src_cdn, $deps, $ver, $in_footer, true ); } else { self::vendor_plugin( false, $handle, $deps, $ver, $in_footer, true ); } } } } if ( ! class_exists( 'Redux_Vendor_URL' ) && class_exists( 'Redux_Extension_Vendor_Support' ) ) { class_alias( 'Redux_VendorURL', 'Redux_Vendor_URL' ); }