Zac*_*ing 4 php regex wordpress woocommerce genesis
任何包含页面类型帖子、订单类型帖子或帖子的页面都会显示此错误。这仅在托管环境中可见。我无法在本地复制错误
我已按此顺序执行了以下操作:
来自类-wp.php:
foreach ( (array) $rewrite as $match => $query ) {
// If the requested file is the anchor of the match, prepend it to the path info.
if ( ! empty( $requested_file ) && strpos( $match, $requested_file ) === 0 && $requested_file != $requested_path ) {
$request_match = $requested_file . '/' . $requested_path;
}
if ( preg_match( "#^$match#", $request_match, $matches ) ||
preg_match( "#^$match#", urldecode( $request_match ), $matches ) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
// This is a verbose page match, let's check to be sure about it.
$page = get_page_by_path( $matches[ $varmatch[1] ] );
if ( ! $page ) {
continue;
}
$post_status_obj = get_post_status_object( $page->post_status );
if ( ! $post_status_obj->public && ! $post_status_obj->protected
&& ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
continue;
}
}
// Got a match.
$this->matched_rule = $match;
break;
}
}
Run Code Online (Sandbox Code Playgroud)
我在互联网上搜索了这方面的答案,但一无所获。请 WordPress 迷们发言。
谢谢大家的帮助。这最终与一个名为“事件日历”的插件发生冲突。如果您创建名为“事件”的页面,并将事件日历默认页面“事件”更改为其他内容,则会发生此错误。由于它是第三方应用程序,我只是要寻找其他东西来满足我的需求。通过从插件目录中完全删除该文件夹,错误将被清除。
| 归档时间: |
|
| 查看次数: |
19979 次 |
| 最近记录: |