• Hey, great plugin but I’m having trouble allowing our users to add images to the pop-up post. They have Editor level accounts but I have removed the unfiltered_html permission (for security purposes). If they create a regular WP post it allows IMG tags within the post, but the tag is stripped in any WP Popups posts. Is there any way to allow IMG tags within the pop-up?

    WP Popups Lite: 2.1.4.6
    WordPress: 6.0.1

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Damian

    (@timersys)

    How did you remove unfiltered_html ?

    Thread Starter wellituser

    (@wellituser)

    Removed with use of the User Role Editor plugin.

    Plugin Author Damian

    (@timersys)

    Do you feel confortable editing PHP? I could indicate a change int he code to see if fixes the issue.

    On src/includes/class-popup-handler.php line 312

    Change this:

    		if ( ! current_user_can( 'unfiltered_html' ) ) {
    			$data = map_deep( $data, 'wp_strip_all_tags' );
    		}

    To this:

    
    		if ( ! current_user_can( 'unfiltered_html' ) ) {
    			$data = map_deep( $data, 'wp_kses_post' );
    		}
    Thread Starter wellituser

    (@wellituser)

    I tried the above (and cleared the browser cache) but it still doesn’t allow the tag. The content of the pop-up post is replaced with the following message:

    Welcome to popups plugin

    Plugin Author Damian

    (@timersys)

    If you comment out that like this it works?

    //if ( ! current_user_can( 'unfiltered_html' ) ) {
    	//		$data = map_deep( $data, 'wp_strip_all_tags' );
    	//	}
    Thread Starter wellituser

    (@wellituser)

    Still the same issue when that part is commented out (as above).

    I’m also using this piece of code by the way in the theme functions.php to allow editor access:
    https://wppopups.com/docs/how-to-change-popup-settings-role-access/

    • This reply was modified 1 year, 8 months ago by wellituser.
    • This reply was modified 1 year, 8 months ago by wellituser.
    Plugin Author Damian

    (@timersys)

    Hi I don’t think it´s related to our plugin if commenting that out does not make any difference as that´s the only filter we use.

    If you want to send admin credentials I could make some test at your site.

    You could use the form at wppopups.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add to allowed tags non-admins’ is closed to new replies.