Support » Plugin: JSON API » [Plugin: JSON API] Documentation Typo

  • jli


    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 !

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: JSON API] Documentation Typo’ is closed to new replies.