You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Math Captcha plugin and fix dependency handling.
Removed unnecessary parameters and extra spaces for cleaner code. Improved dependency check logic to ensure compatibility with Ultimate Member and fixed admin notice HTML sanitization. Updated plugin version to 1.1.2.
echo'<div class="error"><p>' . wp_kses_post( sprintf( __( 'The <strong>%s</strong> extension requires the Ultimate Member plugin to be activated to work properly. You can download it <a href="https://wordpress.org/plugins/ultimate-member">here</a>', 'um-math-captcha' ), um_math_captcha_extension ) ) . '</p></div>';
45
-
}
46
-
);
40
+
functionum_math_captcha_dependencies() {
41
+
$allowed_html = array(
42
+
'a' => array(
43
+
'href' => array(),
44
+
'target' => true,
45
+
),
46
+
'strong' => array(),
47
+
'br' => array(),
48
+
);
49
+
// translators: %s - plugin name.
50
+
echo'<div class="error"><p>' . wp_kses( sprintf( __( 'The <strong>%s</strong> extension requires the Ultimate Member plugin to be activated to work properly. You can download it <a href="https://wordpress.org/plugins/ultimate-member">here</a>', 'um-math-captcha' ), um_math_captcha_extension ), $allowed_html ) . '</p></div>';
0 commit comments