wp_edit_theme_plugin_file


wp_edit_theme_plugin_file ( $args )

Parameters:
  • (string[]) $args { Args. Note that all of the arg values are already unslashed. They are, however, coming straight from `$_POST` and are not validated or sanitized in any way.
Returns:
  • (true|WP_Error) True on success or `WP_Error` on failure.
Defined at:

Description

Attempt to edit a file for a theme or plugin.

When editing a PHP file, loopback requests will be made to the admin and the homepage to attempt to see if there is a fatal error introduced. If so, the PHP change will be reverted.

Related Functions

wp_ajax_edit_theme_plugin_file, wp_make_plugin_file_tree, get_plugin_files, wp_print_plugin_file_tree, wp_get_mu_plugins

Top Google Results

User discussions

wpseek mobile