src/data.php
public static function get_metaplate( $id ) {
		$metaplates = self::get_registry();
		if ( array_key_exists( $id, $metaplates ) ) {
			$metaplate = get_option( $id );
		}
		else {
			$metaplate = self::get_metaplate_id_by_slug( $id );
			if ( is_string( $metaplate ) ) {
				$metaplate = self::get_metaplate( $metaplate );

			}

		}

		if ( is_string( $metaplate ) ) {
			$metaplate =  json_decode( $metaplate, ARRAY_A );
		}

		if ( is_object( $metaplate ) ) {
			$metaplate = (array) $metaplate;
		}

		$metaplate = self::code( $metaplate );

		return (array) $metaplate;

	}
public static function get_metaplate( $id ) {
		$metaplates = self::get_registry();
		if ( array_key_exists( $id, $metaplates ) ) {
			$metaplate = get_option( $id );
		}
		else {
			$metaplate = self::get_metaplate_id_by_slug( $id );
			if ( is_string( $metaplate ) ) {
				$metaplate = self::get_metaplate( $metaplate );

			}

		}

		if ( is_string( $metaplate ) ) {
			$metaplate =  json_decode( $metaplate, ARRAY_A );
		}

		if ( is_object( $metaplate ) ) {
			$metaplate = (array) $metaplate;
		}

		$metaplate = self::code( $metaplate );

		return (array) $metaplate;

	}
public static function get_metaplate ( $ id ) { $ metaplates = self :: get_registry ( ) ; if ( array_key_exists ( $ id , $ metaplates ) ) { $ metaplate = get_option ( $ id ) ; } else { $ metaplate = self :: get_metaplate_id_by_slug ( $ id ) ; if ( is_string ( $ metaplate ) ) { $ metaplate = self :: get_metaplate ( $ metaplate ) ; } } if ( is_string ( $ metaplate ) ) { $ metaplate = json_decode ( $ metaplate , ARRAY_A ) ; } if ( is_object ( $ metaplate ) ) { $ metaplate = ( array ) $ metaplate ; } $ metaplate = self :: code ( $ metaplate ) ; return ( array ) $ metaplate ; }
Get a metaplate by ID or slug

@param string $id

@return array|bool
Get a metaplate by ID or slug