Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Blocks_Migrate::update_post_content( int $id, string $content )

Update the post content for a given post.


Parameters Parameters

$id

(int) (Required) WP_Post ID.

$content

(string) (Required) Post content to update.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-migrate.php

	private function update_post_content( $id, $content ) {

		global $wpdb;
		$update = $wpdb->update(
			$wpdb->posts,
			array(
				'post_content' => $content,
			),
			array(
				'ID' => $id,
			),
			array( '%s' ),
			array( '%d' )
		); // db no-cache okay.

		return false === $update ? false : true;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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