Caudell: Or is that global function smart enough? :
Mahrer: Clausing: Depends how your site is set up, but if you are callign the function inside a loop then that’s the way to go, unless you are feeding it a post id of a post not related ot the current post at all
Lindenfelser: By default, it’s smart enough, but some plugins do bad things
Girouard: Yeah, sometimes you don’t use the loop because it isn’t enough ;
Lonas: Gustav1234x: If you don’t have backups and such, And need ot restore everything, you’ll want ot look to a service that offers site recovery, personlaly I recommend Sucuri for it
Christine: Gustav1234x: You’d have to go through all the files by hand and clean it up, and of course update.
Orttenburger: Clausing:If that’s the case, I’d feed it the ID, and use $post_id as a variable inside the function always avoid using $post because of the global overlord variable :
Binz: As long as the function has enough data to perform its task ;
Aleizar: The most important aspect of that change I made is really the printf since it seems to be a free text field of sorts in the first place you need ot think of sanitizing the output to avoid sneaky injections and such
Barlip: I’m trying to figure out some requests at https://api.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org – could someone help out?
Schulter: What I’m trying to figure out is if it’s possible to do an AJAX request on the API to get plugin information.
Neugebauer: But I can’t make the plugin information action to work.
Abrams: Am I at fault here? Is /1.1/ available / ready? or is it under development?
Erskin: I can’t seem to find any information online regarding the api- and version 1.1
Bingman: Which of the APIs are you hitting ?
Rerko: There’s a fair few of them
Piepenbrink: Sending an action of: plugin_information
Barninger: And I’m always getting slug missing.
Huitt: Could you pastebin your code ?
Tupa: I’ve tried so many ways of sending the slug that I’m starting to feel that it doesn’t work :/
Kriese: Wait a sec to find one of my tries that actually made sense.
Heuman: I just hit it with https://api.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/plugins/info/1.0/string-locator and it works just fine
Putcha: Which doesn’t allo cross-origin calls
Gassen: Which means I can’t use AJAX to request anything.
Lickness: String locator is gay!
Dunn: Yeah, I can’t find 1.1 either :
Botten: That’s what I’m trying to figure out. 1.1 is available for themes
Granier: At least it seems to be working
Darnold: Yeah the APIs are independent of eac hother after all
Tuia: So Themes is at 1.1 updated for the lovely new theme repository, plugins are still 1.0
Bellon: So in short, there is no way to get plugin information using an AJAX call
Horsman: Ioann1s: I can do it with ajax.
Lesches: I just tried with Postman
Turdo: Clausing: on https://api.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/plugins/info/1.0/string-locator ?
Bagley: Clausing: wait a sec I’m talking about browser xhr requests
Giuliani: Clausing: browser won’t allow me to get data if there is not a cross allow origin header
Chrisp: Yes, I used X-Requested-With: XMLHttpRequest
Berhow: I could write a quick test in js as well running locally
Kelling: No need I’ll have at it wait a bit 😛
Stoviak: XMLHttpRequest cannot load https://api.----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/plugins/info/1.0/string-locator. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://magicpanel.local’ is therefore not allowed access
Deniken: Paste the code please and I’ll try it out