• Hi,

    Please provide code to remove this link ASAP because right now the vendor can see every page created by the admin when clicking gear icon. Surely this is not right ?

    https://prnt.sc/ue2vhl

    Thanks

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Add this snippet to your site –

    add_filter( 'mce_buttons', function( $buttons ) {
    	if( function_exists( 'wcfm_is_vendor' ) && wcfm_is_vendor() ) {
    		$remove_buttons = array(
    				'link',
    				'unlink',
    		);
    		foreach ( $buttons as $button_key => $button_value ) {
    			if ( in_array( $button_value, $remove_buttons ) ) {
    					unset( $buttons[ $button_key ] );
    			}
    		}
    	}
    	return $buttons;
    }, 500 );
    add_filter( 'wcfm_is_allow_wpeditor_teeny_mode', '__return_false' );
    Thread Starter marzmuso

    (@marzmuso)

    Thanks,
    It removed link button but there is now a blank space that reads full screen on hover that is still clickable.

    Can you please give me the $remove_button =array to remove other buttons in the editor ?

    Example:

    $remove_buttons = array(
    			'link',
    			'unlink',
                            'fullscreen',
                            'read more',
                            'toolbar-toggle', 
    );

    Thanks

    Plugin Author WC Lovers

    (@wclovers)

    Here is list of all buttons –

    Array ( [0] => formatselect [1] => bold [2] => italic [3] => bullist [4] => numlist [5] => blockquote [6] => alignleft [7] => aligncenter [8] => alignright [9] => link [10] => wp_more [11] => spellchecker [12] => fullscreen [13] => wp_adv )

    Thread Starter marzmuso

    (@marzmuso)

    Hi,
    I’m confused ?

    Must it go like this:

    $remove_buttons = array(
    			'link',
    			'unlink',
                            'fullscreen',
                            'wp_adv',
                            'numlist', 
                            'bullist',
    );
    Plugin Author WC Lovers

    (@wclovers)

    Yes.

    Thread Starter marzmuso

    (@marzmuso)

    I cannot remove the toolbar toggle ?

    https://prnt.sc/ufgaim

    Thread Starter marzmuso

    (@marzmuso)

    FYI ! I just scanned my site and my GOTMLS anti malware found a potential threat in your plugin. https://prnt.sc/ufhkrj

    Plugin Author WC Lovers

    (@wclovers)

    I cannot remove the toolbar toggle ?

    – I don’t have that option with the same code. https://ibb.co/2dj4jb7
    Are you checking this as Vendor login?

    I just scanned my site and my GOTMLS anti malware found a potential threat

    – What threat?

    Thread Starter marzmuso

    (@marzmuso)

    1. Yes ofcourse, I log in as vendor and the square toggle that opens all other buttons is still there.I need to remove that. I dont see toolbar-toggle in any of the code you provided ?

    2. What threat ? If you Look at my screenshot and you will see the file details !!

    https://prnt.sc/ufhkrj

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hide Link in Vendor Products Editor’ is closed to new replies.