protected function pbCheck( array $xml ) {

		$pt = 0;
		$ch = 0;
		$fm = 0;
		$bm = 0;
		$meta = 0;

		foreach ( $xml['posts'] as $p ) {

			if ( 'part' === $p['post_type'] ) {
				$pt = 1;
			} elseif ( 'chapter' === $p['post_type'] ) {
				$ch = 1;
			} elseif ( 'front-matter' === $p['post_type'] ) {
				$fm = 1;
			} elseif ( 'back-matter' === $p['post_type'] ) {
				$bm = 1;
			} elseif ( 'metadata' === $p['post_type'] ) {
				$meta = 1;
			}

			if ( $pt + $ch + $fm + $bm + $meta >= 2 ) {
				$this->isPbWxr = true;
				break;
			}
		}

	}
protected function pbCheck( array $xml ) {

		$pt = 0;
		$ch = 0;
		$fm = 0;
		$bm = 0;
		$meta = 0;

		foreach ( $xml['posts'] as $p ) {

			if ( 'part' === $p['post_type'] ) {
				$pt = 1;
			} elseif ( 'chapter' === $p['post_type'] ) {
				$ch = 1;
			} elseif ( 'front-matter' === $p['post_type'] ) {
				$fm = 1;
			} elseif ( 'back-matter' === $p['post_type'] ) {
				$bm = 1;
			} elseif ( 'metadata' === $p['post_type'] ) {
				$meta = 1;
			}

			if ( $pt + $ch + $fm + $bm + $meta >= 2 ) {
				$this->isPbWxr = true;
				break;
			}
		}

	}
protected function pbCheck ( array $ xml ) { $ pt = 0 ; $ ch = 0 ; $ fm = 0 ; $ bm = 0 ; $ meta = 0 ; foreach ( $ xml [ 'posts' ] as $ p ) { if ( 'part' === $ p [ 'post_type' ] ) { $ pt = 1 ; } elseif ( 'chapter' === $ p [ 'post_type' ] ) { $ ch = 1 ; } elseif ( 'front-matter' === $ p [ 'post_type' ] ) { $ fm = 1 ; } elseif ( 'back-matter' === $ p [ 'post_type' ] ) { $ bm = 1 ; } elseif ( 'metadata' === $ p [ 'post_type' ] ) { $ meta = 1 ; } if ( $ pt + $ ch + $ fm + $ bm + $ meta >= 2 ) { $ this -> isPbWxr = true ; break ; } } }
Is it a WXR generated by PB?

@param array $xml
Is it a WXR generated by PB?