ZodiacPress

Get All ZodiacPress Interpretations Texts

This gets all your interpretations texts that you have entered in ZodiacPress. It will go through all the options in the WordPress database and collect every interpretation text. It returns them all in one array.

PHP

function isa_zp_get_all_interps() {

	// Collect all interpretions options
	$option_names = zp_get_all_interps_options_names();
	$interps = array();
	foreach ( $option_names as $option ) {
		$interps_type = get_option( $option, array() );

		if ( $interps_type ) {

			foreach ($interps_type as $key => $value) {

				$interp = trim( $value );

				$interps[ $option ][ $key ] = $interp ? $interp : 'This interpretation is blank. The site owner has not yet entered their own astrological text here.';
				
			}
		}

	}
	//$a = json_encode( $interps );// @todo for exporting

	//isa_log($a);

	return $interps;
}

Updated on July 9, 2019

Questions and Comments are Welcome

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this:

[code]

YOUR CODE HERE 

[/code]