LLMS_Admin_Post_Table_Certificates::__construct()
Constructor
Return Return
(void)
Source Source
File: includes/admin/post-types/post-tables/class-llms-admin-post-table-certificates.php
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 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |