LLMS_Forms::is_a_core_form( WP_Post|int $form )

Check whether a given form is a core form.


Description Description

When there are multiple forms for a location, the core form is identified as the one with the lowest ID.


Top ↑

Parameters Parameters

$form

(WP_Post|int) (Required) Form's WP_Post instance, or its ID.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/forms/class-llms-forms.php

	 * @since 6.4.0
	 *
	 * @param string $return What to return: 'posts', for an array of WP_Post; 'ids' for an array of WP_Post ids.
	 * @return WP_Post[]|int[]
	 */
	private function get_core_forms( $return = 'posts', $use_cache = true ) {

		global $wpdb;

		$forms_cache_key = 'posts' === $return ? 'llms_core_forms' : 'llms_core_form_ids';
		$forms           = $use_cache ? wp_cache_get( $forms_cache_key ) : false;

Top ↑

Changelog Changelog

Changelog
Version Description
6.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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