- Timestamp:
- 09/15/2019 10:41:03 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php
r45487 r46125 79 79 * @since 4.6.0 80 80 * 81 * @param string|WP_Error $errors Errors. 81 * @param string|WP_Error $errors Errors. 82 * @param mixed ...$args Optional text replacements. 82 83 */ 83 public function error( $errors ) {84 public function error( $errors, ...$args ) { 84 85 if ( is_string( $errors ) ) { 85 86 $string = $errors; … … 89 90 90 91 if ( false !== strpos( $string, '%' ) ) { 91 $args = func_get_args();92 $args = array_splice( $args, 1 );93 92 if ( ! empty( $args ) ) { 94 93 $string = vsprintf( $string, $args ); … … 105 104 } 106 105 107 $args = func_get_args(); 108 call_user_func_array( array( $this, 'parent::error' ), $args ); 106 parent::error( $errors, ...$args ); 109 107 } 110 108 … … 114 112 * @since 4.6.0 115 113 * 116 * @param string|array|WP_Error $data Log entry data. 114 * @param string|array|WP_Error $data Log entry data. 115 * @param mixed ...$args Optional text replacements. 117 116 */ 118 public function feedback( $data ) {117 public function feedback( $data, ...$args ) { 119 118 if ( is_wp_error( $data ) ) { 120 119 foreach ( $data->get_error_codes() as $error_code ) { … … 123 122 } 124 123 125 $args = func_get_args(); 126 call_user_func_array( array( $this, 'parent::feedback' ), $args ); 124 parent::feedback( $data, ...$args ); 127 125 } 128 126 }
Note: See TracChangeset
for help on using the changeset viewer.