MP_Addon_Push_Leads::abandoned_send_push( mixed $post )

Abandoned Lead Push Notification Metabox.


Parameters Parameters

$post

(mixed) (Required) post data


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: calculator-push-notification-add-on/inc/MP_Addon_Push_Leads.php

	public function abandoned_send_push(\WP_Post $post ) {

		$push_allow = isset( get_option( MortgagePlatform::$prefix . 'email' )['allow_browser_notification'] ) ? get_option( MortgagePlatform::$prefix . 'email' )['allow_browser_notification'] : false;

		if ( $push_allow ) {
			?>
			<script>
				if (jQuery('.send_message_tabs')) {
					$tab = '<li data-tab="send_message_tab_push"><?php esc_html_e( ' Push Notification', 'CalculatorsPushNotificationAddon' ); ?></li>';
					jQuery('.send_message_tabs').append($tab);
				}
			</script>

			<div class="send_message__wrapper" id="send_message_tab_push">
				<label><?php esc_html_e( 'Title', 'CalculatorsPushNotificationAddon' ); ?>
					<input type="text" name="send_message_push_subject">
				</label>

				<label><?php esc_html_e( 'Text Notification', 'CalculatorsPushNotificationAddon' ); ?>
					<input  type="text" name="send_message_push_text" >
				</label>
				<label><?php esc_html_e( 'URL', 'CalculatorsPushNotificationAddon' ); ?>
					<input  type="text" name="send_message_push_url" >
				</label>
				<button data-leadid="<?php echo esc_attr( $post->ID ); ?>" id="send_push_lead" data-leadid="<?php echo esc_attr( $post->ID ); ?>" class="button send_message_lead__button"><?php echo esc_html__( 'Push Notification', 'CalculatorsPushNotificationAddon' ); ?></button>
			</div>
			<?php
		}

		return $post;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.