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
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!
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?
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!