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
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | 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. |