Skip to content

Instantly share code, notes, and snippets.

@missionmike
Last active February 6, 2021 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save missionmike/e50ba93263c74d2ff53acaf396de0899 to your computer and use it in GitHub Desktop.
Save missionmike/e50ba93263c74d2ff53acaf396de0899 to your computer and use it in GitHub Desktop.
One-liner to find & click all post "Edit" links in the WordPress admin area.
/**
* Note: Most browsers will have pop-up blockers on - you'll need to allow your domain
* through the pop-up blocker in order for this to work. Also, I'd suggest limiting your
* post view to 20 max, or whatever you're comfortable with. However many posts are in the
* list view, is how many tabs will open!
*/
// jQuery version:
jQuery(".iedit .edit a").each((i, el) => { window.open(jQuery(el).attr("href"), "_blank"); });
// Vanilla JS:
document.querySelectorAll(".iedit .edit a").forEach((el) => { window.open(el.getAttribute("href"), "_blank"); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment