Wordpress 后台无法访问,出现权限错误

-
0
神经 少侠
6月 16, 2022 01:02 上午 1 Answers General
Member Since Nov 2008
Subscribed Subscribe Not subscribe
Flag(0)

if ( !function_exists( 'populate_roles' ) ) {

require_once( ABSPATH . 'wp-admin/includes/schema.php' );

}

 

populate_roles();

1 Subscribers
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
神经 少侠
6月 16, 2022
Flag(0)

自问自答:

这是一个第三方插件权限不统一造成的,在主题function.php 里加入下面代码

1
2
3
4
5
if ( !function_exists( 'populate_roles' ) ) {
  require_once( ABSPATH . 'wp-admin/includes/schema.php' );
}
  
populate_roles();
Sign in to Reply
Replying as Submit