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.
Parameters Parameters
- $form
-
(WP_Post|int) (Required) Form's WP_Post instance, or its ID.
Return Return
(boolean)
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;
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.4.0 | Introduced. |