src/types/class-papi-page-type.php
public function remove_meta_boxes() {
		global $wp_meta_boxes;

		$post_type = $this->get_post_type();
		$context = [];

		foreach ( $this->remove_meta_boxes as $item ) {
			if ( $item[0] !== $item[1] ) {
				remove_meta_box( $item[0], $post_type, $item[1] );
				continue;
			}

			$context = $item[0];

			// Our special context.
			if ( $context === 'all' ) {
				$context = ['normal', 'side', 'advanced'];
			} else {
				$context = [strtolower( $context )];
			}

			foreach ( $context as $ctx ) {
				if ( ! isset( $wp_meta_boxes[$post_type], $wp_meta_boxes[$post_type][$ctx] ) ) {
					continue;
				}

				$meta_boxes = $wp_meta_boxes[$post_type][$ctx];

				if ( ! is_array( $meta_boxes ) ) {
					continue;
				}

				foreach ( $meta_boxes as $level ) {
					foreach ( $level as $id => $box ) {
						// Don't allow removing of papi boxes.
						if ( strpos( $id, '_papi' ) !== false ) {
							continue;
						}

						// Don't allow removing of submitdiv.
						if ( $id === 'submitdiv' ) {
							continue;
						}

						remove_meta_box( $id, $post_type, $ctx );
					}
				}
		}
		}

		// Special for editor in normal context.
		if ( in_array( 'normal', $context, true ) ) {
			remove_post_type_support( 'page', 'editor' );
		}
	}
public function remove_meta_boxes() {
		global $wp_meta_boxes;

		$post_type = $this->get_post_type();
		$context = [];

		foreach ( $this->remove_meta_boxes as $item ) {
			if ( $item[0] !== $item[1] ) {
				remove_meta_box( $item[0], $post_type, $item[1] );
				continue;
			}

			$context = $item[0];

			// Our special context.
			if ( $context === 'all' ) {
				$context = ['normal', 'side', 'advanced'];
			} else {
				$context = [strtolower( $context )];
			}

			foreach ( $context as $ctx ) {
				if ( ! isset( $wp_meta_boxes[$post_type], $wp_meta_boxes[$post_type][$ctx] ) ) {
					continue;
				}

				$meta_boxes = $wp_meta_boxes[$post_type][$ctx];

				if ( ! is_array( $meta_boxes ) ) {
					continue;
				}

				foreach ( $meta_boxes as $level ) {
					foreach ( $level as $id => $box ) {
						// Don't allow removing of papi boxes.
						if ( strpos( $id, '_papi' ) !== false ) {
							continue;
						}

						// Don't allow removing of submitdiv.
						if ( $id === 'submitdiv' ) {
							continue;
						}

						remove_meta_box( $id, $post_type, $ctx );
					}
				}
		}
		}

		// Special for editor in normal context.
		if ( in_array( 'normal', $context, true ) ) {
			remove_post_type_support( 'page', 'editor' );
		}
	}
Remove meta boxes.