Email Before Download - Version 5.0.8

Version Description

Download this release

Release Info

Developer mandsconsulting
Plugin Icon 128x128 Email Before Download
Version 5.0.8
Comparing to
See all releases

Code changes from version 5.0.7 to 5.0.8

admin/class-email-before-download-admin.php CHANGED
@@ -64,7 +64,9 @@ class Email_Before_Download_Admin
64
  $this->version,
65
  true);
66
  }
67
-
 
 
68
  public function add_options_page()
69
  {
70
  $this->plugin_screen_hook_suffix = add_options_page(
@@ -93,7 +95,8 @@ class Email_Before_Download_Admin
93
 
94
  public function display_options_page()
95
  {
96
- include_once 'partials/email-before-download-admin-display.php';
 
97
  }
98
  public function display_links_page()
99
  {
@@ -182,6 +185,7 @@ class Email_Before_Download_Admin
182
 
183
  }
184
 
 
185
  public function email_before_download_inline_cb()
186
  {
187
  echo '<div class="ebd_section_description">' . __('The following settings apply if you selected "Inline Link" or "Both" as the Delivery Format ', 'email-before-download') . '</div>';
64
  $this->version,
65
  true);
66
  }
67
+ public function flush_api(){
68
+ flush_rewrite_rules();
69
+ }
70
  public function add_options_page()
71
  {
72
  $this->plugin_screen_hook_suffix = add_options_page(
95
 
96
  public function display_options_page()
97
  {
98
+
99
+ include_once 'partials/email-before-download-admin-display.php';
100
  }
101
  public function display_links_page()
102
  {
185
 
186
  }
187
 
188
+
189
  public function email_before_download_inline_cb()
190
  {
191
  echo '<div class="ebd_section_description">' . __('The following settings apply if you selected "Inline Link" or "Both" as the Delivery Format ', 'email-before-download') . '</div>';
admin/class-email-before-download-table.php CHANGED
@@ -131,11 +131,11 @@ class Email_Before_download_Table extends WP_List_Table
131
  'expire_time' => "Expires"
132
  ),
133
  'sortable' => array(
134
- 'email' => ['email', true],
135
- 'is_downloaded' => ['is_downloaded', true],
136
- 'time_requested' => ['time_requested', true],
137
- 'delivered_as' => ['delivered_as', true],
138
- 'expire_time' => ['expire_time', true],
139
  ),
140
  'purge_text' => __("Purge Expired Links",'email-before-download')
141
  );
@@ -149,9 +149,9 @@ class Email_Before_download_Table extends WP_List_Table
149
  'posted_data' => "XML Data"
150
  ),
151
  'sortable' => array(
152
- 'email' => ['email', true],
153
- 'is_downloaded' => ['is_downloaded', true],
154
- 'time_requested' => ['time_requested', true],
155
  ),
156
  'purge_text' => __("Purge Logs",'email-before-download')
157
  );
131
  'expire_time' => "Expires"
132
  ),
133
  'sortable' => array(
134
+ 'email' => array('email', true),
135
+ 'is_downloaded' => array('is_downloaded', true),
136
+ 'time_requested' => array('time_requested', true),
137
+ 'delivered_as' => array('delivered_as', true),
138
+ 'expire_time' => array('expire_time', true),
139
  ),
140
  'purge_text' => __("Purge Expired Links",'email-before-download')
141
  );
149
  'posted_data' => "XML Data"
150
  ),
151
  'sortable' => array(
152
+ 'email' => array('email', true),
153
+ 'is_downloaded' => array('is_downloaded', true),
154
+ 'time_requested' => array('time_requested', true),
155
  ),
156
  'purge_text' => __("Purge Logs",'email-before-download')
157
  );
assets/banner-1544x500.jpg ADDED
Binary file
assets/banner-772x250.jpg ADDED
Binary file
assets/icon-128x128.jpg ADDED
Binary file
assets/icon-256x256.jpg ADDED
Binary file
screenshot-1.png → assets/screenshot-1.png RENAMED
File without changes
screenshot-2.png → assets/screenshot-2.png RENAMED
File without changes
screenshot-3.png → assets/screenshot-3.png RENAMED
File without changes
screenshot-4.png → assets/screenshot-4.png RENAMED
File without changes
screenshot-5.png → assets/screenshot-5.png RENAMED
File without changes
screenshot-6.png → assets/screenshot-6.png RENAMED
File without changes
screenshot-7.png → assets/screenshot-7.png RENAMED
File without changes
email-before-download.php CHANGED
@@ -11,7 +11,7 @@
11
  * @wordpress-plugin
12
  * Plugin Name: Email Before Download
13
  * Plugin URI: mandsconsulting.com
14
- * Version: 5.0.7
15
  * Author: M&S Consulting
16
  * Author URI: mandsconsulting.com
17
  * License: GPL-2.0+
@@ -25,7 +25,7 @@ if ( ! defined( 'WPINC' ) ) {
25
  }
26
 
27
 
28
- define( 'PLUGIN_NAME_VERSION', '5.0.7' );
29
 
30
  function activate_email_before_download() {
31
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-email-before-download-activator.php';
11
  * @wordpress-plugin
12
  * Plugin Name: Email Before Download
13
  * Plugin URI: mandsconsulting.com
14
+ * Version: 5.0.8
15
  * Author: M&S Consulting
16
  * Author URI: mandsconsulting.com
17
  * License: GPL-2.0+
25
  }
26
 
27
 
28
+ define( 'PLUGIN_NAME_VERSION', '5.0.8' );
29
 
30
  function activate_email_before_download() {
31
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-email-before-download-activator.php';
includes/class-email-before-download-downloader.php CHANGED
@@ -58,4 +58,7 @@ class Email_Before_download_Downloader
58
  if ($link->expire_time < time()) return true;
59
  return false;
60
  }
 
 
 
61
  }
58
  if ($link->expire_time < time()) return true;
59
  return false;
60
  }
61
+ public function update_link($download, $version) {
62
+
63
+ }
64
  }
includes/class-email-before-download-form.php CHANGED
@@ -25,7 +25,7 @@ class Email_Before_Download_Form
25
 
26
  public function html()
27
  {
28
- $raw = "<div id='ebdForm'>".do_shortcode("[contact-form-7 id=\"$this->form_id\" ]")."</div>";
29
  $form = new DOMDocument;
30
  $form->formatOutput = true;
31
  $form->loadHTML($raw);
@@ -126,12 +126,11 @@ class Email_Before_Download_Form
126
  $formSelector = str_replace('-','',$formID);
127
  $formObject->formatOutput = true;
128
  $script = "<script> var ". $formSelector. "selectors = \"div#$formID > form > .ebd_input > input\";
129
- var ". $formSelector. "cf7_p = \"div#$formID > form > .cf7_input\";
130
  jQuery( ". $formSelector. "selectors ).on( \"click\", function () {
131
  var ". $formSelector. "n = jQuery( ". $formSelector. "selectors+\":checked\" ).length;
132
 
133
- if(". $formSelector. "n > 0) jQuery( ". $formSelector. "cf7_p ).show();
134
- else jQuery( ". $formSelector. "cf7_p ).hide();
135
  } );</script>";
136
  $formObject->loadHTML($script);
137
  $node = $formObject->getElementsByTagName("script");
25
 
26
  public function html()
27
  {
28
+ $raw = do_shortcode("[contact-form-7 id=\"$this->form_id\" ]");
29
  $form = new DOMDocument;
30
  $form->formatOutput = true;
31
  $form->loadHTML($raw);
126
  $formSelector = str_replace('-','',$formID);
127
  $formObject->formatOutput = true;
128
  $script = "<script> var ". $formSelector. "selectors = \"div#$formID > form > .ebd_input > input\";
 
129
  jQuery( ". $formSelector. "selectors ).on( \"click\", function () {
130
  var ". $formSelector. "n = jQuery( ". $formSelector. "selectors+\":checked\" ).length;
131
 
132
+ if(". $formSelector. "n > 0) jQuery(\"div#$formID form \").children().not('.ebd_input').show();
133
+ else jQuery(\"div#$formID form \").children().not('.ebd_input').hide();
134
  } );</script>";
135
  $formObject->loadHTML($script);
136
  $node = $formObject->getElementsByTagName("script");
includes/class-email-before-download-process.php CHANGED
@@ -264,7 +264,7 @@ class Email_Before_Download_Process
264
  {
265
  $blacklist = strtolower(get_option('email_before_download_forbidden',""));
266
  if ($blacklist == "") return false;
267
- $blacklist = str_replace(array("\r", "\n"), '', $blacklist);
268
  $email = explode('@', $email);
269
  $domain = $email[1];
270
  if (strpos($blacklist, ',')) {
264
  {
265
  $blacklist = strtolower(get_option('email_before_download_forbidden',""));
266
  if ($blacklist == "") return false;
267
+ $blacklist = str_replace(array("\r", "\n",'@'), '', $blacklist);
268
  $email = explode('@', $email);
269
  $domain = $email[1];
270
  if (strpos($blacklist, ',')) {
includes/class-email-before-download.php CHANGED
@@ -65,6 +65,7 @@ class Email_Before_Download {
65
  $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' );
66
  $this->loader->add_action( 'admin_post_ebd.csv',$plugin_admin, 'print_csv' );
67
  $this->loader->add_action( 'admin_post_ebd.purge',$plugin_admin, 'purge_data' );
 
68
 
69
 
70
  }
65
  $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' );
66
  $this->loader->add_action( 'admin_post_ebd.csv',$plugin_admin, 'print_csv' );
67
  $this->loader->add_action( 'admin_post_ebd.purge',$plugin_admin, 'purge_data' );
68
+ $this->loader->add_action('upgrader_process_complete', $plugin_admin, 'flush_api');
69
 
70
 
71
  }
public/class-email-before-download-public.php CHANGED
File without changes
public/css/email-before-download-public.css CHANGED
File without changes
readme.txt CHANGED
@@ -106,6 +106,11 @@ This is the list of all short code attributes that can be used. Some of them o
106
 
107
 
108
  == Changelog ==
 
 
 
 
 
109
  =5.0.7=
110
  * Fixed issue with [your-message] not being parsed properly
111
  * Fixed downloaded files not showing in admin email
106
 
107
 
108
  == Changelog ==
109
+
110
+ =5.0.8=
111
+ * Fixed issue with older versions of PHP giving parse errors.
112
+ * Added banner and icons for plugin.
113
+
114
  =5.0.7=
115
  * Fixed issue with [your-message] not being parsed properly
116
  * Fixed downloaded files not showing in admin email