本文整理汇总了PHP中wppb_curpageurl函数的典型用法代码示例。如果您正苦于以下问题:PHP wppb_curpageurl函数的具体用法?PHP wppb_curpageurl怎么用?PHP wppb_curpageurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wppb_curpageurl函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wppb_front_end_logout
function wppb_front_end_logout($atts)
{
if (!is_user_logged_in()) {
return;
}
$current_user = get_userdata(get_current_user_id());
extract(shortcode_atts(array('text' => sprintf(__('You are currently logged in as %s. ', 'profilebuilder'), $current_user->user_login), 'redirect' => wppb_curpageurl(), 'link_text' => __('Log out »', 'profilebuilder')), $atts));
$logout_link = '<a href="' . wp_logout_url($redirect) . '" class="wppb-logout-url" title="' . __('Log out of this account', 'profilebuilder') . '">' . $link_text . '</a>';
$meta_tags = apply_filters('wppb_front_end_logout_meta_tags', array('{{meta_user_name}}', '{{meta_first_name}}', '{{meta_last_name}}', '{{meta_display_name}}'));
$meta_tags_values = apply_filters('wppb_front_end_logout_meta_tags_values', array($current_user->user_login, $current_user->first_name, $current_user->last_name, $current_user->display_name));
$text = apply_filters('wppb_front_end_logout_text', str_replace($meta_tags, $meta_tags_values, $text), $current_user);
return '<p class="wppb-front-end-logout"><span>' . $text . '</span>' . $logout_link . '</p>';
}
开发者ID:katekbg,项目名称:2thinkers_cebu,代码行数:13,代码来源:logout.php
示例2: wppb_front_end_logout
function wppb_front_end_logout($atts)
{
if (!is_user_logged_in()) {
return;
}
$current_user = get_userdata(get_current_user_id());
extract(shortcode_atts(array('text' => sprintf(__('You are currently logged in as %s. ', 'profile-builder'), $current_user->user_login), 'redirect' => wppb_curpageurl(), 'redirect_priority' => 'normal', 'link_text' => __('Log out »', 'profile-builder')), $atts));
if (PROFILE_BUILDER == 'Profile Builder Pro') {
$wppb_module_settings = get_option('wppb_module_settings');
if (isset($wppb_module_settings['wppb_customRedirect']) && $wppb_module_settings['wppb_customRedirect'] == 'show' && $redirect_priority != 'top' && function_exists('wppb_custom_redirect_url')) {
$redirect = wppb_custom_redirect_url('after_logout', $redirect);
}
}
$redirect = apply_filters('wppb_after_logout_redirect_url', $redirect);
$logout_link = '<a href="' . wp_logout_url($redirect) . '" class="wppb-logout-url" title="' . __('Log out of this account', 'profile-builder') . '">' . $link_text . '</a>';
$meta_tags = apply_filters('wppb_front_end_logout_meta_tags', array('{{meta_user_name}}', '{{meta_first_name}}', '{{meta_last_name}}', '{{meta_display_name}}'));
$meta_tags_values = apply_filters('wppb_front_end_logout_meta_tags_values', array($current_user->user_login, $current_user->first_name, $current_user->last_name, $current_user->display_name));
$text = apply_filters('wppb_front_end_logout_text', str_replace($meta_tags, $meta_tags_values, $text), $current_user);
return '<p class="wppb-front-end-logout"><span>' . $text . '</span>' . $logout_link . '</p>';
}
开发者ID:ksan5835,项目名称:rankproperties,代码行数:20,代码来源:logout.php
示例3: wppb_front_end_register
//.........这里部分代码省略.........
if (trim($error) != '') {
} else {
$new_user = 'yes';
$multisite_message = true;
$meta = array('user_pass' => base64_encode($userdata['user_pass']), 'first_name' => $userdata['first_name'], 'last_name' => $userdata['last_name'], 'nickname' => $userdata['nickname'], 'user_url' => $userdata['user_url'], 'aim' => $userdata['aim'], 'yim' => $userdata['yim'], 'jabber' => $userdata['jabber'], 'description' => $userdata['description'], 'role' => $userdata['role']);
$meta = wppb_add_custom_field_values($_POST, $meta);
wppb_signup_user($userdata['user_login'], $userdata['user_email'], $meta);
}
}
}
}
?>
<div class="wppb_holder" id="wppb_register">
<?php
if (is_user_logged_in() && !current_user_can('create_users')) {
global $user_ID;
$login = get_userdata($user_ID);
if ($login->display_name == '') {
$login->display_name = $login->user_login;
}
$registerFilterArray['loginLogoutError'] = '
<p class="log-in-out alert">' . __('You are logged in as', 'profilebuilder') . ' <a href="' . get_author_posts_url($login->ID) . '" title="' . $login->display_name . '">' . $login->display_name . '</a>. ' . __('You don\'t need another account.', 'profilebuilder') . ' <a href="' . wp_logout_url(get_permalink()) . '" title="' . __('Log out of this account.', 'profilebuilder') . '">' . __('Logout', 'profilebuilder') . ' »</a></p><!-- .log-in-out .alert -->';
$registerFilterArray['loginLogoutError'] = apply_filters('wppb_register_have_account_alert', $registerFilterArray['loginLogoutError'], $login->ID);
echo $registerFilterArray['loginLogoutError'];
} elseif ($new_user != 'no') {
if (current_user_can('create_users')) {
if ($multisite_message) {
$registerFilterArray['wpmuRegistrationMessage1'] = '<p class="success">' . sprintf(__('An email has been sent to %1$s with information on how to activate his/her account.', 'profilebuilder'), $userdata['user_email']) . '</p><!-- .success -->';
echo $registerFilterArray['registrationMessage1'] = apply_filters('wppb_wpmu_register_account_created1', $registerFilterArray['wpmuRegistrationMessage1'], $registered_name, $userdata['user_email']);
} else {
$registerFilterArray['registrationMessage1'] = '<p class="success">' . sprintf(__('A user account has been created for %1$s.', 'profilebuilder'), $registered_name) . '</p><!-- .success -->';
echo $registerFilterArray['registrationMessage1'] = apply_filters('wppb_register_account_created1', $registerFilterArray['registrationMessage1'], $registered_name);
}
$redirectLink = wppb_curpageurl();
if (file_exists(WPPB_PLUGIN_DIR . '/premium/addons/addon.php')) {
//check to see if the redirecting addon is present and activated
$wppb_addon_settings = get_option('wppb_addon_settings');
if ($wppb_addon_settings['wppb_customRedirect'] == 'show') {
//check to see if the redirect location is not an empty string and is activated
$customRedirectSettings = get_option('customRedirectSettings');
if (trim($customRedirectSettings['afterRegisterTarget']) != '' && $customRedirectSettings['afterRegister'] == 'yes') {
$redirectLink = trim($customRedirectSettings['afterRegisterTarget']);
if (wppb_check_missing_http($redirectLink)) {
$redirectLink = 'http://' . $redirectLink;
}
}
}
}
$registerFilterArray['redirectMessage1'] = '<font id="messageTextColor">' . sprintf(__('You will soon be redirected automatically. If you see this page for more than 3 seconds, please click %1$s.%2$s', 'profilebuilder'), '<a href="' . $redirectLink . '">' . __('here', 'profilebuilder') . '</a>', '<meta http-equiv="Refresh" content="3;url=' . $redirectLink . '" />') . '</font><br/><br/>';
echo $registerFilterArray['redirectMessage1'] = apply_filters('wppb_register_redirect_after_creation1', $registerFilterArray['redirectMessage1'], $redirectLink);
} else {
if ($multisite_message) {
$registerFilterArray['wpmuRegistrationMessage2'] = '<p class="success">' . __('An email has been sent to you with information on how to activate your account.', 'profilebuilder') . '</p><!-- .success -->';
echo $registerFilterArray['wpmuRegistrationMessage2'] = apply_filters('wppb_register_account_created2', $registerFilterArray['wpmuRegistrationMessage2'], $registered_name);
} else {
$registerFilterArray['registrationMessage2'] = '<p class="success">' . sprintf(__('Thank you for registering %1$s.', 'profilebuilder'), $registered_name) . '</p><!-- .success -->';
echo $registerFilterArray['registrationMessage2'] = apply_filters('wppb_register_account_created2', $registerFilterArray['registrationMessage2'], $registered_name);
}
$redirectLink = wppb_curpageurl();
if (file_exists(WPPB_PLUGIN_DIR . '/premium/addons/addon.php')) {
//check to see if the redirecting addon is present and activated
$wppb_addon_settings = get_option('wppb_addon_settings');
if ($wppb_addon_settings['wppb_customRedirect'] == 'show') {
//check to see if the redirect location is not an empty string and is activated
$customRedirectSettings = get_option('customRedirectSettings');
if (trim($customRedirectSettings['afterRegisterTarget']) != '' && $customRedirectSettings['afterRegister'] == 'yes') {
开发者ID:par-orillonsoft,项目名称:elearning-wordpress,代码行数:67,代码来源:wppb.register.php
示例4: wppb_get_redirect
function wppb_get_redirect()
{
if ($this->args['login_after_register'] == 'Yes') {
return $this->wppb_log_in_user();
}
if ($this->args['redirect_activated'] == 'No' || $this->args['form_type'] == 'edit_profile' && $this->args['form_name'] == 'unspecified' && wppb_curpageurl() == $this->args['redirect_url'] || $this->args['form_type'] == 'register' && $this->args['form_name'] == 'unspecified' && wppb_curpageurl() == $this->args['redirect_url']) {
return '';
}
/* if we don't have a preference on the form for redirect then if we have a custom redirect "after register redirect" option redirect to that if not don't do anything */
if ($this->args['redirect_activated'] == '-') {
if (!empty($this->args['custom_redirect_after_register_url'])) {
$this->args['redirect_url'] = $this->args['custom_redirect_after_register_url'];
} else {
return '';
}
}
$redirect_location = wppb_check_missing_http($this->args['redirect_url']) ? 'http://' . $this->args['redirect_url'] : $this->args['redirect_url'];
$redirect_url = apply_filters('wppb_redirect_url', '<a href="' . $redirect_location . '">' . __('here', 'profile-builder') . '</a>');
return apply_filters('wppb_redirect_message_before_returning', '<p class="redirect_message">' . sprintf(__('You will soon be redirected automatically. If you see this page for more than %1$d seconds, please click %2$s.%3$s', 'profile-builder'), $this->args['redirect_delay'], $redirect_url, '<meta http-equiv="Refresh" content="' . $this->args['redirect_delay'] . ';url=' . $redirect_location . '" />') . '</p>', $this->args);
}
开发者ID:RuseHackV2,项目名称:Go-Out,代码行数:20,代码来源:class-formbuilder.php
示例5: wppb_front_end_password_recovery
/**
* The function for the recover password shortcode
*
*/
function wppb_front_end_password_recovery()
{
global $wppb_shortcode_on_front;
$wppb_shortcode_on_front = true;
$message = $messageNo = $message2 = $messageNo2 = $linkLoginName = $linkKey = '';
global $wpdb;
ob_start();
//Get general settings
$wppb_generalSettings = get_option('wppb_general_settings');
// If the user entered an email/username, process the request
if ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == 'recover_password' && wp_verify_nonce($_POST['password_recovery_nonce_field'], 'verify_true_password_recovery')) {
$postedData = $_POST['username_email'];
//we get the raw data
//check to see if it's an e-mail (and if this is valid/present in the database) or is a username
// if we do not have an email in the posted date we try to get the email for that user
if (!is_email($postedData)) {
if (username_exists($postedData)) {
$query = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->users} WHERE user_login= %s", $postedData));
if (!empty($query[0])) {
$postedData = $query[0]->user_email;
}
} else {
$message = __('The username entered wasn\'t found in the database!', 'profile-builder') . '<br/>' . __('Please check that you entered the correct username.', 'profile-builder');
$message = apply_filters('wppb_recover_password_sent_message4', $message);
$messageNo = '4';
}
}
// we should have an email by this point
if (is_email($postedData)) {
if (email_exists($postedData)) {
$retVal = wppb_check_for_unapproved_user($postedData, 'user_email');
if ($retVal[0] != '') {
$message = $retVal[0];
$messageNo = $retVal[1];
} else {
$message = sprintf(__('Check your e-mail for the confirmation link.', 'profile-builder'), $postedData);
$message = apply_filters('wppb_recover_password_sent_message1', $message, $postedData);
$messageNo = '1';
}
} elseif (!email_exists($postedData)) {
$message = __('The email address entered wasn\'t found in the database!', 'profile-builder') . '<br/>' . __('Please check that you entered the correct email address.', 'profile-builder');
$message = apply_filters('wppb_recover_password_sent_message2', $message);
$messageNo = '2';
}
}
// For some extra validations you can filter messageNo
$messageNo = apply_filters('wppb_recover_password_message_no', $messageNo);
if ($messageNo == '1') {
//verify e-mail validity
$query = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->users} WHERE user_email= %s", $postedData));
if (!empty($query[0])) {
$requestedUserID = $query[0]->ID;
$requestedUserLogin = $query[0]->user_login;
$requestedUserEmail = $query[0]->user_email;
$requestedUserNicename = $query[0]->user_nicename;
if ($wppb_generalSettings['loginWith'] == 'username') {
$display_username_email = $query[0]->user_login;
} else {
$display_username_email = $query[0]->user_email;
}
//search if there is already an activation key present, if not create one
$key = wppb_retrieve_activation_key($requestedUserLogin);
//send primary email message
$recoveruserMailMessage1 = sprintf(__('Someone requested that the password be reset for the following account: <b>%1$s</b><br/>If this was a mistake, just ignore this email and nothing will happen.<br/>To reset your password, visit the following link:%2$s', 'profile-builder'), $display_username_email, '<a href="' . esc_url(add_query_arg(array('loginName' => $requestedUserNicename, 'key' => $key), wppb_curpageurl())) . '">' . esc_url(add_query_arg(array('loginName' => $requestedUserNicename, 'key' => $key), wppb_curpageurl())) . '</a>');
$recoveruserMailMessage1 = apply_filters('wppb_recover_password_message_content_sent_to_user1', $recoveruserMailMessage1, $requestedUserID, $requestedUserLogin, $requestedUserEmail);
$recoveruserMailMessageTitle1 = sprintf(__('Password Reset from "%1$s"', 'profile-builder'), $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES));
$recoveruserMailMessageTitle1 = apply_filters('wppb_recover_password_message_title_sent_to_user1', $recoveruserMailMessageTitle1, $requestedUserLogin);
//we add this filter to enable html encoding
add_filter('wp_mail_content_type', create_function('', 'return "text/html"; '));
//send mail to the user notifying him of the reset request
if (trim($recoveruserMailMessageTitle1) != '') {
$sent = wp_mail($requestedUserEmail, $recoveruserMailMessageTitle1, $recoveruserMailMessage1);
if ($sent === false) {
$message = '<b>' . __('ERROR', 'profile-builder') . ': </b>' . sprintf(__('There was an error while trying to send the activation link to %1$s!', 'profile-builder'), $postedData);
$message = apply_filters('wppb_recover_password_sent_message_error_sending', $message);
$messageNo = '5';
}
}
}
}
} elseif ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action2']) && $_POST['action2'] == 'recover_password2' && wp_verify_nonce($_POST['password_recovery_nonce_field2'], 'verify_true_password_recovery2_' . $_POST['userData'])) {
if ($_POST['passw1'] == $_POST['passw2'] && (!empty($_POST['passw1']) && !empty($_POST['passw2']))) {
if (!empty($wppb_generalSettings['minimum_password_length']) || isset($_POST['wppb_password_strength']) && !empty($wppb_generalSettings['minimum_password_strength'])) {
$message2 = '';
if (wppb_check_password_length($_POST['passw1'])) {
$message2 .= '<br/>' . sprintf(__("The password must have the minimum length of %s characters", "profile-builder"), $wppb_generalSettings['minimum_password_length']) . '<br/>';
$messageNo2 = '2';
}
if (wppb_check_password_strength()) {
$message2 .= '<br/>' . sprintf(__("The password must have a minimum strength of %s", "profile-builder"), wppb_check_password_strength());
$messageNo2 = '2';
}
}
if ($messageNo2 != 2) {
$message2 = __('Your password has been successfully changed!', 'profile-builder');
$messageNo2 = '1';
//.........这里部分代码省略.........
开发者ID:aaronfrey,项目名称:PepperLillie-TAT,代码行数:101,代码来源:recover.php
示例6: wppb_front_end_profile_info
//.........这里部分代码省略.........
$editProfileFilterArray['errorUploadingAttachments'] .= ';<span style="padding-left:10px"></span>';
}
}
$editProfileFilterArray['errorUploadingAttachments'] .= '</span><br/>' . sprintf(__('Possible cause: the size was bigger than %1$sb. The listed attachements were %2$sNOT%3$s updated along with the rest of the information.', 'profilebuilder'), WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA, '<span class="error">', '</span>') . '</p>';
echo $editProfileFilterArray['errorUploadingAttachments'] = apply_filters('wppb_edit_profile_error_uploading_attachments', $editProfileFilterArray['errorUploadingAttachments']);
$previousError = 'yes';
}
if ($changesSaved == 'yes' && $avatarUpload == 'no' && $previousError == 'no') {
$editProfileFilterArray['errorUploadingAvatar'] = '
<p class="semi-saved">' . __('There was an error while trying to upload your avatar picture.', 'profilebuilder') . '<br/>' . __('Possible cause: size/incorrect file-type.', 'profilebuilder') . '<br/>' . __('The avatar was', 'profilebuilder') . ' <span class="error">' . __('NOT', 'profilebuilder') . '</span> ' . __('updated along with the rest of the information.', 'profilebuilder') . '
</p>';
echo $editProfileFilterArray['errorUploadingAvatar'] = apply_filters('wppb_edit_profile_error_uploading_avatar', $editProfileFilterArray['errorUploadingAvatar']);
$previousError = 'yes';
} elseif ($changesSaved == 'yes' && $nrOfBadExtUploads != 0 && $previousError == 'no') {
$editProfileFilterArray['errorUploadingAttachmentExts'] = '
<p class="semi-saved">' . __('There was an error while trying to upload the following attachment(s)', 'profilebuilder') . ': <span class="error">';
foreach ($uploadExt as $key5 => $name5) {
$lastOne++;
$editProfileFilterArray['errorUploadingAttachmentExts'] .= $name5;
if ($nrOfBadExtUploads - $lastOne > 0) {
$editProfileFilterArray['errorUploadingAttachmentExts'] .= ';<span style="padding-left:10px"></span>';
}
}
$editProfileFilterArray['errorUploadingAttachmentExts'] .= '</span><br/>' . sprintf(__('Only files with the following extension(s) can be uploaded: %1$s<br/>This file was %2$sNOT%3$s updated along with the rest of the information.', 'profilebuilder'), '<span class="error">' . $allowedExtensions . '</span>', '<span class="error">', '</span>') . '</p>';
echo $editProfileFilterArray['errorUploadingAttachmentExts'] = apply_filters('wppb_edit_profile_error_uploading_attachment', $editProfileFilterArray['errorUploadingAttachmentExts']);
$previousError = 'yes';
}
}
/* use this action hook to add extra content before the edit profile form. */
do_action('wppb_before_edit_profile_fields');
?>
<form enctype="multipart/form-data" method="post" id="edituser" class="user-forms" action="<?php
wppb_curpageurl();
?>
">
<?php
echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE . '" /><!-- set the MAX_FILE_SIZE to the server\'s current max upload size in bytes -->';
$editProfileFilterArray2['contentName1'] = '<p class="nameHeader"><strong>' . __('Name', 'profilebuilder') . '</strong></p>';
$editProfileFilterArray2['contentName1'] = apply_filters('wppb_edit_profile_content_name1', $editProfileFilterArray2['contentName1']);
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
if ($wppb_defaultOptions['email'] == 'show') {
$editProfileFilterArray2['contentName2'] = '
<p class="email">
<label for="email">' . __('Email', 'profilebuilder') . '</label>
<input class="text-input" name="email" type="text" id="email" value="' . get_the_author_meta('user_email', $current_user->id) . '" disabled="disabled"/> <span class="wppb-description-delimiter"> ' . __('The email cannot be changed.', 'profilebuilder') . '</span>
</p><!-- .first_name -->';
$editProfileFilterArray2['contentName2'] = apply_filters('wppb_edit_profile_content_name2_with_email', $editProfileFilterArray2['contentName2'], $current_user->id);
}
} else {
if ($wppb_defaultOptions['username'] == 'show') {
$editProfileFilterArray2['contentName2'] = '
<p class="username">
<label for="user_login">' . __('Username', 'profilebuilder') . '</label>
<input class="text-input" name="user_login" type="text" id="user_login" value="' . get_the_author_meta('user_login', $current_user->id) . '" disabled="disabled"/> <span class="wppb-description-delimiter"> ' . __('The usernames cannot be changed.', 'profilebuilder') . '</span>
</p><!-- .first_name -->';
$editProfileFilterArray2['contentName2'] = apply_filters('wppb_edit_profile_content_name2', $editProfileFilterArray2['contentName2'], $current_user->id);
}
}
if ($wppb_defaultOptions['firstname'] == 'show') {
$errorVar = '';
$errorMark = '';
if ($wppb_defaultOptions['firstnameRequired'] == 'yes') {
$errorMark = '<font color="red" title="' . __('This field is marked as required by the administrator.', 'profilebuilder') . '">*</font>';
if (isset($_POST['first_name'])) {
if (trim($_POST['first_name']) == '') {
开发者ID:serker72,项目名称:T3S,代码行数:67,代码来源:wppb.edit.profile_old.php
示例7: wppb_front_end_login
//.........这里部分代码省略.........
$form_args = array('echo' => false, 'id_submit' => 'wppb-submit');
//Add support for "redirect_url" parameter for Login shortcode (will do the same thing as "redirect" - for consistency with Register, Edit Profile shortcodes)
if (!empty($redirect_url)) {
$redirect = $redirect_url;
}
// maybe set up the redirect argument
if (empty($redirect)) {
if (PROFILE_BUILDER == 'Profile Builder Pro') {
$wppb_module_settings = get_option('wppb_module_settings');
if ($wppb_module_settings['wppb_customRedirect'] == 'show') {
//check to see if the redirect location is not an empty string and is activated
$login_redirect_settings = get_option('customRedirectSettings');
// set up the redirect argument to our redirect page
if (trim($login_redirect_settings['afterLoginTarget']) != '' && $login_redirect_settings['afterLogin'] == 'yes') {
$redirect_to = trim($login_redirect_settings['afterLoginTarget']);
if (wppb_check_missing_http($redirect_to)) {
$redirect_to = 'http://' . $redirect_to;
}
$form_args['redirect'] = $redirect_to;
}
}
}
} else {
$form_args['redirect'] = trim($redirect);
}
// change the label argument for username is login with email is enabled
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$form_args['label_username'] = __('Email', 'profile-builder');
}
// change the label argument for username on login with username or email when Username and Email is enabled
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'usernameemail') {
$form_args['label_username'] = __('Username or Email', 'profile-builder');
}
// initialize our form variable
$login_form = '';
// display our login errors
if (isset($_GET['loginerror']) || isset($_POST['loginerror'])) {
$loginerror = isset($_GET['loginerror']) ? $_GET['loginerror'] : $_POST['loginerror'];
$loginerror = '<p class="wppb-error">' . urldecode(base64_decode($loginerror)) . '</p><!-- .error -->';
if (isset($_GET['request_form_location'])) {
if ($_GET['request_form_location'] == 'widget' && !in_the_loop()) {
$login_form .= $loginerror;
} elseif ($_GET['request_form_location'] == 'page' && in_the_loop()) {
$login_form .= $loginerror;
}
}
}
// build our form
$login_form .= '<div id="wppb-login-wrap" class="wppb-user-forms">';
$form_args['lostpassword_url'] = $lostpassword_url;
$login_form .= wp_login_form(apply_filters('wppb_login_form_args', $form_args));
if (!empty($register_url) || !empty($lostpassword_url)) {
$login_form .= '<p class="login-register-lost-password">';
$i = 0;
if (!empty($register_url)) {
if (wppb_check_missing_http($register_url)) {
$register_url = "http://" . $register_url;
}
$login_form .= '<a href="' . esc_url($register_url) . '">' . apply_filters('wppb_login_register_text', __('Register', 'profile-builder')) . '</a>';
$i++;
}
if (!empty($lostpassword_url)) {
if ($i != 0) {
$login_form .= ' | ';
}
if (wppb_check_missing_http($lostpassword_url)) {
$lostpassword_url = "http://" . $lostpassword_url;
}
$login_form .= '<a href="' . esc_url($lostpassword_url) . '">' . apply_filters('wppb_login_lostpass_text', __('Lost your password?', 'profile-builder')) . '</a>';
}
$login_form .= '</p>';
}
$login_form .= '</div>';
return $login_form;
} else {
$user_ID = get_current_user_id();
$wppb_user = get_userdata($user_ID);
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$display_name = $wppb_user->user_email;
} elseif ($wppb_user->display_name !== '') {
$display_name = $wppb_user->user_login;
} else {
$display_name = $wppb_user->display_name;
}
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'usernameemail') {
if ($wppb_user->user_login == Wordpress_Creation_Kit_PB::wck_generate_slug(trim($wppb_user->user_email))) {
$display_name = $wppb_user->user_email;
} elseif ($wppb_user->display_name !== '') {
$display_name = $wppb_user->user_login;
} else {
$display_name = $wppb_user->display_name;
}
}
$logged_in_message = '<p class="wppb-alert">';
$logout_url = '<a href="' . wp_logout_url($redirectTo = wppb_curpageurl()) . '" class="wppb-logout-url" title="' . __('Log out of this account', 'profile-builder') . '">' . __('Log out', 'profile-builder') . ' »</a>';
$logged_in_message .= sprintf(__('You are currently logged in as %1$s. %2$s', 'profile-builder'), $display_name, $logout_url);
$logged_in_message .= '</p><!-- .wppb-alert-->';
return apply_filters('wppb_login_message', $logged_in_message, $wppb_user->ID, $display_name);
}
}
开发者ID:nikwin333,项目名称:pcu_project,代码行数:101,代码来源:login.php
示例8: column_username
/** ************************************************************************
* Recommended. This is a custom column method and is responsible for what
* is rendered in any column with a name/slug of 'username'. Every time the class
* needs to render a column, it first looks for a method named
* column_{$column_title} - if it exists, that method is run. If it doesn't
* exist, column_default() is called instead.
*
* This example also illustrates how to implement rollover actions. Actions
* should be an associative array formatted as 'slug'=>'link html' - and you
* will need to generate the URLs yourself. You could even ensure the links
*
*
* @see PB_WP_List_Table::::single_row_columns()
* @param array $item A singular item (one full row's worth of data)
* @return string Text to be placed inside the column <td>
**************************************************************************/
function column_username($item)
{
$GRavatar = get_avatar($item['email'], 32, '');
//Build row actions
$actions = array('delete' => sprintf('<a href="javascript:confirmECAction( \'%s\', \'%s\', \'%s\', \'' . addslashes(__('delete this user from the _signups table?', 'profile-builder')) . '\' )">' . __('Delete', 'profile-builder') . '</a>', wppb_curpageurl(), 'delete', $item['ID']), 'confirm' => sprintf('<a href="javascript:confirmECAction( \'%s\', \'%s\', \'%s\', \'' . addslashes(__('confirm this email yourself?', 'profile-builder')) . '\' )">' . __('Confirm Email', 'profile-builder') . '</a>', wppb_curpageurl(), 'confirm', $item['ID']), 'resend' => sprintf('<a href="javascript:confirmECAction( \'%s\', \'%s\', \'%s\', \'' . addslashes(__('resend the activation link?', 'profile-builder')) . '\' )">' . __('Resend Activation Email', 'profile-builder') . '</a>', wppb_curpageurl(), 'resend', $item['ID']));
//Return the user row
return sprintf('%1$s <strong>%2$s</strong> %3$s', $GRavatar, $item['username'], $this->row_actions($actions));
}
开发者ID:nikwin333,项目名称:pcu_project,代码行数:24,代码来源:class-email-confirmation.php
示例9: wppb_front_end_login
function wppb_front_end_login($atts)
{
extract(shortcode_atts(array('display' => true, 'redirect' => ''), $atts));
$wppb_generalSettings = get_option('wppb_general_settings');
if (!is_user_logged_in()) {
// set up the form arguments
$form_args = array('echo' => false, 'id_submit' => 'wppb-submit');
// maybe set up the redirect argument
if (empty($redirect)) {
$wppb_module_settings = get_option('wppb_module_settings');
if ($wppb_module_settings['wppb_customRedirect'] == 'show') {
//check to see if the redirect location is not an empty string and is activated
$login_redirect_settings = get_option('customRedirectSettings');
// set up the redirect argument to our redirect page
if (trim($login_redirect_settings['afterLoginTarget']) != '' && $login_redirect_settings['afterLogin'] == 'yes') {
$redirect_to = trim($login_redirect_settings['afterLoginTarget']);
if (wppb_check_missing_http($redirect_to)) {
$redirect_to = 'http://' . $redirect_to;
}
$form_args['redirect'] = $redirect_to;
}
}
} else {
$form_args['redirect'] = trim($redirect);
}
// change the label argument for username is login with email is enabled
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$form_args['label_username'] = __('Email', 'profilebuilder');
}
// initialize our form variable
$login_form = '';
// display our login errors
if (isset($_GET['loginerror']) || isset($_POST['loginerror'])) {
$loginerror = isset($_GET['loginerror']) ? $_GET['loginerror'] : $_POST['loginerror'];
$loginerror = '<p class="wppb-error">' . urldecode(base64_decode($loginerror)) . '</p><!-- .error -->';
if (isset($_GET['request_form_location'])) {
if ($_GET['request_form_location'] == 'widget' && !in_the_loop()) {
$login_form .= $loginerror;
} elseif ($_GET['request_form_location'] == 'page' && in_the_loop()) {
$login_form .= $loginerror;
}
}
}
// build our form
$login_form .= '<div id="wppb-login-wrap" class="wppb-user-forms">';
$login_form .= wp_login_form($form_args);
$login_form .= '</div>';
return $login_form;
} else {
$user_ID = get_current_user_id();
$wppb_user = get_userdata($user_ID);
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$display_name = $wppb_user->user_email;
} elseif ($wppb_user->display_name !== '') {
$display_name = $wppb_user->user_login;
} else {
$display_name = $wppb_user->display_name;
}
$loged_in_message = '<p class="wppb-alert">' . sprintf(__('You are currently logged in as %1$s. %2$s', 'profilebuilder'), '<a href="' . ($authorPostsUrl = get_author_posts_url($wppb_user->ID) . '" title="' . $display_name . '">' . $display_name . '</a>'), '<a href="' . wp_logout_url($redirectTo = wppb_curpageurl()) . '" title="' . __('Log out of this account', 'profilebuilder') . '">' . __('Log out', 'profilebuilder') . ' »</a>') . '</p><!-- .alert-->';
return apply_filters('wppb_login_message', $loged_in_message, $wppb_user->ID, $display_name);
}
}
开发者ID:DarussalamTech,项目名称:aims_prj,代码行数:62,代码来源:login.php
示例10: wppb_front_end_login
function wppb_front_end_login($atts)
{
$loginFilterArray = array();
ob_start();
global $wppb_login;
$wppb_generalSettings = get_option('wppb_general_settings');
extract(shortcode_atts(array('display' => true, 'redirect' => '', 'submit' => 'page'), $atts));
echo '<div class="wppb_holder" id="wppb_login">';
if (is_user_logged_in()) {
// Already logged in
global $user_ID;
$wppb_user = get_userdata($user_ID);
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$display_name = $wppb_user->user_email;
} elseif ($wppb_user->display_name !== '') {
$display_name = $wppb_user->user_login;
} else {
$display_name = $wppb_user->display_name;
}
$loginFilterArray['loginMessage1'] = '<p class="alert">' . sprintf(__('You are currently logged in as %1$s. %2$s', 'profilebuilder'), '<a href="' . ($authorPostsUrl = get_author_posts_url($wppb_user->ID) . '" title="' . $display_name . '">' . $display_name . '</a>'), '<a href="' . wp_logout_url($redirectTo = wppb_curpageurl()) . '" title="' . __('Log out of this account', 'profilebuilder') . '">' . __('Log out', 'profilebuilder') . ' »</a>') . '</p><!-- .alert-->';
echo $loginFilterArray['loginMessage1'] = apply_filters('wppb_login_login_message1', $loginFilterArray['loginMessage1'], $wppb_user->ID, $display_name);
} elseif (isset($wppb_login->ID)) {
// Successful login
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$display_name = $wppb_login->user_email;
} elseif ($wppb_login->display_name !== '') {
$display_name = $wppb_login->user_login;
} else {
$display_name = $wppb_login->display_name;
}
//$loginFilterArray['loginMessage2'] = '<p class="success">' . sprintf(__('You have successfully logged in as %1$s', 'profilebuilder'), '<a href="'.$authorPostsUrl = get_author_posts_url( $wppb_login->ID ).'" title="'.$display_name.'">'.$display_name.'</a>') . '</p><!-- .success-->';
$loginFilterArray['loginMessage2'] = '<p class="success">' . sprintf(__('Вы вошли как %1$s', 'profilebuilder'), '<a href="' . ($authorPostsUrl = get_author_posts_url($wppb_login->ID) . '" title="' . $display_name . '">' . $display_name . '</a>')) . '</p><!-- .success-->';
echo $loginFilterArray['loginMessage2'] = apply_filters('wppb_login_login_message2', $loginFilterArray['loginMessage2'], $wppb_login->ID, $display_name);
if (isset($_POST['button']) && isset($_POST['formName'])) {
if ($_POST['formName'] == 'login') {
if ($_POST['button'] == 'page') {
$permaLnk2 = wppb_curpageurl();
$wppb_addon_settings = get_option('wppb_addon_settings');
//fetch the descriptions array
if ($wppb_addon_settings['wppb_customRedirect'] == 'show') {
//check to see if the redirect location is not an empty string and is activated
$customRedirectSettings = get_option('customRedirectSettings');
if (trim($customRedirectSettings['afterLoginTarget']) != '' && $customRedirectSettings['afterLogin'] == 'yes') {
$permaLnk2 = trim($customRedirectSettings['afterLoginTarget']);
if (wppb_check_missing_http($permaLnk2)) {
$permaLnk2 = 'http://' . $permaLnk2;
}
}
}
$permaLnk2 = "/account/profile/";
//$loginFilterArray['redirectMessage'] = '<font id="messageTextColor">' . sprintf(__('You will soon be redirected automatically. If you see this page for more than 1 second, please click %1$s', 'profilebuilder'), '<a href="'.$permaLnk2.'">'. __('here', 'profilebuilder').'</a>.<meta http-equiv="Refresh" content="1;url='.$permaLnk2.'" />') . '</font><br/><br/>';
$loginFilterArray['redirectMessage'] = '<font id="messageTextColor">' . sprintf(__('В ближайшее время вы будете перенаправлены на другую страницу. Если прошло более 1 секунды, то нажмите на эту ссылку %1$s', 'profilebuilder'), '<a href="' . $permaLnk2 . '">' . __('here', 'profilebuilder') . '</a>.<meta http-equiv="Refresh" content="1;url=' . $permaLnk2 . '" />') . '</font><br/><br/>';
echo $loginFilterArray['redirectMessage'] = apply_filters('wppb_login_redirect_message', $loginFilterArray['redirectMessage'], $permaLnk2);
} elseif ($_POST['button'] == 'widget') {
$permaLnk2 = wppb_curpageurl();
if ($redirect != '') {
$permaLnk2 = trim($redirect);
}
$loginFilterArray['widgetRedirectMessage'] = '<font id="messageTextColor">' . sprintf(__('You will soon be redirected automatically. If you see this page for more than 1 second, please click %1$s', 'profilebuilder'), '<a href="' . $permaLnk2 . '">' . __('here', 'profilebuilder') . '</a>.<meta http-equiv="Refresh" content="1;url=' . $permaLnk2 . '" />') . '</font><br/><br/>';
echo $loginFilterArray['widgetRedirectMessage'] = apply_filters('wppb_login_widget_redirect_message', $loginFilterArray['widgetRedirectMessage'], $permaLnk2);
}
}
}
} else {
// Not logged in
if (!empty($_POST['action']) && isset($_POST['formName'])) {
if ($_POST['formName'] == 'login') {
?>
<p class="error">
<?php
if (trim($_POST['user-name']) == '') {
if (isset($wppb_generalSettings['loginWith']) && $wppb_generalSettings['loginWith'] == 'email') {
$loginFilterArray['emptyUsernameError'] = '<strong>' . __('ERROR:', 'profilebuilder') . '</strong> ' . __('The email field is empty', 'profilebuilder') . '.';
$loginFilterArray['emptyUsernameError'] = apply_filters('wppb_login_empty_email_as_username_error_message', $loginFilterArray['emptyUsernameError']);
} else {
$loginFilterArray['emptyUsernameError'] = '<strong>' . __('ERROR:', 'profilebuilder') . '</strong> ' . __('The username field is empty', 'profilebuilder') . '.';
$loginFilterArray['emptyUsernameError'] = apply_filters('wppb_login_empty_username_error_message', $loginFilterArray['emptyUsernameError']);
}
echo $loginFilterArray['emptyUsernameError'];
} elseif (trim($_POST['password']) == '') {
$loginFilterArray['emptyPasswordError'] = '<strong>' . __('ERROR:', 'profilebuilder') . '</strong> ' . __('The password field is empty', 'profilebuilder') . '.';
$loginFilterArray['emptyPasswordError'] = apply_filters('wppb_login_empty_password_error_message', $loginFilterArray['emptyPasswordError']);
echo $loginFilterArray['emptyPasswordError'];
}
if (is_wp_error($wppb_login)) {
$loginFilterArray['wpError'] = $wppb_login->get_error_message();
$loginFilterArray['wpError'] = apply_filters('wppb_login_wp_error_message', $loginFilterArray['wpError'], $wppb_login);
echo $loginFilterArray['wpError'];
}
?>
</p><!-- .error -->
<?php
}
}
/* use this action hook to add extra content before the login form. */
do_action('wppb_before_login');
?>
<form action="<?php
wppb_curpageurl();
//.........这里部分代码省略.........
开发者ID:serker72,项目名称:T3S,代码行数:101,代码来源:wppb.login.php
示例11: wppb_signup_user_notification
/**
* Notify user of signup success.
*
* Filter 'wppb_signup_user_notification_filter' to bypass this function or
* replace it with your own notification behavior.
*
* Filter 'wppb_signup_user_notification_email' and
* 'wppb_signup_user_notification_subject' to change the content
* and subject line of the email sent to newly registered users.
*
* @param string $user The user's login name.
* @param string $user_email The user's email address.
* @param array $meta By default, an empty array.
* @param string $key The activation key created in wppb_signup_user()
* @return bool
*/
function wppb_signup_user_notification($user, $user_email, $key, $meta = '')
{
if (!apply_filters('wppb_signup_user_notification_filter', $user, $user_email, $key, $meta)) {
return false;
}
// Send email with activation link.
$admin_email = get_site_option('admin_email');
if ($admin_email == '') {
$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
}
//$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
//$from_name = apply_filters ('wppb_signup_user_notification_email_from_field', $from_name);
//$message_headers = apply_filters ("wppb_signup_user_notification_from", "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n");
//
// ksk - Content-Type: multipart/alternative; boundary
$EOF = "\r\n";
$from_name = 'Т3С';
//Письмо с вложением состоит из нескольких частей, которые разделяются разделителем
// Генерируем разделитель
$boundary = md5(uniqid(time()));
//$message_headers = apply_filters ("wppb_signup_user_notification_from", "MIME-Version: 1.0;".$EOF."From: \"{$from_name}\" <{$admin_email}>".$EOF."Content-Type: multipart/mixed; boundary=$boundary".$EOF);
$message_headers = "MIME-Version: 1.0;" . $EOF;
$message_headers .= "From: {$from_name} <{$admin_email}>" . $EOF;
//$message_headers .= "Content-Type: multipart/alternative; boundary=$boundary".$EOF;
$message_headers .= "Content-Type: multipart/mixed; boundary=\"{$boundary}\"" . $EOF;
$siteURL = wppb_curpageurl() . wppb_passed_arguments_check() . 'key=' . $key;
//$subject = sprintf(apply_filters( 'wppb_signup_user_no
|
请发表评论