LLMS_Abstract_Generator_Posts::add_custom_values( int $post_id, array $raw )

Add custom data to a post based on the ‘custom’ array


Parameters Parameters

$post_id

(int) (Required) WP Post ID.

$raw

(array) (Required) Raw data.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/abstracts/llms-abstract-generator-posts.php

	public function add_custom_values( $post_id, $raw ) {

		// No custom data, return early.
		if ( empty( $raw['custom'] ) ) {
			return;
		}

		foreach ( $raw['custom'] as $custom_key => $custom_vals ) {
			foreach ( $custom_vals as $val ) {
				$this->add_custom_value( $post_id, $custom_key, $val );
			}
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Moved from LLMS_Generator.
3.30.2 Skip JSON evaluation for non-string values; make publicly accessible.
3.28.3 Add extra slashes around JSON strings.
3.16.11 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.