get_logged_noptin_messages()

Logs a message.


Description Description

See also See also


Top ↑

Return Return

(array.)


Top ↑

Source Source

File: includes/functions.php

function get_logged_noptin_messages() {

	// Retrieve the logged messages.
	$messages = get_option( 'noptin_logged_messages', array() );

	// Ensure it is an array...
	if ( ! is_array( $messages ) ) {
		$messages = array();
	}

	// ... of no more than 20 elements.
	if ( 20 < count( $messages ) ) {
		$messages   = array_slice( $messages, -20 );
		update_option( 'noptin_logged_messages', $messages );
	}

	$prepared = array();

	foreach ( $messages as $message ) {
		if ( ! is_scalar( $message['msg'] ) ) {
			$message['msg'] = print_r( $message['msg'], true );
		}
		$prepared[] = $message;
	}

	return $prepared;

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.3Introduced.

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