Last active
June 26, 2024 07:39
-
-
Save mkdizajn/5af62c406e682f4d3457208b918b8f46 to your computer and use it in GitHub Desktop.
wordpress CMS mass update X posts - and trigger btn submit, enable etc..
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
<h2>Run this in CMS .. somewhere create admin page with UL list of desired posts</h2> | |
<style> | |
ul,li{ list-style-type:none;margin:0;padding:0 } | |
iframe{width: 100%;min-height:32vh} | |
</style> | |
<ul style="grid-template-columns: repeat(4, minmax(0, 1fr));display: grid;"> | |
<li><iframe id="sub0" src="/wp-admin/post.php?post=129681&action=edit"></iframe></li> | |
<li><iframe id="sub1" src="/wp-admin/post.php?post=129682&action=edit"></iframe></li> | |
<li><iframe id="sub2" src="/wp-admin/post.php?post=129683&action=edit"></iframe></li> | |
<li><iframe id="sub3" src="/wp-admin/post.php?post=129684&action=edit"></iframe></li> | |
<li><iframe id="sub4" src="/wp-admin/post.php?post=129685&action=edit"></iframe></li> | |
<li><iframe id="sub5" src="/wp-admin/post.php?post=129686&action=edit"></iframe></li> | |
</ul> | |
<script> | |
document.getElementById('sub0').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
document.getElementById('sub1').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
document.getElementById('sub2').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
document.getElementById('sub3').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
document.getElementById('sub4').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
document.getElementById('sub5').contentWindow.document.querySelectorAll('.components-button.editor-post-publish-button.editor-post-publish-button__button.is-primary')[0].setAttribute('disabled', 'true') | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment