LLMS_Admin_Post_Table_Forms::manage_post_row_actions( array $actions,  $post )

Manage available bulk actions.


Parameters Parameters

$actions

(array) (Required) Array of actions.


Top ↑

Return Return

(array)


Top ↑

Source Source

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

	public function manage_post_row_actions( $actions, $post ) {

		if ( 'llms_form' !== $post->post_type ) {
			return $actions;
		}

		// Core forms cannot be deleted.
		if ( LLMS_Forms::instance()->is_a_core_form( $post ) ) {
			unset( $actions['trash'] );
		}

		unset( $actions['inline hide-if-no-js'] );

		$link = get_permalink( $post );
		if ( $link ) {
			$label           = sprintf( esc_attr__( 'View "%s"', 'lifterlms' ), $post->post_title );
			$actions['view'] = sprintf( '<a href="%1$s" rel="bookmark" aria-label="%2$s">%3$s</a>', $link, $label, __( 'View', 'lifterlms' ) );
		}

		return $actions;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
6.4.0 Use LLMS_Forms::is_a_core_form() to determine whether a form is a core form and cannot be deleted.
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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