Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
770 B
7
Indexable
Never
add_action('marketking_dashboard_head', function(){
	?>
	<script>
		jQuery(document).ready(function(){
			jQuery('#media_upload_dashboard').on('click', function(e) {
		       e.preventDefault();

		       var image = wp.media({ 
		           title: marketking_display_settings.upload_image,
		           multiple: false
		       }).open()
		       .on('select', function(e){
		          
		       });
		   	});
		});
	</script>
	<?php
});

add_action('marketking_extend_menu', function($menu){
	?>
	<li class="nk-menu-item">
		<a href="https://test.com" class="nk-menu-link" id="media_upload_dashboard">
			<span class="nk-menu-icon"><em class="icon ni ni-img"></em></span>
			<span class="nk-menu-text">Media</span>
		</a>
	</li><!-- .nk-menu-item -->
	<?php
}, 10, 1);
Leave a Comment