diff --git a/assets/js/admin.js b/assets/js/admin.js index 85ebdd8..e719c7c 100755 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -39,7 +39,7 @@ jQuery(document).ready(function ($) { file_frame.open(); }; - jQuery('#upload_media_file_button').click(function (event) { + jQuery('.upload_media_file').click(function (event) { event.preventDefault(); jQuery.fn.ssp_upload_media_file(jQuery(this), false); }); diff --git a/assets/js/scripts.js b/assets/js/scripts.js deleted file mode 100644 index 13309f6..0000000 --- a/assets/js/scripts.js +++ /dev/null @@ -1,62 +0,0 @@ -jQuery('document').ready(function ($) { - // Simple AJAX listeners - $(document).bind("ajaxSend", function () { - $('.btn-primary').attr('disabled', 'disabled'); - }).bind("ajaxComplete", function () { - $('.btn-primary').removeAttr('disabled'); - }); - - // Submit quiz results - $('#submit-results').click(function (e) { - e.preventDefault(); - var form = $('#days-on-market'); - - $.ajax({ - type: 'POST', - url: DaysOnMarket.ajaxurl, - data: form.serialize(), - dataType: 'json', - beforeSend: function () { - $('#submit-results').html(' Processing...'); - }, - async: true, - success: function (response) { - setTimeout(function () { - $('#get-results-modal').modal('hide'); - $('body').removeClass('modal-open'); - $('#days-on-market,.modal-backdrop').remove(); - $('.results').show(); - - var retargeting = $('#retargeting').val(), - conversion = $('#conversion').val(); - if (conversion != '') { - if (conversion !== retargeting) { - !function (f, b, e, v, n, t, s) { - if (f.fbq)return; - n = f.fbq = function () { - n.callMethod ? - n.callMethod.apply(n, arguments) : n.queue.push(arguments) - }; - if (!f._fbq)f._fbq = n; - n.push = n; - n.loaded = !0; - n.version = '2.0'; - n.queue = []; - t = b.createElement(e); - t.async = !0; - t.src = v; - s = b.getElementsByTagName(e)[0]; - s.parentNode.insertBefore(t, s) - }(window, - document, 'script', '//connect.facebook.net/en_US/fbevents.js'); - - fbq('init', conversion); - } - - fbq('track', "Lead"); - } - }, 1000); - } - }); - }); -}); \ No newline at end of file diff --git a/classes/class-program-page.php b/classes/class-program-page.php index 6cf17b1..8f02f1c 100755 --- a/classes/class-program-page.php +++ b/classes/class-program-page.php @@ -287,7 +287,7 @@ public function meta_box_content($post, $meta) $html .= '

' . $v['description'] . '

' . "\n"; $html .= '' . "\n"; } elseif ($type == 'url') { - $html .= '' . "\n"; + $html .= '' . "\n"; $html .= '

' . $v['description'] . '

' . "\n"; $html .= '' . "\n"; } else { @@ -390,16 +390,6 @@ public function enqueue_scripts() wp_enqueue_style($this->token); wp_enqueue_style('animate'); wp_enqueue_style('source-sans'); - - wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [ - 'jquery' - ], PROGRAM_PAGE_PLUGIN_VERSION); - wp_enqueue_script($this->token . '-js'); - - $localize = [ - 'ajaxurl' => admin_url('admin-ajax.php'), - ]; - wp_localize_script($this->token . '-js', 'ProgramPage', $localize); } } @@ -437,9 +427,27 @@ public function get_custom_fields_settings($meta_box) 'section' => 'info' ]; + $fields['cta'] = [ + 'name' => __('Call To Action', $this->token), + 'description' => __('The call to action for your page', $this->token), + 'placeholder' => 'WATCH THE VIDEO', + 'type' => 'text', + 'default' => 'WATCH THE VIDEO', + 'section' => 'info' + ]; + + $fields['cta_url'] = [ + 'name' => __('Call To Action URL', $this->token), + 'description' => __('The URL the user is directed to upon clicking the CTA button.', $this->token), + 'placeholder' => '', + 'type' => 'text', + 'default' => '', + 'section' => 'info' + ]; + $fields['video_url'] = [ - 'name' => __('Video URL', $this->token), - 'description' => __('The URL for the video on your page.', $this->token), + 'name' => __('Video Embed URL', $this->token), + 'description' => __('The embed code for your program video.', $this->token), 'placeholder' => '', 'type' => 'text', 'default' => '', diff --git a/program-page.php b/program-page.php index 615e9cb..15b683f 100755 --- a/program-page.php +++ b/program-page.php @@ -1,7 +1,7 @@
- WATCH THE VIDEO +
@@ -142,7 +144,7 @@
- +
@@ -255,15 +257,30 @@ - - - + + + \ No newline at end of file