src/data.php
public static function get_active_metaplates( ) {

		global $post;

		if( empty( $post ) ){ return; } // no post - return

		// GET METAPLATEs
		$metaplates = self::get_registry();
		$meta_stack = array();
		if ( is_array( $metaplates ) ) {
			foreach ( $metaplates as $metaplate_try ) {
				$is_plate = self::get_metaplate( $metaplate_try['id'] );
				if ( ! empty( $is_plate['post_type'][ $post->post_type ] ) ) {
					switch ( $is_plate['page_type'] ) {
						case 'single':
							if ( is_single() || is_page() ) {
								$meta_stack[] = $is_plate;
							}
							break;
						case 'archive':
							if ( ( is_archive() || is_front_page() ) && ( ! is_page() || ! is_single() ) ) {
								$meta_stack[] = $is_plate;
							}
							break;
						default:
							$meta_stack[] = $is_plate;
							break;
					}
				}
			}
		}

		return $meta_stack;

	}
public static function get_active_metaplates( ) {

		global $post;

		if( empty( $post ) ){ return; } // no post - return

		// GET METAPLATEs
		$metaplates = self::get_registry();
		$meta_stack = array();
		if ( is_array( $metaplates ) ) {
			foreach ( $metaplates as $metaplate_try ) {
				$is_plate = self::get_metaplate( $metaplate_try['id'] );
				if ( ! empty( $is_plate['post_type'][ $post->post_type ] ) ) {
					switch ( $is_plate['page_type'] ) {
						case 'single':
							if ( is_single() || is_page() ) {
								$meta_stack[] = $is_plate;
							}
							break;
						case 'archive':
							if ( ( is_archive() || is_front_page() ) && ( ! is_page() || ! is_single() ) ) {
								$meta_stack[] = $is_plate;
							}
							break;
						default:
							$meta_stack[] = $is_plate;
							break;
					}
				}
			}
		}

		return $meta_stack;

	}
public static function get_active_metaplates ( ) { global $ post ; if ( empty ( $ post ) ) { return ; } // no post - return // GET METAPLATEs $ metaplates = self :: get_registry ( ) ; $ meta_stack = array ( ) ; if ( is_array ( $ metaplates ) ) { foreach ( $ metaplates as $ metaplate_try ) { $ is_plate = self :: get_metaplate ( $ metaplate_try [ 'id' ] ) ; if ( ! empty ( $ is_plate [ 'post_type' ] [ $ post -> post_type ] ) ) { switch ( $ is_plate [ 'page_type' ] ) { case 'single' : if ( is_single ( ) || is_page ( ) ) { $ meta_stack [ ] = $ is_plate ; } break ; case 'archive' : if ( ( is_archive ( ) || is_front_page ( ) ) && ( ! is_page ( ) || ! is_single ( ) ) ) { $ meta_stack [ ] = $ is_plate ; } break ; default : $ meta_stack [ ] = $ is_plate ; break ; } } } } return $ meta_stack ; }
Get the metaplates for the post

@return    array    active metaplates for this post type
Get the metaplates for the post