Deprecated

This function has been deprecated.

ap_read_env()

Description #

Read env file of AnsPress.

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/deprecated.php

function ap_read_env() {
	_deprecated_function( __FUNCTION__, '4.1.0' );

	$file  = ANSPRESS_DIR . '/env';
	$cache = wp_cache_get( 'ap_env', 'ap' );
	if ( false !== $cache ) {
		return $cache;
	}

	if ( file_exists( $file ) ) {
		// Get the contents of env file.
		$content = file_get_contents( $file ); // @codingStandardsIgnoreLine.
		wp_cache_set( 'ap_env', $content, 'ap' );
		return $content;
	}

}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment