baxtian/wp_json

Base class for merak REST API endpoints.

Maintainers

Package info

bitbucket.org/baxtian/wp_json

pkg:composer/baxtian/wp_json

Statistics

Installs: 13

Dependents: 0

Suggesters: 0

0.1.0 2026-04-08 01:26 UTC

This package is auto-updated.

Last update: 2026-04-08 01:26:43 UTC


README

Class to be inherited to create a WP REST API endpoint.

Extend WP_Json and implement the api() method to register routes via register_rest_route().

Use self::success($data) and self::error($message) for standard responses.

Use sanitize_boolean(), sanitize_float() and sanitize_array() as sanitize_callback in route args.

Mantainers

Juan Sebastián Echeverry baxtian.echeverry@gmail.com

Changelog

0.1.0

  • First stable release