Tagged: , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #279791

    Hi there!
    How do I set it in a way that anyone below administrator rank is not able to use the drag and drop features (Avia features disabled) yet they are able to do the normal theme way to editing pages/posts?
    Regards and cheers!
    Kayzel

    #279854

    Hey!

    Try adding this at the very end of your theme functions.php file:

    function disable_alb_for_non_admin_users() {
     	if ( !current_user_can( 'manage_options' ) ) { ?> <style>#avia-builder-button{ display: none; } </style>  <?php }
    }
    add_filter('admin_head', 'disable_alb_for_non_admin_users');
    

    Cheers!
    Josue

    #279926

    Hi it didn’t worked uh! Editor rank are still able to utilize the functions!
    Regards,
    Kayzel

    #279927

    Hi it didn’t worked uh! Editor rank are still able to utilize the functions!
    Regards,
    Kayzel

    #279948

    Hi!

    You can use this code:

    
    add_action('admin_enqueue_scripts', 'avia_deactivate_builder', 10);
    
    function avia_deactivate_builder()
    {
    	$is_post_edit_page = in_array(basename($_SERVER['PHP_SELF']), array('post.php', 'page.php', 'page-new.php', 'post-new.php'));
    	if($is_post_edit_page && !current_user_can('manage_options'))
    	{
    		if(!current_user_can('manage_options'))
    		{
    			echo "<style>#avia-builder-button{display: none !important;}</style>";
    		}
    	}
    }
    
    

    to hide the “Advanced Editor” for non-administrators on pages where no advanced layout is used. Note that you can’t disable the builder on pages which use an advanced layout because you can’t mix the content of the “standard” editor with “advanced layout” templates and the editor would just break the page with the “standard editor”. If you want to avoid that your editors/contributes can use the builder on pages which already use advanced layouts you must block the access to these pages completely. Tbh I’m not sure how this can be done but I guess this plugin: https://wordpress.org/plugins/advanced-access-manager/ may help you.

    Best regards,
    Peter

    #279977

    Ah I tried that code on a editor rank but it didn’t work. I guess cause im all using advanced editor! I used advanced access manager, it did cleared most of them off. But is there any other possible methods or workabout methods to disallow ranks below admin from having avia controls? :)
    Thanks a lot!

    #280127

    I don’t think there is a easy way to do that to be honest. The best thing you can do is restrict access to the Pages that use ALB.

    Regards,
    Josue

    #280163

    What about setting selected pages restricted from rank editor and below?
    Cheers!!

    #280190

    Hey!

    You can suggest this feature here: https://kriesi.at/support/enfold-feature-requests/ and if a lot of other users vote for it we’ll look into it.

    Regards,
    Peter

    #281762
    This reply has been marked as private.
    #281790

    Hello!

    It is possible but it would require a heavy customization to the theme, unfortunately that’s beyond the scope of the support we can offer. If you really need it try contacting a developer.

    Cheers!
    Josue

    #281964
    This reply has been marked as private.
    #282000

    Hey!

    You could try something like this function:

    
    add_action('admin_enqueue_scripts', 'avia_deactivate_builder', 10);
    
    function avia_deactivate_builder()
    {
    	$is_post_edit_page = in_array(basename($_SERVER['PHP_SELF']), array('post.php', 'page.php', 'page-new.php', 'post-new.php'));
    	if($is_post_edit_page && !current_user_can('manage_options'))
    	{
    		if(!current_user_can('manage_options'))
    		{
    			echo "<style>#avia_builder > .inside > .avia_meta_box_visual_editor > .shortcode_button_wrap { visibility: hidden; }</style>";
    		}
    	}
    }
    

    But I’m not really sure what effects that may have. The user can still manipulate the layout and access templates etc. If you want further customization of the editor for the non-admins you’ll need to look into a freelance developer from somewhere like Codeable.io .

    Best regards,
    Devin

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.