LLMS_Meta_Box_Visibility::output()

Output HTML for the settings


Return Return

(void)


Top ↑

Source Source

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

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
76
77
78
79
80
81
82
83
public function output() {
 
    global $post;
 
    if ( ! in_array( $post->post_type, array( 'course', 'llms_membership' ) ) ) {
        return;
    }
 
    $product    = new LLMS_Product( $post );
    $visibility = $product->get_catalog_visibility();
    $options    = llms_get_product_visibility_options();
    $name       = isset( $options[ $visibility ] ) ? $options[ $visibility ] : $visibility;
    ?>
    <div class="misc-pub-section" id="llms-catalog-visibility">
 
    <span style="color:#82878c;" class="dashicons dashicons-welcome-view-site"></span>
 
        <?php _e( 'Catalog visibility:', 'lifterlms' ); ?> <strong id="llms-catalog-visibility-display"><?php echo $name; ?></strong>
 
        <a href="#llms-catalog-visibility" class="llms-edit-catalog-visibility hide-if-no-js"><?php _e( 'Edit', 'lifterlms' ); ?></a>
 
        <div id="llms-catalog-visibility-select" class="hide-if-js">
 
            <p><?php printf( __( 'Choose the visibility of the %s in your catalog. It will always be available directly.', 'lifterlms' ), $product->get_post_type_label() ); ?></p>
            <?php foreach ( $options as $name => $label ) : ?>
                <input data-label="<?php echo esc_attr( $label ); ?>" id="_llms_visibility_<?php echo esc_attr( $name ); ?>" name="_llms_visibility" type="radio" value="<?php echo esc_attr( $name ); ?>" <?php checked( $visibility, $name ); ?> />
                <label for="_llms_visibility_<?php echo esc_attr( $name ); ?>" class="selectit"><?php echo esc_attr( $label ); ?></label><br>
            <?php endforeach; ?>
            <p>
                <a href="#llms-catalog-visibility" class="llms-save-catalog-visibility hide-if-no-js button"><?php _e( 'OK', 'lifterlms' ); ?></a>
                <a href="#llms-catalog-visibility" class="llms-cancel-catalog-visibility hide-if-no-js"><?php _e( 'Cancel', 'lifterlms' ); ?></a>
            </p>
 
            <?php wp_nonce_field( 'llms-catalog-visibility-nonce', 'llms_catalog_visibility_nonce' ); ?>
 
        </div>
    </div>
    <?php
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0
3.35.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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