LLMS_Blocks_Migrate::should_migrate_post( int $post_id )

Determine if a post should be migrated.


Description Description


Parameters Parameters

$post_id

(int) (Required) WP_Post ID.


Top ↑

Return Return

(bool)


Top ↑

Source Source

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

	public function should_migrate_post( $post_id ) {

		$ret = true;

		// Not a valid post type.
		if ( ! in_array( get_post_type( $post_id ), $this->get_migrateable_post_types(), true ) ) {

			$ret = false;

			// Classic is enabled, don't migrate.
		} elseif ( llms_blocks_is_classic_enabled_for_post( $post_id ) ) {

			$ret = false;

			// Already Migrated.
		} elseif ( llms_parse_bool( get_post_meta( $post_id, '_llms_blocks_migrated', true ) ) ) {

			$ret = false;

		}

		return apply_filters( 'llms_blocks_should_migrate_post', $ret, $post_id );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.3.3 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: