LLMS_Admin_Tool_Install_Forms::handle()

Process the tool.


Description Description

Deletes all core reusable blocks and then recreates the core forms, which additionally recreates the core reusable blocks.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/admin/tools/class-llms-admin-tool-install-forms.php

	protected function handle() {

		// Retrieve original reusable blocks.
		$original_blocks = $this->get_reusable_blocks();

		// Delete them all.
		foreach ( $original_blocks as $id ) {
			wp_delete_post( $id, true );
		}

		// Recreate the forms (and the blocks).
		LLMS_Forms::instance()->install( true );

		return true;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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