How to keep the capability of users and disable Gutenberg editor in WordPress?

add these lines in your ‘functions.php’, it will work //if not gutenberg reapprove posts add_filter( ‘wp_insert_post_data’, ‘re_aprove’, ’99’, 2 ); function re_aprove( $data, $postarr ) { //check if current user is not admin if ( ! current_user_can( ‘manage_options’ ) ) { if ( ‘publish’ === $data[‘post_status’] ) { $data[‘post_status’] = ‘pending’; } } return $data; … Read more

WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”

SOLUTION: With some playing around I realized I am definitely an idiot and WAY over-thought things. While I had previously read and tried some of the things in this similar post, I ended up substituting their code for mine and found it actually worked for my use case. In trying to understand why that was, … Read more

Which capabilities are available in Gravity Forms Salesforce plugin? [closed]

Found the capabilities, most are self explanatory. <?php array( ‘vxg_salesforce_read_feeds’ => true, ‘vxg_salesforce_edit_feeds’ => true, ‘vxg_salesforce_read_logs’ => true, ‘vxg_salesforce_export_logs’ => true, ‘vxg_salesforce_read_settings’ => true, ‘vxg_salesforce_edit_settings’ => true, ‘vxg_salesforce_send_to_crm’ => true, ‘vxg_salesforce_read_license’ => true, ‘vxg_salesforce_uninstall’ => true, ); ?>

Use PHP code to create custom user roles. Call it once?

Generally, you would call this code in a plugin activation hook or at the very least, init. The issue you may run into is calling this code too early if it’s outside any specific WordPress hooks which would cause issues. That being said, add_role() calls WP_Roles::add_role() and one of the first things it does is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)