Email Before Download - Version 5.1.4

Version Description

Download this release

Release Info

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

Code changes from version 5.1.3 to 5.1.4

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.1.3
15
  * Author: M&S Consulting
16
  * Author URI: mandsconsulting.com
17
  * License: GPL-2.0+
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  die;
25
  }
26
 
27
- define( 'PLUGIN_NAME_VERSION', '5.1.3' );
28
 
29
  function activate_email_before_download() {
30
  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.1.4
15
  * Author: M&S Consulting
16
  * Author URI: mandsconsulting.com
17
  * License: GPL-2.0+
24
  die;
25
  }
26
 
27
+ define( 'PLUGIN_NAME_VERSION', '5.1.4' );
28
 
29
  function activate_email_before_download() {
30
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-email-before-download-activator.php';
includes/class-email-before-download-activator.php CHANGED
@@ -25,7 +25,7 @@ class Email_Before_Download_Activator
25
  foreach ($plugins as $plugin) {
26
  echo("<strong>$plugin</strong><br>");
27
  }
28
- @trigger_error(__('missing dependencies', 'ap'), E_USER_ERROR);
29
  }
30
  global $wpdb;
31
 
25
  foreach ($plugins as $plugin) {
26
  echo("<strong>$plugin</strong><br>");
27
  }
28
+ @trigger_error('missing dependencies', E_USER_ERROR);
29
  }
30
  global $wpdb;
31
 
includes/class-email-before-download-process.php CHANGED
@@ -44,6 +44,7 @@ class Email_Before_Download_Process
44
  $form_obj->set_properties(array('mail' => $newMail));
45
  return $form_obj;
46
  }
 
47
  private function reply($mail,$links){
48
  $message = "The downloaded file name(s): ";
49
  foreach ($links as $link){
44
  $form_obj->set_properties(array('mail' => $newMail));
45
  return $form_obj;
46
  }
47
+
48
  private function reply($mail,$links){
49
  $message = "The downloaded file name(s): ";
50
  foreach ($links as $link){
includes/class-email-before-download.php CHANGED
@@ -22,16 +22,12 @@ class Email_Before_Download {
22
  public function __construct() {
23
  $this->version = PLUGIN_NAME_VERSION;
24
  $this->plugin_name = 'email-before-download';
25
-
26
  $this->load_dependencies();
27
  $this->set_locale();
28
  $this->define_admin_hooks();
29
  $this->define_public_hooks();
30
  $this->define_process_hooks();
31
- $this->define_downloader_hooks();
32
  $this->build_shortcode();
33
-
34
-
35
  }
36
 
37
  private function load_dependencies() {
@@ -48,14 +44,10 @@ class Email_Before_Download {
48
  $this->loader = new Email_Before_Download_Loader();
49
 
50
  }
51
-
52
-
53
  private function set_locale() {
54
  $plugin_i18n = new Email_Before_Download_i18n();
55
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
56
  }
57
-
58
-
59
  private function define_admin_hooks() {
60
  $plugin_admin = new Email_Before_Download_Admin( $this->get_plugin_name(), $this->get_version() );
61
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
@@ -64,21 +56,17 @@ class Email_Before_Download {
64
  $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' );
65
  $this->loader->add_action( 'admin_post_ebd.csv',$plugin_admin, 'print_csv' );
66
  $this->loader->add_action( 'admin_post_ebd.purge',$plugin_admin, 'purge_data' );
67
-
68
-
69
  }
70
 
71
-
72
  private function define_public_hooks() {
73
 
74
  $plugin_public = new Email_Before_Download_Public( $this->get_plugin_name(), $this->get_version() );
75
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
76
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
77
  $this->loader->add_filter( 'the_content', $plugin_public,'shortcode_cleanup');
78
- $this->loader->add_action('wp_ajax_ebd_inline_links', $plugin_public, 'ebd_ajax');
79
- $this->loader->add_action('wp_ajax_nopriv_ebd_inline_links', $plugin_public, 'ebd_ajax');
80
- $this->loader->add_filter('dlm_can_download', $plugin_public, 'record',10,2);
81
-
82
  }
83
  private function define_process_hooks(){
84
  $plugin_process = new Email_Before_Download_Process( $this->get_plugin_name(), $this->get_version() );
@@ -86,15 +74,9 @@ class Email_Before_Download {
86
  $this->loader->add_filter('wpcf7_validate', $plugin_process, 'check_blacklist',10,2);
87
  }
88
 
89
- private function define_downloader_hooks(){
90
-
91
-
92
- }
93
-
94
  public function build_shortcode(){
95
  add_shortcode('email-download' ,array( new Email_Before_Download_Shortcode( $this->get_plugin_name(), $this->get_version() ),'init_shortcode') );
96
  add_shortcode('emailreq' ,array( new Email_Before_Download_Shortcode( $this->get_plugin_name(), $this->get_version() ),'init_shortcode') );
97
-
98
  }
99
 
100
  public function run() {
22
  public function __construct() {
23
  $this->version = PLUGIN_NAME_VERSION;
24
  $this->plugin_name = 'email-before-download';
 
25
  $this->load_dependencies();
26
  $this->set_locale();
27
  $this->define_admin_hooks();
28
  $this->define_public_hooks();
29
  $this->define_process_hooks();
 
30
  $this->build_shortcode();
 
 
31
  }
32
 
33
  private function load_dependencies() {
44
  $this->loader = new Email_Before_Download_Loader();
45
 
46
  }
 
 
47
  private function set_locale() {
48
  $plugin_i18n = new Email_Before_Download_i18n();
49
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
50
  }
 
 
51
  private function define_admin_hooks() {
52
  $plugin_admin = new Email_Before_Download_Admin( $this->get_plugin_name(), $this->get_version() );
53
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
56
  $this->loader->add_action( 'admin_init', $plugin_admin, 'register_settings' );
57
  $this->loader->add_action( 'admin_post_ebd.csv',$plugin_admin, 'print_csv' );
58
  $this->loader->add_action( 'admin_post_ebd.purge',$plugin_admin, 'purge_data' );
 
 
59
  }
60
 
 
61
  private function define_public_hooks() {
62
 
63
  $plugin_public = new Email_Before_Download_Public( $this->get_plugin_name(), $this->get_version() );
64
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
65
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
66
  $this->loader->add_filter( 'the_content', $plugin_public,'shortcode_cleanup');
67
+ $this->loader->add_action('wp_ajax_ebd_inline_links', $plugin_public, 'ebd_ajax');
68
+ $this->loader->add_action('wp_ajax_nopriv_ebd_inline_links', $plugin_public, 'ebd_ajax');
69
+ $this->loader->add_filter('dlm_can_download', $plugin_public, 'record',10,2);
 
70
  }
71
  private function define_process_hooks(){
72
  $plugin_process = new Email_Before_Download_Process( $this->get_plugin_name(), $this->get_version() );
74
  $this->loader->add_filter('wpcf7_validate', $plugin_process, 'check_blacklist',10,2);
75
  }
76
 
 
 
 
 
 
77
  public function build_shortcode(){
78
  add_shortcode('email-download' ,array( new Email_Before_Download_Shortcode( $this->get_plugin_name(), $this->get_version() ),'init_shortcode') );
79
  add_shortcode('emailreq' ,array( new Email_Before_Download_Shortcode( $this->get_plugin_name(), $this->get_version() ),'init_shortcode') );
 
80
  }
81
 
82
  public function run() {
public/class-email-before-download-public.php CHANGED
@@ -117,8 +117,8 @@ public function record($allowed, $download){
117
 
118
  $inEBD = $db->skip_check($downloadID);
119
  if($inEBD){
120
- if(!isset($_GET['uid']))
121
- wp_die(__('No direct access. Please fill out a new form to generate a new link.', 'email-before-download'));
122
 
123
  $link = $db->select_link('uid', $_GET['uid']);
124
 
117
 
118
  $inEBD = $db->skip_check($downloadID);
119
  if($inEBD){
120
+ // if(!isset($_GET['uid']))
121
+ // wp_die(__('No direct access. Please fill out a new form to generate a new link.', 'email-before-download'));
122
 
123
  $link = $db->select_link('uid', $_GET['uid']);
124
 
readme.txt CHANGED
@@ -106,8 +106,13 @@ This is the list of all short code attributes that can be used. Some of them o
106
 
107
 
108
  == Changelog ==
 
 
 
 
109
  =5.1.3=
110
  * fixed issue with link displaying when email only selected.
 
111
  =5.1.2=
112
  * Simplified use of PHPDomDocument to better function with older versions of PHP
113
  * Let Javascript do more of the work for hiding/showing forms
106
 
107
 
108
  == Changelog ==
109
+
110
+ =5.1.4=
111
+ * fixed issue where some people where getting direct access errors
112
+
113
  =5.1.3=
114
  * fixed issue with link displaying when email only selected.
115
+
116
  =5.1.2=
117
  * Simplified use of PHPDomDocument to better function with older versions of PHP
118
  * Let Javascript do more of the work for hiding/showing forms