WordPress.org

Ready to get started?Download WordPress

Forums

How do I REMOVE AJAX (4 posts)

  1. achikha
    Member
    Posted 7 years ago #

    I am trying to get rid of all the ajax calls, there should be copy of the older versions of the files when ajax were not implemented.

    I don't hate ajax, I am trying to put a blog inside a portlet and the portlets' security prevents me from making ajax calls.

    Lets not get into the why, but focus on the HOW?

    Thanks

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    AJAX is pretty well integrated at this point. Your only really viable option is to downgrade.

  3. achikha
    Member
    Posted 7 years ago #

    OK, I guess then I need to find out how can I just REMOVE AJAX FROM DELETEING COMMENTS, which is the only action that needs to be done via portlets.

    The rest, I can do by directly logging on to the admin bypassing my security.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    I'm not sure that you can. The nonces were introduced to prevent exactly that sort of thing (somebody creating external links and tricking users into clicking them, thus causing those actions to occur).

    A delete link looks like this:
    http://yoursite.com/blog/wp-admin/comment.php?action=deletecomment&p=32&c=553&_wpnonce=SOME_SEMI_RANDOM_NUMBER

    Anyway, the whole point of nonces is to make sure that all WordPress actions like this happen from the wp-admin screens. Now, if you knew the nonce, you could pull that link and thus do a delete (assuming you also sent the proper cookies to do the user authentication). But the nonce changes every 12 hours for every link in the wp-admin screen, and is only valid for 24 hours after that.

    More info here: http://markjaquith.wordpress.com/2006/06/02/wordpress-203-nonces/

    Note that all the AJAX is really irrelevant. If you get the right URLs with the right parameters, the relevant actions happen. The AJAX just makes it pretty. But with nonces, you'd have a lot of work cut out for you to duplicate that logic.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags