WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Documentation Typo (3 posts)

  1. jli
    Member
    Posted 3 years ago #

    There is a typo in the example given to create an external controller, add_hello_controller function is missing a return statement, here is the corrected code:

    function add_hello_controller($controllers) {
      $controllers[] = 'hello';
      return $controllers;
    }
    add_filter('json_api_controllers', 'add_hello_controller');
    
    function set_hello_controller_path() {
      return "/path/to/theme/hello.php";
    }
    add_filter('json_api_hello_controller_path', 'set_hello_controller_path');

    This is one of the most usefull plugin and well documented plugin i've faced so far!

    Good job !

    http://wordpress.org/extend/plugins/json-api/

  2. jli
    Member
    Posted 3 years ago #

    Gosh this forum is not user friendly :X

  3. dphiffer
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the heads up jli!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags