Changeset 41721 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/04/2017 12:19:16 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r41611 r41721 3967 3967 wp_send_json_success( $status ); 3968 3968 } 3969 3970 /** 3971 * Ajax handler for editing a theme or plugin file. 3972 * 3973 * @since 4.9.0 3974 * @see wp_edit_theme_plugin_file() 3975 */ 3976 function wp_ajax_edit_theme_plugin_file() { 3977 $r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); // Validation of args is done in wp_edit_theme_plugin_file(). 3978 if ( is_wp_error( $r ) ) { 3979 wp_send_json_error( array_merge( 3980 array( 3981 'code' => $r->get_error_code(), 3982 'message' => $r->get_error_message(), 3983 ), 3984 (array) $r->get_error_data() 3985 ) ); 3986 } else { 3987 wp_send_json_success( array( 3988 'message' => __( 'File edited successfully.' ), 3989 ) ); 3990 } 3991 }
Note: See TracChangeset
for help on using the changeset viewer.