Installation
Upload the Pixel plugin to /wp-content/plugins/, activate it, and ensure Pretty Permalinks are enabled.
Your First Module
Use the pixel_loaded action to register your module:
add_action( 'pixel_loaded', function() {
pixel_register_module( 'my-plugin', [
'name' => 'My Plugin',
'version' => '1.0.0',
'plugin_file' => __FILE__,
] );
} );
pixel_register_route()
pixel_register_route( 'MyRoute', '/path/to/template.php', [
'title' => 'My Route',
'public' => true,
] );
REST API
Base namespace:
https://inserloft.com/wp-json/pixel/v1/
