LLMS_MailHawk::output_js( $additional_js = '' )
Output some quick and dirty inline JS.
Contents
Return Return
(void)
Source Source
File: includes/admin/class-llms-mailhawk.php
public function output_js( $additional_js = '' ) { if ( ! $this->should_output_inline() ) { return; } ?> <script> jQuery( '#llms-mailhawk-connect' ).on( 'click', function( e ) { e.preventDefault(); LLMS.Spinner.start( jQuery( this ), 'small' ); var data = { action: 'llms_mailhawk_remote_install', _llms_mailhawk_nonce: '<?php echo wp_create_nonce( 'llms-mailhawk-install' ); ?>', }; window.llms.emailConnectors.remoteInstall( jQuery( this ), data, function( res ) { window.llms.emailConnectors.registerClient( res.register_url, { 'mailhawk_plugin_signup': 'yes', 'state': res.client_state, 'redirect_uri': res.redirect_uri, 'partner_id': res.partner_id } ); } ); } ); </script> <?php }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.40.0 | Introduced. |