TS\WonderfulRelations\System\ChildPlugin\Kernel is the default loader for a child plugin. AbstractChildPlugin::install_plugin() constructs it once wonderful_relations_plugin_loaded fires.

What the Kernel does

In its constructor it runs load_dependencies() and register_shortcodes():

  1. Reads <plugin>_db_version option and compares with the context version. If a Database/Config/config.json exists and the stored version is older, it sets $needs_update = true.
  2. Loads the plugin textdomain. It registers the textdomain on the load_wr_plugins_locales action so multilingual sites pick up updated .mo files in lock-step with the WR mother.
  3. Boots resources — instantiates Resources so the plugin’s stylesheets/scripts can register themselves.
  4. Boots modules only if no DB update is pending. When an update is pending, modules are skipped to avoid crashes from removed DB columns. The Kernel logs a notice instead.
  5. Registers the admin menu. If has_admin_menu() is true, the default Menu is instantiated (or the FQCN passed to with_menu_class()).
  6. Registers DatabaseUpdater if a declarative DB config is present. This wires the Update Center AJAX endpoints.
  7. Registers cron hooks. If the context has a cron_registrar, the closure is added to init.
  8. Registers a <slug>_version shortcode that prints the plugin version. Useful for footers/about pages.

Update gating

The Kernel will not boot your modules while AbstractChildPlugin::is_update_pending() is true. This is intentional: modules typically read DB rows that may not exist on the old schema, so running them before the user clicks “Run update” in the Update Center would crash the site.

If the user lands on wp-admin/admin.php?page=<slug>-update, the Update Center page itself still runs because the Menu always registers the update submenu.

Replacing the Kernel

If you need extra boot logic (e.g. license auto-updater, plugin self- registration with a remote service), subclass Kernel and pass the FQCN through:

return ChildPluginContext::create( /* … */ )
    ->with_kernel_class( \TS\YourPlugin\YourKernel::class );

Override boot_modules() or register_shortcodes(). Avoid replacing the entire load_dependencies() flow unless you really need to — inheriting and adding to it keeps update gating and cron registration in sync with future WR releases.