Created
May 24, 2020 17:14
-
-
Save luistinygod/1deb557144305b794804e77f0c1a793a to your computer and use it in GitHub Desktop.
WordPress Plugin: Restores all the default roles and caps in the WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recover or Reset the default WordPress user roles and caps | |
* Install it as a WordPress plugin, activate it and deativate. That's it. | |
* | |
* @wordpress-plugin | |
* Plugin Name: tinyGod Recover User Roles | |
* Plugin URI: | |
* Author: luistinygod | |
* Author URI: https://tinygod.pt | |
* Version: 1.0.0 | |
* Description: Recover User Roles | |
* Text Domain: rur | |
* Domain Path: /languages | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
*/ | |
defined( 'ABSPATH' ) || exit; | |
if ( !function_exists( 'populate_roles' ) ) { | |
require_once( ABSPATH . 'wp-admin/includes/schema.php' ); | |
} | |
populate_roles(); |
I am now seeing my usernames in my site when I am trying to select an author for my post
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Olá Luis
We came across the same weird problem in our multisite.
But only a few sites were affected, in
wp_123_options WHERE option_name = "wp_123_user_roles"
remained only two SEO Roles from Yoast. Did you do deeper investigations for the reason of the problem?