From c4221d4cb5b59fa8b44477efc8421b3fe1f44728 Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Thu, 5 Mar 2020 18:23:52 +0200 Subject: [PATCH] More wp_slash for starter content - see #17 --- admin/class-pixelgrade_assistant-starter_content.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/class-pixelgrade_assistant-starter_content.php b/admin/class-pixelgrade_assistant-starter_content.php index c98e071..c89e28e 100644 --- a/admin/class-pixelgrade_assistant-starter_content.php +++ b/admin/class-pixelgrade_assistant-starter_content.php @@ -714,12 +714,12 @@ private function import_taxonomy( $demo_key, $base_url, $args ) { foreach ( $response_data['data']['terms'] as $i => $term ) { $term_args = array( - 'description' => $term['description'], + 'description' => wp_slash( $term['description'] ), 'slug' => $term['slug'], ); $new_id = wp_insert_term( - $term['name'], // the term + wp_slash( $term['name'] ), // the term $term['taxonomy'], // the taxonomy $term_args ); @@ -744,9 +744,9 @@ private function import_taxonomy( $demo_key, $base_url, $args ) { $value = $starter_content[ $demo_key ]['media']['ignored'][ $value ]; } - update_term_meta( $new_id['term_id'], $key, $value ); + update_term_meta( $new_id['term_id'], wp_slash( $key ), $value ); } - update_term_meta( $new_id['term_id'], 'imported_with_pixassist', true ); + update_term_meta( $new_id['term_id'], wp_slash( 'imported_with_pixassist' ), true ); } }