LLMS_Meta_Box_Voucher_Export::output( object $post )

Function to field WP::output() method call Passes output instruction to parent


Parameters Parameters

$post

(object) (Required) WP global post object


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/class.llms.meta.box.voucher.export.php

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
public static function output( $post ) {
 
    global $post;
    if ( 'publish' !== $post->post_status ) {
        _e( 'You need to publish this post before you can generate a CSV.', 'lifterlms' );
        return;
    }
    ob_start();
    ?>
    <div class="llms-voucher-export-wrapper" id="llms-form-wrapper">
 
        <div class="llms-voucher-export-type">
            <input type="radio" name="llms_voucher_export_type" id="vouchers_only_type" value="vouchers">
            <label for="vouchers_only_type"><strong><?php _e( 'Vouchers only', 'lifterlms' ); ?></strong></label>
            <p><?php _e( 'Generates a CSV of voucher codes, uses, and remaining uses.', 'lifterlms' ); ?></p>
        </div>
 
        <div class="llms-voucher-export-type">
            <input type="radio" name="llms_voucher_export_type" id="redeemed_codes_type" value="redeemed">
            <label for="redeemed_codes_type"><strong><?php _e( 'Redeemed codes', 'lifterlms' ); ?></strong></label>
            <p><?php _e( 'Generated a CSV of student emails, redemption date, and used code.', 'lifterlms' ); ?></p>
        </div>
 
 
        <div class="llms-voucher-email-wrapper">
            <input type="checkbox" name="llms_voucher_export_send_email" id="llms_voucher_export_send_email"
                   value="true">
            <label for="llms_voucher_export_send_email"><?php _e( 'Email CSV', 'lifterlms' ); ?></label>
            <input type="text" placeholder="Email" name="llms_voucher_export_email">
            <p><?php _e( 'Send to multiple emails by separating emails addresses with commas.', 'lifterlms' ); ?></p>
        </div>
 
        <button type="submit" name="llms_generate_export" value="generate" class="button-primary"><?php _e( 'Generate Export', 'lifterlms' ); ?></button>
        <?php wp_nonce_field( 'lifterlms_csv_export_data', 'lifterlms_export_nonce' ); ?>
        <div class="clear"></div>
    </div>
    <?php
 
    echo ob_get_clean();
}

Top ↑

Changelog Changelog

Changelog
Version Description
?? Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.