Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Fix /<bookname>/wp-json/pressbooks/v2/toc arguments #780

connerbw opened this issue Jun 6, 2017 · 0 comments


Copy link

commented Jun 6, 2017



Related to Issue #774

Currently, the Toc has args context, page, per_page, search inherited from the abstract WP_REST_Controller class.

In other words if I send OPTIONS to: /<bookname>/wp-json/pressbooks/v2/toc I get:

  "endpoints": [
      "methods": [
      "args": {
        "context": {
          "required": false,
          "description": "Scope under which the request is made; determines fields present in response.",
          "type": "string"
        "page": {
          "required": false,
          "default": 1,
          "description": "Current page of the collection.",
          "type": "integer"
        "per_page": {
          "required": false,
          "default": 10,
          "description": "Maximum number of items to be returned in result set.",
          "type": "integer"
        "search": {
          "required": false,
          "description": "Limit results to those matching a string.",
          "type": "string"


  • Remove pagination arguments because these don't do anything for Toc.
  • Investigate what search and context do, get them working accordingly.

Steps to Reproduce

Not applicable.

System Information

Pressbooks: 4.0.0-dev
WordPress: 4.7.5
PHP: 7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.