The function “activate_this_plugin” is called when the main is initialized. Since extensions may be enabled and disabled in our extension section we have to check if this particular plugin is enabled.
This is done with the ‘mainwp_extension_enabled_check’ hook. If the plugin is not enabled this will return false, if the plugin is enabled, an array will be returned containing a key. This key is used for some data requests to our main. (You will find more about this in the filters using this key)