Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/shortcodes/checkout_button.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/*
3
+
Shortcode to show a link/button linking to the checkout page for a specific level
4
+
*/
5
+
function pmpro_checkout_button_shortcode($atts, $content=null, $code="")
6
+
{
7
+
// $atts ::= array of attributes
8
+
// $content ::= text within enclosing form of shortcode element
9
+
// $code ::= the shortcode found, when == callback name
10
+
// examples: [pmpro_checkout_button level="3"]
11
+
12
+
extract(shortcode_atts(array(
13
+
'level' => NULL,
14
+
'text' => NULL,
15
+
'class' => NULL
16
+
), $atts));
17
+
18
+
ob_start(); ?>
19
+
<span class="<?php echo esc_attr( pmpro_get_element_class( 'span_pmpro_checkout_button' ) ); ?>">
20
+
<?php
21
+
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
22
+
echo pmpro_getCheckoutButton($level, $text, $class);
23
+
?>
24
+
</span>
25
+
<?php
26
+
return ob_get_clean();
27
+
}
28
+
add_shortcode("pmpro_button", "pmpro_checkout_button_shortcode");
29
+
add_shortcode("pmpro_checkout_button", "pmpro_checkout_button_shortcode");
30
+