wp-admin/includes/ajax-actions.php:4910Handles editing a theme or plugin file via AJAX.
function wp_ajax_edit_theme_plugin_file() { $edit_result = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); // Validation of args is done in wp_edit_theme_plugin_file(). if ( is_wp_error( $edit_result ) ) { wp_send_json_error( array_merge( array( 'code' => $edit_result->get_error_code(), 'message' => $edit_result->get_error_message(), ), (array) $edit_result->get_error_data() ) ); } else { wp_send_json_success( array( 'message' => __( 'File edited successfully.' ), ) ); }}Introduced in 4.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/ajax-actions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.