Index: wp-includes/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/post.php	(revision b0f64a91b3da84f76d10ca3cac9a962f6dae74df)
+++ wp-includes/post.php	(revision )
@@ -4267,12 +4267,23 @@
 
 	$post_types = esc_sql( $post_types );
 	$post_type_in_string = "'" . implode( "','", $post_types ) . "'";
-	$sql = "
+
+	/**
+	 * Filters the SQL Query
+	 *
+	 * @since 4.6.0
+	 *
+	 * @param array $post_types Array of escaped acceptance post type.
+	 * @param array $parts Parts of escaped post names.
+	 * @param string $post_type_in_string Imploded post types for sql query.
+	 * @param string $in_string Imploded parts for sql query.
+	 */
+	$sql = apply_filters( 'wp_page_path_sql', "
 		SELECT ID, post_name, post_parent, post_type
 		FROM $wpdb->posts
 		WHERE post_name IN ($in_string)
 		AND post_type IN ($post_type_in_string)
-	";
+	", $post_types, $parts, $post_type_in_string, $in_string);
 
 	$pages = $wpdb->get_results( $sql, OBJECT_K );
 
