From 2aeb23516f209ae78f27ad4ff3dee39f3466d1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Valney?= Date: Thu, 12 Apr 2018 11:02:47 -0300 Subject: [PATCH] [Fix] LIKE replace break after 4.8.3 --- index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index c75c13c..2d0db6d 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,6 @@ args = $args; $this->parse_multisite_args(); $this->add_filters(); - $this->query($args); + $this->query( $args ); $this->remove_filters(); - } function parse_multisite_args() { @@ -56,6 +54,9 @@ function create_and_unionize_select_statements( $sql ) { $posts_per_page = isset( $this->args['posts_per_page'] ) ? $this->args['posts_per_page'] : 10; $s = ( isset( $this->args['s'] ) ) ? $this->args['s'] : false; + // Remove Placeholder Escape After 4.8.3 + $sql = $wpdb->remove_placeholder_escape( $sql ); + foreach ($this->sites_to_query as $key => $site_ID) : switch_to_blog( $site_ID ); @@ -73,6 +74,7 @@ function create_and_unionize_select_statements( $sql ) { } $new_sql_selects[] = $new_sql_select; + $new_sql_selects[] = $wpdb->add_placeholder_escape( $new_sql_select ); restore_current_blog(); endforeach;