PHP code example of freshsystems / wp-permission-manager
1. Go to this page and download the library: Download freshsystems/wp-permission-manager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
freshsystems / wp-permission-manager example snippets
if ( current_user_can( 'capability_name' ) ) echo 'This user can do something';
if ( current_user_can( 'read_pages ' ) ):
if ( members_user_has_role( $user_id, $role ) ) // ...
if ( members_current_user_has_role( $role ) ) // ...