protected function perform_update_metadata( array $changes ) {
		if ( ! $this->meta_type ) {
			return;
		}

		$mapping = $this->get_mapping();

		$changes = $this->recently_created
			? array_keys( $mapping )
			: $this->get_changes_only( $changes, array_keys( $mapping ) );

		// Don't do anything if nothing changes.
		if ( empty( $changes ) ) {
			return;
		}

		$updated = [];
		foreach ( $changes as $attribute ) {
			$meta_key = $this->get_mapping_metakey( $attribute );
			if ( is_null( $meta_key ) ) {
				continue;
			}

			if ( $this->update_meta( $meta_key, $this->get_attribute( $attribute ) ) ) {
				$updated[] = $attribute;
			}
		}

		return $updated;
	}
protected function perform_update_metadata( array $changes ) {
		if ( ! $this->meta_type ) {
			return;
		}

		$mapping = $this->get_mapping();

		$changes = $this->recently_created
			? array_keys( $mapping )
			: $this->get_changes_only( $changes, array_keys( $mapping ) );

		// Don't do anything if nothing changes.
		if ( empty( $changes ) ) {
			return;
		}

		$updated = [];
		foreach ( $changes as $attribute ) {
			$meta_key = $this->get_mapping_metakey( $attribute );
			if ( is_null( $meta_key ) ) {
				continue;
			}

			if ( $this->update_meta( $meta_key, $this->get_attribute( $attribute ) ) ) {
				$updated[] = $attribute;
			}
		}

		return $updated;
	}
protected function perform_update_metadata ( array $ changes ) { if ( ! $ this -> meta_type ) { return ; } $ mapping = $ this -> get_mapping ( ) ; $ changes = $ this -> recently_created ? array_keys ( $ mapping ) : $ this -> get_changes_only ( $ changes , array_keys ( $ mapping ) ) ; // Don't do anything if nothing changes. if ( empty ( $ changes ) ) { return ; } $ updated = [ ] ; foreach ( $ changes as $ attribute ) { $ meta_key = $ this -> get_mapping_metakey ( $ attribute ) ; if ( is_null ( $ meta_key ) ) { continue ; } if ( $ this -> update_meta ( $ meta_key , $ this -> get_attribute ( $ attribute ) ) ) { $ updated [ ] = $ attribute ; } } return $ updated ; }
Run perform update object metadata.

@param  array $changes The attributes changed.
@return array|null
Run perform update object metadata .