Version Description
Small changes.
Download this release
Release Info
Developer | reflectionmedia |
Plugin | User registration & user profile – Profile Builder |
Version | 1.0.2 |
Comparing to | |
See all releases |
Version 1.0.2
- css/style.css +38 -0
- includes/wppb-front-end-login.php +86 -0
- includes/wppb-front-end-profile.php +279 -0
- includes/wppb-front-end-register.php +280 -0
- includes/wppb-menu-file.php +330 -0
- profile-builder.php +8 -0
- readme.txt +74 -0
- screenshots/screenshot-1.jpg +0 -0
- screenshots/screenshot-2.jpg +0 -0
- screenshots/screenshot-3.jpg +0 -0
- uninstall.php +2 -0
css/style.css
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
NOTES:
|
3 |
+
The global Profile Builder class is: wppb_holder
|
4 |
+
The id for the individual sections are: wppb_modify for [wppb-profile-info]
|
5 |
+
wppb_login for [wppb-registered-login]
|
6 |
+
wppb_register for [wppb-register-new]
|
7 |
+
|
8 |
+
*/
|
9 |
+
/* WPPB_MODIFY */
|
10 |
+
#wppb_modify p label{
|
11 |
+
display:block;
|
12 |
+
}
|
13 |
+
#wppb_modify input[type=text], #wppb_modify input[type=password], #wppb_modify select, #wppb_modify textarea{
|
14 |
+
width:50%;
|
15 |
+
margin-bottom:5px;
|
16 |
+
}
|
17 |
+
#wppb_modify textarea{
|
18 |
+
width:70%;
|
19 |
+
}
|
20 |
+
.changes-saved, .success{
|
21 |
+
color:green;
|
22 |
+
}
|
23 |
+
.warning, .error{
|
24 |
+
color:red;
|
25 |
+
}
|
26 |
+
|
27 |
+
/* WPPB_REGISTER */
|
28 |
+
|
29 |
+
#wppb_register p label{
|
30 |
+
display:block;
|
31 |
+
}
|
32 |
+
#wppb_register input[type=text], #wppb_register input[type=password], #wppb_register select, #wppb_register textarea{
|
33 |
+
width:50%;
|
34 |
+
margin-bottom:5px;
|
35 |
+
}
|
36 |
+
#wppb_register textarea{
|
37 |
+
width:70%;
|
38 |
+
}
|
includes/wppb-front-end-login.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
// wp_signon can only be executed before anything is outputed in the page
|
7 |
+
// because of that we're adding it to the init hook
|
8 |
+
$wppb_login = false;
|
9 |
+
|
10 |
+
function wppb_signon(){
|
11 |
+
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'log-in' && wp_verify_nonce($_POST['login_nonce_field'],'verify_true_login')) :
|
12 |
+
global $error;
|
13 |
+
global $wppb_login;
|
14 |
+
$wppb_login = wp_signon( array( 'user_login' => $_POST['user-name'], 'user_password' => $_POST['password'], 'remember' => $_POST['remember-me'] ), false );
|
15 |
+
endif;
|
16 |
+
}
|
17 |
+
add_action('init', 'wppb_signon');
|
18 |
+
|
19 |
+
function wppb_front_end_login(){
|
20 |
+
global $wppb_login;
|
21 |
+
|
22 |
+
echo '<div class="wppb_holder" id="wppb_login">';
|
23 |
+
|
24 |
+
if ( is_user_logged_in() ) : // Already logged in
|
25 |
+
global $user_ID;
|
26 |
+
$wppb_user = get_userdata( $user_ID );
|
27 |
+
if($wppb_user->display_name == ''){
|
28 |
+
$wppb_user->display_name = $wppb_user->user_login;
|
29 |
+
}
|
30 |
+
|
31 |
+
?>
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
<p class="alert">
|
37 |
+
<?php printf( __('You are currently logged in as <a href="%1$s" title="%2$s">%2$s</a>.', 'profilebuilder'), get_author_posts_url( $wppb_user->ID ), $wppb_user->display_name ); ?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e('Log out of this account', 'profilebuilder'); ?>"><?php _e('Log out »', 'profilebuilder'); ?></a>
|
38 |
+
</p><!-- .alert -->
|
39 |
+
|
40 |
+
<?php elseif ( $wppb_login->ID ) : // Successful login ?>
|
41 |
+
<?php
|
42 |
+
//$wppb_login = get_userdata( $wppb_login->ID );
|
43 |
+
if($wppb_login->display_name == ''){
|
44 |
+
$wppb_login->display_name = $wppb_login->user_login;
|
45 |
+
}
|
46 |
+
|
47 |
+
?>
|
48 |
+
|
49 |
+
<p class="success">
|
50 |
+
<?php printf( __('You have successfully logged in as <a href="%1$s" title="%2$s">%2$s</a>.', 'profilebuilder'), get_author_posts_url( $wppb_login->ID ), $wppb_login->display_name ); ?>
|
51 |
+
</p><!-- .success-->
|
52 |
+
<?php else : // Not logged in ?>
|
53 |
+
|
54 |
+
<?php if (!empty( $_POST['action'] )): ?>
|
55 |
+
<p class="error">
|
56 |
+
<?php if ( trim($_POST['user-name']) == '') echo '<strong>ERROR:</strong> The username field is empty. '; ?>
|
57 |
+
<?php if ( is_wp_error($wppb_login) ) echo $wppb_login->get_error_message();?>
|
58 |
+
</p><!-- .error -->
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
<form action="<?php the_permalink(); ?>" method="post" class="sign-in">
|
62 |
+
<p class="login-form-username">
|
63 |
+
<label for="user-name"><?php _e('Username', 'profilebuilder'); ?></label>
|
64 |
+
<input type="text" name="user-name" id="user-name" class="text-input" value="<?php echo wp_specialchars( $_POST['user-name'], 1 ); ?>" />
|
65 |
+
</p><!-- .form-username -->
|
66 |
+
|
67 |
+
<p class="login-form-password">
|
68 |
+
<label for="password"><?php _e('Password', 'profilebuilder'); ?></label>
|
69 |
+
<input type="password" name="password" id="password" class="text-input" />
|
70 |
+
</p><!-- .form-password -->
|
71 |
+
<p class="login-form-submit">
|
72 |
+
<input type="submit" name="submit" class="submit button" value="<?php _e('Log in', 'profilebuilder'); ?>" />
|
73 |
+
<input class="remember-me checkbox" name="remember-me" id="remember-me" type="checkbox" checked="checked" value="forever" />
|
74 |
+
<label for="remember-me"><?php _e('Remember me', 'profilebuilder'); ?></label>
|
75 |
+
<input type="hidden" name="action" value="log-in" />
|
76 |
+
</p><!-- .form-submit -->
|
77 |
+
<p>
|
78 |
+
<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=lostpassword"><?php _e('Lost password?', 'profilebuilder'); ?></a>
|
79 |
+
</p>
|
80 |
+
<?php wp_nonce_field('verify_true_login','login_nonce_field'); ?>
|
81 |
+
</form><!-- .sign-in -->
|
82 |
+
|
83 |
+
<?php endif;?>
|
84 |
+
</div>
|
85 |
+
<?php
|
86 |
+
}
|
includes/wppb-front-end-profile.php
ADDED
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function wppb_front_end_profile_info() {
|
3 |
+
get_currentuserinfo();
|
4 |
+
$wppb_defaultOptions = get_option('wppb_default_settings');
|
5 |
+
$changesSaved = 'no';
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
/* Load registration file. */
|
10 |
+
require_once(ABSPATH . WPINC . '/registration.php');
|
11 |
+
/* Get user info. */
|
12 |
+
global $current_user;
|
13 |
+
/* If profile was saved, update profile. */
|
14 |
+
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' && wp_verify_nonce($_POST['edit_nonce_field'],'verify_edit_user') ) {
|
15 |
+
|
16 |
+
if (email_exists( $_POST['email'] ) != FALSE)
|
17 |
+
$thisEmail = email_exists( $_POST['email'] );
|
18 |
+
else $thisEmail = $current_user->id;
|
19 |
+
|
20 |
+
/* Update user password. */
|
21 |
+
if ( !empty($_POST['pass1'] ) && !empty( $_POST['pass2'] ) ) {
|
22 |
+
if ( $_POST['pass1'] == $_POST['pass2'] ){
|
23 |
+
wp_update_user( array( 'ID' => $current_user->id, 'user_pass' => esc_attr( $_POST['pass1'] ) ) );
|
24 |
+
$changesSaved = 'yes';
|
25 |
+
}else
|
26 |
+
$error = __('The passwords you entered didn\'t match. Your password was not updated.', 'profilebuilder');
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
if ( !empty( $_POST['email'] ) && is_email( $_POST['email'] )){ // if the user entered a valid email address
|
31 |
+
if (($thisEmail == $current_user->id)){ // if the entered email address is not already registered to some other user
|
32 |
+
wp_update_user( array( 'ID' => $current_user->id, 'user_email' => esc_attr( $_POST['email'] )));
|
33 |
+
$changesSaved = 'yes';
|
34 |
+
}else
|
35 |
+
$error = __('The e-mail address you entered is already registered to a different user. Your e-mail address was not updated.', 'profilebuilder');
|
36 |
+
}else
|
37 |
+
$error = __('The e-mail address you entered is not a valid one. Your e-mail address was not updated.', 'profilebuilder');
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
/* Update user information. */
|
42 |
+
if ($wppb_defaultOptions['firstname'] == 'show'){
|
43 |
+
wp_update_user( array( 'ID' => $current_user->id, 'first_name' => esc_attr( $_POST['first_name'] )));
|
44 |
+
$changesSaved = 'yes';
|
45 |
+
}
|
46 |
+
if ($wppb_defaultOptions['lastname'] == 'show'){
|
47 |
+
wp_update_user( array( 'ID' => $current_user->id, 'last_name' => esc_attr( $_POST['last_name'] )));
|
48 |
+
$changesSaved = 'yes';
|
49 |
+
}
|
50 |
+
|
51 |
+
if ($wppb_defaultOptions['nickname'] == 'show'){
|
52 |
+
wp_update_user( array( 'ID' => $current_user->id, 'nickname' => esc_attr( $_POST['nickname'] )));
|
53 |
+
$changesSaved = 'yes';
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($wppb_defaultOptions['dispname'] == 'show'){
|
57 |
+
wp_update_user( array( 'ID' => $current_user->id, 'display_name' => esc_attr( $_POST['display_name'] )));
|
58 |
+
$changesSaved = 'yes';
|
59 |
+
}
|
60 |
+
|
61 |
+
if ($wppb_defaultOptions['website'] == 'show'){
|
62 |
+
if(strpos($_POST['website'], 'http://') || empty( $_POST['website'] )){
|
63 |
+
wp_update_user( array( 'ID' => $current_user->id, 'user_url' => esc_attr( $_POST['website'] )));
|
64 |
+
$changesSaved = 'yes';
|
65 |
+
}else{
|
66 |
+
wp_update_user( array( 'ID' => $current_user->id, 'user_url' => 'http://'.esc_attr( $_POST['website'] )));
|
67 |
+
$changesSaved = 'yes';
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if ($wppb_defaultOptions['aim'] == 'show'){
|
72 |
+
update_user_meta( $current_user->id, 'aim', esc_attr( $_POST['aim'] ) );
|
73 |
+
$changesSaved = 'yes';
|
74 |
+
}
|
75 |
+
|
76 |
+
if ($wppb_defaultOptions['yahoo'] == 'show'){
|
77 |
+
update_user_meta( $current_user->id, 'yim', esc_attr( $_POST['yim'] ) );
|
78 |
+
$changesSaved = 'yes';
|
79 |
+
}
|
80 |
+
|
81 |
+
if ($wppb_defaultOptions['jabber'] == 'show'){
|
82 |
+
update_user_meta( $current_user->id, 'jabber', esc_attr( $_POST['jabber'] ) );
|
83 |
+
$changesSaved = 'yes';
|
84 |
+
}
|
85 |
+
|
86 |
+
if ($wppb_defaultOptions['bio'] == 'show'){
|
87 |
+
update_user_meta( $current_user->id, 'description', esc_attr( $_POST['description'] ) );
|
88 |
+
$changesSaved = 'yes';
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
?>
|
100 |
+
<div class="wppb_holder" id="wppb_modify">
|
101 |
+
<?php if ( !is_user_logged_in() ) : ?>
|
102 |
+
|
103 |
+
<p class="warning">
|
104 |
+
<?php _e('You must be logged in to edit your profile.', 'profilebuilder'); ?>
|
105 |
+
</p><!-- .warning -->
|
106 |
+
|
107 |
+
<?php else : ?>
|
108 |
+
|
109 |
+
<?php if ( $error ) echo '<p class="error">' . $error . '</p>'; ?>
|
110 |
+
<?php
|
111 |
+
if ($changesSaved == 'yes'){
|
112 |
+
echo '<p class="changes-saved">';
|
113 |
+
_e('The changes made have been successfully saved.', 'profilebuilder');
|
114 |
+
echo'</p><!-- .changes-saved -->';
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
|
118 |
+
<form method="post" id="edituser" class="user-forms" action="<?php the_permalink(); ?>">
|
119 |
+
<p>
|
120 |
+
<strong>Name</strong>
|
121 |
+
</p>
|
122 |
+
<?php
|
123 |
+
if ($wppb_defaultOptions['username'] == 'show'){ echo'
|
124 |
+
<p class="username">
|
125 |
+
<label for="user_login">'; _e('Username', 'profilebuilder'); echo'</label>
|
126 |
+
<input class="text-input" name="user_login" type="text" id="user_login" value="'; the_author_meta( 'user_login', $current_user->id ); echo'" disabled="disabled"/> <label for="user_login"><i>'; _e(' Usernames cannot be changed.'); echo'</i></label>
|
127 |
+
</p><!-- .first_name -->';
|
128 |
+
}
|
129 |
+
?>
|
130 |
+
|
131 |
+
<?php
|
132 |
+
if ($wppb_defaultOptions['firstname'] == 'show'){ echo'
|
133 |
+
<p class="first_name">
|
134 |
+
<label for="first_name">'; _e('First Name', 'profilebuilder'); echo'</label>
|
135 |
+
<input class="text-input" name="first_name" type="text" id="first_name" value="'; the_author_meta( 'first_name', $current_user->id ); echo '" />
|
136 |
+
</p><!-- .first_name -->';
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
|
140 |
+
<?php
|
141 |
+
if ($wppb_defaultOptions['lastname'] == 'show'){ echo'
|
142 |
+
<p class="last_name">
|
143 |
+
<label for="last_name">'; _e('Last Name', 'profilebuilder'); echo'</label>
|
144 |
+
<input class="text-input" name="last_name" type="text" id="last_name" value="'; the_author_meta( 'last_name', $current_user->id ); echo '" />
|
145 |
+
</p><!-- .last_name -->';
|
146 |
+
}
|
147 |
+
?>
|
148 |
+
|
149 |
+
<?php
|
150 |
+
if ($wppb_defaultOptions['nickname'] == 'show'){ echo'
|
151 |
+
<p class="nickname">
|
152 |
+
<label for="nickname">'; _e('Nickname', 'profilebuilder'); echo'<i>'; _e(' (required)', 'profilebuilder');echo'</i></label>
|
153 |
+
<input class="text-input" name="nickname" type="text" id="nickname" value="'; the_author_meta( 'nickname', $current_user->id ); echo'" />
|
154 |
+
</p><!-- .nickname -->';
|
155 |
+
}
|
156 |
+
?>
|
157 |
+
|
158 |
+
<?php
|
159 |
+
if ($wppb_defaultOptions['dispname'] == 'show'){ echo'
|
160 |
+
<p class="display_name">
|
161 |
+
<label for="display_name">'; _e('Display name publicly as', 'profilebuilder'); echo'</label>
|
162 |
+
<select name="display_name" id="display_name">';
|
163 |
+
$public_display = array();
|
164 |
+
$public_display['display_username'] = get_the_author_meta('user_login', $current_user->id);
|
165 |
+
$thisFirstName = get_the_author_meta('first_name', $current_user->id);
|
166 |
+
if ( !empty($thisFirstName))
|
167 |
+
$public_display['display_firstname'] = get_the_author_meta('first_name', $current_user->id);
|
168 |
+
$thisLastName = get_the_author_meta('last_name', $current_user->id);
|
169 |
+
if ( !empty($thisLastName))
|
170 |
+
$public_display['display_lastname'] = get_the_author_meta('last_name', $current_user->id);
|
171 |
+
$public_display['display_nickname'] = get_the_author_meta('nickname', $current_user->id);
|
172 |
+
if ( !empty($thisFirstName) && !empty($thisLastName) ) {
|
173 |
+
$public_display['display_firstlast'] = $thisFirstName . ' ' . $thisLastName;
|
174 |
+
$public_display['display_lastfirst'] = $thisLastName . ' ' . $thisFirstName;
|
175 |
+
}
|
176 |
+
$thisDisplayName = get_the_author_meta('display_name', $current_user->id);
|
177 |
+
if ( !in_array( $thisDisplayName, $public_display ) ) // Only add this if it isn't duplicated elsewhere
|
178 |
+
$public_display = array( 'display_displayname' => $thisDisplayName ) + $public_display;
|
179 |
+
$public_display = array_map( 'trim', $public_display );
|
180 |
+
foreach ( $public_display as $id => $item ) {
|
181 |
+
echo '<option id="'.$id.'" value="'.$item.'"'; selected( $thisDisplayName, $item ); echo'>'.$item.'</option>';
|
182 |
+
}
|
183 |
+
echo'</select>
|
184 |
+
</p><!-- .display_name -->';
|
185 |
+
}
|
186 |
+
?>
|
187 |
+
|
188 |
+
|
189 |
+
<p>
|
190 |
+
<strong>Contact Info</strong>
|
191 |
+
</p>
|
192 |
+
|
193 |
+
<?php
|
194 |
+
if ($wppb_defaultOptions['email'] == 'show'){ echo'
|
195 |
+
<p class="form-email">
|
196 |
+
<label for="email">'; _e('E-mail', 'profilebuilder');echo'<i>'; _e(' (required)', 'profilebuilder');echo'</i></label>
|
197 |
+
<input class="text-input" name="email" type="text" id="email" value="'; the_author_meta( 'user_email', $current_user->id ); echo'" />
|
198 |
+
</p><!-- .form-email -->';
|
199 |
+
}
|
200 |
+
?>
|
201 |
+
|
202 |
+
<?php
|
203 |
+
if ($wppb_defaultOptions['website'] == 'show'){ echo'
|
204 |
+
<p class="form-website">
|
205 |
+
<label for="website">'; _e('Website', 'profilebuilder'); echo'</label>
|
206 |
+
<input class="text-input" name="website" type="text" id="website" value="'; the_author_meta( 'user_url', $current_user->id ); echo'" />
|
207 |
+
</p><!-- .form-website -->';
|
208 |
+
}
|
209 |
+
?>
|
210 |
+
|
211 |
+
<?php
|
212 |
+
if ($wppb_defaultOptions['aim'] == 'show'){ echo'
|
213 |
+
<p class="form-aim">
|
214 |
+
<label for="aim">'; _e('AIM', 'profilebuilder'); echo'</label>
|
215 |
+
<input class="text-input" name="aim" type="text" id="aim" value="'; the_author_meta( 'aim', $current_user->id ); echo'" />
|
216 |
+
</p><!-- .form-aim -->';
|
217 |
+
}
|
218 |
+
?>
|
219 |
+
|
220 |
+
<?php
|
221 |
+
if ($wppb_defaultOptions['yahoo'] == 'show'){ echo'
|
222 |
+
<p class="form-yim">
|
223 |
+
<label for="yim">'; _e('Yahoo IM', 'profilebuilder'); echo'</label>
|
224 |
+
<input class="text-input" name="yim" type="text" id="yim" value="'; the_author_meta( 'yim', $current_user->id ); echo'" />
|
225 |
+
</p><!-- .form-yim -->';
|
226 |
+
}
|
227 |
+
?>
|
228 |
+
|
229 |
+
<?php
|
230 |
+
if ($wppb_defaultOptions['jabber'] == 'show'){ echo'
|
231 |
+
<p class="form-jabber">
|
232 |
+
<label for="jabber">'; _e('Jabber / Google Talk', 'profilebuilder'); echo'</label>
|
233 |
+
<input class="text-input" name="jabber" type="text" id="jabber" value="'; the_author_meta( 'jabber', $current_user->id ); echo'" />
|
234 |
+
</p><!-- .form-jabber -->';
|
235 |
+
}
|
236 |
+
?>
|
237 |
+
|
238 |
+
<p>
|
239 |
+
<strong>About Yourself</strong>
|
240 |
+
</p>
|
241 |
+
|
242 |
+
<?php
|
243 |
+
if ($wppb_defaultOptions['bio'] == 'show'){ echo'
|
244 |
+
<p class="form-description">
|
245 |
+
<label for="description">'; _e('Biographical Info', 'profilebuilder'); echo'</label>
|
246 |
+
<textarea class="text-input" name="description" id="description" rows="5" cols="30">'; the_author_meta( 'description', $current_user->id ); echo'</textarea>
|
247 |
+
</p><!-- .form-description -->';
|
248 |
+
}
|
249 |
+
?>
|
250 |
+
|
251 |
+
<?php
|
252 |
+
if ($wppb_defaultOptions['password'] == 'show'){ echo'
|
253 |
+
<p class="form-password">
|
254 |
+
<label for="pass1">'; _e('New Password', 'profilebuilder'); echo'</label>
|
255 |
+
<input class="text-input" name="pass1" type="password" id="pass1" />
|
256 |
+
</p><!-- .form-password -->
|
257 |
+
|
258 |
+
<p class="form-password">
|
259 |
+
<label for="pass2">'; _e('Repeat Password', 'profilebuilder'); echo'</label>
|
260 |
+
<input class="text-input" name="pass2" type="password" id="pass2" />
|
261 |
+
</p><!-- .form-password -->';
|
262 |
+
}
|
263 |
+
?>
|
264 |
+
|
265 |
+
|
266 |
+
<p class="form-submit">
|
267 |
+
<input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update', 'profilebuilder'); ?>" />
|
268 |
+
<?php// wp_nonce_field( 'update-user' ) ?>
|
269 |
+
<input name="action" type="hidden" id="action" value="update-user" />
|
270 |
+
</p><!-- .form-submit -->
|
271 |
+
<?php wp_nonce_field('verify_edit_user','edit_nonce_field'); ?>
|
272 |
+
</form><!-- #edituser -->
|
273 |
+
|
274 |
+
<?php endif; ?>
|
275 |
+
</div>
|
276 |
+
<?php
|
277 |
+
}
|
278 |
+
|
279 |
+
?>
|
includes/wppb-front-end-register.php
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wppb_front_end_register(){
|
4 |
+
$wppb_defaultOptions = get_option('wppb_default_settings');
|
5 |
+
global $current_user;
|
6 |
+
get_currentuserinfo();
|
7 |
+
|
8 |
+
/* Load registration file. */
|
9 |
+
require_once( ABSPATH . WPINC . '/registration.php' );
|
10 |
+
|
11 |
+
/* Check if users can register. */
|
12 |
+
$registration = get_option( 'users_can_register' );
|
13 |
+
|
14 |
+
/* If user registered, input info. */
|
15 |
+
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'adduser' && wp_verify_nonce($_POST['register_nonce_field'],'verify_true_registration') ) {
|
16 |
+
|
17 |
+
$user_pass = esc_attr( $_POST['passw1'] );
|
18 |
+
$userdata = array(
|
19 |
+
'user_pass' => $user_pass,
|
20 |
+
'user_login' => esc_attr( $_POST['user_name'] ),
|
21 |
+
'first_name' => esc_attr( $_POST['first_name'] ),
|
22 |
+
'last_name' => esc_attr( $_POST['last_name'] ),
|
23 |
+
'nickname' => esc_attr( $_POST['nickname'] ),
|
24 |
+
'user_email' => esc_attr( $_POST['email'] ),
|
25 |
+
'user_url' => esc_attr( $_POST['website'] ),
|
26 |
+
'aim' => esc_attr( $_POST['aim'] ),
|
27 |
+
'yim' => esc_attr( $_POST['yim'] ),
|
28 |
+
'jabber' => esc_attr( $_POST['jabber'] ),
|
29 |
+
'description' => esc_attr( $_POST['description'] ),
|
30 |
+
'role' => get_option( 'default_role' ),
|
31 |
+
);
|
32 |
+
|
33 |
+
if ( !$userdata['user_login'] )
|
34 |
+
$error = __('A username is required for registration.', 'profilebuilder');
|
35 |
+
elseif ( username_exists($userdata['user_login']) )
|
36 |
+
$error = __('Sorry, that username already exists!', 'profilebuilder');
|
37 |
+
|
38 |
+
elseif ( !is_email($userdata['user_email'], true) )
|
39 |
+
$error = __('You must enter a valid email address.', 'profilebuilder');
|
40 |
+
elseif ( email_exists($userdata['user_email']) )
|
41 |
+
$error = __('Sorry, that email address is already used!', 'profilebuilder');
|
42 |
+
elseif (( empty($_POST['passw1'] ) || empty( $_POST['passw2'] )) || ( $_POST['pass1'] != $_POST['pass2'] )){
|
43 |
+
if ( empty($_POST['passw1'] ) || empty( $_POST['passw2'] )) //verify if the user has completed both password fields
|
44 |
+
$error = __('You didn\'t complete one of the password-fields!', 'profilebuilder');
|
45 |
+
elseif ( $_POST['pass1'] != $_POST['pass2'] ) //verify if the the password and the retyped password are a match
|
46 |
+
$error = __('The entered passwords don\'t match!', 'profilebuilder');
|
47 |
+
}
|
48 |
+
|
49 |
+
else{
|
50 |
+
$the_registered_name = $_POST['user_name'];
|
51 |
+
$new_user = wp_insert_user( $userdata );
|
52 |
+
if (isset($_POST['send_password']) && ($_POST['send_password'] == 1)){
|
53 |
+
$email = $_POST['email']; //change these variables to modify sent email message, destination and source.
|
54 |
+
$fromemail = get_bloginfo('name');
|
55 |
+
$mailPassword = $_POST['passw1'];
|
56 |
+
$mailUsername = $_POST['user_name'];
|
57 |
+
$subject = 'A new account has been created for you.';
|
58 |
+
$msg = 'Welcome to blog '.$fromemail.'. Your username is:'.$mailUsername.' and password:'.$mailPassword;
|
59 |
+
$messageSent = wp_mail( $email, $subject, $msg);
|
60 |
+
if( $messageSent == TRUE)
|
61 |
+
$sentEmailStatus = 2;
|
62 |
+
else
|
63 |
+
$sentEmailStatus = 1;
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
?>
|
70 |
+
<div class="wppb_holder" id="wppb_register">
|
71 |
+
<?php if ( is_user_logged_in() && !current_user_can( 'create_users' ) ) : ?>
|
72 |
+
<?php
|
73 |
+
global $user_ID;
|
74 |
+
$login = get_userdata( $user_ID );
|
75 |
+
if($login->display_name == ''){
|
76 |
+
$login->display_name = $login->user_login;
|
77 |
+
}
|
78 |
+
?>
|
79 |
+
<p class="log-in-out alert">
|
80 |
+
<?php printf( __('You are logged in as <a href="%1$s" title="%2$s">%2$s</a>. You don\'t need another account.', 'profilebuilder'), get_author_posts_url( $login->ID ), $login->display_name ); ?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e('Log out of this account', 'profilebuilder'); ?>"><?php _e('Logout »', 'profilebuilder'); ?></a>
|
81 |
+
</p><!-- .log-in-out .alert -->
|
82 |
+
|
83 |
+
<?php elseif ( $new_user ) : ?>
|
84 |
+
|
85 |
+
|
86 |
+
<?php
|
87 |
+
|
88 |
+
echo'<p class="success">';
|
89 |
+
if ( current_user_can( 'create_users' ) )
|
90 |
+
printf( __('A user account for %1$s has been created.', 'profilebuilder'), $the_registered_name );
|
91 |
+
else
|
92 |
+
printf( __('Thank you for registering, %1$s.', 'profilebuilder'), $the_registered_name );
|
93 |
+
echo'</p><!-- .success -->';
|
94 |
+
?>
|
95 |
+
|
96 |
+
<?php
|
97 |
+
if(isset($_POST['send_password'])){
|
98 |
+
if ($sentEmailStatus == 1){
|
99 |
+
echo '<p class="error">';
|
100 |
+
echo 'An error occured while trying to send the notification email.';
|
101 |
+
echo '</p><!-- .error -->';
|
102 |
+
}elseif ($sentEmailStatus == 2){
|
103 |
+
echo '<p class="success">';
|
104 |
+
echo 'An email containing the username and password was successfully sent.';
|
105 |
+
echo '</p><!-- .success -->';
|
106 |
+
}
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
<?php else : ?>
|
110 |
+
|
111 |
+
<?php if ( $error ) : ?>
|
112 |
+
<p class="error">
|
113 |
+
<?php echo $error; ?>
|
114 |
+
</p><!-- .error -->
|
115 |
+
<?php endif; ?>
|
116 |
+
|
117 |
+
|
118 |
+
<?php if ( current_user_can( 'create_users' ) && $registration ) : ?>
|
119 |
+
<p class="alert">
|
120 |
+
<?php _e('Users can register themselves or you can manually create users here.', 'profilebuilder'); ?>
|
121 |
+
</p><!-- .alert -->
|
122 |
+
<?php elseif ( current_user_can( 'create_users' ) ) : ?>
|
123 |
+
<p class="alert">
|
124 |
+
<?php _e('Users cannot currently register themselves, but you can manually create users here.', 'profilebuilder'); ?>
|
125 |
+
</p><!-- .alert -->
|
126 |
+
<?php elseif ( !current_user_can( 'create_users' ) && !$registration) : ?>
|
127 |
+
<p class="alert">
|
128 |
+
<?php _e('Only an administrator can add new users.', 'profilebuilder'); ?>
|
129 |
+
</p><!-- .alert -->
|
130 |
+
|
131 |
+
<?php endif; ?>
|
132 |
+
|
133 |
+
<?php if ( $registration || current_user_can( 'create_users' ) ) : ?>
|
134 |
+
|
135 |
+
<form method="post" id="adduser" class="user-forms" action="http://<?php echo $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>">
|
136 |
+
|
137 |
+
<p>
|
138 |
+
<strong>Name</strong>
|
139 |
+
</p>
|
140 |
+
|
141 |
+
<?php
|
142 |
+
if ($wppb_defaultOptions['username'] == 'show'){ echo'
|
143 |
+
<p class="form-username">
|
144 |
+
<label for="user_name">'; _e('Username', 'profilebuilder'); echo'<i>'; _e(' (required)', 'profilebuilder');echo'</i></label>
|
145 |
+
<input class="text-input" name="user_name" type="text" id="user_name" value="'; if ( $error ) echo wp_specialchars( $_POST['user_name'], 1 ); echo'" />
|
146 |
+
</p><!-- .form-username -->';
|
147 |
+
}
|
148 |
+
?>
|
149 |
+
|
150 |
+
<?php
|
151 |
+
if ($wppb_defaultOptions['firstname'] == 'show'){ echo'
|
152 |
+
<p class="first_name">
|
153 |
+
<label for="first_name">'; _e('First Name', 'profilebuilder'); echo'</label>
|
154 |
+
<input class="text-input" name="first_name" type="text" id="first_name" value="'; if ( $error ) echo wp_specialchars( $_POST['first_name'], 1 ); echo'" />
|
155 |
+
</p><!-- .first_name -->';
|
156 |
+
}
|
157 |
+
?>
|
158 |
+
|
159 |
+
<?php
|
160 |
+
if ($wppb_defaultOptions['lastname'] == 'show'){ echo'
|
161 |
+
<p class="last_name">
|
162 |
+
<label for="last_name">'; _e('Last Name', 'profilebuilder'); echo'</label>
|
163 |
+
<input class="text-input" name="last_name" type="text" id="last_name" value="'; if ( $error ) echo wp_specialchars( $_POST['last_name'], 1 ); echo'" />
|
164 |
+
</p><!-- .last_name -->';
|
165 |
+
}
|
166 |
+
?>
|
167 |
+
|
168 |
+
<?php
|
169 |
+
if ($wppb_defaultOptions['nickname'] == 'show'){ echo'
|
170 |
+
<p class="nickname">
|
171 |
+
<label for="nickname">'; _e('Nickname', 'profilebuilder'); echo'</label>
|
172 |
+
<input class="text-input" name="nickname" type="text" id="nickname" value="'; if ( $error ) echo wp_specialchars( $_POST['nickname'], 1 ); echo'" />
|
173 |
+
</p><!-- .nickname -->';
|
174 |
+
}
|
175 |
+
?>
|
176 |
+
|
177 |
+
<p>
|
178 |
+
<strong>Contact Info</strong>
|
179 |
+
</p>
|
180 |
+
|
181 |
+
<?php
|
182 |
+
if ($wppb_defaultOptions['email'] == 'show'){ echo'
|
183 |
+
<p class="form-email">
|
184 |
+
<label for="email">'; _e('E-mail', 'profilebuilder'); echo'<i>'; _e(' (required)', 'profilebuilder');echo'</i></label>
|
185 |
+
<input class="text-input" name="email" type="text" id="email" value="'; if ( $error ) echo wp_specialchars( $_POST['email'], 1 ); echo'" />
|
186 |
+
</p><!-- .form-email -->';
|
187 |
+
}
|
188 |
+
?>
|
189 |
+
|
190 |
+
<?php
|
191 |
+
if ($wppb_defaultOptions['website'] == 'show'){ echo'
|
192 |
+
<p class="form-website">
|
193 |
+
<label for="website">'; _e('Website', 'profilebuilder'); echo'</label>
|
194 |
+
<input class="text-input" name="website" type="text" id="website" value="'; if ( $error ) echo wp_specialchars( $_POST['website'], 1 ); echo'" />
|
195 |
+
</p><!-- .form-website -->';
|
196 |
+
}
|
197 |
+
?>
|
198 |
+
|
199 |
+
<?php
|
200 |
+
if ($wppb_defaultOptions['aim'] == 'show'){ echo'
|
201 |
+
<p class="form-aim">
|
202 |
+
<label for="aim">'; _e('AIM', 'profilebuilder'); echo'</label>
|
203 |
+
<input class="text-input" name="aim" type="text" id="aim" value="'; if ( $error ) echo wp_specialchars( $_POST['aim'], 1 ); echo'" />
|
204 |
+
</p><!-- .form-aim -->';
|
205 |
+
}
|
206 |
+
?>
|
207 |
+
|
208 |
+
<?php
|
209 |
+
if ($wppb_defaultOptions['yahoo'] == 'show'){ echo'
|
210 |
+
<p class="form-yim">
|
211 |
+
<label for="yim">'; _e('Yahoo IM', 'profilebuilder'); echo'</label>
|
212 |
+
<input class="text-input" name="yim" type="text" id="yim" value="'; if ( $error ) echo wp_specialchars( $_POST['yim'], 1 ); echo'" />
|
213 |
+
</p><!-- .form-yim -->';
|
214 |
+
}
|
215 |
+
?>
|
216 |
+
|
217 |
+
<?php
|
218 |
+
if ($wppb_defaultOptions['jabber'] == 'show'){ echo'
|
219 |
+
<p class="form-jabber">
|
220 |
+
<label for="jabber">'; _e('Jabber / Google Talk', 'profilebuilder'); echo'</label>
|
221 |
+
<input class="text-input" name="jabber" type="text" id="jabber" value="'; if ( $error ) echo wp_specialchars( $_POST['jabber'], 1 ); echo'" />
|
222 |
+
</p><!-- .form-jabber -->';
|
223 |
+
}
|
224 |
+
?>
|
225 |
+
|
226 |
+
<p>
|
227 |
+
<strong>About Yourself</strong>
|
228 |
+
</p>
|
229 |
+
|
230 |
+
<?php
|
231 |
+
if ($wppb_defaultOptions['bio'] == 'show'){ echo'
|
232 |
+
<p class="form-description">
|
233 |
+
<label for="description">'; _e('Biographical Info', 'profilebuilder'); echo'</label>
|
234 |
+
<textarea class="text-input" name="description" id="description" rows="5" cols="30">'; if ( $error ) echo wp_specialchars( $_POST['description'], 1 ); echo'</textarea>
|
235 |
+
</p><!-- .form-description -->';
|
236 |
+
}
|
237 |
+
?>
|
238 |
+
|
239 |
+
<?php
|
240 |
+
if ($wppb_defaultOptions['password'] == 'show'){ echo'
|
241 |
+
<p class="form-password">
|
242 |
+
<label for="pass1">'; _e('Password', 'profilebuilder'); echo'</label>
|
243 |
+
<input class="text-input" name="passw1" type="password" id="pass1" />
|
244 |
+
</p><!-- .form-password -->
|
245 |
+
|
246 |
+
<p class="form-password">
|
247 |
+
<label for="pass2">'; _e('Repeat Password', 'profilebuilder'); echo'</label>
|
248 |
+
<input class="text-input" name="passw2" type="password" id="pass2" />
|
249 |
+
</p><!-- .form-password -->';
|
250 |
+
}
|
251 |
+
?>
|
252 |
+
<?php
|
253 |
+
if ( current_user_can( 'delete_users' ) )
|
254 |
+
echo '
|
255 |
+
<p class="send-confirmation-email">
|
256 |
+
<label for="pass1">';
|
257 |
+
//_e('Send Password? ', 'profilebuilder');
|
258 |
+
echo'<input id="send_password" type="checkbox" name="send_password" value="1"';if (isset($_POST['send_password'])) echo 'checked';echo'/>
|
259 |
+
<i>'; _e(' Send these credentials via email.', 'profilebuilder');echo'</i></label>
|
260 |
+
</p><!-- .send-confirmation-email -->';
|
261 |
+
?>
|
262 |
+
|
263 |
+
<p class="form-submit">
|
264 |
+
<?php echo $referer; ?>
|
265 |
+
<input name="adduser" type="submit" id="addusersub" class="submit button" value="<?php if ( current_user_can( 'create_users' ) ) _e('Add User', 'profilebuilder'); else _e('Register', 'profilebuilder'); ?>" />
|
266 |
+
<input name="action" type="hidden" id="action" value="adduser" />
|
267 |
+
</p><!-- .form-submit -->
|
268 |
+
<?php wp_nonce_field('verify_true_registration','register_nonce_field'); ?>
|
269 |
+
</form><!-- #adduser -->
|
270 |
+
|
271 |
+
<?php endif; ?>
|
272 |
+
|
273 |
+
<?php endif; ?>
|
274 |
+
|
275 |
+
|
276 |
+
</div>
|
277 |
+
<?php
|
278 |
+
}
|
279 |
+
|
280 |
+
?>
|
includes/wppb-menu-file.php
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wppb_display_menu(){
|
4 |
+
|
5 |
+
?>
|
6 |
+
<div class="wrap">
|
7 |
+
<?php screen_icon(); ?>
|
8 |
+
<h2> Profile Builder </h2>
|
9 |
+
<?php if ($_GET["settings-updated"] == 'true')
|
10 |
+
echo'<div id="message" class="updated below-h2">
|
11 |
+
<p>
|
12 |
+
Changes saved.
|
13 |
+
</p>
|
14 |
+
</div>';
|
15 |
+
?>
|
16 |
+
<h3><?php _e('Basic Information'); ?> </h3>
|
17 |
+
<table class="wp-list-table widefat fixed pages" cellspacing="0">
|
18 |
+
|
19 |
+
<tbody class="plugins">
|
20 |
+
<tr height="10"></tr>
|
21 |
+
<tr>
|
22 |
+
<td><font size="2">Welcome to Profile Builder!</font></td>
|
23 |
+
</tr>
|
24 |
+
<tr height="10"></tr>
|
25 |
+
<tr>
|
26 |
+
<td>Profile Builder lets you customize your website by adding a front-end menu for all your users, giving them a more flexible way to modify their user-information or to register new users. Also, grants users with administrator rights to customize basic fields. To achieve this, just create a new page, and give it an intuitive name(i.e. Edit Profile).</td>
|
27 |
+
</tr>
|
28 |
+
<tr>
|
29 |
+
<td>Now all you need to do is add the following shortcode(for the previous example): [wppb-edit-profile]. Publish your page and you are done!</td>
|
30 |
+
</tr>
|
31 |
+
<tr>
|
32 |
+
<td>You can use the following shortcodes:</td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td><span style="padding-left:50px"></span>→ [wppb-edit-profile] - to grant users a front-end acces to their personal information(requires user to be logged in).</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<td><span style="padding-left:50px"></span>→ [wppb-login] - for a basic log-in menu.</td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td><span style="padding-left:50px"></span>→ [wppb-register] - to add a registration form.</td>
|
42 |
+
</tr>
|
43 |
+
<tr height="10"></tr>
|
44 |
+
<tr>
|
45 |
+
<td>Also, users with administrator rights have access to the following features:</td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td><span style="padding-left:50px"></span>→ add a custom stylesheet/inherit values from the current theme or use the default one, built into this plug-in.</td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td><span style="padding-left:50px"></span>→ select whether to display or not the admin bar in the front end for a specific user-group registered to the site.</td>
|
52 |
+
</tr>
|
53 |
+
<tr>
|
54 |
+
<td><span style="padding-left:50px"></span>→ select which information-field can the users see/modify. The hidden fields' values remain unmodified.</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>NOTE: this plugin only adds/removes fields in the front-end. The default information-fields will still be visible(and thus modifiable) from the back-end, while custom fields will only be visible in the front-end.</td>
|
58 |
+
</tr>
|
59 |
+
</tbody>
|
60 |
+
|
61 |
+
</table>
|
62 |
+
|
63 |
+
|
64 |
+
<form method="post" action="options.php">
|
65 |
+
<?php $wppb_showDefaultCss = get_option('wppb_default_style'); ?>
|
66 |
+
<?php settings_fields('wppb_default_style'); ?>
|
67 |
+
<br/>
|
68 |
+
|
69 |
+
<h3><?php _e('Plug-in Layout'); ?> </h3>
|
70 |
+
<table class="wp-list-table widefat fixed pages" cellspacing="0">
|
71 |
+
|
72 |
+
<tbody class="plugins">
|
73 |
+
<tr height="10"></tr>
|
74 |
+
<tr>
|
75 |
+
<td><font size="2">Use default stylesheet:</font></td>
|
76 |
+
<td>
|
77 |
+
<select name="wppb_default_style" width="60" style="width: 60px">
|
78 |
+
<option value="yes" <?php if ($wppb_showDefaultCss == 'yes') echo ' selected';?>>yes</option>
|
79 |
+
<option value="no" <?php if ($wppb_showDefaultCss == 'no') echo ' selected';?>>no</option>
|
80 |
+
</select>
|
81 |
+
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
85 |
+
<td></td>
|
86 |
+
<td>
|
87 |
+
<input type="hidden" name="action" value="update" />
|
88 |
+
<p class="submit">
|
89 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> <?php //Note the use of the _e() function to handle translation of the text ?>
|
90 |
+
</p>
|
91 |
+
</form>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
</tbody>
|
95 |
+
</table>
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
<form method="post" action="options.php">
|
103 |
+
<?php $wppb_showAdminBar = get_option('wppb_display_admin_settings'); ?>
|
104 |
+
<?php settings_fields('wppb_display_admin_settings'); ?>
|
105 |
+
|
106 |
+
<br/>
|
107 |
+
|
108 |
+
<h3><?php _e('Show/Hide the Admin Bar on Front End'); ?> </h3>
|
109 |
+
<table class="wp-list-table widefat fixed pages" cellspacing="0">
|
110 |
+
<thead>
|
111 |
+
<tr>
|
112 |
+
<th class="manage-column" scope="col">User-group</th>
|
113 |
+
<th class="manage-column" scope="col">Visibility</th>
|
114 |
+
</tr>
|
115 |
+
</thead>
|
116 |
+
<tbody>
|
117 |
+
<tr height="10"></tr>
|
118 |
+
<?php
|
119 |
+
foreach($wppb_showAdminBar as $key => $data){
|
120 |
+
echo'<tr>
|
121 |
+
<td>
|
122 |
+
<font size="2">'.$key.'</font>
|
123 |
+
</td>
|
124 |
+
<td>
|
125 |
+
<input type="radio" name="wppb_display_admin_settings['.$key.']" value="show"';if ($wppb_showAdminBar[$key] == 'show') echo ' checked';echo'/><font size="1">Show</font><span style="padding-left:20px"></span>
|
126 |
+
<input type="radio" name="wppb_display_admin_settings['.$key.']" value="hide"';if ($wppb_showAdminBar[$key] == 'hide') echo ' checked';echo'/><font size="1">Hide</font>
|
127 |
+
</td>
|
128 |
+
</tr>';
|
129 |
+
}
|
130 |
+
?>
|
131 |
+
|
132 |
+
<tbody class="plugins">
|
133 |
+
<tr height="10"></tr>
|
134 |
+
<tr>
|
135 |
+
<td>
|
136 |
+
</td>
|
137 |
+
<td>
|
138 |
+
<input type="hidden" name="action" value="update" />
|
139 |
+
<p class="submit">
|
140 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> <?php //Note the use of the _e() function to handle translation of the text ?>
|
141 |
+
</p>
|
142 |
+
</form>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
|
146 |
+
</tbody>
|
147 |
+
</table>
|
148 |
+
|
149 |
+
|
150 |
+
|
151 |
+
<form method="post" action="options.php">
|
152 |
+
<?php $wppb_defaultOptions = get_option('wppb_default_settings'); ?>
|
153 |
+
<?php settings_fields('wppb-option-group'); ?>
|
154 |
+
|
155 |
+
<br/>
|
156 |
+
|
157 |
+
<h3><?php _e('Default Profile Fields'); ?> </h3>
|
158 |
+
<table class="wp-list-table widefat fixed pages" cellspacing="0">
|
159 |
+
<thead>
|
160 |
+
<tr>
|
161 |
+
<th class="manage-column" scope="col">Input Field Name</th>
|
162 |
+
<th class="manage-column" scope="col">Visibility</th>
|
163 |
+
</tr>
|
164 |
+
</thead>
|
165 |
+
<tbody class="plugins" >
|
166 |
+
<tr height="10"></tr>
|
167 |
+
<tr>
|
168 |
+
<td><font size="4">Name:</font></td>
|
169 |
+
<td></td>
|
170 |
+
</tr>
|
171 |
+
</tbody>
|
172 |
+
<tbody>
|
173 |
+
<tr>
|
174 |
+
<td>
|
175 |
+
<span style="padding-left:50px"></span><font size="2">Username</font>
|
176 |
+
</td>
|
177 |
+
<td>
|
178 |
+
<input type="radio" name="wppb_default_settings[username]" value="show" checked /><font size="1">Show</font><span style="padding-left:20px"></span>
|
179 |
+
<input type="radio" name="wppb_default_settings[username]" value="hide" disabled /><font size="1" color="grey">Hide</font>
|
180 |
+
</td>
|
181 |
+
</tr>
|
182 |
+
<tr>
|
183 |
+
<td>
|
184 |
+
<span style="padding-left:50px"></span><font size="2">First Name</font>
|
185 |
+
</td>
|
186 |
+
<td>
|
187 |
+
<input type="radio" name="wppb_default_settings[firstname]" value="show" <?php if ($wppb_defaultOptions['firstname'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
188 |
+
<input type="radio" name="wppb_default_settings[firstname]" value="hide" <?php if ($wppb_defaultOptions['firstname'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
189 |
+
</td>
|
190 |
+
</tr>
|
191 |
+
<tr>
|
192 |
+
<td>
|
193 |
+
<span style="padding-left:50px"></span><font size="2">Last Name</font>
|
194 |
+
</td>
|
195 |
+
<td>
|
196 |
+
<input type="radio" name="wppb_default_settings[lastname]" value="show" <?php if ($wppb_defaultOptions['lastname'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
197 |
+
<input type="radio" name="wppb_default_settings[lastname]" value="hide" <?php if ($wppb_defaultOptions['lastname'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
<tr>
|
201 |
+
<td>
|
202 |
+
<span style="padding-left:50px"></span><font size="2">Nickname</font>
|
203 |
+
</td>
|
204 |
+
<td>
|
205 |
+
<input type="radio" name="wppb_default_settings[nickname]" value="show" <?php if ($wppb_defaultOptions['nickname'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
206 |
+
<input type="radio" name="wppb_default_settings[nickname]" value="hide" <?php if ($wppb_defaultOptions['nickname'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
207 |
+
</td>
|
208 |
+
</tr>
|
209 |
+
<tr>
|
210 |
+
<td>
|
211 |
+
<span style="padding-left:50px"></span><font size="2">Display name publicly as ...</font>
|
212 |
+
</td>
|
213 |
+
<td>
|
214 |
+
<input type="radio" name="wppb_default_settings[dispname]" value="show" <?php if ($wppb_defaultOptions['dispname'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
215 |
+
<input type="radio" name="wppb_default_settings[dispname]" value="hide" <?php if ($wppb_defaultOptions['dispname'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
216 |
+
</td>
|
217 |
+
</tr>
|
218 |
+
<tbody class="plugins">
|
219 |
+
<tr height="10"></tr>
|
220 |
+
<tr>
|
221 |
+
<td><font size="4">Contact Info:</font></td>
|
222 |
+
<td></td>
|
223 |
+
</tr>
|
224 |
+
</tbody>
|
225 |
+
<tbody>
|
226 |
+
<tr>
|
227 |
+
<td>
|
228 |
+
<span style="padding-left:50px"></span><font size="2">E-mail</font>
|
229 |
+
</td>
|
230 |
+
<td>
|
231 |
+
<input type="radio" name="wppb_default_settings[email]" value="show" checked><font size="1">Show</font><span style="padding-left:20px"></span>
|
232 |
+
<input type="radio" name="wppb_default_settings[email]" value="hide" disabled><font size="1" color="grey">Hide</font>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
<tr>
|
236 |
+
<td>
|
237 |
+
<span style="padding-left:50px"></span><font size="2">Website</font>
|
238 |
+
</td>
|
239 |
+
<td>
|
240 |
+
<input type="radio" name="wppb_default_settings[website]" value="show" <?php if ($wppb_defaultOptions['website'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
241 |
+
<input type="radio" name="wppb_default_settings[website]" value="hide" <?php if ($wppb_defaultOptions['website'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
242 |
+
</td>
|
243 |
+
</tr>
|
244 |
+
<tbody class="plugins">
|
245 |
+
</tbody>
|
246 |
+
<tbody>
|
247 |
+
<tr>
|
248 |
+
<td>
|
249 |
+
<span style="padding-left:50px"></span><font size="2">AIM</font>
|
250 |
+
</td>
|
251 |
+
<td>
|
252 |
+
<input type="radio" name="wppb_default_settings[aim]" value="show" <?php if ($wppb_defaultOptions['aim'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
253 |
+
<input type="radio" name="wppb_default_settings[aim]" value="hide" <?php if ($wppb_defaultOptions['aim'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
254 |
+
</td>
|
255 |
+
</tr>
|
256 |
+
<tr>
|
257 |
+
<td>
|
258 |
+
<span style="padding-left:50px"></span><font size="2">Yahoo IM</font>
|
259 |
+
</td>
|
260 |
+
<td>
|
261 |
+
<input type="radio" name="wppb_default_settings[yahoo]" value="show" <?php if ($wppb_defaultOptions['yahoo'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
262 |
+
<input type="radio" name="wppb_default_settings[yahoo]" value="hide" <?php if ($wppb_defaultOptions['yahoo'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
263 |
+
</td>
|
264 |
+
</tr>
|
265 |
+
<tr>
|
266 |
+
<td>
|
267 |
+
<span style="padding-left:50px"></span><font size="2">Jabber / Google Talk</font>
|
268 |
+
</td>
|
269 |
+
<td>
|
270 |
+
<input type="radio" name="wppb_default_settings[jabber]" value="show" <?php if ($wppb_defaultOptions['jabber'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
271 |
+
<input type="radio" name="wppb_default_settings[jabber]" value="hide" <?php if ($wppb_defaultOptions['jabber'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
272 |
+
</td>
|
273 |
+
</tr>
|
274 |
+
<tbody class="plugins">
|
275 |
+
<tr height="10"></tr>
|
276 |
+
<tr>
|
277 |
+
<td><font size="4">About Yourself:</font></td>
|
278 |
+
<td></td>
|
279 |
+
</tr>
|
280 |
+
</tbody>
|
281 |
+
<tbody>
|
282 |
+
<tr>
|
283 |
+
<td>
|
284 |
+
<span style="padding-left:50px"></span><font size="2">Biographical Info</font>
|
285 |
+
</td>
|
286 |
+
<td>
|
287 |
+
<input type="radio" name="wppb_default_settings[bio]" value="show" <?php if ($wppb_defaultOptions['bio'] == 'show') echo 'checked';?> /><font size="1">Show</font><span style="padding-left:20px"></span>
|
288 |
+
<input type="radio" name="wppb_default_settings[bio]" value="hide" <?php if ($wppb_defaultOptions['bio'] == 'hide') echo 'checked';?> /><font size="1">Hide</font>
|
289 |
+
</td>
|
290 |
+
</tr>
|
291 |
+
<tbody class="plugins">
|
292 |
+
<tr>
|
293 |
+
<td>
|
294 |
+
</td>
|
295 |
+
<td>
|
296 |
+
</td>
|
297 |
+
</tr>
|
298 |
+
</tbody>
|
299 |
+
<tbody>
|
300 |
+
<tr>
|
301 |
+
<td>
|
302 |
+
<span style="padding-left:50px"></span><font size="2">New Password</font>
|
303 |
+
</td>
|
304 |
+
<td>
|
305 |
+
<input type="radio" name="wppb_default_settings[password]" value="show" checked><font size="1">Show</font><span style="padding-left:20px"></span>
|
306 |
+
<input type="radio" name="wppb_default_settings[password]" value="hide" disabled><font size="1" color="grey">Hide</font>
|
307 |
+
</td>
|
308 |
+
</tr>
|
309 |
+
<tbody class="plugins">
|
310 |
+
<tr height="10"></tr>
|
311 |
+
<tr>
|
312 |
+
<td>
|
313 |
+
</td>
|
314 |
+
<td>
|
315 |
+
<input type="hidden" name="action" value="update" />
|
316 |
+
<p class="submit">
|
317 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /> <?php //Note the use of the _e() function to handle translation of the text ?>
|
318 |
+
</p>
|
319 |
+
</form>
|
320 |
+
</td>
|
321 |
+
</tr>
|
322 |
+
|
323 |
+
</tbody>
|
324 |
+
</table>
|
325 |
+
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<?php
|
329 |
+
}
|
330 |
+
?>
|
profile-builder.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
$styleUrl = WP_PLUGIN_URL . '/profile-builder/css/style.css';
|
1 |
$styleFile = WP_PLUGIN_DIR . '/profile-builder/css/style.css';
|
2 |
if ( file_exists($styleFile) && $wppb_showDefaultCss == 'yes') {
|
3 |
wp_register_style('wppb_stylesheet', $styleUrl);
|
4 |
wp_enqueue_style( 'wppb_stylesheet');
|
5 |
}
|
|
|
6 |
add_action('wp_print_styles', 'wppb_add_plugin_stylesheet'); // include the standard style-sheet or specify the path to a new one
|
1 |
+
<?php
|
2 |
+
/* Copyright 2011 Reflection Media (wwww.reflectionmedia.ro)
|
3 |
+
register_activation_hook( __FILE__ , 'wppb_initialize_variables' ); //initialize some values upon plug-in activation
|
4 |
+
$admintSettingsPresent = get_option('wppb_display_admin_settings','not_found');
|
5 |
+
function wppb_create_menu(){
|
6 |
+
|
7 |
+
|
8 |
$styleUrl = WP_PLUGIN_URL . '/profile-builder/css/style.css';
|
9 |
$styleFile = WP_PLUGIN_DIR . '/profile-builder/css/style.css';
|
10 |
if ( file_exists($styleFile) && $wppb_showDefaultCss == 'yes') {
|
11 |
wp_register_style('wppb_stylesheet', $styleUrl);
|
12 |
wp_enqueue_style( 'wppb_stylesheet');
|
13 |
}
|
14 |
+
if (is_admin() ){ // if we are in the admin menu
|
15 |
add_action('wp_print_styles', 'wppb_add_plugin_stylesheet'); // include the standard style-sheet or specify the path to a new one
|
readme.txt
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Profile Builder ===
|
2 |
+
|
3 |
+
Contributors: reflectionmedia, barinagabriel
|
4 |
+
Donate link: http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin
|
5 |
+
Tags: user registration, custom field registration, customize profile, user fields, builder, profile builder
|
6 |
+
Requires at least: 3.1
|
7 |
+
Tested up to: 3.1
|
8 |
+
Stable tag: 1.0.2
|
9 |
+
|
10 |
+
|
11 |
+
Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed.
|
12 |
+
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
Profile Builder lets you customize your website by adding a front-end menu for all your users,
|
17 |
+
giving them a more flexible way to modify their user-information or to register new users.
|
18 |
+
Also, grants users with administrator rights to customize basic fields.
|
19 |
+
To achieve this, just create a new page, and give it an intuitive name(i.e. Edit Profile).
|
20 |
+
Now all you need to do is add the following shortcode(for the previous example): [wppb-edit-profile].
|
21 |
+
Publish your page and you are done!
|
22 |
+
|
23 |
+
You can use the following shortcodes:
|
24 |
+
|
25 |
+
* [wppb-edit-profile] - to grant users a front-end acces to their personal information(requires user to be logged in).
|
26 |
+
* [wppb-login] - for a log-in form.
|
27 |
+
* [wppb-register] - to add a registration form.
|
28 |
+
|
29 |
+
Also, users with administrator rights have access to the following features:
|
30 |
+
|
31 |
+
* add a custom stylesheet/inherit values from the current theme or use the default one, built into this plug-in.
|
32 |
+
* select whether to display or not the admin bar in the front end for a specific user-group registered to the site.
|
33 |
+
* select which information-field can the users see/modify. The hidden fields' values remain unmodified.
|
34 |
+
|
35 |
+
NOTE:
|
36 |
+
|
37 |
+
This plugin only adds/removes fields in the front-end. The default information-fields will still be visible(and thus modifiable)
|
38 |
+
from the back-end, while custom fields will only be visible in the front-end.
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
== Installation ==
|
43 |
+
|
44 |
+
1. Upload the profile-builder folder to the `/wp-content/plugins/` directory
|
45 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
46 |
+
1. Create a new page and use one of the shortcodes available
|
47 |
+
|
48 |
+
== Frequently Asked Questions ==
|
49 |
+
|
50 |
+
= Will it change the default admin-panel from the back-end by adding/disableing information-fields? =
|
51 |
+
|
52 |
+
No, profile-builder only affects the front-end of your site, leaving the default fields unmodified
|
53 |
+
|
54 |
+
= Will the information be also updated for any hidden fields? =
|
55 |
+
|
56 |
+
No, only fields visible to the users will/can be modified/updated.
|
57 |
+
|
58 |
+
|
59 |
+
== Screenshots ==
|
60 |
+
|
61 |
+
1. Login Page: screenshot-1.jpg
|
62 |
+
2. Register Page: screenshot-2.jpg
|
63 |
+
3. Backend Settings: screenshot-3.jpg
|
64 |
+
|
65 |
+
== Changelog ==
|
66 |
+
|
67 |
+
= 1.0.2 =
|
68 |
+
Small changes.
|
69 |
+
|
70 |
+
= 1.0.1 =
|
71 |
+
Changes to the ReadMe File
|
72 |
+
|
73 |
+
= 1.0 =
|
74 |
+
Added the posibility of displaying/hiding default WordPress information-fields, and to modify basic layout.
|
screenshots/screenshot-1.jpg
ADDED
Binary file
|
screenshots/screenshot-2.jpg
ADDED
Binary file
|
screenshots/screenshot-3.jpg
ADDED
Binary file
|
uninstall.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
delete_option( 'wppb_default_settings' ); // Delete default settings from options table
|