Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allow html in sitewide notices?


  • Anonymous User 7600456
    Inactive

    @anonymized-7600456

    Hi,

    I have been trying to work out a way to send out polls to my site users but none of the poll plugins I have found allow you to dismiss them for a specific user and remember that choice.

    Buddypress sitewide notices has the ‘dismissabilty’ and remembers the choice for a specific user (rather than using a cookie) but it strips out html. Is there a way to allow html in sitewide notices?

    That way I can embed my Gravity Forms poll in the notice and it will give users who don’t want to answer the choice to get rid of it.

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

  • modemlooper
    Moderator

    @modemlooper

    function bp_disable_kses_notices() {
    	if( current_user_can('manage_options') ) {
    		remove_filter( 'bp_get_message_notice_text', 'wp_filter_kses', 1 );
    		remove_filter( 'messages_notice_message_before_save', 'wp_filter_kses', 1 );
    	}
    }
    add_action('init','bp_disable_kses_notices');

    Anonymous User 7600456
    Inactive

    @anonymized-7600456

    Thanks so much for the reply @modemlooper. I really appreciate it. The notifications display perfectly in the sent notifications section but they have all the html stripped when they display in the notifications area or the new widget.

    See here:

    Sitewide notice

    If you have any other suggestions I would really appreciate it.


    modemlooper
    Moderator

    @modemlooper

    I suggest not having the html in the popup. You should edit the popup with a link so it takes a user their notifications page. Notifications in next BP update will work like that out of the box.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow html in sitewide notices?’ is closed to new replies.
Skip to toolbar