LLMS_Admin_Post_Table_Certificates::add_states( string[] $states, WP_Post $post )
Add state information denoting the usage of the legacy template.
Parameters Parameters
- $states
-
(string[]) (Required) Array of post states.
- $post
-
(WP_Post) (Required) Post object.
Return Return
(string[])
Source Source
File: includes/admin/post-types/post-tables/class-llms-admin-post-table-certificates.php
public function add_states( $states, $post ) { $cert = llms_get_certificate( $post, true ); if ( $cert && 1 === $cert->get_template_version() ) { $states['llms-legacy-template'] = __( 'Legacy', 'lifterlms' ); } return $states; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.2.0 | Made sure to only process certificates. |
6.0.0 | Introduced. |