LLMS_Admin_Post_Table_Certificates::__construct()

Constructor


Return Return

(void)


Top ↑

Source Source

File: includes/admin/post-types/post-tables/class-llms-admin-post-table-certificates.php

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
public function __construct() {
 
    $this->engagement_type = 'certificate';
    $this->award_template_row_actions(); // defined in LLMS_Trait_Award_Templates_Post_List_Table.
 
    if ( ! llms_is_block_editor_supported_for_certificates() ) {
        return;
    }
 
    $post_types = array( 'llms_certificate', 'llms_my_certificate' );
    if ( in_array( llms_filter_input( INPUT_GET, 'post_type' ), $post_types, true ) ) {
        add_filter( 'display_post_states', array( $this, 'add_states' ), 20, 2 );
        add_filter( 'post_row_actions', array( $this, 'add_actions' ), 20, 2 );
    }
 
    if ( 1 === (int) llms_filter_input( INPUT_GET, self::MIGRATE_ACTION, FILTER_SANITIZE_NUMBER_INT ) ) {
        add_filter( 'llms_certificate_template_version', array( $this, 'upgrade_template' ), 10 );
    }
 
    add_filter( 'manage_llms_my_certificate_posts_columns', array( $this, 'mod_cols' ), 10, 1 );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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