Home / Admin / Opening booking resources editor in new tab
Duplicate Snippet

Embed Snippet on Your Site

Opening booking resources editor in new tab

This snippet will open the booking resources editor in a new tab instead of opening it in the current tab.

Code Preview
php
<?php
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' );

Comments

Add a Comment