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: 22

Dependents: 0

Suggesters: 0

0.1.1 2026-05-02 02:53 UTC

This package is auto-updated.

Last update: 2026-05-02 02:54:04 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.1

  • Fix: Force cast to float in sanitize float to guarantee the return type

0.1.0

  • First stable release