' . esc_html__( 'Learn more', 'w3-total-cache' ) . ''; }; $minify_config_label_text = static function ( $config_key ) { $label = Util_Ui::config_label( $config_key ); return $label ? wp_strip_all_tags( $label ) : ''; }; $minify_anchor_allowed_tags = array( 'a' => array( 'class' => array(), 'href' => array(), 'title' => array(), 'target' => array(), ), 'span' => array( 'class' => array(), ), ); $minify_learn_more_output = static function ( $anchor, $config_key = '', $custom_label = '' ) use ( $minify_learn_more_link, $minify_config_label_text, $minify_anchor_allowed_tags ) { $label = $custom_label; if ( ! $label && $config_key ) { $label = $minify_config_label_text( $config_key ); } if ( empty( $label ) ) { return ''; } return $minify_learn_more_link( $anchor, $label ); }; ?>

_config->get_string( 'minify.engine' ) ), '' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '' ), array( 'span' => array( 'class' => array(), ), ) ); ?>

' ), array( 'input' => array( 'type' => array(), 'name' => array(), 'value' => array(), 'disabled' => array(), 'class' => array(), ), ) ); ?>

'minify.error.notification', 'control' => 'selectbox', 'selectbox_values' => array( '' => esc_html__( 'Disabled', 'w3-total-cache' ), 'admin' => esc_html__( 'Admin Notification', 'w3-total-cache' ), 'email' => esc_html__( 'Email Notification', 'w3-total-cache' ), 'admin,email' => esc_html__( 'Both Admin & Email Notification', 'w3-total-cache' ), ), 'description' => esc_html__( 'Notify when minify cache creation errors occur.', 'w3-total-cache' ) . $minify_learn_more_output( 'minify-error-notification', 'minify.error.notification' ), ) ); ?>
checkbox( 'minify.rewrite', $minify_rewrite_disabled, '', true, ( ! Util_Rule::can_check_rules() ? false : null ) ); ?>

', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

checkbox( 'minify.reject.logged' ); ?>

', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ), '', 'html_xml' ); ?>
', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?> checkbox( 'minify.html.enable' ); ?>
checkbox( 'minify.html.inline.css', false, 'html_' ); ?>
checkbox( 'minify.html.inline.js', false, 'html_' ); ?>
checkbox( 'minify.html.reject.feed', false, 'html_' ); ?>

', '' ), '', 'js' ); ?> 'minify.js.enable', 'label' => sprintf( // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. __( '%1$sJS%2$s minify settings:', 'w3-total-cache' ), '', '' ), 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => esc_html__( 'Minify enqueued and inline JavaScript files according to the settings below.', 'w3-total-cache' ) . $minify_learn_more_output( 'js-minify-settings', 'minify.js.enable' ), ) ); ?> 'minify.js.method', 'label' => Util_Ui::config_label( 'minify.js.method' ), 'control' => 'selectbox', 'selectbox_values' => array( 'both' => array( 'label' => esc_html__( 'Combine & Minify', 'w3-total-cache' ), ), 'minify' => array( 'label' => esc_html__( 'Minify only', 'w3-total-cache' ), ), 'combine' => array( 'label' => esc_html__( 'Combine only', 'w3-total-cache' ), ), ), 'description' => esc_html__( 'Choose how JavaScript files should be combined or minified when using automatic mode.', 'w3-total-cache' ) . $minify_learn_more_output( 'minify-method', 'minify.js.method' ), ) ); endif; ?> 'minify.js.http2push', 'label' => Util_Ui::config_label( 'minify.js.http2push' ), 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => wp_kses( sprintf( // translators: 1 opening HTML acronym tag for HTTP (Hypertext Transfer Protocol), 2 closing HTML acronym tag. __( 'For better performance, send files to browser before they are requested when using the %1$sHTTP%2$s/2 protocol.', 'w3-total-cache' ), '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ) . ( 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) ? '' : wp_kses( sprintf( // translators: 1 HTML line break tag followed by opening HTML b tag, 2 closing HTML b tag. __( ' %1$sNot supported by "Disk: Enhanced" page cache method for Nginx%2$s', 'w3-total-cache' ), '
', '' ), array( 'br' => array(), 'b' => array(), ) ) ) . $minify_learn_more_output( 'http2-push', 'minify.js.http2push' ), ) ); ?>
', '' ), array( 'span' => array( 'class' => array(), ), ) ); ?> radio( 'minify.js.combine.header', false, false, 'js_' ); ?> radio( 'minify.js.combine.header', true, false, 'js_' ); ?>
radio( 'minify.js.combine.body', false, $auto, 'js_' ); ?> radio( 'minify.js.combine.body', true ); ?>
radio( 'minify.js.combine.footer', false, $auto, 'js_' ); ?> radio( 'minify.js.combine.footer', true ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

    $js_templates ) : if ( isset( $templates[ $js_theme ] ) ) : $index = 0; foreach ( $js_templates as $js_template => $js_locations ) : foreach ( (array) $js_locations as $js_location => $js_config ) : if ( ! empty( $js_config['files'] ) ) : foreach ( (array) $js_config['files'] as $js_file ) : ++$index; ?>
  •  
    . name="js_files[][][][]" value="" size="70" />
', '' ), '', 'css' ); ?> 'minify.css.enable', 'label' => wp_kses( sprintf( // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. __( '%1$sCSS%2$s minify settings:', 'w3-total-cache' ), '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ), 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => esc_html__( 'Minify stylesheets and inline CSS snippets declared in the queues below.', 'w3-total-cache' ) . $minify_learn_more_output( 'css-minify-settings', 'minify.css.enable' ), ) ); ?> 'minify.css.method', 'label' => Util_Ui::config_label( 'minify.css.method' ), 'control' => 'selectbox', 'selectbox_values' => array( 'both' => array( 'label' => esc_html__( 'Combine & Minify', 'w3-total-cache' ), ), 'minify' => array( 'label' => esc_html__( 'Minify only', 'w3-total-cache' ), ), 'combine' => array( 'label' => esc_html__( 'Combine only', 'w3-total-cache' ), ), ), 'description' => esc_html__( 'Choose how stylesheets should be combined or minified when using automatic mode.', 'w3-total-cache' ) . $minify_learn_more_output( 'minify-method', 'minify.css.method' ), ) ); ?> 'minify.css.http2push', 'label' => Util_Ui::config_label( 'minify.css.http2push' ), 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => wp_kses( sprintf( // translators: 1 opening HTML acronym tag for HTTP (Hypertext Transfer Protocol), 2 closing HTML acronym tag. __( 'For better performance, send files to browser before they are requested when using the %1$sHTTP%2$s/2 protocol.', 'w3-total-cache' ), '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ) . ( 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) ? '' : wp_kses( sprintf( // translators: 1 HTML line break tag, 2 opening HTML b tag, 3 closing HTML b tag. __( ' %1$s%2$sNot supported by "Disk: Enhanced" page cache method for Nginx%3$s', 'w3-total-cache' ), '
', '', '' ), array( 'br' => array(), 'b' => array(), ) ) ) . $minify_learn_more_output( 'http2-push', 'minify.css.http2push' ), ) ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

    $css_templates ) : if ( isset( $templates[ $css_theme ] ) ) : $index = 0; foreach ( $css_templates as $css_template => $css_locations ) : foreach ( (array) $css_locations as $css_location => $css_config ) : if ( ! empty( $css_config['files'] ) ) : foreach ( (array) $css_config['files'] as $css_file ) : ++$index; ?>
  •  
    . name="css_files[][][][]" value="" size="70" />
_config->get_string( 'minify.engine' ) ) { $module = 'minify'; include W3TC_INC_DIR . '/options/parts/memcached.php'; } elseif ( 'redis' === $this->_config->get_string( 'minify.engine' ) ) { $module = 'minify'; include W3TC_INC_DIR . '/options/parts/redis.php'; } ?>
value="_config->get_integer( 'minify.lifetime' ) ); ?>" size="8" />

value="_config->get_integer( 'minify.file.gc' ) ); ?>" size="8" _config->get_string( 'minify.engine' ) ) { echo ' disabled="disabled"'; } ?> />

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

checkbox( 'minify.cache.files_regexp', false, '', true, null ); ?>

get_boolean( 'minify.enabled' ); $wp_disabled = ! $c->get_boolean( 'minify.wp_cron' ); if ( $disabled ) { echo wp_kses( sprintf( // Translators: 1 opening HTML div tag followed by opening HTML p tag, 2 opening HTML a tag, // Translators: 3 closing HTML a tag, 4 closing HTML p tag followed by closing HTML div tag. __( '%1$sMinify is disabled! Enable it %2$shere%3$s to enable this feature.%4$s', 'w3-total-cache' ), '

', '', '', '

' ), array( 'div' => array( 'class' => array(), ), 'p' => array(), 'a' => array( 'href' => array(), ), ) ); } Util_Ui::config_item( array( 'key' => 'minify.wp_cron', 'label' => Util_Ui::config_label( 'minify.wp_cron' ), 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'control' => 'checkbox', 'disabled' => $disabled, ) ); $time_options = array(); for ( $hour = 0; $hour < 24; $hour++ ) { foreach ( array( '00', '30' ) as $minute ) { $time_value = $hour * 60 + intval( $minute ); $scheduled_time = new \DateTime( "{$hour}:{$minute}", wp_timezone() ); $time_label = $scheduled_time->format( 'g:i a' ); $time_options[ $time_value ] = $time_label; } } Util_Ui::config_item( array( 'key' => 'minify.wp_cron_time', 'label' => Util_Ui::config_label( 'minify.wp_cron_time' ), 'control' => 'selectbox', 'selectbox_values' => $time_options, 'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ), 'disabled' => $disabled || $wp_disabled, ) ); Util_Ui::config_item( array( 'key' => 'minify.wp_cron_interval', 'label' => Util_Ui::config_label( 'minify.wp_cron_interval' ), 'control' => 'selectbox', 'selectbox_values' => array( 'hourly' => esc_html__( 'Hourly', 'w3-total-cache' ), 'twicedaily' => esc_html__( 'Twice Daily', 'w3-total-cache' ), 'daily' => esc_html__( 'Daily', 'w3-total-cache' ), 'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ), ), 'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ), 'disabled' => $disabled || $wp_disabled, ) ); ?>
  • ', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), 'a' => array( 'href' => array(), ), ) ); ?>
  • ', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), 'a' => array( 'href' => array(), ), ) ); ?>