Created
June 9, 2023 03:37
-
-
Save MarkKevin08/2196c55c6f770a3a4aa90afa26d96922 to your computer and use it in GitHub Desktop.
Open booking resources editor in new tab
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
function wcv_add_target_blank_for_button() { | |
?> | |
<script> | |
jQuery(document).ready(function ($) { | |
let $manageResource = $('.button.button-primary.add_resource').next(); | |
if ($manageResource.length) { | |
$manageResource.attr('target', '_blank'); | |
} | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'wcv_add_target_blank_for_button' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment