[Plugin: JSON API] Problem in creating External controllers
-
First of all i would like to thank dphiffer for providing such a wonderful plugin. I have downloaded it just today, so i am new with it..
I am facing a problem while i tried to create an External controller as follow:
I add this code at my theme’s function.php
function add_hello_controller($controllers) { $controllers[] = 'hello'; } add_filter('json_api_controllers', 'add_hello_controller'); function set_hello_controller_path() { return TEMPLATEPATH."/jsonAPI/hello.php"; // TEMPLATEPATH is my theme's path.. } add_filter('json_api_hello_controller_path', 'set_hello_controller_path');
and create simple hello.php under “jsonAPI” directory at my theme as explained in description Section 5.
it is giving warning at front end as follow:
Warning: array_map() [function.array-map]: Argument #2 should be an array in P:\odwroot\wp301\wp-content\plugins\json-api\singletons\api.php on line 285Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in P:\odwroot\wp301\wp-content\plugins\json-api\singletons\api.php on line 20
Plus an additional waring at admin side JSON API Settings:
Warning: Invalid argument supplied for foreach() in P:\odwroot\wp301\wp-content\plugins\json-api\singletons\api.php on line 141and cannot see any controller there..
however if i create controller within the plug-in directory, it is working fine.
Kindly help..
Regards,
Parminder
- The topic ‘[Plugin: JSON API] Problem in creating External controllers’ is closed to new replies.