LLMS_Blocks_Migrate::should_migrate_post( int $post_id )
Determine if a post should be migrated.
Parameters Parameters
- $post_id
-
(int) (Required) WP_Post ID.
Return Return
(bool)
Source Source
File: libraries/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; } /** * Filters whether or not a post should be migrated * * @since 1.3.3 * * @param bool $migrate Whether or not a post should be migrated. * @param int $post_id WP_Post ID. */ return apply_filters( 'llms_blocks_should_migrate_post', $ret, $post_id ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.3.3 | Introduced. |