LLMS_Blocks_Status_Tools::add_tools( array $tools )

Add status page tools


Parameters Parameters

$tools

(array) (Required) array of tools.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-status-tools.php

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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;
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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