Completed
Branch BUG/11268/session-ticket-relea... (71e39e)
by
unknown
27:50 queued 13:47
created
message_type/newsletter/EE_Messages_Email_Newsletter_Validator.class.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @since           4.3.0
8 8
  */
9 9
 if (! defined('EVENT_ESPRESSO_VERSION')) {
10
-    exit('No direct script access allowed');
10
+	exit('No direct script access allowed');
11 11
 }
12 12
 
13 13
 /**
@@ -21,59 +21,59 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class EE_Messages_Email_Newsletter_Validator extends EE_Messages_Validator
23 23
 {
24
-    public function __construct($fields, $context)
25
-    {
26
-        $this->_m_name = 'email';
27
-        $this->_mt_name = 'newsletter';
24
+	public function __construct($fields, $context)
25
+	{
26
+		$this->_m_name = 'email';
27
+		$this->_mt_name = 'newsletter';
28 28
 
29
-        parent::__construct($fields, $context);
30
-    }
29
+		parent::__construct($fields, $context);
30
+	}
31 31
 
32
-    /**
33
-     * custom validator (restricting what was originally set by the messenger)
34
-     */
35
-    protected function _modify_validator()
36
-    {
37
-        if ($this->_context == 'attendee') {
38
-            $this->_valid_shortcodes_modifier[$this->_context]['from'] = array(
39
-                'recipient_details',
40
-                'email',
41
-                'organization',
42
-            );
43
-        }
32
+	/**
33
+	 * custom validator (restricting what was originally set by the messenger)
34
+	 */
35
+	protected function _modify_validator()
36
+	{
37
+		if ($this->_context == 'attendee') {
38
+			$this->_valid_shortcodes_modifier[$this->_context]['from'] = array(
39
+				'recipient_details',
40
+				'email',
41
+				'organization',
42
+			);
43
+		}
44 44
 
45
-        //excluded shortcodes
46
-        $fields = array('to', 'from', 'subject', 'content', 'newsletter_content');
47
-        foreach ($fields as $field) {
48
-            $this->_specific_shortcode_excludes[$field] = array(
49
-                '[RECIPIENT_REGISTRATION_CODE]',
50
-                '[EVENT_AUTHOR_FORMATTED_EMAIL]',
51
-                '[EVENT_AUTHOR_EMAIL]',
52
-            );
53
-        }
54
-        $add_excludes = array(
55
-            '[RECIPIENT_FNAME]',
56
-            '[RECIPIENT_LNAME]',
57
-            '[RECIPIENT_EMAIL]',
58
-            '[COMPANY]',
59
-            '[CO_ADD1]',
60
-            '[CO_ADD2]',
61
-            '[CO_CITY]',
62
-            '[CO_STATE]',
63
-            '[CO_ZIP]',
64
-            '[CO_LOGO]',
65
-            '[CO_PHONE]',
66
-            '[CO_LOGO_URL]',
67
-            '[CO_FACEBOOK_URL]',
68
-            '[CO_TWITTER_URL]',
69
-            '[CO_PINTEREST_URL]',
70
-            '[CO_GOOGLE_URL]',
71
-            '[CO_LINKEDIN_URL]',
72
-            '[CO_INSTAGRAM_URL]',
73
-        );
74
-        $this->_specific_shortcode_excludes['from'] = array_merge($this->_specific_shortcode_excludes['from'],
75
-            $add_excludes);
76
-        $this->_specific_shortcode_excludes['content'] = array_merge($this->_specific_shortcode_excludes['content'],
77
-            array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'));
78
-    }
45
+		//excluded shortcodes
46
+		$fields = array('to', 'from', 'subject', 'content', 'newsletter_content');
47
+		foreach ($fields as $field) {
48
+			$this->_specific_shortcode_excludes[$field] = array(
49
+				'[RECIPIENT_REGISTRATION_CODE]',
50
+				'[EVENT_AUTHOR_FORMATTED_EMAIL]',
51
+				'[EVENT_AUTHOR_EMAIL]',
52
+			);
53
+		}
54
+		$add_excludes = array(
55
+			'[RECIPIENT_FNAME]',
56
+			'[RECIPIENT_LNAME]',
57
+			'[RECIPIENT_EMAIL]',
58
+			'[COMPANY]',
59
+			'[CO_ADD1]',
60
+			'[CO_ADD2]',
61
+			'[CO_CITY]',
62
+			'[CO_STATE]',
63
+			'[CO_ZIP]',
64
+			'[CO_LOGO]',
65
+			'[CO_PHONE]',
66
+			'[CO_LOGO_URL]',
67
+			'[CO_FACEBOOK_URL]',
68
+			'[CO_TWITTER_URL]',
69
+			'[CO_PINTEREST_URL]',
70
+			'[CO_GOOGLE_URL]',
71
+			'[CO_LINKEDIN_URL]',
72
+			'[CO_INSTAGRAM_URL]',
73
+		);
74
+		$this->_specific_shortcode_excludes['from'] = array_merge($this->_specific_shortcode_excludes['from'],
75
+			$add_excludes);
76
+		$this->_specific_shortcode_excludes['content'] = array_merge($this->_specific_shortcode_excludes['content'],
77
+			array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'));
78
+	}
79 79
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @subpackage      helpers
7 7
  * @since           4.3.0
8 8
  */
9
-if (! defined('EVENT_ESPRESSO_VERSION')) {
9
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
10 10
     exit('No direct script access allowed');
11 11
 }
12 12
 
Please login to merge, or discard this patch.
messages/message_type/newsletter/EE_Newsletter_message_type.class.php 2 patches
Indentation   +147 added lines, -147 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @since           4.3.0
8 8
  */
9 9
 if (! defined('EVENT_ESPRESSO_VERSION')) {
10
-    exit('No direct script access allowed');
10
+	exit('No direct script access allowed');
11 11
 }
12 12
 
13 13
 /**
@@ -23,152 +23,152 @@  discard block
 block discarded – undo
23 23
 class EE_Newsletter_message_type extends EE_message_type
24 24
 {
25 25
 
26
-    public function __construct()
27
-    {
28
-        $this->name = 'newsletter';
29
-        $this->description = __('Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
30
-            'event_espresso');
31
-        $this->label = array(
32
-            'singular' => __('batch', 'event_espresso'),
33
-            'plural'   => __('batches', 'event_espresso'),
34
-        );
35
-        $this->_master_templates = array(
36
-            'email' => 'registration',
37
-        );
38
-
39
-        parent::__construct();
40
-    }
41
-
42
-
43
-    protected function _set_admin_pages()
44
-    {
45
-        $this->admin_registered_pages = array(); //no admin pages to register this with.
46
-    }
47
-
48
-
49
-    protected function _set_data_handler()
50
-    {
51
-        $this->_data_handler = 'Registrations';
52
-        $this->_single_message = $this->_data instanceof EE_Registration;
53
-    }
54
-
55
-
56
-    protected function _get_data_for_context($context, EE_Registration $registration, $id)
57
-    {
58
-        //newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
59
-        return array($registration);
60
-    }
61
-
62
-
63
-    protected function _set_admin_settings_fields()
64
-    {
65
-        $this->_admin_settings_fields = array();
66
-    }
67
-
68
-
69
-    protected function _set_contexts()
70
-    {
71
-        $this->_context_label = array(
72
-            'label'       => __('recipient', 'event_espresso'),
73
-            'plural'      => __('recipients', 'event_espresso'),
74
-            'description' => __('Recipient\'s are who will receive the message.', 'event_espresso'),
75
-        );
76
-
77
-        $this->_contexts = array(
78
-            'attendee' => array(
79
-                'label'       => __('Registrant', 'event_espresso'),
80
-                'description' => __('This template goes to selected registrants.', 'event_espresso'),
81
-            ),
82
-        );
83
-    }
84
-
85
-
86
-    /**
87
-     * used to set the valid shortcodes.
88
-     * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
89
-     * organization.  That's it!
90
-     *
91
-     * @since   4.3.0
92
-     * @return  void
93
-     */
94
-    protected function _set_valid_shortcodes()
95
-    {
96
-        parent::_set_valid_shortcodes();
97
-
98
-        $included_shortcodes = array(
99
-            'recipient_details',
100
-            'organization',
101
-            'newsletter',
102
-        );
103
-
104
-        foreach ($this->_valid_shortcodes as $context => $shortcodes) {
105
-            foreach ($shortcodes as $key => $shortcode) {
106
-                if (! in_array($shortcode, $included_shortcodes)) {
107
-                    unset($this->_valid_shortcodes[$context][$key]);
108
-                }
109
-            }
110
-            $this->_valid_shortcodes[$context][] = 'newsletter';
111
-        }
112
-
113
-    }
114
-
115
-
116
-    /**
117
-     * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
118
-     * for EE_message_type.
119
-     */
120
-    protected function _attendee_addressees()
121
-    {
122
-        $addressee = array();
123
-
124
-        //looping through registrations
125
-        foreach ($this->_data->registrations as $reg_id => $details) {
126
-            //set $attendee array to blank on each loop
127
-            $aee = array();
128
-
129
-            //need to get the attendee from this registration.
130
-            $attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
131
-                ? $details['att_obj']
132
-                : null;
133
-
134
-            if (! $attendee instanceof EE_Attendee) {
135
-                continue;
136
-            }
137
-
138
-            //set $aee from attendee object
139
-            $aee['att_obj'] = $attendee;
140
-            $aee['reg_objs'] = isset($this->_data->attendees[$attendee->ID()]['reg_objs'])
141
-                ? $this->_data->attendees[$attendee->ID()]['reg_objs']
142
-                : array();
143
-            $aee['attendee_email'] = $attendee->email();
144
-            $aee['tkt_objs'] = isset($this->_data->attendees[$attendee->ID()]['tkt_objs'])
145
-                ? $this->_data->attendees[$attendee->ID()]['tkt_objs']
146
-                : array();
147
-
148
-            if (isset($this->_data->attendees[$attendee->ID()]['evt_objs'])) {
149
-                $aee['evt_objs'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
150
-                $aee['events'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
151
-            } else {
152
-                $aee['evt_objs'] = $aee['events'] = array();
153
-            }
154
-
155
-            $aee['reg_obj'] = isset($details['reg_obj'])
156
-                ? $details['reg_obj']
157
-                : null;
158
-            $aee['attendees'] = $this->_data->attendees;
159
-
160
-            //merge in the primary attendee data
161
-            $aee = array_merge($this->_default_addressee_data, $aee);
162
-
163
-            //make sure txn is set
164
-            if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
165
-                $aee['txn'] = $aee['reg_obj']->transaction();
166
-            }
167
-
168
-            $addressee[] = new EE_Messages_Addressee($aee);
169
-        }
170
-        return $addressee;
171
-    }
26
+	public function __construct()
27
+	{
28
+		$this->name = 'newsletter';
29
+		$this->description = __('Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
30
+			'event_espresso');
31
+		$this->label = array(
32
+			'singular' => __('batch', 'event_espresso'),
33
+			'plural'   => __('batches', 'event_espresso'),
34
+		);
35
+		$this->_master_templates = array(
36
+			'email' => 'registration',
37
+		);
38
+
39
+		parent::__construct();
40
+	}
41
+
42
+
43
+	protected function _set_admin_pages()
44
+	{
45
+		$this->admin_registered_pages = array(); //no admin pages to register this with.
46
+	}
47
+
48
+
49
+	protected function _set_data_handler()
50
+	{
51
+		$this->_data_handler = 'Registrations';
52
+		$this->_single_message = $this->_data instanceof EE_Registration;
53
+	}
54
+
55
+
56
+	protected function _get_data_for_context($context, EE_Registration $registration, $id)
57
+	{
58
+		//newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
59
+		return array($registration);
60
+	}
61
+
62
+
63
+	protected function _set_admin_settings_fields()
64
+	{
65
+		$this->_admin_settings_fields = array();
66
+	}
67
+
68
+
69
+	protected function _set_contexts()
70
+	{
71
+		$this->_context_label = array(
72
+			'label'       => __('recipient', 'event_espresso'),
73
+			'plural'      => __('recipients', 'event_espresso'),
74
+			'description' => __('Recipient\'s are who will receive the message.', 'event_espresso'),
75
+		);
76
+
77
+		$this->_contexts = array(
78
+			'attendee' => array(
79
+				'label'       => __('Registrant', 'event_espresso'),
80
+				'description' => __('This template goes to selected registrants.', 'event_espresso'),
81
+			),
82
+		);
83
+	}
84
+
85
+
86
+	/**
87
+	 * used to set the valid shortcodes.
88
+	 * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
89
+	 * organization.  That's it!
90
+	 *
91
+	 * @since   4.3.0
92
+	 * @return  void
93
+	 */
94
+	protected function _set_valid_shortcodes()
95
+	{
96
+		parent::_set_valid_shortcodes();
97
+
98
+		$included_shortcodes = array(
99
+			'recipient_details',
100
+			'organization',
101
+			'newsletter',
102
+		);
103
+
104
+		foreach ($this->_valid_shortcodes as $context => $shortcodes) {
105
+			foreach ($shortcodes as $key => $shortcode) {
106
+				if (! in_array($shortcode, $included_shortcodes)) {
107
+					unset($this->_valid_shortcodes[$context][$key]);
108
+				}
109
+			}
110
+			$this->_valid_shortcodes[$context][] = 'newsletter';
111
+		}
112
+
113
+	}
114
+
115
+
116
+	/**
117
+	 * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
118
+	 * for EE_message_type.
119
+	 */
120
+	protected function _attendee_addressees()
121
+	{
122
+		$addressee = array();
123
+
124
+		//looping through registrations
125
+		foreach ($this->_data->registrations as $reg_id => $details) {
126
+			//set $attendee array to blank on each loop
127
+			$aee = array();
128
+
129
+			//need to get the attendee from this registration.
130
+			$attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
131
+				? $details['att_obj']
132
+				: null;
133
+
134
+			if (! $attendee instanceof EE_Attendee) {
135
+				continue;
136
+			}
137
+
138
+			//set $aee from attendee object
139
+			$aee['att_obj'] = $attendee;
140
+			$aee['reg_objs'] = isset($this->_data->attendees[$attendee->ID()]['reg_objs'])
141
+				? $this->_data->attendees[$attendee->ID()]['reg_objs']
142
+				: array();
143
+			$aee['attendee_email'] = $attendee->email();
144
+			$aee['tkt_objs'] = isset($this->_data->attendees[$attendee->ID()]['tkt_objs'])
145
+				? $this->_data->attendees[$attendee->ID()]['tkt_objs']
146
+				: array();
147
+
148
+			if (isset($this->_data->attendees[$attendee->ID()]['evt_objs'])) {
149
+				$aee['evt_objs'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
150
+				$aee['events'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
151
+			} else {
152
+				$aee['evt_objs'] = $aee['events'] = array();
153
+			}
154
+
155
+			$aee['reg_obj'] = isset($details['reg_obj'])
156
+				? $details['reg_obj']
157
+				: null;
158
+			$aee['attendees'] = $this->_data->attendees;
159
+
160
+			//merge in the primary attendee data
161
+			$aee = array_merge($this->_default_addressee_data, $aee);
162
+
163
+			//make sure txn is set
164
+			if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
165
+				$aee['txn'] = $aee['reg_obj']->transaction();
166
+			}
167
+
168
+			$addressee[] = new EE_Messages_Addressee($aee);
169
+		}
170
+		return $addressee;
171
+	}
172 172
 
173 173
 
174 174
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage      helpers
7 7
  * @since           4.3.0
8 8
  */
9
-if (! defined('EVENT_ESPRESSO_VERSION')) {
9
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
10 10
     exit('No direct script access allowed');
11 11
 }
12 12
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         foreach ($this->_valid_shortcodes as $context => $shortcodes) {
105 105
             foreach ($shortcodes as $key => $shortcode) {
106
-                if (! in_array($shortcode, $included_shortcodes)) {
106
+                if ( ! in_array($shortcode, $included_shortcodes)) {
107 107
                     unset($this->_valid_shortcodes[$context][$key]);
108 108
                 }
109 109
             }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 ? $details['att_obj']
132 132
                 : null;
133 133
 
134
-            if (! $attendee instanceof EE_Attendee) {
134
+            if ( ! $attendee instanceof EE_Attendee) {
135 135
                 continue;
136 136
             }
137 137
 
Please login to merge, or discard this patch.
espresso.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -38,103 +38,103 @@
 block discarded – undo
38 38
  * @since       4.0
39 39
  */
40 40
 if (function_exists('espresso_version')) {
41
-    if (! function_exists('espresso_duplicate_plugin_error')) {
42
-        /**
43
-         *    espresso_duplicate_plugin_error
44
-         *    displays if more than one version of EE is activated at the same time
45
-         */
46
-        function espresso_duplicate_plugin_error()
47
-        {
48
-            ?>
41
+	if (! function_exists('espresso_duplicate_plugin_error')) {
42
+		/**
43
+		 *    espresso_duplicate_plugin_error
44
+		 *    displays if more than one version of EE is activated at the same time
45
+		 */
46
+		function espresso_duplicate_plugin_error()
47
+		{
48
+			?>
49 49
             <div class="error">
50 50
                 <p>
51 51
                     <?php
52
-                    echo esc_html__(
53
-                        'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
-                        'event_espresso'
55
-                    ); ?>
52
+					echo esc_html__(
53
+						'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.',
54
+						'event_espresso'
55
+					); ?>
56 56
                 </p>
57 57
             </div>
58 58
             <?php
59
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
60
-        }
61
-    }
62
-    add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
59
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
60
+		}
61
+	}
62
+	add_action('admin_notices', 'espresso_duplicate_plugin_error', 1);
63 63
 
64 64
 } else {
65
-    define('EE_MIN_PHP_VER_REQUIRED', '5.3.9');
66
-    if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
67
-        /**
68
-         * espresso_minimum_php_version_error
69
-         * @return void
70
-         */
71
-        function espresso_minimum_php_version_error()
72
-        {
73
-            ?>
65
+	define('EE_MIN_PHP_VER_REQUIRED', '5.3.9');
66
+	if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) {
67
+		/**
68
+		 * espresso_minimum_php_version_error
69
+		 * @return void
70
+		 */
71
+		function espresso_minimum_php_version_error()
72
+		{
73
+			?>
74 74
             <div class="error">
75 75
                 <p>
76 76
                     <?php
77
-                    printf(
78
-                        esc_html__(
79
-                            'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
-                            'event_espresso'
81
-                        ),
82
-                        EE_MIN_PHP_VER_REQUIRED,
83
-                        PHP_VERSION,
84
-                        '<br/>',
85
-                        '<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
-                    );
87
-                    ?>
77
+					printf(
78
+						esc_html__(
79
+							'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.',
80
+							'event_espresso'
81
+						),
82
+						EE_MIN_PHP_VER_REQUIRED,
83
+						PHP_VERSION,
84
+						'<br/>',
85
+						'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>'
86
+					);
87
+					?>
88 88
                 </p>
89 89
             </div>
90 90
             <?php
91
-            espresso_deactivate_plugin(plugin_basename(__FILE__));
92
-        }
91
+			espresso_deactivate_plugin(plugin_basename(__FILE__));
92
+		}
93 93
 
94
-        add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
-    } else {
96
-        define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
-        /**
98
-         * espresso_version
99
-         * Returns the plugin version
100
-         *
101
-         * @return string
102
-         */
103
-        function espresso_version()
104
-        {
105
-            return apply_filters('FHEE__espresso__espresso_version', '4.9.59.rc.032');
106
-        }
94
+		add_action('admin_notices', 'espresso_minimum_php_version_error', 1);
95
+	} else {
96
+		define('EVENT_ESPRESSO_MAIN_FILE', __FILE__);
97
+		/**
98
+		 * espresso_version
99
+		 * Returns the plugin version
100
+		 *
101
+		 * @return string
102
+		 */
103
+		function espresso_version()
104
+		{
105
+			return apply_filters('FHEE__espresso__espresso_version', '4.9.59.rc.032');
106
+		}
107 107
 
108
-        /**
109
-         * espresso_plugin_activation
110
-         * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
-         */
112
-        function espresso_plugin_activation()
113
-        {
114
-            update_option('ee_espresso_activation', true);
115
-        }
108
+		/**
109
+		 * espresso_plugin_activation
110
+		 * adds a wp-option to indicate that EE has been activated via the WP admin plugins page
111
+		 */
112
+		function espresso_plugin_activation()
113
+		{
114
+			update_option('ee_espresso_activation', true);
115
+		}
116 116
 
117
-        register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
117
+		register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation');
118 118
 
119
-        require_once __DIR__ . '/core/bootstrap_espresso.php';
120
-        bootstrap_espresso();
121
-    }
119
+		require_once __DIR__ . '/core/bootstrap_espresso.php';
120
+		bootstrap_espresso();
121
+	}
122 122
 }
123 123
 if (! function_exists('espresso_deactivate_plugin')) {
124
-    /**
125
-     *    deactivate_plugin
126
-     * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
-     *
128
-     * @access public
129
-     * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
-     * @return    void
131
-     */
132
-    function espresso_deactivate_plugin($plugin_basename = '')
133
-    {
134
-        if (! function_exists('deactivate_plugins')) {
135
-            require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
-        }
137
-        unset($_GET['activate'], $_REQUEST['activate']);
138
-        deactivate_plugins($plugin_basename);
139
-    }
124
+	/**
125
+	 *    deactivate_plugin
126
+	 * usage:  espresso_deactivate_plugin( plugin_basename( __FILE__ ));
127
+	 *
128
+	 * @access public
129
+	 * @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file
130
+	 * @return    void
131
+	 */
132
+	function espresso_deactivate_plugin($plugin_basename = '')
133
+	{
134
+		if (! function_exists('deactivate_plugins')) {
135
+			require_once ABSPATH . 'wp-admin/includes/plugin.php';
136
+		}
137
+		unset($_GET['activate'], $_REQUEST['activate']);
138
+		deactivate_plugins($plugin_basename);
139
+	}
140 140
 }
Please login to merge, or discard this patch.