[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/cli/ -> wipe-permissions.php (source)

   1  <?php
   2  
   3  class GP_CLI_Wipe_Permissions extends WP_CLI_Command {
   4  
   5  	public function __invoke() {
   6          WP_CLI::confirm( "This will erase all current permissions!\nAre you sure you want to delete them?" );
   7  
   8          if ( ! GP::$permission->delete_all() ) {
   9              WP_CLI::error( __( 'Error in deleting permissions.', 'glotpress' ) );
  10          }
  11  
  12          WP_CLI::success( __( 'Permissions were deleted. Now you can use `wp glotpress add-admin` to add a new administrator.', 'glotpress' ) );
  13      }
  14  }


Generated: Thu Oct 28 01:01:10 2021 Cross-referenced by PHPXref 0.7.1