Completed
Branch new-admin-design (7f58b2)
by
unknown
02:54
created
core/CPTs/EE_CPT_Default_Strategy.core.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -13,70 +13,70 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
 
16
-    /**
17
-     * $CPT - the current page, if it utilizes CPTs
18
-     *
19
-     * @var    object
20
-     * @access    protected
21
-     */
22
-    protected $CPT = null;
16
+	/**
17
+	 * $CPT - the current page, if it utilizes CPTs
18
+	 *
19
+	 * @var    object
20
+	 * @access    protected
21
+	 */
22
+	protected $CPT = null;
23 23
 
24 24
 
25
-    /**
26
-     *    class constructor
27
-     *
28
-     * @access    private
29
-     * @param    array $arguments
30
-     * @return    \EE_CPT_Default_Strategy
31
-     */
32
-    public function __construct($arguments = array())
33
-    {
34
-        $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null;
35
-    }
25
+	/**
26
+	 *    class constructor
27
+	 *
28
+	 * @access    private
29
+	 * @param    array $arguments
30
+	 * @return    \EE_CPT_Default_Strategy
31
+	 */
32
+	public function __construct($arguments = array())
33
+	{
34
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null;
35
+	}
36 36
 
37 37
 
38
-    /**
39
-     *    pre_get_posts
40
-     *
41
-     * @access    public
42
-     * @param    \WP_Query $WP_Query
43
-     * @return    \WP_Query
44
-     */
45
-    public function pre_get_posts(WP_Query $WP_Query)
46
-    {
47
-        if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) {
48
-            return $WP_Query;
49
-        }
50
-        return $WP_Query;
51
-    }
38
+	/**
39
+	 *    pre_get_posts
40
+	 *
41
+	 * @access    public
42
+	 * @param    \WP_Query $WP_Query
43
+	 * @return    \WP_Query
44
+	 */
45
+	public function pre_get_posts(WP_Query $WP_Query)
46
+	{
47
+		if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) {
48
+			return $WP_Query;
49
+		}
50
+		return $WP_Query;
51
+	}
52 52
 
53 53
 
54
-    /**
55
-     *    wp
56
-     *
57
-     * @access    public
58
-     * @param    \WP_Post[] $posts
59
-     * @param    \WP_Query  $WP_Query
60
-     * @return    \WP_Post[]
61
-     */
62
-    public function the_posts($posts, WP_Query $WP_Query)
63
-    {
64
-        return $posts;
65
-    }
54
+	/**
55
+	 *    wp
56
+	 *
57
+	 * @access    public
58
+	 * @param    \WP_Post[] $posts
59
+	 * @param    \WP_Query  $WP_Query
60
+	 * @return    \WP_Post[]
61
+	 */
62
+	public function the_posts($posts, WP_Query $WP_Query)
63
+	{
64
+		return $posts;
65
+	}
66 66
 
67 67
 
68
-    /**
69
-     *    get_EE_post_type_metadata
70
-     *
71
-     * @access    public
72
-     * @param mixed     $meta_value
73
-     * @param    int    $post_id
74
-     * @param    string $meta_key
75
-     * @param    string $single
76
-     * @return    mixed
77
-     */
78
-    public function get_EE_post_type_metadata($meta_value = null, $post_id, $meta_key, $single)
79
-    {
80
-        return $meta_value;
81
-    }
68
+	/**
69
+	 *    get_EE_post_type_metadata
70
+	 *
71
+	 * @access    public
72
+	 * @param mixed     $meta_value
73
+	 * @param    int    $post_id
74
+	 * @param    string $meta_key
75
+	 * @param    string $single
76
+	 * @return    mixed
77
+	 */
78
+	public function get_EE_post_type_metadata($meta_value = null, $post_id, $meta_key, $single)
79
+	{
80
+		return $meta_value;
81
+	}
82 82
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function pre_get_posts(WP_Query $WP_Query)
46 46
     {
47
-        if (! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) {
47
+        if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) {
48 48
             return $WP_Query;
49 49
         }
50 50
         return $WP_Query;
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Attendee_Strategy.core.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -24,39 +24,39 @@
 block discarded – undo
24 24
 class EE_CPT_Attendee_Strategy
25 25
 {
26 26
 
27
-    /**
28
-     * $CPT - the current page, if it utilizes CPTs
29
-     *
30
-     * @var    array
31
-     * @access    protected
32
-     */
33
-    protected $CPT = null;
27
+	/**
28
+	 * $CPT - the current page, if it utilizes CPTs
29
+	 *
30
+	 * @var    array
31
+	 * @access    protected
32
+	 */
33
+	protected $CPT = null;
34 34
 
35 35
 
36
-    /**
37
-     *    class constructor
38
-     *
39
-     * @access    public
40
-     * @param    array $arguments
41
-     * @return \EE_CPT_Attendee_Strategy
42
-     */
43
-    public function __construct($arguments = array())
44
-    {
45
-        $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null;
46
-        $WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : null;
47
-    }
36
+	/**
37
+	 *    class constructor
38
+	 *
39
+	 * @access    public
40
+	 * @param    array $arguments
41
+	 * @return \EE_CPT_Attendee_Strategy
42
+	 */
43
+	public function __construct($arguments = array())
44
+	{
45
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null;
46
+		$WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : null;
47
+	}
48 48
 
49 49
 
50
-    /**
51
-     *    the_posts
52
-     *
53
-     * @access    public
54
-     * @param          $posts
55
-     * @param WP_Query $wp_query
56
-     * @return    void
57
-     */
58
-    public function the_posts($posts, WP_Query $wp_query)
59
-    {
60
-        return $posts;
61
-    }
50
+	/**
51
+	 *    the_posts
52
+	 *
53
+	 * @access    public
54
+	 * @param          $posts
55
+	 * @param WP_Query $wp_query
56
+	 * @return    void
57
+	 */
58
+	public function the_posts($posts, WP_Query $wp_query)
59
+	{
60
+		return $posts;
61
+	}
62 62
 }
Please login to merge, or discard this patch.
modules/invalid_checkout_access/EED_Invalid_Checkout_Access.module.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     public static function getInvalidCheckoutAccess()
62 62
     {
63
-        if (! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
63
+        if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
64 64
             self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
65 65
         }
66 66
         return self::$invalid_checkout_access_form;
Please login to merge, or discard this patch.
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -13,84 +13,84 @@
 block discarded – undo
13 13
 class EED_Invalid_Checkout_Access extends EED_Module
14 14
 {
15 15
 
16
-    /**
17
-     * @var InvalidCheckoutAccess $invalid_checkout_access_form
18
-     */
19
-    private static $invalid_checkout_access_form;
16
+	/**
17
+	 * @var InvalidCheckoutAccess $invalid_checkout_access_form
18
+	 */
19
+	private static $invalid_checkout_access_form;
20 20
 
21
-    /**
22
-     * set_hooks - for hooking into EE Core, other modules, etc
23
-     */
24
-    public static function set_hooks()
25
-    {
26
-    }
21
+	/**
22
+	 * set_hooks - for hooking into EE Core, other modules, etc
23
+	 */
24
+	public static function set_hooks()
25
+	{
26
+	}
27 27
 
28 28
 
29
-    /**
30
-     * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
31
-     */
32
-    public static function set_hooks_admin()
33
-    {
34
-        add_action(
35
-            'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
36
-            array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
37
-            15
38
-        );
39
-        add_filter(
40
-            'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
41
-            array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
42
-        );
43
-    }
29
+	/**
30
+	 * set_hooks_admin - for hooking into EE Admin Core, other modules, etc
31
+	 */
32
+	public static function set_hooks_admin()
33
+	{
34
+		add_action(
35
+			'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
36
+			array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
37
+			15
38
+		);
39
+		add_filter(
40
+			'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
41
+			array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
42
+		);
43
+	}
44 44
 
45 45
 
46
-    /**
47
-     * run - initial module setup
48
-     * this method is primarily used for activating resources in the EE_Front_Controller thru the use of filters
49
-     *
50
-     * @var WP $WP
51
-     */
52
-    public function run($WP)
53
-    {
54
-        // TODO: Implement run() method.
55
-    }
46
+	/**
47
+	 * run - initial module setup
48
+	 * this method is primarily used for activating resources in the EE_Front_Controller thru the use of filters
49
+	 *
50
+	 * @var WP $WP
51
+	 */
52
+	public function run($WP)
53
+	{
54
+		// TODO: Implement run() method.
55
+	}
56 56
 
57 57
 
58
-    /**
59
-     * @return InvalidCheckoutAccess
60
-     */
61
-    public static function getInvalidCheckoutAccess()
62
-    {
63
-        if (! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
64
-            self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
65
-        }
66
-        return self::$invalid_checkout_access_form;
67
-    }
58
+	/**
59
+	 * @return InvalidCheckoutAccess
60
+	 */
61
+	public static function getInvalidCheckoutAccess()
62
+	{
63
+		if (! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
64
+			self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
65
+		}
66
+		return self::$invalid_checkout_access_form;
67
+	}
68 68
 
69 69
 
70
-    /**
71
-     * email_validation_settings_form
72
-     *
73
-     * @return    void
74
-     * @throws EE_Error
75
-     */
76
-    public static function display_invalid_checkout_access_form()
77
-    {
78
-        $invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
79
-        echo $invalid_checkout_access_form->getForm()->get_html(); // already escaped
80
-    }
70
+	/**
71
+	 * email_validation_settings_form
72
+	 *
73
+	 * @return    void
74
+	 * @throws EE_Error
75
+	 */
76
+	public static function display_invalid_checkout_access_form()
77
+	{
78
+		$invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
79
+		echo $invalid_checkout_access_form->getForm()->get_html(); // already escaped
80
+	}
81 81
 
82 82
 
83
-    /**
84
-     * email_validation_settings_form
85
-     *
86
-     * @param EE_Registration_Config $EE_Registration_Config
87
-     * @return EE_Registration_Config
88
-     * @throws EE_Error
89
-     * @throws ReflectionException
90
-     */
91
-    public static function process_invalid_checkout_access_form(EE_Registration_Config $EE_Registration_Config)
92
-    {
93
-        $invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
94
-        return $invalid_checkout_access_form->processForm($EE_Registration_Config);
95
-    }
83
+	/**
84
+	 * email_validation_settings_form
85
+	 *
86
+	 * @param EE_Registration_Config $EE_Registration_Config
87
+	 * @return EE_Registration_Config
88
+	 * @throws EE_Error
89
+	 * @throws ReflectionException
90
+	 */
91
+	public static function process_invalid_checkout_access_form(EE_Registration_Config $EE_Registration_Config)
92
+	{
93
+		$invalid_checkout_access_form = EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
94
+		return $invalid_checkout_access_form->processForm($EE_Registration_Config);
95
+	}
96 96
 }
Please login to merge, or discard this patch.
modules/csv/EED_Csv.module.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -12,69 +12,69 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    /**
16
-     * @return EED_Csv
17
-     */
18
-    public static function instance()
19
-    {
20
-        return parent::get_instance(__CLASS__);
21
-    }
15
+	/**
16
+	 * @return EED_Csv
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
-     *    export
58
-     *
59
-     * @access    public
60
-     * @return    void
61
-     */
62
-    public function export()
63
-    {
64
-        $Export = EE_Registry::instance()->load_class('Export');
65
-        $Export->export();
66
-    }
56
+	/**
57
+	 *    export
58
+	 *
59
+	 * @access    public
60
+	 * @return    void
61
+	 */
62
+	public function export()
63
+	{
64
+		$Export = EE_Registry::instance()->load_class('Export');
65
+		$Export->export();
66
+	}
67 67
 
68 68
 
69
-    /**
70
-     *    import
71
-     *
72
-     * @access    public
73
-     * @return    void
74
-     */
75
-    public function import()
76
-    {
77
-        $Import = EE_Registry::instance()->load_class('Import');
78
-        $Import->import();
79
-    }
69
+	/**
70
+	 *    import
71
+	 *
72
+	 * @access    public
73
+	 * @return    void
74
+	 */
75
+	public function import()
76
+	{
77
+		$Import = EE_Registry::instance()->load_class('Import');
78
+		$Import->import();
79
+	}
80 80
 }
Please login to merge, or discard this patch.
Paypal_Standard/templates/paypal_standard_intro.template.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@
 block discarded – undo
3 3
 // if this is decaf, which is put on WordPress.org, we need to inform users that
4 4
 // we just put an affiliate link there. See https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/ section 12
5 5
 if (apply_filters('FHEE__ee_show_affiliate_links', true)) {
6
-    $closing_tag .= esc_html__(' (affiliate link)', 'event_espresso');
6
+	$closing_tag .= esc_html__(' (affiliate link)', 'event_espresso');
7 7
 }
8 8
 printf(
9
-    esc_html__(
10
-        'PayPal Standard (PayPal Payments Standard) is an off-site payment method and is available to event organizers in many countries. A PayPal premier or business account is needed to accept payments. Need a PayPal account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.',
11
-        'event_espresso'
12
-    ),
13
-    '<a href="https://eventespresso.com/go/paypalstandard/" target="_blank">',
14
-    $closing_tag
9
+	esc_html__(
10
+		'PayPal Standard (PayPal Payments Standard) is an off-site payment method and is available to event organizers in many countries. A PayPal premier or business account is needed to accept payments. Need a PayPal account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.',
11
+		'event_espresso'
12
+	),
13
+	'<a href="https://eventespresso.com/go/paypalstandard/" target="_blank">',
14
+	$closing_tag
15 15
 );
Please login to merge, or discard this patch.
caffeinated/admin/new/tickets/Tickets_Admin_Page.core.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $limit = array($offset, $per_page);
217 217
 
218 218
         if (isset($this->_req_data['s'])) {
219
-            $sstr = '%' . $this->_req_data['s'] . '%';
219
+            $sstr = '%'.$this->_req_data['s'].'%';
220 220
             $_where['OR'] = array(
221 221
                 'TKT_name'        => array('LIKE', $sstr),
222 222
                 'TKT_description' => array('LIKE', $sstr),
@@ -245,18 +245,18 @@  discard block
 block discarded – undo
245 245
         $TKT = EEM_Ticket::instance();
246 246
 
247 247
         // checkboxes?
248
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
248
+        if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
249 249
             // if array has more than one element then success message should be plural
250 250
             $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
251 251
 
252 252
             // cycle thru the boxes
253 253
             while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
254 254
                 if ($trash) {
255
-                    if (! $TKT->delete_by_ID($TKT_ID)) {
255
+                    if ( ! $TKT->delete_by_ID($TKT_ID)) {
256 256
                         $success = 0;
257 257
                     }
258 258
                 } else {
259
-                    if (! $TKT->restore_by_ID($TKT_ID)) {
259
+                    if ( ! $TKT->restore_by_ID($TKT_ID)) {
260 260
                         $success = 0;
261 261
                     }
262 262
                 }
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
             $TKT_ID = absint($this->_req_data['TKT_ID']);
267 267
 
268 268
             if ($trash) {
269
-                if (! $TKT->delete_by_ID($TKT_ID)) {
269
+                if ( ! $TKT->delete_by_ID($TKT_ID)) {
270 270
                     $success = 0;
271 271
                 }
272 272
             } else {
273
-                if (! $TKT->restore_by_ID($TKT_ID)) {
273
+                if ( ! $TKT->restore_by_ID($TKT_ID)) {
274 274
                     $success = 0;
275 275
                 }
276 276
             }
@@ -288,21 +288,21 @@  discard block
 block discarded – undo
288 288
         $TKT = EEM_Ticket::instance();
289 289
 
290 290
         // checkboxes?
291
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
291
+        if ( ! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
292 292
             // if array has more than one element then success message should be plural
293 293
             $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
294 294
 
295 295
             // cycle thru the boxes
296 296
             while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
297 297
                 // delete
298
-                if (! $this->_delete_the_ticket($TKT_ID)) {
298
+                if ( ! $this->_delete_the_ticket($TKT_ID)) {
299 299
                     $success = 0;
300 300
                 }
301 301
             }
302 302
         } else {
303 303
             // grab single id and trash
304 304
             $TKT_ID = absint($this->_req_data['TKT_ID']);
305
-            if (! $this->_delete_the_ticket($TKT_ID)) {
305
+            if ( ! $this->_delete_the_ticket($TKT_ID)) {
306 306
                 $success = 0;
307 307
             }
308 308
         }
Please login to merge, or discard this patch.
Indentation   +308 added lines, -308 removed lines patch added patch discarded remove patch
@@ -13,312 +13,312 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
 
16
-    protected function _init_page_props()
17
-    {
18
-        $this->page_slug = TICKETS_PG_SLUG;
19
-        $this->page_label = TICKETS_LABEL;
20
-        $this->_admin_base_url = TICKETS_ADMIN_URL;
21
-        $this->_admin_base_path = TICKETS_ADMIN;
22
-    }
23
-
24
-
25
-    protected function _ajax_hooks()
26
-    {
27
-    }
28
-
29
-
30
-    protected function _define_page_props()
31
-    {
32
-        $this->_admin_page_title = TICKETS_LABEL;
33
-        $this->_labels = array(
34
-            'buttons' => array(
35
-                'add'    => esc_html__('Add New Default Ticket', 'event_espresso'),
36
-                'edit'   => esc_html__('Edit Default Ticket', 'event_espresso'),
37
-                'delete' => esc_html__('Delete Default Ticket', 'event_espresso'),
38
-            ),
39
-        );
40
-    }
41
-
42
-
43
-    protected function _set_page_routes()
44
-    {
45
-
46
-        $tkt_id = ! empty($this->_req_data['TKT_ID']) && ! is_array($this->_req_data['TKT_ID'])
47
-            ? $this->_req_data['TKT_ID'] : 0;
48
-
49
-        $this->_page_routes = array(
50
-            'default'         => array(
51
-                'func'       => '_tickets_overview_list_table',
52
-                'capability' => 'ee_read_default_tickets',
53
-            ),
54
-            'trash_ticket'    => array(
55
-                'func'       => '_trash_or_restore_ticket',
56
-                'noheader'   => true,
57
-                'args'       => array('trash' => true),
58
-                'capability' => 'ee_delete_default_ticket',
59
-                'obj_id'     => $tkt_id,
60
-            ),
61
-            'trash_tickets'   => array(
62
-                'func'       => '_trash_or_restore_ticket',
63
-                'noheader'   => true,
64
-                'args'       => array('trash' => true),
65
-                'capability' => 'ee_delete_default_tickets',
66
-            ),
67
-            'restore_ticket'  => array(
68
-                'func'       => '_trash_or_restore_ticket',
69
-                'noheader'   => true,
70
-                'capability' => 'ee_delete_default_ticket',
71
-                'obj_id'     => $tkt_id,
72
-            ),
73
-            'restore_tickets' => array(
74
-                'func'       => '_trash_or_restore_ticket',
75
-                'noheader'   => true,
76
-                'capability' => 'ee_delete_default_tickets',
77
-            ),
78
-            'delete_ticket'   => array(
79
-                'func'       => '_delete_ticket',
80
-                'noheader'   => true,
81
-                'capability' => 'ee_delete_default_ticket',
82
-                'obj_id'     => $tkt_id,
83
-            ),
84
-            'delete_tickets'  => array(
85
-                'func'       => '_delete_ticket',
86
-                'noheader'   => true,
87
-                'capability' => 'ee_delete_default_tickets',
88
-            ),
89
-        );
90
-    }
91
-
92
-
93
-    protected function _set_page_config()
94
-    {
95
-        $this->_page_config = array(
96
-            'default' => array(
97
-                'nav'           => array(
98
-                    'label' => esc_html__('Default Tickets', 'event_espresso'),
99
-                    'order' => 10,
100
-                ),
101
-                'list_table'    => 'Tickets_List_Table',
102
-                'require_nonce' => false,
103
-            ),
104
-        );
105
-    }
106
-
107
-
108
-    protected function _add_screen_options()
109
-    {
110
-    }
111
-
112
-    protected function _add_screen_options_default()
113
-    {
114
-        $this->_per_page_screen_option();
115
-    }
116
-
117
-
118
-    protected function _add_feature_pointers()
119
-    {
120
-    }
121
-
122
-    public function load_scripts_styles()
123
-    {
124
-    }
125
-
126
-    public function load_scripts_styles_default()
127
-    {
128
-    }
129
-
130
-    public function admin_footer_scripts()
131
-    {
132
-    }
133
-
134
-    public function admin_init()
135
-    {
136
-    }
137
-
138
-    public function admin_notices()
139
-    {
140
-    }
141
-
142
-
143
-    public function _set_list_table_views_default()
144
-    {
145
-        $this->_views = array(
146
-            'all'     => array(
147
-                'slug'        => 'all',
148
-                'label'       => esc_html__('All', 'event_espresso'),
149
-                'count'       => 0,
150
-                'bulk_action' => array(
151
-                    'trash_tickets' => esc_html__('Move to Trash', 'event_espresso'),
152
-                ),
153
-            ),
154
-            'trashed' => array(
155
-                'slug'        => 'trashed',
156
-                'label'       => esc_html__('Trash', 'event_espresso'),
157
-                'count'       => 0,
158
-                'bulk_action' => array(
159
-                    'restore_tickets' => esc_html__('Restore from Trash', 'event_espresso'),
160
-                    'delete_tickets'  => esc_html__('Delete Permanently', 'event_espresso'),
161
-                ),
162
-            ),
163
-        );
164
-    }
165
-
166
-
167
-    public function _tickets_overview_list_table()
168
-    {
169
-        $this->_search_btn_label = esc_html__('Tickets', 'event_espresso');
170
-        $this->display_admin_list_table_page_with_no_sidebar();
171
-    }
172
-
173
-
174
-    public function get_default_tickets($per_page = 10, $count = false, $trashed = false)
175
-    {
176
-
177
-        $orderby = empty($this->_req_data['orderby']) ? 'TKT_name' : $this->_req_data['orderby'];
178
-        $order = empty($this->_req_data['order']) ? 'ASC' : $order;
179
-
180
-        switch ($orderby) {
181
-            case 'TKT_name':
182
-                $orderby = array('TKT_name' => $order);
183
-                break;
184
-
185
-            case 'TKT_price':
186
-                $orderby = array('TKT_price' => $order);
187
-                break;
188
-
189
-            case 'TKT_uses':
190
-                $orderby = array('TKT_uses' => $order);
191
-                break;
192
-
193
-            case 'TKT_min':
194
-                $orderby = array('TKT_min' => $order);
195
-                break;
196
-
197
-            case 'TKT_max':
198
-                $orderby = array('TKT_max' => $order);
199
-                break;
200
-
201
-            case 'TKT_qty':
202
-                $orderby = array('TKT_qty' => $order);
203
-                break;
204
-        }
205
-
206
-        $current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged'])
207
-            ? $this->_req_data['paged'] : 1;
208
-        $per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage'])
209
-            ? $this->_req_data['perpage'] : $per_page;
210
-
211
-        $_where = array(
212
-            'TKT_is_default' => 1,
213
-            'TKT_deleted'    => $trashed,
214
-        );
215
-
216
-        $offset = ($current_page - 1) * $per_page;
217
-        $limit = array($offset, $per_page);
218
-
219
-        if (isset($this->_req_data['s'])) {
220
-            $sstr = '%' . $this->_req_data['s'] . '%';
221
-            $_where['OR'] = array(
222
-                'TKT_name'        => array('LIKE', $sstr),
223
-                'TKT_description' => array('LIKE', $sstr),
224
-            );
225
-        }
226
-
227
-        $query_params = array(
228
-            $_where,
229
-            'order_by' => $orderby,
230
-            'limit'    => $limit,
231
-            'group_by' => 'TKT_ID',
232
-        );
233
-
234
-        if ($count) {
235
-            return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where));
236
-        } else {
237
-            return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params);
238
-        }
239
-    }
240
-
241
-
242
-    protected function _trash_or_restore_ticket($trash = false)
243
-    {
244
-        $success = 1;
245
-
246
-        $TKT = EEM_Ticket::instance();
247
-
248
-        // checkboxes?
249
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
250
-            // if array has more than one element then success message should be plural
251
-            $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
252
-
253
-            // cycle thru the boxes
254
-            while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
255
-                if ($trash) {
256
-                    if (! $TKT->delete_by_ID($TKT_ID)) {
257
-                        $success = 0;
258
-                    }
259
-                } else {
260
-                    if (! $TKT->restore_by_ID($TKT_ID)) {
261
-                        $success = 0;
262
-                    }
263
-                }
264
-            }
265
-        } else {
266
-            // grab single id and trash
267
-            $TKT_ID = absint($this->_req_data['TKT_ID']);
268
-
269
-            if ($trash) {
270
-                if (! $TKT->delete_by_ID($TKT_ID)) {
271
-                    $success = 0;
272
-                }
273
-            } else {
274
-                if (! $TKT->restore_by_ID($TKT_ID)) {
275
-                    $success = 0;
276
-                }
277
-            }
278
-        }
279
-
280
-        $action_desc = $trash ? 'moved to the trash' : 'restored';
281
-        $this->_redirect_after_action($success, 'Tickets', $action_desc, array());
282
-    }
283
-
284
-
285
-    protected function _delete_ticket()
286
-    {
287
-        $success = 1;
288
-
289
-        $TKT = EEM_Ticket::instance();
290
-
291
-        // checkboxes?
292
-        if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
293
-            // if array has more than one element then success message should be plural
294
-            $success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
295
-
296
-            // cycle thru the boxes
297
-            while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
298
-                // delete
299
-                if (! $this->_delete_the_ticket($TKT_ID)) {
300
-                    $success = 0;
301
-                }
302
-            }
303
-        } else {
304
-            // grab single id and trash
305
-            $TKT_ID = absint($this->_req_data['TKT_ID']);
306
-            if (! $this->_delete_the_ticket($TKT_ID)) {
307
-                $success = 0;
308
-            }
309
-        }
310
-
311
-        $action_desc = 'deleted';
312
-        $this->_redirect_after_action($success, 'Tickets', $action_desc, array());
313
-    }
314
-
315
-
316
-    protected function _delete_the_ticket($TKT_ID)
317
-    {
318
-        $tkt = EEM_Ticket::instance()->get_one_by_ID($TKT_ID);
319
-
320
-        // delete all related prices first
321
-        $tkt->delete_related_permanently('Price');
322
-        return $tkt->delete_permanently();
323
-    }
16
+	protected function _init_page_props()
17
+	{
18
+		$this->page_slug = TICKETS_PG_SLUG;
19
+		$this->page_label = TICKETS_LABEL;
20
+		$this->_admin_base_url = TICKETS_ADMIN_URL;
21
+		$this->_admin_base_path = TICKETS_ADMIN;
22
+	}
23
+
24
+
25
+	protected function _ajax_hooks()
26
+	{
27
+	}
28
+
29
+
30
+	protected function _define_page_props()
31
+	{
32
+		$this->_admin_page_title = TICKETS_LABEL;
33
+		$this->_labels = array(
34
+			'buttons' => array(
35
+				'add'    => esc_html__('Add New Default Ticket', 'event_espresso'),
36
+				'edit'   => esc_html__('Edit Default Ticket', 'event_espresso'),
37
+				'delete' => esc_html__('Delete Default Ticket', 'event_espresso'),
38
+			),
39
+		);
40
+	}
41
+
42
+
43
+	protected function _set_page_routes()
44
+	{
45
+
46
+		$tkt_id = ! empty($this->_req_data['TKT_ID']) && ! is_array($this->_req_data['TKT_ID'])
47
+			? $this->_req_data['TKT_ID'] : 0;
48
+
49
+		$this->_page_routes = array(
50
+			'default'         => array(
51
+				'func'       => '_tickets_overview_list_table',
52
+				'capability' => 'ee_read_default_tickets',
53
+			),
54
+			'trash_ticket'    => array(
55
+				'func'       => '_trash_or_restore_ticket',
56
+				'noheader'   => true,
57
+				'args'       => array('trash' => true),
58
+				'capability' => 'ee_delete_default_ticket',
59
+				'obj_id'     => $tkt_id,
60
+			),
61
+			'trash_tickets'   => array(
62
+				'func'       => '_trash_or_restore_ticket',
63
+				'noheader'   => true,
64
+				'args'       => array('trash' => true),
65
+				'capability' => 'ee_delete_default_tickets',
66
+			),
67
+			'restore_ticket'  => array(
68
+				'func'       => '_trash_or_restore_ticket',
69
+				'noheader'   => true,
70
+				'capability' => 'ee_delete_default_ticket',
71
+				'obj_id'     => $tkt_id,
72
+			),
73
+			'restore_tickets' => array(
74
+				'func'       => '_trash_or_restore_ticket',
75
+				'noheader'   => true,
76
+				'capability' => 'ee_delete_default_tickets',
77
+			),
78
+			'delete_ticket'   => array(
79
+				'func'       => '_delete_ticket',
80
+				'noheader'   => true,
81
+				'capability' => 'ee_delete_default_ticket',
82
+				'obj_id'     => $tkt_id,
83
+			),
84
+			'delete_tickets'  => array(
85
+				'func'       => '_delete_ticket',
86
+				'noheader'   => true,
87
+				'capability' => 'ee_delete_default_tickets',
88
+			),
89
+		);
90
+	}
91
+
92
+
93
+	protected function _set_page_config()
94
+	{
95
+		$this->_page_config = array(
96
+			'default' => array(
97
+				'nav'           => array(
98
+					'label' => esc_html__('Default Tickets', 'event_espresso'),
99
+					'order' => 10,
100
+				),
101
+				'list_table'    => 'Tickets_List_Table',
102
+				'require_nonce' => false,
103
+			),
104
+		);
105
+	}
106
+
107
+
108
+	protected function _add_screen_options()
109
+	{
110
+	}
111
+
112
+	protected function _add_screen_options_default()
113
+	{
114
+		$this->_per_page_screen_option();
115
+	}
116
+
117
+
118
+	protected function _add_feature_pointers()
119
+	{
120
+	}
121
+
122
+	public function load_scripts_styles()
123
+	{
124
+	}
125
+
126
+	public function load_scripts_styles_default()
127
+	{
128
+	}
129
+
130
+	public function admin_footer_scripts()
131
+	{
132
+	}
133
+
134
+	public function admin_init()
135
+	{
136
+	}
137
+
138
+	public function admin_notices()
139
+	{
140
+	}
141
+
142
+
143
+	public function _set_list_table_views_default()
144
+	{
145
+		$this->_views = array(
146
+			'all'     => array(
147
+				'slug'        => 'all',
148
+				'label'       => esc_html__('All', 'event_espresso'),
149
+				'count'       => 0,
150
+				'bulk_action' => array(
151
+					'trash_tickets' => esc_html__('Move to Trash', 'event_espresso'),
152
+				),
153
+			),
154
+			'trashed' => array(
155
+				'slug'        => 'trashed',
156
+				'label'       => esc_html__('Trash', 'event_espresso'),
157
+				'count'       => 0,
158
+				'bulk_action' => array(
159
+					'restore_tickets' => esc_html__('Restore from Trash', 'event_espresso'),
160
+					'delete_tickets'  => esc_html__('Delete Permanently', 'event_espresso'),
161
+				),
162
+			),
163
+		);
164
+	}
165
+
166
+
167
+	public function _tickets_overview_list_table()
168
+	{
169
+		$this->_search_btn_label = esc_html__('Tickets', 'event_espresso');
170
+		$this->display_admin_list_table_page_with_no_sidebar();
171
+	}
172
+
173
+
174
+	public function get_default_tickets($per_page = 10, $count = false, $trashed = false)
175
+	{
176
+
177
+		$orderby = empty($this->_req_data['orderby']) ? 'TKT_name' : $this->_req_data['orderby'];
178
+		$order = empty($this->_req_data['order']) ? 'ASC' : $order;
179
+
180
+		switch ($orderby) {
181
+			case 'TKT_name':
182
+				$orderby = array('TKT_name' => $order);
183
+				break;
184
+
185
+			case 'TKT_price':
186
+				$orderby = array('TKT_price' => $order);
187
+				break;
188
+
189
+			case 'TKT_uses':
190
+				$orderby = array('TKT_uses' => $order);
191
+				break;
192
+
193
+			case 'TKT_min':
194
+				$orderby = array('TKT_min' => $order);
195
+				break;
196
+
197
+			case 'TKT_max':
198
+				$orderby = array('TKT_max' => $order);
199
+				break;
200
+
201
+			case 'TKT_qty':
202
+				$orderby = array('TKT_qty' => $order);
203
+				break;
204
+		}
205
+
206
+		$current_page = isset($this->_req_data['paged']) && ! empty($this->_req_data['paged'])
207
+			? $this->_req_data['paged'] : 1;
208
+		$per_page = isset($this->_req_data['perpage']) && ! empty($this->_req_data['perpage'])
209
+			? $this->_req_data['perpage'] : $per_page;
210
+
211
+		$_where = array(
212
+			'TKT_is_default' => 1,
213
+			'TKT_deleted'    => $trashed,
214
+		);
215
+
216
+		$offset = ($current_page - 1) * $per_page;
217
+		$limit = array($offset, $per_page);
218
+
219
+		if (isset($this->_req_data['s'])) {
220
+			$sstr = '%' . $this->_req_data['s'] . '%';
221
+			$_where['OR'] = array(
222
+				'TKT_name'        => array('LIKE', $sstr),
223
+				'TKT_description' => array('LIKE', $sstr),
224
+			);
225
+		}
226
+
227
+		$query_params = array(
228
+			$_where,
229
+			'order_by' => $orderby,
230
+			'limit'    => $limit,
231
+			'group_by' => 'TKT_ID',
232
+		);
233
+
234
+		if ($count) {
235
+			return EEM_Ticket::instance()->count_deleted_and_undeleted(array($_where));
236
+		} else {
237
+			return EEM_Ticket::instance()->get_all_deleted_and_undeleted($query_params);
238
+		}
239
+	}
240
+
241
+
242
+	protected function _trash_or_restore_ticket($trash = false)
243
+	{
244
+		$success = 1;
245
+
246
+		$TKT = EEM_Ticket::instance();
247
+
248
+		// checkboxes?
249
+		if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
250
+			// if array has more than one element then success message should be plural
251
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
252
+
253
+			// cycle thru the boxes
254
+			while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
255
+				if ($trash) {
256
+					if (! $TKT->delete_by_ID($TKT_ID)) {
257
+						$success = 0;
258
+					}
259
+				} else {
260
+					if (! $TKT->restore_by_ID($TKT_ID)) {
261
+						$success = 0;
262
+					}
263
+				}
264
+			}
265
+		} else {
266
+			// grab single id and trash
267
+			$TKT_ID = absint($this->_req_data['TKT_ID']);
268
+
269
+			if ($trash) {
270
+				if (! $TKT->delete_by_ID($TKT_ID)) {
271
+					$success = 0;
272
+				}
273
+			} else {
274
+				if (! $TKT->restore_by_ID($TKT_ID)) {
275
+					$success = 0;
276
+				}
277
+			}
278
+		}
279
+
280
+		$action_desc = $trash ? 'moved to the trash' : 'restored';
281
+		$this->_redirect_after_action($success, 'Tickets', $action_desc, array());
282
+	}
283
+
284
+
285
+	protected function _delete_ticket()
286
+	{
287
+		$success = 1;
288
+
289
+		$TKT = EEM_Ticket::instance();
290
+
291
+		// checkboxes?
292
+		if (! empty($this->_req_data['checkbox']) && is_array($this->_req_data['checkbox'])) {
293
+			// if array has more than one element then success message should be plural
294
+			$success = count($this->_req_data['checkbox']) > 1 ? 2 : 1;
295
+
296
+			// cycle thru the boxes
297
+			while (list($TKT_ID, $value) = each($this->_req_data['checkbox'])) {
298
+				// delete
299
+				if (! $this->_delete_the_ticket($TKT_ID)) {
300
+					$success = 0;
301
+				}
302
+			}
303
+		} else {
304
+			// grab single id and trash
305
+			$TKT_ID = absint($this->_req_data['TKT_ID']);
306
+			if (! $this->_delete_the_ticket($TKT_ID)) {
307
+				$success = 0;
308
+			}
309
+		}
310
+
311
+		$action_desc = 'deleted';
312
+		$this->_redirect_after_action($success, 'Tickets', $action_desc, array());
313
+	}
314
+
315
+
316
+	protected function _delete_the_ticket($TKT_ID)
317
+	{
318
+		$tkt = EEM_Ticket::instance()->get_one_by_ID($TKT_ID);
319
+
320
+		// delete all related prices first
321
+		$tkt->delete_related_permanently('Price');
322
+		return $tkt->delete_permanently();
323
+	}
324 324
 }
Please login to merge, or discard this patch.
admin/extend/support/templates/support_admin_details_faq.template.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@
 block discarded – undo
4 4
     <h4><?php esc_html_e('New to Event Espresso?', 'event_espresso'); ?></h4>
5 5
 
6 6
     <p><?php
7
-        printf(
8
-            esc_html__(
9
-                'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.',
10
-                'event_espresso'
11
-            ),
12
-            '<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">',
13
-            '</a>',
14
-            '<em>',
15
-            '</em>'
16
-        ); ?></p>
7
+		printf(
8
+			esc_html__(
9
+				'Check out the %1$squick start guide for Event Espresso 4%2$s. It has recommendations, tips, and tutorials so you can get your project started %3$squicker%4$s.',
10
+				'event_espresso'
11
+			),
12
+			'<a href="https://eventespresso.com/wiki/welcome-to-event-espresso/#event-espresso-4" target="_blank">',
13
+			'</a>',
14
+			'<em>',
15
+			'</em>'
16
+		); ?></p>
17 17
 </div>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
caffeinated/admin/extend/messages/Extend_Messages_Admin_Page.core.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
     public function __construct($routing = true)
22 22
     {
23 23
         parent::__construct($routing);
24
-        if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
-            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
-            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
-            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
-            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
24
+        if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
+            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/');
26
+            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/');
27
+            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/');
28
+            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/');
29 29
         }
30 30
     }
31 31
 
32 32
     protected function _extend_page_config()
33 33
     {
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
34
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages';
35 35
         $this->_page_routes['custom_mtps'] = array(
36 36
             'func'       => '_ee_custom_messages_overview_list_table',
37 37
             'capability' => 'ee_read_messages',
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
     {
77 77
         global $admin_page_hooks;
78 78
 
79
-        if (! empty($admin_page_hooks['espresso_events'])) {
79
+        if ( ! empty($admin_page_hooks['espresso_events'])) {
80 80
             // we're on a EE specific page... good stuff!
81 81
             $hook_prefix = $admin_page_hooks['espresso_events'];
82
-            $filter_ref = $hook_prefix . '_page_' . $this->page_slug;
83
-            add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
82
+            $filter_ref = $hook_prefix.'_page_'.$this->page_slug;
83
+            add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
84 84
             add_action(
85
-                'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
+                'AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref,
86 86
                 array($this, 'custom_mtp_create_button_column'),
87 87
                 10,
88 88
                 2
Please login to merge, or discard this patch.
Indentation   +186 added lines, -186 removed lines patch added patch discarded remove patch
@@ -18,190 +18,190 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    public function __construct($routing = true)
22
-    {
23
-        parent::__construct($routing);
24
-        if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
-            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
-            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
-            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
-            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
29
-        }
30
-    }
31
-
32
-    protected function _extend_page_config()
33
-    {
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
35
-        $this->_page_routes['custom_mtps'] = array(
36
-            'func'       => '_ee_custom_messages_overview_list_table',
37
-            'capability' => 'ee_read_messages',
38
-        );
39
-        $this->_page_config['custom_mtps'] = array(
40
-            'nav'           => array(
41
-                'label' => esc_html__('Custom Message Templates', 'event_espresso'),
42
-                'order' => 30,
43
-            ),
44
-            'list_table'    => 'Custom_Messages_Template_List_Table',
45
-            'help_tabs'     => array(
46
-                'message_overview_message_types_help_tab' => array(
47
-                    'title'    => esc_html__('Message Types', 'event_espresso'),
48
-                    'filename' => 'messages_overview_types',
49
-                ),
50
-                'messages_overview_messengers_help_tab'   => array(
51
-                    'title'    => esc_html__('Messengers', 'event_espresso'),
52
-                    'filename' => 'messages_overview_messengers',
53
-                ),
54
-                'messages_overview_other_help_tab'        => array(
55
-                    'title'    => esc_html__('Messages Other', 'event_espresso'),
56
-                    'filename' => 'messages_overview_other',
57
-                ),
58
-            ),
59
-            'require_nonce' => false,
60
-        );
61
-
62
-        add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10);
63
-    }
64
-
65
-
66
-    /**
67
-     * Callback for current_screen action
68
-     * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct.
69
-     *
70
-     * @since 4.5.0
71
-     *
72
-     * @return void
73
-     */
74
-    public function dynamic_screen_hooks()
75
-    {
76
-        global $admin_page_hooks;
77
-
78
-        if (! empty($admin_page_hooks['espresso_events'])) {
79
-            // we're on a EE specific page... good stuff!
80
-            $hook_prefix = $admin_page_hooks['espresso_events'];
81
-            $filter_ref = $hook_prefix . '_page_' . $this->page_slug;
82
-            add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
83
-            add_action(
84
-                'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
-                array($this, 'custom_mtp_create_button_column'),
86
-                10,
87
-                2
88
-            );
89
-        }
90
-    }
91
-
92
-
93
-    /**
94
-     * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the
95
-     * caffeinated columns for the global message templates list table.
96
-     *
97
-     * @since 4.3.2
98
-     *
99
-     * @param array  $columns   Original defined list of columns
100
-     * @param string $screen_id The unique screen id for the page.
101
-     */
102
-    public function add_custom_mtps_columns($columns, $screen_id)
103
-    {
104
-        if ($screen_id !== 'espresso_messages_global_mtps') {
105
-            return $columns;
106
-        }
107
-
108
-        $columns['actions'] = '';
109
-        return $columns;
110
-    }
111
-
112
-
113
-    /**
114
-     * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows
115
-     * for adding the content for the registered "action" column.
116
-     *
117
-     * @since 4.3.2
118
-     *
119
-     * @param EE_Base_Class
120
-     * @param string $screen_id Unique screen id for the page
121
-     *
122
-     * @return string html content for the page.
123
-     */
124
-    public function custom_mtp_create_button_column($item, $screen_id)
125
-    {
126
-        if (
127
-            $screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can(
128
-                'ee_edit_messages',
129
-                'espresso_messages_add_new_message_template'
130
-            )
131
-        ) {
132
-            return '';
133
-        }
134
-
135
-        // first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
136
-        if ($item->get('MTP_is_override')) {
137
-            return '';
138
-        }
139
-
140
-
141
-        $create_args = array(
142
-            'GRP_ID'       => $item->ID(),
143
-            'messenger'    => $item->messenger(),
144
-            'message_type' => $item->message_type(),
145
-            'action'       => 'add_new_message_template',
146
-        );
147
-        $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
148
-        echo sprintf(
149
-            '<a href="%s" class="button button--secondary button--small">%s</a>',
150
-            $create_link,
151
-            esc_html__('Create Custom', 'event_espresso')
152
-        );
153
-    }
154
-
155
-
156
-    protected function _add_screen_options_custom_mtps()
157
-    {
158
-        $page_title = $this->_admin_page_title;
159
-        $this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
160
-        $this->_per_page_screen_option();
161
-        $this->_admin_page_title = $page_title;
162
-    }
163
-
164
-
165
-    /**
166
-     * set views array for Custom Templates list table
167
-     *
168
-     * @access public
169
-     * @return void
170
-     */
171
-    public function _set_list_table_views_custom_mtps()
172
-    {
173
-        $this->_views = array(
174
-            'in_use' => array(
175
-                'slug'        => 'in_use',
176
-                'label'       => esc_html__('In Use', 'event_espresso'),
177
-                'count'       => 0,
178
-                'bulk_action' => array(
179
-                    'trash_message_template' => esc_html__('Move to Trash', 'event_espresso'),
180
-                ),
181
-            ),
182
-        );
183
-        if (
184
-            EE_Registry::instance()->CAP->current_user_can(
185
-                'ee_delete_messages',
186
-                'espresso_messages_trash_message_template'
187
-            )
188
-        ) {
189
-            $this->_views['trashed'] = array(
190
-                'slug'        => 'trashed',
191
-                'label'       => esc_html__('Trash', 'event_espresso'),
192
-                'count'       => 0,
193
-                'bulk_action' => array(
194
-                    'restore_message_template' => esc_html__('Restore From Trash', 'event_espresso'),
195
-                    'delete_message_template'  => esc_html__('Delete Permanently', 'event_espresso'),
196
-                ),
197
-            );
198
-        }
199
-    }
200
-
201
-
202
-    protected function _ee_custom_messages_overview_list_table()
203
-    {
204
-        $this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
205
-        $this->display_admin_list_table_page_with_no_sidebar();
206
-    }
21
+	public function __construct($routing = true)
22
+	{
23
+		parent::__construct($routing);
24
+		if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
+			define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
+			define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
+			define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
+			define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
29
+		}
30
+	}
31
+
32
+	protected function _extend_page_config()
33
+	{
34
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
35
+		$this->_page_routes['custom_mtps'] = array(
36
+			'func'       => '_ee_custom_messages_overview_list_table',
37
+			'capability' => 'ee_read_messages',
38
+		);
39
+		$this->_page_config['custom_mtps'] = array(
40
+			'nav'           => array(
41
+				'label' => esc_html__('Custom Message Templates', 'event_espresso'),
42
+				'order' => 30,
43
+			),
44
+			'list_table'    => 'Custom_Messages_Template_List_Table',
45
+			'help_tabs'     => array(
46
+				'message_overview_message_types_help_tab' => array(
47
+					'title'    => esc_html__('Message Types', 'event_espresso'),
48
+					'filename' => 'messages_overview_types',
49
+				),
50
+				'messages_overview_messengers_help_tab'   => array(
51
+					'title'    => esc_html__('Messengers', 'event_espresso'),
52
+					'filename' => 'messages_overview_messengers',
53
+				),
54
+				'messages_overview_other_help_tab'        => array(
55
+					'title'    => esc_html__('Messages Other', 'event_espresso'),
56
+					'filename' => 'messages_overview_other',
57
+				),
58
+			),
59
+			'require_nonce' => false,
60
+		);
61
+
62
+		add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10);
63
+	}
64
+
65
+
66
+	/**
67
+	 * Callback for current_screen action
68
+	 * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct.
69
+	 *
70
+	 * @since 4.5.0
71
+	 *
72
+	 * @return void
73
+	 */
74
+	public function dynamic_screen_hooks()
75
+	{
76
+		global $admin_page_hooks;
77
+
78
+		if (! empty($admin_page_hooks['espresso_events'])) {
79
+			// we're on a EE specific page... good stuff!
80
+			$hook_prefix = $admin_page_hooks['espresso_events'];
81
+			$filter_ref = $hook_prefix . '_page_' . $this->page_slug;
82
+			add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
83
+			add_action(
84
+				'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
+				array($this, 'custom_mtp_create_button_column'),
86
+				10,
87
+				2
88
+			);
89
+		}
90
+	}
91
+
92
+
93
+	/**
94
+	 * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the
95
+	 * caffeinated columns for the global message templates list table.
96
+	 *
97
+	 * @since 4.3.2
98
+	 *
99
+	 * @param array  $columns   Original defined list of columns
100
+	 * @param string $screen_id The unique screen id for the page.
101
+	 */
102
+	public function add_custom_mtps_columns($columns, $screen_id)
103
+	{
104
+		if ($screen_id !== 'espresso_messages_global_mtps') {
105
+			return $columns;
106
+		}
107
+
108
+		$columns['actions'] = '';
109
+		return $columns;
110
+	}
111
+
112
+
113
+	/**
114
+	 * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows
115
+	 * for adding the content for the registered "action" column.
116
+	 *
117
+	 * @since 4.3.2
118
+	 *
119
+	 * @param EE_Base_Class
120
+	 * @param string $screen_id Unique screen id for the page
121
+	 *
122
+	 * @return string html content for the page.
123
+	 */
124
+	public function custom_mtp_create_button_column($item, $screen_id)
125
+	{
126
+		if (
127
+			$screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can(
128
+				'ee_edit_messages',
129
+				'espresso_messages_add_new_message_template'
130
+			)
131
+		) {
132
+			return '';
133
+		}
134
+
135
+		// first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
136
+		if ($item->get('MTP_is_override')) {
137
+			return '';
138
+		}
139
+
140
+
141
+		$create_args = array(
142
+			'GRP_ID'       => $item->ID(),
143
+			'messenger'    => $item->messenger(),
144
+			'message_type' => $item->message_type(),
145
+			'action'       => 'add_new_message_template',
146
+		);
147
+		$create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
148
+		echo sprintf(
149
+			'<a href="%s" class="button button--secondary button--small">%s</a>',
150
+			$create_link,
151
+			esc_html__('Create Custom', 'event_espresso')
152
+		);
153
+	}
154
+
155
+
156
+	protected function _add_screen_options_custom_mtps()
157
+	{
158
+		$page_title = $this->_admin_page_title;
159
+		$this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
160
+		$this->_per_page_screen_option();
161
+		$this->_admin_page_title = $page_title;
162
+	}
163
+
164
+
165
+	/**
166
+	 * set views array for Custom Templates list table
167
+	 *
168
+	 * @access public
169
+	 * @return void
170
+	 */
171
+	public function _set_list_table_views_custom_mtps()
172
+	{
173
+		$this->_views = array(
174
+			'in_use' => array(
175
+				'slug'        => 'in_use',
176
+				'label'       => esc_html__('In Use', 'event_espresso'),
177
+				'count'       => 0,
178
+				'bulk_action' => array(
179
+					'trash_message_template' => esc_html__('Move to Trash', 'event_espresso'),
180
+				),
181
+			),
182
+		);
183
+		if (
184
+			EE_Registry::instance()->CAP->current_user_can(
185
+				'ee_delete_messages',
186
+				'espresso_messages_trash_message_template'
187
+			)
188
+		) {
189
+			$this->_views['trashed'] = array(
190
+				'slug'        => 'trashed',
191
+				'label'       => esc_html__('Trash', 'event_espresso'),
192
+				'count'       => 0,
193
+				'bulk_action' => array(
194
+					'restore_message_template' => esc_html__('Restore From Trash', 'event_espresso'),
195
+					'delete_message_template'  => esc_html__('Delete Permanently', 'event_espresso'),
196
+				),
197
+			);
198
+		}
199
+	}
200
+
201
+
202
+	protected function _ee_custom_messages_overview_list_table()
203
+	{
204
+		$this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
205
+		$this->display_admin_list_table_page_with_no_sidebar();
206
+	}
207 207
 }
Please login to merge, or discard this patch.
admin/extend/general_settings/Extend_General_Settings_Admin_Page.core.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
     public function __construct($routing = true)
22 22
     {
23 23
         parent::__construct($routing);
24
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
24
+        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/');
25 25
     }
26 26
 
27 27
 
28 28
     protected function _extend_page_config()
29 29
     {
30 30
 
31
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
31
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings';
32 32
 
33 33
         // filters and action hooks here
34 34
         add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
61 61
                                                && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
62 62
             ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
63
-        $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
+        $template = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php';
64 64
         EEH_Template::display_template($template, $template_args);
65 65
     }
66 66
 
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -18,68 +18,68 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    public function __construct($routing = true)
22
-    {
23
-        parent::__construct($routing);
24
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
25
-    }
21
+	public function __construct($routing = true)
22
+	{
23
+		parent::__construct($routing);
24
+		define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
25
+	}
26 26
 
27 27
 
28
-    protected function _extend_page_config()
29
-    {
28
+	protected function _extend_page_config()
29
+	{
30 30
 
31
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
31
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
32 32
 
33
-        // filters and action hooks here
34
-        add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
35
-        add_filter(
36
-            'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
37
-            array($this, 'update_debug_logging_options'),
38
-            10,
39
-            1
40
-        );
41
-    }
33
+		// filters and action hooks here
34
+		add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
35
+		add_filter(
36
+			'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
37
+			array($this, 'update_debug_logging_options'),
38
+			10,
39
+			1
40
+		);
41
+	}
42 42
 
43 43
 
44 44
 
45
-    /*************        Logging Settings        *************/
45
+	/*************        Logging Settings        *************/
46 46
 
47
-    /**
48
-     * debug_logging_options
49
-     *
50
-     * @param array $template_args
51
-     *
52
-     * @return void
53
-     */
54
-    public function debug_logging_options($template_args = array())
55
-    {
56
-        $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(
57
-            EE_Registry::instance()->CFG->admin->use_remote_logging
58
-        ) : false;
59
-        $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
60
-                                               && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
61
-            ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
62
-        $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
-        EEH_Template::display_template($template, $template_args);
64
-    }
47
+	/**
48
+	 * debug_logging_options
49
+	 *
50
+	 * @param array $template_args
51
+	 *
52
+	 * @return void
53
+	 */
54
+	public function debug_logging_options($template_args = array())
55
+	{
56
+		$template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(
57
+			EE_Registry::instance()->CFG->admin->use_remote_logging
58
+		) : false;
59
+		$template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
60
+											   && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
61
+			? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
62
+		$template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
+		EEH_Template::display_template($template, $template_args);
64
+	}
65 65
 
66 66
 
67
-    /**
68
-     * update_debug_logging_options
69
-     *
70
-     * @param array $admin_options
71
-     *
72
-     * @return array
73
-     */
74
-    public function update_debug_logging_options($admin_options = array())
75
-    {
76
-        $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint(
77
-            $this->_req_data['use_remote_logging']
78
-        ) : $admin_options->use_remote_logging;
79
-        $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw(
80
-            $this->_req_data['remote_logging_url']
81
-        ) : $admin_options->remote_logging_url;
67
+	/**
68
+	 * update_debug_logging_options
69
+	 *
70
+	 * @param array $admin_options
71
+	 *
72
+	 * @return array
73
+	 */
74
+	public function update_debug_logging_options($admin_options = array())
75
+	{
76
+		$admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint(
77
+			$this->_req_data['use_remote_logging']
78
+		) : $admin_options->use_remote_logging;
79
+		$admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw(
80
+			$this->_req_data['remote_logging_url']
81
+		) : $admin_options->remote_logging_url;
82 82
 
83
-        return $admin_options;
84
-    }
83
+		return $admin_options;
84
+	}
85 85
 }
Please login to merge, or discard this patch.