Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Shortcode_Subscribe::fields()
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Return Return
(array)
Source Source
File: classes/Shortcode/Subscribe.php
public function fields() { $select_args = array(); if ( isset( $_GET['post'] ) && is_int( (int) $_GET['post'] ) && isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) { $select_args['post__not_in'] = wp_parse_id_list( array( get_the_ID(), $_GET['post'] ) ); } $privacy_always_enabled = pum_get_option( 'privacy_consent_always_enabled', 'no' ) == 'yes'; $privacy_enabled_dependency = array( 'privacy_consent_enabled' => 'yes', ); $fields = apply_filters( 'pum_sub_form_shortcode_fields', array( 'general' => array( 'main' => array( 'provider' => array( 'label' => __( 'Service Provider', 'popup-maker' ), 'desc' => __( 'Choose which service provider to submit to.', 'popup-maker' ), 'type' => 'select', 'options' => array_merge( array( '' => __( 'Default', 'popup-maker' ) ), PUM_Newsletter_Providers::dropdown_list(), array( 'none' => __( 'None', 'popup-maker' ) ) ), 'std' => '', ), ), ), 'form' => array( 'fields' => array( 'name_field_type' => array( 'label' => __( 'Name Field Type', 'popup-maker' ), 'type' => 'select', 'options' => array( 'disabled' => __( 'None', 'popup-maker' ), 'fullname' => __( 'Full', 'popup-maker' ), 'first_only' => __( 'First Only', 'popup-maker' ), 'first_last' => __( 'First & Last', 'popup-maker' ), ), 'std' => 'fullname', 'private' => true, ), 'name_optional' => array( 'label' => __( 'Name Optional', 'popup-maker' ), 'desc' => __( 'Makes the name field optional.', 'popup-maker' ), 'type' => 'checkbox', 'dependencies' => array( 'name_field_type' => array( 'fullname', 'first_only', 'first_last' ), ), 'private' => true, ), 'name_disabled' => array( 'label' => __( 'Name Disabled', 'popup-maker' ), 'desc' => __( 'Removes the name field.', 'popup-maker' ), 'type' => 'checkbox', 'dependencies' => array( 'name_field_type' => false, ), 'private' => true, ), ), 'labels' => array( 'disable_labels' => array( 'label' => __( 'Disable Labels', 'popup-maker' ), 'desc' => __( 'Disables the display of field labels.', 'popup-maker' ), 'type' => 'checkbox', 'private' => true, ), 'heading_labels' => array( 'label' => __( 'Labels', 'popup-maker' ), 'desc' => __( 'Field label text', 'popup-maker' ), 'type' => 'heading', 'private' => true, ), 'label_name' => array( 'label' => __( 'Full Name', 'popup-maker' ), 'dependencies' => array( 'disable_labels' => false, 'name_field_type' => array( 'fullname' ), ), 'std' => __( 'Name', 'popup-maker' ), 'private' => true, ), 'label_fname' => array( 'label' => __( 'First Name', 'popup-maker' ), 'dependencies' => array( 'disable_labels' => false, 'name_field_type' => array( 'first_only', 'first_last' ), ), 'std' => __( 'First Name', 'popup-maker' ), 'private' => true, ), 'label_lname' => array( 'label' => __( 'Last Name', 'popup-maker' ), 'dependencies' => array( 'disable_labels' => false, 'name_field_type' => array( 'first_last' ), ), 'std' => __( 'Last Name', 'popup-maker' ), 'private' => true, ), 'label_email' => array( 'label' => __( 'Email', 'popup-maker' ), 'dependencies' => array( 'disable_labels' => false, ), 'std' => __( 'Email', 'popup-maker' ), 'private' => true, ), 'label_submit' => array( 'label' => __( 'Submit Button', 'popup-maker' ), 'std' => __( 'Subscribe', 'popup-maker' ), 'private' => true, ), // Deprecated fields. 'name_text' => array( 'type' => 'hidden', 'private' => true, ), 'email_text' => array( 'private' => true, 'type' => 'hidden', ), 'button_text' => array( 'type' => 'hidden', 'private' => true, ), ), 'placeholders' => array( 'placeholder_name' => array( 'label' => __( 'Full Name', 'popup-maker' ), 'dependencies' => array( 'name_field_type' => array( 'fullname' ), ), 'std' => __( 'Name', 'popup-maker' ), 'private' => true, ), 'placeholder_fname' => array( 'label' => __( 'First Name', 'popup-maker' ), 'dependencies' => array( 'name_field_type' => array( 'first_only', 'first_last' ), ), 'std' => __( 'First Name', 'popup-maker' ), 'private' => true, ), 'placeholder_lname' => array( 'label' => __( 'Last Name', 'popup-maker' ), 'dependencies' => array( 'name_field_type' => array( 'first_last' ), ), 'std' => __( 'Last Name', 'popup-maker' ), 'private' => true, ), 'placeholder_email' => array( 'label' => __( 'Email', 'popup-maker' ), 'std' => __( 'Email', 'popup-maker' ), 'private' => true, ), ), 'appearance' => array( 'form_layout' => array( 'label' => __( 'Form Layout', 'popup-maker' ), 'desc' => __( 'Choose a form layout.', 'popup-maker' ), 'type' => 'select', 'options' => array( 'block' => __( 'Block', 'popup-maker' ), 'inline' => __( 'Inline', 'popup-maker' ), ), 'std' => 'block', 'private' => true, ), 'form_alignment' => array( 'label' => __( 'Form Alignment', 'popup-maker' ), 'desc' => __( 'Choose a form alignment.', 'popup-maker' ), 'type' => 'select', 'options' => array( 'left' => __( 'Left', 'popup-maker' ), 'center' => __( 'Center', 'popup-maker' ), 'right' => __( 'Right', 'popup-maker' ), ), 'std' => 'center', 'private' => true, ), 'form_style' => array( 'label' => __( 'Form Style', 'popup-maker' ), 'desc' => __( 'Choose how you want your form styled.', 'popup-maker' ), 'type' => 'select', 'options' => array( '' => __( 'None', 'popup-maker' ), 'default' => __( 'Default', 'popup-maker' ), ), 'std' => 'default', ), 'layout' => array( 'type' => 'hidden', 'private' => true, ), 'style' => array( 'type' => 'hidden', 'private' => true, ), ), ), 'privacy' => array( 'main' => array( 'privacy_consent_enabled' => array( 'label' => __( 'Enabled', 'popup-maker' ), 'desc' => __( 'When enabled, the successful completion will result in normal success actions, but if they do not opt-in no records will be made.', 'popup-maker' ), 'type' => $privacy_always_enabled ? 'hidden' : 'select', 'options' => array( 'yes' => __( 'Yes', 'popup-maker' ), 'no' => __( 'No', 'popup-maker' ), ), 'std' => 'yes', 'value' => $privacy_always_enabled ? 'yes' : null, 'private' => true, ), 'privacy_consent_label' => array( 'label' => __( 'Consent Field Label', 'popup-maker' ), 'type' => 'text', 'std' => pum_get_option( 'default_privacy_consent_label', __( 'Notify me about related content and special offers.', 'popup-maker' ) ), 'private' => true, 'dependencies' => $privacy_enabled_dependency, ), 'privacy_consent_required' => array( 'label' => __( 'Consent Required', 'popup-maker' ), 'desc' => __( 'Note: Requiring consent may not be compliant with GDPR for all situations. Be sure to do your research or check with legal council.', 'popup-maker' ), 'type' => 'checkbox', 'std' => pum_get_option( 'default_privacy_consent_required' ), 'private' => true, 'dependencies' => $privacy_enabled_dependency, ), 'privacy_consent_type' => array( 'label' => __( 'Field Type', 'popup-maker' ), 'desc' => __( 'Radio forces the user to make a choice, often resulting in more optins.', 'popup-maker' ), 'type' => 'select', 'options' => array( 'radio' => __( 'Radio', 'popup-maker' ), 'checkbox' => __( 'Checkbox', 'popup-maker' ), ), 'std' => pum_get_option( 'default_privacy_consent_type', 'radio' ), 'private' => true, 'dependencies' => $privacy_enabled_dependency, ), 'privacy_consent_radio_layout' => array( 'label' => __( 'Consent Radio Layout', 'popup-maker' ), 'type' => 'select', 'options' => array( 'inline' => __( 'Inline', 'popup-maker' ), 'stacked' => __( 'Stacked', 'popup-maker' ), ), 'std' => pum_get_option( 'default_privacy_consent_radio_layout', 'inline' ), 'private' => true, 'dependencies' => array_merge( $privacy_enabled_dependency, array( 'privacy_consent_type' => 'radio', ) ), ), 'privacy_consent_yes_label' => array( 'label' => __( 'Consent Yes Label', 'popup-maker' ), 'type' => 'text', 'std' => pum_get_option( 'default_privacy_consent_yes_label', __( 'Yes', 'popup-maker' ) ), 'private' => true, 'dependencies' => array_merge( $privacy_enabled_dependency, array( 'privacy_consent_type' => 'radio', ) ), ), 'privacy_consent_no_label' => array( 'label' => __( 'Consent No Label', 'popup-maker' ), 'type' => 'text', 'std' => pum_get_option( 'default_privacy_consent_no_label', __( 'No', 'popup-maker' ) ), 'private' => true, 'dependencies' => array_merge( $privacy_enabled_dependency, array( 'privacy_consent_type' => 'radio', ) ), ), 'privacy_usage_text' => array( 'label' => __( 'Consent Usage Text', 'popup-maker' ), 'desc' => function_exists( 'get_privacy_policy_url' ) ? sprintf( __( 'You can use %1$s%2$s to insert a link to your privacy policy. To customize the link text use %1$s:Link Text%2$s', 'popup-maker' ), '{{privacy_link', '}}' ) : '', 'type' => 'text', 'std' => pum_get_option( 'default_privacy_usage_text', __( 'If you opt in above we use this information send related content, discounts and other special offers.', 'popup-maker' ) ), 'dependencies' => $privacy_enabled_dependency, ), ), ), 'actions' => array( 'popup' => array( 'closepopup' => array( 'label' => __( 'Close Popup', 'popup-maker' ), 'type' => 'checkbox', ), 'closedelay' => array( 'label' => __( 'Delay', 'popup-maker' ), 'type' => 'rangeslider', 'min' => 0, 'max' => 180, 'step' => 1, 'unit' => 's', 'std' => 0, 'dependencies' => array( 'closepopup' => true, ), ), 'openpopup' => array( 'label' => __( 'Open Popup', 'popup-maker' ), 'type' => 'checkbox', ), 'openpopup_id' => array( 'label' => __( 'Popup ID', 'popup-maker' ), 'type' => 'select', 'options' => array( 0 => __( 'Select a popup', 'popup-maker' ), ) + PUM_Helpers::popup_selectlist( $select_args ), 'std' => 0, 'dependencies' => array( 'openpopup' => true, ), ), ), 'redirect' => array( 'redirect_enabled' => array( 'label' => __( 'Redirect', 'popup-maker' ), 'desc' => __( 'Enable refreshing the page or redirecting after success.', 'popup-maker' ), 'type' => 'checkbox', ), 'redirect' => array( 'label' => __( 'Redirect URL', 'popup-maker' ), 'desc' => __( 'Leave blank to refresh, or enter a url that users will be taken to after success.', 'popup-maker' ), 'std' => '', 'dependencies' => array( 'redirect_enabled' => true, ), ), ), ), ) ); return $this->resort_provider_tabs( $fields ); }
Expand full source code Collapse full source code View on Trac