• This:

    https://codex.www.ads-software.com/AJAX_in_Plugins

    “Implementing Ajax on the viewer-facing side of a WordPress site is slightly more ad-hoc than doing Ajax on the administration side, because WordPress itself doesn’t have viewer-facing Ajax built in”

    ‘Slightly’ is a gross understatement. Let’s call this what it actually is: A hack. Spent half a day hunting for an AJAX interface in the WP front-end and discovered it doesn’t exist.

    It would literally only be about 50 lines or so of code to write a wp-ajax.php file for the root WP directory that has a singular hook that plugins could utilize for a callback. Even if the WP frontend doesn’t ever use it, plugins could cleanly and consistently leverage the hooking interface for whatever AJAX they want on the frontend. It would pretty much be a copy-and-paste from the admin-ajax.php script (with maybe a couple changes to wp-settings.php), is something a WP developer could crank out in an evening, and would save plugin developers a major headache. We could then just simply use jQuery.load(‘wp-ajax.php’, {…}); (or similar) from wherever and, bam!, instant AJAX support for our plugins on the frontend complete with a clean hooking interface similar to what admin-side AJAX plugins already have.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter plug_n_author

    (@plug_n_author)

    That doesn’t help me any. I don’t have privileges to submit Trac tickets, I can’t register to submit Trac tickets, Trac is difficult to use in the first place but I don’t see any tickets after running a dozen or so searches, the WordPress Trac ticket login screen has a zillion warnings in Firefox about a bad/incorrectly configured SSL cert., and the option of editing the Wiki seems pointless – all the entries on the Wiki page seem to be roughly 2005-ish.

    What now?

    That doesn’t help me any.

    You seem to be expressing the desire for a new feature in WordPress. You seem to already know what needs to be done to make your suggestion happen. I was suggesting to you ( by giving you a link as a “jumping off point” ) that you find a way to get it to someone who can listen to and evaluate your idea on the same level of expertise and skill that you obviously possess. I was suggesting you attempt to submit/contribute your idea to individuals who are actually operating under correct knowledge, and whom would be capable of responding to you in an intelligent and informed manner. If you are interested in doing so, then a little searching on your part may very well reveal a path that will satisfy you. That search need not be limited of course, to the links on that page I referenced.

    “Trac is difficult to use in the first place”

    …but adding code to allow AJAX on the WordPress “front end” is a snap for you. C’mon… You’re not even trying.

    What now?

    I think it’s a great idea. If it seems like a good idea to you, pursue it. If not, forget about it….

    “A zillion warnings” ( narrated in my mind by the voice of Leonard Nimoy for dramatic effect ).

    core.trac.www.ads-software.com uses an invalid security certificate.

    The certificate is only valid for the following names:
    *.www.ads-software.com , www.ads-software.com

    (Error code: ssl_error_bad_cert_domain)

    …take a breath, get a grip.

    ??

    Good luck!

    hehe.

    Any luck with this? Promising premise, what now? ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AJAX for the frontend…’ is closed to new replies.