mardi 27 janvier 2015

Check for element ID in plugin admin


I have a function that checks for an element ID if passed an HTML string



$doc = new DomDocument;
$doc->validateOnParse = true;

$doc->loadHTML($htmlstring); // ok

$doc->getElementById('div-id');


I want to pass the HTML of the current plugin admin page but I cannot figure out how



$doc->Load(); // ?


I tried $doc->Load(plugin_dir_path(__FILE__) . 'plugin_file.php';); but I'm guessing I really need the URL/URI of the admin page, but I cannot seem to see how to get this. I tried this suggestion with tons of errors, perhaps I am missing something.





Aucun commentaire:

Enregistrer un commentaire