diff -Naur old/theme-editor.php new/theme-editor.php
old
|
new
|
|
319 | 319 | <h1><?php _e( 'Heads up!' ); ?></h1> |
320 | 320 | <p> |
321 | 321 | <?php |
322 | | echo sprintf( |
323 | | /* translators: %s: Codex URL */ |
324 | | __( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ), |
325 | | esc_url( __( 'https://codex.wordpress.org/Child_Themes' ) ) |
326 | | ); |
| 322 | if( $theme->parent() ) { |
| 323 | _e( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break.' ); |
| 324 | } else { |
| 325 | echo sprintf( |
| 326 | /* translators: %s: Codex URL */ |
| 327 | __( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ), |
| 328 | esc_url( __( 'https://codex.wordpress.org/Child_Themes' ) ) |
| 329 | ); |
| 330 | } |
327 | 331 | ?> |
328 | 332 | </p> |
329 | 333 | <p><?php _e( 'If you decide to go ahead with direct edits anyway, use a file manager to create a copy with a new name and hang on to the original. That way, you can re-enable a functional version if something goes wrong.' ); ?></p> |
… |
… |
|
340 | 344 | endif; // editor warning notice |
341 | 345 | |
342 | 346 | include(ABSPATH . 'wp-admin/admin-footer.php' ); |
| 347 | |
| 348 | //When we open http://wordpress.com/wp-admin/theme-editor.php page first time system show attached popup message in which it tell us "If you need to tweak more than your theme’s CSS, you might want to try making a child theme." but if we use child theme then also it show same message to create child theme and it create some confusion for any user so we have to hide that child theme creation message when we use child theme. |
| 349 | No newline at end of file |