LLMS_Forms::get_locations()

Retrieve information on all the available form locations.


Return Return

(array[]) An associative array. The array key is the location ID and each array is a location definition array.

  • 'name'
    (string) The human-readable location name (as displayed on the admin panel).
  • 'description'
    (string) A description of the form (as displayed on the admin panel).
  • 'title'
    (string) The form's post title. This is displayed to the end user when the "Show Form Title" option is enabled.
  • 'meta'
    (array) An associative array of postmeta information for the form. The array key is the meta key and the value is the meta value.
  • 'template'
    (string) A string used to generate the post content of the form post, usually retrieve from LLMS_Form_Templates.
  • 'meta'
    (array) Array of meta data used when generating the form. The array key is the meta key and array value is the meta value.
  • 'required'
    (array[]) Array of arrays defining required fields for each form.


Top ↑

Source Source

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

	public function get_locations() {

		$locations = require LLMS_PLUGIN_DIR . 'includes/schemas/llms-form-locations.php';

		/**
		 * Filter the available form locations.
		 *
		 * NOTE: Removing core forms (as well as modifying the ids / keys) may cause areas of LifterLMS to stop working.
		 *
		 * @since 5.0.0
		 *
		 * @param  array[] $locations Associative array of form location information.
		 */
		return apply_filters( 'llms_forms_get_locations', $locations );

	}


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.