Changeset 45926 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 09/01/2019 05:12:43 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-theme.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r45590 r45926 227 227 $this->headers['Name'] = $this->stylesheet; 228 228 if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet ) ) { 229 $this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), esc_html( $this->stylesheet ) ) ); 229 $this->errors = new WP_Error( 230 'theme_not_found', 231 sprintf( 232 /* translators: %s: theme directory name */ 233 __( 'The theme directory "%s" does not exist.' ), 234 esc_html( $this->stylesheet ) 235 ) 236 ); 230 237 } else { 231 238 $this->errors = new WP_Error( 'theme_no_stylesheet', __( 'Stylesheet is missing.' ) ); … … 272 279 273 280 if ( ! $this->template && $this->stylesheet === $this->headers['Template'] ) { 274 /* translators: %s: Template */ 275 $this->errors = new WP_Error( 'theme_child_invalid', sprintf( __( 'The theme defines itself as its parent theme. Please check the %s header.' ), '<code>Template</code>' ) ); 281 $this->errors = new WP_Error( 282 'theme_child_invalid', 283 sprintf( 284 /* translators: %s: Template */ 285 __( 'The theme defines itself as its parent theme. Please check the %s header.' ), 286 '<code>Template</code>' 287 ) 288 ); 276 289 $this->cache_add( 277 290 'theme', … … 329 342 } else { 330 343 // Parent theme is missing. 331 $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), esc_html( $this->template ) ) ); 344 $this->errors = new WP_Error( 345 'theme_no_parent', 346 sprintf( 347 /* translators: %s: theme directory name */ 348 __( 'The parent theme is missing. Please install the "%s" parent theme.' ), 349 esc_html( $this->template ) 350 ) 351 ); 332 352 $this->cache_add( 333 353 'theme', … … 349 369 if ( $_child instanceof WP_Theme && $_child->template == $this->stylesheet ) { 350 370 $_child->parent = null; 351 $_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $_child->template ) ) ); 371 $_child->errors = new WP_Error( 372 'theme_parent_invalid', 373 sprintf( 374 /* translators: %s: theme directory name */ 375 __( 'The "%s" theme is not a valid parent theme.' ), 376 esc_html( $_child->template ) 377 ) 378 ); 352 379 $_child->cache_add( 353 380 'theme', … … 361 388 // The two themes actually reference each other with the Template header. 362 389 if ( $_child->stylesheet == $this->template ) { 363 $this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $this->template ) ) ); 390 $this->errors = new WP_Error( 391 'theme_parent_invalid', 392 sprintf( 393 /* translators: %s: theme directory name */ 394 __( 'The "%s" theme is not a valid parent theme.' ), 395 esc_html( $this->template ) 396 ) 397 ); 364 398 $this->cache_add( 365 399 'theme',
Note: See TracChangeset
for help on using the changeset viewer.