PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 3.1
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v3.1
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 / Classes / FormShortcodeDefaults.php
wp-user-avatar / src / Classes Last commit date
AdminNotices.php 5 years ago AjaxHandler.php 5 years ago Autologin.php 5 years ago BuddyPressBbPress.php 5 years ago EditUserProfile.php 5 years ago ExtensionManager.php 5 years ago FileUploader.php 5 years ago FormPreviewHandler.php 5 years ago FormRepository.php 5 years ago FormShortcodeDefaults.php 5 years ago GDPR.php 5 years ago GlobalSiteAccess.php 5 years ago ImageUploader.php 5 years ago LoginAuth.php 5 years ago Miscellaneous.php 5 years ago ModifyRedirectDefaultLinks.php 5 years ago PPRESS_Session.php 5 years ago PROFILEPRESS_sql.php 5 years ago PasswordReset.php 5 years ago ProfileUrlRewrite.php 5 years ago RegistrationAuth.php 5 years ago SendEmail.php 5 years ago ShortcodeThemeFactory.php 5 years ago UserAvatar.php 5 years ago UserSignupLocationListingPage.php 5 years ago UsernameEmailRestrictLogin.php 5 years ago WelcomeEmailAfterSignup.php 5 years ago default-email-template.php 5 years ago index.php 5 years ago
FormShortcodeDefaults.php
339 lines
1 <?php
2
3 namespace ProfilePress\Core\Classes;
4
5 class FormShortcodeDefaults
6 {
7 protected $form_type;
8
9 public function __construct($form_type)
10 {
11 $this->form_type = str_replace('-', '_', $form_type);
12 }
13
14 public function get_structure()
15 {
16 $method = $this->form_type . '_structure';
17
18 if ( ! method_exists($this, $method)) {
19 return '';
20 }
21
22 return $this->$method();
23 }
24
25 public function get_css()
26 {
27 $method = $this->form_type . '_css';
28
29 if ( ! method_exists($this, $method)) {
30 return '';
31 }
32
33 return $this->$method();
34 }
35
36 public function success_message()
37 {
38 $method = $this->form_type . '_success_message';
39
40 if ( ! method_exists($this, $method)) {
41 return '';
42 }
43
44 return $this->$method();
45 }
46
47 public function user_profile_structure()
48 {
49 return <<<HTML
50 <h1>[profile-username]'s Profile</h1>
51
52 <div class="profile-avatar">
53 <img class="avatar" src="[profile-avatar-url]">
54 </div>
55
56 <div class="profile-detail">
57
58 <p>Username: [profile-username]</p>
59
60 <p>Email: [profile-email]</p>
61
62 <p>Website: [profile-website]</p>
63
64 <p>First Name: [profile-first-name]</p>
65
66 <p>Last Name: [profile-last-name]</p>
67
68 <p>Gender: [profile-cpf key="gender"]</p>
69 </div>
70 HTML;
71
72 }
73
74 public function login_structure()
75 {
76 return <<<HTML
77 <div class="login-form">
78
79 <p>[login-username placeholder="Username" class="login-name"]</p>
80
81 <p>[login-password placeholder="Password" class="login-passkey"]</p>
82
83 <p>[login-remember class="remember-me"] Remember Me</p>
84
85 <p>[login-submit value="Sign In" class="login-name"]</p>
86
87 [link-registration class="reg" label="Register Now"] | [link-lost-password class="lostp" label="Forgot Password?"]
88
89 </div>
90 HTML;
91
92 }
93
94 public function login_css()
95 {
96 return <<<CSS
97 /* css class for the login generated errors */
98
99 .profilepress-login-status {
100 background-color: #34495e;
101 color: #ffffff;
102 border: medium none;
103 border-radius: 4px;
104 font-size: 15px;
105 font-weight: normal;
106 line-height: 1.4;
107 padding: 8px 5px;
108 }
109
110 .profilepress-login-status a {
111 color: #ea9629 !important;
112 }
113 CSS;
114
115 }
116
117 public function registration_structure()
118 {
119 return <<<HTML
120 <div class="reg-form">
121
122 <p>
123 <label for="id-username">Username</label>
124 [reg-username id="id-username" placeholder="Username" class="registration-name"]
125 </p>
126
127 <p>
128 <label for="id-password">Password</label>
129 [reg-password id="id-password" placeholder="Password" class="registration-passkey"]
130 </p>
131
132 <p>
133 <label for="id-email">Email Address</label>
134 [reg-email id="id-email" placeholder="Email" class="reg-email"]
135 </p>
136
137 <p>
138 <label for="id-website">Website</label>
139 [reg-website class="reg-website" placeholder="Website" id="website-id" required]
140 </p>
141
142 <p>
143 <label for="id-nickname">Nickname</label>
144 [reg-nickname class="nickname" placeholder="Nickname" id="nickname-id"]
145 </p>
146
147 <p>
148 <label for="id-firstname">First Name</label>
149 [reg-first-name class="firstname" id="firstname-id" placeholder="First Name"]
150 </p>
151
152 <p>
153 <label for="id-lastname">Last Name</label>
154 [reg-last-name class="remember-me" id="lastname-id" placeholder="Last Name" required]
155 </p>
156
157 <p>
158 [reg-submit value="Register" class="submit" id="submit-button"]
159 </p>
160
161 <p>
162 Have an account? [link-login label="Login"]
163 </p>
164
165 </div>
166 HTML;
167
168 }
169
170 public function registration_css()
171 {
172 return <<<CSS
173 /* css class for the registration form generated errors */
174
175 .profilepress-reg-status {
176 border-radius: 6px;
177 font-size: 17px;
178 line-height: 1.471;
179 padding: 10px 19px;
180 background-color: #e74c3c;
181 color: #ffffff;
182 font-weight: normal;
183 display: block;
184 text-align: center;
185 vertical-align: middle;
186 margin: 5px 0;
187 }
188 CSS;
189
190 }
191
192 public function registration_success_message()
193 {
194 return '<div>Registration successful.</div>';
195 }
196
197 public function edit_profile_structure()
198 {
199 return <<<HTML
200 <div class="edit-profile">
201
202 <p>
203 <label for="id-username">Username</label>
204 [edit-profile-username id="id-username" placeholder="username" class="edit-profile-name"]
205 </p>
206
207 <p>
208 <label for="id-password">Password</label>
209 [edit-profile-password id="id-password" placeholder="password" class="edit-profile-passkey"]
210 </p>
211
212 <p>
213 <label for="id-email">Email Address</label>
214 [edit-profile-email id="id-email" placeholder="Email" class="reg-email"]
215 </p>
216
217 <p>
218 <label for="id-website">Website</label>
219 [edit-profile-website class="reg-website" placeholder="Website" id="id-website"]
220 </p>
221
222 <p>
223 <label for="id-nickname">Nickname</label>
224 [edit-profile-nickname class="remember-me" placeholder="Nickname" id="id-nickname"]
225 </p>
226
227 <p>
228 [pp-user-avatar class="user-avatar"]
229 </p>
230 [pp-remove-avatar-button label="Remove" class="removed"]
231
232 <p>
233 <label for="id-nickname">Profile Picture</label>
234 [edit-profile-avatar class="avatar" placeholder="avatar" id="id-avatar"]
235 </p>
236
237 <p>
238 <label for="id-display-name">Display Name</label>
239 [edit-profile-display-name class="display-name" placeholder="Display Name" id="id-display-name"]
240 </p>
241
242 <p>
243 <label for="id-firstname">First Name</label>
244 [edit-profile-first-name class="remember-me" id="id-firstname" placeholder="First Name"]
245 </p>
246
247 <p>
248 <label for="id-lastname">Last Name</label>
249 [edit-profile-last-name class="remember-me" id="id-lastname" placeholder="Last Name"]
250 </p>
251
252 <p>
253 [edit-profile-submit value="Edit Profile" class="submit" id="submit-button"]
254 </p>
255
256 </div>
257 HTML;
258
259 }
260
261 public function edit_profile_css()
262 {
263 return <<<CSS
264 /* css class for the edit profile generated errors */
265
266 .profilepress-edit-profile-status {
267 background-color: #34495e;
268 color: #ffffff;
269 border: medium none;
270 border-radius: 4px;
271 font-size: 15px;
272 line-height: 1.4;
273 padding: 8px 5px;
274 font-weight: bold;
275 margin:4px 1px;
276 }
277 CSS;
278
279 }
280
281 public function edit_profile_success_message()
282 {
283 return '<div>Changes saved.</div>';
284 }
285
286 public function password_reset_structure()
287 {
288 return <<<HTML
289 <div>
290
291 <p>Please enter your username or email address.</p>
292 <p>You will receive a link to create a new password via email.</p>
293
294 <p>[user-login id="login" placeholder="Username or E-mail:" class="user-login"]</p>
295
296 <p>[reset-submit value="Reset Password" class="submit" id="submit-button"]</p>
297
298 </div>
299 HTML;
300
301 }
302
303 public function password_reset_css()
304 {
305 return <<<CSS
306 /* css class for the password reset form generated errors */
307
308 .profilepress-reset-status {
309 background-color: #27CCC0;
310 color: #fff;
311 padding: 1em 2em 1em 3.5em;
312 margin: 0 0 2em;
313 }
314 CSS;
315
316 }
317
318 public function password_reset_handler()
319 {
320 return <<<HTML
321 <div class="pp-reset-password-form">
322 <h3>Enter your new password below</h3>
323 <label for="password1">New password<span class="req">*</span></label>
324 [enter-password id="password1" required autocomplete="off"]
325
326 <label for="password2">Re-enter new password<span class="req">*</span></label>
327 [re-enter-password id="password2" required autocomplete="off"]
328
329 [password-reset-submit class="pp-reset-button pp-reset-button-block" value="Save"]
330 </div>
331 HTML;
332
333 }
334
335 public function password_reset_success_message()
336 {
337 return '<div>Check your email for further instruction</div>';
338 }
339 }