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.


Top ↑

Return Return

(string[])


Top ↑

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;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.2.0 Made sure to only process certificates.
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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