/** * Hide immediately * * @brief Hide */ public function hide() { WPDKHTML::startCompress(); ?> <script type="text/javascript"> jQuery( function ( $ ) { $( '#<?php echo $this->id; ?> ' ).wpdkModal( 'hide' ); } ); </script> <?php echo WPDKHTML::endJavascriptCompress(); }
/** * Prints any scripts and data queued for the footer. * Right way to add a editor button in HTML view. */ public function admin_print_footer_scripts() { WPDKHTML::startCompress(); ?> <script type="text/javascript"> (function () { QTags.addButton( 'wpdk_shortcodes_button', '[]', function () { QTags.insertContent( 'Insert by No rich!!' ); WPDKMCE.openDialog(); } ); })(); </script> <?php echo WPDKHTML::endJavascriptCompress(); }