Forum Replies Created

Viewing 15 posts - 661 through 675 (of 2,506 total)
  • Author
    Posts
  • in reply to: Remove Item From Top Admin Menu #6178
    Vladimir
    Keymaster

    Hi,

    What plugin adds ‘Templates’ menu? Is it available at wordpress.org/plugins?

    Vladimir
    Keymaster

    Thanks for letting me know that you found a solution.

    in reply to: How to remove ability to modify comments? #6175
    Vladimir
    Keymaster

    Hi,

    Generally, user who can edit posts, automatically can edit comments sent to posts, which user can edit.
    It’s possible to hide/block selected admin menu item using this add-on:
    https://www.role-editor.com/block-admin-menu-items

    in reply to: Enable Edit CSS for Administrators in Multisite #6165
    Vladimir
    Keymaster

    Code belongs to wp-includes/capabilities.php

    in reply to: Enable Edit CSS for Administrators in Multisite #6163
    Vladimir
    Keymaster

    edit_css together with unfiltered_html are not allowed at WordPress core by default for WP multisite.

    
    case 'edit_css':
    case 'unfiltered_html':
    	// Disallow unfiltered_html for all users, even admins and super admins.
    	if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) {
    		$caps[] = 'do_not_allow';
    	} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
    		$caps[] = 'do_not_allow';
    

    Workaround:
    URE Pro should be network enabled.
    Go to “Network Admin -> Settings -> User Role Editor -> Multisite” tab and turn ON ‘Enable “unfiltered_html” capability’ checkbox.

    in reply to: How to hide content via css #6159
    Vladimir
    Keymaster

    Hi Tobias,

    jQuery .css( propertyName, value) method allows to change CSS of selected element on the fly (official documentation page),
    Like this:

    
    jQuery('.html_header_top.html_header_sticky').css('padding-top', 0);
    jQuery('#top').css('padding-top', 0);
    ...
    

    It’s possible to work with clear CSS also:

    
    // Additional options for URE
    
    // Hide parts of front-end page for selected role
    add_filter( 'ure_role_additional_options', 'ure_add_change_front_end_css', 10, 1 );
    
    function ure_add_change_front_end_css( $items ) {
        
        $item = URE_Role_Additional_Options::create_item( 'change_front_end_css', esc_html__('Change Front-end CSS', 'user-role-editor'), 'wp_head', 'ure_change_front_end_css' );
        $items[$item->id] = $item;
        
        return $items;
    }
    
    function ure_change_front_end_css() {
    
    ?>
    <style>
    
    .html_header_top.html_header_sticky #top #wrap_all #main {
        padding-top: 0px !important;
    }
        
        
    </style>
    <?php
    }
    
    in reply to: Redirect visitors to login page #6157
    Vladimir
    Keymaster

    Hi,

    Content view restrictions add-on includes ‘Logged in only” and redirection action for selected posts/pages in case of access error. If redirection URL field is empty, visitor is redirected to login page.

    URE does not have similar option for a whole website. You need install another plugin or custom code for this purpose, like this:

    
    // Redirect users who arent logged in...
    function members_only() {
        global $pagenow;
        // Check to see if user in not logged in and not on the login page
        if( !is_user_logged_in() && $pagenow != 'wp-login.php' )
              auth_redirect();
    }
    add_action( 'wp', 'members_only' ); 
    

    Code sample was taken here.

    in reply to: How to hide content via css #6156
    Vladimir
    Keymaster

    You may use URE Pro additional options using code below as a starting point:

    
    // Additional options for URE
    
    // Hide parts of front-end page for selected role
    add_filter( 'ure_role_additional_options', 'ure_add_change_front_end_css', 10, 1 );
    
    function ure_add_change_front_end_css( $items ) {
        
        $item = URE_Role_Additional_Options::create_item( 'change_front_end_css', esc_html__('Change Front-end CSS', 'user-role-editor'), 'init', 'change_front_end_css_init' );
        $items[$item->id] = $item;
        
        return $items;
    }
    
    function change_front_end_css_init() {
    
        wp_enqueue_script( 'jquery' );
    
        add_action( 'wp_footer', 'ure_change_front_end_css' );
    }
    
    function ure_change_front_end_css() {
    
    ?>
    <script type="text/javascript">
        
        jQuery(document).ready(function() {
            // jQuery('#header').hide();
            jQuery('.header-inner').hide();
        });
        
    </script>
    
    <?php
    }
    
    in reply to: How to hide content via css #6153
    Vladimir
    Keymaster

    Hi Tobias,

    Clarify, where do you wish to change CSS for role: at wp-admin or at the front-end?

    Vladimir
    Keymaster

    Currently, the only way is to network deactivate User Role Editor Pro and activate it for selected sites separately. Then you will have separate “Settings->User Role Editor” menu for every site and separate set of URE Pro configuration options.

    May be I will add with one of the future updates a custom filter which allow to change option value via code.

    in reply to: editor duplicated role can’t hide WP Bakery #6148
    Vladimir
    Keymaster

    Hi Clara,

    My test made for ‘editor’ role showed that “WPBakery Page Builder’ menu is hidden successfully.
    What version of WPBakery PB do you use?
    Does test user have a single role?

    Vladimir
    Keymaster

    Hi Yaniv,

    I don’t see any special permissions requirement for access to revisions except one that user should can edit original page/post.
    Check if your version of ‘wpseo_editor’ role contains the same list of user capabilities under the “Pages” group as ‘wpseo_manager’ does. Just in case something was be revoked.

    Vladimir
    Keymaster

    Hi,

    wp_seo_editor role like wp_seo_manager role is built on the top of the ‘editor’ role. Both roles like ‘editor’ role can work with page revisions.
    What option/function do you wish to remove from wp_seo_editor role?

    Vladimir
    Keymaster

    Send site URL and admin credentials to support [at-sign] role-editor.com,
    describe what CPT (menu items) you wish to make visible for your users. I will look if it’s possible to solve your task using URE Pro.

    Vladimir
    Keymaster

    It depends from how custom post type (CPT) is defined. WordPress core register_post_type() has ‘show_ui’ parameter. If CTP is defined with show_ui==FALSE then you will not see it, even is you administrator.
    If CPT is viewable by user with enough permissions, then it’s possible to manage who can view them. Look at this article.

    Take into account that, some plugins use internal data structure for their records instead of WP custom post types.

Viewing 15 posts - 661 through 675 (of 2,506 total)