File in theme can break core plugin functionality
-
Or at least make the admin interface unusable.
Let’s say your installed and activated theme has a file called
widgets.phpin its root folder atget_stylesheet_directory().If that is the case JSON_API’s
controller_path($controller)function returns the path to the file located in the theme folder even though it might not be a valid JSON_API Plugin.For the time being I fixed it by using the same test as in
check_directory_for_controllers()and patching line 360 of `wp-content/plugins/json-api/singletons/api.php’ as follows:if (file_exists($theme_path) && preg_match("/class\s+JSON_API_{$controller}_Controller/i", file_get_contents($theme_path))) {Would be great if this issue could be fixed.
Thank you.
The topic ‘File in theme can break core plugin functionality’ is closed to new replies.