PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.25
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.25
1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.23 All 172 releases
userswp / includes / class-uwp-defaults.php

class-uwp-defaults.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.2.25, at includes/class-uwp-defaults.php

407 lines 9.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * UsersWP UsersWP_Defaults.
9 *
10 * A place to store default values used in many places.
11 *
12 * @class UsersWP_Defaults
13 * @package UsersWP/Classes
14 * @category Class
15 * @author AyeCode
16 */
17 class UsersWP_Defaults {
18
19 /**
20 * The new user account registration email subject default.
21 *
22 * @return string
23 */
24 public static function wp_new_user_notification_email_subject() {
25 return apply_filters( 'wp_new_user_notification_email_subject', __( "[[#site_name#]] Login Details", "userswp" ) );
26 }
27
28 /**
29 * The new user account registration email body default.
30 *
31 * @return string
32 */
33 public static function wp_new_user_notification_email_content() {
34 return apply_filters( 'wp_new_user_notification_email_content',
35 __( "Dear [#user_name#],
36
37 To set your password, visit the following address:
38
39 [#reset_link#]
40
41 You can login here: [#login_url#]
42
43 Thank you,
44 [#site_name_url#]", "userswp"
45 )
46 );
47 }
48
49 /**
50 * The new user account registration email subject default.
51 *
52 * @return string
53 */
54 public static function wp_new_user_notification_email_subject_admin() {
55 return apply_filters( 'wp_new_user_notification_email_subject', __( "[[#site_name#]] New User Registration", "userswp" ) );
56 }
57
58 /**
59 * The new user account registration email body default.
60 *
61 * @return string
62 */
63 public static function wp_new_user_notification_email_content_admin() {
64 return apply_filters( 'wp_new_user_notification_email_content',
65 __( "Dear Admin,
66
67 New user registration on your site: [#site_name#]
68
69 Username: [#username#]
70
71 Email: [#user_email#]
72
73 Thank you,
74 [#site_name_url#]", "userswp"
75 )
76 );
77 }
78
79 /**
80 * The new user account registration email subject default.
81 *
82 * @return string
83 */
84 public static function registration_activate_email_subject() {
85 return apply_filters( 'uwp_registration_activate_email_subject', __( "[[#site_name#]] Please activate your account", "userswp" ) );
86 }
87
88 /**
89 * The new user account registration email body default.
90 *
91 * @return string
92 */
93 public static function registration_activate_email_content() {
94 return apply_filters( 'uwp_registration_activate_email_content',
95 __( "Dear [#user_name#],
96
97 Thank you for signing up with [#site_name#]
98
99 [#login_details#]
100
101 Thank you,
102 [#site_name_url#]", "userswp"
103 )
104 );
105 }
106
107 /**
108 * The registration success email subject default.
109 *
110 * @return string
111 */
112 public static function registration_success_email_subject() {
113 return apply_filters( 'uwp_registration_success_email_subject', __( "[[#site_name#]] Your Log In Details", "userswp" ) );
114 }
115
116 /**
117 * The registration success email body default.
118 *
119 * @return string
120 */
121 public static function registration_success_email_content() {
122 return apply_filters( 'uwp_registration_success_email_content',
123 __( "Dear [#user_name#],
124
125 You can log in with the following information:
126
127 [#login_details#]
128
129 You can login here: [#login_url#]
130
131 Thank you,
132 [#site_name_url#]", "userswp"
133 )
134 );
135 }
136
137 /**
138 * The forgot password email subject default.
139 *
140 * @return string
141 */
142 public static function forgot_password_email_subject() {
143 return apply_filters( 'uwp_forgot_password_email_subject', __( "[#site_name#] - Your new password", "userswp" ) );
144 }
145
146 /**
147 * The forgot password email body default.
148 *
149 * @return string
150 */
151 public static function forgot_password_email_content() {
152 return apply_filters( 'uwp_forgot_password_email_content',
153 __( "Dear [#user_name#],
154
155 [#login_details#]
156
157 You can login here: [#login_url#]
158
159 Thank you,
160 [#site_name_url#]", "userswp"
161 )
162 );
163 }
164
165 /**
166 * The change password email subject default.
167 *
168 * @return string
169 */
170 public static function change_password_email_subject() {
171 return apply_filters( 'uwp_change_password_email_subject', __( "[#site_name#] - Password has been changed", "userswp" ) );
172 }
173
174 /**
175 * The change password email body default.
176 *
177 * @return string
178 */
179 public static function change_password_email_content() {
180 return apply_filters( 'uwp_change_password_email_content',
181 __( "Dear [#user_name#],
182
183 Your password has been changed successfully.
184
185 You can login here: [#login_url#]
186
187 Thank you,
188 [#site_name_url#]", "userswp"
189 )
190 );
191 }
192
193 /**
194 * The reset password email subject default.
195 *
196 * @return string
197 */
198 public static function reset_password_email_subject() {
199 return apply_filters( 'uwp_reset_password_email_subject', __( "[#site_name#] - Password has been reset", "userswp" ) );
200 }
201
202 /**
203 * The reset password email body default.
204 *
205 * @return string
206 */
207 public static function reset_password_email_content() {
208 return apply_filters( 'uwp_reset_password_email_content',
209 __( "Dear [#user_name#],
210
211 Your password has been reset.
212
213 You can login here: [#login_url#]
214
215 Thank you,
216 [#site_name_url#]", "userswp"
217 )
218 );
219 }
220
221 /**
222 * The update account email subject default.
223 *
224 * @return string
225 */
226 public static function account_update_email_subject() {
227 return apply_filters( 'uwp_account_update_email_subject', __( "[#site_name#] - Account has been updated", "userswp" ) );
228 }
229
230 /**
231 * The update account email body default.
232 *
233 * @return string
234 */
235 public static function account_update_email_content() {
236 return apply_filters( 'uwp_account_update_email_content',
237 __( "Dear [#user_name#],
238
239 Your account has been updated successfully.
240
241 Thank you,
242 [#site_name_url#]", "userswp"
243 )
244 );
245 }
246
247 /**
248 * The update account email pending activation subject default.
249 *
250 * @return string
251 */
252 public static function account_new_email_activation_email_subject() {
253 return apply_filters( 'account_new_email_activation_email_subject', __( "[#site_name#] - New email address activation required", "userswp" ) );
254 }
255
256 /**
257 * The update account email pending activation body default.
258 *
259 * @return string
260 */
261 public static function account_new_email_activation_email_content() {
262 return apply_filters( 'account_new_email_activation_email_content',
263 __( "Dear [#user_name#],
264
265 You recently requested to change your email address. Please click on the following link to change it: [#new_email_link#]
266
267 You can safely ignore and delete this email if you do not want to take this action.
268
269 Thank you,
270 [#site_name_url#]", "userswp"
271 )
272 );
273 }
274
275 /**
276 * The update account email subject default.
277 *
278 * @return string
279 */
280 public static function account_delete_email_subject() {
281 return apply_filters( 'uwp_account_delete_email_subject', __( "[#site_name#] - Your account has been deleted.", "userswp" ) );
282 }
283
284 /**
285 * The delete account email body default.
286 *
287 * @return string
288 */
289 public static function account_delete_email_content() {
290 return apply_filters( 'uwp_account_delete_email_content',
291 __( "Dear [#user_name#],
292
293 Your account has been deleted successfully.
294
295 Thank you,
296 [#site_name_url#]", "userswp"
297 )
298 );
299 }
300
301 /**
302 * The update account email subject default.
303 *
304 * @return string
305 */
306 public static function account_delete_email_subject_admin() {
307 return apply_filters( 'uwp_account_delete_email_subject_admin', __( "[#site_name#] - Account has been deleted by a user.", "userswp" ) );
308 }
309
310 /**
311 * The delete account email body default.
312 *
313 * @return string
314 */
315 public static function account_delete_email_content_admin() {
316 return apply_filters( 'uwp_account_delete_email_content_admin',
317 __( "Dear Admin,
318
319 User has deleted own account from the site.
320
321 [#login_details#]
322
323 Thank you,
324 [#site_name_url#]", "userswp"
325 )
326 );
327 }
328
329 /**
330 * The new user account registration email subject default.
331 *
332 * @return string
333 */
334 public static function registration_success_email_subject_admin() {
335 return apply_filters( 'uwp_registration_success_email_subject_admin', __( "[[#site_name#]] New account registration", "userswp" ) );
336 }
337
338 /**
339 * The new user account registration email body default.
340 *
341 * @return string
342 */
343 public static function registration_success_email_content_admin() {
344 return apply_filters( 'uwp_registration_success_email_content_admin',
345 __( "Dear Admin,
346
347 A user has been registered recently on your website.
348
349 [#extras#]", "userswp"
350 )
351 );
352 }
353
354 /**
355 * Returns default author box content
356 *
357 * @return string
358 */
359 public static function author_box_content() {
360 return apply_filters( 'uwp_author_box_content',
361 '<div class="uwp-author-box">
362 <div class="media-figure">
363 <a href="[#author_link#]">[#author_image#]</a>
364 </div>
365 <div class="media-body">
366 <h3>Author: <a href="[#author_link#]">[#author_name#]</a></h3>
367 <p>[#author_bio#]</p>
368 </div>
369 </div>'
370 );
371 }
372
373 /**
374 * Returns default author box content for bootstrap
375 *
376 * @return string
377 */
378 public static function author_box_content_bootstrap() {
379 return apply_filters( 'uwp_author_box_content_bootstrap',
380 '<div class="d-block text-center text-md-left d-md-flex p-3 bg-light">
381 <a href="[#author_link#]"><img src="[#author_image_url#]" class="rounded-circle shadow border border-white border-width-4 mr-3" width="60" height="60" alt="[#author_name#]"></a>
382 <div class="media-body">
383 <h5 class="mt-0">Author: <a href="[#author_link#]">[#author_name#]</a></h5>
384 [uwp_button_group user_id="post_author"]
385 <p>[#author_bio#]</p>
386 </div>
387 </div>'
388 );
389 }
390
391 /**
392 * Returns default user list item content
393 * @param bool $no_filter
394 *
395 * @return string
396 */
397 public static function page_user_list_item_content( $no_filter = false ) {
398 $content = "[uwp_profile_header][uwp_output_location location='users'][uwp_user_actions]";
399
400 if ( $no_filter ) {
401 return $content;
402 } else {
403 return apply_filters( "uwp_page_user_list_item_default_content", $content );
404 }
405 }
406
407 }