LLMS_Admin_Post_Table_Forms::pre_get_posts( WP_Query $query )

Ensure only core forms are displayed in the forms list.


Parameters Parameters

$query

(WP_Query) (Required) Query object.


Top ↑

Return Return

(void)


Top ↑

Source Source

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

	public static function pre_get_posts( $query ) {

		if ( ! function_exists( 'get_current_screen' ) ) {
			return;
		}

		$screen = get_current_screen();
		if ( ! $screen || 'edit-llms_form' !== $screen->id || ! $query->is_main_query() ) {
			return;
		}

		$query->set( 'meta_key', '_llms_form_is_core' );
		$query->set( 'meta_value', 'yes' );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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