本文整理汇总了PHP中wp_registration_url函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_registration_url函数的具体用法?PHP wp_registration_url怎么用?PHP wp_registration_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_registration_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ellak_social_links
function ellak_social_links()
{
?>
<div class="header-login">
<?php
if (is_user_logged_in()) {
?>
<a href="<?php
echo esc_url(get_edit_user_link());
?>
"><?php
_e('Ο λογαριασμός μου', 'gpchild-ellak');
?>
</a>
<a href="<?php
echo esc_url(wp_logout_url(get_permalink()));
?>
"><?php
_e('Αποσύνδεση', 'gpchild-ellak');
?>
</a>
<?php
} else {
if (get_option('users_can_register')) {
?>
<a href="<?php
echo esc_url(wp_registration_url());
?>
"><?php
_e('Εγγραφή', 'gpchild-ellak');
?>
</a>
<?php
}
// get_option
?>
<a href="<?php
echo esc_url(wp_login_url());
?>
"><?php
_e('Συνδεση', 'gpchild-ellak');
?>
</a>
<?php
}
// is_user_logged_in
?>
</div>
<div class="header-social-links">
<ul class="social-links">
<li class="social-link-facebook"><a href="https://www.facebook.com/CreativeCommonsGreece" target="_blank"><span>Facebook</span></a></li>
<li class="social-link-twitter"><a href="https://www.twitter.com/cc_greece" target="_blank"><span>Twitter</span></a></li>
<li class="social-link-rss"><a href="https://ellak.gr/rss-feeds/" target="_blank"><span>RSS</span></a></li>
</ul>
</div><!-- .header-social-links -->
<?php
}
示例2: regclass_process_form
function regclass_process_form()
{
// error_log("+++++++++++++++++++++++++++++++++++++++++");
// error_log(print_r($_POST, true));
if (!empty($_POST['nonce_regclass_form'])) {
if (!wp_verify_nonce($_POST['nonce_regclass_form'], 'handle_regclass_form')) {
die('You are not authorized to perform this action.');
} else {
//die('Its safe to do further processing on submitted data.');
$error = null;
if (isset($_POST['signup'])) {
wp_redirect(wp_registration_url(add_query_arg('id', $_GET['id'], get_permalink())));
exit;
} else {
if (isset($_POST['signin'])) {
wp_redirect(wp_login_url(add_query_arg('id', $_GET['id'], get_permalink())));
exit;
} else {
//if( isset($_POST['register'])) {
//die('Its safe to register.');
//echo "hello";
//error_log("register");
wp_redirect(the_permalink());
}
}
}
}
// process input show errors or success message
return "Process Data";
}
示例3: ticket_form_message
/**
* Add front-end notices.
*/
public function ticket_form_message()
{
/** @var $camptix CampTix_Plugin */
global $camptix;
// Warn users that they will need to login to purchase a ticket
if (!is_user_logged_in()) {
$camptix->notice(apply_filters('camptix_require_login_please_login_message', sprintf(__('Please <a href="%s">log in</a> or <a href="%s">create an account</a> to purchase your tickets.', 'camptix'), wp_login_url(add_query_arg($_REQUEST, $this->get_redirect_return_url())), wp_registration_url())));
}
// Inform a user registering multiple attendees that other attendees will enter their own info
if (isset($_REQUEST['tix_action']) && 'attendee_info' == $_REQUEST['tix_action'] && $this->registering_multiple_attendees($_REQUEST['tix_tickets_selected'])) {
$notice = __('<p>Please enter your own information for the first ticket, and then enter the names and e-mail addresses of other attendees in the subsequent ticket fields.</p>', 'camptix');
if ($this->tickets_have_questions($_REQUEST['tix_tickets_selected'])) {
$notice .= __('<p>The other attendees will receive an e-mail asking them to confirm their registration and enter their additional information.</p>', 'camptix');
}
$camptix->notice($notice);
}
// Ask the attendee to confirm their registration
if (isset($_REQUEST['tix_action']) && 'edit_attendee' == $_REQUEST['tix_action'] && self::UNCONFIRMED_USERNAME == get_post_meta($_REQUEST['tix_attendee_id'], 'tix_username', true)) {
$tickets_selected = array(get_post_meta($_REQUEST['tix_attendee_id'], 'tix_ticket_id', true) => 1);
// mimic $_REQUEST['tix_tickets_selected']
if ($this->tickets_have_questions($tickets_selected)) {
$notice = __('To complete your registration, please fill out the fields below, and then click on the Confirm Registration button.', 'camptix');
} else {
$notice = __('To complete your registration, please verify that all of the information below is correct, and then click on the Confirm Registration button.', 'camptix');
}
$camptix->notice($notice);
}
}
示例4: wp_login_form
function wp_login_form($args = array())
{
$defaults = array('redirect' => (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'form_id' => uniqid('loginform_'), 'label_username' => __('Username', 'dfd'), 'placeholder_username' => __('Enter your login', 'dfd'), 'label_password' => __('Password', 'dfd'), 'placeholder_password' => __('Enter your password', 'dfd'), 'label_lost_password' => __('Lost password', 'dfd'), 'label_log_in' => __('Log In', 'dfd'), 'id_username' => uniqid('user_login_'), 'id_password' => uniqid('user_pass_'), 'id_submit' => uniqid('wp-submit_'), 'lost_password' => true, 'value_username' => '');
$args = wp_parse_args($args, apply_filters('login_form_defaults', $defaults));
$registration_link = '';
if (get_option('users_can_register')) {
$registration_link = '
<a href="' . wp_registration_url() . '"><i class="ios7icon-lock"></i>' . __('Registration', 'dfd') . '</a>
';
}
$form = '
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url(site_url('wp-login.php', 'login_post')) . '" method="post">
' . apply_filters('login_form_top', '', $args) . '
<p class="login-username">
<label for="' . esc_attr($args['id_username']) . '">' . esc_html($args['label_username']) . '</label>
<input type="text" name="log" id="' . esc_attr($args['id_username']) . '" class="input" value="' . esc_attr($args['value_username']) . '" size="20" placeholder="' . esc_html($args['placeholder_username']) . '" />
</p>
<p class="login-password">
<label for="' . esc_attr($args['id_password']) . '">' . esc_html($args['label_password']) . '</label>
<input type="password" name="pwd" id="' . esc_attr($args['id_password']) . '" class="input" value="" size="20" placeholder="' . esc_html($args['placeholder_password']) . '" />
</p>
<p class="login-submit">
<button type="submit" name="wp-submit" id="' . esc_attr($args['id_submit']) . '" class="button"><i class="icon-arrow-left-1"></i>' . esc_attr($args['label_log_in']) . '</button>
<input type="hidden" name="redirect_to" value="' . esc_url($args['redirect']) . '" />
</p>
' . ($args['lost_password'] ? '<p class="login-lost-password"><label>' . '<a href="' . wp_lostpassword_url() . '">' . esc_attr($args['label_lost_password']) . '</a></label></p>' : '') . '<p class="login-registration">
' . $registration_link . '
</p>' . apply_filters('login_form_bottom', '', $args) . '
</form>';
echo $form;
}
示例5: palo_filter_frontend_modal_link_atts
/**
* Sets the right href and class attributes for the modal link in menus
*/
function palo_filter_frontend_modal_link_atts($atts, $item, $args)
{
/**
* Ony apply to modal login or register
*/
if (in_array($atts['href'], array('#pa_modal_login', '#pa_modal_register'))) {
/**
* Add trigger if not logged in
*/
if (!is_user_logged_in()) {
$atts['class'] = assign_if_exists('class', $atts) . ' palo-modal-login-trigger';
}
/**
* Modify links
*/
if ('#pa_modal_login' == $atts['href']) {
if (is_user_logged_in()) {
$atts['href'] = wp_logout_url();
} else {
$atts['href'] = wp_login_url();
$atts['data-palo-modal'] = palo_append_qs(wp_login_url(), 'palo-login=1');
}
} else {
if ('#pa_modal_register' == $atts['href']) {
$atts['href'] = wp_registration_url();
$atts['data-palo-modal'] = palo_append_qs(wp_registration_url(), 'palo-login=1');
}
}
}
return $atts;
}
示例6: v_forcelogin
function v_forcelogin()
{
if (!is_user_logged_in() && (v_getUrl() != wp_login_url() && v_getUrl() != wp_registration_url() && v_getUrl() != wp_lostpassword_url())) {
wp_redirect(wp_login_url(), 302);
exit;
}
}
示例7: widget
function widget($args, $instance)
{
global $user_login;
if (!isset($args['widget_id'])) {
$args['widget_id'] = null;
}
extract($args, EXTR_SKIP);
extract($instance);
echo $before_widget;
$title = apply_filters('widget_title', $title, $instance, $this->id_base);
if (is_user_logged_in()) {
$user = get_user_by('login', $user_login);
$title = __('Welcome', 'mfn-opts') . ' ' . $user->data->display_name;
}
echo '<div class="mfn-login">';
if ($title) {
echo $before_title . $title . $after_title;
}
// validation
if (isset($_GET['login']) && $_GET['login'] == 'failed') {
$errcode = $_GET['errcode'];
if ($errcode == "empty_username" || $errcode == "empty_password") {
$error = __('Please enter Username and Password', 'mfn-opts');
} elseif ($errcode == 'invalid_username') {
$error = __('Invalid Username', 'mfn-opts');
} elseif ($errcode == 'incorrect_password') {
$error = __('Incorrect Password', 'mfn-opts');
}
echo '<div class="alert alert_error">' . $error . '</div>';
}
if (is_user_logged_in()) {
echo '<div class="avatar-wrapper">' . get_avatar($user->ID, 64) . '</div>';
echo '<div class="author">';
_e('Logged in as ', 'mfn-opts');
echo '<strong>' . ucfirst(implode(', ', $user->roles)) . '</strong><br />';
echo '<a href="' . admin_url() . '">' . __('Dashboard', 'mfn-opts') . '</a>';
echo '<span class="sep">|</span>';
echo '<a href="' . admin_url() . 'profile.php">' . __('Profile', 'mfn-opts') . '</a>';
echo '<span class="sep">|</span>';
echo '<a href="' . wp_logout_url(site_url()) . '">' . __('Logout', 'mfn-opts') . '</a>';
echo '</div>';
} else {
wp_login_form(array('value_remember' => 0, 'redirect' => site_url(), 'remember' => false));
echo '<div class="links">';
if ($show_register) {
echo '<a href="' . wp_registration_url() . '">' . __('Register', 'mfn-opts') . '</a>';
}
if ($show_register && $show_forgotten_password) {
echo '<span class="sep">|</span>';
}
if ($show_forgotten_password) {
echo '<a href="' . wp_registration_url() . '">' . __('Lost your password?', 'mfn-opts') . '</a>';
}
echo '</div>';
}
echo '</div>' . "\n";
echo $after_widget;
}
示例8: dadospessoais_scripts
function dadospessoais_scripts()
{
wp_enqueue_script('dadospessoais', get_stylesheet_directory_uri() . '/js/dadospessoais.js', array('jquery'));
$var_plataforma = array();
$var_plataforma['signup_url'] = wp_registration_url();
$var_plataforma['login_url'] = wp_login_url();
$var_plataforma['configs'] = array('ajaxurl' => admin_url('admin-ajax.php'), 'ajaxgif' => get_template_directory_uri() . '/images/ajax-loader.gif');
wp_localize_script('dadospessoais', 'dadosPessoais', $var_plataforma);
}
示例9: pp_registration_url
/** Get ProfilePress login page URL or WP default login url if it isn't set. */
function pp_registration_url()
{
$data = pp_db_data();
if (!empty($data['set_registration_url'])) {
$reg_url = get_permalink($data['set_registration_url']);
} else {
$reg_url = wp_registration_url();
}
return $reg_url;
}
示例10: __construct
/**
* Creates the Nav Menu Markup class
* @param My_Plugin_Settings_Public $settings
*/
function __construct(My_Plugin_Settings_Public $settings)
{
$this->settings = $settings;
$this->site_title = get_bloginfo('name');
$this->home_url = esc_url(home_url('/'));
$this->current_url = esc_url(get_permalink());
$this->login_url = wp_login_url($this->current_url);
$this->logout_url = wp_logout_url($this->current_url);
$this->register_url = wp_registration_url();
$this->unique_menu_id = 'menu_' . $settings->get_option_settings_db_name();
}
示例11: login_form_register
function login_form_register()
{
global $videotube;
$loginpage = isset($videotube['loginpage']) ? $videotube['loginpage'] : null;
if ($loginpage) {
$permalink_structure = get_option('permalink_structure') ? '?' : '&';
$redirect_to = $_REQUEST['redirect_to'] ? $permalink_structure . 'redirect_to=' . $_REQUEST['redirect_to'] : null;
wp_redirect(get_permalink($loginpage) . $redirect_to);
} else {
wp_redirect(wp_registration_url());
}
}
示例12: aione_register_link_shortcode
function aione_register_link_shortcode($atts)
{
// Attributes
extract(shortcode_atts(array('class' => '', 'text' => 'Sign up'), $atts));
$output = "";
if (!is_user_logged_in()) {
$output .= '<div id="login_link" class="user-links login-link ' . $class . '">';
$output .= '<a href="' . wp_registration_url() . '" title="' . $text . '">' . $text . '</a>';
$output .= '</div>';
}
return $output;
}
示例13: wdm_auction_dashboard_login
function wdm_auction_dashboard_login($ext_html)
{
$login_screen = '';
$db_url = get_option('wdm_dashboard_page_url');
//get custom login and registration url if set
$wdm_login_url = get_option('wdm_login_page_url');
$wdm_registration_url = get_option('wdm_register_page_url');
if (empty($wdm_login_url)) {
if ($ext_html === 'bid') {
$wdm_login_url = wp_login_url($_SERVER['REQUEST_URI']);
} elseif ($ext_html === 'watchlist') {
$wdm_login_url = wp_login_url($_SERVER['REQUEST_URI'] . "&add_to_watch=y");
} elseif ($ext_html === 'review') {
$wdm_login_url = wp_login_url($_SERVER['REQUEST_URI'] . "&rnr=shw");
} else {
$wdm_login_url = wp_login_url($db_url);
}
}
if (empty($wdm_registration_url)) {
$wdm_registration_url = wp_registration_url();
}
//if($ext_html === 'watchlist'){
// $wdm_login_url = wp_login_url( $_SERVER['REQUEST_URI']."&add_to_watch=y");
//}
//elseif($ext_html === 'review'){
// $wdm_login_url = wp_login_url( $_SERVER['REQUEST_URI']."&rnr=shw");
//}
//if($ext_html === 'bid'){
if ($ext_html === 'bid') {
$login_screen .= '<div class="wdm_ua_pop_up_cmn"><center><div class="ua_login_popup_text">';
$login_screen .= __("Please sign in to place your bid or buy the product.", "wdm-ultimate-auction");
$login_screen .= '</div>';
$login_screen .= '<a class="wdm-login-ua-db wdm_ua_login_db" href="' . $wdm_login_url . '" title="' . __('Login', 'wdm-ultimate-auction') . '">' . __("Login", "wdm-ultimate-auction") . '</a></center></div>';
// }
//else{
// $login_screen .= '<div class="wdm_ua_pop_up_cmn"><center><div class="ua_login_popup_text">';
// $login_screen .= __("Please sign in to view your dashboard.", "wdm-ultimate-auction");
// $login_screen .= '</div>';
// $login_screen .= '<a class="wdm-login-ua-db wdm_ua_login_db" href="'.wp_login_url($db_url).'" title="Login">'.__("Login", "wdm-ultimate-auction").'</a></center></div>';
//}
} else {
$login_screen .= '<div class="wdm_ua_pop_up_cmn"><center><div class="ua_login_popup_text">';
$login_screen .= __("Please sign in to view your dashboard.", "wdm-ultimate-auction");
$login_screen .= '</div>';
$login_screen .= '<a class="wdm-login-ua-db wdm_ua_login_db" href="' . wp_login_url($db_url) . '" title="Login">' . __("Login", "wdm-ultimate-auction") . '</a></center></div>';
}
$login_screen .= '<div class="wdm_ua_pop_up_cmn" style="margin-top:40px;"><center><div class="ua_login_popup_text">';
$login_screen .= __("Don't have an account?", "wdm-ultimate-auction");
$login_screen .= '</div>';
$login_screen .= '<a class="wdm-login-ua-db wdm_ua_reg_db" href="' . $wdm_registration_url . '" title="' . __('Register', 'wdm-ultimate-auction') . '">' . __("Register now", "wdm-ultimate-auction") . '</a></center></div>';
return $login_screen;
}
示例14: theme_enqueue_styles
/**
* Scripts and styles
*/
function theme_enqueue_styles()
{
// styles
wp_enqueue_style('parent-style', PARENT_URI . '/style.css');
wp_enqueue_style('child-style', CHILD_URI . '/css/style.css');
//scripts
wp_enqueue_script('jquery');
wp_enqueue_script('flexslider', CHILD_URI . '/js/flexslider-min.js', 'jquery', 2.1);
wp_enqueue_script('scripts', CHILD_URI . '/js/script.js', '', '');
$var_pna = array();
$var_pna['signup_url'] = wp_registration_url();
$var_pna['login_url'] = wp_login_url(get_permalink());
wp_localize_script('scripts', 'pna', $var_pna);
}
示例15: ensure_user_accepted_terms
public static function ensure_user_accepted_terms()
{
if (isset($_COOKIE['user-accepted-terms'])) {
return;
} elseif (isset($_POST) && isset($_POST['terms-acceptance'])) {
setcookie('user-accepted-terms', 'yes', time() + 3600 * 24 * 10, COOKIEPATH, COOKIE_DOMAIN, false);
wp_redirect(wp_registration_url());
exit;
} else {
KeyshotShopifyMultipassLoginPage::load_login_head();
KeyshotShopifyMultipass::view('terms', array());
exit;
}
}