Feature Request: Add filter for function shouldLoadJavascript
-
First thank you for your work on this plugin! I have a feature request to propose. Right now infinite scroll only loads on non-singular pages. I need to use it in a page template ( the template is listing all the site’s authors ) that is being used in an archive kind of way.
If there were a filter in the shouldLoadJavascript() function I think this would work out while being completely backwards compatible.
function shouldLoadJavascript() { // Don't need to load the plugin on single pages if (is_singular()) { return false; } return true; }
function shouldLoadJavascript() { $load = true; // Don't need to load the plugin on single pages if (is_singular()) { $load = false; } return apply_filters( 'infinite_scroll_load_javascript', $load ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Feature Request: Add filter for function shouldLoadJavascript’ is closed to new replies.