• Resolved boneal

    (@boneal)


    Hello,

    I am having issues with adding <iframe> to the “Message” section of the frontend login screen. This <iframe> does work on another website we have that has an older version of Branda, but this iframe is important because our employees use it as a support video for logging in.

    Is there any way to fix this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @boneal,

    I hope you are doing well today!

    With the latest version of Branda, all of the scripts and tags are removed in order increase security and prevent related issues.

    Please try the following code if you want to use the tag for Branda > Admin Area > Admin Message.

    <?php
    add_filter(
    	'ub_get_value',
    	function( $data, $module, $section, $name ) {
    	if ( $module != 'admin-message' && $name != 'message_meta' ) {
    		return $data;
    	}
    	add_filter(
    		'wp_kses_allowed_html',
    		function( $tags, $context ) {
    			$tags[ 'iframe' ] = array(
    			  'src'    => array(),
    			  'style'  => true,
    			  'width'  => array(),
    			  'height' => array(),
    			  'title'  => array(),
    			  'frameborder' => array(),
    			  'allow'  => array(),
    			);
    			return $tags;
    		},
    		10,
    		2
    	);
    	return $data;
    }, 10, 4 );

    You can find more information below on how to use mu-plugins.
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
    and
    https://ww.wp.xz.cn/support/article/must-use-plugins/

    Kind regards,
    Zafer

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @boneal,

    I hope the PHP snippet helped resolving the issue.

    We’re going to mark the thread as resolved. Feel free to reply if you still have any questions.

    Best Regards,
    Dmytro

    Thread Starter boneal

    (@boneal)

    Hello @wpmudevsupport16,

    This PHP snippet did work for the admin side, but it did not work for the user side login page. Are there any work arounds for that?

    Let me know and thank you!

    Plugin Support Williams – WPMU DEV Support

    (@wpmudevsupport3)

    Hi @boneal,

    Hope this message finds you well.

    This mu-plugin is for

    Branda >> Front-end ->> Email >> Login Screen >> Content >> Message

    add_filter(
    	'ub_get_value',
    	function( $data, $module, $section, $name ) {
    	if ( $module != 'login-screen' && $section != 'content' && $name != 'message' ) {
    		return $data;
    	}
    
    	add_filter(
    		'sanitize_text_field',
    		function( $filtered, $str ) {
    			$filtered = wp_kses_post($str);
    			return $filtered;
    		},
    		10,
    		2
    	);
    
    	return $data;
    }, 10, 4 );

    Let us know the results.

    Best regards,
    Laura

    Thread Starter boneal

    (@boneal)

    Hello @wpmudevsupport3,

    Thank you for your response! I adding this snippet into the message input, but to no success. The end goal is adding 2 iframe tags to the login screen, where would the tags go in this snippet?

    Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hi @boneal

    Thank you for your response! I adding this snippet into the message input

    I’m sorry if we caused some confusion but that’s not where the code goes.

    This code (that Laura shared) should be added as Must Use plugin, just like the previously shared code

    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Once it’s there, then you’d put the HTML – your iframe tags – to the “Branda >> Front-end ->> Email >> Login Screen >> Content >> Message”.

    Best regards,
    Adam

    Thread Starter boneal

    (@boneal)

    @wpmudev-support8 Got it, thank you!

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

The topic ‘Login Page iFrame Issues’ is closed to new replies.