Returns the available meta box fields for the module.
Description
See also
Return
(array) Associative array of <code>$field_slug => $field_args</code> pairs.
Source
File: src/modules/form-settings/module.php
protected function get_meta_fields() { $prefix = $this->manager()->get_prefix(); $fields = array( 'show_container_title' => array( 'tab' => 'labels', 'type' => 'checkbox', 'label' => __( 'Show page title?', 'torro-forms' ), 'description' => __( 'Click the checkbox to display the title of the current page in the frontend.', 'torro-forms' ), 'default' => true, 'wrap_classes' => array( 'has-torro-tooltip-description' ), 'visual_label' => __( 'Page Title', 'torro-forms' ), ), 'previous_button_label' => array( 'tab' => 'labels', 'type' => 'text', 'label' => __( 'Previous Button Label', 'torro-forms' ), 'description' => __( 'Enter the label for the button that leads to the previous form page.', 'torro-forms' ), 'default' => $this->get_default_previous_button_label(), 'wrap_classes' => array( 'has-torro-tooltip-description' ), ), 'next_button_label' => array( 'tab' => 'labels', 'type' => 'text', 'label' => __( 'Next Button Label', 'torro-forms' ), 'description' => __( 'Enter the label for the button that leads to the next form page.', 'torro-forms' ), 'default' => $this->get_default_next_button_label(), 'wrap_classes' => array( 'has-torro-tooltip-description' ), ), 'submit_button_label' => array( 'tab' => 'labels', 'type' => 'text', 'label' => __( 'Submit Button Label', 'torro-forms' ), 'description' => __( 'Enter the label for the button that submits the form.', 'torro-forms' ), 'default' => $this->get_default_submit_button_label(), 'wrap_classes' => array( 'has-torro-tooltip-description' ), ), 'success_message' => array( 'tab' => 'labels', 'type' => 'text', 'label' => __( 'Success Message', 'torro-forms' ), 'description' => __( 'Enter a message to display when a form submission has successfully been completed.', 'torro-forms' ), 'input_classes' => array( 'regular-text' ), 'default' => $this->get_default_success_message(), 'wrap_classes' => array( 'has-torro-tooltip-description' ), ), 'allow_get_params' => array( 'tab' => 'advanced', 'type' => 'checkbox', 'label' => __( 'Allow GET parameters?', 'torro-forms' ), /* translators: %s: GET parameter example */ 'description' => sprintf( __( 'Click the checkbox to allow initial field values to be set through GET parameters (such as %s).', 'torro-forms' ), '<code>?torro_input_value_ELEMENT_ID=VALUE</code>' ), ), ); /** * Filters the meta fields in the form settings metabox. * * @since 1.0.0 * * @param array $fields Array of `$field_slug => $field_data` pairs. */ return apply_filters( "{$prefix}form_settings_meta_fields", $fields ); }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |