Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * Hosting-login button rendered on wp-login.php. |
| 4 | * |
| 5 | * Required scope (provided by SSO_Hosting_Login::render): |
| 6 | * $config array Resolved button config (enabled, url, label, new_tab, accent_color, …). |
| 7 | * $icon_html string Pre-sanitized inline SVG markup (may be empty). |
| 8 | * |
| 9 | * @package NewfoldLabs\WP\Module\SSO |
| 10 | */ |
| 11 | |
| 12 | defined( 'ABSPATH' ) || exit; |
| 13 | ?> |
| 14 | <div class="nfd-sso-hosting-login"<?php if ( ! empty( $config['accent_color'] ) ) : ?> style="--nfd-sso-hosting-login-accent: <?php echo esc_attr( $config['accent_color'] ); ?>;"<?php endif; ?>> |
| 15 | <div class="nfd-sso-hosting-login__divider"> |
| 16 | <span><?php esc_html_e( 'or', 'wp-module-sso' ); ?></span> |
| 17 | </div> |
| 18 | <a class="nfd-sso-hosting-login__button" href="<?php echo esc_url( $config['url'] ); ?>"<?php if ( ! empty( $config['new_tab'] ) ) : ?> target="_blank" rel="noopener noreferrer"<?php endif; ?>> |
| 19 | <?php echo $icon_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- wp_kses applied in caller. ?> |
| 20 | <span class="nfd-sso-hosting-login__label"><?php echo esc_html( $config['label'] ); ?></span> |
| 21 | </a> |
| 22 | </div> |