forked from joshcanhelp/auth0-wp-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-test-shortcode.php
37 lines (32 loc) · 928 Bytes
/
page-test-shortcode.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Page template for testing [auth0] shortcode.
* Page slug should be 'test-shortcode' for this template to be active.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page
*
* @package WordPress
* @subpackage WP_Auth0_Testing
* @since 1.0
* @version 1.0
*/
get_template_part( 'template-parts/block', 'header' );
the_post();
?>
<article>
<?php get_template_part( 'template-parts/block', 'test-tpl-header' ); ?>
<div class="the-content">
<?php get_template_part( 'template-parts/block', 'lock-mods' ); ?>
<?php
$shortcode = '[auth0';
foreach ( auth0_wp_test_get_lock_mod_opts() as $attr ) {
if ( isset( $_GET[ $attr ] ) ) {
$shortcode .= sprintf( ' %s="%s"', $attr, urldecode( $_GET[ $attr ] ) );
}
}
$shortcode .= ']';
echo do_shortcode( $shortcode );
?>
</div>
</article>
<?php get_template_part( 'template-parts/block', 'footer' ); ?>