Support » Plugin: Infinite-Scroll » [Plugin: Infinite-Scroll] Contribution of fork with many enhancements

  • Plugin Contributor Ben Balter


    I was trying to use the plugin for a project, and ran into a handful of compatibility problems / blockers. Specifically:

    1. Because the javascript is served as PHP (via readfile()), it would not properly integrate with minification, page caching, or browser caching plugins.
    2. Because the presetDB.csv.php file is stored in the plugin’s directory (which should not normally be writable), I could not load any presets (simply erred out), nor could I save any of my own, nor were write permissions properly enforced on multisite installs.
    3. Because the preset class calls cURL directly (rather than going through WP_HTTP), it wouldn’t work on sites without direct access to cURL, e.g, when disabled by php.ini (not uncommon), behind a proxy, etc.
    4. No internationalization or custom post type support.

    I “forked” the project over on GitHub in hopes of contributing back some of my improvements to the original project.

    There’s a full change log on the develop branch, but in broad strokes, in the fork:

    • Javascript is served via standard wp_enqueue_script() API (allowing for other plugins to minify, cache, apply headers, etc.), and arguments are passed via wp_localize_script). Thus this (112 lines ) becomes this (1 line).
    • Presets can now be stored as site-transients, meaning there’s no need to touch the file system directly. They are asynchronously updated from the SVN repo every 24 hours (via the WP_HTTP class), so there’s no performance hit on page load or portability issues. There’s also a cap-check on multisite installs as the presets are network wide.
    • Added full internationalization support, CPT support, and generated POT file.
    • Simplified the administrative interface by relying on many native WordPress functions that would otherwise be familiar to everyday users (e.g., display presets using WP_Table, rely on WP_DEBUG to toggle debug mode, use apply_filters to pass additional arguments, use wp_editor for WYSIWYG editor, and media-upload for uploading images).
    • For many users, the fork should work right out of the box as the fork defaults to presets where available (local or community), and can even look to a child theme’s parent for a preset, where applicable.
    • Significant code clean up, file reorganization, and in-line documentation to conform to WordPress coding and style standards (e.g., whitespace, double v. single quotes, tab drift, trailing commas, closing PHP tags, phpdoc style documentation, file naming conventions, version numbering, etc.)


    1. Minimum compatibility bumped to WordPres 3.2
    2. Many options moved to filters to simply interface for majority of users
    3. PresetsDB file converted to standard CSV as there is no longer risk of leaking when stored as transient.
    4. I’ve tested the fork and believe it is stable enough to personally have it in production, but there may be a few underlying bugs/compatibility issues still to ferret out with broader testing.

    If any members of the community are interested in using or testing this version, you can clone the repository (if you are comfortable using git), or simply download and unzip the plugin as you would normally. Any feedback is greatly appreciated.

    While the fork was made for my own project, it was built with the broader community in mind (the fork is fully back-compatible with the community branch’s current and legacy database formats, presets file, etc.), and I would be honored if you would consider including it in the next stable release of the project.

    Obviously there are some very purposeful decisions throughout the above, and I am more than glad to discuss them further or help integrate the improvements any way that I can.

    Thank you for all your work on this great plugin, and I hope that my contributions can be included in the community’s version sometime soon.

    – Ben

Viewing 1 replies (of 1 total)
  • Plugin Contributor beaver6813


    Thanks for the hard work Ben, I’ll take a look at your fork over the weekend and I’m sure we can start using your improvements (the current version was the first re-code in a long time so it definitely needed some optimization).

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Infinite-Scroll] Contribution of fork with many enhancements’ is closed to new replies.