Skip to main content

GravityKit\GravityMigrate\AjaxRoutes

Attaches every Foundation AJAX route filter at bootstrap time, independent

of which admin page is being viewed and independent of whether Settings/Export/Import/Uploader have been instantiated yet.

Foundation's AjaxRouter resolves routes inside an admin_init callback with priority PHP_INT_MIN. Any filter attached as a side effect of class construction is invisible to that callback unless the class was constructed before admin_init fires — a route registered later reads as a silent 404.

Filter callbacks here lazy-instantiate the underlying singleton, so registering at bootstrap doesn't force every class into memory on every request — only on requests that actually hit a matching route.

Since: 1.1.5

Source: src/AjaxRoutes.php:28

Details​

  • Kind: class
  • Namespace: GravityKit\GravityMigrate

Methods​

MethodDescription
register()Attach all GravityMigrate AJAX route filters.

Method Reference​

register()​

public static function register()

Attach all GravityMigrate AJAX route filters.

Safe to call more than once: WordPress de-duplicates identical (callback, priority) pairs.

Returns​

  • void

Since: 1.1.5

Source: src/AjaxRoutes.php:39