LLMS_Admin_Post_Table_Courses::add_links( array $actions, obj $post )

Add course builder edit link


Parameters Parameters

$actions

(array) (Required) existing actions

$post

(obj) (Required) WP_Post object


Top ↑

Source Source

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

	 * @param    array $actions  existing actions
	 * @param    obj   $post     WP_Post object
	 * @since    3.13.0
	 * @version  3.13.1
	 */
	public function add_links( $actions, $post ) {

		if ( 'course' === $post->post_type && current_user_can( 'edit_course', $post->ID ) ) {

			$url = add_query_arg(
				array(
					'page'      => 'llms-course-builder',
					'course_id' => $post->ID,
				),
				admin_url( 'admin.php' )
			);

			$actions = array_merge(
				array(
					'llms-builder' => '<a href="' . esc_url( $url ) . '">' . __( 'Builder', 'lifterlms' ) . '</a>',
				),
				$actions
			);


Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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