diff --git a/wp-content/plugins/w3-total-cache/Base_Page_Settings.php b/wp-content/plugins/w3-total-cache/Base_Page_Settings.php new file mode 100644 index 00000000..5c0023ef --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Base_Page_Settings.php @@ -0,0 +1,281 @@ +_config = Dispatcher::config(); + $this->_config_master = Dispatcher::config_master(); + $this->_page = Util_Admin::get_current_page(); + } + + /** + * Render header. + */ + public function options() { + $this->view(); + } + + /** + * Render footer. + */ + public function render_footer() { + include W3TC_INC_OPTIONS_DIR . '/common/footer.php'; + } + + /** + * Returns true if config section is sealed. + * + * @param string $section Config section. + * + * @return boolean + */ + protected function is_sealed( $section ) { + return true; + } + + /** + * Returns true if we edit master config. + * + * @return boolean + */ + protected function is_master() { + return $this->_config->is_master(); + } + + /** + * Prints checkbox with config option value. + * + * @param string $option_id Option ID. + * @param bool $disabled Disabled flag. + * @param string $class_prefix Class prefix. + * @param bool $label Label. + * @param bool $force_value Override value. + */ + protected function checkbox( $option_id, $disabled = false, $class_prefix = '', $label = true, $force_value = null ) { + $disabled = $disabled || $this->_config->is_sealed( $option_id ); + $name = Util_Ui::config_key_to_http_name( $option_id ); + + if ( ! $disabled ) { + echo ''; + } + + if ( $label ) { + echo ''; + } + } + + /** + * Echos an element + * + * @param string $type + * @param string $id + * @param string $name + * @param mixed $value + * @param bool $disabled + */ + public static function element( $type, $id, $name, $value, $disabled = false ) { + switch ( $type ) { + case 'textbox': + self::textbox( $id, $name, $value, $disabled ); + break; + case 'password': + self::passwordbox( $id, $name, $value, $disabled ); + break; + case 'textarea': + self::textarea( $id, $name, $value, $disabled ); + break; + case 'checkbox': + default: + self::checkbox( $id, $name, $value, $disabled ); + break; + } + } + + public static function checkbox2( $e ) { + self::checkbox( + $e['name'], + $e['name'], + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( isset( $e['label'] ) ? $e['label'] : null ) + ); + } + + public static function radiogroup2( $e ) { + self::radiogroup( + $e['name'], + $e['value'], + $e['values'], + $e['disabled'], + $e['separator'] + ); + } + + public static function selectbox2( $e ) { + self::selectbox( + $e['name'], + $e['name'], + $e['value'], + $e['values'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( isset( $e['optgroups'] ) ? $e['optgroups'] : null ) + ); + } + + public static function textbox2( $e ) { + self::textbox( + $e['name'], + $e['name'], + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( ! empty( $e['size'] ) ? $e['size'] : 20 ), + ( ! empty( $e['type'] ) ? $e['type'] : 'text' ), + ( ! empty( $e['placeholder'] ) ? $e['placeholder'] : '' ) + ); + } + + public static function textarea2( $e ) { + self::textarea( + $e['name'], + $e['name'], + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ) + ); + } + + public static function control2( $a ) { + if ( 'checkbox' === $a['control'] ) { + self::checkbox2( + array( + 'name' => $a['control_name'], + 'value' => $a['value'], + 'disabled' => $a['disabled'], + 'label' => $a['checkbox_label'], + ) + ); + } elseif ( 'radiogroup' === $a['control'] ) { + self::radiogroup2( + array( + 'name' => $a['control_name'], + 'value' => $a['value'], + 'disabled' => $a['disabled'], + 'values' => $a['radiogroup_values'], + 'separator' => isset( $a['radiogroup_separator'] ) ? $a['radiogroup_separator'] : '', + ) + ); + } elseif ( 'selectbox' === $a['control'] ) { + self::selectbox2( + array( + 'name' => $a['control_name'], + 'value' => $a['value'], + 'disabled' => $a['disabled'], + 'values' => $a['selectbox_values'], + 'optgroups' => isset( $a['selectbox_optgroups'] ) ? $a['selectbox_optgroups'] : null, + ) + ); + } elseif ( 'textbox' === $a['control'] ) { + self::textbox2( + array( + 'name' => $a['control_name'], + 'value' => $a['value'], + 'disabled' => $a['disabled'], + 'type' => isset( $a['textbox_type'] ) ? $a['textbox_type'] : null, + 'size' => isset( $a['textbox_size'] ) ? $a['textbox_size'] : null, + 'placeholder' => isset( $a['textbox_placeholder'] ) ? $a['textbox_placeholder'] : null, + ) + ); + } elseif ( 'textarea' === $a['control'] ) { + self::textarea2( + array( + 'name' => $a['control_name'], + 'value' => $a['value'], + 'disabled' => $a['disabled'], + ) + ); + } elseif ( 'none' === $a['control'] ) { + echo wp_kses( $a['none_label'], self::get_allowed_html_for_wp_kses_from_content( $a['none_label'] ) ); + } elseif ( 'button' === $a['control'] ) { + echo ''; + } + } + + /** + * Get table classes for tables including pro features. + * + * When on the free version, tables with pro features have additional classes added to help highlight + * the premium feature. If the user is on pro, this class is omitted. + * + * @since 0.14.3 + * + * @return string + */ + public static function table_class() { + $table_class[] = 'form-table'; + + if ( ! Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) { + $table_class[] = 'w3tc-pro-feature'; + } + + return implode( ' ', $table_class ); + } + + /** + * Renders element with controls + * id => + * label => + * label_class => + * => details + * style - default is label,controls view, + * alternative is one-column view + */ + public static function table_tr( $a ) { + $id = isset( $a['id'] ) ? $a['id'] : ''; + $a = apply_filters( 'w3tc_ui_settings_item', $a ); + + echo ''; + if ( isset( $a['label'] ) ) { + self::label( $id, $a['label'] ); + } + + echo "\n\n"; + + foreach ( $a as $key => $e ) { + if ( 'checkbox' === $key ) { + self::checkbox( + $id, + isset( $e['name'] ) ? $e['name'] : null, + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( isset( $e['label'] ) ? $e['label'] : null ) + ); + } elseif ( 'description' === $key ) { + echo '

' . wp_kses( $e, self::get_allowed_html_for_wp_kses_from_content( $e ) ) . '

'; + } elseif ( 'hidden' === $key ) { + self::hidden( '', $e['name'], $e['value'] ); + } elseif ( 'html' === $key ) { + echo wp_kses( $e, self::get_allowed_html_for_wp_kses_from_content( $e ) ); + } elseif ( 'radiogroup' === $key ) { + self::radiogroup( + $e['name'], + $e['value'], + $e['values'], + $e['disabled'], + $e['separator'] + ); + } elseif ( 'selectbox' === $key ) { + self::selectbox( + $id, + $e['name'], + $e['value'], + $e['values'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( isset( $e['optgroups'] ) ? $e['optgroups'] : null ) + ); + } elseif ( 'textbox' === $key ) { + self::textbox( + $id, + $e['name'], + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ), + ( ! empty( $e['size'] ) ? $e['size'] : 20 ), + ( ! empty( $e['type'] ) ? $e['type'] : 'text' ), + ( ! empty( $e['placeholder'] ) ? $e['placeholder'] : '' ) + ); + } elseif ( 'textarea' === $key ) { + self::textarea( + $id, + $e['name'], + $e['value'], + ( isset( $e['disabled'] ) ? $e['disabled'] : false ) + ); + } + } + + echo "\n"; + } + + /** + * Prints configuration item UI based on description + * key => configuration key + * label => configuration key's as its introduced to the user + * value => it's value + * disabled => if disabled + * + * control => checkbox | radiogroup | selectbox | textbox + * checkbox_label => text shown after the textbox + * radiogroup_values => array of possible values for radiogroup + * selectbox_values => array of possible values for dropdown + * selectbox_optgroups => + * textbox_size => + * + * control_after => something after control to add + * description => description shown to the user below + */ + public static function config_item( $a ) { + /* + * Some items we do not want shown in the free edition. + * + * By default, they will show in free, unless 'show_in_free' is specifically passed in as false. + */ + $is_w3tc_free = ! Util_Environment::is_w3tc_pro( Dispatcher::config() ); + $show_in_free = ! isset( $a['show_in_free'] ) || (bool) $a['show_in_free']; + if ( ! $show_in_free && $is_w3tc_free ) { + return; + } + + $a = self::config_item_preprocess( $a ); + + if ( 'w3tc_single_column' === $a['label_class'] ) { + echo ''; + } else { + echo ''; + + if ( ! empty( $a['label'] ) ) { + self::label( $a['control_name'], $a['label'] ); + } + + echo "\n\n"; + } + + self::control2( $a ); + + if ( isset( $a['control_after'] ) ) { + echo wp_kses( + $a['control_after'], + self::get_allowed_html_for_wp_kses_from_content( $a['control_after'] ) + ); + } + if ( isset( $a['description'] ) ) { + echo wp_kses( + sprintf( + '%1$s%2$s%3$s', + '

', + $a['description'], + '

' + ), + array( + 'p' => array( + 'class' => array(), + ), + 'acronym' => array( + 'title' => array(), + ), + ) + ); + } + + echo ( isset( $a['style'] ) ? '' : '' ); + echo "\n"; + } + + public static function config_item_extension_enabled( $a ) { + echo "\n\n"; + + $c = Dispatcher::config(); + self::checkbox2( + array( + 'name' => 'extension__' . self::config_key_to_http_name( $a['extension_id'] ), + 'value' => $c->is_extension_active_frontend( $a['extension_id'] ), + 'label' => $a['checkbox_label'], + ) + ); + + if ( isset( $a['description'] ) ) { + echo '

' . wp_kses( $a['description'], self::get_allowed_html_for_wp_kses_from_content( $a['description'] ) ) . '

'; + } + + echo "\n"; + } + + public static function config_item_pro( $a ) { + $a = self::config_item_preprocess( $a ); + + if ( 'w3tc_no_trtd' !== $a['label_class'] ) { + echo ''; + + if ( ! empty( $a['label'] ) ) { + self::label( $a['control_name'], $a['label'] ); + } + + echo "\n\n"; + } + + self::pro_wrap_maybe_start(); + + self::control2( $a ); + + if ( isset( $a['control_after'] ) ) { + echo wp_kses( $a['control_after'], self::get_allowed_html_for_wp_kses_from_content( $a['control_after'] ) ); + } + + if ( isset( $a['description'] ) ) { + self::pro_wrap_description( $a['excerpt'], $a['description'], $a['control_name'] ); + } + + self::pro_wrap_maybe_end( $a['control_name'] ); + + if ( 'w3tc_no_trtd' !== $a['label_class'] ) { + echo "\n"; + } + } + + public static function config_item_preprocess( $a ) { + $c = Dispatcher::config(); + + if ( ! isset( $a['value'] ) || is_null( $a['value'] ) ) { + $a['value'] = $c->get( $a['key'] ); + if ( is_array( $a['value'] ) ) { + $a['value'] = implode( "\n", $a['value'] ); + } + } + + if ( ! isset( $a['disabled'] ) || is_null( $a['disabled'] ) ) { + $a['disabled'] = $c->is_sealed( $a['key'] ); + } + + if ( empty( $a['label'] ) ) { + $a['label'] = self::config_label( $a['key'] ); + } + + $a['control_name'] = self::config_key_to_http_name( $a['key'] ); + $a['label_class'] = empty( $a['label_class'] ) ? '' : $a['label_class']; + if ( empty( $a['label_class'] ) && 'checkbox' === $a['control'] ) { + $a['label_class'] = 'w3tc_config_checkbox'; + } + + $action_key = $a['key']; + if ( is_array( $action_key ) ) { + $action_key = 'extension.' . $action_key[0] . '.' . $action_key[1]; + } + + return apply_filters( 'w3tc_ui_config_item_' . $action_key, $a ); + } + + /** + * Displays config item - caching engine selectbox + */ + public static function config_item_engine( $a ) { + if ( isset( $a['empty_value'] ) && $a['empty_value'] ) { + $values[''] = array( + 'label' => 'Please select a method', + ); + } + + $values['file'] = array( + 'label' => __( 'Disk', 'w3-total-cache' ), + 'optgroup' => 0, + ); + $values['apc'] = array( + 'disabled' => ! Util_Installed::apc(), + 'label' => __( 'Opcode: Alternative PHP Cache (APC / APCu)', 'w3-total-cache' ), + 'optgroup' => 1, + ); + $values['eaccelerator'] = array( + 'disabled' => ! Util_Installed::eaccelerator(), + 'label' => __( 'Opcode: eAccelerator', 'w3-total-cache' ), + 'optgroup' => 1, + ); + $values['xcache'] = array( + 'disabled' => ! Util_Installed::xcache(), + 'label' => __( 'Opcode: XCache', 'w3-total-cache' ), + 'optgroup' => 1, + ); + $values['wincache'] = array( + 'disabled' => ! Util_Installed::wincache(), + 'label' => __( 'Opcode: WinCache', 'w3-total-cache' ), + 'optgroup' => 1, + ); + $values['memcached'] = array( + 'disabled' => ! Util_Installed::memcached(), + 'label' => __( 'Memcached', 'w3-total-cache' ), + 'optgroup' => 2, + ); + $values['redis'] = array( + 'disabled' => ! Util_Installed::redis(), + 'label' => __( 'Redis', 'w3-total-cache' ), + 'optgroup' => 2, + ); + + self::config_item( + array( + 'key' => $a['key'], + 'label' => ( isset( $a['label'] ) ? $a['label'] : null ), + 'disabled' => ( isset( $a['disabled'] ) ? $a['disabled'] : null ), + 'control' => 'selectbox', + 'selectbox_values' => $values, + 'selectbox_optgroups' => array( + __( 'Shared Server:', 'w3-total-cache' ), + __( 'Dedicated / Virtual Server:', 'w3-total-cache' ), + __( 'Multiple Servers:', 'w3-total-cache' ), + ), + 'control_after' => isset( $a['control_after'] ) ? $a['control_after'] : null, + ) + ); + } + + public static function pro_wrap_maybe_start() { + if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) { + return; + } + + ?> +
+
+ ' . wp_kses( $excerpt_clean, self::get_allowed_html_for_wp_kses_from_content( $excerpt_clean ) ) . '

'; + + if ( ! empty( $description ) ) { + $d = array_map( + function( $e ) { + return '

' . wp_kses( $e, self::get_allowed_html_for_wp_kses_from_content( $e ) ) . '

'; + }, + $description + ); + + $descriptions = implode( "\n", $d ); + + echo '
' . wp_kses( $descriptions, self::get_allowed_html_for_wp_kses_from_content( $descriptions ) ) . '
'; + echo '' . esc_html( __( 'Show More', 'w3-total-cache' ) ) . ''; + } + } + + public static function pro_wrap_maybe_end( $button_data_src ) { + if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) { + return; + } + + ?> +
+
+ +
+
+ +
+

+ +

+
+ +
+
+ is_master() ) { + return; + } + + if ( $c->get_boolean( $a['key'] ) ) { + $name = 'w3tc_config_overloaded_disable~' . self::config_key_to_http_name( $a['key'] ); + $value = __( 'Use common settings', 'w3-total-cache' ); + } else { + $name = 'w3tc_config_overloaded_enable~' . self::config_key_to_http_name( $a['key'] ); + $value = __( 'Use specific settings', 'w3-total-cache' ); + } + + echo '
'; + echo ''; + echo '
'; + } + + /** + * Get the admin URL based on the path and the interface (network or site). + * + * @param string $path Admin path/URI. + * @return string + */ + public static function admin_url( $path ) { + return is_network_admin() ? network_admin_url( $path ) : admin_url( $path ); + } + + /** + * Returns a preview link with current state + * + * @return string + */ + public static function preview_link() { + return self::button_link( + __( 'Preview', 'w3-total-cache' ), + self::url( array( 'w3tc_default_previewing' => 'y' ) ), + true + ); + } + + /** + * Takes seconds and converts to array('Nh ','Nm ', 'Ns ', 'Nms ') or "Nh Nm Ns Nms" + * + * @param unknown $input + * @param bool $string + * @return array|string + */ + public static function secs_to_time( $input, $string = true ) { + $input = (float) $input; + $time = array(); + $msecs = floor( $input * 1000 % 1000 ); + $seconds = $input % 60; + + $minutes = floor( $input / 60 ) % 60; + $hours = floor( $input / 60 / 60 ) % 60; + + if ( $hours ) { + $time[] = $hours; + } + if ( $minutes ) { + $time[] = sprintf( '%dm', $minutes ); + } + if ( $seconds ) { + $time[] = sprintf( '%ds', $seconds ); + } + if ( $msecs ) { + $time[] = sprintf( '%dms', $msecs ); + } + + if ( empty( $time ) ) { + $time[] = sprintf( '%dms', 0 ); + } + if ( $string ) { + return implode( ' ', $time ); + } + return $time; + } + + /** + * Returns option name accepted by W3TC as http paramter + * from it's id (full name from config file) + */ + public static function config_key_to_http_name( $id ) { + if ( is_array( $id ) ) { + $id = $id[0] . '___' . $id[1]; + } + + return str_replace( '.', '__', $id ); + } + + /* + * Converts configuration key returned in http _GET/_POST + * to configuration key + */ + public static function config_key_from_http_name( $http_key ) { + $a = explode( '___', $http_key ); + if ( count( $a ) === 2 ) { + $a[0] = self::config_key_from_http_name( $a[0] ); + $a[1] = self::config_key_from_http_name( $a[1] ); + return $a; + } + + return str_replace( '__', '.', $http_key ); + } + + public static function get_allowed_html_for_wp_kses_from_content( $content ) { + $allowed_html = array(); + + if( empty( $content ) ) { + return $allowed_html; + } + + $dom = new DOMDocument(); + @$dom->loadHTML( $content ); + foreach ( $dom->getElementsByTagName( '*' ) as $tag ) { + $tagname = $tag->tagName; + foreach ( $tag->attributes as $attribute_name => $attribute_val ) { + $allowed_html[ $tagname ][ $attribute_name ] = array(); + } + $allowed_html[ $tagname ] = empty( $allowed_html[ $tagname ] ) ? array() : $allowed_html[ $tagname ]; + } + return $allowed_html; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_UsageStatistics.php b/wp-content/plugins/w3-total-cache/Util_UsageStatistics.php new file mode 100644 index 00000000..d1c18922 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_UsageStatistics.php @@ -0,0 +1,218 @@ + 500000000 ) + return sprintf( '%.1f GB', $v / 1024 /*KB*/ / 1024 /*MB*/ / 1024/*GB*/ ); + if ( $v > 500000 ) + return sprintf( '%.1f MB', $v / 1024 /*KB*/ / 1024 /*MB*/ ); + else + return sprintf( '%.1f KB', $v / 1024 /*KB*/ ); + } + + + + static public function bytes_to_size2( $a, $p1, $p2 = null, $p3 = null ) { + $v = self::v( $a, $p1, $p2, $p3 ); + if ( is_null( $v ) ) + return 'n/a'; + + return self::bytes_to_size( $v ); + } + + + + static public function percent( $v1, $v2 ) { + if ( $v2 == 0 ) { + return '0 %'; + } elseif ($v1 > $v2 ) { + return '100 %'; + } else { + return sprintf( '%d', $v1 / $v2 * 100 ) . ' %'; + } + } + + + + static public function percent2( $a, $property1, $property2 ) { + if ( !isset( $a[$property1] ) || !isset( $a[$property2] ) ) + return 'n/a'; + else if ( $a[$property2] == 0 ) + return '0 %'; + else + return sprintf( '%d', $a[$property1] / $a[$property2] * 100 ) . ' %'; + } + + + + static public function sum( $history, $property ) { + $v = 0; + foreach ( $history as $i ) { + $item_value = self::v3( $i, $property ); + if ( !empty( $item_value ) ) { + $v += $item_value; + } + } + return $v; + } + + + + static public function avg( $history, $property ) { + $v = 0; + $count = 0; + foreach ( $history as $i ) { + $item_value = self::v3( $i, $property ); + if ( !empty( $item_value ) ) { + $v += $item_value; + $count++; + } + } + return ( $count <= 0 ? 0 : $v / $count ); + } + + + + /** + * Sum up all positive metric values which names start with specified prefix + **/ + static public function sum_by_prefix_positive( &$output, $history, $property_prefix ) { + $property_prefix_len = strlen( $property_prefix ); + + foreach ( $history as $i ) { + foreach ( $i as $key => $value ) { + if ( substr( $key, 0, $property_prefix_len ) == $property_prefix && + $value > 0 ) { + if ( !isset( $output[$key] ) ) { + $output[$key] = 0; + } + + $output[$key] += $value; + } + } + } + } + + + + static public function time_mins( $timestamp ) { + return date( 'm/d/Y H:i', $timestamp ); + } + + + + static public function integer( $v ) { + return number_format( $v ); + } + + + + static public function integer_divideby( $v, $divide_by ) { + if ( $divide_by == 0 ) { + return 'n/a'; + } + + return self::integer( $v / $divide_by ); + } + + + + static public function integer2( $a, $p1, $p2 = null, $p3 = null ) { + $v = self::v( $a, $p1, $p2, $p3 ); + if ( is_null( $v ) ) + return 'n/a'; + else + return number_format( $v ); + } + + + + static public function v( $a, $p1, $p2 = null, $p3 = null ) { + if ( !isset( $a[$p1] ) ) + return null; + + $v = $a[$p1]; + if ( is_null( $p2 ) ) + return $v; + if ( !isset( $v[$p2] ) ) + return null; + + $v = $v[$p2]; + if ( is_null( $p3 ) ) + return $v; + if ( !isset( $v[$p3] ) ) + return null; + + return $v[$p3]; + } + + + + static public function v3( $a, $p ) { + if ( !is_array( $p ) ) { + $p = array( $p ); + } + + $actual = &$a; + for ( $i = 0; $i < count( $p ); $i++) { + $property = $p[$i]; + + if ( !isset( $actual[$property] ) ) { + return null; + } + + $actual = &$actual[$property]; + } + + return $actual; + } + + + + static public function value_per_second( $a, $property1, $property2 ) { + if ( !isset( $a[$property1] ) || !isset( $a[$property2] ) ) + return 'n/a'; + else if ( $a[$property2] == 0 ) + return '0'; + else + return sprintf( '%.1f', $a[$property1] / $a[$property2] * 100 ); + } + + + + static public function value_per_period_seconds( $total, $summary ) { + if ( empty( $summary['period']['seconds'] ) ) + return 'n/a'; + + $period_seconds = $summary['period']['seconds']; + + return sprintf( '%.1f', $total / $period_seconds ); + } + + + + /** + * Special shared code for cache size counting + */ + static public function get_or_init_size_transient( $transient, $summary ) { + $should_count = false; + + $v = get_transient( $transient ); + if ( is_array( $v ) && isset( $v['timestamp_end'] ) && + $v['timestamp_end'] == $summary['period']['timestamp_end'] ) { + return array( $v, false ); + } + + // limit number of processing counting it at the same time + $v = array( + 'timestamp_end' => $summary['period']['timestamp_end'], + 'size_used' => '...counting', + 'items' => '...counting' + ); + set_transient( $transient, $v, 120 ); + return array( $v, true ); + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_Widget.php b/wp-content/plugins/w3-total-cache/Util_Widget.php new file mode 100644 index 00000000..320e8b04 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_Widget.php @@ -0,0 +1,269 @@ +" . __( 'View all', 'w3-total-cache' ) . ''; + self::add( $widget_id, $name, $w3tc_registered_widgets[ $widget_id ]['callback'], $w3tc_registered_widget_controls[ $widget_id ]['callback'] ); + } + + if ( 'POST' === isset( $_SERVER['REQUEST_METHOD'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : '' && ! empty( Util_Request::get_string( 'widget_id' ) ) ) { + check_admin_referer( 'edit-dashboard-widget_' . Util_Request::get_string( 'widget_id' ), 'dashboard-widget-nonce' ); + ob_start(); // The same hack "wp-admin/widgets.php" uses. + self::trigger_widget_control( Util_Request::get_string( 'widget_id' ) ); + ob_end_clean(); + } + + if ( $update ) { + update_option( 'w3tc_dashboard_widget_options', $widget_options ); + } + + do_action( 'do_meta_boxes', $screen->id, 'normal', '' ); + do_action( 'do_meta_boxes', $screen->id, 'side', '' ); + } + + /** + * Add 2. + * + * @static + * + * @param string $widget_id Widget id. + * @param int $priority Prioroty. + * @param string $widget_name Widget name. + * @param callable $callback Callback. + * @param callable $control_callback Control callback. + * @param string $location Location. + * @param string $header_text Header text. + * @param string $header_class Header class. + */ + public static function add2( $widget_id, $priority, $widget_name, $callback, + $control_callback = null, $location = 'normal', $header_text = null, + $header_class = '' ) { + $o = new _Util_Widget_Postponed( + array( + 'widget_id' => $widget_id, + 'widget_name' => $widget_name, + 'callback' => $callback, + 'control_callback' => $control_callback, + 'location' => $location, + 'header_text' => $header_text, + 'header_class' => $header_class, + ) + ); + + add_action( + 'w3tc_widget_setup', + array( $o, 'wp_dashboard_setup' ), + $priority + ); + + add_action( + 'w3tc_network_dashboard_setup', + array( $o, 'wp_dashboard_setup' ), + $priority + ); + + self::$w3tc_dashboard_widgets[ $widget_id ] = '*'; + } + + /** + * Registers widget. + * + * @static + * + * @param string $widget_id Widget id. + * @param string $widget_name Widget name. + * @param callable $callback Callback. + * @param callable $control_callback Control callback. + * @param string $location Location. + * @param string $header_text Header text. + * @param string $header_class Header class. + */ + public static function add( $widget_id, $widget_name, $callback, + $control_callback = null, $location = 'normal', $header_text = null, + $header_class = '' ) { + $screen = get_current_screen(); + + global $w3tc_dashboard_control_callbacks; + + if ( substr( $widget_name, 0, 1 ) !== '<' ) { + $widget_name = '
' . $widget_name . '
'; + } + + // Link. + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_string( $control_callback ) ) { + if ( ! $header_text ) { + $header_text = __( 'Configure' ); + } + + $widget_name .= ' ' . + '' . $header_text . ''; + } + + // Ajax callback. + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { + $w3tc_dashboard_control_callbacks[ $widget_id ] = $control_callback; + $edit_val = Util_Request::get_string( 'edit' ); + + if ( ! empty( $edit_val ) && $widget_id === $edit_val ) { + list( $url ) = explode( '#', add_query_arg( 'edit', false ), 2 ); + $widget_name .= ' ' . __( 'Cancel', 'w3-total-cache' ) . ''; + + $callback = array( + '\W3TC\Util_Widget', + '_dashboard_control_callback', + ); + } else { + list( $url ) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); + $widget_name .= ' ' . __( 'Configure' ) . ''; + } + } + + $side_widgets = array(); + + $priority = 'core'; + + add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority ); + } + + /** + * Dashboard Widgets Controls. + * + * @static + * + * @param string $dashboard Dashboard id. + * @param array $meta_box Meta box info. + */ + public static function _dashboard_control_callback( $dashboard, $meta_box ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore + echo '
'; + self::trigger_widget_control( $meta_box['id'] ); + wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' ); + echo ''; + submit_button( __( 'Submit' ) ); + echo '
'; + } + + /** + * List widgets. + * + * @static + * + * @return string + */ + public static function list_widgets() { + return implode( ',', array_keys( self::$w3tc_dashboard_widgets ) ); + } + + /** + * Calls widget control callback. + * + * @since 0.9.2.6 + * @static + * + * @param int|bool $widget_control_id Registered widget id. + */ + public static function trigger_widget_control( $widget_control_id = false ) { + global $w3tc_dashboard_control_callbacks; + + if ( is_scalar( $widget_control_id ) && $widget_control_id && + isset( $w3tc_dashboard_control_callbacks[ $widget_control_id ] ) && + is_callable( $w3tc_dashboard_control_callbacks[ $widget_control_id ] ) ) { + call_user_func( + $w3tc_dashboard_control_callbacks[ $widget_control_id ], + '', + array( + 'id' => $widget_control_id, + 'callback' => $w3tc_dashboard_control_callbacks[ $widget_control_id ], + ) + ); + } + } +} + +/** + * Class: Util_Widget_Postponed + */ +class _Util_Widget_Postponed { // phpcs:ignore + /** + * Data. + * + * @var array + * @access private + */ + private $data = array(); + + /** + * Constructor. + * + * @param array $data Data. + */ + public function __construct( $data ) { + $this->data = $data; + } + + /** + * Dashboard setup. + */ + public function wp_dashboard_setup() { + Util_Widget::add( + $this->data['widget_id'], + $this->data['widget_name'], + $this->data['callback'], + $this->data['control_callback'], + $this->data['location'], + $this->data['header_text'], + $this->data['header_class'] + ); + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile.php b/wp-content/plugins/w3-total-cache/Util_WpFile.php new file mode 100644 index 00000000..c71e0c79 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile.php @@ -0,0 +1,356 @@ +errors ) && + $wp_filesystem->errors->has_errors() ) { + $status['error'] = esc_html( $wp_filesystem->errors->get_error_message() ); + } + + wp_send_json_error( $status ); + } + } + + /** + * Tries to write file content + * + * @param string $filename path to file + * @param string $content data to write + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context folder in which to write file + * @throws Util_WpFile_FilesystemWriteException + * @return void + */ + static public function write_to_file( $filename, $content ) { + if ( @file_put_contents( $filename, $content ) ) + return; + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemWriteException( $ex->getMessage(), + $ex->credentials_form(), $filename, $content ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->put_contents( $filename, $content ) ) { + throw new Util_WpFile_FilesystemWriteException( + 'FTP credentials don\'t allow to write to file ' . + $filename . '', self::get_filesystem_credentials_form(), + $filename, $content ); + } + } + + /** + * Copy file using WordPress filesystem functions. + * + * @param unknown $source_filename + * @param unknown $destination_filename + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context folder to copy files too + * @throws Util_WpFile_FilesystemCopyException + */ + static public function copy_file( $source_filename, $destination_filename ) { + $contents = @file_get_contents( $source_filename ); + if ( $contents ) { + @file_put_contents( $destination_filename, $contents ); + } + if ( @file_exists( $destination_filename ) ) { + if ( @file_get_contents( $destination_filename ) == $contents ) + return; + } + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemCopyException( $ex->getMessage(), + $ex->credentials_form(), + $source_filename, $destination_filename ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->put_contents( $destination_filename, $contents, + FS_CHMOD_FILE ) ) { + throw new Util_WpFile_FilesystemCopyException( + 'FTP credentials don\'t allow to copy to file ' . + $destination_filename . '', + self::get_filesystem_credentials_form(), + $source_filename, $destination_filename ); + } + } + + /** + * + * + * @param unknown $folder + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context folder to create folder in + * @throws Util_WpFile_FilesystemMkdirException + */ + static private function create_folder( $folder, $from_folder ) { + if ( @is_dir( $folder ) ) + return; + + if ( Util_File::mkdir_from_safe( $folder, $from_folder ) ) + return; + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemMkdirException( $ex->getMessage(), + $ex->credentials_form(), $folder ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->mkdir( $folder, FS_CHMOD_DIR ) ) { + throw new Util_WpFile_FilesystemMkdirException( + 'FTP credentials don\'t allow to create folder ' . + $folder . '', + self::get_filesystem_credentials_form(), + $folder ); + } + } + + /** + * + * + * @param unknown $folder + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context folder to create folder in + * @throws Util_WpFile_FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials + * @throws FileOperationException + */ + static public function create_writeable_folder( $folder, $from_folder ) { + self::create_folder( $folder, $from_folder ); + + $permissions = array( 0755, 0775, 0777 ); + + for ( $set_index = 0; $set_index < count( $permissions ); $set_index++ ) { + if ( is_writable( $folder ) ) + break; + + self::chmod( $folder, $permissions[$set_index] ); + } + } + + /** + * + * + * @param unknown $folder + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context path folder where delete folders resides + * @throws Util_WpFile_FilesystemRmdirException + */ + static public function delete_folder( $folder ) { + if ( !@is_dir( $folder ) ) + return; + + Util_File::rmdir( $folder ); + if ( !@is_dir( $folder ) ) + return; + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemRmdirException( $ex->getMessage(), + $ex->credentials_form(), $folder ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->rmdir( $folder ) ) { + throw new Util_WpFile_FilesystemRmdirException( + __( 'FTP credentials don\'t allow to delete folder ', 'w3-total-cache' ) . + '' . $folder . '', + self::get_filesystem_credentials_form(), + $folder ); + } + } + + /** + * + * + * @param string $filename + * @param int $permission + * @return void + * @throws Util_WpFile_FilesystemChmodException + */ + static private function chmod( $filename, $permission ) { + if ( @chmod( $filename, $permission ) ) + return; + + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemChmodException( $ex->getMessage(), + $ex->credentials_form(), $filename, $permission ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->chmod( $filename, $permission, true ) ) { + throw new Util_WpFile_FilesystemChmodException( + __( 'FTP credentials don\'t allow to chmod ', 'w3-total-cache' ) . + '' . $filename . '', + self::get_filesystem_credentials_form(), + $filename, $permission ); + } + + return true; + } + + /** + * + * + * @param unknown $file + * @param string $method + * @param string $url + * @param bool|string $context folder where file to be deleted resides + * @throws Util_WpFile_FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials + */ + static public function delete_file( $filename ) { + if ( !@file_exists( $filename ) ) + return; + if ( @unlink( $filename ) ) + return; + + try { + self::request_filesystem_credentials(); + } catch ( Util_WpFile_FilesystemOperationException $ex ) { + throw new Util_WpFile_FilesystemRmException( $ex->getMessage(), + $ex->credentials_form(), $filename ); + } + + global $wp_filesystem; + if ( !$wp_filesystem->delete( $filename ) ) { + throw new Util_WpFile_FilesystemRmException( + __( 'FTP credentials don\'t allow to delete ', 'w3-total-cache' ) . + '' . $filename . '', + self::get_filesystem_credentials_form(), + $filename ); + } + } + + /** + * Get WordPress filesystems credentials. Required for WP filesystem usage. + * + * @param string $method Which method to use when creating + * @param string $url Where to redirect after creation + * @param bool|string $context path to folder that should be have filesystem credentials. + * If false WP_CONTENT_DIR is assumed + * @throws Util_WpFile_FilesystemOperationException with S/FTP form if it can't get the required filesystem credentials + */ + private static function request_filesystem_credentials( $method = '', $url = '', $context = false ) { + if ( strlen( $url ) <= 0 ) { + $url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; + } + + $url = preg_replace( '/&w3tc_note=([^&]+)/', '', $url ); + + // Ensure request_filesystem_credentials() is available. + require_once ABSPATH . 'wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/template.php'; + + $success = true; + ob_start(); + if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, $context, array() ) ) ) { + $success = false; + } + $form = ob_get_contents(); + ob_end_clean(); + + ob_start(); + // If first check failed try again and show error message + if ( !WP_Filesystem( $creds ) && $success ) { + request_filesystem_credentials( $url, $method, true, false, array() ); + $success = false; + $form = ob_get_contents(); + } + ob_end_clean(); + + $error = ''; + if ( preg_match( "/(.+)<\/div>/", $form, $matches ) ) { + $error = $matches[2]; + $form = str_replace( $matches[0], '', $form ); + } + + if ( !$success ) { + throw new Util_WpFile_FilesystemOperationException( $error, $form ); + } + } + + /** + * + * + * @param string $method + * @param string $url + * @param bool|string $context + * @return Util_WpFile_FilesystemOperationException with S/FTP form + */ + static private function get_filesystem_credentials_form( $method = '', $url = '', + $context = false ) { + // Ensure request_filesystem_credentials() is available. + require_once ABSPATH . 'wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/template.php'; + + ob_start(); + // If first check failed try again and show error message + request_filesystem_credentials( $url, $method, true, false, array() ); + $success = false; + $form = ob_get_contents(); + + ob_end_clean(); + + $error = ''; + if ( preg_match( "/(.+)<\/div>/", $form, $matches ) ) { + $form = str_replace( $matches[0], '', $form ); + } + + $form = str_replace( 'filename = $filename; + $this->permission = $permission; + } + + public function filename() { + return $this->filename; + } + + public function permission() { + return $this->permission; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemCopyException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemCopyException.php new file mode 100644 index 00000000..3ebd9816 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemCopyException.php @@ -0,0 +1,23 @@ +source_filename = $source_filename; + $this->destination_filename = $destination_filename; + } + + public function source_filename() { + return $this->source_filename; + } + + public function destination_filename() { + return $this->destination_filename; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemMkdirException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemMkdirException.php new file mode 100644 index 00000000..4b33cd3b --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemMkdirException.php @@ -0,0 +1,16 @@ +folder = $folder; + } + + public function folder() { + return $this->folder; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemModifyException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemModifyException.php new file mode 100644 index 00000000..154eb4ed --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemModifyException.php @@ -0,0 +1,29 @@ +modification_description = $modification_description; + $this->filename = $filename; + $this->file_contents = $file_contents; + } + + function modification_description() { + return $this->modification_description; + } + + public function filename() { + return $this->filename; + } + + public function file_contents() { + return $this->file_contents; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemOperationException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemOperationException.php new file mode 100644 index 00000000..ccd495eb --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemOperationException.php @@ -0,0 +1,19 @@ +credentials_form = $credentials_form; + } + + public function credentials_form() { + return $this->credentials_form; + + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmException.php new file mode 100644 index 00000000..c98cb124 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmException.php @@ -0,0 +1,16 @@ +filename = $filename; + } + + public function filename() { + return $this->filename; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmdirException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmdirException.php new file mode 100644 index 00000000..764228fd --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemRmdirException.php @@ -0,0 +1,16 @@ +folder = $folder; + } + + public function folder() { + return $this->folder; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemWriteException.php b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemWriteException.php new file mode 100644 index 00000000..c89337aa --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpFile_FilesystemWriteException.php @@ -0,0 +1,23 @@ +filename = $filename; + $this->file_contents = $file_contents; + } + + public function filename() { + return $this->filename; + } + + public function file_contents() { + return $this->file_contents; + } +} diff --git a/wp-content/plugins/w3-total-cache/Util_WpmuBlogmap.php b/wp-content/plugins/w3-total-cache/Util_WpmuBlogmap.php new file mode 100644 index 00000000..48c370b5 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Util_WpmuBlogmap.php @@ -0,0 +1,157 @@ +blog mapfile + */ + static public function register_new_item( $config ) { + if ( !isset( $GLOBALS['current_blog'] ) ) { + return false; + } + + + // find blog_home_url + if ( Util_Environment::is_wpmu_subdomain() ) { + $blog_home_url = $GLOBALS['w3tc_blogmap_register_new_item']; + } else { + $home_url = rtrim( get_home_url(), '/' ); + if ( substr( $home_url, 0, 7 ) == 'http://' ) { + $home_url = substr( $home_url, 7 ); + } else if ( substr( $home_url, 0, 8 ) == 'https://' ) { + $home_url = substr( $home_url, 8 ); + } + + if ( substr( $GLOBALS['w3tc_blogmap_register_new_item'], 0, + strlen( $home_url ) ) == $home_url ) { + $blog_home_url = $home_url; + } else { + $blog_home_url = $GLOBALS['w3tc_blogmap_register_new_item']; + } + } + + + // write contents + $filename = Util_WpmuBlogmap::blogmap_filename_by_home_url( $blog_home_url ); + + if ( !@file_exists( $filename ) ) { + $blog_ids = array(); + } else { + $data = @file_get_contents( $filename ); + $blog_ids = @json_decode( $data, true ); + if ( !is_array( $blog_ids ) ) { + $blog_ids = array(); + } + } + + if ( isset( $blog_ids[$blog_home_url] ) ) { + return false; + } + + $data = $config->get_boolean( 'common.force_master' ) ? 'm' : 'c'; + $blog_home_url = preg_replace( '/[^a-zA-Z0-9\+\.%~!:()\/\-\_]/', '', $blog_home_url ); + $blog_ids[$blog_home_url] = $data . $GLOBALS['current_blog']->blog_id; + + $data = json_encode( $blog_ids ); + + try { + Util_File::file_put_contents_atomic( $filename, $data ); + } catch ( \Exception $ex ) { + return false; + } + + unset( self::$content_by_filename[$filename] ); + unset( $GLOBALS['w3tc_blogmap_register_new_item'] ); + + return true; + } +} diff --git a/wp-content/plugins/w3-total-cache/Varnish_Flush.php b/wp-content/plugins/w3-total-cache/Varnish_Flush.php new file mode 100644 index 00000000..6660d759 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Varnish_Flush.php @@ -0,0 +1,430 @@ +_config = Dispatcher::config(); + + $this->_debug = $this->_config->get_boolean( 'varnish.debug' ); + $this->_servers = $this->_config->get_array( 'varnish.servers' ); + $this->_timeout = $this->_config->get_integer( 'timelimit.varnish_purge' ); + } + + /** + * Purge URI + * + * @param string $url + * @return boolean + */ + protected function _purge( $url ) { + @set_time_limit( $this->_timeout ); + $return = true; + + foreach ( (array) $this->_servers as $server ) { + $response = $this->_request( $server, $url ); + + if ( is_wp_error( $response ) ) { + $this->_log( $url, sprintf( 'Unable to send request: %s.', implode( '; ', $response->get_error_messages() ) ) ); + $return = false; + } elseif ( $response['response']['code'] !== 200 ) { + $this->_log( $url, 'Bad response: ' . $response['response']['status'] ); + $return = false; + } else { + $this->_log( $url, 'PURGE OK' ); + } + } + + return $return; + } + + /* + * Sends purge request. Cannt use default wp HTTP implementation + * if we send request to different host than specified in $url + * + * @param $url string + */ + function _request( $varnish_server, $url ) { + $parse_url = @parse_url( $url ); + + if ( !$parse_url || !isset( $parse_url['host'] ) ) + return new \WP_Error( 'http_request_failed', 'Unrecognized URL format ' . $url ); + + $host = $parse_url['host']; + $port = ( isset( $parse_url['port'] ) ? (int) $parse_url['port'] : 80 ); + $path = ( !empty( $parse_url['path'] ) ? $parse_url['path'] : '/' ); + $query = ( isset( $parse_url['query'] ) ? $parse_url['query'] : '' ); + $request_uri = $path . ( $query != '' ? '?' . $query : '' ); + + list( $varnish_host, $varnish_port ) = + Util_Content::endpoint_to_host_port( $varnish_server, 80 ); + + // if url host is the same as varnish server - we can use regular + // wordpress http infrastructure, otherwise custom request should be + // sent using fsockopen, since we send request to other server than + // specified by $url + if ( $host == $varnish_host && $port == $varnish_port ) + return Util_Http::request( $url, array( 'method' => 'PURGE' ) ); + + $request_headers_array = array( + sprintf( 'PURGE %s HTTP/1.1', $request_uri ), + sprintf( 'Host: %s', $host ), + sprintf( 'User-Agent: %s', W3TC_POWERED_BY ), + 'Connection: close' + ); + + $request_headers = implode( "\r\n", $request_headers_array ); + $request = $request_headers . "\r\n\r\n"; + + // log what we are about to do + $this->_log( $url, sprintf( 'Connecting to %s ...', $varnish_host ) ); + $this->_log( $url, sprintf( 'PURGE %s HTTP/1.1', $request_uri ) ); + $this->_log( $url, sprintf( 'Host: %s', $host ) ); + + $errno = null; + $errstr = null; + $fp = @fsockopen( $varnish_host, $varnish_port, $errno, $errstr, 10 ); + if ( !$fp ) + return new \WP_Error( 'http_request_failed', $errno . ': ' . $errstr ); + + @stream_set_timeout( $fp, 60 ); + + @fputs( $fp, $request ); + + $response = ''; + while ( !@feof( $fp ) ) + $response .= @fgets( $fp, 4096 ); + + @fclose( $fp ); + + list( $response_headers, $contents ) = explode( "\r\n\r\n", $response, 2 ); + $matches = null; + if ( preg_match( '~^HTTP/1.[01] (\d+)~', $response_headers, $matches ) ) { + $code = (int)$matches[1]; + $a = explode( "\n", $response_headers ); + $status = ( count( $a ) >= 1 ? $a[0] : '' ); + $return = array( + 'response' => array( + 'code' => $code, + 'status' => $status + ) + ); + return $return; + } + + return new \WP_Error( 'http_request_failed', + 'Unrecognized response header' . $response_headers ); + } + + /** + * Write log entry + * + * @param string $url + * @param string $msg + * @return bool|int + */ + function _log( $url, $msg ) { + if ( $this->_debug ) { + $data = sprintf( "[%s] [%s] %s\n", date( 'r' ), $url, $msg ); + $data = strtr( $data, '<>', '' ); + + $filename = Util_Debug::log_filename( 'varnish' ); + + return @file_put_contents( $filename, $data, FILE_APPEND ); + } + + return true; + } + + + + /** + * Flush varnish cache + */ + function flush() { + $this->flush_operation_requested = true; + return true; + } + + private function do_flush() { + if ( !is_network_admin() ) { + $full_urls = array( get_home_url() . '/.*' ); + $full_urls = Util_PageUrls::complement_with_mirror_urls( + $full_urls ); + + foreach ( $full_urls as $url ) + $this->_purge( $url ); + } else { + // todo: remove. doesnt work for all caches. + // replace with tool to flush network + global $wpdb; + $protocall = Util_Environment::is_https() ? 'https://' : 'http://'; + + // If WPMU Domain Mapping plugin is installed and active + if ( defined( 'SUNRISE_LOADED' ) && SUNRISE_LOADED && isset( $wpdb->dmtable ) && !empty( $wpdb->dmtable ) ) { + $blogs = $wpdb->get_results( " + SELECT {$wpdb->blogs}.domain, {$wpdb->blogs}.path, {$wpdb->dmtable}.domain AS mapped_domain + FROM {$wpdb->dmtable} + RIGHT JOIN {$wpdb->blogs} ON {$wpdb->dmtable}.blog_id = {$wpdb->blogs}.blog_id + WHERE site_id = {$wpdb->siteid} + AND spam = 0 + AND deleted = 0 + AND archived = '0'" ); + foreach ( $blogs as $blog ) { + if ( !isset( $blog->mapped_domain ) ) + $url = $protocall . $blog->domain . ( strlen( $blog->path )>1? '/' . trim( $blog->path, '/' ) : '' ) . '/.*'; + else + $url = $protocall . $blog->mapped_domain . '/.*'; + $this->_purge( $url ); + } + + }else { + if ( !Util_Environment::is_wpmu_subdomain() ) { + $this->_purge( get_home_url().'/.*' ); + } else { + $blogs = $wpdb->get_results( " + SELECT domain, path + FROM {$wpdb->blogs} + WHERE site_id = '{$wpdb->siteid}' + AND spam = 0 + AND deleted = 0 + AND archived = '0'" ); + + foreach ( $blogs as $blog ) { + $url = $protocall . $blog->domain . ( strlen( $blog->path )>1? '/' . trim( $blog->path, '/' ) : '' ) . '/.*'; + $this->_purge( $url ); + } + } + } + } + } + + /** + * Flushes varnish post cache + * + * @param integer $post_id Post ID. + * @param boolean $force Force flag (optional). + * + * @return boolean + */ + function flush_post( $post_id, $force ) { + if ( !$post_id ) { + $post_id = Util_Environment::detect_post_id(); + } + + if ( $post_id ) { + $full_urls = array(); + + $post = null; + $terms = array(); + + $feeds = $this->_config->get_array( 'pgcache.purge.feed.types' ); + $limit_post_pages = $this->_config->get_integer( 'pgcache.purge.postpages_limit' ); + + if ( $this->_config->get_boolean( 'pgcache.purge.terms' ) || $this->_config->get_boolean( 'varnish.pgcache.feed.terms' ) ) { + $taxonomies = get_post_taxonomies( $post_id ); + $terms = wp_get_post_terms( $post_id, $taxonomies ); + } + + switch ( true ) { + case $this->_config->get_boolean( 'pgcache.purge.author' ): + case $this->_config->get_boolean( 'pgcache.purge.archive.daily' ): + case $this->_config->get_boolean( 'pgcache.purge.archive.monthly' ): + case $this->_config->get_boolean( 'pgcache.purge.archive.yearly' ): + case $this->_config->get_boolean( 'pgcache.purge.feed.author' ): + $post = get_post( $post_id ); + } + + $front_page = get_option( 'show_on_front' ); + + /** + * Home (Frontpage) URL + */ + if ( ( $this->_config->get_boolean( 'pgcache.purge.home' ) && $front_page == 'posts' )|| + $this->_config->get_boolean( 'pgcache.purge.front_page' ) ) { + $full_urls = array_merge( $full_urls, + Util_PageUrls::get_frontpage_urls( $limit_post_pages ) ); + } + + /** + * Home (Post page) URL + */ + if ( $this->_config->get_boolean( 'pgcache.purge.home' ) && $front_page != 'posts' ) { + $full_urls = array_merge( $full_urls, + Util_PageUrls::get_postpage_urls( $limit_post_pages ) ); + } + + /** + * Post URL + */ + if ( $this->_config->get_boolean( 'pgcache.purge.post' ) || $force ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_post_urls( $post_id ) ); + } + + /** + * Post comments URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.comments' ) && function_exists( 'get_comments_pagenum_link' ) ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_post_comments_urls( $post_id ) ); + } + + /** + * Post author URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.author' ) && $post ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_post_author_urls( $post->post_author, $limit_post_pages ) ); + } + + /** + * Post terms URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.terms' ) ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_post_terms_urls( $terms, $limit_post_pages ) ); + } + + /** + * Daily archive URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.archive.daily' ) && $post ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_daily_archive_urls( $post, $limit_post_pages ) ); + } + + /** + * Monthly archive URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.archive.monthly' ) && $post ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_monthly_archive_urls( $post, $limit_post_pages ) ); + } + + /** + * Yearly archive URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.archive.yearly' ) && $post ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_yearly_archive_urls( $post, $limit_post_pages ) ); + } + + /** + * Feed URLs + */ + if ( $this->_config->get_boolean( 'pgcache.purge.feed.blog' ) ) { + $full_urls = array_merge( $full_urls, + Util_PageUrls::get_feed_urls( $feeds ) ); + } + + if ( $this->_config->get_boolean( 'pgcache.purge.feed.comments' ) ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_feed_comments_urls( $post_id, $feeds ) ); + } + + if ( $this->_config->get_boolean( 'pgcache.purge.feed.author' ) && $post ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_feed_author_urls( $post->post_author, $feeds ) ); + } + + if ( $this->_config->get_boolean( 'pgcache.purge.feed.terms' ) ) { + $full_urls = array_merge( $full_urls, Util_PageUrls::get_feed_terms_urls( $terms, $feeds ) ); + } + + /** + * Purge selected pages + */ + if ( $this->_config->get_array( 'pgcache.purge.pages' ) ) { + $pages = $this->_config->get_array( 'pgcache.purge.pages' ); + $full_urls = array_merge( $full_urls, Util_PageUrls::get_pages_urls( $pages ) ); + } + + if ( $this->_config->get_string( 'pgcache.purge.sitemap_regex' ) ) { + $sitemap_regex = $this->_config->get_string( 'pgcache.purge.sitemap_regex' ); + $full_urls[] = Util_Environment::home_domain_root_url() . '/' . trim( $sitemap_regex, "^$" ); + } + + // add mirror urls + $full_urls = Util_PageUrls::complement_with_mirror_urls( + $full_urls ); + + $full_urls = apply_filters( 'varnish_flush_post_queued_urls', + $full_urls ); + + /** + * Queue flush + */ + if ( count( $full_urls ) ) { + foreach ( $full_urls as $url ) + $this->queued_urls[$url] = '*'; + } + + return true; + } + + return false; + } + + /** + * Flush a single url + * + * @param unknown $url + */ + function flush_url( $url ) { + $this->_purge( $url ); + } + + /** + * Flushes global and repeated urls + */ + function flush_post_cleanup() { + if ( $this->flush_operation_requested ) { + $this->do_flush(); + $count = 999; + + $this->flush_operation_requested = false; + $this->queued_urls = array(); + } else { + $count = count( $this->queued_urls ); + if ( $count > 0 ) { + foreach ( $this->queued_urls as $url => $nothing ) + $this->flush_url( $url ); + + $this->queued_urls = array(); + } + } + + return $count; + } +} diff --git a/wp-content/plugins/w3-total-cache/Varnish_Plugin.php b/wp-content/plugins/w3-total-cache/Varnish_Plugin.php new file mode 100644 index 00000000..8bcaaddd --- /dev/null +++ b/wp-content/plugins/w3-total-cache/Varnish_Plugin.php @@ -0,0 +1,89 @@ +flush(); + + return $v; + } + + /** + * Purges post from varnish + * + * @param integer $post_id Post ID. + * @param boolean $force Force flag (optional). + * + * @return mixed + */ + public function varnish_flush_post( $post_id, $force = false ) { + $varnishflush = Dispatcher::component( 'Varnish_Flush' ); + $v = $varnishflush->flush_post( $post_id, $force ); + + return $v; + } + + /** + * Purges post from varnish + * + * @param string $url + * @return mixed + */ + public function varnish_flush_url( $url ) { + $varnishflush = Dispatcher::component( 'Varnish_Flush' ); + $v = $varnishflush->flush_url( $url ); + + return $v; + } + + public function w3tc_admin_bar_menu( $menu_items ) { + $menu_items['20610.varnish'] = array( + 'id' => 'w3tc_flush_varnish', + 'parent' => 'w3tc_flush', + 'title' => __( 'Reverse Proxy', 'w3-total-cache' ), + 'href' => wp_nonce_url( admin_url( + 'admin.php?page=w3tc_dashboard&w3tc_flush_varnish' ), + 'w3tc' ) + ); + + return $menu_items; + } +} diff --git a/wp-content/plugins/w3-total-cache/extension-example/Extension_Example.php b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example.php new file mode 100644 index 00000000..3b0b4c31 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example.php @@ -0,0 +1,51 @@ +config = w3tc_config(); + + // get value of config option and use it + if ( $this->config->get_boolean( array( 'example' , 'is_title_postfix' ) ) ) + add_filter( 'the_title', array( $this, 'the_title' ), 10, 2 ); + } + + + + /** + * the_title filter handler. + * This extension adds specified postfix to each post title if extensions + * is configured so on its settings page + */ + public function the_title( $title, $id ) { + return $title . + $this->config->get_string( array( 'example' , 'title_postfix' ) ); + } +} + + + +/* +This file is simply loaded by W3 Total Cache in a case if extension is active. +Its up to extension what will it do or which way will it do. +*/ +$p = new Extension_Example(); +$p->run(); + +if ( is_admin() ) { + $p = new Extension_Example_Admin(); + $p->run(); +} diff --git a/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Admin.php b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Admin.php new file mode 100644 index 00000000..562ddcbf --- /dev/null +++ b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Admin.php @@ -0,0 +1,120 @@ + 'Example Extension', + 'author' => 'W3 EDGE', + 'description' => __( 'Example extension' ), + 'author_uri' => 'https://www.w3-edge.com/', + 'extension_uri' => 'https://www.w3-edge.com/', + 'extension_id' => 'example', + 'settings_exists' => true, + 'version' => '1.0', + 'enabled' => true, + 'requirements' => '', + 'path' => 'w3-total-cache-example/Extension_Example.php' + ); + + return $extensions; + } + + + + /** + * Entry point of extension for wp-admin/ requests + * Called from Extension_Example.php + */ + public function run() { + // handle settings page of this extension + add_action( 'w3tc_extension_page_example', array( + $this, + 'w3tc_extension_page' + ) ); + + // get control when configuration is changed by user + add_action( 'w3tc_config_ui_save', array( + $this, + 'w3tc_config_ui_save' + ), 10, 2 ); + + // Register widget on W3 Total Cache Dashboard page + add_action( 'w3tc_widget_setup', array( + $this, + 'w3tc_widget_setup' + ) ); + + // get control when extension is deactivated + add_action( 'w3tc_deactivate_extension_example', array( + $this, 'w3tc_deactivate_extension' ) ); + + } + + + + /** + * Show settings page + */ + public function w3tc_extension_page() { + include dirname( __FILE__ ) . '/Extension_Example_Page_View.php'; + } + + + + /** + * Get control when configuration is changed by user + */ + public function w3tc_config_ui_save( $config, $old_config ) { + if ( $config->get( array( 'example', 'is_title_postfix' ) ) != + $old_config->get( array( 'example', 'is_title_postfix' ) ) || + $config->get( array( 'example', 'title_postfix' ) ) != + $old_config->get( array( 'example', 'title_postfix' ) ) ) { + // flush all content caches, since our extension will now alter + // content + w3tc_flush_posts(); + } + } + + + + /** + * Registers widget on W3 Total Cache Dashboard page + */ + public function w3tc_widget_setup() { + $screen = get_current_screen(); + add_meta_box( 'example', 'example', array( $this, 'widget_content' ), + $screen, 'normal', 'core' ); + } + + + + /** + * Renders content of widget + */ + public function widget_content() { + echo "Example extension's widget"; + } + + + + /** + * Called when extension is deactivated. + * Perform a cleanup here + */ + public function w3tc_deactivate_extension() { + } +} diff --git a/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Page_View.php b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Page_View.php new file mode 100644 index 00000000..03f7d798 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/extension-example/Extension_Example_Page_View.php @@ -0,0 +1,47 @@ + +

+ + | + +

+

+ +
+ + + array( 'example', 'is_title_postfix' ), + 'control' => 'checkbox', + 'label' => __( 'Add postfix to page titles', 'w3-total-cache' ), + 'checkbox_label' => __( 'Enable', 'w3-total-cache' ), + 'description' => __( 'Check if you want to add postfix to each post title.', 'w3-total-cache' ), + ) + ); + \W3TC\Util_Ui::config_item( + array( + 'key' => array( 'example', 'title_postfix' ), + 'control' => 'textbox', + 'label' => __( 'Postfix to page titles', 'w3-total-cache' ), + ) + ); + ?> +
+ +
diff --git a/wp-content/plugins/w3-total-cache/extension-example/w3-total-cache-example.php b/wp-content/plugins/w3-total-cache/extension-example/w3-total-cache-example.php new file mode 100644 index 00000000..4fdc6600 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/extension-example/w3-total-cache-example.php @@ -0,0 +1,59 @@ + + + W3 Total Cache is distributed under the GNU General Public License, Version 2, + June 1991. Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110, USA + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +if ( !defined( 'ABSPATH' ) ) { + die(); +} + +/** + * Class autoloader + * + * @param string $class Classname + */ +function w3tc_example_class_autoload( $class ) { + if ( substr( $class, 0, 12 ) == 'W3TCExample\\' ) { + $filename = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . + substr( $class, 12 ) . '.php'; + + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + if ( !file_exists( $filename ) ) { + debug_print_backtrace(); + } + } + + require $filename; + } +} + +spl_autoload_register( 'w3tc_example_class_autoload' ); + +add_action( 'w3tc_extensions', array( + '\W3TCExample\Extension_Example_Admin', + 'w3tc_extensions' + ), 10, 2 ); diff --git a/wp-content/plugins/w3-total-cache/inc/define.php b/wp-content/plugins/w3-total-cache/inc/define.php new file mode 100644 index 00000000..24557bcc --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/define.php @@ -0,0 +1,25 @@ + + + +

Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.

+

Thanks for using W3 Total Cache.

+ + diff --git a/wp-content/plugins/w3-total-cache/inc/email/minify_error_notification.php b/wp-content/plugins/w3-total-cache/inc/email/minify_error_notification.php new file mode 100644 index 00000000..5afe70bf --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/email/minify_error_notification.php @@ -0,0 +1,7 @@ + + + +

Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.

+

Thanks for using W3 Total Cache.

+ + diff --git a/wp-content/plugins/w3-total-cache/inc/email/support_request.php b/wp-content/plugins/w3-total-cache/inc/email/support_request.php new file mode 100644 index 00000000..a8e8f5e3 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/email/support_request.php @@ -0,0 +1,50 @@ + + + + +

+ '; + echo esc_html__( 'Version: ', 'w3-total-cache' ) . esc_html( W3TC_VERSION ) . '
'; + echo esc_html__( 'URL: ', 'w3-total-cache' ) . '' . esc_html( $url ) . '
'; + echo esc_html__( 'Name: ', 'w3-total-cache' ) . esc_html( $name ) . '
'; + echo esc_html__( 'E-Mail: ', 'w3-total-cache' ) . '' . esc_html( $email ) . '
'; + + if ( $twitter ) { + echo esc_html__( 'Twitter: ', 'w3-total-cache' ) . '' . esc_html( $twitter ) . '
'; + } + + if ( $phone ) { + echo esc_html__( 'Phone: ', 'w3-total-cache' ) . esc_html( $phone ) . '
'; + } + + if ( $forum_url ) { + echo esc_html__( 'Forum Topic URL: ', 'w3-total-cache' ) . '' . esc_url( $forum_url ) . '
'; + } + + if ( $request_data_url ) { + echo esc_html__( 'Request data: ', 'w3-total-cache' ) . '' . esc_url( $request_data_url ) . '
'; + } + + echo esc_html__( 'Subject: ', 'w3-total-cache' ) . esc_html( $subject ); + ?> +

+ +

+ +

+ +
+ + + '; + echo esc_html__( 'User Agent: ', 'w3-total-cache' ) . esc_html( $_SERVER['HTTP_USER_AGENT'] ); + ?> + + + diff --git a/wp-content/plugins/w3-total-cache/inc/error.php b/wp-content/plugins/w3-total-cache/inc/error.php new file mode 100644 index 00000000..94d057c5 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/error.php @@ -0,0 +1,14 @@ + + + > + + + Error + + + +

+ +

+ + \ No newline at end of file diff --git a/wp-content/plugins/w3-total-cache/inc/index.html b/wp-content/plugins/w3-total-cache/inc/index.html new file mode 100644 index 00000000..e69de29b diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/index.html b/wp-content/plugins/w3-total-cache/inc/lightbox/index.html new file mode 100644 index 00000000..e69de29b diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/minify_recommendations.php b/wp-content/plugins/w3-total-cache/inc/lightbox/minify_recommendations.php new file mode 100644 index 00000000..d3022825 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/lightbox/minify_recommendations.php @@ -0,0 +1,160 @@ + +

Minify: Help Wizard

+ +

+ + + +

+ +
+

JavaScript:

+ +
    + $js_files ) : + foreach ( $js_files as $js_file ) : + $index++; + ?> +
  • + + + + + + + + + + + + + + + + +
     
    + /> + . + + + + + + + + +
    +
  • + + +
+

+ +

+ +

+ + +

+ + +
    + $css_files ) : + foreach ( $css_files as $css_file ) : + $index++; + ?> +
  • + + + + + + + + + + + + + + +
     
    + /> + . + + + + + +
    +
  • + + +
+

+ +

+ +

No files found.

+ +
+ +
+

+ +

+ +
+ + +
    +
  • +
  • + ', + '' + ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ); + ?> +
  • +
+
+
diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/purchase.php b/wp-content/plugins/w3-total-cache/inc/lightbox/purchase.php new file mode 100644 index 00000000..879d54c9 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/lightbox/purchase.php @@ -0,0 +1,4 @@ +
+ +
diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/self_test.php b/wp-content/plugins/w3-total-cache/inc/lightbox/self_test.php new file mode 100644 index 00000000..95aaa801 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/lightbox/self_test.php @@ -0,0 +1,520 @@ + +

+ +
+ + +

+ ', + '', + '
' + ), + array( + 'span' => array( + 'style' => array(), + ), + 'br' => array(), + ) + ); + echo wp_kses( + sprintf( + // translators: 1 opening HTML span with background, 2 closing HTML span tag, 3 HTML line break tag. + __( + '%1$sNot detected/Not available/Off%2$s: May be installed, but cannot be automatically confirmed. Functionality may be limited.%3$s', + 'w3-total-cache' + ), + '', + '', + '
' + ), + array( + 'span' => array( + 'style' => array(), + ), + 'br' => array(), + ) + ); + echo wp_kses( + sprintf( + // translators: 1 opening HTML span with background, 2 closing HTML span tag, 3 HTML line break tag. + __( + '%1$sNot installed/Error/No/False%2$s: Plugin or some functions may not work.%3$s', + 'w3-total-cache' + ), + '', + '', + '
' + ), + array( + 'span' => array( + 'style' => array(), + ), + 'br' => array(), + ) + ); + ?> +

+
+ +
+

+ +
    +
  • + +
  • + +
  • + + ; +
  • + +
  • + Web Server: + + Apache + + Lite Speed + + nginx + + lighttpd + + Microsoft IIS + + Not detected + +
  • + +
  • + FTP functions: + + Installed + + Not detected + + + ', + '', + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> + +
  • + +
  • + + + + + + + +
  • + +
  • + + + + + + + +
  • + +
  • + zlib extension: + + + + + + +
  • + +
  • + brotli extension: + + + + + + +
  • + +
  • + Opcode cache: + + + + + + + + + = 6 ) : ?> + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + + +
  • + +
  • + + + + + + + + + + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> + +
  • + +
  • + + + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + SSH2 extension: + + + + + + + ', + '', + '', + '', + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> + +
  • + + +
    + +
  • + : + + + + + + + + + + +
  • + + +
+ +

+
    + ' . wp_kses( $check, Util_Ui::get_allowed_html_for_wp_kses_from_content( $check ) ) . ''; + endforeach; + ?> +
+ + +

+ +
    + + +
  • + : + + + + + + + + + + + + + +
  • + + +
  • + : + + + + + +
  • + +
  • + + : + + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + + + + + + +
  • + +
  • + + + + + + +
  • + +
  • + + + () + + + +
  • +
+
+ +
+ +
diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/support_us.php b/wp-content/plugins/w3-total-cache/inc/lightbox/support_us.php new file mode 100644 index 00000000..101f208b --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/lightbox/support_us.php @@ -0,0 +1,152 @@ + +
+ +
+
+

Frederick Townes

+

CEO, W3 EDGE

+
+
+
+ +
+
+ + +
+
+ +
+ + +
+
+
+
+ +
+

+ +
    +
  • + +
  • +
  • + +
  • +
+

+
+ + +

+ get_string( 'license.community_terms' ) !== 'accept' ) : ?> +

+ + +

+ +
+ +
+
diff --git a/wp-content/plugins/w3-total-cache/inc/lightbox/upgrade.php b/wp-content/plugins/w3-total-cache/inc/lightbox/upgrade.php new file mode 100644 index 00000000..bc465e4b --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/lightbox/upgrade.php @@ -0,0 +1,40 @@ + +
+ +
+ +
+
+ W3 TOTAL CACHE
+ +
+
+ +
+ + + + + + + +
+ +
+ +
+ +
+ +
diff --git a/wp-content/plugins/w3-total-cache/inc/mime/all.php b/wp-content/plugins/w3-total-cache/inc/mime/all.php new file mode 100644 index 00000000..a2bd34e6 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/mime/all.php @@ -0,0 +1,630 @@ + 'application/vnd.lotus-1-2-3', + '3dml' => 'text/vnd.in3d.3dml', + '3g2' => 'video/3gpp2', + '3gp' => 'video/3gpp', + 'aab|x32|u32|vox' => 'application/x-authorware-bin', + 'aac' => 'audio/x-aac', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'abw' => 'application/x-abiword', + 'acc' => 'application/vnd.americandynamics.acc', + 'ace' => 'application/x-ace-compressed', + 'acu' => 'application/vnd.acucobol', + 'adp' => 'audio/adpcm', + 'aep' => 'application/vnd.audiograph', + 'afp|listafp|list3820' => 'application/vnd.ibm.modcap', + 'aif|aiff|aifc' => 'audio/x-aiff', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'ai|eps|ps' => 'application/postscript', + 'ami' => 'application/vnd.amiga.ami', + 'apk' => 'application/vnd.android.package-archive', + 'application' => 'application/x-ms-application', + 'apr' => 'application/vnd.lotus-approach', + 'asc|sig' => 'application/pgp-signature', + 'asf|asx' => 'video/x-ms-asf', + 'aso' => 'application/vnd.accpac.simply.aso', + 'atc|acutc' => 'application/vnd.acucorp', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'atx' => 'application/vnd.antix.game-component', + 'au|snd' => 'audio/basic', + 'avi' => 'video/x-msvideo', + 'avif' => 'image/avif', + 'avifs' => 'image/avif-sequence', + 'aw' => 'application/applixware', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azw' => 'application/vnd.amazon.ebook', + 'bcpio' => 'application/x-bcpio', + 'bdf' => 'application/x-font-bdf', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'bin|dms|lha|lrf|lzh|so|iso|dmg|dist|distz|pkg|bpk|dump|elc|deploy' => 'application/octet-stream', + 'bmi' => 'application/vnd.bmi', + 'bmp' => 'image/bmp', + 'box' => 'application/vnd.previewsystems.box', + 'btif' => 'image/prs.btif', + 'bz' => 'application/x-bzip', + 'bz2|boz' => 'application/x-bzip2', + 'c4g|c4d|c4f|c4p|c4u' => 'application/vnd.clonk.c4group', + 'cab' => 'application/vnd.ms-cab-compressed', + 'car' => 'application/vnd.curl.car', + 'cat' => 'application/vnd.ms-pki.seccat', + 'ccxml' => 'application/ccxml+xml', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'cdx' => 'chemical/x-cdx', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'cdy' => 'application/vnd.cinderella', + 'cer' => 'application/pkix-cert', + 'cgm' => 'image/cgm', + 'chat' => 'application/x-chat', + 'chm' => 'application/vnd.ms-htmlhelp', + 'chrt' => 'application/vnd.kde.kchart', + 'cif' => 'chemical/x-cif', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'cil' => 'application/vnd.ms-artgalry', + 'cla' => 'application/vnd.claymore', + 'class' => 'application/java-vm', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'clkx' => 'application/vnd.crick.clicker', + 'clp' => 'application/x-msclip', + 'cmc' => 'application/vnd.cosmocaller', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'cmx' => 'image/x-cmx', + 'cod' => 'application/vnd.rim.cod', + 'cpio' => 'application/x-cpio', + 'cpt' => 'application/mac-compactpro', + 'crd' => 'application/x-mscardfile', + 'crl' => 'application/pkix-crl', + 'csh' => 'application/x-csh', + 'csml' => 'chemical/x-csml', + 'csp' => 'application/vnd.commonspace', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'curl' => 'text/vnd.curl', + 'cww' => 'application/prs.cww', + 'c|cc|cxx|cpp|h|hh|dic' => 'text/x-c', + 'daf' => 'application/vnd.mobius.daf', + 'davmount' => 'application/davmount+xml', + 'dcurl' => 'text/vnd.curl.dcurl', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'deb|udeb' => 'application/x-debian-package', + 'der|crt' => 'application/x-x509-ca-cert', + 'df' => 'application/x-deflate', + 'dfac' => 'application/vnd.dreamfactory', + 'dir|dcr|dxr|cst|cct|cxt|w3d|fgd|swa' => 'application/x-director', + 'dis' => 'application/vnd.mobius.dis', + 'djvu|djv' => 'image/vnd.djvu', + 'dna' => 'application/vnd.dna', + 'docm' => 'application/vnd.ms-word.document.macroenabled.12', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'doc|dot' => 'application/msword', + 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dp' => 'application/vnd.osgi.dp', + 'dpg' => 'application/vnd.dpgraph', + 'dsc' => 'text/prs.lines.tag', + 'dtb' => 'application/x-dtbook+xml', + 'dtd' => 'application/xml-dtd', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'dvi' => 'application/x-dvi', + 'dwf' => 'model/vnd.dwf', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'dxp' => 'application/vnd.spotfire.dxp', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'ecma' => 'application/ecmascript', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'efif' => 'application/vnd.picsel', + 'ei6' => 'application/vnd.pg.osasli', + 'eml|all' => 'message/rfc822', + 'emma' => 'application/emma+xml', + 'eol' => 'audio/vnd.digital-winds', + 'eot' => 'application/vnd.ms-fontobject', + 'epub' => 'application/epub+zip', + 'es3|et3' => 'application/vnd.eszigno3+xml', + 'esf' => 'application/vnd.epson.esf', + 'etx' => 'text/x-setext', + 'exe|dll|com|bat|msi' => 'application/x-msdownload', + 'ext' => 'application/vnd.novadigm.ext', + 'ez' => 'application/andrew-inset', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'f4v' => 'video/x-f4v', + 'fbs' => 'image/vnd.fastbidsheet', + 'fdf' => 'application/vnd.fdf', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'fh|fhc|fh4|fh5|fh7' => 'image/x-freehand', + 'fig' => 'application/x-xfig', + 'fli' => 'video/x-fli', + 'flo' => 'application/vnd.micrografx.flo', + 'flv' => 'video/x-flv', + 'flw' => 'application/vnd.kde.kivio', + 'flx' => 'text/vnd.fmi.flexstor', + 'fly' => 'text/vnd.fly', + 'fm|frame|maker|book' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'fpx' => 'image/vnd.fpx', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'fst' => 'image/vnd.fst', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'fvt' => 'video/vnd.fvt', + 'fzs' => 'application/vnd.fuzzysheet', + 'f|for|f77|f90' => 'text/x-fortran', + 'g3' => 'image/g3fax', + 'gac' => 'application/vnd.groove-account', + 'gdl' => 'model/vnd.gdl', + 'geo' => 'application/vnd.dynageo', + 'gex|gre' => 'application/vnd.geometry-explorer', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'ghf' => 'application/vnd.groove-help', + 'gif' => 'image/gif', + 'gim' => 'application/vnd.groove-identity-message', + 'gmx' => 'application/vnd.gmx', + 'gnumeric' => 'application/x-gnumeric', + 'gph' => 'application/vnd.flographit', + 'gqf|gqs' => 'application/vnd.grafeq', + 'gram' => 'application/srgs', + 'grv' => 'application/vnd.groove-injector', + 'grxml' => 'application/srgs+xml', + 'gsf' => 'application/x-font-ghostscript', + 'gtar' => 'application/x-gtar', + 'gtm' => 'application/vnd.groove-tool-message', + 'gtw' => 'model/vnd.gtw', + 'gv' => 'text/vnd.graphviz', + 'gz' => 'application/x-gzip', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'hbci' => 'application/vnd.hbci', + 'hdf' => 'application/x-hdf', + 'hlp' => 'application/winhlp', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hps' => 'application/vnd.hp-hps', + 'hqx' => 'application/mac-binhex40', + 'htc' => 'text/x-component', + 'htke' => 'application/vnd.kenameaapp', + 'html|htm' => 'text/html', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'icc|icm' => 'application/vnd.iccprofile', + 'ice' => 'x-conference/x-cooltalk', + 'ico' => 'image/x-icon', + 'ics|ifb' => 'text/calendar', + 'ief' => 'image/ief', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'igl' => 'application/vnd.igloader', + 'igs|iges' => 'model/iges', + 'igx' => 'application/vnd.micrografx.igx', + 'iif' => 'application/vnd.shana.informed.interchange', + 'imp' => 'application/vnd.accpac.simply.imp', + 'ims' => 'application/vnd.ms-ims', + 'ipk' => 'application/vnd.shana.informed.package', + 'irm' => 'application/vnd.ibm.rights-management', + 'irp' => 'application/vnd.irepository.package+xml', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'jam' => 'application/vnd.jam', + 'jar' => 'application/java-archive', + 'java' => 'text/x-java-source', + 'jisp' => 'application/vnd.jisp', + 'jlt' => 'application/vnd.hp-jlyt', + 'jnlp' => 'application/x-java-jnlp-file', + 'joda' => 'application/vnd.joost.joda-archive', + 'jpeg|jpg|jpe' => 'image/jpeg', + 'jpgv' => 'video/jpeg', + 'jpm|jpgm' => 'video/jpm', + 'js' => 'application/x-javascript', + 'json' => 'application/json', + 'karbon' => 'application/vnd.kde.karbon', + 'kfo' => 'application/vnd.kde.kformula', + 'kia' => 'application/vnd.kidspiration', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kne|knp' => 'application/vnd.kinar', + 'kon' => 'application/vnd.kde.kontour', + 'kpr|kpt' => 'application/vnd.kde.kpresenter', + 'ksp' => 'application/vnd.kde.kspread', + 'ktz|ktr' => 'application/vnd.kahootz', + 'kwd|kwt' => 'application/vnd.kde.kword', + 'latex' => 'application/x-latex', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + 'les' => 'application/vnd.hhe.lesson-player', + 'less' => 'text/less', + 'link66' => 'application/vnd.route66.link66+xml', + 'lostxml' => 'application/lost+xml', + 'lrm' => 'application/vnd.ms-lrm', + 'ltf' => 'application/vnd.frogans.ltf', + 'lvp' => 'audio/vnd.lucent.voice', + 'lwp' => 'application/vnd.lotus-wordpro', + 'm3u' => 'audio/x-mpegurl', + 'm4v' => 'video/x-m4v', + 'mag' => 'application/vnd.ecowin.chart', + 'mathml' => 'application/mathml+xml', + 'ma|nb|mb' => 'application/mathematica', + 'mbk' => 'application/vnd.mobius.mbk', + 'mbox' => 'application/mbox', + 'mc1' => 'application/vnd.medcalcdata', + 'mcd' => 'application/vnd.mcd', + 'mcurl' => 'text/vnd.curl.mcurl', + 'mdb' => 'application/x-msaccess', + 'mdi' => 'image/vnd.ms-modi', + 'mfm' => 'application/vnd.mfmp', + 'mgz' => 'application/vnd.proteus.magazine', + 'mid|midi|kar|rmi' => 'audio/midi', + 'mif' => 'application/vnd.mif', + 'mj2|mjp2' => 'video/mj2', + 'mlp' => 'application/vnd.dolby.mlp', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'mmf' => 'application/vnd.smaf', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'mny' => 'application/x-msmoney', + 'movie' => 'video/x-sgi-movie', + 'mp4a' => 'audio/mp4', + 'mp4s' => 'application/mp4', + 'mp4|mp4v|mpg4' => 'video/mp4', + 'mpc' => 'application/vnd.mophun.certificate', + 'mpeg|mpg|mpe|m1v|m2v' => 'video/mpeg', + 'mpga|mp2|mp2a|mp3|m2a|m3a' => 'audio/mpeg', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'mpm' => 'application/vnd.blueice.multipass', + 'mpn' => 'application/vnd.mophun.application', + 'mpp|mpt' => 'application/vnd.ms-project', + 'mpy' => 'application/vnd.ibm.minipay', + 'mqy' => 'application/vnd.mobius.mqy', + 'mrc' => 'application/marc', + 'mscml' => 'application/mediaservercontrol+xml', + 'mseed' => 'application/vnd.fdsn.mseed', + 'mseq' => 'application/vnd.mseq', + 'msf' => 'application/vnd.epson.msf', + 'msh|mesh|silo' => 'model/mesh', + 'msl' => 'application/vnd.mobius.msl', + 'msty' => 'application/vnd.muvee.style', + 'mts' => 'model/vnd.mts', + 'mus' => 'application/vnd.musician', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'mvb|m13|m14' => 'application/x-msmediaview', + 'mwf' => 'application/vnd.mfer', + 'mxf' => 'application/mxf', + 'mxl' => 'application/vnd.recordare.musicxml', + 'mxml|xhvml|xvml|xvm' => 'application/xv+xml', + 'mxs' => 'application/vnd.triscape.mxs', + 'mxu|m4u' => 'video/vnd.mpegurl', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'ncx' => 'application/x-dtbncx+xml', + 'nc|cdf' => 'application/x-netcdf', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'nml' => 'application/vnd.enliven', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'npx' => 'image/vnd.net-fpx', + 'nsf' => 'application/vnd.lotus-notes', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'oas' => 'application/vnd.fujitsu.oasys', + 'obd' => 'application/x-msbinder', + 'oda' => 'application/oda', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga|ogg|spx' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote', + 'opf' => 'application/oebps-package+xml', + 'org' => 'application/vnd.lotus-organizer', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'otf' => array( 'application/x-font-otf', 'application/vnd.ms-opentype' ), + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'otm' => 'application/vnd.oasis.opendocument.text-master', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'p10' => 'application/pkcs10', + 'p12|pfx' => 'application/x-pkcs12', + 'p7b|spc' => 'application/x-pkcs7-certificates', + 'p7m|p7c' => 'application/pkcs7-all', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'pbd' => 'application/vnd.powerbuilder6', + 'pbm' => 'image/x-portable-bitmap', + 'pcf' => 'application/x-font-pcf', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'pcurl' => 'application/vnd.curl.pcurl', + 'pcx' => 'image/x-pcx', + 'pdb|pqa|oprc' => 'application/vnd.palm', + 'pdf' => 'application/pdf', + 'pfa|pfb|pfm|afm' => 'application/x-font-type1', + 'pfr' => 'application/font-tdpfr', + 'pgm' => 'image/x-portable-graymap', + 'pgn' => 'application/x-chess-pgn', + 'pgp' => 'application/pgp-encrypted', + 'pic|pct' => 'image/x-pict', + 'pki' => 'application/pkixcmp', + 'pkipath' => 'application/pkix-pkipath', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'plc' => 'application/vnd.mobius.plc', + 'plf' => 'application/vnd.pocketlearn', + 'pls' => 'application/pls+xml', + 'pml' => 'application/vnd.ctc-posml', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'portpkg' => 'application/vnd.macports.portpkg', + 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'ppd' => 'application/vnd.cups-ppd', + 'ppm' => 'image/x-portable-pixmap', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ppt|pps|pot' => 'application/vnd.ms-powerpoint', + 'prc|mobi' => 'application/x-mobipocket-ebook', + 'pre' => 'application/vnd.lotus-freelance', + 'prf' => 'application/pics-rules', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'psd' => 'image/vnd.adobe.photoshop', + 'psf' => 'application/x-font-linux-psf', + 'ptid' => 'application/vnd.pvi.ptid1', + 'pub' => 'application/x-mspublisher', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'p|pas' => 'text/x-pascal', + 'qam' => 'application/vnd.epson.quickanime', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'qps' => 'application/vnd.publishare-delta-tree', + 'qt|mov' => 'video/quicktime', + 'qxd|qxt|qwd|qwt|qxl|qxb' => 'application/vnd.quark.quarkxpress', + 'ram|ra' => 'audio/x-pn-realaudio', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'rdf' => 'application/rdf+xml', + 'rdz' => 'application/vnd.data-vision.rdz', + 'rep' => 'application/vnd.businessobjects', + 'res' => 'application/x-dtbresource+xml', + 'rgb' => 'image/x-rgb', + 'rif' => 'application/reginfo+xml', + 'rl' => 'application/resource-lists+xml', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'rld' => 'application/resource-lists-diff+xml', + 'rm' => 'application/vnd.rn-realmedia', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'rnc' => 'application/relax-ng-compact-syntax', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rq' => 'application/sparql-query', + 'rs' => 'application/rls-services+xml', + 'rsd' => 'application/rsd+xml', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'rtx' => 'text/richtext', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'sbml' => 'application/sbml+xml', + 'sc' => 'application/vnd.ibm.secure-container', + 'scd' => 'application/x-msschedule', + 'scm' => 'application/vnd.lotus-screencam', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'scurl' => 'text/vnd.curl.scurl', + 'sda' => 'application/vnd.stardivision.draw', + 'sdc' => 'application/vnd.stardivision.calc', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdkm|sdkd' => 'application/vnd.solent.sdkm+xml', + 'sdp' => 'application/sdp', + 'sdw' => 'application/vnd.stardivision.writer', + 'see' => 'application/vnd.seemail', + 'seed|dataless' => 'application/vnd.fdsn.seed', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'ser' => 'application/java-serialized-object', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sgml|sgm' => 'text/sgml', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'shf' => 'application/shf+xml', + 'sis|sisx' => 'application/vnd.symbian.install', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'skp|skd|skt|skm' => 'application/vnd.koan', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'slt' => 'application/vnd.epson.salt', + 'smf' => 'application/vnd.stardivision.math', + 'smi|smil' => 'application/smil+xml', + 'snf' => 'application/x-font-snf', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'spl' => 'application/x-futuresplash', + 'spot' => 'text/vnd.in3d.spot', + 'spp' => 'application/scvp-vp-response', + 'spq' => 'application/scvp-vp-request', + 'src' => 'application/x-wais-source', + 'srx' => 'application/sparql-results+xml', + 'sse' => 'application/vnd.kodak-descriptor', + 'ssf' => 'application/vnd.epson.ssf', + 'ssml' => 'application/ssml+xml', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'std' => 'application/vnd.sun.xml.draw.template', + 'stf' => 'application/vnd.wt.stf', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'stk' => 'application/hyperstudio', + 'stl' => 'application/vnd.ms-pki.stl', + 'str' => 'application/vnd.pg.format', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sus|susp' => 'application/vnd.sus-calendar', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'svd' => 'application/vnd.svd', + 'svg|svgz' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'swi' => 'application/vnd.arastra.swi', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxd' => 'application/vnd.sun.xml.draw', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 's|asm' => 'text/x-asm', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'tar' => 'application/x-tar', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'tcl' => 'application/x-tcl', + 'teacher' => 'application/vnd.smart.teacher', + 'tex' => 'application/x-tex', + 'texinfo|texi' => 'application/x-texinfo', + 'tfm' => 'application/x-tex-tfm', + 'tiff|tif' => 'image/tiff', + 'tmo' => 'application/vnd.tmobile-livetv', + 'torrent' => 'application/x-bittorrent', + 'tpl' => 'application/vnd.groove-tool-template', + 'tpt' => 'application/vnd.trid.tpt', + 'tra' => 'application/vnd.trueapp', + 'trm' => 'application/x-msterminal', + 'tsv' => 'text/tab-separated-values', + 'ttf|ttc' => array( 'application/x-font-ttf', 'application/vnd.ms-opentype' ), + 'twd|twds' => 'application/vnd.simtech-mindmapper', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'txf' => 'application/vnd.mobius.txf', + 'txt|text|conf|def|list|log|in' => 'text/plain', + 't|tr|roff|man|me|ms' => 'text/troff', + 'ufd|ufdl' => 'application/vnd.ufdl', + 'umj' => 'application/vnd.umajin', + 'unityweb' => 'application/vnd.unity', + 'uoml' => 'application/vnd.uoml+xml', + 'uri|uris|urls' => 'text/uri-list', + 'ustar' => 'application/x-ustar', + 'utz' => 'application/vnd.uiq.theme', + 'uu' => 'text/x-uuencode', + 'vcd' => 'application/x-cdlink', + 'vcf' => 'text/x-vcard', + 'vcg' => 'application/vnd.groove-vcard', + 'vcs' => 'text/x-vcalendar', + 'vcx' => 'application/vnd.vcx', + 'vis' => 'application/vnd.visionary', + 'viv' => 'video/vnd.vivo', + 'vor' => 'application/vnd.stardivision.writer', + 'vsd|vst|vss|vsw' => 'application/vnd.visio', + 'vsf' => 'application/vnd.vsf', + 'vtu' => 'model/vnd.vtu', + 'vxml' => 'application/voicexml+xml', + 'wad' => 'application/x-doom', + 'wav' => 'audio/x-wav', + 'wax' => 'audio/x-ms-wax', + 'wbmp' => 'image/vnd.wap.wbmp', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'wbxml' => 'application/vnd.wap.wbxml', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wm' => 'video/x-ms-wm', + 'wma' => 'audio/x-ms-wma', + 'wmd' => 'application/x-ms-wmd', + 'wmf' => 'application/x-msmetafile', + 'wml' => 'text/vnd.wap.wml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmls' => 'text/vnd.wap.wmlscript', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wmz' => 'application/x-ms-wmz', + 'wpd' => 'application/vnd.wordperfect', + 'wpl' => 'application/vnd.ms-wpl', + 'wps|wks|wcm|wdb' => 'application/vnd.ms-works', + 'wqd' => 'application/vnd.wqd', + 'wri' => 'application/x-mswrite', + 'wrl|vrml' => 'model/vrml', + 'wsdl' => 'application/wsdl+xml', + 'wspolicy' => 'application/wspolicy+xml', + 'wtb' => 'application/vnd.webturbo', + 'wvx' => 'video/x-ms-wvx', + 'x3d' => 'application/vnd.hzn-3d-crossword', + 'xap' => 'application/x-silverlight-app', + 'xar' => 'application/vnd.xara', + 'xbap' => 'application/x-ms-xbap', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'xbm' => 'image/x-xbitmap', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xenc' => 'application/xenc+xml', + 'xer' => 'application/patch-ops-error+xml', + 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdl' => 'application/vnd.xfdl', + 'xhtml|xht' => 'application/xhtml+xml', + 'xif' => 'image/vnd.xiff', + 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xls|xlm|xla|xlc|xlt|xlw' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xml|xsl' => 'application/xml', + 'xo' => 'application/vnd.olpc-sugar', + 'xop' => 'application/xop+xml', + 'xpi' => 'application/x-xpinstall', + 'xpm' => 'image/x-xpixmap', + 'xpr' => 'application/vnd.is-xpr', + 'xps' => 'application/vnd.ms-xpsdocument', + 'xpw|xpx' => 'application/vnd.intercon.formnet', + 'xslt' => 'application/xslt+xml', + 'xsm' => 'application/vnd.syncml+xml', + 'xspf' => 'application/xspf+xml', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'xwd' => 'image/x-xwindowdump', + 'xyz' => 'chemical/x-xyz', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'zip' => 'application/zip', + 'zir|zirz' => 'application/vnd.zul', + 'zmm' => 'application/vnd.handheld-entertainment+xml' +); diff --git a/wp-content/plugins/w3-total-cache/inc/mime/cssjs.php b/wp-content/plugins/w3-total-cache/inc/mime/cssjs.php new file mode 100644 index 00000000..5a3bb414 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/mime/cssjs.php @@ -0,0 +1,15 @@ + 'text/css', + 'htc' => 'text/x-component', + 'less' => 'text/css', + //JS - varieties + 'js' => 'application/x-javascript', + 'js2' => 'application/javascript', + 'js3' => 'text/javascript', + 'js4' => 'text/x-js', +); diff --git a/wp-content/plugins/w3-total-cache/inc/mime/html.php b/wp-content/plugins/w3-total-cache/inc/mime/html.php new file mode 100644 index 00000000..191d59c5 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/mime/html.php @@ -0,0 +1,13 @@ + 'text/html', + 'rtf|rtx' => 'text/richtext', + 'txt' => 'text/plain', + 'xsd' => 'text/xsd', + 'xsl' => 'text/xsl', + 'xml' => 'text/xml' +); diff --git a/wp-content/plugins/w3-total-cache/inc/mime/index.html b/wp-content/plugins/w3-total-cache/inc/mime/index.html new file mode 100644 index 00000000..e69de29b diff --git a/wp-content/plugins/w3-total-cache/inc/mime/other.php b/wp-content/plugins/w3-total-cache/inc/mime/other.php new file mode 100644 index 00000000..f254c337 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/mime/other.php @@ -0,0 +1,59 @@ + 'video/asf', + 'avi' => 'video/avi', + 'avif' => 'image/avif', + 'avifs' => 'image/avif-sequence', + 'bmp' => 'image/bmp', + 'class' => 'application/java', + 'divx' => 'video/divx', + 'doc|docx' => 'application/msword', + 'eot' => 'application/vnd.ms-fontobject', + 'exe' => 'application/x-msdownload', + 'gif' => 'image/gif', + 'gz|gzip' => 'application/x-gzip', + 'ico' => 'image/x-icon', + 'jpg|jpeg|jpe' => 'image/jpeg', + 'webp' => 'image/webp', + 'json' => 'application/json', + 'mdb' => 'application/vnd.ms-access', + 'mid|midi' => 'audio/midi', + 'mov|qt' => 'video/quicktime', + 'mp3|m4a' => 'audio/mpeg', + 'mp4|m4v' => 'video/mp4', + 'mpeg|mpg|mpe' => 'video/mpeg', + 'webm' => 'video/webm', + 'mpp' => 'application/vnd.ms-project', + 'otf' => 'application/x-font-otf', + '_otf' => 'application/vnd.ms-opentype', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'pdf' => 'application/pdf', + 'png' => 'image/png', + 'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint', + 'ra|ram' => 'audio/x-realaudio', + 'svg|svgz' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif|tiff' => 'image/tiff', + 'ttf|ttc' => 'application/x-font-ttf', + '_ttf' => 'application/vnd.ms-opentype', + 'wav' => 'audio/wav', + 'wma' => 'audio/wma', + 'wri' => 'application/vnd.ms-write', + 'woff' => 'application/font-woff', + 'woff2' => 'application/font-woff2', + 'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel', + 'zip' => 'application/zip' +); diff --git a/wp-content/plugins/w3-total-cache/inc/options/about.php b/wp-content/plugins/w3-total-cache/inc/options/about.php new file mode 100644 index 00000000..220b2b0f --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/options/about.php @@ -0,0 +1,263 @@ + + + +
+

+ memcached', + '', + '' + ), + array( + 'a' => array( + 'href' => array(), + 'target' => array(), + ), + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +

+
    +
  • +
  • +
  • +
  • + ', + '', + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • + ', + '', + '', + '', + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • +
  • + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ) + ?> +
  • +
  • + ', + '', + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • +
  • +
  • +
  • + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • +
  • + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
  • + ', + '' + ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ); + ?> +
  • +
  • +
  • + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
+ +

+ +

+ +

+ + + +

+
+ + diff --git a/wp-content/plugins/w3-total-cache/inc/options/browsercache.php b/wp-content/plugins/w3-total-cache/inc/options/browsercache.php new file mode 100644 index 00000000..366e4d38 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/options/browsercache.php @@ -0,0 +1,730 @@ + 'Default', + 'on' => 'Enable', + 'off' => 'Disable', +); + +?> + + +
+

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

+

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

+
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'browsercache.rewrite', + 'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ), + 'control' => 'checkbox', + 'checkbox_label' => wp_kses( + sprintf( + // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. + __( + 'Rewrite %1$sURL%2$s structure of objects', + 'w3-total-cache' + ), + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ), + 'description' => wp_kses( + sprintf( + // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. + __( + 'Generate unique %1$sURI%2$s for each file protected from caching by browser.', + 'w3-total-cache' + ), + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ), + 'label_class' => 'w3tc_single_column', + ) + ); + ?> +
+ +

+
+ +

+
+ +

+
+ +

+
+ +

+
+ +

+
+ +

+
+ +

+
+ +

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

+
+ +

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

+
+ +

+
+ checkbox( 'browsercache.no404wp', ! Util_Rule::can_check_rules() ); ?> +

+

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

+
+ +

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

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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ checkbox( 'browsercache.cssjs.last_modified' ); ?> +

+
+ checkbox( 'browsercache.cssjs.expires' ); ?> +

+
+ + + + name="browsercache__cssjs__lifetime" value="_config->get_integer( 'browsercache.cssjs.lifetime' ) ); ?>" size="8" /> +
+ checkbox( 'browsercache.cssjs.cache.control' ); ?> +

+
+ + + + +

+ +
+ checkbox( 'browsercache.cssjs.etag' ); ?> +

+
+ checkbox( 'browsercache.cssjs.w3tc' ); ?> +

+
+ checkbox( 'browsercache.cssjs.compression' ); ?> +

+
+ checkbox( 'browsercache.cssjs.brotli', ! function_exists( 'brotli_compress' ) ); ?> +

+
+ checkbox( 'browsercache.cssjs.replace' ); ?> +

+
+ checkbox( 'browsercache.cssjs.querystring' ); ?> +

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

+
+ checkbox( 'browsercache.cssjs.nocookies' ); ?> +

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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ checkbox( 'browsercache.html.last_modified' ); ?> +

+
+ checkbox( 'browsercache.html.expires' ); ?> +

+
+ + + + value="_config->get_integer( 'browsercache.html.lifetime' ) ); ?>" + size="8" /> +
+ checkbox( 'browsercache.html.cache.control' ); ?> +

+
+ + + + +

+ +
+ checkbox( 'browsercache.html.etag' ); ?> +

+
+ checkbox( 'browsercache.html.w3tc' ); ?> +

+
+ checkbox( 'browsercache.html.compression' ); ?> +

+
+ checkbox( 'browsercache.html.brotli', ! function_exists( 'brotli_compress' ) ); ?> +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ checkbox( 'browsercache.other.last_modified' ); ?> +

+
+ checkbox( 'browsercache.other.expires' ); ?> +

+
+ + + + name="browsercache__other__lifetime" value="_config->get_integer( 'browsercache.other.lifetime' ) ); ?>" size="8" /> +
+ checkbox( 'browsercache.other.cache.control' ); ?> +

+
+ + + + +

+ +
+ checkbox( 'browsercache.other.etag' ); ?> +

+
+ checkbox( 'browsercache.other.w3tc' ); ?> +

+
+ checkbox( 'browsercache.other.compression' ); ?> +

+
+ checkbox( 'browsercache.other.brotli', ! function_exists( 'brotli_compress' ) ); ?> +

+
+ checkbox( 'browsercache.other.replace' ); ?> +

+
+ checkbox( 'browsercache.other.querystring' ); ?> +

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

+
+ checkbox( 'browsercache.other.nocookies' ); ?> +

+
+ + + + + +
+
+ + diff --git a/wp-content/plugins/w3-total-cache/inc/options/cdn.php b/wp-content/plugins/w3-total-cache/inc/options/cdn.php new file mode 100644 index 00000000..b2fe4a88 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/options/cdn.php @@ -0,0 +1,902 @@ + + +

+ + | + | + | + | + +

+ +

+ ' . Cache::engine_name( $this->_config->get_string( 'cdn.engine' ) ) . '', + '' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '' + ), + array( + 'strong' => array(), + 'span' => array( + 'class' => array(), + ), + ) + ); + ?> +

+
+

+ + Maximize CDN usage by or + . + + objects from the CDN using this tool + + + or + + + . + + + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> + . + Check + + + ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> + + + + array( + 'type' => array(), + 'name' => array(), + 'value' => array(), + ), + ) + ); + ?> + class="button" /> +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
> + checkbox( + 'cdn.uploads.enable', + ! $upload_blogfiles_enabled, + '', + true, + $force_value + ); + ?> + +

+ ', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + if ( ! $upload_blogfiles_enabled ) : + echo wp_kses( + sprintf( + // translators: 1 HTML line break. + __( + '%1$sTo enable that, switch off "Use single network configuration file for all sites" option at General settings page and use specific settings for each blog.', + 'w3-total-cache' + ), + '
' + ), + array( + 'br' => array(), + ) + ); + endif; + ?> +

+
+ /> +
> + checkbox( 'cdn.includes.enable' ); ?> +

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

+
+ +
> + checkbox( 'cdn.theme.enable' ); ?> +

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

+
+ +
> + checkbox( 'cdn.minify.enable', ! $minify_enabled ); ?> +

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

+
+ /> +
> + checkbox( 'cdn.custom.enable' ); ?> +

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

+
+ /> +
+ checkbox( 'cdn.force.rewrite' ); ?> +

+
+ checkbox( 'cdn.canonical_header' ); ?> +

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

+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ checkbox( 'cdn.flush_manually' ); + echo wp_kses( + sprintf( + // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. + __( + 'Only purge %1$sCDN%2$s manually', + 'w3-total-cache' + ), + '', + '' + ), + array( + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +

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

+

+
+ checkbox( 'cdn.reject.ssl' ); ?> +

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

+
+ checkbox( 'cdn.admin.media_library' ); ?> +

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

+
+ checkbox( 'cdn.cors_header' ); ?> Add CORS header +

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

+
+ checkbox( 'cdn.reject.logged_roles' ); ?> +

+ +
+ _config->get_array( 'cdn.reject.roles' ); ?> +
+ $role_data ) : ?> + id="role_" /> + + +
+
+ +

+ ', + '', + '', + '' + ), + array( + 'a' => array( + 'href' => array(), + ), + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +

+
+ checkbox( 'minify.upload', $this->_config->get_boolean( 'minify.auto' ) ); ?> +

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

+
+ _config->get_string( 'cdn.engine' ) ) { + $disabled = true; + $force_value = false; + } + + $this->checkbox( + 'cdn.autoupload.enabled', + $disabled, + '', + true, + $force_value + ); + ?> + +

+
+ + value="_config->get_integer( 'cdn.autoupload.interval' ) ); ?>" size="8" /> +

+
+ + name="cdn__queue__interval" value="_config->get_integer( 'cdn.queue.interval' ) ); ?>" size="10" /> +

+
+ + name="cdn__queue__limit" value="_config->get_integer( 'cdn.queue.limit' ) ); ?>" size="10" /> +

+
+ + name="cdn__includes__files" value="_config->get_string( 'cdn.includes.files' ) ); ?>" size="100" /> +

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

+
+ + value="_config->get_string( 'cdn.theme.files' ) ); ?>" size="100" /> +

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

+
+ + value="_config->get_string( 'cdn.import.files' ) ); ?>" size="100" /> +

+
+ +

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

+
+ +

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

+
+ +

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

+
+ + + +

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

+
+ + + + + + + + + +
+
    +
  • +
  • + ', + '', + '', + '', + '', + '' + ), + array( + 'a' => array( + 'href' => array(), + ), + 'acronym' => array( + 'title' => array(), + ), + ) + ); + ?> +
  • +
+
+ +
+
+ diff --git a/wp-content/plugins/w3-total-cache/inc/options/cdn/akamai.php b/wp-content/plugins/w3-total-cache/inc/options/cdn/akamai.php new file mode 100644 index 00000000..0f98972c --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/options/cdn/akamai.php @@ -0,0 +1,138 @@ + + + + + name="cdn__akamai__username" value="_config->get_string( 'cdn.akamai.username' ) ); ?>" size="60" /> + + + + + + type="password" name="cdn__akamai__password" value="_config->get_string( 'cdn.akamai.password' ) ); ?>" size="60" /> + + + + + + +

+ + + + + + + + + + + + + + + + + + + + +

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

+ + + + + + _config->get_array( 'cdn.akamai.domain' ); + require W3TC_INC_DIR . '/options/cdn/common/cnames.php'; + ?> +

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

+ + + + + + + diff --git a/wp-content/plugins/w3-total-cache/inc/options/cdn/att.php b/wp-content/plugins/w3-total-cache/inc/options/cdn/att.php new file mode 100644 index 00000000..8ab59997 --- /dev/null +++ b/wp-content/plugins/w3-total-cache/inc/options/cdn/att.php @@ -0,0 +1,112 @@ + + + + + name="cdn__att__account" value="_config->get_string( 'cdn.att.account' ) ); ?>" size="60" /> + + + +