Completed
Branch dependabot/npm_and_yarn/wordpr... (563a96)
by
unknown
57:01 queued 49:08
created
modules/certificate/EED_Certificate.module.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      *    the_content
97 97
      *
98 98
      * @access    public
99
-     * @return    void
99
+     * @return    string
100 100
      */
101 101
     public function the_content($content)
102 102
     {
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -12,95 +12,95 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    /**
16
-     * @return EED_Module
17
-     */
18
-    public static function instance()
19
-    {
20
-        return parent::get_instance(__CLASS__);
21
-    }
15
+	/**
16
+	 * @return EED_Module
17
+	 */
18
+	public static function instance()
19
+	{
20
+		return parent::get_instance(__CLASS__);
21
+	}
22 22
 
23 23
 
24
-    /**
25
-     *    set_hooks - for hooking into EE Core, other modules, etc
26
-     *
27
-     * @access    public
28
-     * @return    void
29
-     */
30
-    public static function set_hooks()
31
-    {
32
-    }
24
+	/**
25
+	 *    set_hooks - for hooking into EE Core, other modules, etc
26
+	 *
27
+	 * @access    public
28
+	 * @return    void
29
+	 */
30
+	public static function set_hooks()
31
+	{
32
+	}
33 33
 
34
-    /**
35
-     *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
36
-     *
37
-     * @access    public
38
-     * @return    void
39
-     */
40
-    public static function set_hooks_admin()
41
-    {
42
-    }
34
+	/**
35
+	 *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
36
+	 *
37
+	 * @access    public
38
+	 * @return    void
39
+	 */
40
+	public static function set_hooks_admin()
41
+	{
42
+	}
43 43
 
44 44
 
45
-    /**
46
-     *    run - initial module setup
47
-     *
48
-     * @access    public
49
-     * @return    void
50
-     */
51
-    public function run($WP)
52
-    {
53
-    }
45
+	/**
46
+	 *    run - initial module setup
47
+	 *
48
+	 * @access    public
49
+	 * @return    void
50
+	 */
51
+	public function run($WP)
52
+	{
53
+	}
54 54
 
55 55
 
56
-    /**
57
-     *    certificate_launch
58
-     *
59
-     * @access    public
60
-     * @return    void
61
-     */
62
-    public function certificate_launch()
63
-    {
64
-        if (EE_Registry::instance()->REQ->is_set('id') && EE_Registry::instance()->REQ->is_set('r_id')) {
65
-            echo espresso_certificate_launch(
66
-                EE_Registry::instance()->REQ->get('id'),
67
-                EE_Registry::instance()->REQ->get('r_id')
68
-            );
69
-        }
70
-    }
56
+	/**
57
+	 *    certificate_launch
58
+	 *
59
+	 * @access    public
60
+	 * @return    void
61
+	 */
62
+	public function certificate_launch()
63
+	{
64
+		if (EE_Registry::instance()->REQ->is_set('id') && EE_Registry::instance()->REQ->is_set('r_id')) {
65
+			echo espresso_certificate_launch(
66
+				EE_Registry::instance()->REQ->get('id'),
67
+				EE_Registry::instance()->REQ->get('r_id')
68
+			);
69
+		}
70
+	}
71 71
 
72 72
 
73
-    /**
74
-     *    wp_loaded
75
-     *
76
-     * @access    public
77
-     * @return    void
78
-     */
79
-    public function wp_loaded()
80
-    {
81
-    }
73
+	/**
74
+	 *    wp_loaded
75
+	 *
76
+	 * @access    public
77
+	 * @return    void
78
+	 */
79
+	public function wp_loaded()
80
+	{
81
+	}
82 82
 
83 83
 
84
-    /**
85
-     *    wp
86
-     *
87
-     * @access    public
88
-     * @return    void
89
-     */
90
-    public function wp()
91
-    {
92
-    }
84
+	/**
85
+	 *    wp
86
+	 *
87
+	 * @access    public
88
+	 * @return    void
89
+	 */
90
+	public function wp()
91
+	{
92
+	}
93 93
 
94 94
 
95
-    /**
96
-     *    the_content
97
-     *
98
-     * @access    public
99
-     * @return    void
100
-     */
101
-    public function the_content($content)
102
-    {
103
-        $content .= $this->ouput;
104
-        return $content;
105
-    }
95
+	/**
96
+	 *    the_content
97
+	 *
98
+	 * @access    public
99
+	 * @return    void
100
+	 */
101
+	public function the_content($content)
102
+	{
103
+		$content .= $this->ouput;
104
+		return $content;
105
+	}
106 106
 }
Please login to merge, or discard this patch.
modules/events_archive_filters/EED_Events_Archive_Filters.module.php 3 patches
Doc Comments   +14 added lines, -13 removed lines patch added patch discarded remove patch
@@ -247,6 +247,7 @@  discard block
 block discarded – undo
247 247
      * @access    public
248 248
      * @param    mixed boolean|string    $join_terms pass TRUE or term string, doesn't really matter since this value
249 249
      *                                   doesn't really get used for anything yet
250
+     * @param string $join_terms
250 251
      * @return    string
251 252
      */
252 253
     public static function posts_join_sql_for_terms($join_terms = null)
@@ -422,7 +423,7 @@  discard block
 block discarded – undo
422 423
      *    or else some of the table references below will result in MySQL errors
423 424
      *
424 425
      * @access    public
425
-     * @param    boolean $orderby_params
426
+     * @param    string[] $orderby_params
426 427
      * @return    string
427 428
      */
428 429
     public static function posts_orderby_sql($orderby_params = array(), $sort = 'ASC')
@@ -535,7 +536,7 @@  discard block
 block discarded – undo
535 536
      *
536 537
      * @access    public
537 538
      * @param        string $content
538
-     * @return        void
539
+     * @return        string
539 540
      */
540 541
     public function event_details($content)
541 542
     {
@@ -552,7 +553,7 @@  discard block
 block discarded – undo
552 553
      *
553 554
      * @access    public
554 555
      * @param        string $content
555
-     * @return        void
556
+     * @return        string
556 557
      */
557 558
     public function event_tickets($content)
558 559
     {
@@ -569,7 +570,7 @@  discard block
 block discarded – undo
569 570
      *
570 571
      * @access    public
571 572
      * @param        string $content
572
-     * @return        void
573
+     * @return        string
573 574
      */
574 575
     public function event_datetimes($content)
575 576
     {
@@ -586,7 +587,7 @@  discard block
 block discarded – undo
586 587
      *
587 588
      * @access    public
588 589
      * @param        string $content
589
-     * @return        void
590
+     * @return        string
590 591
      */
591 592
     public function event_venues($content)
592 593
     {
@@ -635,7 +636,7 @@  discard block
 block discarded – undo
635 636
      *    excerpt_length
636 637
      *
637 638
      * @access    public
638
-     * @return    void
639
+     * @return    integer|null
639 640
      */
640 641
     public function excerpt_length($length)
641 642
     {
@@ -665,7 +666,7 @@  discard block
 block discarded – undo
665 666
      *    excerpt_more
666 667
      *
667 668
      * @access    public
668
-     * @return    void
669
+     * @return    string
669 670
      */
670 671
     public function excerpt_more($more)
671 672
     {
@@ -866,7 +867,7 @@  discard block
 block discarded – undo
866 867
      *    get_template_part
867 868
      *
868 869
      * @access    public
869
-     * @return    void
870
+     * @return    string|null
870 871
      */
871 872
     public static function get_template_part()
872 873
     {
@@ -910,7 +911,7 @@  discard block
 block discarded – undo
910 911
      *    event_list_css
911 912
      *
912 913
      * @access    public
913
-     * @return    void
914
+     * @return    string
914 915
      */
915 916
     public static function event_list_css($extra_class = '')
916 917
     {
@@ -946,7 +947,7 @@  discard block
 block discarded – undo
946 947
      *    display_description
947 948
      *
948 949
      * @access    public
949
-     * @return    void
950
+     * @return    boolean
950 951
      */
951 952
     public static function display_description($value)
952 953
     {
@@ -961,7 +962,7 @@  discard block
 block discarded – undo
961 962
      *    display_venue_details
962 963
      *
963 964
      * @access    public
964
-     * @return    void
965
+     * @return    boolean
965 966
      */
966 967
     public static function display_venue_details()
967 968
     {
@@ -977,7 +978,7 @@  discard block
 block discarded – undo
977 978
      *    display_address
978 979
      *
979 980
      * @access    public
980
-     * @return    void
981
+     * @return    boolean
981 982
      */
982 983
     public static function display_address()
983 984
     {
@@ -993,7 +994,7 @@  discard block
 block discarded – undo
993 994
      *    pagination
994 995
      *
995 996
      * @access    public
996
-     * @return    void
997
+     * @return    string
997 998
      */
998 999
     public static function pagination()
999 1000
     {
Please login to merge, or discard this patch.
Indentation   +1021 added lines, -1021 removed lines patch added patch discarded remove patch
@@ -12,1025 +12,1025 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    /**
16
-     * @return EED_Events_Archive_Filters
17
-     */
18
-    public static function instance()
19
-    {
20
-        return parent::get_instance(__CLASS__);
21
-    }
22
-
23
-
24
-    /**
25
-     *    Start Date
26
-     *
27
-     * @var    $_elf_month
28
-     * @access    protected
29
-     */
30
-    protected $_elf_month = null;
31
-
32
-
33
-    /**
34
-     *    Category
35
-     *
36
-     * @var    $_elf_category
37
-     * @access    protected
38
-     */
39
-    protected $_elf_category = null;
40
-
41
-
42
-    /**
43
-     *    whether to display expired events in the event list
44
-     *
45
-     * @var    $_show_expired
46
-     * @access    protected
47
-     */
48
-    protected $_show_expired = null;
49
-
50
-
51
-    /**
52
-     *    whether to display the event list as a grid or list
53
-     *
54
-     * @var    $_type
55
-     * @access    protected
56
-     */
57
-    protected static $_type = null;
58
-
59
-
60
-    /**
61
-     *    array of existing event list views
62
-     *
63
-     * @var    $_types
64
-     * @access    protected
65
-     */
66
-    protected static $_types = array('grid', 'text', 'dates');
67
-
68
-
69
-
70
-    /**
71
-     *    set_hooks - for hooking into EE Core, other modules, etc
72
-     *
73
-     * @access    public
74
-     * @return    void
75
-     */
76
-    public static function set_hooks()
77
-    {
78
-    }
79
-
80
-    /**
81
-     *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
82
-     *
83
-     * @access    public
84
-     * @return    void
85
-     */
86
-    public static function set_hooks_admin()
87
-    {
88
-    }
89
-
90
-
91
-    /**
92
-     *    set_definitions
93
-     *
94
-     * @access    public
95
-     * @return    void
96
-     */
97
-    public static function set_definitions()
98
-    {
99
-    }
100
-
101
-
102
-    /**
103
-     *    run - initial module setup
104
-     *
105
-     * @access    public
106
-     * @return    void
107
-     */
108
-    public function run($WP)
109
-    {
110
-    }
111
-
112
-
113
-    /**
114
-     *    event_list
115
-     *
116
-     * @access    public
117
-     * @return    void
118
-     */
119
-    public function event_list()
120
-    {
121
-        // load other required components
122
-        $this->_load_assests();
123
-    }
124
-
125
-
126
-    /**
127
-     *    _filter_query_parts
128
-     *
129
-     * @access    public
130
-     * @return    void
131
-     */
132
-    private function _filter_query_parts()
133
-    {
134
-        // build event list query
135
-        add_filter('posts_join', array($this, 'posts_join'), 1, 2);
136
-        add_filter('posts_where', array($this, 'posts_where'), 1, 2);
137
-        add_filter('posts_orderby', array($this, 'posts_orderby'), 1, 2);
138
-    }
139
-
140
-    /**
141
-     *    _type - the type of event list : grid, text, dates
142
-     *
143
-     * @access    public
144
-     * @return    string
145
-     */
146
-    public static function set_type()
147
-    {
148
-        do_action('AHEE__EED_Events_Archive_Filters__before_set_type');
149
-        EED_Events_Archive_Filters::$_types = apply_filters(
150
-            'EED_Events_Archive_Filters__set_type__types',
151
-            EED_Events_Archive_Filters::$_types
152
-        );
153
-        $view = isset(EE_Registry::instance()->CFG->EED_Events_Archive_Filters['default_type']) ? EE_Registry::instance(
154
-        )->CFG->EED_Events_Archive_Filters['default_type'] : 'grid';
155
-        $elf_type = EE_Registry::instance()->REQ->is_set('elf_type') ? sanitize_text_field(
156
-            EE_Registry::instance()->REQ->get('elf_type')
157
-        ) : '';
158
-        $view = ! empty($elf_type) ? $elf_type : $view;
159
-        $view = apply_filters('EED_Events_Archive_Filters__set_type__type', $view);
160
-        if (! empty($view) && in_array($view, EED_Events_Archive_Filters::$_types)) {
161
-            self::$_type = $view;
162
-        }
163
-    }
164
-
165
-    /**
166
-     *    _show_expired
167
-     *
168
-     * @access    private
169
-     * @param    boolean $req_only if TRUE, then ignore defaults and only return $_POST value
170
-     * @return    boolean
171
-     */
172
-    private static function _show_expired($req_only = false)
173
-    {
174
-        // get default value for "display_expired_events" as set in the EE General Settings > Templates > Event Listings
175
-        $show_expired = ! $req_only && isset(
176
-            EE_Registry::instance()->CFG->EED_Events_Archive_Filters['display_expired_events']
177
-        ) ? EE_Registry::instance()->CFG->EED_Events_Archive_Filters['display_expired_events'] : false;
178
-        // override default expired option if set via filter
179
-        $show_expired = EE_Registry::instance()->REQ->is_set('elf_expired_chk') ? absint(
180
-            EE_Registry::instance()->REQ->get('elf_expired_chk')
181
-        ) : $show_expired;
182
-        return $show_expired ? true : false;
183
-    }
184
-
185
-    /**
186
-     *    _event_category_slug
187
-     *
188
-     * @access    private
189
-     * @return    string
190
-     */
191
-    private static function _event_category_slug()
192
-    {
193
-        return EE_Registry::instance()->REQ->is_set('elf_category_dd') ? sanitize_text_field(
194
-            EE_Registry::instance()->REQ->get('elf_category_dd')
195
-        ) : '';
196
-    }
197
-
198
-    /**
199
-     *    _display_month - what month should the event list display events for?
200
-     *
201
-     * @access    private
202
-     * @return    string
203
-     */
204
-    private static function _display_month()
205
-    {
206
-        return EE_Registry::instance()->REQ->is_set('elf_month_dd') ? sanitize_text_field(
207
-            EE_Registry::instance()->REQ->get('elf_month_dd')
208
-        ) : '';
209
-    }
210
-
211
-
212
-    /**
213
-     *    get_post_data
214
-     *
215
-     * @access    public
216
-     * @return    void
217
-     */
218
-    public function get_post_data()
219
-    {
220
-        $this->_elf_month = EED_Events_Archive_Filters::_display_month();
221
-        $this->_elf_category = EED_Events_Archive_Filters::_event_category_slug();
222
-        $this->_show_expired = EED_Events_Archive_Filters::_show_expired(true);
223
-    }
224
-
225
-
226
-    /**
227
-     *    posts_join
228
-     *
229
-     * @access    public
230
-     * @return    void
231
-     */
232
-    public function posts_join($SQL, WP_Query $wp_query)
233
-    {
234
-        if (isset($wp_query->query) && isset($wp_query->query['post_type']) && $wp_query->query['post_type'] == 'espresso_events') {
235
-            // Category
236
-            $SQL .= EED_Events_Archive_Filters::posts_join_sql_for_terms(
237
-                EED_Events_Archive_Filters::_event_category_slug()
238
-            );
239
-        }
240
-        return $SQL;
241
-    }
242
-
243
-
244
-    /**
245
-     *    posts_join_sql_for_terms
246
-     *
247
-     * @access    public
248
-     * @param    mixed boolean|string    $join_terms pass TRUE or term string, doesn't really matter since this value
249
-     *                                   doesn't really get used for anything yet
250
-     * @return    string
251
-     */
252
-    public static function posts_join_sql_for_terms($join_terms = null)
253
-    {
254
-        $SQL = '';
255
-        if (! empty($join_terms)) {
256
-            global $wpdb;
257
-            $SQL .= " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)";
258
-            $SQL .= " LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";
259
-            $SQL .= " LEFT JOIN $wpdb->terms ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) ";
260
-        }
261
-        return $SQL;
262
-    }
263
-
264
-
265
-    /**
266
-     *    posts_join_for_orderby
267
-     *    usage:  $SQL .= EED_Events_Archive_Filters::posts_join_for_orderby( $orderby_params );
268
-     *
269
-     * @access    public
270
-     * @param    array $orderby_params
271
-     * @return    string
272
-     */
273
-    public static function posts_join_for_orderby($orderby_params = array())
274
-    {
275
-        global $wpdb;
276
-        $SQL = '';
277
-        $orderby_params = is_array($orderby_params) ? $orderby_params : array($orderby_params);
278
-        foreach ($orderby_params as $orderby) {
279
-            switch ($orderby) {
280
-                case 'ticket_start':
281
-                case 'ticket_end':
282
-                    $SQL .= ' LEFT JOIN ' . EEM_Datetime_Ticket::instance()->table() . ' ON ('
283
-                            . EEM_Datetime::instance()->table() . '.DTT_ID = '
284
-                            . EEM_Datetime_Ticket::instance()->table() . '.DTT_ID )';
285
-                    $SQL .= ' LEFT JOIN ' . EEM_Ticket::instance()->table() . ' ON ('
286
-                            . EEM_Datetime_Ticket::instance()->table() . '.TKT_ID = '
287
-                            . EEM_Ticket::instance()->table() . '.TKT_ID )';
288
-                    break;
289
-
290
-                case 'venue_title':
291
-                case 'city':
292
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
293
-                            . EEM_Event_Venue::instance()->table() . '.EVT_ID )';
294
-                    $SQL .= ' LEFT JOIN ' . EEM_Venue::instance()->table() . ' ON ('
295
-                            . EEM_Event_Venue::instance()->table() . '.VNU_ID = '
296
-                            . EEM_Venue::instance()->table() . '.VNU_ID )';
297
-                    break;
298
-
299
-                case 'state':
300
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
301
-                            . EEM_Event_Venue::instance()->table() . '.EVT_ID )';
302
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->second_table() . ' ON ('
303
-                            . EEM_Event_Venue::instance()->table() . '.VNU_ID = '
304
-                            . EEM_Event_Venue::instance()->second_table() . '.VNU_ID )';
305
-                    break;
306
-            }
307
-        }
308
-        return $SQL;
309
-    }
310
-
311
-
312
-    /**
313
-     *    posts_where
314
-     *
315
-     * @access    public
316
-     * @return    void
317
-     */
318
-    public function posts_where($SQL, WP_Query $wp_query)
319
-    {
320
-        if (isset($wp_query->query_vars) && isset($wp_query->query_vars['post_type']) && $wp_query->query_vars['post_type'] == 'espresso_events') {
321
-            // Show Expired ?
322
-            $SQL .= EED_Events_Archive_Filters::posts_where_sql_for_show_expired(
323
-                EED_Events_Archive_Filters::_show_expired()
324
-            );
325
-            // Category
326
-            // $elf_category = EED_Events_Archive_Filters::_event_category_slug();
327
-            $SQL .= EED_Events_Archive_Filters::posts_where_sql_for_event_category_slug(
328
-                EED_Events_Archive_Filters::_event_category_slug()
329
-            );
330
-            // Start Date
331
-            // $elf_month = EED_Events_Archive_Filters::_display_month();
332
-            $SQL .= EED_Events_Archive_Filters::posts_where_sql_for_event_list_month(
333
-                EED_Events_Archive_Filters::_display_month()
334
-            );
335
-        }
336
-        return $SQL;
337
-    }
338
-
339
-
340
-    /**
341
-     *    posts_where_sql_for_show_expired
342
-     *
343
-     * @access    public
344
-     * @param    boolean $show_expired if TRUE, then displayed past events
345
-     * @return    string
346
-     */
347
-    public static function posts_where_sql_for_show_expired($show_expired = false)
348
-    {
349
-        return ! $show_expired
350
-            ? ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end > "' . date('Y-m-d H:s:i') . '" '
351
-            : '';
352
-    }
353
-
354
-
355
-    /**
356
-     *    posts_where_sql_for_event_category_slug
357
-     *
358
-     * @access    public
359
-     * @param    boolean $event_category_slug
360
-     * @return    string
361
-     */
362
-    public static function posts_where_sql_for_event_category_slug($event_category_slug = null)
363
-    {
364
-        global $wpdb;
365
-        return ! empty($event_category_slug) ? ' AND ' . $wpdb->terms . '.slug = "' . $event_category_slug . '" ' : '';
366
-    }
367
-
368
-    /**
369
-     *    posts_where_sql_for_event_list_month
370
-     *
371
-     * @access    public
372
-     * @param    boolean $month
373
-     * @return    string
374
-     */
375
-    public static function posts_where_sql_for_event_list_month($month = null)
376
-    {
377
-        $SQL = '';
378
-        if (! empty($month)) {
379
-            // event start date is LESS than the end of the month ( so nothing that doesn't start until next month )
380
-            $SQL = ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_start';
381
-            $SQL .= ' <= "' . date('Y-m-t 23:59:59', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '"';
382
-            // event end date is GREATER than the start of the month ( so nothing that ended before this month )
383
-            $SQL .= ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end';
384
-            $SQL .= ' >= "' . date('Y-m-d 0:0:00', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '" ';
385
-        }
386
-        return $SQL;
387
-    }
388
-
389
-
390
-    /**
391
-     *    posts_orderby
392
-     *
393
-     * @access    public
394
-     * @return    void
395
-     */
396
-    public function posts_orderby($SQL, WP_Query $wp_query)
397
-    {
398
-        if (isset($wp_query->query) && isset($wp_query->query['post_type']) && $wp_query->query['post_type'] == 'espresso_events') {
399
-            $SQL = EED_Events_Archive_Filters::posts_orderby_sql(array('start_date'));
400
-        }
401
-        return $SQL;
402
-    }
403
-
404
-
405
-    /**
406
-     *    posts_orderby_sql
407
-     *
408
-     *    possible parameters:
409
-     *    ID
410
-     *    start_date
411
-     *    end_date
412
-     *    event_name
413
-     *    category_slug
414
-     *    ticket_start
415
-     *    ticket_end
416
-     *    venue_title
417
-     *    city
418
-     *    state
419
-     *
420
-     *    **IMPORTANT**
421
-     *    make sure to also send the $orderby_params array to the posts_join_for_orderby() method
422
-     *    or else some of the table references below will result in MySQL errors
423
-     *
424
-     * @access    public
425
-     * @param    boolean $orderby_params
426
-     * @return    string
427
-     */
428
-    public static function posts_orderby_sql($orderby_params = array(), $sort = 'ASC')
429
-    {
430
-        global $wpdb;
431
-        $SQL = '';
432
-        $cntr = 1;
433
-        $orderby_params = is_array($orderby_params) ? $orderby_params : array($orderby_params);
434
-        foreach ($orderby_params as $orderby) {
435
-            $glue = $cntr == 1 || $cntr == count($orderby_params) ? ' ' : ', ';
436
-            switch ($orderby) {
437
-                case 'id':
438
-                case 'ID':
439
-                    $SQL .= $glue . $wpdb->posts . '.ID ' . $sort;
440
-                    break;
441
-
442
-                case 'start_date':
443
-                    $SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_start ' . $sort;
444
-                    break;
445
-
446
-                case 'end_date':
447
-                    $SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_end ' . $sort;
448
-                    break;
449
-
450
-                case 'event_name':
451
-                    $SQL .= $glue . $wpdb->posts . '.post_title ' . $sort;
452
-                    break;
453
-
454
-                case 'category_slug':
455
-                    $SQL .= $glue . $wpdb->terms . '.slug ' . $sort;
456
-                    break;
457
-
458
-                case 'ticket_start':
459
-                    $SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_start_date ' . $sort;
460
-                    break;
461
-
462
-                case 'ticket_end':
463
-                    $SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_end_date ' . $sort;
464
-                    break;
465
-
466
-                case 'venue_title':
467
-                    $SQL .= $glue . 'venue_title ' . $sort;
468
-                    break;
469
-
470
-                case 'city':
471
-                    $SQL .= $glue . EEM_Venue::instance()->second_table() . '.VNU_city ' . $sort;
472
-                    break;
473
-
474
-                case 'state':
475
-                    $SQL .= $glue . EEM_State::instance()->table() . '.STA_name ' . $sort;
476
-                    break;
477
-            }
478
-            $cntr++;
479
-        }
480
-        // echo '<h4>$SQL : ' . $SQL . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
481
-        return $SQL;
482
-    }
483
-
484
-
485
-    /**
486
-     *    template_redirect
487
-     *
488
-     * @access    public
489
-     * @return    void
490
-     */
491
-    public function template_redirect()
492
-    {
493
-        // add event list filters
494
-        add_action('loop_start', array($this, 'event_list_template_filters'));
495
-        // and pagination
496
-        add_action('loop_start', array($this, 'event_list_pagination'));
497
-        add_action('loop_end', array($this, 'event_list_pagination'));
498
-        // if NOT a custom template
499
-        if (EE_Registry::instance()
500
-                       ->load_core('Front_Controller', array(), false, true)
501
-                       ->get_selected_template() != 'archive-espresso_events.php'
502
-        ) {
503
-            // don't know if theme uses the_excerpt
504
-            add_filter('the_excerpt', array($this, 'event_details'), 100);
505
-            add_filter('the_excerpt', array($this, 'event_tickets'), 110);
506
-            add_filter('the_excerpt', array($this, 'event_datetimes'), 120);
507
-            add_filter('the_excerpt', array($this, 'event_venues'), 130);
508
-            // or the_content
509
-            add_filter('the_content', array($this, 'event_details'), 100);
510
-            add_filter('the_content', array($this, 'event_tickets'), 110);
511
-            add_filter('the_content', array($this, 'event_datetimes'), 120);
512
-            add_filter('the_content', array($this, 'event_venues'), 130);
513
-        } else {
514
-            remove_all_filters('excerpt_length');
515
-            add_filter('excerpt_length', array($this, 'excerpt_length'), 10);
516
-            add_filter('excerpt_more', array($this, 'excerpt_more'), 10);
517
-        }
518
-    }
519
-
520
-
521
-    /**
522
-     *    event_list_pagination
523
-     *
524
-     * @access    public
525
-     * @return        void
526
-     */
527
-    public function event_list_pagination()
528
-    {
529
-        echo '<div class="ee-pagination-dv ee-clear-float">' . espresso_event_list_pagination() . '</div>';
530
-    }
531
-
532
-
533
-    /**
534
-     *    event_details
535
-     *
536
-     * @access    public
537
-     * @param        string $content
538
-     * @return        void
539
-     */
540
-    public function event_details($content)
541
-    {
542
-        return EEH_Template::display_template(
543
-            EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-details.php',
544
-            array('the_content' => $content),
545
-            true
546
-        );
547
-    }
548
-
549
-
550
-    /**
551
-     *    event_tickets
552
-     *
553
-     * @access    public
554
-     * @param        string $content
555
-     * @return        void
556
-     */
557
-    public function event_tickets($content)
558
-    {
559
-        return $content
560
-               . EEH_Template::display_template(
561
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-tickets.php',
562
-                   array(),
563
-                   true
564
-               );
565
-    }
566
-
567
-    /**
568
-     *    event_datetimes
569
-     *
570
-     * @access    public
571
-     * @param        string $content
572
-     * @return        void
573
-     */
574
-    public function event_datetimes($content)
575
-    {
576
-        return $content
577
-               . EEH_Template::display_template(
578
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-datetimes.php',
579
-                   array(),
580
-                   true
581
-               );
582
-    }
583
-
584
-    /**
585
-     *    event_venues
586
-     *
587
-     * @access    public
588
-     * @param        string $content
589
-     * @return        void
590
-     */
591
-    public function event_venues($content)
592
-    {
593
-        return $content
594
-               . EEH_Template::display_template(
595
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-venues.php',
596
-                   array(),
597
-                   true
598
-               );
599
-    }
600
-
601
-
602
-    /**
603
-     *    _initial_setup
604
-     *
605
-     * @access    public
606
-     * @return    void
607
-     */
608
-    private function _load_assests()
609
-    {
610
-        do_action('AHEE__EED_Events_Archive_Filters__before_load_assests');
611
-        wp_enqueue_style('espresso_default');
612
-        wp_enqueue_style('espresso_custom_css');
613
-        add_filter('FHEE_load_EE_Session', '__return_true');
614
-        add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10);
615
-        if (EE_Registry::instance()->CFG->map_settings->use_google_maps) {
616
-            add_action('wp_enqueue_scripts', array('EEH_Maps', 'espresso_google_map_js'), 11);
617
-        }
618
-        // add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), 999 );
619
-    }
620
-
621
-
622
-    /**
623
-     *    _get_template
624
-     *
625
-     * @access    private
626
-     * @return    string
627
-     */
628
-    private function _get_template($which = 'part')
629
-    {
630
-        return EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
631
-    }
632
-
633
-
634
-    /**
635
-     *    excerpt_length
636
-     *
637
-     * @access    public
638
-     * @return    void
639
-     */
640
-    public function excerpt_length($length)
641
-    {
642
-
643
-        if (self::$_type == 'grid') {
644
-            return 36;
645
-        }
646
-
647
-        switch (EE_Registry::instance()->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size) {
648
-            case 'tiny':
649
-                return 12;
650
-                break;
651
-            case 'small':
652
-                return 24;
653
-                break;
654
-            case 'large':
655
-                return 48;
656
-                break;
657
-            case 'medium':
658
-            default:
659
-                return 36;
660
-        }
661
-    }
662
-
663
-
664
-    /**
665
-     *    excerpt_more
666
-     *
667
-     * @access    public
668
-     * @return    void
669
-     */
670
-    public function excerpt_more($more)
671
-    {
672
-        return '&hellip;';
673
-    }
674
-
675
-
676
-
677
-
678
-    /**
679
-     *    wp_enqueue_scripts
680
-     *
681
-     * @access    public
682
-     * @return    void
683
-     */
684
-    public function wp_enqueue_scripts()
685
-    {
686
-        // get some style
687
-        if (apply_filters('FHEE_enable_default_espresso_css', false)) {
688
-            // first check uploads folder
689
-            if (is_readable(
690
-                get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.css'
691
-            )) {
692
-                wp_register_style(
693
-                    'archive-espresso_events',
694
-                    get_stylesheet_directory_uri() . EE_Config::get_current_theme(
695
-                    ) . '/archive-espresso_events.css',
696
-                    array('dashicons', 'espresso_default')
697
-                );
698
-            } else {
699
-                wp_register_style(
700
-                    'archive-espresso_events',
701
-                    EE_TEMPLATES_URL . EE_Config::get_current_theme() . '/archive-espresso_events.css',
702
-                    array('dashicons', 'espresso_default')
703
-                );
704
-            }
705
-            if (is_readable(
706
-                get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.js'
707
-            )) {
708
-                wp_register_script(
709
-                    'archive-espresso_events',
710
-                    get_stylesheet_directory_uri() . EE_Config::get_current_theme() . '/archive-espresso_events.js',
711
-                    array('jquery-masonry'),
712
-                    '1.0',
713
-                    true
714
-                );
715
-            } else {
716
-                wp_register_script(
717
-                    'archive-espresso_events',
718
-                    EVENTS_ARCHIVE_ASSETS_URL . 'archive-espresso_events.js',
719
-                    array('jquery-masonry'),
720
-                    '1.0',
721
-                    true
722
-                );
723
-            }
724
-            wp_enqueue_style('archive-espresso_events');
725
-            wp_enqueue_script('jquery-masonry');
726
-            wp_enqueue_script('archive-espresso_events');
727
-            add_action('wp_footer', array('EED_Events_Archive_Filters', 'localize_grid_event_lists'), 1);
728
-        }
729
-    }
730
-
731
-
732
-    /**
733
-     *    template_settings_form
734
-     *
735
-     * @access    public
736
-     * @static
737
-     * @return    void
738
-     */
739
-    public static function localize_grid_event_lists()
740
-    {
741
-        wp_localize_script(
742
-            'archive-espresso_events',
743
-            'espresso_grid_event_lists',
744
-            EED_Events_Archive_Filters::$espresso_grid_event_lists
745
-        );
746
-    }
747
-
748
-
749
-    /**
750
-     *    template_settings_form
751
-     *
752
-     * @access    public
753
-     * @static
754
-     * @return    void
755
-     */
756
-    public static function template_settings_form()
757
-    {
758
-        $EE = EE_Registry::instance();
759
-        $EE->CFG->template_settings->EED_Events_Archive_Filters = isset($EE->CFG->template_settings->EED_Events_Archive_Filters)
760
-            ? $EE->CFG->template_settings->EED_Events_Archive_Filters : new EE_Events_Archive_Config();
761
-        $EE->CFG->template_settings->EED_Events_Archive_Filters = apply_filters(
762
-            'FHEE__Event_List__template_settings_form__event_list_config',
763
-            $EE->CFG->template_settings->EED_Events_Archive_Filters
764
-        );
765
-        EEH_Template::display_template(
766
-            EVENTS_ARCHIVE_TEMPLATES_PATH . 'admin-event-list-settings.template.php',
767
-            $EE->CFG->template_settings->EED_Events_Archive_Filters
768
-        );
769
-    }
770
-
771
-
772
-    /**
773
-     *    set_default_settings
774
-     *
775
-     * @access    public
776
-     * @static
777
-     * @return    void
778
-     */
779
-    public static function set_default_settings($CFG)
780
-    {
781
-        // EEH_Debug_Tools::printr( $CFG, '$CFG  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
782
-        $CFG->display_description = isset($CFG->display_description) && ! empty($CFG->display_description)
783
-            ? $CFG->display_description : 1;
784
-        $CFG->display_address = isset($CFG->display_address) && ! empty($CFG->display_address) ? $CFG->display_address
785
-            : true;
786
-        $CFG->display_venue_details = isset($CFG->display_venue_details) && ! empty($CFG->display_venue_details)
787
-            ? $CFG->display_venue_details : true;
788
-        $CFG->display_expired_events = isset($CFG->display_expired_events) && ! empty($CFG->display_expired_events)
789
-            ? $CFG->display_expired_events : false;
790
-        $CFG->default_type = isset($CFG->default_type) && ! empty($CFG->default_type) ? $CFG->default_type : 'grid';
791
-        $CFG->event_list_grid_size = isset($CFG->event_list_grid_size) && ! empty($CFG->event_list_grid_size)
792
-            ? $CFG->event_list_grid_size : 'medium';
793
-        $CFG->templates['full'] = isset($CFG->templates['full']) && ! empty($CFG->templates['full'])
794
-            ? $CFG->templates['full']
795
-            : EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
796
-        $CFG->templates['part'] = isset($CFG->templates['part']) && ! empty($CFG->templates['part'])
797
-            ? $CFG->templates['part']
798
-            : EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-grid-view.php';
799
-        return $CFG;
800
-    }
801
-
802
-
803
-    /**
804
-     *    filter_config
805
-     *
806
-     * @access    public
807
-     * @return    void
808
-     */
809
-    public function filter_config($CFG)
810
-    {
811
-        return $CFG;
812
-    }
813
-
814
-
815
-    /**
816
-     *    filter_config
817
-     *
818
-     * @access    public
819
-     * @return    void
820
-     */
821
-    public static function update_template_settings($CFG, $REQ)
822
-    {
823
-        // $CFG->template_settings->EED_Events_Archive_Filters = new stdClass();
824
-        $CFG->EED_Events_Archive_Filters->display_description = isset($REQ['display_description_in_event_list'])
825
-            ? absint($REQ['display_description_in_event_list']) : 1;
826
-        $CFG->EED_Events_Archive_Filters->display_address = isset($REQ['display_address_in_event_list']) ? absint(
827
-            $REQ['display_address_in_event_list']
828
-        ) : true;
829
-        $CFG->EED_Events_Archive_Filters->display_venue_details = isset($REQ['display_venue_details_in_event_list'])
830
-            ? absint($REQ['display_venue_details_in_event_list']) : true;
831
-        $CFG->EED_Events_Archive_Filters->display_expired_events = isset($REQ['display_expired_events']) ? absint(
832
-            $REQ['display_expired_events']
833
-        ) : false;
834
-        $CFG->EED_Events_Archive_Filters->default_type = isset($REQ['default_type']) ? sanitize_text_field(
835
-            $REQ['default_type']
836
-        ) : 'grid';
837
-        $CFG->EED_Events_Archive_Filters->event_list_grid_size = isset($REQ['event_list_grid_size'])
838
-            ? sanitize_text_field($REQ['event_list_grid_size']) : 'medium';
839
-        $CFG->EED_Events_Archive_Filters->templates = array(
840
-            'full' => EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php',
841
-        );
842
-
843
-        switch ($CFG->EED_Events_Archive_Filters->default_type) {
844
-            case 'dates':
845
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
846
-                                                                      . '/archive-espresso_events-dates-view.php';
847
-                break;
848
-            case 'text':
849
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
850
-                                                                      . '/archive-espresso_events-text-view.php';
851
-                break;
852
-            default:
853
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
854
-                                                                      . '/archive-espresso_events-grid-view.php';
855
-        }
856
-
857
-        $CFG->EED_Events_Archive_Filters = isset($REQ['reset_event_list_settings'])
858
-                                           && absint($REQ['reset_event_list_settings']) == 1
859
-            ? new EE_Events_Archive_Config()
860
-            : $CFG->EED_Events_Archive_Filters;
861
-        return $CFG;
862
-    }
863
-
864
-
865
-    /**
866
-     *    get_template_part
867
-     *
868
-     * @access    public
869
-     * @return    void
870
-     */
871
-    public static function get_template_part()
872
-    {
873
-        switch (self::$_type) {
874
-            case 'dates':
875
-                return 'archive-espresso_events-dates-view.php';
876
-                break;
877
-            case 'text':
878
-                return 'archive-espresso_events-text-view.php';
879
-                break;
880
-            default:
881
-                return 'archive-espresso_events-grid-view.php';
882
-        }
883
-    }
884
-
885
-
886
-    /**
887
-     *    event_list_template_filters
888
-     *
889
-     * @access    public
890
-     * @return    void
891
-     */
892
-    public function event_list_template_filters()
893
-    {
894
-        $args = array(
895
-            'form_url'         => get_post_type_archive_link('espresso_events'),
896
-            // add_query_arg( array( 'post_type' => 'espresso_events' ), home_url() ),
897
-            'elf_month'        => EED_Events_Archive_Filters::_display_month(),
898
-            'elf_category'     => EED_Events_Archive_Filters::_event_category_slug(),
899
-            'elf_show_expired' => EED_Events_Archive_Filters::_show_expired(),
900
-            'elf_type'         => self::$_type,
901
-        );
902
-        EEH_Template::display_template(
903
-            EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-filters.php',
904
-            $args
905
-        );
906
-    }
907
-
908
-
909
-    /**
910
-     *    event_list_css
911
-     *
912
-     * @access    public
913
-     * @return    void
914
-     */
915
-    public static function event_list_css($extra_class = '')
916
-    {
917
-        $EE = EE_Registry::instance();
918
-        $event_list_css = ! empty($extra_class) ? array($extra_class) : array();
919
-        $event_list_css[] = 'espresso-event-list-event';
920
-        if (self::$_type == 'grid') {
921
-            $event_list_grid_size = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size)
922
-                ? $EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size : 'medium';
923
-            $event_list_css[] = $event_list_grid_size . '-event-list-grid';
924
-        }
925
-        $event_list_css = apply_filters(
926
-            'EED_Events_Archive_Filters__event_list_css__event_list_css_array',
927
-            $event_list_css
928
-        );
929
-        return implode(' ', $event_list_css);
930
-    }
931
-
932
-
933
-    /**
934
-     *    event_categories
935
-     *
936
-     * @access    public
937
-     * @return    void
938
-     */
939
-    public static function event_categories()
940
-    {
941
-        return EE_Registry::instance()->load_model('Term')->get_all_ee_categories();
942
-    }
943
-
944
-
945
-    /**
946
-     *    display_description
947
-     *
948
-     * @access    public
949
-     * @return    void
950
-     */
951
-    public static function display_description($value)
952
-    {
953
-        $EE = EE_Registry::instance();
954
-        $display_description = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_description)
955
-            ? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_description : 1;
956
-        return $display_description === $value ? true : false;
957
-    }
958
-
959
-
960
-    /**
961
-     *    display_venue_details
962
-     *
963
-     * @access    public
964
-     * @return    void
965
-     */
966
-    public static function display_venue_details()
967
-    {
968
-        $EE = EE_Registry::instance();
969
-        $display_venue_details = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_venue_details)
970
-            ? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_venue_details : true;
971
-        $venue_name = EEH_Venue_View::venue_name();
972
-        return $display_venue_details && ! empty($venue_name) ? true : false;
973
-    }
974
-
975
-
976
-    /**
977
-     *    display_address
978
-     *
979
-     * @access    public
980
-     * @return    void
981
-     */
982
-    public static function display_address()
983
-    {
984
-        $EE = EE_Registry::instance();
985
-        $display_address = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_address)
986
-            ? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_address : false;
987
-        $venue_name = EEH_Venue_View::venue_name();
988
-        return $display_address && ! empty($venue_name) ? true : false;
989
-    }
990
-
991
-
992
-    /**
993
-     *    pagination
994
-     *
995
-     * @access    public
996
-     * @return    void
997
-     */
998
-    public static function pagination()
999
-    {
1000
-        global $wp_query;
1001
-        $big = 999999999; // need an unlikely integer
1002
-        $pagination = paginate_links(
1003
-            array(
1004
-                'base'         => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
1005
-                'format'       => '?paged=%#%',
1006
-                'current'      => max(1, get_query_var('paged')),
1007
-                'total'        => $wp_query->max_num_pages,
1008
-                'show_all'     => true,
1009
-                'end_size'     => 10,
1010
-                'mid_size'     => 6,
1011
-                'prev_next'    => true,
1012
-                'prev_text'    => __('&lsaquo; PREV', 'event_espresso'),
1013
-                'next_text'    => __('NEXT &rsaquo;', 'event_espresso'),
1014
-                'type'         => 'plain',
1015
-                'add_args'     => false,
1016
-                'add_fragment' => '',
1017
-            )
1018
-        );
1019
-        return ! empty($pagination) ? '<div class="ee-pagination-dv clear">' . $pagination . '</div>' : '';
1020
-    }
1021
-
1022
-
1023
-    /**
1024
-     *    event_list_title
1025
-     *
1026
-     * @access    public
1027
-     * @return    void
1028
-     */
1029
-    public static function event_list_title()
1030
-    {
1031
-        return apply_filters(
1032
-            'EED_Events_Archive_Filters__event_list_title__event_list_title',
1033
-            __('Upcoming Events', 'event_espresso')
1034
-        );
1035
-    }
15
+	/**
16
+	 * @return EED_Events_Archive_Filters
17
+	 */
18
+	public static function instance()
19
+	{
20
+		return parent::get_instance(__CLASS__);
21
+	}
22
+
23
+
24
+	/**
25
+	 *    Start Date
26
+	 *
27
+	 * @var    $_elf_month
28
+	 * @access    protected
29
+	 */
30
+	protected $_elf_month = null;
31
+
32
+
33
+	/**
34
+	 *    Category
35
+	 *
36
+	 * @var    $_elf_category
37
+	 * @access    protected
38
+	 */
39
+	protected $_elf_category = null;
40
+
41
+
42
+	/**
43
+	 *    whether to display expired events in the event list
44
+	 *
45
+	 * @var    $_show_expired
46
+	 * @access    protected
47
+	 */
48
+	protected $_show_expired = null;
49
+
50
+
51
+	/**
52
+	 *    whether to display the event list as a grid or list
53
+	 *
54
+	 * @var    $_type
55
+	 * @access    protected
56
+	 */
57
+	protected static $_type = null;
58
+
59
+
60
+	/**
61
+	 *    array of existing event list views
62
+	 *
63
+	 * @var    $_types
64
+	 * @access    protected
65
+	 */
66
+	protected static $_types = array('grid', 'text', 'dates');
67
+
68
+
69
+
70
+	/**
71
+	 *    set_hooks - for hooking into EE Core, other modules, etc
72
+	 *
73
+	 * @access    public
74
+	 * @return    void
75
+	 */
76
+	public static function set_hooks()
77
+	{
78
+	}
79
+
80
+	/**
81
+	 *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
82
+	 *
83
+	 * @access    public
84
+	 * @return    void
85
+	 */
86
+	public static function set_hooks_admin()
87
+	{
88
+	}
89
+
90
+
91
+	/**
92
+	 *    set_definitions
93
+	 *
94
+	 * @access    public
95
+	 * @return    void
96
+	 */
97
+	public static function set_definitions()
98
+	{
99
+	}
100
+
101
+
102
+	/**
103
+	 *    run - initial module setup
104
+	 *
105
+	 * @access    public
106
+	 * @return    void
107
+	 */
108
+	public function run($WP)
109
+	{
110
+	}
111
+
112
+
113
+	/**
114
+	 *    event_list
115
+	 *
116
+	 * @access    public
117
+	 * @return    void
118
+	 */
119
+	public function event_list()
120
+	{
121
+		// load other required components
122
+		$this->_load_assests();
123
+	}
124
+
125
+
126
+	/**
127
+	 *    _filter_query_parts
128
+	 *
129
+	 * @access    public
130
+	 * @return    void
131
+	 */
132
+	private function _filter_query_parts()
133
+	{
134
+		// build event list query
135
+		add_filter('posts_join', array($this, 'posts_join'), 1, 2);
136
+		add_filter('posts_where', array($this, 'posts_where'), 1, 2);
137
+		add_filter('posts_orderby', array($this, 'posts_orderby'), 1, 2);
138
+	}
139
+
140
+	/**
141
+	 *    _type - the type of event list : grid, text, dates
142
+	 *
143
+	 * @access    public
144
+	 * @return    string
145
+	 */
146
+	public static function set_type()
147
+	{
148
+		do_action('AHEE__EED_Events_Archive_Filters__before_set_type');
149
+		EED_Events_Archive_Filters::$_types = apply_filters(
150
+			'EED_Events_Archive_Filters__set_type__types',
151
+			EED_Events_Archive_Filters::$_types
152
+		);
153
+		$view = isset(EE_Registry::instance()->CFG->EED_Events_Archive_Filters['default_type']) ? EE_Registry::instance(
154
+		)->CFG->EED_Events_Archive_Filters['default_type'] : 'grid';
155
+		$elf_type = EE_Registry::instance()->REQ->is_set('elf_type') ? sanitize_text_field(
156
+			EE_Registry::instance()->REQ->get('elf_type')
157
+		) : '';
158
+		$view = ! empty($elf_type) ? $elf_type : $view;
159
+		$view = apply_filters('EED_Events_Archive_Filters__set_type__type', $view);
160
+		if (! empty($view) && in_array($view, EED_Events_Archive_Filters::$_types)) {
161
+			self::$_type = $view;
162
+		}
163
+	}
164
+
165
+	/**
166
+	 *    _show_expired
167
+	 *
168
+	 * @access    private
169
+	 * @param    boolean $req_only if TRUE, then ignore defaults and only return $_POST value
170
+	 * @return    boolean
171
+	 */
172
+	private static function _show_expired($req_only = false)
173
+	{
174
+		// get default value for "display_expired_events" as set in the EE General Settings > Templates > Event Listings
175
+		$show_expired = ! $req_only && isset(
176
+			EE_Registry::instance()->CFG->EED_Events_Archive_Filters['display_expired_events']
177
+		) ? EE_Registry::instance()->CFG->EED_Events_Archive_Filters['display_expired_events'] : false;
178
+		// override default expired option if set via filter
179
+		$show_expired = EE_Registry::instance()->REQ->is_set('elf_expired_chk') ? absint(
180
+			EE_Registry::instance()->REQ->get('elf_expired_chk')
181
+		) : $show_expired;
182
+		return $show_expired ? true : false;
183
+	}
184
+
185
+	/**
186
+	 *    _event_category_slug
187
+	 *
188
+	 * @access    private
189
+	 * @return    string
190
+	 */
191
+	private static function _event_category_slug()
192
+	{
193
+		return EE_Registry::instance()->REQ->is_set('elf_category_dd') ? sanitize_text_field(
194
+			EE_Registry::instance()->REQ->get('elf_category_dd')
195
+		) : '';
196
+	}
197
+
198
+	/**
199
+	 *    _display_month - what month should the event list display events for?
200
+	 *
201
+	 * @access    private
202
+	 * @return    string
203
+	 */
204
+	private static function _display_month()
205
+	{
206
+		return EE_Registry::instance()->REQ->is_set('elf_month_dd') ? sanitize_text_field(
207
+			EE_Registry::instance()->REQ->get('elf_month_dd')
208
+		) : '';
209
+	}
210
+
211
+
212
+	/**
213
+	 *    get_post_data
214
+	 *
215
+	 * @access    public
216
+	 * @return    void
217
+	 */
218
+	public function get_post_data()
219
+	{
220
+		$this->_elf_month = EED_Events_Archive_Filters::_display_month();
221
+		$this->_elf_category = EED_Events_Archive_Filters::_event_category_slug();
222
+		$this->_show_expired = EED_Events_Archive_Filters::_show_expired(true);
223
+	}
224
+
225
+
226
+	/**
227
+	 *    posts_join
228
+	 *
229
+	 * @access    public
230
+	 * @return    void
231
+	 */
232
+	public function posts_join($SQL, WP_Query $wp_query)
233
+	{
234
+		if (isset($wp_query->query) && isset($wp_query->query['post_type']) && $wp_query->query['post_type'] == 'espresso_events') {
235
+			// Category
236
+			$SQL .= EED_Events_Archive_Filters::posts_join_sql_for_terms(
237
+				EED_Events_Archive_Filters::_event_category_slug()
238
+			);
239
+		}
240
+		return $SQL;
241
+	}
242
+
243
+
244
+	/**
245
+	 *    posts_join_sql_for_terms
246
+	 *
247
+	 * @access    public
248
+	 * @param    mixed boolean|string    $join_terms pass TRUE or term string, doesn't really matter since this value
249
+	 *                                   doesn't really get used for anything yet
250
+	 * @return    string
251
+	 */
252
+	public static function posts_join_sql_for_terms($join_terms = null)
253
+	{
254
+		$SQL = '';
255
+		if (! empty($join_terms)) {
256
+			global $wpdb;
257
+			$SQL .= " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)";
258
+			$SQL .= " LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";
259
+			$SQL .= " LEFT JOIN $wpdb->terms ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) ";
260
+		}
261
+		return $SQL;
262
+	}
263
+
264
+
265
+	/**
266
+	 *    posts_join_for_orderby
267
+	 *    usage:  $SQL .= EED_Events_Archive_Filters::posts_join_for_orderby( $orderby_params );
268
+	 *
269
+	 * @access    public
270
+	 * @param    array $orderby_params
271
+	 * @return    string
272
+	 */
273
+	public static function posts_join_for_orderby($orderby_params = array())
274
+	{
275
+		global $wpdb;
276
+		$SQL = '';
277
+		$orderby_params = is_array($orderby_params) ? $orderby_params : array($orderby_params);
278
+		foreach ($orderby_params as $orderby) {
279
+			switch ($orderby) {
280
+				case 'ticket_start':
281
+				case 'ticket_end':
282
+					$SQL .= ' LEFT JOIN ' . EEM_Datetime_Ticket::instance()->table() . ' ON ('
283
+							. EEM_Datetime::instance()->table() . '.DTT_ID = '
284
+							. EEM_Datetime_Ticket::instance()->table() . '.DTT_ID )';
285
+					$SQL .= ' LEFT JOIN ' . EEM_Ticket::instance()->table() . ' ON ('
286
+							. EEM_Datetime_Ticket::instance()->table() . '.TKT_ID = '
287
+							. EEM_Ticket::instance()->table() . '.TKT_ID )';
288
+					break;
289
+
290
+				case 'venue_title':
291
+				case 'city':
292
+					$SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
293
+							. EEM_Event_Venue::instance()->table() . '.EVT_ID )';
294
+					$SQL .= ' LEFT JOIN ' . EEM_Venue::instance()->table() . ' ON ('
295
+							. EEM_Event_Venue::instance()->table() . '.VNU_ID = '
296
+							. EEM_Venue::instance()->table() . '.VNU_ID )';
297
+					break;
298
+
299
+				case 'state':
300
+					$SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
301
+							. EEM_Event_Venue::instance()->table() . '.EVT_ID )';
302
+					$SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->second_table() . ' ON ('
303
+							. EEM_Event_Venue::instance()->table() . '.VNU_ID = '
304
+							. EEM_Event_Venue::instance()->second_table() . '.VNU_ID )';
305
+					break;
306
+			}
307
+		}
308
+		return $SQL;
309
+	}
310
+
311
+
312
+	/**
313
+	 *    posts_where
314
+	 *
315
+	 * @access    public
316
+	 * @return    void
317
+	 */
318
+	public function posts_where($SQL, WP_Query $wp_query)
319
+	{
320
+		if (isset($wp_query->query_vars) && isset($wp_query->query_vars['post_type']) && $wp_query->query_vars['post_type'] == 'espresso_events') {
321
+			// Show Expired ?
322
+			$SQL .= EED_Events_Archive_Filters::posts_where_sql_for_show_expired(
323
+				EED_Events_Archive_Filters::_show_expired()
324
+			);
325
+			// Category
326
+			// $elf_category = EED_Events_Archive_Filters::_event_category_slug();
327
+			$SQL .= EED_Events_Archive_Filters::posts_where_sql_for_event_category_slug(
328
+				EED_Events_Archive_Filters::_event_category_slug()
329
+			);
330
+			// Start Date
331
+			// $elf_month = EED_Events_Archive_Filters::_display_month();
332
+			$SQL .= EED_Events_Archive_Filters::posts_where_sql_for_event_list_month(
333
+				EED_Events_Archive_Filters::_display_month()
334
+			);
335
+		}
336
+		return $SQL;
337
+	}
338
+
339
+
340
+	/**
341
+	 *    posts_where_sql_for_show_expired
342
+	 *
343
+	 * @access    public
344
+	 * @param    boolean $show_expired if TRUE, then displayed past events
345
+	 * @return    string
346
+	 */
347
+	public static function posts_where_sql_for_show_expired($show_expired = false)
348
+	{
349
+		return ! $show_expired
350
+			? ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end > "' . date('Y-m-d H:s:i') . '" '
351
+			: '';
352
+	}
353
+
354
+
355
+	/**
356
+	 *    posts_where_sql_for_event_category_slug
357
+	 *
358
+	 * @access    public
359
+	 * @param    boolean $event_category_slug
360
+	 * @return    string
361
+	 */
362
+	public static function posts_where_sql_for_event_category_slug($event_category_slug = null)
363
+	{
364
+		global $wpdb;
365
+		return ! empty($event_category_slug) ? ' AND ' . $wpdb->terms . '.slug = "' . $event_category_slug . '" ' : '';
366
+	}
367
+
368
+	/**
369
+	 *    posts_where_sql_for_event_list_month
370
+	 *
371
+	 * @access    public
372
+	 * @param    boolean $month
373
+	 * @return    string
374
+	 */
375
+	public static function posts_where_sql_for_event_list_month($month = null)
376
+	{
377
+		$SQL = '';
378
+		if (! empty($month)) {
379
+			// event start date is LESS than the end of the month ( so nothing that doesn't start until next month )
380
+			$SQL = ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_start';
381
+			$SQL .= ' <= "' . date('Y-m-t 23:59:59', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '"';
382
+			// event end date is GREATER than the start of the month ( so nothing that ended before this month )
383
+			$SQL .= ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end';
384
+			$SQL .= ' >= "' . date('Y-m-d 0:0:00', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '" ';
385
+		}
386
+		return $SQL;
387
+	}
388
+
389
+
390
+	/**
391
+	 *    posts_orderby
392
+	 *
393
+	 * @access    public
394
+	 * @return    void
395
+	 */
396
+	public function posts_orderby($SQL, WP_Query $wp_query)
397
+	{
398
+		if (isset($wp_query->query) && isset($wp_query->query['post_type']) && $wp_query->query['post_type'] == 'espresso_events') {
399
+			$SQL = EED_Events_Archive_Filters::posts_orderby_sql(array('start_date'));
400
+		}
401
+		return $SQL;
402
+	}
403
+
404
+
405
+	/**
406
+	 *    posts_orderby_sql
407
+	 *
408
+	 *    possible parameters:
409
+	 *    ID
410
+	 *    start_date
411
+	 *    end_date
412
+	 *    event_name
413
+	 *    category_slug
414
+	 *    ticket_start
415
+	 *    ticket_end
416
+	 *    venue_title
417
+	 *    city
418
+	 *    state
419
+	 *
420
+	 *    **IMPORTANT**
421
+	 *    make sure to also send the $orderby_params array to the posts_join_for_orderby() method
422
+	 *    or else some of the table references below will result in MySQL errors
423
+	 *
424
+	 * @access    public
425
+	 * @param    boolean $orderby_params
426
+	 * @return    string
427
+	 */
428
+	public static function posts_orderby_sql($orderby_params = array(), $sort = 'ASC')
429
+	{
430
+		global $wpdb;
431
+		$SQL = '';
432
+		$cntr = 1;
433
+		$orderby_params = is_array($orderby_params) ? $orderby_params : array($orderby_params);
434
+		foreach ($orderby_params as $orderby) {
435
+			$glue = $cntr == 1 || $cntr == count($orderby_params) ? ' ' : ', ';
436
+			switch ($orderby) {
437
+				case 'id':
438
+				case 'ID':
439
+					$SQL .= $glue . $wpdb->posts . '.ID ' . $sort;
440
+					break;
441
+
442
+				case 'start_date':
443
+					$SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_start ' . $sort;
444
+					break;
445
+
446
+				case 'end_date':
447
+					$SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_end ' . $sort;
448
+					break;
449
+
450
+				case 'event_name':
451
+					$SQL .= $glue . $wpdb->posts . '.post_title ' . $sort;
452
+					break;
453
+
454
+				case 'category_slug':
455
+					$SQL .= $glue . $wpdb->terms . '.slug ' . $sort;
456
+					break;
457
+
458
+				case 'ticket_start':
459
+					$SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_start_date ' . $sort;
460
+					break;
461
+
462
+				case 'ticket_end':
463
+					$SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_end_date ' . $sort;
464
+					break;
465
+
466
+				case 'venue_title':
467
+					$SQL .= $glue . 'venue_title ' . $sort;
468
+					break;
469
+
470
+				case 'city':
471
+					$SQL .= $glue . EEM_Venue::instance()->second_table() . '.VNU_city ' . $sort;
472
+					break;
473
+
474
+				case 'state':
475
+					$SQL .= $glue . EEM_State::instance()->table() . '.STA_name ' . $sort;
476
+					break;
477
+			}
478
+			$cntr++;
479
+		}
480
+		// echo '<h4>$SQL : ' . $SQL . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
481
+		return $SQL;
482
+	}
483
+
484
+
485
+	/**
486
+	 *    template_redirect
487
+	 *
488
+	 * @access    public
489
+	 * @return    void
490
+	 */
491
+	public function template_redirect()
492
+	{
493
+		// add event list filters
494
+		add_action('loop_start', array($this, 'event_list_template_filters'));
495
+		// and pagination
496
+		add_action('loop_start', array($this, 'event_list_pagination'));
497
+		add_action('loop_end', array($this, 'event_list_pagination'));
498
+		// if NOT a custom template
499
+		if (EE_Registry::instance()
500
+					   ->load_core('Front_Controller', array(), false, true)
501
+					   ->get_selected_template() != 'archive-espresso_events.php'
502
+		) {
503
+			// don't know if theme uses the_excerpt
504
+			add_filter('the_excerpt', array($this, 'event_details'), 100);
505
+			add_filter('the_excerpt', array($this, 'event_tickets'), 110);
506
+			add_filter('the_excerpt', array($this, 'event_datetimes'), 120);
507
+			add_filter('the_excerpt', array($this, 'event_venues'), 130);
508
+			// or the_content
509
+			add_filter('the_content', array($this, 'event_details'), 100);
510
+			add_filter('the_content', array($this, 'event_tickets'), 110);
511
+			add_filter('the_content', array($this, 'event_datetimes'), 120);
512
+			add_filter('the_content', array($this, 'event_venues'), 130);
513
+		} else {
514
+			remove_all_filters('excerpt_length');
515
+			add_filter('excerpt_length', array($this, 'excerpt_length'), 10);
516
+			add_filter('excerpt_more', array($this, 'excerpt_more'), 10);
517
+		}
518
+	}
519
+
520
+
521
+	/**
522
+	 *    event_list_pagination
523
+	 *
524
+	 * @access    public
525
+	 * @return        void
526
+	 */
527
+	public function event_list_pagination()
528
+	{
529
+		echo '<div class="ee-pagination-dv ee-clear-float">' . espresso_event_list_pagination() . '</div>';
530
+	}
531
+
532
+
533
+	/**
534
+	 *    event_details
535
+	 *
536
+	 * @access    public
537
+	 * @param        string $content
538
+	 * @return        void
539
+	 */
540
+	public function event_details($content)
541
+	{
542
+		return EEH_Template::display_template(
543
+			EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-details.php',
544
+			array('the_content' => $content),
545
+			true
546
+		);
547
+	}
548
+
549
+
550
+	/**
551
+	 *    event_tickets
552
+	 *
553
+	 * @access    public
554
+	 * @param        string $content
555
+	 * @return        void
556
+	 */
557
+	public function event_tickets($content)
558
+	{
559
+		return $content
560
+			   . EEH_Template::display_template(
561
+				   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-tickets.php',
562
+				   array(),
563
+				   true
564
+			   );
565
+	}
566
+
567
+	/**
568
+	 *    event_datetimes
569
+	 *
570
+	 * @access    public
571
+	 * @param        string $content
572
+	 * @return        void
573
+	 */
574
+	public function event_datetimes($content)
575
+	{
576
+		return $content
577
+			   . EEH_Template::display_template(
578
+				   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-datetimes.php',
579
+				   array(),
580
+				   true
581
+			   );
582
+	}
583
+
584
+	/**
585
+	 *    event_venues
586
+	 *
587
+	 * @access    public
588
+	 * @param        string $content
589
+	 * @return        void
590
+	 */
591
+	public function event_venues($content)
592
+	{
593
+		return $content
594
+			   . EEH_Template::display_template(
595
+				   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-venues.php',
596
+				   array(),
597
+				   true
598
+			   );
599
+	}
600
+
601
+
602
+	/**
603
+	 *    _initial_setup
604
+	 *
605
+	 * @access    public
606
+	 * @return    void
607
+	 */
608
+	private function _load_assests()
609
+	{
610
+		do_action('AHEE__EED_Events_Archive_Filters__before_load_assests');
611
+		wp_enqueue_style('espresso_default');
612
+		wp_enqueue_style('espresso_custom_css');
613
+		add_filter('FHEE_load_EE_Session', '__return_true');
614
+		add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10);
615
+		if (EE_Registry::instance()->CFG->map_settings->use_google_maps) {
616
+			add_action('wp_enqueue_scripts', array('EEH_Maps', 'espresso_google_map_js'), 11);
617
+		}
618
+		// add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), 999 );
619
+	}
620
+
621
+
622
+	/**
623
+	 *    _get_template
624
+	 *
625
+	 * @access    private
626
+	 * @return    string
627
+	 */
628
+	private function _get_template($which = 'part')
629
+	{
630
+		return EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
631
+	}
632
+
633
+
634
+	/**
635
+	 *    excerpt_length
636
+	 *
637
+	 * @access    public
638
+	 * @return    void
639
+	 */
640
+	public function excerpt_length($length)
641
+	{
642
+
643
+		if (self::$_type == 'grid') {
644
+			return 36;
645
+		}
646
+
647
+		switch (EE_Registry::instance()->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size) {
648
+			case 'tiny':
649
+				return 12;
650
+				break;
651
+			case 'small':
652
+				return 24;
653
+				break;
654
+			case 'large':
655
+				return 48;
656
+				break;
657
+			case 'medium':
658
+			default:
659
+				return 36;
660
+		}
661
+	}
662
+
663
+
664
+	/**
665
+	 *    excerpt_more
666
+	 *
667
+	 * @access    public
668
+	 * @return    void
669
+	 */
670
+	public function excerpt_more($more)
671
+	{
672
+		return '&hellip;';
673
+	}
674
+
675
+
676
+
677
+
678
+	/**
679
+	 *    wp_enqueue_scripts
680
+	 *
681
+	 * @access    public
682
+	 * @return    void
683
+	 */
684
+	public function wp_enqueue_scripts()
685
+	{
686
+		// get some style
687
+		if (apply_filters('FHEE_enable_default_espresso_css', false)) {
688
+			// first check uploads folder
689
+			if (is_readable(
690
+				get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.css'
691
+			)) {
692
+				wp_register_style(
693
+					'archive-espresso_events',
694
+					get_stylesheet_directory_uri() . EE_Config::get_current_theme(
695
+					) . '/archive-espresso_events.css',
696
+					array('dashicons', 'espresso_default')
697
+				);
698
+			} else {
699
+				wp_register_style(
700
+					'archive-espresso_events',
701
+					EE_TEMPLATES_URL . EE_Config::get_current_theme() . '/archive-espresso_events.css',
702
+					array('dashicons', 'espresso_default')
703
+				);
704
+			}
705
+			if (is_readable(
706
+				get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.js'
707
+			)) {
708
+				wp_register_script(
709
+					'archive-espresso_events',
710
+					get_stylesheet_directory_uri() . EE_Config::get_current_theme() . '/archive-espresso_events.js',
711
+					array('jquery-masonry'),
712
+					'1.0',
713
+					true
714
+				);
715
+			} else {
716
+				wp_register_script(
717
+					'archive-espresso_events',
718
+					EVENTS_ARCHIVE_ASSETS_URL . 'archive-espresso_events.js',
719
+					array('jquery-masonry'),
720
+					'1.0',
721
+					true
722
+				);
723
+			}
724
+			wp_enqueue_style('archive-espresso_events');
725
+			wp_enqueue_script('jquery-masonry');
726
+			wp_enqueue_script('archive-espresso_events');
727
+			add_action('wp_footer', array('EED_Events_Archive_Filters', 'localize_grid_event_lists'), 1);
728
+		}
729
+	}
730
+
731
+
732
+	/**
733
+	 *    template_settings_form
734
+	 *
735
+	 * @access    public
736
+	 * @static
737
+	 * @return    void
738
+	 */
739
+	public static function localize_grid_event_lists()
740
+	{
741
+		wp_localize_script(
742
+			'archive-espresso_events',
743
+			'espresso_grid_event_lists',
744
+			EED_Events_Archive_Filters::$espresso_grid_event_lists
745
+		);
746
+	}
747
+
748
+
749
+	/**
750
+	 *    template_settings_form
751
+	 *
752
+	 * @access    public
753
+	 * @static
754
+	 * @return    void
755
+	 */
756
+	public static function template_settings_form()
757
+	{
758
+		$EE = EE_Registry::instance();
759
+		$EE->CFG->template_settings->EED_Events_Archive_Filters = isset($EE->CFG->template_settings->EED_Events_Archive_Filters)
760
+			? $EE->CFG->template_settings->EED_Events_Archive_Filters : new EE_Events_Archive_Config();
761
+		$EE->CFG->template_settings->EED_Events_Archive_Filters = apply_filters(
762
+			'FHEE__Event_List__template_settings_form__event_list_config',
763
+			$EE->CFG->template_settings->EED_Events_Archive_Filters
764
+		);
765
+		EEH_Template::display_template(
766
+			EVENTS_ARCHIVE_TEMPLATES_PATH . 'admin-event-list-settings.template.php',
767
+			$EE->CFG->template_settings->EED_Events_Archive_Filters
768
+		);
769
+	}
770
+
771
+
772
+	/**
773
+	 *    set_default_settings
774
+	 *
775
+	 * @access    public
776
+	 * @static
777
+	 * @return    void
778
+	 */
779
+	public static function set_default_settings($CFG)
780
+	{
781
+		// EEH_Debug_Tools::printr( $CFG, '$CFG  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
782
+		$CFG->display_description = isset($CFG->display_description) && ! empty($CFG->display_description)
783
+			? $CFG->display_description : 1;
784
+		$CFG->display_address = isset($CFG->display_address) && ! empty($CFG->display_address) ? $CFG->display_address
785
+			: true;
786
+		$CFG->display_venue_details = isset($CFG->display_venue_details) && ! empty($CFG->display_venue_details)
787
+			? $CFG->display_venue_details : true;
788
+		$CFG->display_expired_events = isset($CFG->display_expired_events) && ! empty($CFG->display_expired_events)
789
+			? $CFG->display_expired_events : false;
790
+		$CFG->default_type = isset($CFG->default_type) && ! empty($CFG->default_type) ? $CFG->default_type : 'grid';
791
+		$CFG->event_list_grid_size = isset($CFG->event_list_grid_size) && ! empty($CFG->event_list_grid_size)
792
+			? $CFG->event_list_grid_size : 'medium';
793
+		$CFG->templates['full'] = isset($CFG->templates['full']) && ! empty($CFG->templates['full'])
794
+			? $CFG->templates['full']
795
+			: EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
796
+		$CFG->templates['part'] = isset($CFG->templates['part']) && ! empty($CFG->templates['part'])
797
+			? $CFG->templates['part']
798
+			: EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-grid-view.php';
799
+		return $CFG;
800
+	}
801
+
802
+
803
+	/**
804
+	 *    filter_config
805
+	 *
806
+	 * @access    public
807
+	 * @return    void
808
+	 */
809
+	public function filter_config($CFG)
810
+	{
811
+		return $CFG;
812
+	}
813
+
814
+
815
+	/**
816
+	 *    filter_config
817
+	 *
818
+	 * @access    public
819
+	 * @return    void
820
+	 */
821
+	public static function update_template_settings($CFG, $REQ)
822
+	{
823
+		// $CFG->template_settings->EED_Events_Archive_Filters = new stdClass();
824
+		$CFG->EED_Events_Archive_Filters->display_description = isset($REQ['display_description_in_event_list'])
825
+			? absint($REQ['display_description_in_event_list']) : 1;
826
+		$CFG->EED_Events_Archive_Filters->display_address = isset($REQ['display_address_in_event_list']) ? absint(
827
+			$REQ['display_address_in_event_list']
828
+		) : true;
829
+		$CFG->EED_Events_Archive_Filters->display_venue_details = isset($REQ['display_venue_details_in_event_list'])
830
+			? absint($REQ['display_venue_details_in_event_list']) : true;
831
+		$CFG->EED_Events_Archive_Filters->display_expired_events = isset($REQ['display_expired_events']) ? absint(
832
+			$REQ['display_expired_events']
833
+		) : false;
834
+		$CFG->EED_Events_Archive_Filters->default_type = isset($REQ['default_type']) ? sanitize_text_field(
835
+			$REQ['default_type']
836
+		) : 'grid';
837
+		$CFG->EED_Events_Archive_Filters->event_list_grid_size = isset($REQ['event_list_grid_size'])
838
+			? sanitize_text_field($REQ['event_list_grid_size']) : 'medium';
839
+		$CFG->EED_Events_Archive_Filters->templates = array(
840
+			'full' => EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php',
841
+		);
842
+
843
+		switch ($CFG->EED_Events_Archive_Filters->default_type) {
844
+			case 'dates':
845
+				$CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
846
+																	  . '/archive-espresso_events-dates-view.php';
847
+				break;
848
+			case 'text':
849
+				$CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
850
+																	  . '/archive-espresso_events-text-view.php';
851
+				break;
852
+			default:
853
+				$CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
854
+																	  . '/archive-espresso_events-grid-view.php';
855
+		}
856
+
857
+		$CFG->EED_Events_Archive_Filters = isset($REQ['reset_event_list_settings'])
858
+										   && absint($REQ['reset_event_list_settings']) == 1
859
+			? new EE_Events_Archive_Config()
860
+			: $CFG->EED_Events_Archive_Filters;
861
+		return $CFG;
862
+	}
863
+
864
+
865
+	/**
866
+	 *    get_template_part
867
+	 *
868
+	 * @access    public
869
+	 * @return    void
870
+	 */
871
+	public static function get_template_part()
872
+	{
873
+		switch (self::$_type) {
874
+			case 'dates':
875
+				return 'archive-espresso_events-dates-view.php';
876
+				break;
877
+			case 'text':
878
+				return 'archive-espresso_events-text-view.php';
879
+				break;
880
+			default:
881
+				return 'archive-espresso_events-grid-view.php';
882
+		}
883
+	}
884
+
885
+
886
+	/**
887
+	 *    event_list_template_filters
888
+	 *
889
+	 * @access    public
890
+	 * @return    void
891
+	 */
892
+	public function event_list_template_filters()
893
+	{
894
+		$args = array(
895
+			'form_url'         => get_post_type_archive_link('espresso_events'),
896
+			// add_query_arg( array( 'post_type' => 'espresso_events' ), home_url() ),
897
+			'elf_month'        => EED_Events_Archive_Filters::_display_month(),
898
+			'elf_category'     => EED_Events_Archive_Filters::_event_category_slug(),
899
+			'elf_show_expired' => EED_Events_Archive_Filters::_show_expired(),
900
+			'elf_type'         => self::$_type,
901
+		);
902
+		EEH_Template::display_template(
903
+			EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-filters.php',
904
+			$args
905
+		);
906
+	}
907
+
908
+
909
+	/**
910
+	 *    event_list_css
911
+	 *
912
+	 * @access    public
913
+	 * @return    void
914
+	 */
915
+	public static function event_list_css($extra_class = '')
916
+	{
917
+		$EE = EE_Registry::instance();
918
+		$event_list_css = ! empty($extra_class) ? array($extra_class) : array();
919
+		$event_list_css[] = 'espresso-event-list-event';
920
+		if (self::$_type == 'grid') {
921
+			$event_list_grid_size = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size)
922
+				? $EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size : 'medium';
923
+			$event_list_css[] = $event_list_grid_size . '-event-list-grid';
924
+		}
925
+		$event_list_css = apply_filters(
926
+			'EED_Events_Archive_Filters__event_list_css__event_list_css_array',
927
+			$event_list_css
928
+		);
929
+		return implode(' ', $event_list_css);
930
+	}
931
+
932
+
933
+	/**
934
+	 *    event_categories
935
+	 *
936
+	 * @access    public
937
+	 * @return    void
938
+	 */
939
+	public static function event_categories()
940
+	{
941
+		return EE_Registry::instance()->load_model('Term')->get_all_ee_categories();
942
+	}
943
+
944
+
945
+	/**
946
+	 *    display_description
947
+	 *
948
+	 * @access    public
949
+	 * @return    void
950
+	 */
951
+	public static function display_description($value)
952
+	{
953
+		$EE = EE_Registry::instance();
954
+		$display_description = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_description)
955
+			? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_description : 1;
956
+		return $display_description === $value ? true : false;
957
+	}
958
+
959
+
960
+	/**
961
+	 *    display_venue_details
962
+	 *
963
+	 * @access    public
964
+	 * @return    void
965
+	 */
966
+	public static function display_venue_details()
967
+	{
968
+		$EE = EE_Registry::instance();
969
+		$display_venue_details = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_venue_details)
970
+			? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_venue_details : true;
971
+		$venue_name = EEH_Venue_View::venue_name();
972
+		return $display_venue_details && ! empty($venue_name) ? true : false;
973
+	}
974
+
975
+
976
+	/**
977
+	 *    display_address
978
+	 *
979
+	 * @access    public
980
+	 * @return    void
981
+	 */
982
+	public static function display_address()
983
+	{
984
+		$EE = EE_Registry::instance();
985
+		$display_address = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->display_address)
986
+			? $EE->CFG->template_settings->EED_Events_Archive_Filters->display_address : false;
987
+		$venue_name = EEH_Venue_View::venue_name();
988
+		return $display_address && ! empty($venue_name) ? true : false;
989
+	}
990
+
991
+
992
+	/**
993
+	 *    pagination
994
+	 *
995
+	 * @access    public
996
+	 * @return    void
997
+	 */
998
+	public static function pagination()
999
+	{
1000
+		global $wp_query;
1001
+		$big = 999999999; // need an unlikely integer
1002
+		$pagination = paginate_links(
1003
+			array(
1004
+				'base'         => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
1005
+				'format'       => '?paged=%#%',
1006
+				'current'      => max(1, get_query_var('paged')),
1007
+				'total'        => $wp_query->max_num_pages,
1008
+				'show_all'     => true,
1009
+				'end_size'     => 10,
1010
+				'mid_size'     => 6,
1011
+				'prev_next'    => true,
1012
+				'prev_text'    => __('&lsaquo; PREV', 'event_espresso'),
1013
+				'next_text'    => __('NEXT &rsaquo;', 'event_espresso'),
1014
+				'type'         => 'plain',
1015
+				'add_args'     => false,
1016
+				'add_fragment' => '',
1017
+			)
1018
+		);
1019
+		return ! empty($pagination) ? '<div class="ee-pagination-dv clear">' . $pagination . '</div>' : '';
1020
+	}
1021
+
1022
+
1023
+	/**
1024
+	 *    event_list_title
1025
+	 *
1026
+	 * @access    public
1027
+	 * @return    void
1028
+	 */
1029
+	public static function event_list_title()
1030
+	{
1031
+		return apply_filters(
1032
+			'EED_Events_Archive_Filters__event_list_title__event_list_title',
1033
+			__('Upcoming Events', 'event_espresso')
1034
+		);
1035
+	}
1036 1036
 }
Please login to merge, or discard this patch.
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         ) : '';
158 158
         $view = ! empty($elf_type) ? $elf_type : $view;
159 159
         $view = apply_filters('EED_Events_Archive_Filters__set_type__type', $view);
160
-        if (! empty($view) && in_array($view, EED_Events_Archive_Filters::$_types)) {
160
+        if ( ! empty($view) && in_array($view, EED_Events_Archive_Filters::$_types)) {
161 161
             self::$_type = $view;
162 162
         }
163 163
     }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     public static function posts_join_sql_for_terms($join_terms = null)
253 253
     {
254 254
         $SQL = '';
255
-        if (! empty($join_terms)) {
255
+        if ( ! empty($join_terms)) {
256 256
             global $wpdb;
257 257
             $SQL .= " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)";
258 258
             $SQL .= " LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";
@@ -279,29 +279,29 @@  discard block
 block discarded – undo
279 279
             switch ($orderby) {
280 280
                 case 'ticket_start':
281 281
                 case 'ticket_end':
282
-                    $SQL .= ' LEFT JOIN ' . EEM_Datetime_Ticket::instance()->table() . ' ON ('
283
-                            . EEM_Datetime::instance()->table() . '.DTT_ID = '
284
-                            . EEM_Datetime_Ticket::instance()->table() . '.DTT_ID )';
285
-                    $SQL .= ' LEFT JOIN ' . EEM_Ticket::instance()->table() . ' ON ('
286
-                            . EEM_Datetime_Ticket::instance()->table() . '.TKT_ID = '
287
-                            . EEM_Ticket::instance()->table() . '.TKT_ID )';
282
+                    $SQL .= ' LEFT JOIN '.EEM_Datetime_Ticket::instance()->table().' ON ('
283
+                            . EEM_Datetime::instance()->table().'.DTT_ID = '
284
+                            . EEM_Datetime_Ticket::instance()->table().'.DTT_ID )';
285
+                    $SQL .= ' LEFT JOIN '.EEM_Ticket::instance()->table().' ON ('
286
+                            . EEM_Datetime_Ticket::instance()->table().'.TKT_ID = '
287
+                            . EEM_Ticket::instance()->table().'.TKT_ID )';
288 288
                     break;
289 289
 
290 290
                 case 'venue_title':
291 291
                 case 'city':
292
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
293
-                            . EEM_Event_Venue::instance()->table() . '.EVT_ID )';
294
-                    $SQL .= ' LEFT JOIN ' . EEM_Venue::instance()->table() . ' ON ('
295
-                            . EEM_Event_Venue::instance()->table() . '.VNU_ID = '
296
-                            . EEM_Venue::instance()->table() . '.VNU_ID )';
292
+                    $SQL .= ' LEFT JOIN '.EEM_Event_Venue::instance()->table().' ON ('.$wpdb->posts.'.ID = '
293
+                            . EEM_Event_Venue::instance()->table().'.EVT_ID )';
294
+                    $SQL .= ' LEFT JOIN '.EEM_Venue::instance()->table().' ON ('
295
+                            . EEM_Event_Venue::instance()->table().'.VNU_ID = '
296
+                            . EEM_Venue::instance()->table().'.VNU_ID )';
297 297
                     break;
298 298
 
299 299
                 case 'state':
300
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->table() . ' ON (' . $wpdb->posts . '.ID = '
301
-                            . EEM_Event_Venue::instance()->table() . '.EVT_ID )';
302
-                    $SQL .= ' LEFT JOIN ' . EEM_Event_Venue::instance()->second_table() . ' ON ('
303
-                            . EEM_Event_Venue::instance()->table() . '.VNU_ID = '
304
-                            . EEM_Event_Venue::instance()->second_table() . '.VNU_ID )';
300
+                    $SQL .= ' LEFT JOIN '.EEM_Event_Venue::instance()->table().' ON ('.$wpdb->posts.'.ID = '
301
+                            . EEM_Event_Venue::instance()->table().'.EVT_ID )';
302
+                    $SQL .= ' LEFT JOIN '.EEM_Event_Venue::instance()->second_table().' ON ('
303
+                            . EEM_Event_Venue::instance()->table().'.VNU_ID = '
304
+                            . EEM_Event_Venue::instance()->second_table().'.VNU_ID )';
305 305
                     break;
306 306
             }
307 307
         }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     public static function posts_where_sql_for_show_expired($show_expired = false)
348 348
     {
349 349
         return ! $show_expired
350
-            ? ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end > "' . date('Y-m-d H:s:i') . '" '
350
+            ? ' AND '.EEM_Datetime::instance()->table().'.DTT_EVT_end > "'.date('Y-m-d H:s:i').'" '
351 351
             : '';
352 352
     }
353 353
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
     public static function posts_where_sql_for_event_category_slug($event_category_slug = null)
363 363
     {
364 364
         global $wpdb;
365
-        return ! empty($event_category_slug) ? ' AND ' . $wpdb->terms . '.slug = "' . $event_category_slug . '" ' : '';
365
+        return ! empty($event_category_slug) ? ' AND '.$wpdb->terms.'.slug = "'.$event_category_slug.'" ' : '';
366 366
     }
367 367
 
368 368
     /**
@@ -375,13 +375,13 @@  discard block
 block discarded – undo
375 375
     public static function posts_where_sql_for_event_list_month($month = null)
376 376
     {
377 377
         $SQL = '';
378
-        if (! empty($month)) {
378
+        if ( ! empty($month)) {
379 379
             // event start date is LESS than the end of the month ( so nothing that doesn't start until next month )
380
-            $SQL = ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_start';
381
-            $SQL .= ' <= "' . date('Y-m-t 23:59:59', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '"';
380
+            $SQL = ' AND '.EEM_Datetime::instance()->table().'.DTT_EVT_start';
381
+            $SQL .= ' <= "'.date('Y-m-t 23:59:59', \EEH_DTT_Helper::first_of_month_timestamp($month)).'"';
382 382
             // event end date is GREATER than the start of the month ( so nothing that ended before this month )
383
-            $SQL .= ' AND ' . EEM_Datetime::instance()->table() . '.DTT_EVT_end';
384
-            $SQL .= ' >= "' . date('Y-m-d 0:0:00', \EEH_DTT_Helper::first_of_month_timestamp($month)) . '" ';
383
+            $SQL .= ' AND '.EEM_Datetime::instance()->table().'.DTT_EVT_end';
384
+            $SQL .= ' >= "'.date('Y-m-d 0:0:00', \EEH_DTT_Helper::first_of_month_timestamp($month)).'" ';
385 385
         }
386 386
         return $SQL;
387 387
     }
@@ -436,43 +436,43 @@  discard block
 block discarded – undo
436 436
             switch ($orderby) {
437 437
                 case 'id':
438 438
                 case 'ID':
439
-                    $SQL .= $glue . $wpdb->posts . '.ID ' . $sort;
439
+                    $SQL .= $glue.$wpdb->posts.'.ID '.$sort;
440 440
                     break;
441 441
 
442 442
                 case 'start_date':
443
-                    $SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_start ' . $sort;
443
+                    $SQL .= $glue.EEM_Datetime::instance()->table().'.DTT_EVT_start '.$sort;
444 444
                     break;
445 445
 
446 446
                 case 'end_date':
447
-                    $SQL .= $glue . EEM_Datetime::instance()->table() . '.DTT_EVT_end ' . $sort;
447
+                    $SQL .= $glue.EEM_Datetime::instance()->table().'.DTT_EVT_end '.$sort;
448 448
                     break;
449 449
 
450 450
                 case 'event_name':
451
-                    $SQL .= $glue . $wpdb->posts . '.post_title ' . $sort;
451
+                    $SQL .= $glue.$wpdb->posts.'.post_title '.$sort;
452 452
                     break;
453 453
 
454 454
                 case 'category_slug':
455
-                    $SQL .= $glue . $wpdb->terms . '.slug ' . $sort;
455
+                    $SQL .= $glue.$wpdb->terms.'.slug '.$sort;
456 456
                     break;
457 457
 
458 458
                 case 'ticket_start':
459
-                    $SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_start_date ' . $sort;
459
+                    $SQL .= $glue.EEM_Ticket::instance()->table().'.TKT_start_date '.$sort;
460 460
                     break;
461 461
 
462 462
                 case 'ticket_end':
463
-                    $SQL .= $glue . EEM_Ticket::instance()->table() . '.TKT_end_date ' . $sort;
463
+                    $SQL .= $glue.EEM_Ticket::instance()->table().'.TKT_end_date '.$sort;
464 464
                     break;
465 465
 
466 466
                 case 'venue_title':
467
-                    $SQL .= $glue . 'venue_title ' . $sort;
467
+                    $SQL .= $glue.'venue_title '.$sort;
468 468
                     break;
469 469
 
470 470
                 case 'city':
471
-                    $SQL .= $glue . EEM_Venue::instance()->second_table() . '.VNU_city ' . $sort;
471
+                    $SQL .= $glue.EEM_Venue::instance()->second_table().'.VNU_city '.$sort;
472 472
                     break;
473 473
 
474 474
                 case 'state':
475
-                    $SQL .= $glue . EEM_State::instance()->table() . '.STA_name ' . $sort;
475
+                    $SQL .= $glue.EEM_State::instance()->table().'.STA_name '.$sort;
476 476
                     break;
477 477
             }
478 478
             $cntr++;
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
      */
527 527
     public function event_list_pagination()
528 528
     {
529
-        echo '<div class="ee-pagination-dv ee-clear-float">' . espresso_event_list_pagination() . '</div>';
529
+        echo '<div class="ee-pagination-dv ee-clear-float">'.espresso_event_list_pagination().'</div>';
530 530
     }
531 531
 
532 532
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     public function event_details($content)
541 541
     {
542 542
         return EEH_Template::display_template(
543
-            EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-details.php',
543
+            EE_TEMPLATES.EE_Config::get_current_theme().'/content-espresso_events-details.php',
544 544
             array('the_content' => $content),
545 545
             true
546 546
         );
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
     {
559 559
         return $content
560 560
                . EEH_Template::display_template(
561
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-tickets.php',
561
+                   EE_TEMPLATES.EE_Config::get_current_theme().'/content-espresso_events-tickets.php',
562 562
                    array(),
563 563
                    true
564 564
                );
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
     {
576 576
         return $content
577 577
                . EEH_Template::display_template(
578
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-datetimes.php',
578
+                   EE_TEMPLATES.EE_Config::get_current_theme().'/content-espresso_events-datetimes.php',
579 579
                    array(),
580 580
                    true
581 581
                );
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
     {
593 593
         return $content
594 594
                . EEH_Template::display_template(
595
-                   EE_TEMPLATES . EE_Config::get_current_theme() . '/content-espresso_events-venues.php',
595
+                   EE_TEMPLATES.EE_Config::get_current_theme().'/content-espresso_events-venues.php',
596 596
                    array(),
597 597
                    true
598 598
                );
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
      */
628 628
     private function _get_template($which = 'part')
629 629
     {
630
-        return EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
630
+        return EE_TEMPLATES.EE_Config::get_current_theme().'/archive-espresso_events.php';
631 631
     }
632 632
 
633 633
 
@@ -687,27 +687,27 @@  discard block
 block discarded – undo
687 687
         if (apply_filters('FHEE_enable_default_espresso_css', false)) {
688 688
             // first check uploads folder
689 689
             if (is_readable(
690
-                get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.css'
690
+                get_stylesheet_directory().EE_Config::get_current_theme().'/archive-espresso_events.css'
691 691
             )) {
692 692
                 wp_register_style(
693 693
                     'archive-espresso_events',
694
-                    get_stylesheet_directory_uri() . EE_Config::get_current_theme(
695
-                    ) . '/archive-espresso_events.css',
694
+                    get_stylesheet_directory_uri().EE_Config::get_current_theme(
695
+                    ).'/archive-espresso_events.css',
696 696
                     array('dashicons', 'espresso_default')
697 697
                 );
698 698
             } else {
699 699
                 wp_register_style(
700 700
                     'archive-espresso_events',
701
-                    EE_TEMPLATES_URL . EE_Config::get_current_theme() . '/archive-espresso_events.css',
701
+                    EE_TEMPLATES_URL.EE_Config::get_current_theme().'/archive-espresso_events.css',
702 702
                     array('dashicons', 'espresso_default')
703 703
                 );
704 704
             }
705 705
             if (is_readable(
706
-                get_stylesheet_directory() . EE_Config::get_current_theme() . '/archive-espresso_events.js'
706
+                get_stylesheet_directory().EE_Config::get_current_theme().'/archive-espresso_events.js'
707 707
             )) {
708 708
                 wp_register_script(
709 709
                     'archive-espresso_events',
710
-                    get_stylesheet_directory_uri() . EE_Config::get_current_theme() . '/archive-espresso_events.js',
710
+                    get_stylesheet_directory_uri().EE_Config::get_current_theme().'/archive-espresso_events.js',
711 711
                     array('jquery-masonry'),
712 712
                     '1.0',
713 713
                     true
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
             } else {
716 716
                 wp_register_script(
717 717
                     'archive-espresso_events',
718
-                    EVENTS_ARCHIVE_ASSETS_URL . 'archive-espresso_events.js',
718
+                    EVENTS_ARCHIVE_ASSETS_URL.'archive-espresso_events.js',
719 719
                     array('jquery-masonry'),
720 720
                     '1.0',
721 721
                     true
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
             $EE->CFG->template_settings->EED_Events_Archive_Filters
764 764
         );
765 765
         EEH_Template::display_template(
766
-            EVENTS_ARCHIVE_TEMPLATES_PATH . 'admin-event-list-settings.template.php',
766
+            EVENTS_ARCHIVE_TEMPLATES_PATH.'admin-event-list-settings.template.php',
767 767
             $EE->CFG->template_settings->EED_Events_Archive_Filters
768 768
         );
769 769
     }
@@ -792,10 +792,10 @@  discard block
 block discarded – undo
792 792
             ? $CFG->event_list_grid_size : 'medium';
793 793
         $CFG->templates['full'] = isset($CFG->templates['full']) && ! empty($CFG->templates['full'])
794 794
             ? $CFG->templates['full']
795
-            : EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php';
795
+            : EE_TEMPLATES.EE_Config::get_current_theme().'/archive-espresso_events.php';
796 796
         $CFG->templates['part'] = isset($CFG->templates['part']) && ! empty($CFG->templates['part'])
797 797
             ? $CFG->templates['part']
798
-            : EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-grid-view.php';
798
+            : EE_TEMPLATES.EE_Config::get_current_theme().'/archive-espresso_events-grid-view.php';
799 799
         return $CFG;
800 800
     }
801 801
 
@@ -837,20 +837,20 @@  discard block
 block discarded – undo
837 837
         $CFG->EED_Events_Archive_Filters->event_list_grid_size = isset($REQ['event_list_grid_size'])
838 838
             ? sanitize_text_field($REQ['event_list_grid_size']) : 'medium';
839 839
         $CFG->EED_Events_Archive_Filters->templates = array(
840
-            'full' => EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events.php',
840
+            'full' => EE_TEMPLATES.EE_Config::get_current_theme().'/archive-espresso_events.php',
841 841
         );
842 842
 
843 843
         switch ($CFG->EED_Events_Archive_Filters->default_type) {
844 844
             case 'dates':
845
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
845
+                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES.EE_Config::get_current_theme()
846 846
                                                                       . '/archive-espresso_events-dates-view.php';
847 847
                 break;
848 848
             case 'text':
849
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
849
+                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES.EE_Config::get_current_theme()
850 850
                                                                       . '/archive-espresso_events-text-view.php';
851 851
                 break;
852 852
             default:
853
-                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES . EE_Config::get_current_theme()
853
+                $CFG->EED_Events_Archive_Filters->templates['part'] = EE_TEMPLATES.EE_Config::get_current_theme()
854 854
                                                                       . '/archive-espresso_events-grid-view.php';
855 855
         }
856 856
 
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
             'elf_type'         => self::$_type,
901 901
         );
902 902
         EEH_Template::display_template(
903
-            EE_TEMPLATES . EE_Config::get_current_theme() . '/archive-espresso_events-filters.php',
903
+            EE_TEMPLATES.EE_Config::get_current_theme().'/archive-espresso_events-filters.php',
904 904
             $args
905 905
         );
906 906
     }
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
         if (self::$_type == 'grid') {
921 921
             $event_list_grid_size = isset($EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size)
922 922
                 ? $EE->CFG->template_settings->EED_Events_Archive_Filters->event_list_grid_size : 'medium';
923
-            $event_list_css[] = $event_list_grid_size . '-event-list-grid';
923
+            $event_list_css[] = $event_list_grid_size.'-event-list-grid';
924 924
         }
925 925
         $event_list_css = apply_filters(
926 926
             'EED_Events_Archive_Filters__event_list_css__event_list_css_array',
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
                 'add_fragment' => '',
1017 1017
             )
1018 1018
         );
1019
-        return ! empty($pagination) ? '<div class="ee-pagination-dv clear">' . $pagination . '</div>' : '';
1019
+        return ! empty($pagination) ? '<div class="ee-pagination-dv clear">'.$pagination.'</div>' : '';
1020 1020
     }
1021 1021
 
1022 1022
 
Please login to merge, or discard this patch.
modules/feeds/EED_Feeds.module.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      *
113 113
      * @access    public
114 114
      * @param    string $SQL the JOIN clause for the comment feed query
115
-     * @return    void
115
+     * @return    string
116 116
      */
117 117
     public static function comment_feed_join($SQL)
118 118
     {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      *
134 134
      * @access    public
135 135
      * @param    string $SQL the WHERE clause for the comment feed query
136
-     * @return    void
136
+     * @return    string
137 137
      */
138 138
     public static function comment_feed_where($SQL)
139 139
     {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      *
151 151
      * @access    public
152 152
      * @param    string $content
153
-     * @return    void
153
+     * @return    string
154 154
      */
155 155
     public static function the_event_feed($content)
156 156
     {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      *
192 192
      * @access    public
193 193
      * @param    string $content
194
-     * @return    void
194
+     * @return    string
195 195
      */
196 196
     public static function the_venue_feed($content)
197 197
     {
Please login to merge, or discard this patch.
Indentation   +213 added lines, -213 removed lines patch added patch discarded remove patch
@@ -12,217 +12,217 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    /**
16
-     * @return EED_Feeds
17
-     */
18
-    public static function instance()
19
-    {
20
-        return parent::get_instance(__CLASS__);
21
-    }
22
-
23
-
24
-    /**
25
-     *    set_hooks - for hooking into EE Core, other modules, etc
26
-     *
27
-     * @access    public
28
-     * @return    void
29
-     */
30
-    public static function set_hooks()
31
-    {
32
-        add_action('parse_request', array('EED_Feeds', 'parse_request'), 10);
33
-        add_filter('default_feed', array('EED_Feeds', 'default_feed'), 10, 1);
34
-        add_filter('comment_feed_join', array('EED_Feeds', 'comment_feed_join'), 10, 2);
35
-        add_filter('comment_feed_where', array('EED_Feeds', 'comment_feed_where'), 10, 2);
36
-    }
37
-
38
-    /**
39
-     *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
40
-     *
41
-     * @access    public
42
-     * @return    void
43
-     */
44
-    public static function set_hooks_admin()
45
-    {
46
-    }
47
-
48
-
49
-    /**
50
-     *    run - initial module setup
51
-     *
52
-     * @access    public
53
-     * @return    void
54
-     */
55
-    public function run($WP)
56
-    {
57
-    }
58
-
59
-
60
-    /**
61
-     *    default_feed
62
-     *
63
-     * @access    public
64
-     * @param    type    rss2, atom, rss, rdf, rssjs
65
-     * @return    string
66
-     */
67
-    public static function default_feed($type = 'rss2')
68
-    {
69
-        // rss2, atom, rss, rdf, rssjs
70
-        $type = 'rss2';
71
-        return $type;
72
-    }
73
-
74
-
75
-    /**
76
-     *    parse_request
77
-     *
78
-     * @access    public
79
-     * @return    void
80
-     */
81
-    public static function parse_request()
82
-    {
83
-        if (EE_Registry::instance()->REQ->is_set('post_type')) {
84
-            // define path to templates
85
-            define('RSS_FEEDS_TEMPLATES_PATH', str_replace('\\', '/', plugin_dir_path(__FILE__)) . 'templates/');
86
-            // what kinda post_type are we dealing with ?
87
-            switch (EE_Registry::instance()->REQ->get('post_type')) {
88
-                case 'espresso_events':
89
-                    // for rss2, atom, rss, rdf
90
-                    add_filter('the_excerpt_rss', array('EED_Feeds', 'the_event_feed'), 10, 1);
91
-                    add_filter('the_content_feed', array('EED_Feeds', 'the_event_feed'), 10, 1);
92
-                    // for json ( also uses the above filter )
93
-                    add_filter('rssjs_feed_item', array('EED_Feeds', 'the_event_rssjs_feed'), 10, 1);
94
-                    break;
95
-                case 'espresso_venues':
96
-                    // for rss2, atom, rss, rdf
97
-                    add_filter('the_excerpt_rss', array('EED_Feeds', 'the_venue_feed'), 10, 1);
98
-                    add_filter('the_content_feed', array('EED_Feeds', 'the_venue_feed'), 10, 1);
99
-                    // for json ( also uses the above filter )
100
-                    add_filter('rssjs_feed_item', array('EED_Feeds', 'the_venue_rssjs_feed'), 10, 1);
101
-                    break;
102
-            }
103
-        }
104
-    }
105
-
106
-
107
-    /**
108
-     *    comment_feed_join - EVEN THOUGH... our espresso_attendees custom post type is set to NOT PUBLIC
109
-     *    WordPress thought it would be a good idea to display the comments for them in the RSS feeds... we think NOT
110
-     *    so this little snippet of SQL taps into the comment feed query and removes comments for the
111
-     *    espresso_attendees post_type
112
-     *
113
-     * @access    public
114
-     * @param    string $SQL the JOIN clause for the comment feed query
115
-     * @return    void
116
-     */
117
-    public static function comment_feed_join($SQL)
118
-    {
119
-        global $wpdb;
120
-        // check for wp_posts table in JOIN clause
121
-        if (strpos($SQL, $wpdb->posts) !== false) {
122
-            add_filter('EED_Feeds__comment_feed_where__espresso_attendees', '__return_true');
123
-        }
124
-        return $SQL;
125
-    }
126
-
127
-
128
-    /**
129
-     *    comment_feed_where - EVEN THOUGH... our espresso_attendees custom post type is set to NOT PUBLIC
130
-     *    WordPress thought it would be a good idea to display the comments for them in the RSS feeds... we think NOT
131
-     *    so this little snippet of SQL taps into the comment feed query and removes comments for the
132
-     *    espresso_attendees post_type
133
-     *
134
-     * @access    public
135
-     * @param    string $SQL the WHERE clause for the comment feed query
136
-     * @return    void
137
-     */
138
-    public static function comment_feed_where($SQL)
139
-    {
140
-        global $wp_query, $wpdb;
141
-        if ($wp_query->is_comment_feed && apply_filters('EED_Feeds__comment_feed_where__espresso_attendees', false)) {
142
-            $SQL .= " AND $wpdb->posts.post_type != 'espresso_attendees'";
143
-        }
144
-        return $SQL;
145
-    }
146
-
147
-
148
-    /**
149
-     *    the_event_feed
150
-     *
151
-     * @access    public
152
-     * @param    string $content
153
-     * @return    void
154
-     */
155
-    public static function the_event_feed($content)
156
-    {
157
-        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php')) {
158
-            global $post;
159
-            $template_args = array(
160
-                'EVT_ID'            => $post->ID,
161
-                'event_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
162
-            );
163
-            $content = EEH_Template::display_template(
164
-                RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php',
165
-                $template_args,
166
-                true
167
-            );
168
-        }
169
-        return $content;
170
-    }
171
-
172
-
173
-    /**
174
-     *    the_event_rssjs_feed
175
-     *
176
-     * @access    public
177
-     * @param    object $item
178
-     * @return    void
179
-     */
180
-    public static function the_event_rssjs_feed($item)
181
-    {
182
-        if (is_feed() && isset($item->description)) {
183
-            $item->description = EED_Feeds::the_event_feed($item->description);
184
-        }
185
-        return $item;
186
-    }
187
-
188
-
189
-    /**
190
-     *    the_venue_feed
191
-     *
192
-     * @access    public
193
-     * @param    string $content
194
-     * @return    void
195
-     */
196
-    public static function the_venue_feed($content)
197
-    {
198
-        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php')) {
199
-            global $post;
200
-            $template_args = array(
201
-                'VNU_ID'            => $post->ID,
202
-                'venue_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
203
-            );
204
-            $content = EEH_Template::display_template(
205
-                RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php',
206
-                $template_args,
207
-                true
208
-            );
209
-        }
210
-        return $content;
211
-    }
212
-
213
-
214
-    /**
215
-     *    the_venue_rssjs_feed
216
-     *
217
-     * @access    public
218
-     * @param    object $item
219
-     * @return    void
220
-     */
221
-    public static function the_venue_rssjs_feed($item)
222
-    {
223
-        if (is_feed() && isset($item->description)) {
224
-            $item->description = EED_Feeds::the_venue_feed($item->description);
225
-        }
226
-        return $item;
227
-    }
15
+	/**
16
+	 * @return EED_Feeds
17
+	 */
18
+	public static function instance()
19
+	{
20
+		return parent::get_instance(__CLASS__);
21
+	}
22
+
23
+
24
+	/**
25
+	 *    set_hooks - for hooking into EE Core, other modules, etc
26
+	 *
27
+	 * @access    public
28
+	 * @return    void
29
+	 */
30
+	public static function set_hooks()
31
+	{
32
+		add_action('parse_request', array('EED_Feeds', 'parse_request'), 10);
33
+		add_filter('default_feed', array('EED_Feeds', 'default_feed'), 10, 1);
34
+		add_filter('comment_feed_join', array('EED_Feeds', 'comment_feed_join'), 10, 2);
35
+		add_filter('comment_feed_where', array('EED_Feeds', 'comment_feed_where'), 10, 2);
36
+	}
37
+
38
+	/**
39
+	 *    set_hooks_admin - for hooking into EE Admin Core, other modules, etc
40
+	 *
41
+	 * @access    public
42
+	 * @return    void
43
+	 */
44
+	public static function set_hooks_admin()
45
+	{
46
+	}
47
+
48
+
49
+	/**
50
+	 *    run - initial module setup
51
+	 *
52
+	 * @access    public
53
+	 * @return    void
54
+	 */
55
+	public function run($WP)
56
+	{
57
+	}
58
+
59
+
60
+	/**
61
+	 *    default_feed
62
+	 *
63
+	 * @access    public
64
+	 * @param    type    rss2, atom, rss, rdf, rssjs
65
+	 * @return    string
66
+	 */
67
+	public static function default_feed($type = 'rss2')
68
+	{
69
+		// rss2, atom, rss, rdf, rssjs
70
+		$type = 'rss2';
71
+		return $type;
72
+	}
73
+
74
+
75
+	/**
76
+	 *    parse_request
77
+	 *
78
+	 * @access    public
79
+	 * @return    void
80
+	 */
81
+	public static function parse_request()
82
+	{
83
+		if (EE_Registry::instance()->REQ->is_set('post_type')) {
84
+			// define path to templates
85
+			define('RSS_FEEDS_TEMPLATES_PATH', str_replace('\\', '/', plugin_dir_path(__FILE__)) . 'templates/');
86
+			// what kinda post_type are we dealing with ?
87
+			switch (EE_Registry::instance()->REQ->get('post_type')) {
88
+				case 'espresso_events':
89
+					// for rss2, atom, rss, rdf
90
+					add_filter('the_excerpt_rss', array('EED_Feeds', 'the_event_feed'), 10, 1);
91
+					add_filter('the_content_feed', array('EED_Feeds', 'the_event_feed'), 10, 1);
92
+					// for json ( also uses the above filter )
93
+					add_filter('rssjs_feed_item', array('EED_Feeds', 'the_event_rssjs_feed'), 10, 1);
94
+					break;
95
+				case 'espresso_venues':
96
+					// for rss2, atom, rss, rdf
97
+					add_filter('the_excerpt_rss', array('EED_Feeds', 'the_venue_feed'), 10, 1);
98
+					add_filter('the_content_feed', array('EED_Feeds', 'the_venue_feed'), 10, 1);
99
+					// for json ( also uses the above filter )
100
+					add_filter('rssjs_feed_item', array('EED_Feeds', 'the_venue_rssjs_feed'), 10, 1);
101
+					break;
102
+			}
103
+		}
104
+	}
105
+
106
+
107
+	/**
108
+	 *    comment_feed_join - EVEN THOUGH... our espresso_attendees custom post type is set to NOT PUBLIC
109
+	 *    WordPress thought it would be a good idea to display the comments for them in the RSS feeds... we think NOT
110
+	 *    so this little snippet of SQL taps into the comment feed query and removes comments for the
111
+	 *    espresso_attendees post_type
112
+	 *
113
+	 * @access    public
114
+	 * @param    string $SQL the JOIN clause for the comment feed query
115
+	 * @return    void
116
+	 */
117
+	public static function comment_feed_join($SQL)
118
+	{
119
+		global $wpdb;
120
+		// check for wp_posts table in JOIN clause
121
+		if (strpos($SQL, $wpdb->posts) !== false) {
122
+			add_filter('EED_Feeds__comment_feed_where__espresso_attendees', '__return_true');
123
+		}
124
+		return $SQL;
125
+	}
126
+
127
+
128
+	/**
129
+	 *    comment_feed_where - EVEN THOUGH... our espresso_attendees custom post type is set to NOT PUBLIC
130
+	 *    WordPress thought it would be a good idea to display the comments for them in the RSS feeds... we think NOT
131
+	 *    so this little snippet of SQL taps into the comment feed query and removes comments for the
132
+	 *    espresso_attendees post_type
133
+	 *
134
+	 * @access    public
135
+	 * @param    string $SQL the WHERE clause for the comment feed query
136
+	 * @return    void
137
+	 */
138
+	public static function comment_feed_where($SQL)
139
+	{
140
+		global $wp_query, $wpdb;
141
+		if ($wp_query->is_comment_feed && apply_filters('EED_Feeds__comment_feed_where__espresso_attendees', false)) {
142
+			$SQL .= " AND $wpdb->posts.post_type != 'espresso_attendees'";
143
+		}
144
+		return $SQL;
145
+	}
146
+
147
+
148
+	/**
149
+	 *    the_event_feed
150
+	 *
151
+	 * @access    public
152
+	 * @param    string $content
153
+	 * @return    void
154
+	 */
155
+	public static function the_event_feed($content)
156
+	{
157
+		if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php')) {
158
+			global $post;
159
+			$template_args = array(
160
+				'EVT_ID'            => $post->ID,
161
+				'event_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
162
+			);
163
+			$content = EEH_Template::display_template(
164
+				RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php',
165
+				$template_args,
166
+				true
167
+			);
168
+		}
169
+		return $content;
170
+	}
171
+
172
+
173
+	/**
174
+	 *    the_event_rssjs_feed
175
+	 *
176
+	 * @access    public
177
+	 * @param    object $item
178
+	 * @return    void
179
+	 */
180
+	public static function the_event_rssjs_feed($item)
181
+	{
182
+		if (is_feed() && isset($item->description)) {
183
+			$item->description = EED_Feeds::the_event_feed($item->description);
184
+		}
185
+		return $item;
186
+	}
187
+
188
+
189
+	/**
190
+	 *    the_venue_feed
191
+	 *
192
+	 * @access    public
193
+	 * @param    string $content
194
+	 * @return    void
195
+	 */
196
+	public static function the_venue_feed($content)
197
+	{
198
+		if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php')) {
199
+			global $post;
200
+			$template_args = array(
201
+				'VNU_ID'            => $post->ID,
202
+				'venue_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
203
+			);
204
+			$content = EEH_Template::display_template(
205
+				RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php',
206
+				$template_args,
207
+				true
208
+			);
209
+		}
210
+		return $content;
211
+	}
212
+
213
+
214
+	/**
215
+	 *    the_venue_rssjs_feed
216
+	 *
217
+	 * @access    public
218
+	 * @param    object $item
219
+	 * @return    void
220
+	 */
221
+	public static function the_venue_rssjs_feed($item)
222
+	{
223
+		if (is_feed() && isset($item->description)) {
224
+			$item->description = EED_Feeds::the_venue_feed($item->description);
225
+		}
226
+		return $item;
227
+	}
228 228
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         if (EE_Registry::instance()->REQ->is_set('post_type')) {
84 84
             // define path to templates
85
-            define('RSS_FEEDS_TEMPLATES_PATH', str_replace('\\', '/', plugin_dir_path(__FILE__)) . 'templates/');
85
+            define('RSS_FEEDS_TEMPLATES_PATH', str_replace('\\', '/', plugin_dir_path(__FILE__)).'templates/');
86 86
             // what kinda post_type are we dealing with ?
87 87
             switch (EE_Registry::instance()->REQ->get('post_type')) {
88 88
                 case 'espresso_events':
@@ -154,14 +154,14 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public static function the_event_feed($content)
156 156
     {
157
-        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php')) {
157
+        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH.'espresso_events_feed.template.php')) {
158 158
             global $post;
159 159
             $template_args = array(
160 160
                 'EVT_ID'            => $post->ID,
161 161
                 'event_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
162 162
             );
163 163
             $content = EEH_Template::display_template(
164
-                RSS_FEEDS_TEMPLATES_PATH . 'espresso_events_feed.template.php',
164
+                RSS_FEEDS_TEMPLATES_PATH.'espresso_events_feed.template.php',
165 165
                 $template_args,
166 166
                 true
167 167
             );
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public static function the_venue_feed($content)
197 197
     {
198
-        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php')) {
198
+        if (is_feed() && is_readable(RSS_FEEDS_TEMPLATES_PATH.'espresso_venues_feed.template.php')) {
199 199
             global $post;
200 200
             $template_args = array(
201 201
                 'VNU_ID'            => $post->ID,
202 202
                 'venue_description' => get_option('rss_use_excerpt') ? $post->post_excerpt : $post->post_content,
203 203
             );
204 204
             $content = EEH_Template::display_template(
205
-                RSS_FEEDS_TEMPLATES_PATH . 'espresso_venues_feed.template.php',
205
+                RSS_FEEDS_TEMPLATES_PATH.'espresso_venues_feed.template.php',
206 206
                 $template_args,
207 207
                 true
208 208
             );
Please login to merge, or discard this patch.
admin_pages/support/Support_Admin_Page_Init.core.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -16,36 +16,36 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    public function __construct()
20
-    {
21
-        // define some help/support page related constants
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/');
27
-        parent::__construct();
28
-    }
19
+	public function __construct()
20
+	{
21
+		// define some help/support page related constants
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/');
27
+		parent::__construct();
28
+	}
29 29
 
30
-    protected function _set_init_properties()
31
-    {
32
-        $this->label = __('Help & Support', 'event_espresso');
33
-    }
30
+	protected function _set_init_properties()
31
+	{
32
+		$this->label = __('Help & Support', 'event_espresso');
33
+	}
34 34
 
35
-    protected function _set_menu_map()
36
-    {
37
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
38
-            array(
39
-                'menu_group'              => 'extras',
40
-                'menu_order'              => 30,
41
-                'show_on_menu'            => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
42
-                'parent_slug'             => 'espresso_events',
43
-                'menu_slug'               => EE_SUPPORT_PG_SLUG,
44
-                'menu_label'              => __('Help & Support', 'event_espresso'),
45
-                'capability'              => 'ee_read_ee',
46
-                'maintenance_mode_parent' => 'espresso_maintenance_settings',
47
-                'admin_init_page'         => $this,
48
-            )
49
-        );
50
-    }
35
+	protected function _set_menu_map()
36
+	{
37
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
38
+			array(
39
+				'menu_group'              => 'extras',
40
+				'menu_order'              => 30,
41
+				'show_on_menu'            => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
42
+				'parent_slug'             => 'espresso_events',
43
+				'menu_slug'               => EE_SUPPORT_PG_SLUG,
44
+				'menu_label'              => __('Help & Support', 'event_espresso'),
45
+				'capability'              => 'ee_read_ee',
46
+				'maintenance_mode_parent' => 'espresso_maintenance_settings',
47
+				'admin_init_page'         => $this,
48
+			)
49
+		);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
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.
admin_pages/support/Support_Admin_Page.core.php 2 patches
Indentation   +238 added lines, -238 removed lines patch added patch discarded remove patch
@@ -13,242 +13,242 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
 
16
-    protected function _init_page_props()
17
-    {
18
-        $this->page_slug = EE_SUPPORT_PG_SLUG;
19
-        $this->page_label = esc_html__('Help & Support', 'event_espresso');
20
-        $this->_admin_base_url = EE_SUPPORT_ADMIN_URL;
21
-        $this->_admin_base_path = EE_SUPPORT_ADMIN;
22
-    }
23
-
24
-
25
-    protected function _ajax_hooks()
26
-    {
27
-    }
28
-
29
-
30
-    protected function _define_page_props()
31
-    {
32
-        $this->_labels = array();
33
-        $this->_admin_page_title = $this->page_label;
34
-    }
35
-
36
-
37
-    protected function _set_page_routes()
38
-    {
39
-        $this->_page_routes = array(
40
-            'default'    => array(
41
-                'func'       => '_contact_support',
42
-                'capability' => 'ee_read_ee',
43
-            ),
44
-            'developers' => array(
45
-                'func'       => '_developers',
46
-                'capability' => 'ee_read_ee',
47
-            ),
48
-            'shortcodes' => array(
49
-                'func'       => '_shortcodes',
50
-                'capability' => 'ee_read_ee',
51
-            ),
52
-        );
53
-    }
54
-
55
-
56
-    protected function _set_page_config()
57
-    {
58
-        $this->_page_config = array(
59
-            'default'    => array(
60
-                'nav'           => array(
61
-                    'label' => esc_html__('Support', 'event_espresso'),
62
-                    'order' => 30,
63
-                ),
64
-                'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')),
65
-                'require_nonce' => false,
66
-            ),
67
-            'developers' => array(
68
-                'nav'           => array(
69
-                    'label' => esc_html__('Developers', 'event_espresso'),
70
-                    'order' => 50,
71
-                ),
72
-                'metaboxes'     => $this->_default_espresso_metaboxes,
73
-                'require_nonce' => false,
74
-            ),
75
-            'shortcodes' => array(
76
-                'nav'           => array(
77
-                    'label' => esc_html__('Shortcodes', 'event_espresso'),
78
-                    'order' => 60,
79
-                ),
80
-                'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')),
81
-                'require_nonce' => false,
82
-            ),
83
-        );
84
-    }
85
-
86
-
87
-    // none of the below group are currently used for Support pages
88
-    protected function _add_screen_options()
89
-    {
90
-    }
91
-
92
-
93
-    protected function _add_feature_pointers()
94
-    {
95
-    }
96
-
97
-
98
-    public function admin_init()
99
-    {
100
-    }
101
-
102
-
103
-    public function admin_notices()
104
-    {
105
-    }
106
-
107
-
108
-    public function admin_footer_scripts()
109
-    {
110
-    }
111
-
112
-
113
-    public function load_scripts_styles()
114
-    {
115
-    }
116
-
117
-
118
-    protected function _installation()
119
-    {
120
-        $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php';
121
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(
122
-            $template_path,
123
-            '',
124
-            true
125
-        );
126
-        $this->display_admin_page_with_sidebar();
127
-    }
128
-
129
-
130
-    protected function _resources()
131
-    {
132
-        $this->display_admin_page_with_sidebar();
133
-    }
134
-
135
-
136
-    protected function _add_settings_metabox($box, $label, array $args)
137
-    {
138
-        add_meta_box(
139
-            "espresso_{$box}_settings",
140
-            $label,
141
-            function ($post, $metabox) {
142
-                echo EEH_Template::display_template(
143
-                    $metabox['args']['template_path'],
144
-                    $metabox['args']['template_args'],
145
-                    true
146
-                );
147
-            },
148
-            $this->_current_screen->id,
149
-            'normal',
150
-            'high',
151
-            apply_filters(
152
-                "FHEE__Support_Admin_Page___add_settings_metabox__{$box}_args_array",
153
-                $args
154
-            )
155
-        );
156
-    }
157
-
158
-
159
-    protected function _resources_boxes()
160
-    {
161
-        $boxes = apply_filters(
162
-            'FHEE__Support_Admin_Page___resources_boxes__boxes_array',
163
-            array(
164
-                'favorite_theme_developers' => esc_html__('Favorite Theme Developers', 'event_espresso'),
165
-                'highly_recommended_themes' => esc_html__('Highly Recommended Themes', 'event_espresso'),
166
-                'hire_developer'            => esc_html__('Hire a Developer', 'event_espresso'),
167
-                'partners'                  => esc_html__('Partners', 'event_espresso'),
168
-                'recommended_plugins'       => esc_html__('Recommended Plugins', 'event_espresso'),
169
-                'other_resources'           => esc_html__('Other Resources', 'event_espresso'),
170
-            )
171
-        );
172
-        foreach ($boxes as $box => $label) {
173
-            $this->_add_settings_metabox(
174
-                $box,
175
-                $label,
176
-                array(
177
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
178
-                    'template_args' => $this->_template_args,
179
-                )
180
-            );
181
-        }
182
-    }
183
-
184
-
185
-    protected function _shortcodes()
186
-    {
187
-        $this->display_admin_page_with_sidebar();
188
-    }
189
-
190
-
191
-    protected function _shortcodes_boxes()
192
-    {
193
-        $boxes = apply_filters(
194
-            'FHEE__Support_Admin_Page___shortcodes_boxes__boxes_array',
195
-            array(
196
-                'shortcodes_event_listings'  => esc_html__('Event Listings', 'event_espresso'),
197
-                'shortcodes_ticket_selector' => esc_html__('Event Ticket Selector', 'event_espresso'),
198
-                'shortcodes_category'        => esc_html__('Event Categories', 'event_espresso'),
199
-                'shortcodes_attendee'        => esc_html__('Event Attendees', 'event_espresso')
200
-                /*'shortcodes_single_events' => esc_html__('Single Events', 'event_espresso'),*/
201
-                /*'shortcodes_attendee_listings' => esc_html__('Attendee Listings', 'event_espresso'),*/
202
-            )
203
-        );
204
-        foreach ($boxes as $box => $label) {
205
-            $this->_add_settings_metabox(
206
-                $box,
207
-                $label,
208
-                array(
209
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
210
-                    'template_args' => $this->_template_args,
211
-                )
212
-            );
213
-        }
214
-    }
215
-
216
-
217
-    protected function _contact_support()
218
-    {
219
-        $this->display_admin_page_with_sidebar();
220
-    }
221
-
222
-
223
-    protected function _support_boxes()
224
-    {
225
-        $boxes = apply_filters(
226
-            'FHEE__Support_Admin_Page___support_boxes__boxes_array',
227
-            array(
228
-                'contact_support'       => esc_html__('Contact Support', 'event_espresso'),
229
-                'important_information' => esc_html__('Important Information', 'event_espresso'),
230
-            )
231
-        );
232
-        foreach ($boxes as $box => $label) {
233
-            $this->_add_settings_metabox(
234
-                $box,
235
-                $label,
236
-                array(
237
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
238
-                    'template_args' => $this->_template_args,
239
-                )
240
-            );
241
-        }
242
-    }
243
-
244
-
245
-    protected function _developers()
246
-    {
247
-        $this->_template_args['admin_page_content'] = EEH_Template::display_template(
248
-            EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php',
249
-            array(),
250
-            true
251
-        );
252
-        $this->display_admin_page_with_sidebar();
253
-    }
16
+	protected function _init_page_props()
17
+	{
18
+		$this->page_slug = EE_SUPPORT_PG_SLUG;
19
+		$this->page_label = esc_html__('Help & Support', 'event_espresso');
20
+		$this->_admin_base_url = EE_SUPPORT_ADMIN_URL;
21
+		$this->_admin_base_path = EE_SUPPORT_ADMIN;
22
+	}
23
+
24
+
25
+	protected function _ajax_hooks()
26
+	{
27
+	}
28
+
29
+
30
+	protected function _define_page_props()
31
+	{
32
+		$this->_labels = array();
33
+		$this->_admin_page_title = $this->page_label;
34
+	}
35
+
36
+
37
+	protected function _set_page_routes()
38
+	{
39
+		$this->_page_routes = array(
40
+			'default'    => array(
41
+				'func'       => '_contact_support',
42
+				'capability' => 'ee_read_ee',
43
+			),
44
+			'developers' => array(
45
+				'func'       => '_developers',
46
+				'capability' => 'ee_read_ee',
47
+			),
48
+			'shortcodes' => array(
49
+				'func'       => '_shortcodes',
50
+				'capability' => 'ee_read_ee',
51
+			),
52
+		);
53
+	}
54
+
55
+
56
+	protected function _set_page_config()
57
+	{
58
+		$this->_page_config = array(
59
+			'default'    => array(
60
+				'nav'           => array(
61
+					'label' => esc_html__('Support', 'event_espresso'),
62
+					'order' => 30,
63
+				),
64
+				'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')),
65
+				'require_nonce' => false,
66
+			),
67
+			'developers' => array(
68
+				'nav'           => array(
69
+					'label' => esc_html__('Developers', 'event_espresso'),
70
+					'order' => 50,
71
+				),
72
+				'metaboxes'     => $this->_default_espresso_metaboxes,
73
+				'require_nonce' => false,
74
+			),
75
+			'shortcodes' => array(
76
+				'nav'           => array(
77
+					'label' => esc_html__('Shortcodes', 'event_espresso'),
78
+					'order' => 60,
79
+				),
80
+				'metaboxes'     => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')),
81
+				'require_nonce' => false,
82
+			),
83
+		);
84
+	}
85
+
86
+
87
+	// none of the below group are currently used for Support pages
88
+	protected function _add_screen_options()
89
+	{
90
+	}
91
+
92
+
93
+	protected function _add_feature_pointers()
94
+	{
95
+	}
96
+
97
+
98
+	public function admin_init()
99
+	{
100
+	}
101
+
102
+
103
+	public function admin_notices()
104
+	{
105
+	}
106
+
107
+
108
+	public function admin_footer_scripts()
109
+	{
110
+	}
111
+
112
+
113
+	public function load_scripts_styles()
114
+	{
115
+	}
116
+
117
+
118
+	protected function _installation()
119
+	{
120
+		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php';
121
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(
122
+			$template_path,
123
+			'',
124
+			true
125
+		);
126
+		$this->display_admin_page_with_sidebar();
127
+	}
128
+
129
+
130
+	protected function _resources()
131
+	{
132
+		$this->display_admin_page_with_sidebar();
133
+	}
134
+
135
+
136
+	protected function _add_settings_metabox($box, $label, array $args)
137
+	{
138
+		add_meta_box(
139
+			"espresso_{$box}_settings",
140
+			$label,
141
+			function ($post, $metabox) {
142
+				echo EEH_Template::display_template(
143
+					$metabox['args']['template_path'],
144
+					$metabox['args']['template_args'],
145
+					true
146
+				);
147
+			},
148
+			$this->_current_screen->id,
149
+			'normal',
150
+			'high',
151
+			apply_filters(
152
+				"FHEE__Support_Admin_Page___add_settings_metabox__{$box}_args_array",
153
+				$args
154
+			)
155
+		);
156
+	}
157
+
158
+
159
+	protected function _resources_boxes()
160
+	{
161
+		$boxes = apply_filters(
162
+			'FHEE__Support_Admin_Page___resources_boxes__boxes_array',
163
+			array(
164
+				'favorite_theme_developers' => esc_html__('Favorite Theme Developers', 'event_espresso'),
165
+				'highly_recommended_themes' => esc_html__('Highly Recommended Themes', 'event_espresso'),
166
+				'hire_developer'            => esc_html__('Hire a Developer', 'event_espresso'),
167
+				'partners'                  => esc_html__('Partners', 'event_espresso'),
168
+				'recommended_plugins'       => esc_html__('Recommended Plugins', 'event_espresso'),
169
+				'other_resources'           => esc_html__('Other Resources', 'event_espresso'),
170
+			)
171
+		);
172
+		foreach ($boxes as $box => $label) {
173
+			$this->_add_settings_metabox(
174
+				$box,
175
+				$label,
176
+				array(
177
+					'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
178
+					'template_args' => $this->_template_args,
179
+				)
180
+			);
181
+		}
182
+	}
183
+
184
+
185
+	protected function _shortcodes()
186
+	{
187
+		$this->display_admin_page_with_sidebar();
188
+	}
189
+
190
+
191
+	protected function _shortcodes_boxes()
192
+	{
193
+		$boxes = apply_filters(
194
+			'FHEE__Support_Admin_Page___shortcodes_boxes__boxes_array',
195
+			array(
196
+				'shortcodes_event_listings'  => esc_html__('Event Listings', 'event_espresso'),
197
+				'shortcodes_ticket_selector' => esc_html__('Event Ticket Selector', 'event_espresso'),
198
+				'shortcodes_category'        => esc_html__('Event Categories', 'event_espresso'),
199
+				'shortcodes_attendee'        => esc_html__('Event Attendees', 'event_espresso')
200
+				/*'shortcodes_single_events' => esc_html__('Single Events', 'event_espresso'),*/
201
+				/*'shortcodes_attendee_listings' => esc_html__('Attendee Listings', 'event_espresso'),*/
202
+			)
203
+		);
204
+		foreach ($boxes as $box => $label) {
205
+			$this->_add_settings_metabox(
206
+				$box,
207
+				$label,
208
+				array(
209
+					'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
210
+					'template_args' => $this->_template_args,
211
+				)
212
+			);
213
+		}
214
+	}
215
+
216
+
217
+	protected function _contact_support()
218
+	{
219
+		$this->display_admin_page_with_sidebar();
220
+	}
221
+
222
+
223
+	protected function _support_boxes()
224
+	{
225
+		$boxes = apply_filters(
226
+			'FHEE__Support_Admin_Page___support_boxes__boxes_array',
227
+			array(
228
+				'contact_support'       => esc_html__('Contact Support', 'event_espresso'),
229
+				'important_information' => esc_html__('Important Information', 'event_espresso'),
230
+			)
231
+		);
232
+		foreach ($boxes as $box => $label) {
233
+			$this->_add_settings_metabox(
234
+				$box,
235
+				$label,
236
+				array(
237
+					'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
238
+					'template_args' => $this->_template_args,
239
+				)
240
+			);
241
+		}
242
+	}
243
+
244
+
245
+	protected function _developers()
246
+	{
247
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template(
248
+			EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php',
249
+			array(),
250
+			true
251
+		);
252
+		$this->display_admin_page_with_sidebar();
253
+	}
254 254
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     protected function _installation()
119 119
     {
120
-        $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php';
120
+        $template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_installation.template.php';
121 121
         $this->_template_args['admin_page_content'] = EEH_Template::display_template(
122 122
             $template_path,
123 123
             '',
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         add_meta_box(
139 139
             "espresso_{$box}_settings",
140 140
             $label,
141
-            function ($post, $metabox) {
141
+            function($post, $metabox) {
142 142
                 echo EEH_Template::display_template(
143 143
                     $metabox['args']['template_path'],
144 144
                     $metabox['args']['template_args'],
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                 $box,
175 175
                 $label,
176 176
                 array(
177
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
177
+                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php",
178 178
                     'template_args' => $this->_template_args,
179 179
                 )
180 180
             );
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 $box,
207 207
                 $label,
208 208
                 array(
209
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
209
+                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php",
210 210
                     'template_args' => $this->_template_args,
211 211
                 )
212 212
             );
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                 $box,
235 235
                 $label,
236 236
                 array(
237
-                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH . "support_admin_details_{$box}.template.php",
237
+                    'template_path' => EE_SUPPORT_ADMIN_TEMPLATE_PATH."support_admin_details_{$box}.template.php",
238 238
                     'template_args' => $this->_template_args,
239 239
                 )
240 240
             );
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     protected function _developers()
246 246
     {
247 247
         $this->_template_args['admin_page_content'] = EEH_Template::display_template(
248
-            EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php',
248
+            EE_SUPPORT_ADMIN_TEMPLATE_PATH.'developers_admin_details.template.php',
249 249
             array(),
250 250
             true
251 251
         );
Please login to merge, or discard this patch.
support/templates/support_admin_details_contact_support.template.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -3,81 +3,81 @@
 block discarded – undo
3 3
 
4 4
     <h4>
5 5
         <?php esc_html_e(
6
-            'You may be able to find an answer for your question or concern here:',
7
-            'event_espresso'
8
-        ); ?>
6
+			'You may be able to find an answer for your question or concern here:',
7
+			'event_espresso'
8
+		); ?>
9 9
     </h4>
10 10
     <ol>
11 11
         <li><strong><em><?php esc_html_e('A known issue.', 'event_espresso'); ?></em></strong>
12 12
             <?php printf(
13
-                esc_html__(
14
-                    'Some themes and plugins have %1$sknown conflicts%2$s with Event Espresso. (You can also browse the %3$sEvent Espresso support pages%2$s or %4$sEvent Espresso support forums%2$s to see if other members have experienced and solved the problem.)',
15
-                    'event_espresso'
16
-                ),
17
-                '<a href="https://eventespresso.com/wiki/known-third-party-plugin-theme-conflicts/" target="_blank">',
18
-                '</a>',
19
-                '<a href="https://eventespresso.com/support/documentation/versioned-docs/?doc_ver=ee4" target="_blank">',
20
-                '<a href="https://eventespresso.com/support/forums/" target="_blank">'
21
-            ); ?></li>
13
+				esc_html__(
14
+					'Some themes and plugins have %1$sknown conflicts%2$s with Event Espresso. (You can also browse the %3$sEvent Espresso support pages%2$s or %4$sEvent Espresso support forums%2$s to see if other members have experienced and solved the problem.)',
15
+					'event_espresso'
16
+				),
17
+				'<a href="https://eventespresso.com/wiki/known-third-party-plugin-theme-conflicts/" target="_blank">',
18
+				'</a>',
19
+				'<a href="https://eventespresso.com/support/documentation/versioned-docs/?doc_ver=ee4" target="_blank">',
20
+				'<a href="https://eventespresso.com/support/forums/" target="_blank">'
21
+			); ?></li>
22 22
         <li><strong><em><?php esc_html_e('A plugin conflict.', 'event_espresso'); ?></em></strong>
23 23
             <?php esc_html_e(
24
-                'You can check to see if there is a plugin conflict by temporarily deactivating all plugins except for Event Espresso. If the problem goes away, then reactivate your plugins one by one until the issue returns. This will help you pinpoint the source of the conflict.',
25
-                'event_espresso'
26
-            ); ?></li>
24
+				'You can check to see if there is a plugin conflict by temporarily deactivating all plugins except for Event Espresso. If the problem goes away, then reactivate your plugins one by one until the issue returns. This will help you pinpoint the source of the conflict.',
25
+				'event_espresso'
26
+			); ?></li>
27 27
         <li>
28 28
             <strong><em><?php esc_html_e('A theme conflict.', 'event_espresso'); ?></em></strong>
29 29
             <?php
30
-            $default_theme = wp_get_theme(WP_DEFAULT_THEME);
30
+			$default_theme = wp_get_theme(WP_DEFAULT_THEME);
31 31
 
32
-            if ($default_theme->exists()) {
33
-                printf(
34
-                    esc_html__(
35
-                        'If your problem is not a known issue or caused by a plugin, then try activating %s (the default WordPress theme).',
36
-                        'event_espresso'
37
-                    ),
38
-                    $default_theme->get('Name')
39
-                );
40
-            } else {
41
-                esc_html_e(
42
-                    'If your problem is not a known issue or caused by a plugin, then try activating the default WordPress theme.',
43
-                    'event_espresso'
44
-                );
45
-            }
46
-            ?>
32
+			if ($default_theme->exists()) {
33
+				printf(
34
+					esc_html__(
35
+						'If your problem is not a known issue or caused by a plugin, then try activating %s (the default WordPress theme).',
36
+						'event_espresso'
37
+					),
38
+					$default_theme->get('Name')
39
+				);
40
+			} else {
41
+				esc_html_e(
42
+					'If your problem is not a known issue or caused by a plugin, then try activating the default WordPress theme.',
43
+					'event_espresso'
44
+				);
45
+			}
46
+			?>
47 47
             <?php esc_html_e(
48
-                'If this solves the problem for you, then something in your theme is causing this issue. Check to see if an update is available for your WordPress theme or reach out to the theme author.',
49
-                'event_espresso'
50
-            ); ?>
48
+				'If this solves the problem for you, then something in your theme is causing this issue. Check to see if an update is available for your WordPress theme or reach out to the theme author.',
49
+				'event_espresso'
50
+			); ?>
51 51
         </li>
52 52
     </ol>
53 53
 
54 54
     <p>
55 55
         <?php esc_html_e(
56
-            'If none of the suggestions above help you find a solution, then feel free to reach out to the support team at Event Espresso.',
57
-            'event_espresso'
58
-        ); ?></p>
56
+			'If none of the suggestions above help you find a solution, then feel free to reach out to the support team at Event Espresso.',
57
+			'event_espresso'
58
+		); ?></p>
59 59
     <p>
60 60
         <?php printf(
61
-            esc_html__(
62
-                'Login to your account on EventEspresso.com and %1$screate a support post in our member support forums%2$s. Use a %3$sclear and descriptive title%4$s in your support post, %3$sdescribe the issue to the best of your knowledge%4$s, and %3$snever post any sensitive information such as login details%4$s. Be sure to also include %5$simportant information in the section below%2$s about your WordPress site.',
63
-                'event_espresso'
64
-            ),
65
-            '<a href="https://eventespresso.com/support/forums/" target="_blank">',
66
-            '</a>',
67
-            '<strong>',
68
-            '</strong>',
69
-            '<a href="#espresso_important_information_settings">'
70
-        ); ?></p>
61
+			esc_html__(
62
+				'Login to your account on EventEspresso.com and %1$screate a support post in our member support forums%2$s. Use a %3$sclear and descriptive title%4$s in your support post, %3$sdescribe the issue to the best of your knowledge%4$s, and %3$snever post any sensitive information such as login details%4$s. Be sure to also include %5$simportant information in the section below%2$s about your WordPress site.',
63
+				'event_espresso'
64
+			),
65
+			'<a href="https://eventespresso.com/support/forums/" target="_blank">',
66
+			'</a>',
67
+			'<strong>',
68
+			'</strong>',
69
+			'<a href="#espresso_important_information_settings">'
70
+		); ?></p>
71 71
 
72 72
     <h4><?php esc_html_e('Have an emergency?', 'event_espresso'); ?></h4>
73 73
 
74 74
     <p>
75 75
         <?php printf(
76
-            esc_html__(
77
-                'We offer support tokens to members that need help with a time-sensitive issue. A support token will provide you with up to 30 minutes of one-on-one time with a team member at Event Espresso. If you have an emergency and need help quickly, then please %1$spurchase a support token%2$s.',
78
-                'event_espresso'
79
-            ),
80
-            '<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">',
81
-            '</a>'
82
-        ); ?></p>
76
+			esc_html__(
77
+				'We offer support tokens to members that need help with a time-sensitive issue. A support token will provide you with up to 30 minutes of one-on-one time with a team member at Event Espresso. If you have an emergency and need help quickly, then please %1$spurchase a support token%2$s.',
78
+				'event_espresso'
79
+			),
80
+			'<a href="https://eventespresso.com/product/premium-support-token/?utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=help_support_tab&utm_content=support_token" target="_blank">',
81
+			'</a>'
82
+		); ?></p>
83 83
 </div>
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
support/templates/support_admin_details_shortcodes_attendee.template.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
             <strong>[ESPRESSO_EVENT_ATTENDEES]</strong><br>
10 10
             <p class="description">
11 11
                 <?php _e(
12
-                    'With no parameters, this shows the attendees for the earliest active event, or if no active event, the earliest upcoming event.  If it is used in Event Description, then it will show the attendees for that event.',
13
-                    'event_espresso'
14
-                ); ?>
12
+					'With no parameters, this shows the attendees for the earliest active event, or if no active event, the earliest upcoming event.  If it is used in Event Description, then it will show the attendees for that event.',
13
+					'event_espresso'
14
+				); ?>
15 15
             </p>
16 16
             <br>
17 17
         </li>
@@ -40,18 +40,18 @@  discard block
 block discarded – undo
40 40
             <strong>[ESPRESSO_EVENT_ATTENDEES status=RAP]</strong><br>
41 41
             <p class="description">
42 42
                 <?php _e(
43
-                    'You can list attendees that have a specific registration status (use status code) or use "all" to return all attendees regardless of status.  Default when you don\'t have this parameter set is to only return attendees attached to approved contacts.',
44
-                    'event_espresso'
45
-                ); ?>
43
+					'You can list attendees that have a specific registration status (use status code) or use "all" to return all attendees regardless of status.  Default when you don\'t have this parameter set is to only return attendees attached to approved contacts.',
44
+					'event_espresso'
45
+				); ?>
46 46
             </p>
47 47
             <p>
48 48
                 <?php _e('The statuses you can use are:', 'event_espresso'); ?>
49 49
                 <br>
50 50
                 <?php
51
-                foreach (EEM_Registration::reg_status_array(array(), true) as $status_code => $status_label) {
52
-                    echo '<strong>' . $status_code . ':</strong>' . ' ' . $status_label . '<br>';
53
-                }
54
-                ?>
51
+				foreach (EEM_Registration::reg_status_array(array(), true) as $status_code => $status_label) {
52
+					echo '<strong>' . $status_code . ':</strong>' . ' ' . $status_label . '<br>';
53
+				}
54
+				?>
55 55
 
56 56
             </p>
57 57
             <br>
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
             <strong>[ESPRESSO_EVENT_ATTENDEES display_on_archives=true]</strong><br>
61 61
             <p class="description">
62 62
                 <?php _e(
63
-                    'Will display the attendees list when events are viewed on archive pages.',
64
-                    'event_espresso'
65
-                ); ?>
63
+					'Will display the attendees list when events are viewed on archive pages.',
64
+					'event_espresso'
65
+				); ?>
66 66
             </p>
67 67
             <br>
68 68
         </li>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                 <br>
50 50
                 <?php
51 51
                 foreach (EEM_Registration::reg_status_array(array(), true) as $status_code => $status_label) {
52
-                    echo '<strong>' . $status_code . ':</strong>' . ' ' . $status_label . '<br>';
52
+                    echo '<strong>'.$status_code.':</strong>'.' '.$status_label.'<br>';
53 53
                 }
54 54
                 ?>
55 55
 
Please login to merge, or discard this patch.
templates/support_admin_details_shortcodes_event_listings.template.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <div class="padding">
2 2
     <p>
3 3
         <?php esc_html_e(
4
-            'Displays a list of events based on a set of criteria on a WordPress page or post. Unless otherwise specified, events are sorted by start date.',
5
-            'event_espresso'
6
-        ); ?><?php echo sprintf(
7
-            esc_html__(
8
-                'For a full list of available shortcodes, please view the %sshortcode documentation%s on our website.',
9
-                'event_espresso'
10
-            ),
11
-            '<a href="https://eventespresso.com/wiki/ee4-shortcodes-template-variables/">',
12
-            '</a>'
13
-        ); ?>
4
+			'Displays a list of events based on a set of criteria on a WordPress page or post. Unless otherwise specified, events are sorted by start date.',
5
+			'event_espresso'
6
+		); ?><?php echo sprintf(
7
+			esc_html__(
8
+				'For a full list of available shortcodes, please view the %sshortcode documentation%s on our website.',
9
+				'event_espresso'
10
+			),
11
+			'<a href="https://eventespresso.com/wiki/ee4-shortcodes-template-variables/">',
12
+			'</a>'
13
+		); ?>
14 14
     </p>
15 15
     <ul>
16 16
         <li><strong><?php esc_html_e('Show a list of all of your events', 'event_espresso'); ?></strong><br/>
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
         </li>
22 22
         <li><strong>
23 23
                 <?php esc_html_e(
24
-                    'Don\'t display a title/heading before the event list',
25
-                    'event_espresso'
26
-                ); ?></strong><br/> [ESPRESSO_EVENTS show_title=false]
24
+					'Don\'t display a title/heading before the event list',
25
+					'event_espresso'
26
+				); ?></strong><br/> [ESPRESSO_EVENTS show_title=false]
27 27
         </li>
28 28
         <li><strong>
29 29
                 <?php esc_html_e(
30
-                    'Limit (paginate) the number of events that are shown in the event list on a page or post',
31
-                    'event_espresso'
32
-                ); ?></strong><br/>[ESPRESSO_EVENTS limit=5]
30
+					'Limit (paginate) the number of events that are shown in the event list on a page or post',
31
+					'event_espresso'
32
+				); ?></strong><br/>[ESPRESSO_EVENTS limit=5]
33 33
         </li>
34 34
         <li><strong>
35 35
                 <?php esc_html_e('Add a custom CSS class to each event post/article', 'event_espresso'); ?></strong><br/>
@@ -52,19 +52,19 @@  discard block
 block discarded – undo
52 52
         </li>
53 53
         <li><strong>
54 54
                 <?php esc_html_e(
55
-                    'Order the event list by a specific set of parameters (refer to available options below)',
56
-                    'event_espresso'
57
-                ); ?></strong><br/>[ESPRESSO_EVENTS order_by=start_date,id]
55
+					'Order the event list by a specific set of parameters (refer to available options below)',
56
+					'event_espresso'
57
+				); ?></strong><br/>[ESPRESSO_EVENTS order_by=start_date,id]
58 58
         </li>
59 59
     </ul>
60 60
     <p>
61 61
         <?php echo sprintf(
62
-            esc_html__(
63
-                'These parameters (options) are available for the %s shortcode parameter above. Multiple parameters should be separated by a comma.',
64
-                'event_espresso'
65
-            ),
66
-            'order_by'
67
-        ); ?>
62
+			esc_html__(
63
+				'These parameters (options) are available for the %s shortcode parameter above. Multiple parameters should be separated by a comma.',
64
+				'event_espresso'
65
+			),
66
+			'order_by'
67
+		); ?>
68 68
     </p>
69 69
     id<br/>
70 70
     start_date<br/>
Please login to merge, or discard this patch.
support/templates/support_admin_details_installation.template.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <div class="padding">
2 2
     <!-- <p><?php _e(
3
-        'Download the <a href="https://eventespresso.com/wp-content/plugins/download-monitor/download.php?id=2">Installation Guide</a> as a PDF',
4
-        'event_espresso'
5
-    ); ?></p> -->
3
+		'Download the <a href="https://eventespresso.com/wp-content/plugins/download-monitor/download.php?id=2">Installation Guide</a> as a PDF',
4
+		'event_espresso'
5
+	); ?></p> -->
6 6
     <p>
7 7
         <?php _e('For the latest installation instructions please visit:', 'event_espresso'); ?>
8 8
         <a href="https://eventespresso.com/wiki/installing-event-espresso/" target="_blank">https://eventespresso.com/wiki/installing-event-espresso/</a>
Please login to merge, or discard this patch.