equal
deleted
inserted
replaced
15 * @since 4.6.0 |
15 * @since 4.6.0 |
16 * |
16 * |
17 * @see Automatic_Upgrader_Skin |
17 * @see Automatic_Upgrader_Skin |
18 */ |
18 */ |
19 class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { |
19 class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { |
|
20 |
|
21 /** |
|
22 * Plugin info. |
|
23 * |
|
24 * The Plugin_Upgrader::bulk_upgrade() method will fill this in |
|
25 * with info retrieved from the get_plugin_data() function. |
|
26 * |
|
27 * @var array Plugin data. Values will be empty if not supplied by the plugin. |
|
28 */ |
|
29 public $plugin_info = array(); |
|
30 |
|
31 /** |
|
32 * Theme info. |
|
33 * |
|
34 * The Theme_Upgrader::bulk_upgrade() method will fill this in |
|
35 * with info retrieved from the Theme_Upgrader::theme_info() method, |
|
36 * which in turn calls the wp_get_theme() function. |
|
37 * |
|
38 * @var WP_Theme|false The theme's info object, or false. |
|
39 */ |
|
40 public $theme_info = false; |
20 |
41 |
21 /** |
42 /** |
22 * Holds the WP_Error object. |
43 * Holds the WP_Error object. |
23 * |
44 * |
24 * @since 4.6.0 |
45 * @since 4.6.0 |
95 $string = $errors; |
116 $string = $errors; |
96 if ( ! empty( $this->upgrader->strings[ $string ] ) ) { |
117 if ( ! empty( $this->upgrader->strings[ $string ] ) ) { |
97 $string = $this->upgrader->strings[ $string ]; |
118 $string = $this->upgrader->strings[ $string ]; |
98 } |
119 } |
99 |
120 |
100 if ( false !== strpos( $string, '%' ) ) { |
121 if ( str_contains( $string, '%' ) ) { |
101 if ( ! empty( $args ) ) { |
122 if ( ! empty( $args ) ) { |
102 $string = vsprintf( $string, $args ); |
123 $string = vsprintf( $string, $args ); |
103 } |
124 } |
104 } |
125 } |
105 |
126 |