Create an Add-on

Since June 2024, the AI Engine has begun supporting add-ons, which are plugins related to the AI Engine. We believe this approach helps to avoid clutter in the WordPress Admin and conveniently organizes everything. Therefore, all plugins related to the AI Engine are located in the Add-ons section.

 
Notion image

How to insert your Add-on

It's quite straightforward. You just need to add a filter on mwai_addons and register your own add-on. The placement of the add-on settings within the WP Admin is entirely at your discretion. If you plan to sell an add-on, it's your responsibility to implement a licensing system. For a free add-on, it's advisable to host it on the WordPress repository, if possible, for easy updates. If that's not feasible, you'll need to construct your own system.

add_filter( 'mwai_addons', array( $this, 'refresh_addons' ), 1 );

function refresh_addons( $addons ) {
	$addons[] = [
			'slug' => "your-addon",
			'name' => "Your Add-on",
			'icon_url' => 'https://yoursite.com/favicon.png', // Useless for now
			'description' => "This add-on does this and that.",
			'install_url' => "https://yoursite.com", // This link will show up if the plugin is disabled.
			'settings_url' => null, // This link will be used by the button "Settings".
			'enabled' => true // If the add-on is installed (probably always true).
		];
	return $addons;
}
 
 
Did this answer your question?
😞
😐
🤩