LLMS_Blocks_Migrate
Handle post migration to the block editor.
Description Description
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-migrate.php
Changelog Changelog
Version | Description |
---|---|
1.9.1 | Fix course progress block. |
1.8.0 | Update course progress bar shortcode in the course block template. |
1.7.0 | Perform migrations on current_screen instead of admin_enqueue_scripts . Migrate membership post types to use pricing table blocks. |
1.4.0 | Added action for unmigrating posts from the Tools & Utilities status screen. |
1.0.0 | Introduced. |
Methods Methods
- __construct — Constructor.
- add_template_to_post — Add a template to a post & save migration status in postmeta.
- check_sales_page — Don't remove core template actions when a sales page is enabled and the page is restricted.
- get_migrateable_post_types — Get an array of post types which can be migrated.
- get_migrated_posts — Retrieve a WP_Query for posts which have already been migrated.
- get_template — Retrieve the block template by post type.
- migrate_post — Migrate posts created prior to the block editor to have default LifterLMS templates
- remove_template_from_post — Remove post type templates and any LifterLMS Blocks from a given post.
- remove_template_hooks — Removes core template action hooks from posts which have been migrated to the block editor
- should_migrate_post — Determine if a post should be migrated.
- unmigrate_posts — Unmigrates migrated posts.
- update_migration_status — Update post meta data to signal status of the editor migration.
- update_post_content — Update the post content for a given post.