Skip to content

Commit 4b3c5fd

Browse files
committed
Support hidden treasures widget as shortcode
1 parent 8ead0b1 commit 4b3c5fd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

plugins/bcc-login/includes/class-bcc-login-widgets.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ function bcc_widgets_shortcodes() {
133133

134134
return $html . PHP_EOL;
135135
} );
136+
137+
add_shortcode( 'bcc-hidden-treasures', function () {
138+
$html = '<div id="bcc-hidden-treasures">';
139+
$html .= '<bcc-hidden-treasures'
140+
. ' language="' . esc_attr(get_culture()) . '"'
141+
. ' authentication-type="webapp"'
142+
. ' authentication-location="' . site_url( '?bcc-login=access-token' ) . '"'
143+
. '></bcc-hidden-treasures>';
144+
$html .= '</div>';
145+
146+
$html .= '<script src="http://localhost:3100/scripts/main.js" type="module"></script>';
147+
148+
return $html . PHP_EOL;
149+
} );
136150
}
137151

138152
function add_fields_for_topbar_search() {

0 commit comments

Comments
 (0)