diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
index 7cd756c4dd..c7b2c01203 100644
--- src/wp-includes/link-template.php
+++ src/wp-includes/link-template.php
@@ -101,6 +101,18 @@ function permalink_anchor( $mode = 'id' ) {
  * @return bool Whether to use a plain permalink structure.
  */
 function wp_force_plain_post_permalink( $post = null, $sample = null ) {
+	/**
+	 * Filters whether to disable forced plain post permalinks.
+	 *
+	 * If disabled, wp_force_plain_post_permalink will always return false.
+	 *
+	 * @since 5.7.1
+	 *
+	 * @param bool $disabled Whether forced plain post parmalinks should be disabled.
+	 */
+	if ( apply_filters( 'forced_plain_post_permalinks_disabled', false ) ) {
+		return false;
+	}
 	if (
 		null === $sample &&
 		is_object( $post ) &&
