Edit File by line
/home/barbar84/www/wp-admin
File: theme-editor.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Theme editor administration panel.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/** WordPress Administration Bootstrap */
[8] Fix | Delete
require_once __DIR__ . '/admin.php';
[9] Fix | Delete
[10] Fix | Delete
if ( is_multisite() && ! is_network_admin() ) {
[11] Fix | Delete
wp_redirect( network_admin_url( 'theme-editor.php' ) );
[12] Fix | Delete
exit;
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
if ( ! current_user_can( 'edit_themes' ) ) {
[16] Fix | Delete
wp_die( '<p>' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '</p>' );
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
$title = __( 'Edit Themes' );
[20] Fix | Delete
$parent_file = 'themes.php';
[21] Fix | Delete
[22] Fix | Delete
get_current_screen()->add_help_tab(
[23] Fix | Delete
array(
[24] Fix | Delete
'id' => 'overview',
[25] Fix | Delete
'title' => __( 'Overview' ),
[26] Fix | Delete
'content' =>
[27] Fix | Delete
'<p>' . __( 'You can use the theme editor to edit the individual CSS and PHP files which make up your theme.' ) . '</p>' .
[28] Fix | Delete
'<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>' .
[29] Fix | Delete
'<p>' . __( 'For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '</p>' .
[30] Fix | Delete
'<p id="editor-keyboard-trap-help-1">' . __( 'When using a keyboard to navigate:' ) . '</p>' .
[31] Fix | Delete
'<ul>' .
[32] Fix | Delete
'<li id="editor-keyboard-trap-help-2">' . __( 'In the editing area, the Tab key enters a tab character.' ) . '</li>' .
[33] Fix | Delete
'<li id="editor-keyboard-trap-help-3">' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '</li>' .
[34] Fix | Delete
'<li id="editor-keyboard-trap-help-4">' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '</li>' .
[35] Fix | Delete
'</ul>' .
[36] Fix | Delete
'<p>' . __( 'After typing in your edits, click Update File.' ) . '</p>' .
[37] Fix | Delete
'<p>' . __( '<strong>Advice:</strong> Think very carefully about your site crashing if you are live-editing the theme currently in use.' ) . '</p>' .
[38] Fix | Delete
'<p>' . sprintf(
[39] Fix | Delete
/* translators: %s: Link to documentation on child themes. */
[40] Fix | Delete
__( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s">child theme</a> instead.' ),
[41] Fix | Delete
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' )
[42] Fix | Delete
) . '</p>' .
[43] Fix | Delete
( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ),
[44] Fix | Delete
)
[45] Fix | Delete
);
[46] Fix | Delete
[47] Fix | Delete
get_current_screen()->set_help_sidebar(
[48] Fix | Delete
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
[49] Fix | Delete
'<p>' . __( '<a href="https://developer.wordpress.org/themes/">Documentation on Theme Development</a>' ) . '</p>' .
[50] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/article/using-themes/">Documentation on Using Themes</a>' ) . '</p>' .
[51] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/article/editing-files/">Documentation on Editing Files</a>' ) . '</p>' .
[52] Fix | Delete
'<p>' . __( '<a href="https://developer.wordpress.org/themes/basics/template-tags/">Documentation on Template Tags</a>' ) . '</p>' .
[53] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
[54] Fix | Delete
);
[55] Fix | Delete
[56] Fix | Delete
wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) );
[57] Fix | Delete
[58] Fix | Delete
if ( $theme ) {
[59] Fix | Delete
$stylesheet = $theme;
[60] Fix | Delete
} else {
[61] Fix | Delete
$stylesheet = get_stylesheet();
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
$theme = wp_get_theme( $stylesheet );
[65] Fix | Delete
[66] Fix | Delete
if ( ! $theme->exists() ) {
[67] Fix | Delete
wp_die( __( 'The requested theme does not exist.' ) );
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) {
[71] Fix | Delete
wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() );
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
$allowed_files = array();
[75] Fix | Delete
$style_files = array();
[76] Fix | Delete
[77] Fix | Delete
$file_types = wp_get_theme_file_editable_extensions( $theme );
[78] Fix | Delete
[79] Fix | Delete
foreach ( $file_types as $type ) {
[80] Fix | Delete
switch ( $type ) {
[81] Fix | Delete
case 'php':
[82] Fix | Delete
$allowed_files += $theme->get_files( 'php', -1 );
[83] Fix | Delete
break;
[84] Fix | Delete
case 'css':
[85] Fix | Delete
$style_files = $theme->get_files( 'css', -1 );
[86] Fix | Delete
$allowed_files['style.css'] = $style_files['style.css'];
[87] Fix | Delete
$allowed_files += $style_files;
[88] Fix | Delete
break;
[89] Fix | Delete
default:
[90] Fix | Delete
$allowed_files += $theme->get_files( $type, -1 );
[91] Fix | Delete
break;
[92] Fix | Delete
}
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
// Move functions.php and style.css to the top.
[96] Fix | Delete
if ( isset( $allowed_files['functions.php'] ) ) {
[97] Fix | Delete
$allowed_files = array( 'functions.php' => $allowed_files['functions.php'] ) + $allowed_files;
[98] Fix | Delete
}
[99] Fix | Delete
if ( isset( $allowed_files['style.css'] ) ) {
[100] Fix | Delete
$allowed_files = array( 'style.css' => $allowed_files['style.css'] ) + $allowed_files;
[101] Fix | Delete
}
[102] Fix | Delete
[103] Fix | Delete
if ( empty( $file ) ) {
[104] Fix | Delete
$relative_file = 'style.css';
[105] Fix | Delete
$file = $allowed_files['style.css'];
[106] Fix | Delete
} else {
[107] Fix | Delete
$relative_file = wp_unslash( $file );
[108] Fix | Delete
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
validate_file_to_edit( $file, $allowed_files );
[112] Fix | Delete
[113] Fix | Delete
// Handle fallback editing of file when JavaScript is not available.
[114] Fix | Delete
$edit_error = null;
[115] Fix | Delete
$posted_content = null;
[116] Fix | Delete
[117] Fix | Delete
if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
[118] Fix | Delete
$r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) );
[119] Fix | Delete
if ( is_wp_error( $r ) ) {
[120] Fix | Delete
$edit_error = $r;
[121] Fix | Delete
if ( check_ajax_referer( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce', false ) && isset( $_POST['newcontent'] ) ) {
[122] Fix | Delete
$posted_content = wp_unslash( $_POST['newcontent'] );
[123] Fix | Delete
}
[124] Fix | Delete
} else {
[125] Fix | Delete
wp_redirect(
[126] Fix | Delete
add_query_arg(
[127] Fix | Delete
array(
[128] Fix | Delete
'a' => 1, // This means "success" for some reason.
[129] Fix | Delete
'theme' => $stylesheet,
[130] Fix | Delete
'file' => $relative_file,
[131] Fix | Delete
),
[132] Fix | Delete
admin_url( 'theme-editor.php' )
[133] Fix | Delete
)
[134] Fix | Delete
);
[135] Fix | Delete
exit;
[136] Fix | Delete
}
[137] Fix | Delete
}
[138] Fix | Delete
[139] Fix | Delete
$settings = array(
[140] Fix | Delete
'codeEditor' => wp_enqueue_code_editor( compact( 'file' ) ),
[141] Fix | Delete
);
[142] Fix | Delete
wp_enqueue_script( 'wp-theme-plugin-editor' );
[143] Fix | Delete
wp_add_inline_script( 'wp-theme-plugin-editor', sprintf( 'jQuery( function( $ ) { wp.themePluginEditor.init( $( "#template" ), %s ); } )', wp_json_encode( $settings ) ) );
[144] Fix | Delete
wp_add_inline_script( 'wp-theme-plugin-editor', 'wp.themePluginEditor.themeOrPlugin = "theme";' );
[145] Fix | Delete
[146] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-header.php';
[147] Fix | Delete
[148] Fix | Delete
update_recently_edited( $file );
[149] Fix | Delete
[150] Fix | Delete
if ( ! is_file( $file ) ) {
[151] Fix | Delete
$error = true;
[152] Fix | Delete
}
[153] Fix | Delete
[154] Fix | Delete
$content = '';
[155] Fix | Delete
if ( ! empty( $posted_content ) ) {
[156] Fix | Delete
$content = $posted_content;
[157] Fix | Delete
} elseif ( ! $error && filesize( $file ) > 0 ) {
[158] Fix | Delete
$f = fopen( $file, 'r' );
[159] Fix | Delete
$content = fread( $f, filesize( $file ) );
[160] Fix | Delete
[161] Fix | Delete
if ( '.php' === substr( $file, strrpos( $file, '.' ) ) ) {
[162] Fix | Delete
$functions = wp_doc_link_parse( $content );
[163] Fix | Delete
[164] Fix | Delete
$docs_select = '<select name="docs-list" id="docs-list">';
[165] Fix | Delete
$docs_select .= '<option value="">' . esc_attr__( 'Function Name&hellip;' ) . '</option>';
[166] Fix | Delete
foreach ( $functions as $function ) {
[167] Fix | Delete
$docs_select .= '<option value="' . esc_attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
[168] Fix | Delete
}
[169] Fix | Delete
$docs_select .= '</select>';
[170] Fix | Delete
}
[171] Fix | Delete
[172] Fix | Delete
$content = esc_textarea( $content );
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
$file_description = get_file_description( $relative_file );
[176] Fix | Delete
$file_show = array_search( $file, array_filter( $allowed_files ), true );
[177] Fix | Delete
$description = esc_html( $file_description );
[178] Fix | Delete
if ( $file_description !== $file_show ) {
[179] Fix | Delete
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
[180] Fix | Delete
}
[181] Fix | Delete
?>
[182] Fix | Delete
<div class="wrap">
[183] Fix | Delete
<h1><?php echo esc_html( $title ); ?></h1>
[184] Fix | Delete
[185] Fix | Delete
<?php if ( isset( $_GET['a'] ) ) : ?>
[186] Fix | Delete
<div id="message" class="updated notice is-dismissible">
[187] Fix | Delete
<p><?php _e( 'File edited successfully.' ); ?></p>
[188] Fix | Delete
</div>
[189] Fix | Delete
<?php elseif ( is_wp_error( $edit_error ) ) : ?>
[190] Fix | Delete
<div id="message" class="notice notice-error">
[191] Fix | Delete
<p><?php _e( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ); ?></p>
[192] Fix | Delete
<pre><?php echo esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); ?></pre>
[193] Fix | Delete
</div>
[194] Fix | Delete
<?php endif; ?>
[195] Fix | Delete
[196] Fix | Delete
<?php if ( preg_match( '/\.css$/', $file ) ) : ?>
[197] Fix | Delete
<div id="message" class="notice-info notice">
[198] Fix | Delete
<p><strong><?php _e( 'Did you know?' ); ?></strong></p>
[199] Fix | Delete
<p>
[200] Fix | Delete
<?php
[201] Fix | Delete
printf(
[202] Fix | Delete
/* translators: %s: Link to Custom CSS section in the Customizer. */
[203] Fix | Delete
__( 'There&#8217;s no need to change your CSS here &mdash; you can edit and live preview CSS changes in the <a href="%s">built-in CSS editor</a>.' ),
[204] Fix | Delete
esc_url( add_query_arg( 'autofocus[section]', 'custom_css', admin_url( 'customize.php' ) ) )
[205] Fix | Delete
);
[206] Fix | Delete
?>
[207] Fix | Delete
</p>
[208] Fix | Delete
</div>
[209] Fix | Delete
<?php endif; ?>
[210] Fix | Delete
[211] Fix | Delete
<div class="fileedit-sub">
[212] Fix | Delete
<div class="alignleft">
[213] Fix | Delete
<h2>
[214] Fix | Delete
<?php
[215] Fix | Delete
echo $theme->display( 'Name' );
[216] Fix | Delete
if ( $description ) {
[217] Fix | Delete
echo ': ' . $description;}
[218] Fix | Delete
?>
[219] Fix | Delete
</h2>
[220] Fix | Delete
</div>
[221] Fix | Delete
<div class="alignright">
[222] Fix | Delete
<form action="theme-editor.php" method="get">
[223] Fix | Delete
<label for="theme" id="theme-plugin-editor-selector"><?php _e( 'Select theme to edit:' ); ?> </label>
[224] Fix | Delete
<select name="theme" id="theme">
[225] Fix | Delete
<?php
[226] Fix | Delete
foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) {
[227] Fix | Delete
if ( $a_theme->errors() && 'theme_no_stylesheet' === $a_theme->errors()->get_error_code() ) {
[228] Fix | Delete
continue;
[229] Fix | Delete
}
[230] Fix | Delete
[231] Fix | Delete
$selected = ( $a_stylesheet === $stylesheet ) ? ' selected="selected"' : '';
[232] Fix | Delete
echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display( 'Name' ) . '</option>';
[233] Fix | Delete
}
[234] Fix | Delete
?>
[235] Fix | Delete
</select>
[236] Fix | Delete
<?php submit_button( __( 'Select' ), '', 'Submit', false ); ?>
[237] Fix | Delete
</form>
[238] Fix | Delete
</div>
[239] Fix | Delete
<br class="clear" />
[240] Fix | Delete
</div>
[241] Fix | Delete
[242] Fix | Delete
<?php
[243] Fix | Delete
if ( $theme->errors() ) {
[244] Fix | Delete
echo '<div class="error"><p><strong>' . __( 'This theme is broken.' ) . '</strong> ' . $theme->errors()->get_error_message() . '</p></div>';
[245] Fix | Delete
}
[246] Fix | Delete
?>
[247] Fix | Delete
[248] Fix | Delete
<div id="templateside">
[249] Fix | Delete
<h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2>
[250] Fix | Delete
<ul role="tree" aria-labelledby="theme-files-label">
[251] Fix | Delete
<?php if ( $theme->parent() ) : ?>
[252] Fix | Delete
<li class="howto">
[253] Fix | Delete
<?php
[254] Fix | Delete
printf(
[255] Fix | Delete
/* translators: %s: Link to edit parent theme. */
[256] Fix | Delete
__( 'This child theme inherits templates from a parent theme, %s.' ),
[257] Fix | Delete
sprintf(
[258] Fix | Delete
'<a href="%s">%s</a>',
[259] Fix | Delete
self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
[260] Fix | Delete
$theme->parent()->display( 'Name' )
[261] Fix | Delete
)
[262] Fix | Delete
);
[263] Fix | Delete
?>
[264] Fix | Delete
</li>
[265] Fix | Delete
<?php endif; ?>
[266] Fix | Delete
<li role="treeitem" tabindex="-1" aria-expanded="true" aria-level="1" aria-posinset="1" aria-setsize="1">
[267] Fix | Delete
<ul role="group">
[268] Fix | Delete
<?php wp_print_theme_file_tree( wp_make_theme_file_tree( $allowed_files ) ); ?>
[269] Fix | Delete
</ul>
[270] Fix | Delete
</li>
[271] Fix | Delete
</ul>
[272] Fix | Delete
</div>
[273] Fix | Delete
[274] Fix | Delete
<?php
[275] Fix | Delete
if ( $error ) :
[276] Fix | Delete
echo '<div class="error"><p>' . __( 'File does not exist! Please double check the name and try again.' ) . '</p></div>';
[277] Fix | Delete
else :
[278] Fix | Delete
?>
[279] Fix | Delete
<form name="template" id="template" action="theme-editor.php" method="post">
[280] Fix | Delete
<?php wp_nonce_field( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce' ); ?>
[281] Fix | Delete
<div>
[282] Fix | Delete
<label for="newcontent" id="theme-plugin-editor-label"><?php _e( 'Selected file content:' ); ?></label>
[283] Fix | Delete
<textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo $content; ?></textarea>
[284] Fix | Delete
<input type="hidden" name="action" value="update" />
[285] Fix | Delete
<input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" />
[286] Fix | Delete
<input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" />
[287] Fix | Delete
</div>
[288] Fix | Delete
[289] Fix | Delete
<?php if ( ! empty( $functions ) ) : ?>
[290] Fix | Delete
<div id="documentation" class="hide-if-no-js">
[291] Fix | Delete
<label for="docs-list"><?php _e( 'Documentation:' ); ?></label>
[292] Fix | Delete
<?php echo $docs_select; ?>
[293] Fix | Delete
<input disabled id="docs-lookup" type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" />
[294] Fix | Delete
</div>
[295] Fix | Delete
<?php endif; ?>
[296] Fix | Delete
[297] Fix | Delete
<div>
[298] Fix | Delete
<div class="editor-notices">
[299] Fix | Delete
<?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?>
[300] Fix | Delete
<div class="notice notice-warning inline">
[301] Fix | Delete
<p>
[302] Fix | Delete
<?php if ( is_writable( $file ) ) : ?>
[303] Fix | Delete
<strong><?php _e( 'Caution:' ); ?></strong>
[304] Fix | Delete
<?php endif; ?>
[305] Fix | Delete
<?php _e( 'This is a file in your current parent theme.' ); ?>
[306] Fix | Delete
</p>
[307] Fix | Delete
</div>
[308] Fix | Delete
<?php endif; ?>
[309] Fix | Delete
</div>
[310] Fix | Delete
<?php if ( is_writable( $file ) ) : ?>
[311] Fix | Delete
<p class="submit">
[312] Fix | Delete
<?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?>
[313] Fix | Delete
<span class="spinner"></span>
[314] Fix | Delete
</p>
[315] Fix | Delete
<?php else : ?>
[316] Fix | Delete
<p>
[317] Fix | Delete
<?php
[318] Fix | Delete
printf(
[319] Fix | Delete
/* translators: %s: Documentation URL. */
[320] Fix | Delete
__( 'You need to make this file writable before you can save your changes. See <a href="%s">Changing File Permissions</a> for more information.' ),
[321] Fix | Delete
__( 'https://wordpress.org/support/article/changing-file-permissions/' )
[322] Fix | Delete
);
[323] Fix | Delete
?>
[324] Fix | Delete
</p>
[325] Fix | Delete
<?php endif; ?>
[326] Fix | Delete
</div>
[327] Fix | Delete
[328] Fix | Delete
<?php wp_print_file_editor_templates(); ?>
[329] Fix | Delete
</form>
[330] Fix | Delete
<?php
[331] Fix | Delete
endif; // End if $error.
[332] Fix | Delete
?>
[333] Fix | Delete
<br class="clear" />
[334] Fix | Delete
</div>
[335] Fix | Delete
<?php
[336] Fix | Delete
$dismissed_pointers = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
[337] Fix | Delete
if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
[338] Fix | Delete
// Get a back URL.
[339] Fix | Delete
$referer = wp_get_referer();
[340] Fix | Delete
[341] Fix | Delete
$excluded_referer_basenames = array( 'theme-editor.php', 'wp-login.php' );
[342] Fix | Delete
[343] Fix | Delete
if ( $referer && ! in_array( basename( parse_url( $referer, PHP_URL_PATH ) ), $excluded_referer_basenames, true ) ) {
[344] Fix | Delete
$return_url = $referer;
[345] Fix | Delete
} else {
[346] Fix | Delete
$return_url = admin_url( '/' );
[347] Fix | Delete
}
[348] Fix | Delete
?>
[349] Fix | Delete
<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden">
[350] Fix | Delete
<div class="notification-dialog-background"></div>
[351] Fix | Delete
<div class="notification-dialog">
[352] Fix | Delete
<div class="file-editor-warning-content">
[353] Fix | Delete
<div class="file-editor-warning-message">
[354] Fix | Delete
<h1><?php _e( 'Heads up!' ); ?></h1>
[355] Fix | Delete
<p>
[356] Fix | Delete
<?php
[357] Fix | Delete
_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 your site and your changes may be lost in future updates.' );
[358] Fix | Delete
?>
[359] Fix | Delete
</p>
[360] Fix | Delete
<?php
[361] Fix | Delete
if ( ! $theme->parent() ) {
[362] Fix | Delete
echo '<p>';
[363] Fix | Delete
printf(
[364] Fix | Delete
/* translators: %s: Link to documentation on child themes. */
[365] Fix | Delete
__( '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>.' ),
[366] Fix | Delete
esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) )
[367] Fix | Delete
);
[368] Fix | Delete
echo '</p>';
[369] Fix | Delete
}
[370] Fix | Delete
?>
[371] Fix | Delete
<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>
[372] Fix | Delete
</div>
[373] Fix | Delete
<p>
[374] Fix | Delete
<a class="button file-editor-warning-go-back" href="<?php echo esc_url( $return_url ); ?>"><?php _e( 'Go back' ); ?></a>
[375] Fix | Delete
<button type="button" class="file-editor-warning-dismiss button button-primary"><?php _e( 'I understand' ); ?></button>
[376] Fix | Delete
</p>
[377] Fix | Delete
</div>
[378] Fix | Delete
</div>
[379] Fix | Delete
</div>
[380] Fix | Delete
<?php
[381] Fix | Delete
endif; // Editor warning notice.
[382] Fix | Delete
[383] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-footer.php';
[384] Fix | Delete
[385] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function