Make WordPress Core

Ticket #44889: 44889.2.patch

File 44889.2.patch, 1.9 KB (added by mukesh27, 7 years ago)

Updated Patch

  • theme-editor.php

    diff -Naur old/theme-editor.php new/theme-editor.php
    old new  
    319319                                <h1><?php _e( 'Heads up!' ); ?></h1>
    320320                                <p>
    321321                                        <?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&#8217;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&#8217;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&#8217;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&#8217;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&#8217;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                                        }
    327331                                        ?>
    328332                                </p>
    329333                                <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>
     
    339343<?php
    340344endif; // editor warning notice
    341345
    342 include(ABSPATH . 'wp-admin/admin-footer.php' );
     346include(ABSPATH . 'wp-admin/admin-footer.php' );
     347 No newline at end of file