llms_get_form_title( string $location, array $args = array() )
Retrieve the title of a form at a given location.
Description Description
Returns an empty string if the form is disabled via form settings.
Parameters Parameters
- $location
-
(string) (Required) Form location, one of: "checkout", "registration", or "account".
- $args
-
(array) (Optional) Additional arguments passed to the short-circuit filter in
LLMS_Forms->get_form_post()
.Default value: array()
Return Return
(string)
Source Source
File: includes/functions/llms-functions-forms.php
84 85 86 87 88 89 90 91 92 93 94 95 96 | */ function llms_get_form_title( $location , $args = array () ) { $post = llms_get_form( $location , $args ); if ( ! $post || ! llms_parse_bool( get_post_meta( $post ->ID, '_llms_form_show_title' , true ) ) ) { return '' ; } return 'checkout' === $location && isset( $args [ 'plan' ] ) && $args [ 'plan' ]->is_free() ? apply_filters( 'the_title' , get_post_meta( $post ->ID, '_llms_form_title_free_access_plans' , true ), $post ->ID ) : get_the_title( $post ->ID ); |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.10.0 | Return specific form title for checkout forms and free access plans. |
5.0.0 | Introduced. |