Noptin_Abstract_Integration::add_enable_integration_option( array $options, string $title = null, string $description = null )

Adds an enable integration checkbox.


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: null


Top ↑

Return Return

(array) an updated array of Noptin options.


Top ↑

Source Source

File: includes/integrations/class-noptin-abstract-integration.php

	public function add_enable_integration_option( $options, $title = null, $description = null ) {

		if ( is_null( $title ) ) {
			$title = __( 'Enable', 'newsletter-optin-box' );
		}

		if ( is_null( $description ) ) {
			$description = sprintf(
				__( 'Enable the %s Integration', 'newsletter-optin-box' ),
				$this->name
			);
		}

		$option_name = $this->get_enable_integration_option_name();
		$this->maybe_save_default_value( $option_name, $this->get_enable_integration_default_value() );

		$options[$this->get_enable_integration_option_name()] = array(
            'type'                  => 'checkbox_alt',
            'el'                    => 'input',
            'section'		        => 'integrations',
            'label'                 => $title,
            'description'           => $description,
		);

		return $options;

	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.6Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation