ValidationUtils.php modified
-
Hi There,
I get on all my webshops a modified ValidationUtils.php
in wp-content/plugins/woocommerce/src/StoreApi/Utilities/ValidationUtils.phpIs this sign of a hack?
this piece of code is added
/** 63 * Runs wp_kses on an array. This function runs wp_kses on strings in the array and recurses into arrays. 64 * 65 * @param array $array The array to run wp_kses on. 66 * @return mixed The array, all string keys will have been run through wp_kses. 67 */ 68 public function pm_wp_kses_array( array $array ) { 69 foreach ( $array as $key => $value ) { 70 if ( empty( $value ) ) { 71 $array[ $key ] = $value; 72 continue; 73 } 74 if ( is_array( $value ) ) { 75 $array[ $key ] = $this->pm_wp_kses_array( $value ); 76 } 77 if ( is_string( $value ) ) { 78 $array[ $key ] = wp_kses( $value, [] ); 79 } 80 } 81 return $array; 82 }
- The topic ‘ValidationUtils.php modified’ is closed to new replies.