LLMS_Blocks_Status_Tools::add_tools( array $tools )
Add status page tools
Parameters Parameters
- $tools
-
(array) (Required) array of tools.
Return Return
(array)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-status-tools.php
public function add_tools( $tools ) { global $llms_blocks_migrate; $posts = $llms_blocks_migrate->get_migrated_posts(); if ( $posts->found_posts ) { $desc = __( 'Removes block editor code from all courses and lessons which were migrated to the block editor during an upgrade to WordPress 5.0 or later. If you installed the Classic Editor plugin after upgrading and see duplicate content items (such as the course syllabus or lesson mark complete button) this tool will remove the duplicates.', 'lifterlms' ); $desc .= '<br><br>'; // Translators: %d = number of affected courses/lessons. $desc .= sprintf( __( 'Currently %d courses and/or lessons are affected.', 'lifterlms' ), $posts->found_posts ); $tools['blocks-unmigrate'] = array( 'description' => $desc, 'label' => __( 'Remove LifterLMS Block Code', 'lifterlms' ), 'text' => __( 'Remove Block Code', 'lifterlms' ), ); } return $tools; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.4.0 | Introduced. |