- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-automatic-upgrader-skin.php
r41161 r42343 51 51 52 52 /** 53 *54 53 * @return array 55 54 */ … … 59 58 60 59 /** 61 *62 60 * @param string|array|WP_Error $data 63 61 */ … … 70 68 $string = $data; 71 69 } 72 if ( ! empty( $this->upgrader->strings[ $string ] ) ) 70 if ( ! empty( $this->upgrader->strings[ $string ] ) ) { 73 71 $string = $this->upgrader->strings[ $string ]; 72 } 74 73 75 74 if ( strpos( $string, '%' ) !== false ) { 76 75 $args = func_get_args(); 77 76 $args = array_splice( $args, 1 ); 78 if ( ! empty( $args ) ) 77 if ( ! empty( $args ) ) { 79 78 $string = vsprintf( $string, $args ); 79 } 80 80 } 81 81 … … 83 83 84 84 // Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output. 85 $string = wp_kses( $string, array( 86 'a' => array( 87 'href' => true 88 ), 89 'br' => true, 90 'em' => true, 91 'strong' => true, 92 ) ); 85 $string = wp_kses( 86 $string, array( 87 'a' => array( 88 'href' => true, 89 ), 90 'br' => true, 91 'em' => true, 92 'strong' => true, 93 ) 94 ); 93 95 94 if ( empty( $string ) ) 96 if ( empty( $string ) ) { 95 97 return; 98 } 96 99 97 100 $this->messages[] = $string; … … 108 111 public function footer() { 109 112 $output = ob_get_clean(); 110 if ( ! empty( $output ) ) 113 if ( ! empty( $output ) ) { 111 114 $this->feedback( $output ); 115 } 112 116 } 113 117 }
Note: See TracChangeset
for help on using the changeset viewer.