summaryrefslogtreecommitdiff
path: root/www/crm/wp-admin/includes/ajax-actions.php
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2019-10-04 16:03:20 -0300
committerYaco <franco@reevo.org>2019-10-04 16:03:20 -0300
commitac6bedd68a70d744a927494351100e6bfabfe14e (patch)
tree7a9a7967a6244008edbc27055b205d936cb45b02 /www/crm/wp-admin/includes/ajax-actions.php
parentb25b94b8b0aacab5a5a38bb107201c7f92c083ab (diff)
Actualiza WP a 5.2.3
Diffstat (limited to 'www/crm/wp-admin/includes/ajax-actions.php')
-rw-r--r--www/crm/wp-admin/includes/ajax-actions.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/www/crm/wp-admin/includes/ajax-actions.php b/www/crm/wp-admin/includes/ajax-actions.php
index da9acdc7..347afd7b 100644
--- a/www/crm/wp-admin/includes/ajax-actions.php
+++ b/www/crm/wp-admin/includes/ajax-actions.php
@@ -1423,6 +1423,7 @@ function wp_ajax_add_menu_item() {
$menu_obj = get_post( $menu_item_id );
if ( ! empty( $menu_obj->ID ) ) {
$menu_obj = wp_setup_nav_menu_item( $menu_obj );
+ $menu_obj->title = empty( $menu_obj->title ) ? __( 'Menu Item' ) : $menu_obj->title;
$menu_obj->label = $menu_obj->title; // don't show "(pending)" in ajax-added items
$menu_items[] = $menu_obj;
}
@@ -2311,7 +2312,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'Sorry, you are not allowed to upload files.' ),
- 'filename' => $_FILES['async-upload']['name'],
+ 'filename' => esc_html( $_FILES['async-upload']['name'] ),
),
)
);
@@ -2327,7 +2328,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'Sorry, you are not allowed to attach files to this post.' ),
- 'filename' => $_FILES['async-upload']['name'],
+ 'filename' => esc_html( $_FILES['async-upload']['name'] ),
),
)
);
@@ -2353,7 +2354,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'The uploaded file is not a valid image. Please try again.' ),
- 'filename' => $_FILES['async-upload']['name'],
+ 'filename' => esc_html( $_FILES['async-upload']['name'] ),
),
)
);
@@ -2370,7 +2371,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => $attachment_id->get_error_message(),
- 'filename' => $_FILES['async-upload']['name'],
+ 'filename' => esc_html( $_FILES['async-upload']['name'] ),
),
)
);