onboarding-ld-coupon.php
1.97 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Onboarding Coupons Template.
*
* Displayed when no entities were added to help the user.
*
* @since 4.1.0
* @package LearnDash
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<section class="ld-onboarding-screen">
<div class="ld-onboarding-main">
<span class="dashicons dashicons-welcome-add-page"></span>
<h2>
<?php
printf(
// translators: placeholder: Coupons.
esc_html_x( 'You don\'t have any %s yet', 'placeholder: Coupons', 'learndash' ),
LearnDash_Custom_Label::label_to_lower( 'coupons' ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output
);
?>
</h2>
<p>
<?php
printf(
// translators: placeholder: %1$s: Coupons, %2$s: Courses, %3$s: Groups.
esc_html_x(
'%1$s offer an easy way for you to deliver %2$s and %3$s discounts!',
'placeholder: %1$s: Coupons, %2$s: Courses, %3$s: Groups',
'learndash'
),
LearnDash_Custom_Label::get_label( 'coupons' ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output
LearnDash_Custom_Label::label_to_lower( 'courses' ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output
LearnDash_Custom_Label::label_to_lower( 'groups' ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output
);
?>
</p>
<a
href="<?php echo esc_url( admin_url( 'post-new.php?post_type=' . LDLMS_Post_Types::get_post_type_slug( LDLMS_Post_Types::COUPON ) ) ); ?>"
class="button button-secondary"
>
<span class="dashicons dashicons-plus-alt"></span>
<?php
printf(
// translators: placeholder: Coupon.
esc_html_x( 'Add your first %s', 'placeholder: Coupon', 'learndash' ),
LearnDash_Custom_Label::label_to_lower( LDLMS_Post_Types::COUPON ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output
);
?>
</a>
</div> <!-- .ld-onboarding-main -->
</section> <!-- .ld-onboarding-screen -->