Completed
Branch models-cleanup/model-relations (db5ca7)
by
unknown
13:03 queued 08:35
created
core/helpers/EEH_Maps.helper.php 2 patches
Indentation   +169 added lines, -169 removed lines patch added patch discarded remove patch
@@ -12,173 +12,173 @@
 block discarded – undo
12 12
 class EEH_Maps
13 13
 {
14 14
 
15
-    // array of map settings
16
-    public static $gmap_vars = array();
17
-
18
-
19
-    /**
20
-     * google_map - creates a Google Map Link
21
-     *
22
-     * @param  array $ee_gmaps_opts array of attributes required for the map link generation
23
-     * @return string (link to map!)
24
-     */
25
-    public static function google_map($ee_gmaps_opts)
26
-    {
27
-
28
-        $ee_map_width        = ! empty($ee_gmaps_opts['ee_map_width']) ? $ee_gmaps_opts['ee_map_width'] : '300';
29
-        $ee_map_height       = ! empty($ee_gmaps_opts['ee_map_height']) ? $ee_gmaps_opts['ee_map_height'] : '185';
30
-        $ee_map_zoom         = ! empty($ee_gmaps_opts['ee_map_zoom']) ? $ee_gmaps_opts['ee_map_zoom'] : '12';
31
-        $ee_map_nav_display  = ! empty($ee_gmaps_opts['ee_map_nav_display']) ? 'true' : 'false';
32
-        $ee_map_nav_size     = ! empty($ee_gmaps_opts['ee_map_nav_size'])
33
-            ? $ee_gmaps_opts['ee_map_nav_size']
34
-            : 'default';
35
-        $ee_map_type_control = ! empty($ee_gmaps_opts['ee_map_type_control'])
36
-            ? $ee_gmaps_opts['ee_map_type_control']
37
-            : 'default';
38
-        $static_url          = ! empty($ee_gmaps_opts['ee_static_url']) ? $ee_gmaps_opts['ee_static_url'] : false;
39
-
40
-        if (! empty($ee_gmaps_opts['ee_map_align'])) {
41
-            switch ($ee_gmaps_opts['ee_map_align']) {
42
-                case "left":
43
-                    $map_align = 'ee-gmap-align-left left';
44
-                    break;
45
-                case "right":
46
-                    $map_align = 'ee-gmap-align-right right';
47
-                    break;
48
-                case "center":
49
-                    $map_align = 'ee-gmap-align-center center';
50
-                    break;
51
-                case "none":
52
-                default:
53
-                    $map_align = 'ee-gmap-align-none';
54
-            }
55
-        } else {
56
-            $map_align = 'ee-gmap-align-none';
57
-        }
58
-
59
-
60
-        // Determine whether user has set a hardoded url to use and
61
-        // if so display a Google static iframe map else run V3 api
62
-        if ($static_url) {
63
-            $html = '<div class="ee-gmap-iframewrap ee-gmap-wrapper ' . $map_align . '">';
64
-            $html .= '<iframe src="' . $static_url . '&output=embed"'
65
-                . ' style="width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;"'
66
-                . ' frameborder="0" scrolling="no">';
67
-            $html .= '</iframe>';
68
-            $html .= '<a href="' . $static_url . '">View Large map</a>';
69
-            $html .= '</div>';
70
-            return $html;
71
-        } else {
72
-            EEH_Maps::$gmap_vars[ $ee_gmaps_opts['map_ID'] ] = array(
73
-                'map_ID'              => $ee_gmaps_opts['map_ID'],
74
-                'ee_map_zoom'         => $ee_map_zoom,
75
-                'ee_map_nav_display'  => $ee_map_nav_display,
76
-                'ee_map_nav_size'     => $ee_map_nav_size,
77
-                'ee_map_type_control' => $ee_map_type_control,
78
-                'location'            => $ee_gmaps_opts['location'],
79
-            );
80
-
81
-            $style = 'width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;';
82
-            $html = '<div class="ee-gmap-wrapper ' . $map_align . '">'
83
-                    . '<div class="ee-gmap" id="map_canvas_' . $ee_gmaps_opts['map_ID'] . '"'
84
-                    . ' style="' . $style . '"></div>'
85
-                    . '</div>';
86
-
87
-            wp_enqueue_script('gmap_api');
88
-            wp_enqueue_script('ee_gmap');
89
-            add_action('wp_footer', array('EEH_Maps', 'footer_enqueue_script'));
90
-
91
-            return $html;
92
-        } // end auto map or static url map check
93
-    }
94
-
95
-
96
-    /**
97
-     * enqueue_script
98
-     *
99
-     * @return void
100
-     */
101
-    public static function footer_enqueue_script()
102
-    {
103
-        wp_localize_script('ee_gmap', 'ee_gmap_vars', EEH_Maps::$gmap_vars);
104
-    }
105
-
106
-
107
-    /**
108
-     * registers scripts for maps
109
-     */
110
-    public static function espresso_google_map_js()
111
-    {
112
-        $api_url = sprintf(
113
-            "https://maps.googleapis.com/maps/api/js?key=%s",
114
-            apply_filters(
115
-                'FHEE__EEH_Maps__espresso_google_maps_js__api_key',
116
-                EE_Registry::instance()->CFG->map_settings->google_map_api_key
117
-            )
118
-        );
119
-        wp_register_script('gmap_api', $api_url, array('jquery'), null, true);
120
-        wp_register_script('ee_gmap', plugin_dir_url(__FILE__) . 'assets/ee_gmap.js', array('gmap_api'), '1.0', true);
121
-    }
122
-
123
-    /**
124
-     * creates a Google Map Link
125
-     *
126
-     * @param  array $atts array of attributes required for the map link generation
127
-     * @return string (link to map!)
128
-     */
129
-    public static function google_map_link($atts)
130
-    {
131
-        do_action('AHEE_log', __FILE__, __FUNCTION__, '');
132
-        extract($atts);
133
-        /** @var string $address */
134
-        /** @var string $city */
135
-        /** @var string $state */
136
-        /** @var string $zip */
137
-        /** @var string $country */
138
-        $address         = "{$address}";
139
-        $city            = "{$city}";
140
-        $state           = "{$state}";
141
-        $zip             = "{$zip}";
142
-        $country         = "{$country}";
143
-        $text            = isset($text) ? "{$text}" : "";
144
-        $type            = isset($type) ? "{$type}" : "";
145
-        $map_w           = isset($map_w) ? "{$map_w}" : 400;
146
-        $map_h           = isset($map_h) ? "{$map_h}" : 400;
147
-        $id              = isset($id) ? $id : 'not_set';
148
-        $map_image_class = isset($map_image_class) ? $map_image_class : 'ee_google_map_view';
149
-
150
-        $address_string = ($address != '' ? $address : '')
151
-                          . ($city != '' ? ',' . $city : '')
152
-                          . ($state != '' ? ',' . $state : '')
153
-                          . ($zip != '' ? ',' . $zip : '')
154
-                          . ($country != '' ? ',' . $country : '');
155
-
156
-        $google_map = htmlentities2('http://maps.google.com/maps?q=' . urlencode($address_string));
157
-
158
-        switch ($type) {
159
-            case 'text':
160
-            default:
161
-                $text = $text == '' ? esc_html__('Map and Directions', 'event_espresso') : $text;
162
-                break;
163
-
164
-            case 'url_only':
165
-            case 'url':
166
-                $text = $google_map;
167
-                break;
168
-
169
-            case 'map':
170
-                $scheme = is_ssl() ? 'https://' : 'http://';
171
-
172
-                $api_key = apply_filters(
173
-                    'FHEE__EEH_Maps__espresso_google_maps_link__api_key',
174
-                    EE_Registry::instance()->CFG->map_settings->google_map_api_key
175
-                );
176
-
177
-                return '<a class="a_map_image_link" href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . '<img class="map_image_link" id="venue_map_' . $id . '" ' . $map_image_class . ' src="' . htmlentities2($scheme . 'maps.googleapis.com/maps/api/staticmap?center=' . urlencode($address_string) . '&amp;zoom=14&amp;size=' . $map_w . 'x' . $map_h . '&amp;markers=color:green|label:|' . urlencode($address_string) . '&amp;sensor=false&amp;key=' . $api_key) . '" /></a>';
178
-        }
179
-
180
-        return $type === 'url_only'
181
-            ? $text
182
-            : '<a href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . $text . '</a>';
183
-    }
15
+	// array of map settings
16
+	public static $gmap_vars = array();
17
+
18
+
19
+	/**
20
+	 * google_map - creates a Google Map Link
21
+	 *
22
+	 * @param  array $ee_gmaps_opts array of attributes required for the map link generation
23
+	 * @return string (link to map!)
24
+	 */
25
+	public static function google_map($ee_gmaps_opts)
26
+	{
27
+
28
+		$ee_map_width        = ! empty($ee_gmaps_opts['ee_map_width']) ? $ee_gmaps_opts['ee_map_width'] : '300';
29
+		$ee_map_height       = ! empty($ee_gmaps_opts['ee_map_height']) ? $ee_gmaps_opts['ee_map_height'] : '185';
30
+		$ee_map_zoom         = ! empty($ee_gmaps_opts['ee_map_zoom']) ? $ee_gmaps_opts['ee_map_zoom'] : '12';
31
+		$ee_map_nav_display  = ! empty($ee_gmaps_opts['ee_map_nav_display']) ? 'true' : 'false';
32
+		$ee_map_nav_size     = ! empty($ee_gmaps_opts['ee_map_nav_size'])
33
+			? $ee_gmaps_opts['ee_map_nav_size']
34
+			: 'default';
35
+		$ee_map_type_control = ! empty($ee_gmaps_opts['ee_map_type_control'])
36
+			? $ee_gmaps_opts['ee_map_type_control']
37
+			: 'default';
38
+		$static_url          = ! empty($ee_gmaps_opts['ee_static_url']) ? $ee_gmaps_opts['ee_static_url'] : false;
39
+
40
+		if (! empty($ee_gmaps_opts['ee_map_align'])) {
41
+			switch ($ee_gmaps_opts['ee_map_align']) {
42
+				case "left":
43
+					$map_align = 'ee-gmap-align-left left';
44
+					break;
45
+				case "right":
46
+					$map_align = 'ee-gmap-align-right right';
47
+					break;
48
+				case "center":
49
+					$map_align = 'ee-gmap-align-center center';
50
+					break;
51
+				case "none":
52
+				default:
53
+					$map_align = 'ee-gmap-align-none';
54
+			}
55
+		} else {
56
+			$map_align = 'ee-gmap-align-none';
57
+		}
58
+
59
+
60
+		// Determine whether user has set a hardoded url to use and
61
+		// if so display a Google static iframe map else run V3 api
62
+		if ($static_url) {
63
+			$html = '<div class="ee-gmap-iframewrap ee-gmap-wrapper ' . $map_align . '">';
64
+			$html .= '<iframe src="' . $static_url . '&output=embed"'
65
+				. ' style="width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;"'
66
+				. ' frameborder="0" scrolling="no">';
67
+			$html .= '</iframe>';
68
+			$html .= '<a href="' . $static_url . '">View Large map</a>';
69
+			$html .= '</div>';
70
+			return $html;
71
+		} else {
72
+			EEH_Maps::$gmap_vars[ $ee_gmaps_opts['map_ID'] ] = array(
73
+				'map_ID'              => $ee_gmaps_opts['map_ID'],
74
+				'ee_map_zoom'         => $ee_map_zoom,
75
+				'ee_map_nav_display'  => $ee_map_nav_display,
76
+				'ee_map_nav_size'     => $ee_map_nav_size,
77
+				'ee_map_type_control' => $ee_map_type_control,
78
+				'location'            => $ee_gmaps_opts['location'],
79
+			);
80
+
81
+			$style = 'width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;';
82
+			$html = '<div class="ee-gmap-wrapper ' . $map_align . '">'
83
+					. '<div class="ee-gmap" id="map_canvas_' . $ee_gmaps_opts['map_ID'] . '"'
84
+					. ' style="' . $style . '"></div>'
85
+					. '</div>';
86
+
87
+			wp_enqueue_script('gmap_api');
88
+			wp_enqueue_script('ee_gmap');
89
+			add_action('wp_footer', array('EEH_Maps', 'footer_enqueue_script'));
90
+
91
+			return $html;
92
+		} // end auto map or static url map check
93
+	}
94
+
95
+
96
+	/**
97
+	 * enqueue_script
98
+	 *
99
+	 * @return void
100
+	 */
101
+	public static function footer_enqueue_script()
102
+	{
103
+		wp_localize_script('ee_gmap', 'ee_gmap_vars', EEH_Maps::$gmap_vars);
104
+	}
105
+
106
+
107
+	/**
108
+	 * registers scripts for maps
109
+	 */
110
+	public static function espresso_google_map_js()
111
+	{
112
+		$api_url = sprintf(
113
+			"https://maps.googleapis.com/maps/api/js?key=%s",
114
+			apply_filters(
115
+				'FHEE__EEH_Maps__espresso_google_maps_js__api_key',
116
+				EE_Registry::instance()->CFG->map_settings->google_map_api_key
117
+			)
118
+		);
119
+		wp_register_script('gmap_api', $api_url, array('jquery'), null, true);
120
+		wp_register_script('ee_gmap', plugin_dir_url(__FILE__) . 'assets/ee_gmap.js', array('gmap_api'), '1.0', true);
121
+	}
122
+
123
+	/**
124
+	 * creates a Google Map Link
125
+	 *
126
+	 * @param  array $atts array of attributes required for the map link generation
127
+	 * @return string (link to map!)
128
+	 */
129
+	public static function google_map_link($atts)
130
+	{
131
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
132
+		extract($atts);
133
+		/** @var string $address */
134
+		/** @var string $city */
135
+		/** @var string $state */
136
+		/** @var string $zip */
137
+		/** @var string $country */
138
+		$address         = "{$address}";
139
+		$city            = "{$city}";
140
+		$state           = "{$state}";
141
+		$zip             = "{$zip}";
142
+		$country         = "{$country}";
143
+		$text            = isset($text) ? "{$text}" : "";
144
+		$type            = isset($type) ? "{$type}" : "";
145
+		$map_w           = isset($map_w) ? "{$map_w}" : 400;
146
+		$map_h           = isset($map_h) ? "{$map_h}" : 400;
147
+		$id              = isset($id) ? $id : 'not_set';
148
+		$map_image_class = isset($map_image_class) ? $map_image_class : 'ee_google_map_view';
149
+
150
+		$address_string = ($address != '' ? $address : '')
151
+						  . ($city != '' ? ',' . $city : '')
152
+						  . ($state != '' ? ',' . $state : '')
153
+						  . ($zip != '' ? ',' . $zip : '')
154
+						  . ($country != '' ? ',' . $country : '');
155
+
156
+		$google_map = htmlentities2('http://maps.google.com/maps?q=' . urlencode($address_string));
157
+
158
+		switch ($type) {
159
+			case 'text':
160
+			default:
161
+				$text = $text == '' ? esc_html__('Map and Directions', 'event_espresso') : $text;
162
+				break;
163
+
164
+			case 'url_only':
165
+			case 'url':
166
+				$text = $google_map;
167
+				break;
168
+
169
+			case 'map':
170
+				$scheme = is_ssl() ? 'https://' : 'http://';
171
+
172
+				$api_key = apply_filters(
173
+					'FHEE__EEH_Maps__espresso_google_maps_link__api_key',
174
+					EE_Registry::instance()->CFG->map_settings->google_map_api_key
175
+				);
176
+
177
+				return '<a class="a_map_image_link" href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . '<img class="map_image_link" id="venue_map_' . $id . '" ' . $map_image_class . ' src="' . htmlentities2($scheme . 'maps.googleapis.com/maps/api/staticmap?center=' . urlencode($address_string) . '&amp;zoom=14&amp;size=' . $map_w . 'x' . $map_h . '&amp;markers=color:green|label:|' . urlencode($address_string) . '&amp;sensor=false&amp;key=' . $api_key) . '" /></a>';
178
+		}
179
+
180
+		return $type === 'url_only'
181
+			? $text
182
+			: '<a href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . $text . '</a>';
183
+	}
184 184
 }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             : 'default';
38 38
         $static_url          = ! empty($ee_gmaps_opts['ee_static_url']) ? $ee_gmaps_opts['ee_static_url'] : false;
39 39
 
40
-        if (! empty($ee_gmaps_opts['ee_map_align'])) {
40
+        if ( ! empty($ee_gmaps_opts['ee_map_align'])) {
41 41
             switch ($ee_gmaps_opts['ee_map_align']) {
42 42
                 case "left":
43 43
                     $map_align = 'ee-gmap-align-left left';
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
         // Determine whether user has set a hardoded url to use and
61 61
         // if so display a Google static iframe map else run V3 api
62 62
         if ($static_url) {
63
-            $html = '<div class="ee-gmap-iframewrap ee-gmap-wrapper ' . $map_align . '">';
64
-            $html .= '<iframe src="' . $static_url . '&output=embed"'
65
-                . ' style="width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;"'
63
+            $html = '<div class="ee-gmap-iframewrap ee-gmap-wrapper '.$map_align.'">';
64
+            $html .= '<iframe src="'.$static_url.'&output=embed"'
65
+                . ' style="width: '.$ee_map_width.'px; height: '.$ee_map_height.'px;"'
66 66
                 . ' frameborder="0" scrolling="no">';
67 67
             $html .= '</iframe>';
68
-            $html .= '<a href="' . $static_url . '">View Large map</a>';
68
+            $html .= '<a href="'.$static_url.'">View Large map</a>';
69 69
             $html .= '</div>';
70 70
             return $html;
71 71
         } else {
72
-            EEH_Maps::$gmap_vars[ $ee_gmaps_opts['map_ID'] ] = array(
72
+            EEH_Maps::$gmap_vars[$ee_gmaps_opts['map_ID']] = array(
73 73
                 'map_ID'              => $ee_gmaps_opts['map_ID'],
74 74
                 'ee_map_zoom'         => $ee_map_zoom,
75 75
                 'ee_map_nav_display'  => $ee_map_nav_display,
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
                 'location'            => $ee_gmaps_opts['location'],
79 79
             );
80 80
 
81
-            $style = 'width: ' . $ee_map_width . 'px; height: ' . $ee_map_height . 'px;';
82
-            $html = '<div class="ee-gmap-wrapper ' . $map_align . '">'
83
-                    . '<div class="ee-gmap" id="map_canvas_' . $ee_gmaps_opts['map_ID'] . '"'
84
-                    . ' style="' . $style . '"></div>'
81
+            $style = 'width: '.$ee_map_width.'px; height: '.$ee_map_height.'px;';
82
+            $html = '<div class="ee-gmap-wrapper '.$map_align.'">'
83
+                    . '<div class="ee-gmap" id="map_canvas_'.$ee_gmaps_opts['map_ID'].'"'
84
+                    . ' style="'.$style.'"></div>'
85 85
                     . '</div>';
86 86
 
87 87
             wp_enqueue_script('gmap_api');
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             )
118 118
         );
119 119
         wp_register_script('gmap_api', $api_url, array('jquery'), null, true);
120
-        wp_register_script('ee_gmap', plugin_dir_url(__FILE__) . 'assets/ee_gmap.js', array('gmap_api'), '1.0', true);
120
+        wp_register_script('ee_gmap', plugin_dir_url(__FILE__).'assets/ee_gmap.js', array('gmap_api'), '1.0', true);
121 121
     }
122 122
 
123 123
     /**
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
         $map_image_class = isset($map_image_class) ? $map_image_class : 'ee_google_map_view';
149 149
 
150 150
         $address_string = ($address != '' ? $address : '')
151
-                          . ($city != '' ? ',' . $city : '')
152
-                          . ($state != '' ? ',' . $state : '')
153
-                          . ($zip != '' ? ',' . $zip : '')
154
-                          . ($country != '' ? ',' . $country : '');
151
+                          . ($city != '' ? ','.$city : '')
152
+                          . ($state != '' ? ','.$state : '')
153
+                          . ($zip != '' ? ','.$zip : '')
154
+                          . ($country != '' ? ','.$country : '');
155 155
 
156
-        $google_map = htmlentities2('http://maps.google.com/maps?q=' . urlencode($address_string));
156
+        $google_map = htmlentities2('http://maps.google.com/maps?q='.urlencode($address_string));
157 157
 
158 158
         switch ($type) {
159 159
             case 'text':
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
                     EE_Registry::instance()->CFG->map_settings->google_map_api_key
175 175
                 );
176 176
 
177
-                return '<a class="a_map_image_link" href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . '<img class="map_image_link" id="venue_map_' . $id . '" ' . $map_image_class . ' src="' . htmlentities2($scheme . 'maps.googleapis.com/maps/api/staticmap?center=' . urlencode($address_string) . '&amp;zoom=14&amp;size=' . $map_w . 'x' . $map_h . '&amp;markers=color:green|label:|' . urlencode($address_string) . '&amp;sensor=false&amp;key=' . $api_key) . '" /></a>';
177
+                return '<a class="a_map_image_link" href="'.$google_map.'" target="_blank" rel="noopener noreferrer">'.'<img class="map_image_link" id="venue_map_'.$id.'" '.$map_image_class.' src="'.htmlentities2($scheme.'maps.googleapis.com/maps/api/staticmap?center='.urlencode($address_string).'&amp;zoom=14&amp;size='.$map_w.'x'.$map_h.'&amp;markers=color:green|label:|'.urlencode($address_string).'&amp;sensor=false&amp;key='.$api_key).'" /></a>';
178 178
         }
179 179
 
180 180
         return $type === 'url_only'
181 181
             ? $text
182
-            : '<a href="' . $google_map . '" target="_blank" rel="noopener noreferrer">' . $text . '</a>';
182
+            : '<a href="'.$google_map.'" target="_blank" rel="noopener noreferrer">'.$text.'</a>';
183 183
     }
184 184
 }
Please login to merge, or discard this patch.
support/templates/support_admin_details_additional_information.template.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <div class="padding">
2 2
     <p><?php
3
-        printf(
4
-            esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'),
5
-            '<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank" rel="noopener noreferrer">',
6
-            '</a>'
7
-        ); ?></p>
3
+		printf(
4
+			esc_html__('Check out the %1$sroadmap for Event Espresso%2$s.', 'event_espresso'),
5
+			'<a href="https://trello.com/b/zg9DCIpe/event-espresso-public-roadmap" target="_blank" rel="noopener noreferrer">',
6
+			'</a>'
7
+		); ?></p>
8 8
 </div>
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
payment_methods/Paypal_Pro/templates/paypal_pro_debug_info.template.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@  discard block
 block discarded – undo
16 16
     <div class="sandbox-panel">
17 17
     <h2 class="section-title"><?php _e('PayPal Sandbox Mode', 'event_espresso'); ?></h2>
18 18
     <h3 style="color:#ff0000;"><?php
19
-        _e(
20
-            'Debug Mode Is Turned On. Payments will not be processed',
21
-            'event_espresso'
22
-        ); ?></h3>
19
+		_e(
20
+			'Debug Mode Is Turned On. Payments will not be processed',
21
+			'event_espresso'
22
+		); ?></h3>
23 23
 
24 24
     <p class="test-credit-cards-info-pg" style="margin-bottom:0;">
25 25
         <strong><?php _e('Testing Guidelines', 'event_espresso'); ?></strong>
26 26
     </p>
27 27
     <ul style="margin:1em 2em 1.5em; line-height:1.2em;">
28 28
         <li><?php
29
-            _e(
30
-                'While testing, use the credit card number associated with your sandbox account.',
31
-                'event_espresso'
32
-            ); ?></li>
29
+			_e(
30
+				'While testing, use the credit card number associated with your sandbox account.',
31
+				'event_espresso'
32
+			); ?></li>
33 33
         <li><?php
34
-            printf(
35
-                __(
36
-                    'To find the sandbox account\'s credit card, go to %1$s, then "Dashboard", then under Sandbox click "Accounts", then click your account and click "Profile", then in the popup that appears click on the "Funding" tab. Your testing card is listed there.',
37
-                    'event_espresso'
38
-                ),
39
-                '<a href="http://developer.paypal.com">developer.paypal.com</a>'
40
-            ); ?></li>
34
+			printf(
35
+				__(
36
+					'To find the sandbox account\'s credit card, go to %1$s, then "Dashboard", then under Sandbox click "Accounts", then click your account and click "Profile", then in the popup that appears click on the "Funding" tab. Your testing card is listed there.',
37
+					'event_espresso'
38
+				),
39
+				'<a href="http://developer.paypal.com">developer.paypal.com</a>'
40
+			); ?></li>
41 41
         <li><?php
42
-            esc_html_e('CVV2 should be 115', 'event_espresso'); ?></li>
42
+			esc_html_e('CVV2 should be 115', 'event_espresso'); ?></li>
43 43
     </ul>
44 44
 
45 45
     <p class="test-credit-cards-info-pg">
46 46
         <strong><?php _e('Credit Card Numbers Used for Testing', 'event_espresso'); ?></strong><br/>
47 47
         <span class="small-text"><?php
48
-            _e(
49
-                'Use the following credit card numbers for testing. Any other card number produces a general failure.',
50
-                'event_espresso'
51
-            ); ?></span>
48
+			_e(
49
+				'Use the following credit card numbers for testing. Any other card number produces a general failure.',
50
+				'event_espresso'
51
+			); ?></span>
52 52
     </p>
53 53
 
54 54
     <div class="tbl-wrap">
@@ -72,18 +72,18 @@  discard block
 block discarded – undo
72 72
     <p class="test-credit-cards-info-pg">
73 73
         <strong><?php _e('Testing Result Code Responses', 'event_espresso'); ?></strong><br/>
74 74
         <span class="small-text"><?php
75
-            printf(
76
-                __(
77
-                    'You can use the amount of the transaction to generate a particular result code (see %s PayPal\'s documentation%s). The table below lists the general guidelines for specifying amounts. IMPORTANT: before you attempt any of these, ensure your sandbox PayPal account has %s "Negative Testing" set to on%s. Also be aware that you can generate AVS errors by using certain strings in your address field, and CVV errors using certain CVV values. See %s this PayPal doc %s',
78
-                    'event_espresso'
79
-                ),
80
-                "<a href='https://developer.paypal.com/docs/classic/api/errorcodes/#id09C3GA00GR1' target='_blank'>",
81
-                "</a>",
82
-                "<a href='https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMNXNkZ2s5VUlHTUk/edit?usp=drivesdk' target='_blank'>",
83
-                "</a>",
84
-                "<a href='https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions' target='_blank'>",
85
-                "</a>"
86
-            ); ?></span>
75
+			printf(
76
+				__(
77
+					'You can use the amount of the transaction to generate a particular result code (see %s PayPal\'s documentation%s). The table below lists the general guidelines for specifying amounts. IMPORTANT: before you attempt any of these, ensure your sandbox PayPal account has %s "Negative Testing" set to on%s. Also be aware that you can generate AVS errors by using certain strings in your address field, and CVV errors using certain CVV values. See %s this PayPal doc %s',
78
+					'event_espresso'
79
+				),
80
+				"<a href='https://developer.paypal.com/docs/classic/api/errorcodes/#id09C3GA00GR1' target='_blank'>",
81
+				"</a>",
82
+				"<a href='https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMNXNkZ2s5VUlHTUk/edit?usp=drivesdk' target='_blank'>",
83
+				"</a>",
84
+				"<a href='https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_testing_SBTestErrorConditions' target='_blank'>",
85
+				"</a>"
86
+			); ?></span>
87 87
     </p>
88 88
 
89 89
     <div class="tbl-wrap">
Please login to merge, or discard this patch.
help_tabs/registration_form_reg_form_settings.help_tab.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
3 3
 <?php esc_html_e('This page shows options for Email Validation, the EE "Bot Trap" and reCAPTCHA which can help prevent SPAM registrations on your site.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <div id="email_validation_info">
6
-<p><strong><?php esc_html_e('Email Validation', 'event_espresso');?></strong></p>
6
+<p><strong><?php esc_html_e('Email Validation', 'event_espresso'); ?></strong></p>
7 7
 <p><?php esc_html_e("Validating an email address is extremely difficult to do correctly. Your server's configuration, as well as your own tolerances and needs, can affect the type of validation needed. We offer different types of validation so that you can control how strict your registration form responds to entered email addresses. If you are receiving too many bogus email addresses, then you can try the WordPress Default validation setting. If you find that the form validation is blocking a valid email address you can try the Basic setting, or if available, the International validation settings.", 'event_espresso'); ?>
8 8
 </p>
9
-<p><strong><?php esc_html_e('Validation Options:', 'event_espresso');?></strong></p>
9
+<p><strong><?php esc_html_e('Validation Options:', 'event_espresso'); ?></strong></p>
10 10
 <ul>
11 11
 <li>
12 12
     <?php esc_html_e('"Basic" - only checks that an email address follows the most basic structure guidelines ( ie: [email protected] ). Will work with the widest range of email addresses but will also allow the most garbage through.', 'event_espresso'); ?></li>
Please login to merge, or discard this patch.
admin_pages/support/templates/developers_admin_details.template.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,93 +1,93 @@
 block discarded – undo
1 1
 <div class="padding">
2 2
     <?php esc_html_e(
3
-        'If you want to integrate with Event Espresso or participate in building code, then you are in the right place. The following resources can help you get started.',
4
-        'event_espresso'
5
-    ); ?>
3
+		'If you want to integrate with Event Espresso or participate in building code, then you are in the right place. The following resources can help you get started.',
4
+		'event_espresso'
5
+	); ?>
6 6
     <h2><?php esc_html_e('Developer Resources', 'event_espresso'); ?></h2>
7 7
     <ul>
8 8
         <li>
9 9
             <?php printf(
10
-                esc_html__('%1$sEvent Espresso 4 Developer Documentation%2$s', 'event_espresso'),
11
-                '<a href="https://github.com/eventespresso/event-espresso-core/tree/master/docs#getting-started-with-the-ee-developer-docs" target="_blank" rel="noopener noreferrer">',
12
-                '</a>'
13
-            ); ?></li>
10
+				esc_html__('%1$sEvent Espresso 4 Developer Documentation%2$s', 'event_espresso'),
11
+				'<a href="https://github.com/eventespresso/event-espresso-core/tree/master/docs#getting-started-with-the-ee-developer-docs" target="_blank" rel="noopener noreferrer">',
12
+				'</a>'
13
+			); ?></li>
14 14
         <li>
15 15
             <?php printf(
16
-                esc_html__('%1$sEvent Espresso 4 Developer News%2$s', 'event_espresso'),
17
-                '<a href="http://developer.eventespresso.com/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
18
-                '</a>'
19
-            ); ?></li>
16
+				esc_html__('%1$sEvent Espresso 4 Developer News%2$s', 'event_espresso'),
17
+				'<a href="http://developer.eventespresso.com/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
18
+				'</a>'
19
+			); ?></li>
20 20
         <li>
21 21
             <?php printf(
22
-                esc_html__('%1$sApply%2$s to be listed as an %3$sEvent Espresso Professional%2$s', 'event_espresso'),
23
-                '<a href="https://eventespresso.com/developers/event-espresso-pros-application/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
24
-                '</a>',
25
-                '<a href="https://eventespresso.com/developers/event-espresso-pros/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">'
26
-            ); ?></li>
22
+				esc_html__('%1$sApply%2$s to be listed as an %3$sEvent Espresso Professional%2$s', 'event_espresso'),
23
+				'<a href="https://eventespresso.com/developers/event-espresso-pros-application/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
24
+				'</a>',
25
+				'<a href="https://eventespresso.com/developers/event-espresso-pros/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">'
26
+			); ?></li>
27 27
     </ul>
28 28
 
29 29
     <h2><?php esc_html_e('Event Espresso 4 Articles for Developers', 'event_espresso'); ?></h2>
30 30
     <ul>
31 31
         <li>
32 32
             <?php printf(
33
-                esc_html__('%1$sCustom Post Types Usage%2$s', 'event_espresso'),
34
-                '<a href="https://eventespresso.com/2014/02/epsresso-brewery-custom-post-types-event-espresso/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
35
-                '</a>'
36
-            ); ?></li>
33
+				esc_html__('%1$sCustom Post Types Usage%2$s', 'event_espresso'),
34
+				'<a href="https://eventespresso.com/2014/02/epsresso-brewery-custom-post-types-event-espresso/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
35
+				'</a>'
36
+			); ?></li>
37 37
         <li>
38 38
             <?php printf(
39
-                esc_html__('%1$sTheme Development%2$s', 'event_espresso'),
40
-                '<a href="https://eventespresso.com/2014/02/developers-corner-theming-event-espresso-4/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
41
-                '</a>'
42
-            ); ?></li>
39
+				esc_html__('%1$sTheme Development%2$s', 'event_espresso'),
40
+				'<a href="https://eventespresso.com/2014/02/developers-corner-theming-event-espresso-4/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
41
+				'</a>'
42
+			); ?></li>
43 43
         <li>
44 44
             <?php printf(
45
-                esc_html__('%1$sCapability System%2$s', 'event_espresso'),
46
-                '<a href="http://developer.eventespresso.com/docs/ee-capability-system-overview/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
47
-                '</a>'
48
-            ); ?></li>
45
+				esc_html__('%1$sCapability System%2$s', 'event_espresso'),
46
+				'<a href="http://developer.eventespresso.com/docs/ee-capability-system-overview/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
47
+				'</a>'
48
+			); ?></li>
49 49
         <li>
50 50
             <?php printf(
51
-                esc_html__('%1$sPayment Method Development%2$s', 'event_espresso'),
52
-                '<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/L--Payment-Methods-and-Gateways/creating-a-payment-method.md" target="_blank" rel="noopener noreferrer">',
53
-                '</a>'
54
-            ); ?></li>
51
+				esc_html__('%1$sPayment Method Development%2$s', 'event_espresso'),
52
+				'<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/L--Payment-Methods-and-Gateways/creating-a-payment-method.md" target="_blank" rel="noopener noreferrer">',
53
+				'</a>'
54
+			); ?></li>
55 55
         <li>
56 56
             <?php printf(
57
-                esc_html__('%1$sMessages System in Event Espresso 4%2$s', 'event_espresso'),
58
-                '<a href="https://eventespresso.com/2014/03/messages-systemyour-tool-getting-word/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
59
-                '</a>'
60
-            ); ?></li>
57
+				esc_html__('%1$sMessages System in Event Espresso 4%2$s', 'event_espresso'),
58
+				'<a href="https://eventespresso.com/2014/03/messages-systemyour-tool-getting-word/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
59
+				'</a>'
60
+			); ?></li>
61 61
         <li>
62 62
             <?php printf(
63
-                esc_html__(
64
-                    '%1$sDatabase Model System%2$s (used for interfacing with EE4 data via WordPress plugins and server side querying)',
65
-                    'event_espresso'
66
-                ),
67
-                '<a href="http://developer.eventespresso.com/docs/using-ee4-model-objects/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
68
-                '</a>'
69
-            ); ?></li>
63
+				esc_html__(
64
+					'%1$sDatabase Model System%2$s (used for interfacing with EE4 data via WordPress plugins and server side querying)',
65
+					'event_espresso'
66
+				),
67
+				'<a href="http://developer.eventespresso.com/docs/using-ee4-model-objects/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=ee_support_page&utm_content=developers_tab" target="_blank">',
68
+				'</a>'
69
+			); ?></li>
70 70
     </ul>
71 71
 
72 72
     <h2><?php esc_html_e('REST API Resources', 'event_espresso'); ?></h2>
73 73
     <ul>
74 74
         <li>
75 75
             <?php printf(
76
-                esc_html__('%1$sREST API: Introduction%2$s', 'event_espresso'),
77
-                '<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/C--REST-API/ee4-rest-api-introduction.md" target="_blank" rel="noopener noreferrer">',
78
-                '</a>'
79
-            ); ?></li>
76
+				esc_html__('%1$sREST API: Introduction%2$s', 'event_espresso'),
77
+				'<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/C--REST-API/ee4-rest-api-introduction.md" target="_blank" rel="noopener noreferrer">',
78
+				'</a>'
79
+			); ?></li>
80 80
         <li>
81 81
             <?php printf(
82
-                esc_html__('%1$sREST API: Reading Data%2$s', 'event_espresso'),
83
-                '<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/C--REST-API/ee4-rest-api-reading-data.md" target="_blank" rel="noopener noreferrer">',
84
-                '</a>'
85
-            ); ?></li>
82
+				esc_html__('%1$sREST API: Reading Data%2$s', 'event_espresso'),
83
+				'<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/C--REST-API/ee4-rest-api-reading-data.md" target="_blank" rel="noopener noreferrer">',
84
+				'</a>'
85
+			); ?></li>
86 86
         <li>
87 87
             <?php printf(
88
-                esc_html__('%1$sBuilding an EE4 Add-on Using the REST API%2$s', 'event_espresso'),
89
-                '<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/T--Tutorials/building-an-ee4-addon-that-uses-angular-js-and-the-ee4-json-rest-api.md" target="_blank" rel="noopener noreferrer">',
90
-                '</a>'
91
-            ); ?></li>
88
+				esc_html__('%1$sBuilding an EE4 Add-on Using the REST API%2$s', 'event_espresso'),
89
+				'<a href="https://github.com/eventespresso/event-espresso-core/blob/master/docs/T--Tutorials/building-an-ee4-addon-that-uses-angular-js-and-the-ee4-json-rest-api.md" target="_blank" rel="noopener noreferrer">',
90
+				'</a>'
91
+			); ?></li>
92 92
     </ul>
93 93
 </div>
94 94
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/venues/templates/google_map.template.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@  discard block
 block discarded – undo
11 11
             </th>
12 12
             <td>
13 13
                 <?php echo EEH_Form_Fields::select_input(
14
-                    'use_google_maps',
15
-                    $values,
16
-                    $map_settings->use_google_maps,
17
-                    'id="ee-display-map-no-shortcodes"'
18
-                ); ?>
14
+					'use_google_maps',
15
+					$values,
16
+					$map_settings->use_google_maps,
17
+					'id="ee-display-map-no-shortcodes"'
18
+				); ?>
19 19
                 <p class="description">
20 20
                     <?php esc_html_e(
21
-                        'Turn Google maps on or off site wide for Event Espresso.',
22
-                        'event_espresso'
23
-                    ); ?></p>
21
+						'Turn Google maps on or off site wide for Event Espresso.',
22
+						'event_espresso'
23
+					); ?></p>
24 24
             </td>
25 25
         </tr>
26 26
         <?php
27
-        if (apply_filters('FHEE__google_map__show_api_key_input', true)) { ?>
27
+		if (apply_filters('FHEE__google_map__show_api_key_input', true)) { ?>
28 28
             <tr>
29 29
                 <th>
30 30
                     <label for="ee-google-map-api-key">
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
                            value="<?php echo $map_settings->google_map_api_key; ?>"/>
37 37
                     <p class="description">
38 38
                         <?php
39
-                        printf(
40
-                            __(
41
-                                'An API key is now required to use the Google Maps API: %1$sclick here to get an API key%2$s',
42
-                                'event_espresso'
43
-                            ),
44
-                            '<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank" rel="noopener noreferrer">',
45
-                            '</a>'
46
-                        );
47
-                        ?>
39
+						printf(
40
+							__(
41
+								'An API key is now required to use the Google Maps API: %1$sclick here to get an API key%2$s',
42
+								'event_espresso'
43
+							),
44
+							'<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank" rel="noopener noreferrer">',
45
+							'</a>'
46
+						);
47
+						?>
48 48
                     </p>
49 49
                 </td>
50 50
             </tr>
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
             </th>
106 106
             <td>
107 107
                 <?php echo EEH_Form_Fields::select_input(
108
-                    'event_details_display_nav',
109
-                    $values,
110
-                    $map_settings->event_details_display_nav,
111
-                    'id="event_details_display_nav" '
112
-                ); ?>
108
+					'event_details_display_nav',
109
+					$values,
110
+					$map_settings->event_details_display_nav,
111
+					'id="event_details_display_nav" '
112
+				); ?>
113 113
             </td>
114 114
         </tr>
115 115
 
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
             </th>
122 122
             <td>
123 123
                 <?php echo EEH_Form_Fields::select_input(
124
-                    'event_details_nav_size',
125
-                    $values,
126
-                    $map_settings->event_details_nav_size,
127
-                    'id="event_details_nav_size"'
128
-                ); ?>
124
+					'event_details_nav_size',
125
+					$values,
126
+					$map_settings->event_details_nav_size,
127
+					'id="event_details_nav_size"'
128
+				); ?>
129 129
             </td>
130 130
         </tr>
131 131
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             <td>
137 137
                 <label for="event_details_control_type-default" class="ee-admin-radio-lbl">
138 138
                     <?php $checked = $map_settings->event_details_control_type == 'default' ? 'checked="checked"'
139
-                        : ''; ?>
139
+						: ''; ?>
140 140
                     <input id="event_details_control_type-default" type="radio" name="event_details_control_type"
141 141
                            value="default"<?php echo $checked; ?>/>
142 142
                     <?php esc_html_e(' Default', 'event_espresso') ?>
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
                 <label for="event_details_control_type-horizontal" class="ee-admin-radio-lbl">
146 146
                     <?php $checked = $map_settings->event_details_control_type == 'horizontal' ? 'checked="checked"'
147
-                        : ''; ?>
147
+						: ''; ?>
148 148
                     <input id="event_details_control_type-horizontal" type="radio" name="event_details_control_type"
149 149
                            value="horizontal"<?php echo $checked; ?>/>
150 150
                     <?php esc_html_e(' Horizontal', 'event_espresso') ?>
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
                 <label for="event_details_control_type-dropdown" class="ee-admin-radio-lbl">
154 154
                     <?php $checked = $map_settings->event_details_control_type == 'dropdown' ? 'checked="checked"'
155
-                        : ''; ?>
155
+						: ''; ?>
156 156
                     <input id="event_details_control_type-dropdown" type="radio" name="event_details_control_type"
157 157
                            value="dropdown"<?php echo $checked; ?>/>
158 158
                     <?php esc_html_e(' Dropdown', 'event_espresso') ?>
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
             </th>
247 247
             <td>
248 248
                 <?php echo EEH_Form_Fields::select_input(
249
-                    'event_list_display_nav',
250
-                    $values,
251
-                    $map_settings->event_list_display_nav,
252
-                    'id="event_list_display_nav"'
253
-                ); ?>
249
+					'event_list_display_nav',
250
+					$values,
251
+					$map_settings->event_list_display_nav,
252
+					'id="event_list_display_nav"'
253
+				); ?>
254 254
             </td>
255 255
         </tr>
256 256
 
@@ -262,11 +262,11 @@  discard block
 block discarded – undo
262 262
             </th>
263 263
             <td>
264 264
                 <?php echo EEH_Form_Fields::select_input(
265
-                    'event_list_nav_size',
266
-                    $values,
267
-                    $map_settings->event_list_nav_size,
268
-                    'id="event_list_nav_size"'
269
-                ); ?>
265
+					'event_list_nav_size',
266
+					$values,
267
+					$map_settings->event_list_nav_size,
268
+					'id="event_list_nav_size"'
269
+				); ?>
270 270
             </td>
271 271
         </tr>
272 272
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
                 <label for="event_list_control_type-horizontal" class="ee-admin-radio-lbl">
286 286
                     <?php $checked = $map_settings->event_list_control_type == 'horizontal' ? 'checked="checked"'
287
-                        : ''; ?>
287
+						: ''; ?>
288 288
                     <input id="event_list_control_type-horizontal" type="radio" name="event_list_control_type"
289 289
                            value="horizontal"<?php echo $checked; ?>/>
290 290
                     <?php esc_html_e(' Horizontal', 'event_espresso') ?>
Please login to merge, or discard this patch.
core/services/request/files/FilesDataHandler.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     protected function isStrangeFilesArray($files_data)
116 116
     {
117
-        if (!is_array($files_data)) {
117
+        if ( ! is_array($files_data)) {
118 118
             throw new UnexpectedValueException(
119 119
                 sprintf(
120 120
                     esc_html__(
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             );
127 127
         }
128 128
         $first_value = reset($files_data);
129
-        if (!is_array($first_value)) {
129
+        if ( ! is_array($first_value)) {
130 130
             throw new UnexpectedValueException(
131 131
                 sprintf(
132 132
                     esc_html__(
@@ -160,14 +160,14 @@  discard block
 block discarded – undo
160 160
         $sane_files_array = [];
161 161
         foreach ($files_data as $top_level_name => $top_level_children) {
162 162
             $sub_array = [];
163
-            $sane_files_array[ $top_level_name ] = [];
163
+            $sane_files_array[$top_level_name] = [];
164 164
             foreach ($top_level_children as $file_data_part => $second_level_children) {
165 165
                 foreach ($second_level_children as $next_level_name => $sub_values) {
166
-                    $sub_array[ $next_level_name ] = $this->organizeFilesData($sub_values, $file_data_part);
166
+                    $sub_array[$next_level_name] = $this->organizeFilesData($sub_values, $file_data_part);
167 167
                 }
168
-                $sane_files_array[ $top_level_name ] = array_replace_recursive(
168
+                $sane_files_array[$top_level_name] = array_replace_recursive(
169 169
                     $sub_array,
170
-                    $sane_files_array[ $top_level_name ]
170
+                    $sane_files_array[$top_level_name]
171 171
                 );
172 172
             }
173 173
         }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     protected function organizeFilesData($data, $type)
186 186
     {
187
-        if (! is_array($data)) {
187
+        if ( ! is_array($data)) {
188 188
             return [
189 189
                 $type => $data
190 190
             ];
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
         $organized_data = [];
193 193
         foreach ($data as $input_name_part => $sub_inputs_or_value) {
194 194
             if (is_array($sub_inputs_or_value)) {
195
-                $organized_data[ $input_name_part ] = $this->organizeFilesData($sub_inputs_or_value, $type);
195
+                $organized_data[$input_name_part] = $this->organizeFilesData($sub_inputs_or_value, $type);
196 196
             } else {
197
-                $organized_data[ $input_name_part ][ $type ] = $sub_inputs_or_value;
197
+                $organized_data[$input_name_part][$type] = $sub_inputs_or_value;
198 198
             }
199 199
         }
200 200
         return $organized_data;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     protected function createFileObjects($organized_files, $name_parts_so_far = [])
214 214
     {
215
-        if (!is_array($organized_files)) {
215
+        if ( ! is_array($organized_files)) {
216 216
             throw new UnexpectedValueException(
217 217
                 sprintf(
218 218
                     esc_html__(
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      */
256 256
     protected function inputNameFromParts($parts)
257 257
     {
258
-        if (!is_array($parts)) {
258
+        if ( ! is_array($parts)) {
259 259
             throw new UnexpectedValueException(esc_html__('Name parts should be an array.', 'event_espresso'));
260 260
         }
261 261
         $generated_string = '';
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             if ($generated_string === '') {
264 264
                 $generated_string = (string) $part;
265 265
             } else {
266
-                $generated_string .= '[' . (string) $part . ']';
266
+                $generated_string .= '['.(string) $part.']';
267 267
             }
268 268
         }
269 269
         return $generated_string;
Please login to merge, or discard this patch.
Indentation   +246 added lines, -246 removed lines patch added patch discarded remove patch
@@ -38,264 +38,264 @@
 block discarded – undo
38 38
  */
39 39
 class FilesDataHandler
40 40
 {
41
-    /**
42
-     * @var Request
43
-     */
44
-    protected $request;
41
+	/**
42
+	 * @var Request
43
+	 */
44
+	protected $request;
45 45
 
46
-    /**
47
-     * @var CollectionInterface | FileSubmissionInterface[]
48
-     */
49
-    protected $file_objects;
46
+	/**
47
+	 * @var CollectionInterface | FileSubmissionInterface[]
48
+	 */
49
+	protected $file_objects;
50 50
 
51
-    /**
52
-     * @var bool
53
-     */
54
-    protected $initialized = false;
51
+	/**
52
+	 * @var bool
53
+	 */
54
+	protected $initialized = false;
55 55
 
56
-    /**
57
-     * FilesDataHandler constructor.
58
-     * @param Request $request
59
-     */
60
-    public function __construct(Request $request)
61
-    {
62
-        $this->request = $request;
63
-    }
56
+	/**
57
+	 * FilesDataHandler constructor.
58
+	 * @param Request $request
59
+	 */
60
+	public function __construct(Request $request)
61
+	{
62
+		$this->request = $request;
63
+	}
64 64
 
65
-    /**
66
-     * @since 4.9.80.p
67
-     * @return CollectionInterface | FileSubmissionInterface[]
68
-     * @throws UnexpectedValueException
69
-     * @throws InvalidArgumentException
70
-     */
71
-    protected function getFileObjects()
72
-    {
73
-        $this->initialize();
74
-        return $this->file_objects;
75
-    }
65
+	/**
66
+	 * @since 4.9.80.p
67
+	 * @return CollectionInterface | FileSubmissionInterface[]
68
+	 * @throws UnexpectedValueException
69
+	 * @throws InvalidArgumentException
70
+	 */
71
+	protected function getFileObjects()
72
+	{
73
+		$this->initialize();
74
+		return $this->file_objects;
75
+	}
76 76
 
77
-    /**
78
-     * Sets up the file objects from the request's $_FILES data.
79
-     * @since 4.9.80.p
80
-     * @throws UnexpectedValueException
81
-     * @throws InvalidArgumentException
82
-     * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
83
-     */
84
-    protected function initialize()
85
-    {
86
-        if ($this->initialized) {
87
-            return;
88
-        }
89
-        $this->file_objects = new Collection(
90
-            // collection interface
91
-            'EventEspresso\core\services\request\files\FileSubmissionInterface',
92
-            // collection name
93
-            'submitted_files'
94
-        );
95
-        $files_raw_data = $this->request->filesParams();
96
-        if (empty($files_raw_data)) {
97
-            return;
98
-        }
99
-        if ($this->isStrangeFilesArray($files_raw_data)) {
100
-            $data = $this->fixFilesDataArray($files_raw_data);
101
-        } else {
102
-            $data = $files_raw_data;
103
-        }
104
-        $this->createFileObjects($data);
105
-        $this->initialized = true;
106
-    }
77
+	/**
78
+	 * Sets up the file objects from the request's $_FILES data.
79
+	 * @since 4.9.80.p
80
+	 * @throws UnexpectedValueException
81
+	 * @throws InvalidArgumentException
82
+	 * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
83
+	 */
84
+	protected function initialize()
85
+	{
86
+		if ($this->initialized) {
87
+			return;
88
+		}
89
+		$this->file_objects = new Collection(
90
+			// collection interface
91
+			'EventEspresso\core\services\request\files\FileSubmissionInterface',
92
+			// collection name
93
+			'submitted_files'
94
+		);
95
+		$files_raw_data = $this->request->filesParams();
96
+		if (empty($files_raw_data)) {
97
+			return;
98
+		}
99
+		if ($this->isStrangeFilesArray($files_raw_data)) {
100
+			$data = $this->fixFilesDataArray($files_raw_data);
101
+		} else {
102
+			$data = $files_raw_data;
103
+		}
104
+		$this->createFileObjects($data);
105
+		$this->initialized = true;
106
+	}
107 107
 
108
-    /**
109
-     * Detects if $_FILES is a weird multi-dimensional array that needs fixing or not.
110
-     * @since 4.9.80.p
111
-     * @param $files_data
112
-     * @return bool
113
-     * @throws UnexpectedValueException
114
-     */
115
-    protected function isStrangeFilesArray($files_data)
116
-    {
117
-        if (!is_array($files_data)) {
118
-            throw new UnexpectedValueException(
119
-                sprintf(
120
-                    esc_html__(
121
-                        'Unexpected PHP $_FILES data format. "%1$s" was expected to be an array.',
122
-                        'event_espresso'
123
-                    ),
124
-                    (string) $files_data
125
-                )
126
-            );
127
-        }
128
-        $first_value = reset($files_data);
129
-        if (!is_array($first_value)) {
130
-            throw new UnexpectedValueException(
131
-                sprintf(
132
-                    esc_html__(
133
-                        'Unexpected PHP $_FILES data format. "%1$s" was expected to be an array.',
134
-                        'event_espresso'
135
-                    ),
136
-                    (string) $first_value
137
-                )
138
-            );
139
-        }
140
-        $first_sub_array_item = reset($first_value);
141
-        if (is_array($first_sub_array_item)) {
142
-            // not just a 2d array
143
-            return true;
144
-        }
145
-        // yep, just 2d array
146
-        return false;
147
-    }
108
+	/**
109
+	 * Detects if $_FILES is a weird multi-dimensional array that needs fixing or not.
110
+	 * @since 4.9.80.p
111
+	 * @param $files_data
112
+	 * @return bool
113
+	 * @throws UnexpectedValueException
114
+	 */
115
+	protected function isStrangeFilesArray($files_data)
116
+	{
117
+		if (!is_array($files_data)) {
118
+			throw new UnexpectedValueException(
119
+				sprintf(
120
+					esc_html__(
121
+						'Unexpected PHP $_FILES data format. "%1$s" was expected to be an array.',
122
+						'event_espresso'
123
+					),
124
+					(string) $files_data
125
+				)
126
+			);
127
+		}
128
+		$first_value = reset($files_data);
129
+		if (!is_array($first_value)) {
130
+			throw new UnexpectedValueException(
131
+				sprintf(
132
+					esc_html__(
133
+						'Unexpected PHP $_FILES data format. "%1$s" was expected to be an array.',
134
+						'event_espresso'
135
+					),
136
+					(string) $first_value
137
+				)
138
+			);
139
+		}
140
+		$first_sub_array_item = reset($first_value);
141
+		if (is_array($first_sub_array_item)) {
142
+			// not just a 2d array
143
+			return true;
144
+		}
145
+		// yep, just 2d array
146
+		return false;
147
+	}
148 148
 
149
-    /**
150
-     * Takes into account that $_FILES does a weird thing when you have hierarchical form names (eg `<input type="file"
151
-     * name="my[hierarchical][form]">`): it leaves the top-level form part alone, but replaces the SECOND part with
152
-     * "name", "size", "tmp_name", etc. So that file's data is located at "my[name][hierarchical][form]",
153
-     * "my[size][hierarchical][form]", "my[tmp_name][hierarchical][form]", etc. It's really weird.
154
-     * @since 4.9.80.p
155
-     * @param $files_data
156
-     * @return array
157
-     */
158
-    protected function fixFilesDataArray($files_data)
159
-    {
160
-        $sane_files_array = [];
161
-        foreach ($files_data as $top_level_name => $top_level_children) {
162
-            $sub_array = [];
163
-            $sane_files_array[ $top_level_name ] = [];
164
-            foreach ($top_level_children as $file_data_part => $second_level_children) {
165
-                foreach ($second_level_children as $next_level_name => $sub_values) {
166
-                    $sub_array[ $next_level_name ] = $this->organizeFilesData($sub_values, $file_data_part);
167
-                }
168
-                $sane_files_array[ $top_level_name ] = array_replace_recursive(
169
-                    $sub_array,
170
-                    $sane_files_array[ $top_level_name ]
171
-                );
172
-            }
173
-        }
174
-        return $sane_files_array;
175
-    }
149
+	/**
150
+	 * Takes into account that $_FILES does a weird thing when you have hierarchical form names (eg `<input type="file"
151
+	 * name="my[hierarchical][form]">`): it leaves the top-level form part alone, but replaces the SECOND part with
152
+	 * "name", "size", "tmp_name", etc. So that file's data is located at "my[name][hierarchical][form]",
153
+	 * "my[size][hierarchical][form]", "my[tmp_name][hierarchical][form]", etc. It's really weird.
154
+	 * @since 4.9.80.p
155
+	 * @param $files_data
156
+	 * @return array
157
+	 */
158
+	protected function fixFilesDataArray($files_data)
159
+	{
160
+		$sane_files_array = [];
161
+		foreach ($files_data as $top_level_name => $top_level_children) {
162
+			$sub_array = [];
163
+			$sane_files_array[ $top_level_name ] = [];
164
+			foreach ($top_level_children as $file_data_part => $second_level_children) {
165
+				foreach ($second_level_children as $next_level_name => $sub_values) {
166
+					$sub_array[ $next_level_name ] = $this->organizeFilesData($sub_values, $file_data_part);
167
+				}
168
+				$sane_files_array[ $top_level_name ] = array_replace_recursive(
169
+					$sub_array,
170
+					$sane_files_array[ $top_level_name ]
171
+				);
172
+			}
173
+		}
174
+		return $sane_files_array;
175
+	}
176 176
 
177
-    /**
178
-     * Recursively explores the array until it finds a leaf node, and tacks `$type` as a final index in front of it.
179
-     * @since 4.9.80.p
180
-     * @param $data array|string
181
-     * @param $type 'name', 'tmp_name', 'size', or 'error'
182
-     * @param $name string
183
-     * @return array|string
184
-     */
185
-    protected function organizeFilesData($data, $type)
186
-    {
187
-        if (! is_array($data)) {
188
-            return [
189
-                $type => $data
190
-            ];
191
-        }
192
-        $organized_data = [];
193
-        foreach ($data as $input_name_part => $sub_inputs_or_value) {
194
-            if (is_array($sub_inputs_or_value)) {
195
-                $organized_data[ $input_name_part ] = $this->organizeFilesData($sub_inputs_or_value, $type);
196
-            } else {
197
-                $organized_data[ $input_name_part ][ $type ] = $sub_inputs_or_value;
198
-            }
199
-        }
200
-        return $organized_data;
201
-    }
177
+	/**
178
+	 * Recursively explores the array until it finds a leaf node, and tacks `$type` as a final index in front of it.
179
+	 * @since 4.9.80.p
180
+	 * @param $data array|string
181
+	 * @param $type 'name', 'tmp_name', 'size', or 'error'
182
+	 * @param $name string
183
+	 * @return array|string
184
+	 */
185
+	protected function organizeFilesData($data, $type)
186
+	{
187
+		if (! is_array($data)) {
188
+			return [
189
+				$type => $data
190
+			];
191
+		}
192
+		$organized_data = [];
193
+		foreach ($data as $input_name_part => $sub_inputs_or_value) {
194
+			if (is_array($sub_inputs_or_value)) {
195
+				$organized_data[ $input_name_part ] = $this->organizeFilesData($sub_inputs_or_value, $type);
196
+			} else {
197
+				$organized_data[ $input_name_part ][ $type ] = $sub_inputs_or_value;
198
+			}
199
+		}
200
+		return $organized_data;
201
+	}
202 202
 
203
-    /**
204
-     * Takes the organized $_FILES array (where all file info is located at the same spot as you'd expect an input
205
-     * to be in $_GET or $_POST, with all the file's data located side-by-side in an array) and creates a
206
-     * multi-dimensional array of FileSubmissionInterface objects. Stores it in `$this->file_objects`.
207
-     * @since 4.9.80.p
208
-     * @param array $organized_files $_FILES but organized like $_POST
209
-     * @param array $name_parts_so_far for multidimensional HTML form names,
210
-     * @throws UnexpectedValueException
211
-     * @throws InvalidArgumentException
212
-     */
213
-    protected function createFileObjects($organized_files, $name_parts_so_far = [])
214
-    {
215
-        if (!is_array($organized_files)) {
216
-            throw new UnexpectedValueException(
217
-                sprintf(
218
-                    esc_html__(
219
-                        'Unexpected PHP $organized_files data format. "%1$s" was expected to be an array.',
220
-                        'event_espresso'
221
-                    ),
222
-                    (string) $organized_files
223
-                )
224
-            );
225
-        }
226
-        foreach ($organized_files as $key => $value) {
227
-            $this_input_name_parts = $name_parts_so_far;
228
-            array_push(
229
-                $this_input_name_parts,
230
-                $key
231
-            );
232
-            if (isset($value['name'], $value['tmp_name'], $value['size'])) {
233
-                $html_name = $this->inputNameFromParts($this_input_name_parts);
234
-                $this->file_objects->add(
235
-                    new FileSubmission(
236
-                        $value['name'],
237
-                        $value['tmp_name'],
238
-                        $value['size'],
239
-                        $value['error']
240
-                    ),
241
-                    $html_name
242
-                );
243
-            } else {
244
-                $this->createFileObjects($value, $this_input_name_parts);
245
-            }
246
-        }
247
-    }
203
+	/**
204
+	 * Takes the organized $_FILES array (where all file info is located at the same spot as you'd expect an input
205
+	 * to be in $_GET or $_POST, with all the file's data located side-by-side in an array) and creates a
206
+	 * multi-dimensional array of FileSubmissionInterface objects. Stores it in `$this->file_objects`.
207
+	 * @since 4.9.80.p
208
+	 * @param array $organized_files $_FILES but organized like $_POST
209
+	 * @param array $name_parts_so_far for multidimensional HTML form names,
210
+	 * @throws UnexpectedValueException
211
+	 * @throws InvalidArgumentException
212
+	 */
213
+	protected function createFileObjects($organized_files, $name_parts_so_far = [])
214
+	{
215
+		if (!is_array($organized_files)) {
216
+			throw new UnexpectedValueException(
217
+				sprintf(
218
+					esc_html__(
219
+						'Unexpected PHP $organized_files data format. "%1$s" was expected to be an array.',
220
+						'event_espresso'
221
+					),
222
+					(string) $organized_files
223
+				)
224
+			);
225
+		}
226
+		foreach ($organized_files as $key => $value) {
227
+			$this_input_name_parts = $name_parts_so_far;
228
+			array_push(
229
+				$this_input_name_parts,
230
+				$key
231
+			);
232
+			if (isset($value['name'], $value['tmp_name'], $value['size'])) {
233
+				$html_name = $this->inputNameFromParts($this_input_name_parts);
234
+				$this->file_objects->add(
235
+					new FileSubmission(
236
+						$value['name'],
237
+						$value['tmp_name'],
238
+						$value['size'],
239
+						$value['error']
240
+					),
241
+					$html_name
242
+				);
243
+			} else {
244
+				$this->createFileObjects($value, $this_input_name_parts);
245
+			}
246
+		}
247
+	}
248 248
 
249
-    /**
250
-     * Takes the input name parts, like `['my', 'great', 'file', 'input1']`
251
-     * and returns the HTML name for it, "my[great][file][input1]"
252
-     * @since 4.9.80.p
253
-     * @param $parts
254
-     * @throws UnexpectedValueException
255
-     */
256
-    protected function inputNameFromParts($parts)
257
-    {
258
-        if (!is_array($parts)) {
259
-            throw new UnexpectedValueException(esc_html__('Name parts should be an array.', 'event_espresso'));
260
-        }
261
-        $generated_string = '';
262
-        foreach ($parts as $part) {
263
-            if ($generated_string === '') {
264
-                $generated_string = (string) $part;
265
-            } else {
266
-                $generated_string .= '[' . (string) $part . ']';
267
-            }
268
-        }
269
-        return $generated_string;
270
-    }
249
+	/**
250
+	 * Takes the input name parts, like `['my', 'great', 'file', 'input1']`
251
+	 * and returns the HTML name for it, "my[great][file][input1]"
252
+	 * @since 4.9.80.p
253
+	 * @param $parts
254
+	 * @throws UnexpectedValueException
255
+	 */
256
+	protected function inputNameFromParts($parts)
257
+	{
258
+		if (!is_array($parts)) {
259
+			throw new UnexpectedValueException(esc_html__('Name parts should be an array.', 'event_espresso'));
260
+		}
261
+		$generated_string = '';
262
+		foreach ($parts as $part) {
263
+			if ($generated_string === '') {
264
+				$generated_string = (string) $part;
265
+			} else {
266
+				$generated_string .= '[' . (string) $part . ']';
267
+			}
268
+		}
269
+		return $generated_string;
270
+	}
271 271
 
272
-    /**
273
-     * Gets the input by the indicated $name_parts.
274
-     * Eg if you're looking for an input named "my[great][file][input1]", $name_parts
275
-     * should be `['my', 'great', 'file', 'input1']`.
276
-     * Alternatively, you could use `FileDataHandler::getFileObject('my[great][file][input1]');`
277
-     * @since 4.9.80.p
278
-     * @param $name_parts
279
-     * @throws UnexpectedValueException
280
-     * @return FileSubmissionInterface
281
-     */
282
-    public function getFileObjectFromNameParts($name_parts)
283
-    {
284
-        return $this->getFileObjects()->get($this->inputNameFromParts($name_parts));
285
-    }
272
+	/**
273
+	 * Gets the input by the indicated $name_parts.
274
+	 * Eg if you're looking for an input named "my[great][file][input1]", $name_parts
275
+	 * should be `['my', 'great', 'file', 'input1']`.
276
+	 * Alternatively, you could use `FileDataHandler::getFileObject('my[great][file][input1]');`
277
+	 * @since 4.9.80.p
278
+	 * @param $name_parts
279
+	 * @throws UnexpectedValueException
280
+	 * @return FileSubmissionInterface
281
+	 */
282
+	public function getFileObjectFromNameParts($name_parts)
283
+	{
284
+		return $this->getFileObjects()->get($this->inputNameFromParts($name_parts));
285
+	}
286 286
 
287
-    /**
288
-     * Gets the FileSubmissionInterface corresponding to the HTML name provided.
289
-     * @since 4.9.80.p
290
-     * @param $html_name
291
-     * @return mixed
292
-     * @throws InvalidArgumentException
293
-     * @throws UnexpectedValueException
294
-     */
295
-    public function getFileObject($html_name)
296
-    {
297
-        return $this->getFileObjects()->get($html_name);
298
-    }
287
+	/**
288
+	 * Gets the FileSubmissionInterface corresponding to the HTML name provided.
289
+	 * @since 4.9.80.p
290
+	 * @param $html_name
291
+	 * @return mixed
292
+	 * @throws InvalidArgumentException
293
+	 * @throws UnexpectedValueException
294
+	 */
295
+	public function getFileObject($html_name)
296
+	{
297
+		return $this->getFileObjects()->get($html_name);
298
+	}
299 299
 }
300 300
 // End of file FilesDataHandler.php
301 301
 // Location: EventEspresso\core\services\request\files/FilesDataHandler.php
Please login to merge, or discard this patch.
core/services/request/files/FileSubmission.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function getType()
95 95
     {
96
-        if (!$this->type) {
96
+        if ( ! $this->type) {
97 97
             $this->type = $this->determineType();
98 98
         }
99 99
         return $this->type;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function determineType()
107 107
     {
108
-        if (!$this->getTmpFile()) {
108
+        if ( ! $this->getTmpFile()) {
109 109
             return '';
110 110
         }
111 111
         $finfo = new finfo(FILEINFO_MIME_TYPE);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function getExtension()
121 121
     {
122
-        if (!$this->extension) {
122
+        if ( ! $this->extension) {
123 123
             $this->extension = $this->determineExtension();
124 124
         }
125 125
         return $this->extension;
Please login to merge, or discard this patch.
Indentation   +158 added lines, -158 removed lines patch added patch discarded remove patch
@@ -19,164 +19,164 @@
 block discarded – undo
19 19
  */
20 20
 class FileSubmission implements FileSubmissionInterface
21 21
 {
22
-    /**
23
-     * @var string original name on the client machine
24
-     */
25
-    protected $name;
26
-
27
-    /**
28
-     * @var string mime type
29
-     */
30
-    protected $type;
31
-
32
-    /**
33
-     * @var string file extension
34
-     */
35
-    protected $extension;
36
-
37
-    /**
38
-     * @var int in bytes
39
-     */
40
-    protected $size;
41
-
42
-    /**
43
-     * @var string local filepath to the temporary file
44
-     */
45
-    protected $tmp_file;
46
-
47
-    /**
48
-     * @var int one of UPLOAD_ERR_OK, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE or other values
49
-     * although those aren't expected.
50
-     */
51
-    protected $error_code;
52
-
53
-    /**
54
-     * FileSubmission constructor.
55
-     * @param $name
56
-     * @param $tmp_file
57
-     * @param $size
58
-     * @param null $error_code
59
-     * @throws InvalidArgumentException
60
-     */
61
-    public function __construct($name, $tmp_file, $size, $error_code = null)
62
-    {
63
-        $this->name = basename($name);
64
-        $scheme = parse_url($tmp_file, PHP_URL_SCHEME);
65
-        if (in_array($scheme, ['http', 'https'])) {
66
-            // Wait a minute- just local filepaths please, no URL schemes allowed!
67
-            throw new InvalidArgumentException(
68
-                sprintf(
69
-                    // @codingStandardsIgnoreStart
70
-                    esc_html__('The scheme ("%1$s") on the temporary file ("%2$s") indicates is located elsewhere, that’s not ok!', 'event_espresso'),
71
-                    // @codingStandardsIgnoreEnd
72
-                    $scheme,
73
-                    $tmp_file
74
-                )
75
-            );
76
-        }
77
-        $this->tmp_file = (string) $tmp_file;
78
-        $this->size = (int) $size;
79
-        $this->error_code = (int) $error_code;
80
-    }
81
-
82
-    /**
83
-     * @return string
84
-     */
85
-    public function getName()
86
-    {
87
-        return $this->name;
88
-    }
89
-
90
-    /**
91
-     * Gets the file's mime type
92
-     * @return string
93
-     */
94
-    public function getType()
95
-    {
96
-        if (!$this->type) {
97
-            $this->type = $this->determineType();
98
-        }
99
-        return $this->type;
100
-    }
101
-
102
-    /**
103
-     * @since 4.9.80.p
104
-     * @return string
105
-     */
106
-    protected function determineType()
107
-    {
108
-        if (!$this->getTmpFile()) {
109
-            return '';
110
-        }
111
-        $finfo = new finfo(FILEINFO_MIME_TYPE);
112
-        return $finfo->file($this->getTmpFile());
113
-    }
114
-
115
-    /**
116
-     * Gets the file's extension.
117
-     * @since 4.9.80.p
118
-     * @return string
119
-     */
120
-    public function getExtension()
121
-    {
122
-        if (!$this->extension) {
123
-            $this->extension = $this->determineExtension();
124
-        }
125
-        return $this->extension;
126
-    }
127
-
128
-    /**
129
-     * Determine's the file's extension given the temporary file.
130
-     * @since 4.9.80.p
131
-     * @return string
132
-     */
133
-    protected function determineExtension()
134
-    {
135
-        $position_of_period = strrpos($this->getName(), '.');
136
-        if ($position_of_period === false) {
137
-            return '';
138
-        }
139
-        return mb_substr(
140
-            $this->getName(),
141
-            $position_of_period + 1
142
-        );
143
-    }
144
-
145
-    /**
146
-     * Gets the size of the file
147
-     * @return int
148
-     */
149
-    public function getSize()
150
-    {
151
-        return $this->size;
152
-    }
153
-
154
-    /**
155
-     * Gets the path to the temporary file which was uploaded.
156
-     * @return string
157
-     */
158
-    public function getTmpFile()
159
-    {
160
-        return $this->tmp_file;
161
-    }
162
-
163
-    /**
164
-     * @since 4.9.80.p
165
-     * @return string
166
-     */
167
-    public function __toString()
168
-    {
169
-        return $this->getName();
170
-    }
171
-
172
-    /**
173
-     * Gets the error code PHP reported for the file upload.
174
-     * @return string
175
-     */
176
-    public function getErrorCode()
177
-    {
178
-        return $this->error_code;
179
-    }
22
+	/**
23
+	 * @var string original name on the client machine
24
+	 */
25
+	protected $name;
26
+
27
+	/**
28
+	 * @var string mime type
29
+	 */
30
+	protected $type;
31
+
32
+	/**
33
+	 * @var string file extension
34
+	 */
35
+	protected $extension;
36
+
37
+	/**
38
+	 * @var int in bytes
39
+	 */
40
+	protected $size;
41
+
42
+	/**
43
+	 * @var string local filepath to the temporary file
44
+	 */
45
+	protected $tmp_file;
46
+
47
+	/**
48
+	 * @var int one of UPLOAD_ERR_OK, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE or other values
49
+	 * although those aren't expected.
50
+	 */
51
+	protected $error_code;
52
+
53
+	/**
54
+	 * FileSubmission constructor.
55
+	 * @param $name
56
+	 * @param $tmp_file
57
+	 * @param $size
58
+	 * @param null $error_code
59
+	 * @throws InvalidArgumentException
60
+	 */
61
+	public function __construct($name, $tmp_file, $size, $error_code = null)
62
+	{
63
+		$this->name = basename($name);
64
+		$scheme = parse_url($tmp_file, PHP_URL_SCHEME);
65
+		if (in_array($scheme, ['http', 'https'])) {
66
+			// Wait a minute- just local filepaths please, no URL schemes allowed!
67
+			throw new InvalidArgumentException(
68
+				sprintf(
69
+					// @codingStandardsIgnoreStart
70
+					esc_html__('The scheme ("%1$s") on the temporary file ("%2$s") indicates is located elsewhere, that’s not ok!', 'event_espresso'),
71
+					// @codingStandardsIgnoreEnd
72
+					$scheme,
73
+					$tmp_file
74
+				)
75
+			);
76
+		}
77
+		$this->tmp_file = (string) $tmp_file;
78
+		$this->size = (int) $size;
79
+		$this->error_code = (int) $error_code;
80
+	}
81
+
82
+	/**
83
+	 * @return string
84
+	 */
85
+	public function getName()
86
+	{
87
+		return $this->name;
88
+	}
89
+
90
+	/**
91
+	 * Gets the file's mime type
92
+	 * @return string
93
+	 */
94
+	public function getType()
95
+	{
96
+		if (!$this->type) {
97
+			$this->type = $this->determineType();
98
+		}
99
+		return $this->type;
100
+	}
101
+
102
+	/**
103
+	 * @since 4.9.80.p
104
+	 * @return string
105
+	 */
106
+	protected function determineType()
107
+	{
108
+		if (!$this->getTmpFile()) {
109
+			return '';
110
+		}
111
+		$finfo = new finfo(FILEINFO_MIME_TYPE);
112
+		return $finfo->file($this->getTmpFile());
113
+	}
114
+
115
+	/**
116
+	 * Gets the file's extension.
117
+	 * @since 4.9.80.p
118
+	 * @return string
119
+	 */
120
+	public function getExtension()
121
+	{
122
+		if (!$this->extension) {
123
+			$this->extension = $this->determineExtension();
124
+		}
125
+		return $this->extension;
126
+	}
127
+
128
+	/**
129
+	 * Determine's the file's extension given the temporary file.
130
+	 * @since 4.9.80.p
131
+	 * @return string
132
+	 */
133
+	protected function determineExtension()
134
+	{
135
+		$position_of_period = strrpos($this->getName(), '.');
136
+		if ($position_of_period === false) {
137
+			return '';
138
+		}
139
+		return mb_substr(
140
+			$this->getName(),
141
+			$position_of_period + 1
142
+		);
143
+	}
144
+
145
+	/**
146
+	 * Gets the size of the file
147
+	 * @return int
148
+	 */
149
+	public function getSize()
150
+	{
151
+		return $this->size;
152
+	}
153
+
154
+	/**
155
+	 * Gets the path to the temporary file which was uploaded.
156
+	 * @return string
157
+	 */
158
+	public function getTmpFile()
159
+	{
160
+		return $this->tmp_file;
161
+	}
162
+
163
+	/**
164
+	 * @since 4.9.80.p
165
+	 * @return string
166
+	 */
167
+	public function __toString()
168
+	{
169
+		return $this->getName();
170
+	}
171
+
172
+	/**
173
+	 * Gets the error code PHP reported for the file upload.
174
+	 * @return string
175
+	 */
176
+	public function getErrorCode()
177
+	{
178
+		return $this->error_code;
179
+	}
180 180
 }
181 181
 // End of file FileSubmission.php
182 182
 // Location: EventEspresso\core\services\request\files/FileSubmission.php
Please login to merge, or discard this patch.
admin/extend/events/templates/event_registration_options.template.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -5,38 +5,38 @@
 block discarded – undo
5 5
 
6 6
 <?php
7 7
 $settings_array = array(
8
-    'max_registrants'                 => '<p>
8
+	'max_registrants'                 => '<p>
9 9
         <label for="max-registrants">'
10
-                                         . esc_html__(
11
-                                             'Maximum number of tickets allowed per order for this event: ',
12
-                                             'event_espresso'
13
-                                         ) . '</label>
10
+										 . esc_html__(
11
+											 'Maximum number of tickets allowed per order for this event: ',
12
+											 'event_espresso'
13
+										 ) . '</label>
14 14
         <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit . '" size="4" />
15 15
         </p>',
16
-    'additional_registration_options' => $additional_registration_options,
17
-    'display_ticket_selector'         => '<p>
16
+	'additional_registration_options' => $additional_registration_options,
17
+	'display_ticket_selector'         => '<p>
18 18
             <label>' . esc_html__('Display Ticket Selector', 'event_espresso') . '</label>' . $display_ticket_selector . '</p>',
19
-    'alternative_registration_page'   => '<p>
19
+	'alternative_registration_page'   => '<p>
20 20
             <label>' . esc_html__('Alternative Registration Page', 'event_espresso') . '</label>
21 21
             <input name="externalURL" size="20" type="text" value="' . $_event->external_url() . '"> 
22 22
             </p>',
23
-    'event_phone_number'              => '<p>
23
+	'event_phone_number'              => '<p>
24 24
             <label>' . esc_html__('Event Phone Number', 'event_espresso') . '</label>
25 25
             <input name="event_phone" size="20" type="text" value="' . $_event->phone() . '">
26 26
             </p>',
27
-    'default_registration_status'     => '<p>
27
+	'default_registration_status'     => '<p>
28 28
             <label>'
29
-                                         . esc_html__(
30
-                                             'Default Registration Status',
31
-                                             'event_espresso'
32
-                                         ) . '</label>'
33
-                                         . EEH_Template::get_help_tab_link('event_editor_event_registration_options_help_tab')
34
-                                         . $EVT_default_registration_status . '</p>',
29
+										 . esc_html__(
30
+											 'Default Registration Status',
31
+											 'event_espresso'
32
+										 ) . '</label>'
33
+										 . EEH_Template::get_help_tab_link('event_editor_event_registration_options_help_tab')
34
+										 . $EVT_default_registration_status . '</p>',
35 35
 );
36 36
 // filter
37 37
 $settings_array = apply_filters('FHEE__caffeinated_event_registration_options__template__settings', $settings_array);
38 38
 
39 39
 // echo
40 40
 foreach ($settings_array as $item) {
41
-    echo $item;
41
+	echo $item;
42 42
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,28 +10,28 @@
 block discarded – undo
10 10
                                          . esc_html__(
11 11
                                              'Maximum number of tickets allowed per order for this event: ',
12 12
                                              'event_espresso'
13
-                                         ) . '</label>
14
-        <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit . '" size="4" />
13
+                                         ).'</label>
14
+        <input class="ee-numeric" type="text" id="max-registrants" name="additional_limit" value="' . $additional_limit.'" size="4" />
15 15
         </p>',
16 16
     'additional_registration_options' => $additional_registration_options,
17 17
     'display_ticket_selector'         => '<p>
18
-            <label>' . esc_html__('Display Ticket Selector', 'event_espresso') . '</label>' . $display_ticket_selector . '</p>',
18
+            <label>' . esc_html__('Display Ticket Selector', 'event_espresso').'</label>'.$display_ticket_selector.'</p>',
19 19
     'alternative_registration_page'   => '<p>
20
-            <label>' . esc_html__('Alternative Registration Page', 'event_espresso') . '</label>
21
-            <input name="externalURL" size="20" type="text" value="' . $_event->external_url() . '"> 
20
+            <label>' . esc_html__('Alternative Registration Page', 'event_espresso').'</label>
21
+            <input name="externalURL" size="20" type="text" value="' . $_event->external_url().'"> 
22 22
             </p>',
23 23
     'event_phone_number'              => '<p>
24
-            <label>' . esc_html__('Event Phone Number', 'event_espresso') . '</label>
25
-            <input name="event_phone" size="20" type="text" value="' . $_event->phone() . '">
24
+            <label>' . esc_html__('Event Phone Number', 'event_espresso').'</label>
25
+            <input name="event_phone" size="20" type="text" value="' . $_event->phone().'">
26 26
             </p>',
27 27
     'default_registration_status'     => '<p>
28 28
             <label>'
29 29
                                          . esc_html__(
30 30
                                              'Default Registration Status',
31 31
                                              'event_espresso'
32
-                                         ) . '</label>'
32
+                                         ).'</label>'
33 33
                                          . EEH_Template::get_help_tab_link('event_editor_event_registration_options_help_tab')
34
-                                         . $EVT_default_registration_status . '</p>',
34
+                                         . $EVT_default_registration_status.'</p>',
35 35
 );
36 36
 // filter
37 37
 $settings_array = apply_filters('FHEE__caffeinated_event_registration_options__template__settings', $settings_array);
Please login to merge, or discard this patch.