• Hi

    I want to be able certain plugins being loaded when the cron url is requested also on the admin ajax page.

    Could you add an ability for to do this please.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    You can add a plugin filter for any URL that is loaded through WordPress.

    Thread Starter nathanwright

    (@nathanwright)

    Hi Jeff

    Thanks for the reply.

    I have been testing to try and get the plugin to work with the admin-ajax.php and whilst it sort of works it is ideal.

    As you know the admin-ajax.php is called by the client browser to get data back from the WordPress server. With your plugin I have added the plugin filter and added the admin-ajax.php and excluded those plugins that are never required by the page but the problem is that the admin-ajax.php page requires different plugins to be enabled on different pages and even based on the querystring therefore the amount of plugins that can be disabled is actually very small without the ability to filter by querystring.

    Would it be possible to add a querystring filter onto the plugin filter page so that it would be possible to provide a more granular filter so for example if the page http://www.abc.com/wp-admin/admin-ajax.php?type=post&id=98&y=hello then I would add the permalink to the plugin filter page http://www.abc.com/wp-admin/admin-ajax.php and then be able to specify a querystring match string of “type=post” and your plugin would then only apply the filter if the permalink is correct and “type=post” can be found in the querystring.

    I would be happy to pay for this addition if that would help as it is something that currently nobody has come up with a way to optimise the admin-ajax.php and lots and lots of people have problems with the performance of this.

    Thanks

    Nathan

    Thread Starter nathanwright

    (@nathanwright)

    Hi Jeff

    Sorry forgot to also say that another gotcha is that with the plugin today if you have a plugin filter and add the permalink /wp-admin/admin-ajax.php this does not get processed unless you have enabled the “Selective Admin Plugin Loading” then the permalink does not get picked up. Is it possible to enhance the plugin so that on the plugin filter page there is a select box to be able to choose where the permalink check for the selected filter is processed e.g. frontend, backend, both.

    Thanks

    Nathan

    Plugin Author Jeff Sterup

    (@foomagoo)

    You can set the permalink to http://www.abc.com/wp-admin/admin-ajax.php?type=post&id=98&y=hello and it will only match that call. Doing matches on individual arguments to a URL would be an opening for a DNS attack on your site. That’s why that feature is not available. Even if a DNS attack were not performed it would significantly increase the processing power needed to run Plugin Organizer and would defeat the purpose of having it installed. A URL can be thousands of characters long and have hundreds of arguments appended onto it. So to split that into separate variables and do an infinite number of queries on each possible set of those variables would kill your database.

    The admin-ajax.php file is within the admin section of the site. So that’s why you have to enable selective admin plugin loading. Maybe you could explain why you want the checkbox on the plugin filter a little better and I can explain how to achieve what you are after with the existing functionality. Enabling the selective admin plugin loading should work for you if you want to disable/enable plugins on admin-ajax.php.

    Thread Starter nathanwright

    (@nathanwright)

    Hi Jeff

    Thanks for the reply and yes good point about the DNS attack, I hadnt thought about that one.

    How about on the plugin filters page having the ability to be able to specify a referring URL?

    Having investigated the problem in more detail I now realise that the calls to the admin-ajax.php from the browser are being done as a POST request and not a GET and I dont think PO has any way to specify a POST field as part of the plugin filters settings so my though is that if it was possible to specify the referring URL then this would allow for the admin-ajax.php request to be much more filtered.

    Thanks

    Nathan

    Plugin Author Jeff Sterup

    (@foomagoo)

    I can look into implementing a referrer URL. That could be useful and I don’t see it presenting any risk.

    Thread Starter nathanwright

    (@nathanwright)

    Great thanks. It will help a lot.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable plugins on crontab’ is closed to new replies.