'description' => __("This provide a method to remove the Style file version number which is being append at the end of every style tag. Generally this is intended to be a plain information upon the style code version, however not being used within any functionality or code run.", 'wp-hide-security-enhancer') . "

" . __("Keeping version number for styles provide additional information to hackers which try to identify specific code and version which know as being vulnerable.", 'wp-hide-security-enhancer'), 'option_documentation_url' => 'https://wp-hide.com/documentation/general-html-styles/' ), 'options' => array( 'no' => __('No', 'wp-hide-security-enhancer'), 'yes' => __('Yes', 'wp-hide-security-enhancer'), ), ) ); break; case 'styles_remove_id_attribute' : $component_setting = array_merge ( $component_setting , array( 'label' => __('Remove ID from link tags', 'wp-hide-security-enhancer'), 'description' => __('Remove ID attribute from all link tags which include a stylesheet.', 'wp-hide-security-enhancer'), 'help' => array( 'title' => __('Help', 'wp-hide-security-enhancer') . ' - ' . __('Remove ID from link tags', 'wp-hide-security-enhancer'), 'description' => __("This provide a method to remove the Style file ID attribute which generally has no usage.", 'wp-hide-security-enhancer'), 'option_documentation_url' => 'https://wp-hide.com/documentation/general-html-styles/' ), 'options' => array( 'no' => __('No', 'wp-hide-security-enhancer'), 'yes' => __('Yes', 'wp-hide-security-enhancer'), ), ) ); break; } $component_settings[ $component_key ] = $component_setting; } return $component_settings; } function _init_styles_remove_version($saved_field_data) { if(empty($saved_field_data) || $saved_field_data == 'no') return FALSE; if( defined('WP_ADMIN') && ( !defined('DOING_AJAX') || ( defined('DOING_AJAX') && DOING_AJAX === FALSE )) && ! apply_filters('wph/components/force_run_on_admin', FALSE, 'styles_remove_version' ) ) return FALSE; add_filter( 'style_loader_src', array(&$this, 'remove_file_version'), 999 ); } function remove_file_version($src) { if( empty($src) ) return $src; $parse_url = parse_url( $src ); if(empty($parse_url['query'])) return $src; parse_str( $parse_url['query'], $query ); if(!isset( $query['ver'] )) return $src; unset($query['ver']); $parse_url['query'] = http_build_query( $query ); if(empty($parse_url['query'])) unset( $parse_url['query'] ); $url = $this->wph->functions->build_parsed_url( $parse_url ); return $url; } function _init_styles_remove_id_attribute($saved_field_data) { if(empty($saved_field_data) || $saved_field_data == 'no') return FALSE; if( defined('WP_ADMIN') && ( !defined('DOING_AJAX') || ( defined('DOING_AJAX') && DOING_AJAX === FALSE )) && ! apply_filters('wph/components/force_run_on_admin', FALSE, 'styles_remove_id_attribute' ) ) return FALSE; add_filter( 'wp-hide/ob_start_callback', array(&$this, 'ob_start_callback_remove_id')); } /** * Replace all ID's attribute for link tags * * @param mixed $buffer */ function ob_start_callback_remove_id( $buffer ) { $result = preg_match_all('/(]+)rel=("|\')stylesheet("|\')([^>]+)?\/?>)/im', $buffer, $founds); if(!isset($founds[0]) || count($founds[0]) < 1) return $buffer; if(count($founds[0]) > 0) { foreach ($founds[0] as $found) { if(empty($found)) continue; $found_replacement = preg_replace( '/(id=("|\')(.*?)("|\') )/i', "", $found ); $buffer = str_replace($found, $found_replacement, $buffer); } } return $buffer; } } ?>
Fatal error: Uncaught Error: Class "WPH_module_general_styles" not found in /htdocs/wp-content/plugins/wp-hide-security-enhancer/modules/module-general.php:34 Stack trace: #0 /htdocs/wp-content/plugins/wp-hide-security-enhancer/include/module.class.php(23): WPH_module_general->load_components() #1 /htdocs/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(229): WPH_module->__construct() #2 /htdocs/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(86): WPH->_load_modules() #3 /htdocs/wp-content/mu-plugins/wp-hide-loader.php(36): WPH->init() #4 /htdocs/wp-settings.php(456): include_once('/htdocs/wp-cont...') #5 /htdocs/wp-config.php(97): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-content/plugins/wp-hide-security-enhancer/modules/module-general.php on line 34