LLMS_Form_Post_Type::register_meta()
Register custom postmeta properties for the forms post type.
Contents
Return Return
(void)
Source Source
File: includes/forms/class-llms-form-post-type.php
public function register_meta() { $props = array( '_llms_form_location' => array( 'description' => __( 'Determines the front-end location where the form is displayed.', 'lifterlms' ), ), '_llms_form_show_title' => array( 'description' => __( 'Determines whether or not to display the form\'s title on the front-end.', 'lifterlms' ), ), // This is only actually used for 'checkout' forms. '_llms_form_title_free_access_plans' => array( 'description' => __( 'The alternative form title to be shown on checkout for free access plans.', 'lifterlms' ), 'default' => __( 'Student Information', 'lifterlms' ), ), '_llms_form_is_core' => array( 'description' => __( 'Determines if the form is a core form required for basic site functionality.', 'lifterlms' ), ), ); foreach ( $props as $prop => $settings ) { register_meta( 'post', $prop, wp_parse_args( $settings, array( 'object_subtype' => $this->post_type, 'sanitize_callback' => 'sanitize_text_field', 'auth_callback' => array( $this, 'meta_auth_callback' ), 'type' => 'string', 'single' => true, 'show_in_rest' => true, ) ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.10.0 | Added new meta for checkout forms and free access plans. |
5.0.0 | Introduced. |