Noptin_Abstract_Integration::add_checkbox_message_integration_option( array $options, string $title = null, string $description = '' )
Adds an integration subscription checkbox message.
Parameters Parameters
- $options
(array) (Required) An array of Noptin options.
- $title
(string) (Optional) The option title
Default value: null
- $description
(string) (Optional) The option description.
Default value: ''
Return Return
(array) an updated array of Noptin options.
Source Source
File: includes/integrations/class-noptin-abstract-integration.php
public function add_checkbox_message_integration_option( $options, $title = null, $description = '' ) { if ( is_null( $title ) ) { $title = __( 'Checkbox Message', 'newsletter-optin-box' ); } $option_name = $this->get_checkbox_message_integration_option_name(); $default = $this->get_checkbox_message_integration_default_value(); $this->maybe_save_default_value( $option_name, $default ); $checkbox_positions = $this->checkbox_positions(); $options[$option_name] = array( 'el' => 'input', 'type' => 'text', 'restrict' => sprintf( '%s && %s && %s', $this->get_enable_integration_option_name(), $this->get_autosubscribe_integration_option_name(), empty( $checkbox_positions ) ? 1 : $this->get_checkbox_position_option_name() ), 'section' => 'integrations', 'label' => $title, 'description' => $description, 'placeholder' => $default, ); return $options; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.6 | Introduced. |