register_default_noptin_subscriber_metaboxes( $subscriber )

Registers default metaboxes.


Source Source

File: includes/subscriber.php

function register_default_noptin_subscriber_metaboxes( $subscriber ) {

	add_meta_box(
        'noptin_subscriber_details',
        __('Subscriber Details','newsletter-optin-box'),
        'noptin_subscriber_metabox_callback',
		'noptin_page_noptin-subscribers',
		'normal',
		'default',
		'details'
	);

	add_meta_box(
        'noptin_subscriber_fields',
        __('Custom Fields','newsletter-optin-box'),
        'noptin_subscriber_metabox_callback',
		'noptin_page_noptin-subscribers',
		'advanced',
		'default',
		'fields'
	);

	add_meta_box(
        'noptin_subscriber_save',
        __('Save Changes','newsletter-optin-box'),
        'noptin_subscriber_metabox_callback',
		'noptin_page_noptin-subscribers',
		'side',
		'default',
		'save'
	);

	if ( 1 !== (int) $subscriber->confirmed ) {

		add_meta_box(
			'noptin_subscriber_double_optin',
			__('Confirmation Email','newsletter-optin-box'),
			'noptin_subscriber_metabox_callback',
			'noptin_page_noptin-subscribers',
			'side',
			'default',
			'double-optin'
		);

	}

	if ( apply_filters( 'noptin_enable_geolocation', true ) ) {
		$ip_address = $subscriber->ip_address;
		if ( ! empty( $ip_address ) && noptin_locate_ip_address( $ip_address ) ) {

			add_meta_box(
				'noptin_subscriber_location',
				__('GeoLocation','newsletter-optin-box'),
				'noptin_subscriber_metabox_callback',
				'noptin_page_noptin-subscribers',
				'side',
				'default',
				'geolocation'
			);

		}
	}

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.7Introduced.

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