Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Noptin_Form::get_post_array()

Returns post creation/update args


Return Return

(mixed)


Top ↑

Source Source

File: includes/class-noptin-form.php

	private function get_post_array() {
		$data = array(
			'post_title'   => empty( $this->optinName ) ? '' : $this->optinName,
			'ID'           => $this->id,
			'post_content' => empty( $this->optinHTML ) ? __( 'This form is incorrectly configured', 'newsletter-optin-box' ) : $this->optinHTML,
			'post_status'  => empty( $this->optinStatus ) ? 'draft' : 'publish',
			'post_type'    => 'noptin-form',
		);

		foreach ( $data as $key => $val ) {
			if ( empty( $val ) ) {
				unset( $data[ $key ] );
			}
		}

		return $data;
	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.5Introduced.

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