Completed
Branch BUG/update-unit-tests (7b5400)
by
unknown
07:51 queued 05:38
created
core/db_classes/EE_Status.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $id = $this->get('STS_ID');
46 46
         $code = EEM_Status::instance()->localized_status(array($id => $this->get('STS_code')), $plural, $schema);
47
-        return $code[ $id ];
47
+        return $code[$id];
48 48
     }
49 49
 
50 50
 
Please login to merge, or discard this patch.
Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -11,142 +11,142 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Status extends EE_Base_Class
13 13
 {
14
-    /**
15
-     * @param array $props_n_values
16
-     * @return EE_Status
17
-     */
18
-    public static function new_instance($props_n_values = array())
19
-    {
20
-        $has_object = parent::_check_for_object($props_n_values, __CLASS__);
21
-        return $has_object ? $has_object : new self($props_n_values);
22
-    }
23
-
24
-
25
-    /**
26
-     * @param array $props_n_values
27
-     * @return EE_Status
28
-     */
29
-    public static function new_instance_from_db($props_n_values = array())
30
-    {
31
-        return new self($props_n_values, true);
32
-    }
33
-
34
-
35
-    /**
36
-     * Gets code
37
-     *
38
-     * @param bool   $plural
39
-     * @param string $schema
40
-     * @return string
41
-     */
42
-    public function code($plural = false, $schema = 'upper')
43
-    {
44
-        $id = $this->get('STS_ID');
45
-        $code = EEM_Status::instance()->localized_status(array($id => $this->get('STS_code')), $plural, $schema);
46
-        return $code[ $id ];
47
-    }
48
-
49
-
50
-    /**
51
-     * Sets code
52
-     *
53
-     * @param string $code
54
-     * @return boolean
55
-     */
56
-    public function set_code($code)
57
-    {
58
-        $this->set('STS_code', $code);
59
-    }
60
-
61
-
62
-    /**
63
-     * Gets desc
64
-     *
65
-     * @return string
66
-     */
67
-    public function desc()
68
-    {
69
-        return $this->get('STS_desc');
70
-    }
71
-
72
-
73
-    /**
74
-     * Sets desc
75
-     *
76
-     * @param string $desc
77
-     * @return boolean
78
-     */
79
-    public function set_desc($desc)
80
-    {
81
-        $this->set('STS_desc', $desc);
82
-    }
83
-
84
-
85
-    /**
86
-     * Gets type
87
-     *
88
-     * @return string
89
-     */
90
-    public function type()
91
-    {
92
-        return $this->get('STS_type');
93
-    }
94
-
95
-
96
-    /**
97
-     * Sets type
98
-     *
99
-     * @param string $type
100
-     * @return boolean
101
-     */
102
-    public function set_type($type)
103
-    {
104
-        $this->set('STS_type', $type);
105
-    }
106
-
107
-
108
-    /**
109
-     * Gets can_edit
110
-     *
111
-     * @return boolean
112
-     */
113
-    public function can_edit()
114
-    {
115
-        return $this->get('STS_can_edit');
116
-    }
117
-
118
-
119
-    /**
120
-     * Sets can_edit
121
-     *
122
-     * @param boolean $can_edit
123
-     * @return boolean
124
-     */
125
-    public function set_can_edit($can_edit)
126
-    {
127
-        $this->set('STS_can_edit', $can_edit);
128
-    }
129
-
130
-
131
-    /**
132
-     * Gets open
133
-     *
134
-     * @return boolean
135
-     */
136
-    public function open()
137
-    {
138
-        return $this->get('STS_open');
139
-    }
140
-
141
-
142
-    /**
143
-     * Sets open
144
-     *
145
-     * @param boolean $open
146
-     * @return boolean
147
-     */
148
-    public function set_open($open)
149
-    {
150
-        $this->set('STS_open', $open);
151
-    }
14
+	/**
15
+	 * @param array $props_n_values
16
+	 * @return EE_Status
17
+	 */
18
+	public static function new_instance($props_n_values = array())
19
+	{
20
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
21
+		return $has_object ? $has_object : new self($props_n_values);
22
+	}
23
+
24
+
25
+	/**
26
+	 * @param array $props_n_values
27
+	 * @return EE_Status
28
+	 */
29
+	public static function new_instance_from_db($props_n_values = array())
30
+	{
31
+		return new self($props_n_values, true);
32
+	}
33
+
34
+
35
+	/**
36
+	 * Gets code
37
+	 *
38
+	 * @param bool   $plural
39
+	 * @param string $schema
40
+	 * @return string
41
+	 */
42
+	public function code($plural = false, $schema = 'upper')
43
+	{
44
+		$id = $this->get('STS_ID');
45
+		$code = EEM_Status::instance()->localized_status(array($id => $this->get('STS_code')), $plural, $schema);
46
+		return $code[ $id ];
47
+	}
48
+
49
+
50
+	/**
51
+	 * Sets code
52
+	 *
53
+	 * @param string $code
54
+	 * @return boolean
55
+	 */
56
+	public function set_code($code)
57
+	{
58
+		$this->set('STS_code', $code);
59
+	}
60
+
61
+
62
+	/**
63
+	 * Gets desc
64
+	 *
65
+	 * @return string
66
+	 */
67
+	public function desc()
68
+	{
69
+		return $this->get('STS_desc');
70
+	}
71
+
72
+
73
+	/**
74
+	 * Sets desc
75
+	 *
76
+	 * @param string $desc
77
+	 * @return boolean
78
+	 */
79
+	public function set_desc($desc)
80
+	{
81
+		$this->set('STS_desc', $desc);
82
+	}
83
+
84
+
85
+	/**
86
+	 * Gets type
87
+	 *
88
+	 * @return string
89
+	 */
90
+	public function type()
91
+	{
92
+		return $this->get('STS_type');
93
+	}
94
+
95
+
96
+	/**
97
+	 * Sets type
98
+	 *
99
+	 * @param string $type
100
+	 * @return boolean
101
+	 */
102
+	public function set_type($type)
103
+	{
104
+		$this->set('STS_type', $type);
105
+	}
106
+
107
+
108
+	/**
109
+	 * Gets can_edit
110
+	 *
111
+	 * @return boolean
112
+	 */
113
+	public function can_edit()
114
+	{
115
+		return $this->get('STS_can_edit');
116
+	}
117
+
118
+
119
+	/**
120
+	 * Sets can_edit
121
+	 *
122
+	 * @param boolean $can_edit
123
+	 * @return boolean
124
+	 */
125
+	public function set_can_edit($can_edit)
126
+	{
127
+		$this->set('STS_can_edit', $can_edit);
128
+	}
129
+
130
+
131
+	/**
132
+	 * Gets open
133
+	 *
134
+	 * @return boolean
135
+	 */
136
+	public function open()
137
+	{
138
+		return $this->get('STS_open');
139
+	}
140
+
141
+
142
+	/**
143
+	 * Sets open
144
+	 *
145
+	 * @param boolean $open
146
+	 * @return boolean
147
+	 */
148
+	public function set_open($open)
149
+	{
150
+		$this->set('STS_open', $open);
151
+	}
152 152
 }
Please login to merge, or discard this patch.
core/db_classes/EE_Term.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     protected function __construct($fieldValues = array(), $bydb = false, $timezone = '')
25 25
     {
26
-        if (! isset($fieldValues['slug'])) {
26
+        if ( ! isset($fieldValues['slug'])) {
27 27
             $fieldValues['slug'] = $fieldValues['name'];
28 28
         }
29 29
         parent::__construct($fieldValues, $bydb, $timezone);
Please login to merge, or discard this patch.
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -11,87 +11,87 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Term extends EE_Base_Class
13 13
 {
14
-    public $post_type;
14
+	public $post_type;
15 15
 
16
-    /**
17
-     * Sets some dynamic defaults
18
-     *
19
-     * @param array  $fieldValues
20
-     * @param bool   $bydb
21
-     * @param string $timezone
22
-     */
23
-    protected function __construct($fieldValues = array(), $bydb = false, $timezone = '')
24
-    {
25
-        if (! isset($fieldValues['slug'])) {
26
-            $fieldValues['slug'] = $fieldValues['name'];
27
-        }
28
-        parent::__construct($fieldValues, $bydb, $timezone);
29
-    }
16
+	/**
17
+	 * Sets some dynamic defaults
18
+	 *
19
+	 * @param array  $fieldValues
20
+	 * @param bool   $bydb
21
+	 * @param string $timezone
22
+	 */
23
+	protected function __construct($fieldValues = array(), $bydb = false, $timezone = '')
24
+	{
25
+		if (! isset($fieldValues['slug'])) {
26
+			$fieldValues['slug'] = $fieldValues['name'];
27
+		}
28
+		parent::__construct($fieldValues, $bydb, $timezone);
29
+	}
30 30
 
31 31
 
32
-    /**
33
-     * @param array $props_n_values
34
-     * @return EE_Term|mixed
35
-     */
36
-    public static function new_instance($props_n_values = array())
37
-    {
38
-        $has_object = parent::_check_for_object($props_n_values, __CLASS__);
39
-        return $has_object ? $has_object : new self($props_n_values);
40
-    }
32
+	/**
33
+	 * @param array $props_n_values
34
+	 * @return EE_Term|mixed
35
+	 */
36
+	public static function new_instance($props_n_values = array())
37
+	{
38
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
39
+		return $has_object ? $has_object : new self($props_n_values);
40
+	}
41 41
 
42 42
 
43
-    /**
44
-     * @param array $props_n_values
45
-     * @return EE_Term
46
-     */
47
-    public static function new_instance_from_db($props_n_values = array())
48
-    {
49
-        return new self($props_n_values, true);
50
-    }
43
+	/**
44
+	 * @param array $props_n_values
45
+	 * @return EE_Term
46
+	 */
47
+	public static function new_instance_from_db($props_n_values = array())
48
+	{
49
+		return new self($props_n_values, true);
50
+	}
51 51
 
52 52
 
53
-    /**
54
-     * Gets name
55
-     *
56
-     * @return string
57
-     */
58
-    public function name()
59
-    {
60
-        return $this->get('name');
61
-    }
53
+	/**
54
+	 * Gets name
55
+	 *
56
+	 * @return string
57
+	 */
58
+	public function name()
59
+	{
60
+		return $this->get('name');
61
+	}
62 62
 
63 63
 
64
-    /**
65
-     * Sets name
66
-     *
67
-     * @param string $name
68
-     * @return boolean
69
-     */
70
-    public function set_name($name)
71
-    {
72
-        $this->set('name', $name);
73
-    }
64
+	/**
65
+	 * Sets name
66
+	 *
67
+	 * @param string $name
68
+	 * @return boolean
69
+	 */
70
+	public function set_name($name)
71
+	{
72
+		$this->set('name', $name);
73
+	}
74 74
 
75 75
 
76
-    /**
77
-     * Gets slug
78
-     *
79
-     * @return string
80
-     */
81
-    public function slug()
82
-    {
83
-        return $this->get('slug');
84
-    }
76
+	/**
77
+	 * Gets slug
78
+	 *
79
+	 * @return string
80
+	 */
81
+	public function slug()
82
+	{
83
+		return $this->get('slug');
84
+	}
85 85
 
86 86
 
87
-    /**
88
-     * Sets slug
89
-     *
90
-     * @param string $slug
91
-     * @return boolean
92
-     */
93
-    public function set_slug($slug)
94
-    {
95
-        $this->set('slug', $slug);
96
-    }
87
+	/**
88
+	 * Sets slug
89
+	 *
90
+	 * @param string $slug
91
+	 * @return boolean
92
+	 */
93
+	public function set_slug($slug)
94
+	{
95
+		$this->set('slug', $slug);
96
+	}
97 97
 }
Please login to merge, or discard this patch.
core/db_classes/EE_Change_Log.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
     {
193 193
         $model_name_of_related_obj = $this->OBJ_type();
194 194
         $is_model_name = EE_Registry::instance()->is_model_name($model_name_of_related_obj);
195
-        if (! $is_model_name) {
195
+        if ( ! $is_model_name) {
196 196
             return null;
197 197
         } else {
198 198
             return $this->get_first_related($model_name_of_related_obj);
Please login to merge, or discard this patch.
Indentation   +213 added lines, -213 removed lines patch added patch discarded remove patch
@@ -10,217 +10,217 @@
 block discarded – undo
10 10
  */
11 11
 class EE_Change_Log extends EE_Base_Class
12 12
 {
13
-    /**
14
-     * @param array  $props_n_values          incoming values
15
-     * @param string $timezone                incoming timezone (if not set the timezone set for the website will be
16
-     *                                        used.)
17
-     * @param array  $date_formats            incoming date_formats in an array where the first value is the
18
-     *                                        date_format and the second value is the time format
19
-     * @return EE_Change_Log
20
-     * @throws EE_Error
21
-     */
22
-    public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
23
-    {
24
-        $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
25
-        return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
26
-    }
27
-
28
-
29
-    /**
30
-     * @param array  $props_n_values  incoming values from the database
31
-     * @param string $timezone        incoming timezone as set by the model.  If not set the timezone for
32
-     *                                the website will be used.
33
-     * @return EE_Change_Log
34
-     */
35
-    public static function new_instance_from_db($props_n_values = array(), $timezone = null)
36
-    {
37
-        return new self($props_n_values, true, $timezone);
38
-    }
39
-
40
-    /**
41
-     * Gets message
42
-     *
43
-     * @return mixed
44
-     * @throws EE_Error
45
-     */
46
-    public function message()
47
-    {
48
-        return $this->get('LOG_message');
49
-    }
50
-
51
-    /**
52
-     * Sets message
53
-     *
54
-     * @param mixed $message
55
-     * @throws EE_Error
56
-     */
57
-    public function set_message($message)
58
-    {
59
-        $this->set('LOG_message', $message);
60
-    }
61
-
62
-    /**
63
-     * Gets time
64
-     *
65
-     * @return string
66
-     * @throws EE_Error
67
-     */
68
-    public function time()
69
-    {
70
-        return $this->get('LOG_time');
71
-    }
72
-
73
-    /**
74
-     * Sets time
75
-     *
76
-     * @param string $time
77
-     * @throws EE_Error
78
-     */
79
-    public function set_time($time)
80
-    {
81
-        $this->set('LOG_time', $time);
82
-    }
83
-
84
-    /**
85
-     * Gets log_type
86
-     *
87
-     * @return string
88
-     * @throws EE_Error
89
-     */
90
-    public function log_type()
91
-    {
92
-        return $this->get('LOG_type');
93
-    }
94
-
95
-
96
-    /**
97
-     * Return the localized log type label.
98
-     *
99
-     * @return string
100
-     * @throws EE_Error
101
-     */
102
-    public function log_type_label()
103
-    {
104
-        return EEM_Change_Log::get_pretty_label_for_type($this->log_type());
105
-    }
106
-
107
-    /**
108
-     * Sets log_type
109
-     *
110
-     * @param string $log_type
111
-     * @throws EE_Error
112
-     */
113
-    public function set_log_type($log_type)
114
-    {
115
-        $this->set('LOG_type', $log_type);
116
-    }
117
-
118
-    /**
119
-     * Gets type of the model object related to this log
120
-     *
121
-     * @return string
122
-     * @throws EE_Error
123
-     */
124
-    public function OBJ_type()
125
-    {
126
-        return $this->get('OBJ_type');
127
-    }
128
-
129
-    /**
130
-     * Sets type
131
-     *
132
-     * @param string $type
133
-     * @throws EE_Error
134
-     */
135
-    public function set_OBJ_type($type)
136
-    {
137
-        $this->set('OBJ_type', $type);
138
-    }
139
-
140
-    /**
141
-     * Gets OBJ_ID (the ID of the item related to this log)
142
-     *
143
-     * @return mixed
144
-     * @throws EE_Error
145
-     */
146
-    public function OBJ_ID()
147
-    {
148
-        return $this->get('OBJ_ID');
149
-    }
150
-
151
-    /**
152
-     * Sets OBJ_ID
153
-     *
154
-     * @param mixed $OBJ_ID
155
-     * @throws EE_Error
156
-     */
157
-    public function set_OBJ_ID($OBJ_ID)
158
-    {
159
-        $this->set('OBJ_ID', $OBJ_ID);
160
-    }
161
-
162
-    /**
163
-     * Gets wp_user
164
-     *
165
-     * @return int
166
-     * @throws EE_Error
167
-     */
168
-    public function wp_user()
169
-    {
170
-        return $this->get('LOG_wp_user');
171
-    }
172
-
173
-    /**
174
-     * Sets wp_user
175
-     *
176
-     * @param int $wp_user_id
177
-     * @throws EE_Error
178
-     */
179
-    public function set_wp_user($wp_user_id)
180
-    {
181
-        $this->set('LOG_wp_user', $wp_user_id);
182
-    }
183
-
184
-    /**
185
-     * Gets the model object attached to this log
186
-     *
187
-     * @return EE_Base_Class
188
-     * @throws EE_Error
189
-     */
190
-    public function object()
191
-    {
192
-        $model_name_of_related_obj = $this->OBJ_type();
193
-        $is_model_name = EE_Registry::instance()->is_model_name($model_name_of_related_obj);
194
-        if (! $is_model_name) {
195
-            return null;
196
-        } else {
197
-            return $this->get_first_related($model_name_of_related_obj);
198
-        }
199
-    }
200
-
201
-    /**
202
-     * Shorthand for setting the OBJ_ID and OBJ_type. Slightly handier than using
203
-     * _add_relation_to because you don't have to specify what type of model you're
204
-     * associating it with
205
-     *
206
-     * @param EE_Base_Class $object
207
-     * @param boolean       $save
208
-     * @return bool if $save=true, NULL is $save=false
209
-     * @throws EE_Error
210
-     */
211
-    public function set_object($object, $save = true)
212
-    {
213
-        if ($object instanceof EE_Base_Class) {
214
-            $this->set_OBJ_type($object->get_model()->get_this_model_name());
215
-            $this->set_OBJ_ID($object->ID());
216
-        } else {
217
-            $this->set_OBJ_type(null);
218
-            $this->set_OBJ_ID(null);
219
-        }
220
-        if ($save) {
221
-            return $this->save();
222
-        } else {
223
-            return null;
224
-        }
225
-    }
13
+	/**
14
+	 * @param array  $props_n_values          incoming values
15
+	 * @param string $timezone                incoming timezone (if not set the timezone set for the website will be
16
+	 *                                        used.)
17
+	 * @param array  $date_formats            incoming date_formats in an array where the first value is the
18
+	 *                                        date_format and the second value is the time format
19
+	 * @return EE_Change_Log
20
+	 * @throws EE_Error
21
+	 */
22
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array())
23
+	{
24
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
25
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
26
+	}
27
+
28
+
29
+	/**
30
+	 * @param array  $props_n_values  incoming values from the database
31
+	 * @param string $timezone        incoming timezone as set by the model.  If not set the timezone for
32
+	 *                                the website will be used.
33
+	 * @return EE_Change_Log
34
+	 */
35
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null)
36
+	{
37
+		return new self($props_n_values, true, $timezone);
38
+	}
39
+
40
+	/**
41
+	 * Gets message
42
+	 *
43
+	 * @return mixed
44
+	 * @throws EE_Error
45
+	 */
46
+	public function message()
47
+	{
48
+		return $this->get('LOG_message');
49
+	}
50
+
51
+	/**
52
+	 * Sets message
53
+	 *
54
+	 * @param mixed $message
55
+	 * @throws EE_Error
56
+	 */
57
+	public function set_message($message)
58
+	{
59
+		$this->set('LOG_message', $message);
60
+	}
61
+
62
+	/**
63
+	 * Gets time
64
+	 *
65
+	 * @return string
66
+	 * @throws EE_Error
67
+	 */
68
+	public function time()
69
+	{
70
+		return $this->get('LOG_time');
71
+	}
72
+
73
+	/**
74
+	 * Sets time
75
+	 *
76
+	 * @param string $time
77
+	 * @throws EE_Error
78
+	 */
79
+	public function set_time($time)
80
+	{
81
+		$this->set('LOG_time', $time);
82
+	}
83
+
84
+	/**
85
+	 * Gets log_type
86
+	 *
87
+	 * @return string
88
+	 * @throws EE_Error
89
+	 */
90
+	public function log_type()
91
+	{
92
+		return $this->get('LOG_type');
93
+	}
94
+
95
+
96
+	/**
97
+	 * Return the localized log type label.
98
+	 *
99
+	 * @return string
100
+	 * @throws EE_Error
101
+	 */
102
+	public function log_type_label()
103
+	{
104
+		return EEM_Change_Log::get_pretty_label_for_type($this->log_type());
105
+	}
106
+
107
+	/**
108
+	 * Sets log_type
109
+	 *
110
+	 * @param string $log_type
111
+	 * @throws EE_Error
112
+	 */
113
+	public function set_log_type($log_type)
114
+	{
115
+		$this->set('LOG_type', $log_type);
116
+	}
117
+
118
+	/**
119
+	 * Gets type of the model object related to this log
120
+	 *
121
+	 * @return string
122
+	 * @throws EE_Error
123
+	 */
124
+	public function OBJ_type()
125
+	{
126
+		return $this->get('OBJ_type');
127
+	}
128
+
129
+	/**
130
+	 * Sets type
131
+	 *
132
+	 * @param string $type
133
+	 * @throws EE_Error
134
+	 */
135
+	public function set_OBJ_type($type)
136
+	{
137
+		$this->set('OBJ_type', $type);
138
+	}
139
+
140
+	/**
141
+	 * Gets OBJ_ID (the ID of the item related to this log)
142
+	 *
143
+	 * @return mixed
144
+	 * @throws EE_Error
145
+	 */
146
+	public function OBJ_ID()
147
+	{
148
+		return $this->get('OBJ_ID');
149
+	}
150
+
151
+	/**
152
+	 * Sets OBJ_ID
153
+	 *
154
+	 * @param mixed $OBJ_ID
155
+	 * @throws EE_Error
156
+	 */
157
+	public function set_OBJ_ID($OBJ_ID)
158
+	{
159
+		$this->set('OBJ_ID', $OBJ_ID);
160
+	}
161
+
162
+	/**
163
+	 * Gets wp_user
164
+	 *
165
+	 * @return int
166
+	 * @throws EE_Error
167
+	 */
168
+	public function wp_user()
169
+	{
170
+		return $this->get('LOG_wp_user');
171
+	}
172
+
173
+	/**
174
+	 * Sets wp_user
175
+	 *
176
+	 * @param int $wp_user_id
177
+	 * @throws EE_Error
178
+	 */
179
+	public function set_wp_user($wp_user_id)
180
+	{
181
+		$this->set('LOG_wp_user', $wp_user_id);
182
+	}
183
+
184
+	/**
185
+	 * Gets the model object attached to this log
186
+	 *
187
+	 * @return EE_Base_Class
188
+	 * @throws EE_Error
189
+	 */
190
+	public function object()
191
+	{
192
+		$model_name_of_related_obj = $this->OBJ_type();
193
+		$is_model_name = EE_Registry::instance()->is_model_name($model_name_of_related_obj);
194
+		if (! $is_model_name) {
195
+			return null;
196
+		} else {
197
+			return $this->get_first_related($model_name_of_related_obj);
198
+		}
199
+	}
200
+
201
+	/**
202
+	 * Shorthand for setting the OBJ_ID and OBJ_type. Slightly handier than using
203
+	 * _add_relation_to because you don't have to specify what type of model you're
204
+	 * associating it with
205
+	 *
206
+	 * @param EE_Base_Class $object
207
+	 * @param boolean       $save
208
+	 * @return bool if $save=true, NULL is $save=false
209
+	 * @throws EE_Error
210
+	 */
211
+	public function set_object($object, $save = true)
212
+	{
213
+		if ($object instanceof EE_Base_Class) {
214
+			$this->set_OBJ_type($object->get_model()->get_this_model_name());
215
+			$this->set_OBJ_ID($object->ID());
216
+		} else {
217
+			$this->set_OBJ_type(null);
218
+			$this->set_OBJ_ID(null);
219
+		}
220
+		if ($save) {
221
+			return $this->save();
222
+		} else {
223
+			return null;
224
+		}
225
+	}
226 226
 }
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Non_Zero_Line_Item_Filter.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function process(EEI_Line_Item $line_item)
33 33
     {
34 34
         $non_zero_line_item = $this->_filter_zero_line_item($line_item);
35
-        if (! $non_zero_line_item instanceof EEI_Line_Item) {
35
+        if ( ! $non_zero_line_item instanceof EEI_Line_Item) {
36 36
             return null;
37 37
         }
38 38
         // if this is an event subtotal, we want to only include it if it
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             foreach ($line_item->children() as $child_line_item) {
43 43
                 $code = $child_line_item->code();
44 44
                 $child_line_item = $this->process($child_line_item);
45
-                if (! $child_line_item instanceof EEI_Line_Item) {
45
+                if ( ! $child_line_item instanceof EEI_Line_Item) {
46 46
                     $line_item->delete_child_line_item($code);
47 47
                     continue;
48 48
                 }
Please login to merge, or discard this patch.
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -13,99 +13,99 @@
 block discarded – undo
13 13
  */
14 14
 class EE_Non_Zero_Line_Item_Filter extends EE_Line_Item_Filter_Base
15 15
 {
16
-    /**
17
-     * EE_Non_Zero_Line_Item_Filter constructor.
18
-     */
19
-    public function __construct()
20
-    {
21
-    }
16
+	/**
17
+	 * EE_Non_Zero_Line_Item_Filter constructor.
18
+	 */
19
+	public function __construct()
20
+	{
21
+	}
22 22
 
23 23
 
24
-    /**
25
-     * Creates a duplicate of the line item tree, except only includes billable items
26
-     * and the portion of line items attributed to billable things
27
-     *
28
-     * @param EEI_Line_Item $line_item
29
-     * @return EEI_Line_Item
30
-     */
31
-    public function process(EEI_Line_Item $line_item)
32
-    {
33
-        $non_zero_line_item = $this->_filter_zero_line_item($line_item);
34
-        if (! $non_zero_line_item instanceof EEI_Line_Item) {
35
-            return null;
36
-        }
37
-        // if this is an event subtotal, we want to only include it if it
38
-        // has a non-zero total and at least one ticket line item child
39
-        if ($line_item->children()) {
40
-            $ticket_or_subtotals_with_tkt_children_count = 0;
41
-            foreach ($line_item->children() as $child_line_item) {
42
-                $code = $child_line_item->code();
43
-                $child_line_item = $this->process($child_line_item);
44
-                if (! $child_line_item instanceof EEI_Line_Item) {
45
-                    $line_item->delete_child_line_item($code);
46
-                    continue;
47
-                }
48
-                if (
49
-                    (
50
-                        $child_line_item instanceof EEI_Line_Item
51
-                        && $child_line_item->type() === EEM_Line_Item::type_sub_total
52
-                    )
53
-                    || (
54
-                        $child_line_item instanceof EEI_Line_Item
55
-                        && $child_line_item->type() === EEM_Line_Item::type_line_item
56
-                        && $child_line_item->OBJ_type() === 'Ticket'
57
-                    )
58
-                ) {
59
-                    $ticket_or_subtotals_with_tkt_children_count++;
60
-                }
61
-            }
62
-            // if this is an event subtotal with NO ticket children
63
-            // we basically want to ignore it
64
-            return $this->_filter_zero_subtotal_line_item(
65
-                $non_zero_line_item,
66
-                $ticket_or_subtotals_with_tkt_children_count
67
-            );
68
-        }
69
-        return $non_zero_line_item;
70
-    }
24
+	/**
25
+	 * Creates a duplicate of the line item tree, except only includes billable items
26
+	 * and the portion of line items attributed to billable things
27
+	 *
28
+	 * @param EEI_Line_Item $line_item
29
+	 * @return EEI_Line_Item
30
+	 */
31
+	public function process(EEI_Line_Item $line_item)
32
+	{
33
+		$non_zero_line_item = $this->_filter_zero_line_item($line_item);
34
+		if (! $non_zero_line_item instanceof EEI_Line_Item) {
35
+			return null;
36
+		}
37
+		// if this is an event subtotal, we want to only include it if it
38
+		// has a non-zero total and at least one ticket line item child
39
+		if ($line_item->children()) {
40
+			$ticket_or_subtotals_with_tkt_children_count = 0;
41
+			foreach ($line_item->children() as $child_line_item) {
42
+				$code = $child_line_item->code();
43
+				$child_line_item = $this->process($child_line_item);
44
+				if (! $child_line_item instanceof EEI_Line_Item) {
45
+					$line_item->delete_child_line_item($code);
46
+					continue;
47
+				}
48
+				if (
49
+					(
50
+						$child_line_item instanceof EEI_Line_Item
51
+						&& $child_line_item->type() === EEM_Line_Item::type_sub_total
52
+					)
53
+					|| (
54
+						$child_line_item instanceof EEI_Line_Item
55
+						&& $child_line_item->type() === EEM_Line_Item::type_line_item
56
+						&& $child_line_item->OBJ_type() === 'Ticket'
57
+					)
58
+				) {
59
+					$ticket_or_subtotals_with_tkt_children_count++;
60
+				}
61
+			}
62
+			// if this is an event subtotal with NO ticket children
63
+			// we basically want to ignore it
64
+			return $this->_filter_zero_subtotal_line_item(
65
+				$non_zero_line_item,
66
+				$ticket_or_subtotals_with_tkt_children_count
67
+			);
68
+		}
69
+		return $non_zero_line_item;
70
+	}
71 71
 
72 72
 
73
-    /**
74
-     * Creates a new, unsaved line item, but if it's a ticket line item
75
-     * with a total of 0, or a subtotal of 0, returns null instead
76
-     *
77
-     * @param EEI_Line_Item $line_item
78
-     * @return EEI_Line_Item
79
-     */
80
-    protected function _filter_zero_line_item(EEI_Line_Item $line_item)
81
-    {
82
-        if (
83
-            $line_item->type() === EEM_Line_Item::type_line_item
84
-            && $line_item->OBJ_type() === 'Ticket'
85
-            && (int) $line_item->quantity() === 0
86
-        ) {
87
-            return null;
88
-        }
89
-        return $line_item;
90
-    }
73
+	/**
74
+	 * Creates a new, unsaved line item, but if it's a ticket line item
75
+	 * with a total of 0, or a subtotal of 0, returns null instead
76
+	 *
77
+	 * @param EEI_Line_Item $line_item
78
+	 * @return EEI_Line_Item
79
+	 */
80
+	protected function _filter_zero_line_item(EEI_Line_Item $line_item)
81
+	{
82
+		if (
83
+			$line_item->type() === EEM_Line_Item::type_line_item
84
+			&& $line_item->OBJ_type() === 'Ticket'
85
+			&& (int) $line_item->quantity() === 0
86
+		) {
87
+			return null;
88
+		}
89
+		return $line_item;
90
+	}
91 91
 
92 92
 
93
-    /**
94
-     * Creates a new, unsaved line item, but if it's a ticket line item
95
-     * with a total of 0, or a subtotal of 0, returns null instead
96
-     *
97
-     * @param EEI_Line_Item $line_item
98
-     * @param int           $ticket_children
99
-     * @return EEI_Line_Item
100
-     */
101
-    protected function _filter_zero_subtotal_line_item(EEI_Line_Item $line_item, $ticket_children = 0)
102
-    {
103
-        if (
104
-            (int) $ticket_children === 0
105
-            && $line_item->type() === EEM_Line_Item::type_sub_total
106
-        ) {
107
-            return null;
108
-        }
109
-        return $line_item;
110
-    }
93
+	/**
94
+	 * Creates a new, unsaved line item, but if it's a ticket line item
95
+	 * with a total of 0, or a subtotal of 0, returns null instead
96
+	 *
97
+	 * @param EEI_Line_Item $line_item
98
+	 * @param int           $ticket_children
99
+	 * @return EEI_Line_Item
100
+	 */
101
+	protected function _filter_zero_subtotal_line_item(EEI_Line_Item $line_item, $ticket_children = 0)
102
+	{
103
+		if (
104
+			(int) $ticket_children === 0
105
+			&& $line_item->type() === EEM_Line_Item::type_sub_total
106
+		) {
107
+			return null;
108
+		}
109
+		return $line_item;
110
+	}
111 111
 }
Please login to merge, or discard this patch.
core/libraries/template_parts/EE_Template_Part_Manager.class.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         // SplPriorityQueue doesn't play nice with multiple items having the same priority
70 70
         // so if the incoming priority is already occupied, then let's increment it by one,
71 71
         // and then pass everything back into this method and try again with the new priority
72
-        if (isset($this->priorities[ $priority ])) {
72
+        if (isset($this->priorities[$priority])) {
73 73
             $priority++;
74 74
             $this->add_template_part($name, $label, $template, $priority);
75 75
             return;
76 76
         }
77 77
         // kk now we can mark this priority as being occupied
78
-        $this->priorities[ $priority ] = true;
78
+        $this->priorities[$priority] = true;
79 79
         // create the template part and add to the queue
80 80
         $this->template_parts->insert(
81 81
             new EE_Template_Part($name, $label, $template, $priority),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             $this->template_parts->next();
111 111
         }
112 112
         // now simply add our three strings of content together
113
-        return $this->before_event_content . $this->event_content . $this->after_event_content;
113
+        return $this->before_event_content.$this->event_content.$this->after_event_content;
114 114
     }
115 115
 
116 116
 
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
         // loop through template parts and add template content
170 170
         while ($this->template_parts->valid()) {
171 171
             $event_archive_display_order .= EEH_HTML::li(
172
-                EEH_HTML::span('', '', 'dashicons dashicons-arrow-up-alt2') .
173
-                EEH_HTML::span('', '', 'dashicons dashicons-arrow-down-alt2') .
172
+                EEH_HTML::span('', '', 'dashicons dashicons-arrow-up-alt2').
173
+                EEH_HTML::span('', '', 'dashicons dashicons-arrow-down-alt2').
174 174
                 $this->template_parts->current()->label(),
175
-                $list_item_css_id_prefix . $this->template_parts->current()->name(),
175
+                $list_item_css_id_prefix.$this->template_parts->current()->name(),
176 176
                 $list_item_css_class
177 177
             );
178 178
             $this->template_parts->next();
Please login to merge, or discard this patch.
Indentation   +191 added lines, -191 removed lines patch added patch discarded remove patch
@@ -13,195 +13,195 @@
 block discarded – undo
13 13
  */
14 14
 class EE_Template_Part_Manager
15 15
 {
16
-    /**
17
-     * @param EE_Template_Part_PriorityQueue $template_parts
18
-     */
19
-    protected $template_parts;
20
-
21
-    /**
22
-     * @param array $priorities
23
-     */
24
-    protected $priorities = array();
25
-
26
-    /**
27
-     * @param int $event_desc_priority
28
-     */
29
-    protected $event_desc_priority;
30
-
31
-    /**
32
-     * @param string $before_event_content
33
-     */
34
-    protected $before_event_content;
35
-
36
-    /**
37
-     * @param string $event_content
38
-     */
39
-    protected $event_content;
40
-
41
-    /**
42
-     * @param string $after_event_content
43
-     */
44
-    protected $after_event_content;
45
-
46
-
47
-    /**
48
-     *    class constructor
49
-     */
50
-    public function __construct()
51
-    {
52
-        $this->template_parts = new EE_Template_Part_PriorityQueue();
53
-    }
54
-
55
-
56
-    /**
57
-     *    add_template_part
58
-     *
59
-     *    used for setting the details about a particular template part
60
-     *
61
-     * @param string $name     - just a simple string identifier - do NOT use 'event'
62
-     * @param string $label    - template part label displayed in admin
63
-     * @param string $template - name or path of template to be used by EEH_Template::locate_template()
64
-     * @param int    $priority - order in which template parts should be applied
65
-     */
66
-    public function add_template_part($name, $label, $template, $priority)
67
-    {
68
-        // SplPriorityQueue doesn't play nice with multiple items having the same priority
69
-        // so if the incoming priority is already occupied, then let's increment it by one,
70
-        // and then pass everything back into this method and try again with the new priority
71
-        if (isset($this->priorities[ $priority ])) {
72
-            $priority++;
73
-            $this->add_template_part($name, $label, $template, $priority);
74
-            return;
75
-        }
76
-        // kk now we can mark this priority as being occupied
77
-        $this->priorities[ $priority ] = true;
78
-        // create the template part and add to the queue
79
-        $this->template_parts->insert(
80
-            new EE_Template_Part($name, $label, $template, $priority),
81
-            $priority
82
-        );
83
-        if ($name === 'event') {
84
-            $this->event_desc_priority = $priority;
85
-        }
86
-    }
87
-
88
-
89
-    /**
90
-     *    apply_template_part_filters
91
-     *
92
-     *    adds template parts to the supplied content
93
-     *    according to the details set when the template parts were added
94
-     *
95
-     * @access public
96
-     * @param string $content
97
-     * @return string
98
-     */
99
-    public function apply_template_part_filters($content = '')
100
-    {
101
-        $this->template_parts->rewind();
102
-        // loop through template parts and position content
103
-        while ($this->template_parts->valid()) {
104
-            $this->_position_template_part(
105
-                $content,
106
-                $this->template_parts->current()->template(),
107
-                $this->template_parts->current()->priority()
108
-            );
109
-            $this->template_parts->next();
110
-        }
111
-        // now simply add our three strings of content together
112
-        return $this->before_event_content . $this->event_content . $this->after_event_content;
113
-    }
114
-
115
-
116
-    /**
117
-     *    position_template_part
118
-     *
119
-     * based on the priority of the incoming template part
120
-     * relative to the known event description template part priority,
121
-     * this method will assign template parts to one of the following:
122
-     *        $this->before_event_content
123
-     *        $this->event_content
124
-     *        $this->after_event_content
125
-     *
126
-     * @access protected
127
-     * @param string $content
128
-     * @param string $template
129
-     * @param int    $priority
130
-     * @return void
131
-     */
132
-    protected function _position_template_part($content, $template, $priority)
133
-    {
134
-        // Event Description content is the actual incoming content itself
135
-        if ($priority === $this->event_desc_priority) {
136
-            $this->event_content = $content;
137
-        } elseif ($priority < $this->event_desc_priority) {
138
-            // everything BEFORE the Event Description
139
-            $this->before_event_content .= EEH_Template::locate_template($template);
140
-        } elseif ($priority > $this->event_desc_priority) {
141
-            // everything AFTER the Event Description
142
-            $this->after_event_content .= EEH_Template::locate_template($template);
143
-        }
144
-    }
145
-
146
-
147
-    /**
148
-     *    generate_sortable_list_of_template_parts
149
-     *
150
-     *    creates an HTML list (<ul>) with list items (<li>) for each template part,
151
-     *    in a format that can be used as a sortable list in the admin
152
-     *
153
-     * @access public
154
-     * @param string $list_css_id
155
-     * @param string $list_css_class
156
-     * @param string $list_item_css_class
157
-     * @param string $list_item_css_id_prefix
158
-     * @return string
159
-     */
160
-    public function generate_sortable_list_of_template_parts(
161
-        $list_css_id = '',
162
-        $list_css_class = '',
163
-        $list_item_css_class = '',
164
-        $list_item_css_id_prefix = ''
165
-    ) {
166
-        $event_archive_display_order = EEH_HTML::ul($list_css_id, $list_css_class);
167
-        $this->template_parts->rewind();
168
-        // loop through template parts and add template content
169
-        while ($this->template_parts->valid()) {
170
-            $event_archive_display_order .= EEH_HTML::li(
171
-                EEH_HTML::span('', '', 'dashicons dashicons-arrow-up-alt2') .
172
-                EEH_HTML::span('', '', 'dashicons dashicons-arrow-down-alt2') .
173
-                $this->template_parts->current()->label(),
174
-                $list_item_css_id_prefix . $this->template_parts->current()->name(),
175
-                $list_item_css_class
176
-            );
177
-            $this->template_parts->next();
178
-        }
179
-        $event_archive_display_order .= EEH_HTML::ulx();
180
-        return $event_archive_display_order;
181
-    }
182
-
183
-
184
-    /**
185
-     *    display_template_parts
186
-     *
187
-     * just for debugging purposes
188
-     *
189
-     * @access    public
190
-     * @return void
191
-     */
192
-    public function display_template_parts()
193
-    {
194
-        if (WP_DEBUG) {
195
-            $this->template_parts->rewind();
196
-            while ($this->template_parts->valid()) {
197
-                EEH_Debug_Tools::printr(
198
-                    $this->template_parts->current(),
199
-                    'template_part',
200
-                    __FILE__,
201
-                    __LINE__
202
-                );
203
-                $this->template_parts->next();
204
-            }
205
-        }
206
-    }
16
+	/**
17
+	 * @param EE_Template_Part_PriorityQueue $template_parts
18
+	 */
19
+	protected $template_parts;
20
+
21
+	/**
22
+	 * @param array $priorities
23
+	 */
24
+	protected $priorities = array();
25
+
26
+	/**
27
+	 * @param int $event_desc_priority
28
+	 */
29
+	protected $event_desc_priority;
30
+
31
+	/**
32
+	 * @param string $before_event_content
33
+	 */
34
+	protected $before_event_content;
35
+
36
+	/**
37
+	 * @param string $event_content
38
+	 */
39
+	protected $event_content;
40
+
41
+	/**
42
+	 * @param string $after_event_content
43
+	 */
44
+	protected $after_event_content;
45
+
46
+
47
+	/**
48
+	 *    class constructor
49
+	 */
50
+	public function __construct()
51
+	{
52
+		$this->template_parts = new EE_Template_Part_PriorityQueue();
53
+	}
54
+
55
+
56
+	/**
57
+	 *    add_template_part
58
+	 *
59
+	 *    used for setting the details about a particular template part
60
+	 *
61
+	 * @param string $name     - just a simple string identifier - do NOT use 'event'
62
+	 * @param string $label    - template part label displayed in admin
63
+	 * @param string $template - name or path of template to be used by EEH_Template::locate_template()
64
+	 * @param int    $priority - order in which template parts should be applied
65
+	 */
66
+	public function add_template_part($name, $label, $template, $priority)
67
+	{
68
+		// SplPriorityQueue doesn't play nice with multiple items having the same priority
69
+		// so if the incoming priority is already occupied, then let's increment it by one,
70
+		// and then pass everything back into this method and try again with the new priority
71
+		if (isset($this->priorities[ $priority ])) {
72
+			$priority++;
73
+			$this->add_template_part($name, $label, $template, $priority);
74
+			return;
75
+		}
76
+		// kk now we can mark this priority as being occupied
77
+		$this->priorities[ $priority ] = true;
78
+		// create the template part and add to the queue
79
+		$this->template_parts->insert(
80
+			new EE_Template_Part($name, $label, $template, $priority),
81
+			$priority
82
+		);
83
+		if ($name === 'event') {
84
+			$this->event_desc_priority = $priority;
85
+		}
86
+	}
87
+
88
+
89
+	/**
90
+	 *    apply_template_part_filters
91
+	 *
92
+	 *    adds template parts to the supplied content
93
+	 *    according to the details set when the template parts were added
94
+	 *
95
+	 * @access public
96
+	 * @param string $content
97
+	 * @return string
98
+	 */
99
+	public function apply_template_part_filters($content = '')
100
+	{
101
+		$this->template_parts->rewind();
102
+		// loop through template parts and position content
103
+		while ($this->template_parts->valid()) {
104
+			$this->_position_template_part(
105
+				$content,
106
+				$this->template_parts->current()->template(),
107
+				$this->template_parts->current()->priority()
108
+			);
109
+			$this->template_parts->next();
110
+		}
111
+		// now simply add our three strings of content together
112
+		return $this->before_event_content . $this->event_content . $this->after_event_content;
113
+	}
114
+
115
+
116
+	/**
117
+	 *    position_template_part
118
+	 *
119
+	 * based on the priority of the incoming template part
120
+	 * relative to the known event description template part priority,
121
+	 * this method will assign template parts to one of the following:
122
+	 *        $this->before_event_content
123
+	 *        $this->event_content
124
+	 *        $this->after_event_content
125
+	 *
126
+	 * @access protected
127
+	 * @param string $content
128
+	 * @param string $template
129
+	 * @param int    $priority
130
+	 * @return void
131
+	 */
132
+	protected function _position_template_part($content, $template, $priority)
133
+	{
134
+		// Event Description content is the actual incoming content itself
135
+		if ($priority === $this->event_desc_priority) {
136
+			$this->event_content = $content;
137
+		} elseif ($priority < $this->event_desc_priority) {
138
+			// everything BEFORE the Event Description
139
+			$this->before_event_content .= EEH_Template::locate_template($template);
140
+		} elseif ($priority > $this->event_desc_priority) {
141
+			// everything AFTER the Event Description
142
+			$this->after_event_content .= EEH_Template::locate_template($template);
143
+		}
144
+	}
145
+
146
+
147
+	/**
148
+	 *    generate_sortable_list_of_template_parts
149
+	 *
150
+	 *    creates an HTML list (<ul>) with list items (<li>) for each template part,
151
+	 *    in a format that can be used as a sortable list in the admin
152
+	 *
153
+	 * @access public
154
+	 * @param string $list_css_id
155
+	 * @param string $list_css_class
156
+	 * @param string $list_item_css_class
157
+	 * @param string $list_item_css_id_prefix
158
+	 * @return string
159
+	 */
160
+	public function generate_sortable_list_of_template_parts(
161
+		$list_css_id = '',
162
+		$list_css_class = '',
163
+		$list_item_css_class = '',
164
+		$list_item_css_id_prefix = ''
165
+	) {
166
+		$event_archive_display_order = EEH_HTML::ul($list_css_id, $list_css_class);
167
+		$this->template_parts->rewind();
168
+		// loop through template parts and add template content
169
+		while ($this->template_parts->valid()) {
170
+			$event_archive_display_order .= EEH_HTML::li(
171
+				EEH_HTML::span('', '', 'dashicons dashicons-arrow-up-alt2') .
172
+				EEH_HTML::span('', '', 'dashicons dashicons-arrow-down-alt2') .
173
+				$this->template_parts->current()->label(),
174
+				$list_item_css_id_prefix . $this->template_parts->current()->name(),
175
+				$list_item_css_class
176
+			);
177
+			$this->template_parts->next();
178
+		}
179
+		$event_archive_display_order .= EEH_HTML::ulx();
180
+		return $event_archive_display_order;
181
+	}
182
+
183
+
184
+	/**
185
+	 *    display_template_parts
186
+	 *
187
+	 * just for debugging purposes
188
+	 *
189
+	 * @access    public
190
+	 * @return void
191
+	 */
192
+	public function display_template_parts()
193
+	{
194
+		if (WP_DEBUG) {
195
+			$this->template_parts->rewind();
196
+			while ($this->template_parts->valid()) {
197
+				EEH_Debug_Tools::printr(
198
+					$this->template_parts->current(),
199
+					'template_part',
200
+					__FILE__,
201
+					__LINE__
202
+				);
203
+				$this->template_parts->next();
204
+			}
205
+		}
206
+	}
207 207
 }
Please login to merge, or discard this patch.
core/business/EE_Processor_Base.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                 if ($transaction->ID()) {
76 76
                     $info['TXN_status'] = $transaction->status_ID();
77 77
                     $info['TXN_reg_steps'] = $transaction->reg_steps();
78
-                    $index = 'EE_Transaction: ' . $transaction->ID();
78
+                    $index = 'EE_Transaction: '.$transaction->ID();
79 79
                     EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
80 80
                 }
81 81
             }
Please login to merge, or discard this patch.
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -13,71 +13,71 @@
 block discarded – undo
13 13
  */
14 14
 class EE_Processor_Base
15 15
 {
16
-    /**
17
-     * Used to indicate whether current request is for an IPN or not.
18
-     *
19
-     * @var bool
20
-     */
21
-    protected static $IPN = false;
16
+	/**
17
+	 * Used to indicate whether current request is for an IPN or not.
18
+	 *
19
+	 * @var bool
20
+	 */
21
+	protected static $IPN = false;
22 22
 
23
-    /**
24
-     * Used to indicate whether SPCO is being revisited by registrant or not.
25
-     *
26
-     * @var bool
27
-     */
28
-    protected $_revisit = false;
23
+	/**
24
+	 * Used to indicate whether SPCO is being revisited by registrant or not.
25
+	 *
26
+	 * @var bool
27
+	 */
28
+	protected $_revisit = false;
29 29
 
30 30
 
31
-    /**
32
-     * @param boolean $IPN
33
-     */
34
-    public static function set_IPN($IPN)
35
-    {
36
-        self::$IPN = filter_var($IPN, FILTER_VALIDATE_BOOLEAN);
37
-    }
31
+	/**
32
+	 * @param boolean $IPN
33
+	 */
34
+	public static function set_IPN($IPN)
35
+	{
36
+		self::$IPN = filter_var($IPN, FILTER_VALIDATE_BOOLEAN);
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * Allows external class (usually checkout) to set whether SPCO is being revisited by registrant or not.
42
-     *
43
-     * @param bool $revisit
44
-     * @return void
45
-     */
46
-    public function set_revisit($revisit = false)
47
-    {
48
-        $this->_revisit = filter_var($revisit, FILTER_VALIDATE_BOOLEAN);
49
-    }
40
+	/**
41
+	 * Allows external class (usually checkout) to set whether SPCO is being revisited by registrant or not.
42
+	 *
43
+	 * @param bool $revisit
44
+	 * @return void
45
+	 */
46
+	public function set_revisit($revisit = false)
47
+	{
48
+		$this->_revisit = filter_var($revisit, FILTER_VALIDATE_BOOLEAN);
49
+	}
50 50
 
51 51
 
52
-    /**
53
-     * debug
54
-     *
55
-     * @param string          $class
56
-     * @param string          $func
57
-     * @param string          $line
58
-     * @param \EE_Transaction $transaction
59
-     * @param array           $info
60
-     * @param bool            $display_request
61
-     */
62
-    protected function log(
63
-        $class = '',
64
-        $func = '',
65
-        $line = '',
66
-        EE_Transaction $transaction,
67
-        $info = array(),
68
-        $display_request = false
69
-    ) {
70
-        if (WP_DEBUG && false) {
71
-            if ($transaction instanceof EE_Transaction) {
72
-                // don't serialize objects
73
-                $info = EEH_Debug_Tools::strip_objects($info);
74
-                if ($transaction->ID()) {
75
-                    $info['TXN_status'] = $transaction->status_ID();
76
-                    $info['TXN_reg_steps'] = $transaction->reg_steps();
77
-                    $index = 'EE_Transaction: ' . $transaction->ID();
78
-                    EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
79
-                }
80
-            }
81
-        }
82
-    }
52
+	/**
53
+	 * debug
54
+	 *
55
+	 * @param string          $class
56
+	 * @param string          $func
57
+	 * @param string          $line
58
+	 * @param \EE_Transaction $transaction
59
+	 * @param array           $info
60
+	 * @param bool            $display_request
61
+	 */
62
+	protected function log(
63
+		$class = '',
64
+		$func = '',
65
+		$line = '',
66
+		EE_Transaction $transaction,
67
+		$info = array(),
68
+		$display_request = false
69
+	) {
70
+		if (WP_DEBUG && false) {
71
+			if ($transaction instanceof EE_Transaction) {
72
+				// don't serialize objects
73
+				$info = EEH_Debug_Tools::strip_objects($info);
74
+				if ($transaction->ID()) {
75
+					$info['TXN_status'] = $transaction->status_ID();
76
+					$info['TXN_reg_steps'] = $transaction->reg_steps();
77
+					$index = 'EE_Transaction: ' . $transaction->ID();
78
+					EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
79
+				}
80
+			}
81
+		}
82
+	}
83 83
 }
Please login to merge, or discard this patch.
core/admin/EE_Help_Tour_final_stop.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                        'That\'s it for the tour!  At any time you can restart a tour by clicking on this help dropdown and then clicking one of the Tour buttons.  There are help tours available on all Event Espresso Admin pages.  If you want to turn off help tours for all pages, %sgo here%s. All the best with your events!',
58 58
                        'event_espresso'
59 59
                    ),
60
-                   '<a href="' . EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php')) . '">',
60
+                   '<a href="'.EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php')).'">',
61 61
                    '</a>'
62 62
                )
63 63
                . '</p>';
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -14,51 +14,51 @@
 block discarded – undo
14 14
  */
15 15
 class EE_Help_Tour_final_stop extends EE_Help_Tour
16 16
 {
17
-    protected function _set_tour_properties()
18
-    {
19
-        $this->_label = esc_html__('Final Stop Tour', 'event_espresso');
20
-        $this->_slug = 'final-stop-tour';
21
-    }
17
+	protected function _set_tour_properties()
18
+	{
19
+		$this->_label = esc_html__('Final Stop Tour', 'event_espresso');
20
+		$this->_slug = 'final-stop-tour';
21
+	}
22 22
 
23 23
 
24
-    protected function _set_tour_stops()
25
-    {
26
-        $this->_stops = array(
27
-            10 => array(
28
-                'id'          => 'contextual-help-link',
29
-                'content'     => $this->_end(),
30
-                'button_text' => esc_html__('Quit', 'event_espresso'),
31
-                'options'     => array(
32
-                    'tipLocation'    => 'left',
33
-                    'tipAdjustmentY' => -20,
34
-                    'tipAdjustmentX' => 10,
35
-                ),
36
-            ),
37
-        );
38
-    }
24
+	protected function _set_tour_stops()
25
+	{
26
+		$this->_stops = array(
27
+			10 => array(
28
+				'id'          => 'contextual-help-link',
29
+				'content'     => $this->_end(),
30
+				'button_text' => esc_html__('Quit', 'event_espresso'),
31
+				'options'     => array(
32
+					'tipLocation'    => 'left',
33
+					'tipAdjustmentY' => -20,
34
+					'tipAdjustmentX' => 10,
35
+				),
36
+			),
37
+		);
38
+	}
39 39
 
40 40
 
41
-    /**
42
-     * This is the default last stop for all tours that is displayed at the end of a tour OR when a tour is exited for
43
-     * the first time.
44
-     *
45
-     * @return string
46
-     */
47
-    protected function _end()
48
-    {
49
-        $query_args = array(
50
-            'action' => 'admin_option_settings',
51
-            'page'   => 'espresso_general_settings',
52
-        );
53
-        return '<p>'
54
-               . sprintf(
55
-                   esc_html__(
56
-                       'That\'s it for the tour!  At any time you can restart a tour by clicking on this help dropdown and then clicking one of the Tour buttons.  There are help tours available on all Event Espresso Admin pages.  If you want to turn off help tours for all pages, %sgo here%s. All the best with your events!',
57
-                       'event_espresso'
58
-                   ),
59
-                   '<a href="' . EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php')) . '">',
60
-                   '</a>'
61
-               )
62
-               . '</p>';
63
-    }
41
+	/**
42
+	 * This is the default last stop for all tours that is displayed at the end of a tour OR when a tour is exited for
43
+	 * the first time.
44
+	 *
45
+	 * @return string
46
+	 */
47
+	protected function _end()
48
+	{
49
+		$query_args = array(
50
+			'action' => 'admin_option_settings',
51
+			'page'   => 'espresso_general_settings',
52
+		);
53
+		return '<p>'
54
+			   . sprintf(
55
+				   esc_html__(
56
+					   'That\'s it for the tour!  At any time you can restart a tour by clicking on this help dropdown and then clicking one of the Tour buttons.  There are help tours available on all Event Espresso Admin pages.  If you want to turn off help tours for all pages, %sgo here%s. All the best with your events!',
57
+					   'event_espresso'
58
+				   ),
59
+				   '<a href="' . EE_Admin_Page::add_query_args_and_nonce($query_args, admin_url('admin.php')) . '">',
60
+				   '</a>'
61
+			   )
62
+			   . '</p>';
63
+	}
64 64
 }
Please login to merge, or discard this patch.
admin_pages/support/Support_Admin_Page_Init.core.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
20 20
     {
21 21
         // define some help/support page related constants
22 22
         define('EE_SUPPORT_PG_SLUG', 'espresso_support');
23
-        define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG));
24
-        define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/');
25
-        define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/');
26
-        define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/');
23
+        define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page='.EE_SUPPORT_PG_SLUG));
24
+        define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'support/templates/');
25
+        define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES.'support/');
26
+        define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL.'support/assets/');
27 27
         parent::__construct();
28 28
     }
29 29
 
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,36 +14,36 @@
 block discarded – undo
14 14
  */
15 15
 class Support_Admin_Page_Init extends EE_Admin_Page_Init
16 16
 {
17
-    public function __construct()
18
-    {
19
-        // define some help/support page related constants
20
-        define('EE_SUPPORT_PG_SLUG', 'espresso_support');
21
-        define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG));
22
-        define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/');
23
-        define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/');
24
-        define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/');
25
-        parent::__construct();
26
-    }
17
+	public function __construct()
18
+	{
19
+		// define some help/support page related constants
20
+		define('EE_SUPPORT_PG_SLUG', 'espresso_support');
21
+		define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG));
22
+		define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/');
23
+		define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/');
24
+		define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/');
25
+		parent::__construct();
26
+	}
27 27
 
28
-    protected function _set_init_properties()
29
-    {
30
-        $this->label = esc_html__('Help & Support', 'event_espresso');
31
-    }
28
+	protected function _set_init_properties()
29
+	{
30
+		$this->label = esc_html__('Help & Support', 'event_espresso');
31
+	}
32 32
 
33
-    protected function _set_menu_map()
34
-    {
35
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
36
-            array(
37
-                'menu_group'              => 'extras',
38
-                'menu_order'              => 30,
39
-                'show_on_menu'            => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
40
-                'parent_slug'             => 'espresso_events',
41
-                'menu_slug'               => EE_SUPPORT_PG_SLUG,
42
-                'menu_label'              => esc_html__('Help & Support', 'event_espresso'),
43
-                'capability'              => 'ee_read_ee',
44
-                'maintenance_mode_parent' => 'espresso_maintenance_settings',
45
-                'admin_init_page'         => $this,
46
-            )
47
-        );
48
-    }
33
+	protected function _set_menu_map()
34
+	{
35
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
36
+			array(
37
+				'menu_group'              => 'extras',
38
+				'menu_order'              => 30,
39
+				'show_on_menu'            => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
40
+				'parent_slug'             => 'espresso_events',
41
+				'menu_slug'               => EE_SUPPORT_PG_SLUG,
42
+				'menu_label'              => esc_html__('Help & Support', 'event_espresso'),
43
+				'capability'              => 'ee_read_ee',
44
+				'maintenance_mode_parent' => 'espresso_maintenance_settings',
45
+				'admin_init_page'         => $this,
46
+			)
47
+		);
48
+	}
49 49
 }
Please login to merge, or discard this patch.
admin_pages/about/About_Admin_Page.core.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
         $this->_template_args['admin_page_subtitle'] = esc_html__(
170 170
             'Thank you for choosing Event Espresso, the most powerful, and free, Event Management plugin for WordPress.',
171 171
             'event_espresso'
172
-        ) . $settings_message;
173
-        $template = EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
172
+        ).$settings_message;
173
+        $template = EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php';
174 174
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
175 175
             $template,
176 176
             $this->_template_args,
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
     protected function _get_started_steps()
184 184
     {
185
-        $steps = '<h2>' . esc_html__('Getting Started', 'event_espresso') . '</h2>';
185
+        $steps = '<h2>'.esc_html__('Getting Started', 'event_espresso').'</h2>';
186 186
         $step_one = '<p>'
187 187
                     . sprintf(
188 188
                         esc_html__(
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                         '</strong>',
194 194
                         '<a href="admin.php?page=espresso_general_settings">',
195 195
                         '</a>'
196
-                    ) . '</strong></p>';
196
+                    ).'</strong></p>';
197 197
         $step_two = '<p>'
198 198
                     . sprintf(
199 199
                         esc_html__('%sStep 2%s: Setup your %sPayment Methods%s.', 'event_espresso'),
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                         '</strong>',
202 202
                         '<a href="admin.php?page=espresso_payment_settings">',
203 203
                         '</a>'
204
-                    ) . '</strong></p>';
204
+                    ).'</strong></p>';
205 205
         $step_three = '<p>'
206 206
                       . sprintf(
207 207
                           esc_html__('%sStep 3%s: Create your %sFirst Event%s.', 'event_espresso'),
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                           '</strong>',
210 210
                           '<a href="admin.php?page=espresso_events&action=create_new">',
211 211
                           '</a>'
212
-                      ) . '</strong></p>';
212
+                      ).'</strong></p>';
213 213
 
214 214
         // done?
215 215
         $done_step_one = EE_Registry::instance()->CFG->organization->address_1 == '123 Onna Road' ? false : true;
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
         }
239 239
 
240 240
         // now let's put it together
241
-        $steps .= sprintf('%s' . $step_one . '%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>' : '');
242
-        $steps .= sprintf('%s' . $step_two . '%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>' : '');
241
+        $steps .= sprintf('%s'.$step_one.'%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>' : '');
242
+        $steps .= sprintf('%s'.$step_two.'%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>' : '');
243 243
         $steps .= sprintf(
244
-            '%s' . $step_three . '%s',
244
+            '%s'.$step_three.'%s',
245 245
             $done_step_three ? '<strike>' : '',
246 246
             $done_step_three ? '</strike>' : ''
247 247
         );
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             'Thank you for choosing Event Espresso Decaf, the most powerful, and free, Event Management plugin for WordPress.',
261 261
             'event_espresso'
262 262
         );
263
-        $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php';
263
+        $template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php';
264 264
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
265 265
             $template,
266 266
             $this->_template_args,
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             '<strong>',
287 287
             '</strong>'
288 288
         );
289
-        $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php';
289
+        $template = EE_ABOUT_TEMPLATE_PATH.'decafvpro.template.php';
290 290
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
291 291
             $template,
292 292
             $this->_template_args,
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             'At Event Espresso, customer satisfaction is our ultimate goal.',
303 303
             'event_espresso'
304 304
         );
305
-        $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php';
305
+        $template = EE_ABOUT_TEMPLATE_PATH.'reviews.template.php';
306 306
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
307 307
             $template,
308 308
             $this->_template_args,
Please login to merge, or discard this patch.
Indentation   +274 added lines, -274 removed lines patch added patch discarded remove patch
@@ -15,128 +15,128 @@  discard block
 block discarded – undo
15 15
  */
16 16
 class About_Admin_Page extends EE_Admin_Page
17 17
 {
18
-    protected function _init_page_props()
19
-    {
20
-        $this->page_slug = EE_ABOUT_PG_SLUG;
21
-        $this->page_label = esc_html__('About Event Espresso', 'event_espresso');
22
-        $this->_admin_base_url = EE_ABOUT_ADMIN_URL;
23
-        $this->_admin_base_path = EE_ABOUT_ADMIN;
24
-    }
25
-
26
-
27
-    protected function _ajax_hooks()
28
-    {
29
-        // todo: all hooks for ajax goes here.
30
-    }
31
-
32
-
33
-    protected function _define_page_props()
34
-    {
35
-        $this->_labels = array();
36
-        $this->_admin_page_title = $this->page_label;
37
-    }
38
-
39
-
40
-    protected function _set_page_routes()
41
-    {
42
-        $this->_page_routes = array(
43
-            'default' => array(
44
-                'func'       => '_overview',
45
-                'capability' => 'manage_options',
46
-            ),
47
-            // 'overview' => '_overview',
48
-            // 'func' => '_overview',
49
-            // 'capability' => 'ee_read_ee'
50
-            // ),
51
-            'credits' => array(
52
-                'func'       => '_credits',
53
-                'capability' => 'manage_options',
54
-            ),
55
-
56
-            'decafvpro' => array(
57
-                'func'       => '_decafvpro',
58
-                'capability' => 'manage_options',
59
-            ),
60
-            'reviews'   => array(
61
-                'func'       => '_reviews',
62
-                'capability' => 'manage_options',
63
-            ),
64
-        );
65
-    }
66
-
67
-
68
-    protected function _set_page_config()
69
-    {
70
-        $this->_page_config = array(
71
-            /*'default' => array(
18
+	protected function _init_page_props()
19
+	{
20
+		$this->page_slug = EE_ABOUT_PG_SLUG;
21
+		$this->page_label = esc_html__('About Event Espresso', 'event_espresso');
22
+		$this->_admin_base_url = EE_ABOUT_ADMIN_URL;
23
+		$this->_admin_base_path = EE_ABOUT_ADMIN;
24
+	}
25
+
26
+
27
+	protected function _ajax_hooks()
28
+	{
29
+		// todo: all hooks for ajax goes here.
30
+	}
31
+
32
+
33
+	protected function _define_page_props()
34
+	{
35
+		$this->_labels = array();
36
+		$this->_admin_page_title = $this->page_label;
37
+	}
38
+
39
+
40
+	protected function _set_page_routes()
41
+	{
42
+		$this->_page_routes = array(
43
+			'default' => array(
44
+				'func'       => '_overview',
45
+				'capability' => 'manage_options',
46
+			),
47
+			// 'overview' => '_overview',
48
+			// 'func' => '_overview',
49
+			// 'capability' => 'ee_read_ee'
50
+			// ),
51
+			'credits' => array(
52
+				'func'       => '_credits',
53
+				'capability' => 'manage_options',
54
+			),
55
+
56
+			'decafvpro' => array(
57
+				'func'       => '_decafvpro',
58
+				'capability' => 'manage_options',
59
+			),
60
+			'reviews'   => array(
61
+				'func'       => '_reviews',
62
+				'capability' => 'manage_options',
63
+			),
64
+		);
65
+	}
66
+
67
+
68
+	protected function _set_page_config()
69
+	{
70
+		$this->_page_config = array(
71
+			/*'default' => array(
72 72
                 'nav' => array(
73 73
                     'label' => esc_html__('What\'s New', 'event_espresso'),
74 74
                     'order' => 10),
75 75
                 'require_nonce' => FALSE
76 76
                 ),*/
77
-            // 'overview' => array(
78
-            'default' => array(
79
-                'nav'           => array(
80
-                    'label' => esc_html__('About', 'event_espresso'),
81
-                    'order' => 20,
82
-                ),
83
-                'require_nonce' => false,
84
-            ),
85
-            'credits' => array(
86
-                'nav'           => array(
87
-                    'label' => esc_html__('Credits', 'event_espresso'),
88
-                    'order' => 30,
89
-                ),
90
-                'require_nonce' => false,
91
-            ),
92
-
93
-            'decafvpro' => array(
94
-                'nav'           => array(
95
-                    'label' => esc_html__('Decaf vs Regular', 'event_espresso'),
96
-                    'order' => 40,
97
-                ),
98
-                'require_nonce' => false,
99
-            ),
100
-            'reviews'   => array(
101
-                'nav'           => array(
102
-                    'label' => esc_html__('Reviews', 'event_espresso'),
103
-                    'order' => 50,
104
-                ),
105
-                'require_nonce' => false,
106
-            ),
107
-        );
108
-    }
109
-
110
-
111
-    // none of the below group are currently used for Support pages
112
-    protected function _add_screen_options()
113
-    {
114
-    }
115
-
116
-    protected function _add_feature_pointers()
117
-    {
118
-    }
119
-
120
-    public function admin_init()
121
-    {
122
-    }
123
-
124
-    public function admin_notices()
125
-    {
126
-    }
127
-
128
-    public function admin_footer_scripts()
129
-    {
130
-    }
131
-
132
-    public function load_scripts_styles()
133
-    {
134
-    }
135
-
136
-
137
-    protected function _whats_new()
138
-    {
139
-        /*$steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE;
77
+			// 'overview' => array(
78
+			'default' => array(
79
+				'nav'           => array(
80
+					'label' => esc_html__('About', 'event_espresso'),
81
+					'order' => 20,
82
+				),
83
+				'require_nonce' => false,
84
+			),
85
+			'credits' => array(
86
+				'nav'           => array(
87
+					'label' => esc_html__('Credits', 'event_espresso'),
88
+					'order' => 30,
89
+				),
90
+				'require_nonce' => false,
91
+			),
92
+
93
+			'decafvpro' => array(
94
+				'nav'           => array(
95
+					'label' => esc_html__('Decaf vs Regular', 'event_espresso'),
96
+					'order' => 40,
97
+				),
98
+				'require_nonce' => false,
99
+			),
100
+			'reviews'   => array(
101
+				'nav'           => array(
102
+					'label' => esc_html__('Reviews', 'event_espresso'),
103
+					'order' => 50,
104
+				),
105
+				'require_nonce' => false,
106
+			),
107
+		);
108
+	}
109
+
110
+
111
+	// none of the below group are currently used for Support pages
112
+	protected function _add_screen_options()
113
+	{
114
+	}
115
+
116
+	protected function _add_feature_pointers()
117
+	{
118
+	}
119
+
120
+	public function admin_init()
121
+	{
122
+	}
123
+
124
+	public function admin_notices()
125
+	{
126
+	}
127
+
128
+	public function admin_footer_scripts()
129
+	{
130
+	}
131
+
132
+	public function load_scripts_styles()
133
+	{
134
+	}
135
+
136
+
137
+	protected function _whats_new()
138
+	{
139
+		/*$steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE;
140 140
         $steps = $steps !== FALSE ? $steps : '';
141 141
         $this->_admin_page_title = sprintf( esc_html__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION );
142 142
         $settings_message = $steps;
@@ -144,168 +144,168 @@  discard block
 block discarded – undo
144 144
         $template = EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php';
145 145
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
146 146
         $this->display_about_admin_page();*/
147
-    }
147
+	}
148 148
 
149 149
 
150
-    protected function _overview()
151
-    {
152
-        /*$this->_template_args['admin_page_title'] = esc_html__('About Event Espresso', 'event_espresso');
150
+	protected function _overview()
151
+	{
152
+		/*$this->_template_args['admin_page_title'] = esc_html__('About Event Espresso', 'event_espresso');
153 153
         $this->_template_args['admin_page_subtitle'] = esc_html__('Thank you for choosing Event Espresso Decaf, the most powerful, and free, Event Management plugin for WordPress.', 'event_espresso');
154 154
         $template = EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
155 155
         $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE );
156 156
         $this->display_about_admin_page();*/
157 157
 
158
-        // Copied from _whats_new()
159
-        $steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance
160
-            ? $this->_get_started_steps() : false;
161
-        $steps = $steps !== false ? $steps : '';
162
-        $this->_admin_page_title = sprintf(
163
-            esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
164
-            EVENT_ESPRESSO_VERSION
165
-        );
166
-        $settings_message = $steps;
167
-        $this->_template_args['admin_page_subtitle'] = esc_html__(
168
-            'Thank you for choosing Event Espresso, the most powerful, and free, Event Management plugin for WordPress.',
169
-            'event_espresso'
170
-        ) . $settings_message;
171
-        $template = EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
172
-        $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
173
-            $template,
174
-            $this->_template_args,
175
-            true
176
-        );
177
-        $this->display_about_admin_page();
178
-    }
179
-
180
-
181
-    protected function _get_started_steps()
182
-    {
183
-        $steps = '<h2>' . esc_html__('Getting Started', 'event_espresso') . '</h2>';
184
-        $step_one = '<p>'
185
-                    . sprintf(
186
-                        esc_html__(
187
-                            '%sStep 1%s: Visit your %sOrganization Settings%s and add/update your details.',
188
-                            'event_espresso'
189
-                        ),
190
-                        '<strong>',
191
-                        '</strong>',
192
-                        '<a href="admin.php?page=espresso_general_settings">',
193
-                        '</a>'
194
-                    ) . '</strong></p>';
195
-        $step_two = '<p>'
196
-                    . sprintf(
197
-                        esc_html__('%sStep 2%s: Setup your %sPayment Methods%s.', 'event_espresso'),
198
-                        '<strong>',
199
-                        '</strong>',
200
-                        '<a href="admin.php?page=espresso_payment_settings">',
201
-                        '</a>'
202
-                    ) . '</strong></p>';
203
-        $step_three = '<p>'
204
-                      . sprintf(
205
-                          esc_html__('%sStep 3%s: Create your %sFirst Event%s.', 'event_espresso'),
206
-                          '<strong>',
207
-                          '</strong>',
208
-                          '<a href="admin.php?page=espresso_events&action=create_new">',
209
-                          '</a>'
210
-                      ) . '</strong></p>';
211
-
212
-        // done?
213
-        $done_step_one = EE_Registry::instance()->CFG->organization->address_1 == '123 Onna Road' ? false : true;
214
-        $active_invoice_pm = EEM_Payment_Method::instance()->get_one_active(
215
-            EEM_Payment_Method::scope_cart,
216
-            array(array('PMD_type' => 'Invoice'))
217
-        );
218
-        $active_pms_count = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart);
219
-        // done step two if a non-invoice paymetn method is active; or there is more than one PM active, or
220
-        // if only the invoice is active but it's clearly been updated
221
-        $done_step_two = $active_pms_count > 1 ||
222
-                         ($active_pms_count === 1 && ! $active_invoice_pm) ||
223
-                         ($active_invoice_pm instanceof EE_Payment_Method && (
224
-                                 $active_invoice_pm->get_extra_meta('pdf_payee_name', true, '') ||
225
-                                 $active_invoice_pm->get_extra_meta('pdf_payee_email', true, '') ||
226
-                                 $active_invoice_pm->get_extra_meta('pdf_payee_tax_number', true, '') ||
227
-                                 $active_invoice_pm->get_extra_meta('pdf_payee_address', true, '') ||
228
-                                 $active_invoice_pm->get_extra_meta('page_extra_info', true, '')
229
-                             )
230
-                         );
231
-        $done_step_three = EE_Registry::instance()->load_model('Event')->count() > 0 ? true : false;
232
-
233
-        // if ALL steps are done, let's just return FALSE so we don't display anything
234
-        if ($done_step_one && $done_step_two && $done_step_three) {
235
-            return false;
236
-        }
237
-
238
-        // now let's put it together
239
-        $steps .= sprintf('%s' . $step_one . '%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>' : '');
240
-        $steps .= sprintf('%s' . $step_two . '%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>' : '');
241
-        $steps .= sprintf(
242
-            '%s' . $step_three . '%s',
243
-            $done_step_three ? '<strike>' : '',
244
-            $done_step_three ? '</strike>' : ''
245
-        );
246
-
247
-        return $steps;
248
-    }
249
-
250
-
251
-    protected function _credits()
252
-    {
253
-        $this->_template_args['admin_page_title'] = sprintf(
254
-            esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
255
-            EVENT_ESPRESSO_VERSION
256
-        );
257
-        $this->_template_args['admin_page_subtitle'] = esc_html__(
258
-            'Thank you for choosing Event Espresso Decaf, the most powerful, and free, Event Management plugin for WordPress.',
259
-            'event_espresso'
260
-        );
261
-        $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php';
262
-        $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
263
-            $template,
264
-            $this->_template_args,
265
-            true
266
-        );
267
-        $this->display_about_admin_page();
268
-    }
269
-
270
-
271
-    protected function _decafvpro()
272
-    {
273
-        $this->_template_args['admin_page_title'] = sprintf(
274
-            esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
275
-            EVENT_ESPRESSO_VERSION
276
-        );
277
-        $this->_template_args['admin_page_subtitle'] = sprintf(
278
-            esc_html__(
279
-                'Event Espresso lets you focus on doing %swhat you love%s — %sorganizing your events%s',
280
-                'event_espresso'
281
-            ),
282
-            '<em>',
283
-            '</em>',
284
-            '<strong>',
285
-            '</strong>'
286
-        );
287
-        $template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php';
288
-        $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
289
-            $template,
290
-            $this->_template_args,
291
-            true
292
-        );
293
-        $this->display_about_admin_page();
294
-    }
295
-
296
-    protected function _reviews()
297
-    {
298
-        $this->_template_args['admin_page_title'] = esc_html__('Rave Reviews About Event Espresso 4', 'event_espresso');
299
-        $this->_template_args['admin_page_subtitle'] = esc_html__(
300
-            'At Event Espresso, customer satisfaction is our ultimate goal.',
301
-            'event_espresso'
302
-        );
303
-        $template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php';
304
-        $this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
305
-            $template,
306
-            $this->_template_args,
307
-            true
308
-        );
309
-        $this->display_about_admin_page();
310
-    }
158
+		// Copied from _whats_new()
159
+		$steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance
160
+			? $this->_get_started_steps() : false;
161
+		$steps = $steps !== false ? $steps : '';
162
+		$this->_admin_page_title = sprintf(
163
+			esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
164
+			EVENT_ESPRESSO_VERSION
165
+		);
166
+		$settings_message = $steps;
167
+		$this->_template_args['admin_page_subtitle'] = esc_html__(
168
+			'Thank you for choosing Event Espresso, the most powerful, and free, Event Management plugin for WordPress.',
169
+			'event_espresso'
170
+		) . $settings_message;
171
+		$template = EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php';
172
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
173
+			$template,
174
+			$this->_template_args,
175
+			true
176
+		);
177
+		$this->display_about_admin_page();
178
+	}
179
+
180
+
181
+	protected function _get_started_steps()
182
+	{
183
+		$steps = '<h2>' . esc_html__('Getting Started', 'event_espresso') . '</h2>';
184
+		$step_one = '<p>'
185
+					. sprintf(
186
+						esc_html__(
187
+							'%sStep 1%s: Visit your %sOrganization Settings%s and add/update your details.',
188
+							'event_espresso'
189
+						),
190
+						'<strong>',
191
+						'</strong>',
192
+						'<a href="admin.php?page=espresso_general_settings">',
193
+						'</a>'
194
+					) . '</strong></p>';
195
+		$step_two = '<p>'
196
+					. sprintf(
197
+						esc_html__('%sStep 2%s: Setup your %sPayment Methods%s.', 'event_espresso'),
198
+						'<strong>',
199
+						'</strong>',
200
+						'<a href="admin.php?page=espresso_payment_settings">',
201
+						'</a>'
202
+					) . '</strong></p>';
203
+		$step_three = '<p>'
204
+					  . sprintf(
205
+						  esc_html__('%sStep 3%s: Create your %sFirst Event%s.', 'event_espresso'),
206
+						  '<strong>',
207
+						  '</strong>',
208
+						  '<a href="admin.php?page=espresso_events&action=create_new">',
209
+						  '</a>'
210
+					  ) . '</strong></p>';
211
+
212
+		// done?
213
+		$done_step_one = EE_Registry::instance()->CFG->organization->address_1 == '123 Onna Road' ? false : true;
214
+		$active_invoice_pm = EEM_Payment_Method::instance()->get_one_active(
215
+			EEM_Payment_Method::scope_cart,
216
+			array(array('PMD_type' => 'Invoice'))
217
+		);
218
+		$active_pms_count = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart);
219
+		// done step two if a non-invoice paymetn method is active; or there is more than one PM active, or
220
+		// if only the invoice is active but it's clearly been updated
221
+		$done_step_two = $active_pms_count > 1 ||
222
+						 ($active_pms_count === 1 && ! $active_invoice_pm) ||
223
+						 ($active_invoice_pm instanceof EE_Payment_Method && (
224
+								 $active_invoice_pm->get_extra_meta('pdf_payee_name', true, '') ||
225
+								 $active_invoice_pm->get_extra_meta('pdf_payee_email', true, '') ||
226
+								 $active_invoice_pm->get_extra_meta('pdf_payee_tax_number', true, '') ||
227
+								 $active_invoice_pm->get_extra_meta('pdf_payee_address', true, '') ||
228
+								 $active_invoice_pm->get_extra_meta('page_extra_info', true, '')
229
+							 )
230
+						 );
231
+		$done_step_three = EE_Registry::instance()->load_model('Event')->count() > 0 ? true : false;
232
+
233
+		// if ALL steps are done, let's just return FALSE so we don't display anything
234
+		if ($done_step_one && $done_step_two && $done_step_three) {
235
+			return false;
236
+		}
237
+
238
+		// now let's put it together
239
+		$steps .= sprintf('%s' . $step_one . '%s', $done_step_one ? '<strike>' : '', $done_step_one ? '</strike>' : '');
240
+		$steps .= sprintf('%s' . $step_two . '%s', $done_step_two ? '<strike>' : '', $done_step_two ? '</strike>' : '');
241
+		$steps .= sprintf(
242
+			'%s' . $step_three . '%s',
243
+			$done_step_three ? '<strike>' : '',
244
+			$done_step_three ? '</strike>' : ''
245
+		);
246
+
247
+		return $steps;
248
+	}
249
+
250
+
251
+	protected function _credits()
252
+	{
253
+		$this->_template_args['admin_page_title'] = sprintf(
254
+			esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
255
+			EVENT_ESPRESSO_VERSION
256
+		);
257
+		$this->_template_args['admin_page_subtitle'] = esc_html__(
258
+			'Thank you for choosing Event Espresso Decaf, the most powerful, and free, Event Management plugin for WordPress.',
259
+			'event_espresso'
260
+		);
261
+		$template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php';
262
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
263
+			$template,
264
+			$this->_template_args,
265
+			true
266
+		);
267
+		$this->display_about_admin_page();
268
+	}
269
+
270
+
271
+	protected function _decafvpro()
272
+	{
273
+		$this->_template_args['admin_page_title'] = sprintf(
274
+			esc_html__('Welcome to Event Espresso %s', 'event_espresso'),
275
+			EVENT_ESPRESSO_VERSION
276
+		);
277
+		$this->_template_args['admin_page_subtitle'] = sprintf(
278
+			esc_html__(
279
+				'Event Espresso lets you focus on doing %swhat you love%s — %sorganizing your events%s',
280
+				'event_espresso'
281
+			),
282
+			'<em>',
283
+			'</em>',
284
+			'<strong>',
285
+			'</strong>'
286
+		);
287
+		$template = EE_ABOUT_TEMPLATE_PATH . 'decafvpro.template.php';
288
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
289
+			$template,
290
+			$this->_template_args,
291
+			true
292
+		);
293
+		$this->display_about_admin_page();
294
+	}
295
+
296
+	protected function _reviews()
297
+	{
298
+		$this->_template_args['admin_page_title'] = esc_html__('Rave Reviews About Event Espresso 4', 'event_espresso');
299
+		$this->_template_args['admin_page_subtitle'] = esc_html__(
300
+			'At Event Espresso, customer satisfaction is our ultimate goal.',
301
+			'event_espresso'
302
+		);
303
+		$template = EE_ABOUT_TEMPLATE_PATH . 'reviews.template.php';
304
+		$this->_template_args['about_admin_page_content'] = EEH_Template::display_template(
305
+			$template,
306
+			$this->_template_args,
307
+			true
308
+		);
309
+		$this->display_about_admin_page();
310
+	}
311 311
 }
Please login to merge, or discard this patch.