protected function searchForMetaValue( $meta_key, array $postmeta ) {

		if ( empty( $postmeta ) ) {
			return '';
		}

		foreach ( $postmeta as $meta ) {
			// prefer this value, if it's set
			if ( $meta_key === $meta['key'] ) {
				$meta_val = $meta['value'];
				if ( is_serialized( $meta_val ) ) {
					$meta_val = unserialize( $meta_val ); // @codingStandardsIgnoreLine
					if ( is_object( $meta_val ) ) {
						$meta_val = ''; // Hack attempt?
					}
				}
				return $meta_val;
			}
		}

		return '';
	}
protected function searchForMetaValue( $meta_key, array $postmeta ) {

		if ( empty( $postmeta ) ) {
			return '';
		}

		foreach ( $postmeta as $meta ) {
			// prefer this value, if it's set
			if ( $meta_key === $meta['key'] ) {
				$meta_val = $meta['value'];
				if ( is_serialized( $meta_val ) ) {
					$meta_val = unserialize( $meta_val ); // @codingStandardsIgnoreLine
					if ( is_object( $meta_val ) ) {
						$meta_val = ''; // Hack attempt?
					}
				}
				return $meta_val;
			}
		}

		return '';
	}
protected function searchForMetaValue ( $ meta_key , array $ postmeta ) { if ( empty ( $ postmeta ) ) { return '' ; } foreach ( $ postmeta as $ meta ) { // prefer this value, if it's set if ( $ meta_key === $ meta [ 'key' ] ) { $ meta_val = $ meta [ 'value' ] ; if ( is_serialized ( $ meta_val ) ) { $ meta_val = unserialize ( $ meta_val ) ; // @codingStandardsIgnoreLine if ( is_object ( $ meta_val ) ) { $ meta_val = '' ; // Hack attempt? } } return $ meta_val ; } } return '' ; }
Check for PB specific metadata, returns empty string if not found.

@param string $meta_key
@param array $postmeta

@return string meta field value
Check for PB specific metadata returns empty string if not found .