Disable visual editor in BP Group Calendar

I would like to disable the visual editor for event descriptions you introduced with v1.3.1 of BP Group Calendar.
Please provide what I have to add to functions.php – Thanks!

  • Vaughan

    Hi @HansRuedi Keller,

    Hope you're well?

    Can you place the following in a file called bp-group-calendar.php

    Then upload this file to /wp-content/mu-plugins

    (If mu-plugins doesn't exist, create it first)

    <?php
    ?
    global $wp_query;
    ?
    $uri_request = $_SERVER['REQUEST_URI'];
    ?
    if (strpos($uri_request,'groups') !== false && strpos($uri_request,'calendar') !== false) {
    	add_filter( 'user_can_richedit' , '__return_false', 999 );
    }

    Hope this helps

  • HansRuedi Keller

    Hi @Vaughan,

    <?php
    
    global $wp_query;
    
    $uri_request = $_SERVER['REQUEST_URI'];
    
    if (strpos($uri_request,'groups') !== false && strpos($uri_request,'calendar') !== false) {
    	add_filter( 'user_can_richedit' , '__return_false', 999 );
    }

    …without these "?" and it's working only, if the BP group slug is "groups" – correct?

    Plus…

    #qt_event-desc_toolbar { display: none; }
    …in custom css and I'm happy now with a clean and simple interface.
    Thanks for your help!