Last active
February 6, 2021 06:08
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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