PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.16.19
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.16.19
4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / src / Themes / DragDrop / Registration / PerfectoLite.php
wp-user-avatar / src / Themes / DragDrop / Registration Last commit date
BuildScratch.php 5 years ago PerfectoLite.php 3 years ago Tulip.php 5 years ago
PerfectoLite.php
263 lines
1 <?php
2
3 namespace ProfilePress\Core\Themes\DragDrop\Registration;
4
5 use ProfilePress\Core\Admin\SettingsPages\DragDropBuilder\DragDropBuilder;
6 use ProfilePress\Core\Themes\DragDrop\AbstractTheme;
7 use ProfilePress\Core\Admin\SettingsPages\DragDropBuilder\Fields;
8
9 class PerfectoLite extends AbstractTheme
10 {
11 public static function default_field_listing()
12 {
13 Fields\Init::init();
14 $standard_fields = DragDropBuilder::get_instance()->standard_fields();
15
16 return [
17 $standard_fields['reg-username'],
18 $standard_fields['reg-email'],
19 $standard_fields['reg-password'],
20 $standard_fields['reg-first-name'],
21 $standard_fields['reg-last-name'],
22 ];
23 }
24
25 public function appearance_settings($settings)
26 {
27 $settings[] = [
28 'id' => 'perfectolite_registration_headline',
29 'type' => 'text',
30 'label' => esc_html__('Headline', 'wp-user-avatar'),
31 'priority' => 20
32 ];
33
34 return $settings;
35 }
36
37 public function color_settings($settings)
38 {
39 $settings2 = [
40 [
41 'id' => 'perfectolite_registration_bg_color',
42 'type' => 'color',
43 'label' => esc_html__('Background', 'wp-user-avatar')
44 ],
45 [
46 'id' => 'perfectolite_registration_border',
47 'type' => 'color',
48 'label' => esc_html__('Form Border', 'wp-user-avatar')
49 ],
50 [
51 'id' => 'perfectolite_registration_text_color',
52 'type' => 'color',
53 'label' => esc_html__('Text', 'wp-user-avatar')
54 ],
55 [
56 'id' => 'perfectolite_registration_placeholder_color',
57 'type' => 'color',
58 'label' => esc_html__('Field Placeholder', 'wp-user-avatar')
59 ],
60 [
61 'id' => 'perfectolite_registration_button_bg_color',
62 'type' => 'color',
63 'label' => esc_html__('Button Background', 'wp-user-avatar')
64 ],
65 [
66 'id' => 'perfectolite_registration_button_text_color',
67 'type' => 'color',
68 'label' => esc_html__('Button Text', 'wp-user-avatar')
69 ]
70 ];
71
72 return array_merge($settings, $settings2);
73 }
74
75 public function default_metabox_settings()
76 {
77 $data = parent::default_metabox_settings();
78 $data['perfectolite_registration_headline'] = esc_html__('Create an Account', 'wp-user-avatar');
79 $data['perfectolite_registration_bg_color'] = '#ffffff';
80 $data['perfectolite_registration_border'] = '#f0f0f0';
81 $data['perfectolite_registration_text_color'] = '#555555';
82 $data['perfectolite_registration_placeholder_color'] = '#555555';
83 $data['perfectolite_registration_button_bg_color'] = '#196cd8';
84 $data['perfectolite_registration_button_text_color'] = '#ffffff';
85
86 return $data;
87 }
88
89 public function form_structure()
90 {
91 $fields = $this->field_listing();
92 $registration_button = $this->form_submit_button();
93 $headline = wp_kses_post($this->get_meta('perfectolite_registration_headline'));
94
95 return <<<HTML
96 [pp-form-wrapper class="perfecto"]
97 <div class="perfecto-heading">$headline</div>
98 $fields
99 $registration_button
100 [/pp-form-wrapper]
101 HTML;
102
103 }
104
105 public function form_css()
106 {
107 $form_id = $this->form_id;
108 $form_type = $this->form_type;
109
110 $bg_color = esc_html($this->get_meta('perfectolite_registration_bg_color'));
111 $border_color = esc_html($this->get_meta('perfectolite_registration_border'));
112 $text_color = esc_html($this->get_meta('perfectolite_registration_text_color'));
113 $placeholder_color = esc_html($this->get_meta('perfectolite_registration_placeholder_color'));
114 $button_bg_color = esc_html($this->get_meta('perfectolite_registration_button_bg_color'));
115 $button_text_color = esc_html($this->get_meta('perfectolite_registration_button_text_color'));
116
117 return <<<CSS
118 /* css class for the form generated errors */
119 #pp-$form_type-$form_id-wrap .profilepress-reg-status {
120 border-radius: 5px;
121 font-size: 16px;
122 line-height: 1.471;
123 padding: 10px;
124 background-color: #e74c3c;
125 color: #ffffff;
126 font-weight: normal;
127 text-align: center;
128 vertical-align: middle;
129 margin: 10px auto;
130 -webkit-box-sizing: border-box;
131 -moz-box-sizing: border-box;
132 box-sizing: border-box;
133 max-width: 450px;
134 }
135
136 #pp-$form_type-$form_id-wrap .profilepress-reg-status.success {
137 background-color: #2ecc71;
138 color: #fff;
139 }
140
141 #pp-$form_type-$form_id-wrap .profilepress-reg-status a {
142 color: #fff;
143 text-decoration: underline;
144 }
145
146 div#pp-$form_type-$form_id.perfecto * {
147 -webkit-box-sizing: border-box;
148 -moz-box-sizing: border-box;
149 box-sizing: border-box;
150 color: $text_color;
151 }
152
153 div#pp-$form_type-$form_id.perfecto ::placeholder{
154 color: $placeholder_color;
155 }
156
157 div#pp-$form_type-$form_id.perfecto ::-webkit-input-placeholder{
158 color: $placeholder_color;
159 }
160
161 div#pp-$form_type-$form_id.perfecto ::-moz-placeholder{
162 color: $placeholder_color;
163 }
164
165 div#pp-$form_type-$form_id.perfecto :-moz-placeholder{
166 color: $placeholder_color;
167 }
168
169 div#pp-$form_type-$form_id.perfecto :-ms-input-placeholder{
170 color: $placeholder_color;
171 }
172
173 div#pp-$form_type-$form_id.perfecto {
174 margin: 5px auto;
175 border: 2px solid $border_color;
176 background: $bg_color;
177 max-width: 450px;
178 padding: 30px;
179 width: 100%;
180 font-family: helvetica, arial, sans-serif;
181 -webkit-font-smoothing: antialiased;
182 -moz-font-smoothing: antialiased;
183 font-smoothing: antialiased;
184 font-size: 14px;
185 line-height: 24px;
186 -webkit-box-sizing: border-box;
187 -moz-box-sizing: border-box;
188 box-sizing: border-box;
189 }
190
191 div#pp-$form_type-$form_id.perfecto .perfecto-heading {
192 font-size: 24px;
193 line-height: 34px;
194 margin-bottom: 20px;
195 display: block;
196 font-weight: 100;
197 text-align: center;
198 }
199
200 div#pp-$form_type-$form_id.perfecto input:not([type="submit"]),
201 div#pp-$form_type-$form_id.perfecto select,
202 div#pp-$form_type-$form_id.perfecto textarea {
203 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125);
204 padding: 12px 18px;
205 width: 100%;
206 outline: none;
207 font-size: 12px;
208 line-height: 22px;
209 font-family: helvetica, arial, sans-serif;
210 -webkit-font-smoothing: antialiased;
211 -moz-font-smoothing: antialiased;
212 font-smoothing: antialiased;
213 border: 1px solid #ddd;
214 -webkit-border-radius: 2px;
215 -moz-border-radius: 2px;
216 border-radius: 2px;
217 -webkit-transition: 0.4s;
218 -moz-transition: 0.4s;
219 transition: 0.4s;
220 margin: 0;
221 }
222
223 div#pp-$form_type-$form_id.perfecto .pp-form-field-wrap {
224 margin-bottom: 15px;
225 }
226
227 div#pp-$form_type-$form_id.perfecto input:not([type="submit"]):focus {
228 border-color: #ccc;
229 background: #fafafa;
230 -webkit-box-shadow: inset 0px 1px 5px 0px #f0f0f0;
231 -moz-box-shadow: inset 0px 1px 5px 0px #f0f0f0;
232 box-shadow: inset 0px 1px 5px 0px #f0f0f0;
233 }
234
235 div#pp-$form_type-$form_id.perfecto input.ppform-submit-button {
236 padding: 12px 26px;
237 width: 100%;
238 border: 0;
239 outline: none;
240 margin: 0;
241 color: $button_text_color;
242 cursor: pointer;
243 background: $button_bg_color;
244 font-size: 11px;
245 line-height: 21px;
246 letter-spacing: 1px;
247 text-transform: uppercase;
248 font-weight: bold;
249 font-family: helvetica, arial, sans-serif;
250 -webkit-font-smoothing: antialiased;
251 -moz-font-smoothing: antialiased;
252 font-smoothing: antialiased;
253 -webkit-border-radius: 2px;
254 -moz-border-radius: 2px;
255 border-radius: 2px;
256 -webkit-transition: 0.4s;
257 -moz-transition: 0.4s;
258 transition: 0.4s;
259 }
260 CSS;
261
262 }
263 }