LLMS_Admin_Post_Table_Certificates::add_actions( array $actions, WP_Post $post )

Add post row actions.


Parameters Parameters

$actions

(array) (Required) Array of post row actions.

$post

(WP_Post) (Required) Post object for the row.


Top ↑

Return Return

(array)


Top ↑

Source Source

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

	public function add_actions( $actions, $post ) {

		$cert = llms_get_certificate( $post, true );
		if ( 1 === $cert->get_template_version() ) {

			$url                             = esc_url( add_query_arg( self::MIGRATE_ACTION, 1, get_edit_post_link( $post ) ) );
			$actions[ self::MIGRATE_ACTION ] = '<a href="' . $url . '">' . __( 'Migrate legacy certificate', 'lifterlms' ) . '</a>';

		}

		return $actions;

	}


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.