init
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php if ( has_nav_menu( 'my_account' ) ) { ?>
|
||||
|
||||
<?php
|
||||
echo wp_nav_menu(array(
|
||||
'theme_location' => 'my_account',
|
||||
'container' => false,
|
||||
'items_wrap' => '%3$s',
|
||||
'depth' => 0,
|
||||
'walker' => new FlatsomeNavSidebar
|
||||
));
|
||||
?>
|
||||
<?php } else if(!get_theme_mod('wc_account_links', 1)) { ?>
|
||||
<li>Define your My Account dropdown menu in <b>Appearance > Menus</b> or enable default WooCommerce Account Endpoints.</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(function_exists('wc_get_account_menu_items') && get_theme_mod('wc_account_links', 1)){ ?>
|
||||
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
|
||||
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
|
||||
<?php if($endpoint == 'dashboard'){ ?>
|
||||
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint )); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
<!-- empty -->
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' )) ); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php do_action('flatsome_account_links'); ?>
|
||||
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--customer-logout">
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( 'customer-logout', '', wc_get_page_permalink( 'myaccount' )) ); ?>"><?php _e('Logout','woocommerce'); ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
@@ -0,0 +1,17 @@
|
||||
<div class="account-user circle">
|
||||
<span class="image mr-half inline-block">
|
||||
<?php
|
||||
$current_user = wp_get_current_user();
|
||||
$user_id = $current_user->ID;
|
||||
echo get_avatar( $user_id, 70 );
|
||||
?>
|
||||
</span>
|
||||
<span class="user-name inline-block">
|
||||
<?php
|
||||
echo $current_user->display_name;
|
||||
?>
|
||||
<em class="user-id op-5"><?php echo '#'.$user_id;?></em>
|
||||
</span>
|
||||
|
||||
<?php do_action('flatsome_after_account_user'); ?>
|
||||
</div>
|
@@ -0,0 +1,23 @@
|
||||
<ul class="dashboard-links">
|
||||
<?php if ( has_nav_menu( 'my_account' ) ) { ?>
|
||||
<?php
|
||||
wp_nav_menu(array(
|
||||
'theme_location' => 'my_account',
|
||||
'container' => false,
|
||||
'items_wrap' => '%3$s',
|
||||
'depth' => 1
|
||||
));
|
||||
?>
|
||||
<?php } else if(!function_exists('wc_get_account_menu_items')) { ?>
|
||||
<li>Define your My Account dropdown menu in <b>Appearance > Menus</b></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(function_exists('wc_get_account_menu_items') && flatsome_option('wc_account_links')){ ?>
|
||||
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
|
||||
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
|
||||
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint ) ); ?>"><?php echo esc_html( $label ); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php do_action('flatsome_account_links'); ?>
|
||||
<?php } ?>
|
||||
</ul>
|
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form - Lightbox Right Pane
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$registration = 'yes' === get_option( 'woocommerce_enable_myaccount_registration' );
|
||||
$panel_bg_color = get_theme_mod( 'account_login_lightbox_side_panel_bg_color', Flatsome_Default::COLOR_PRIMARY );
|
||||
$panel_bg_image = get_theme_mod( 'account_login_lightbox_side_panel_bg_image' );
|
||||
$panel_bg_overlay = get_theme_mod( 'account_login_lightbox_side_panel_bg_overlay' );
|
||||
$css_panel_bg_args = array();
|
||||
$css_panel_bg_overlay_args = array();
|
||||
|
||||
if ( $panel_bg_image ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $panel_bg_image ) . ')',
|
||||
);
|
||||
}
|
||||
if ( $panel_bg_color ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_color,
|
||||
);
|
||||
}
|
||||
|
||||
if ( $panel_bg_overlay ) {
|
||||
$css_panel_bg_overlay_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_overlay,
|
||||
);
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container">
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
|
||||
<div class="col2-set row row-collapse row-large" id="customer_login">
|
||||
|
||||
<?php if ( $block = get_theme_mod( 'account_login_lightbox_side_panel_block' ) ) : ?>
|
||||
<div class="col-1 large-6 col">
|
||||
|
||||
<div class="account-register-inner">
|
||||
<?php echo flatsome_apply_shortcode( 'block', array( 'id' => $block ) ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : // Default. ?>
|
||||
<div class="col-1 large-6 col flex-row">
|
||||
|
||||
<?php if ( $panel_bg_image || $panel_bg_color ) : ?>
|
||||
<div class="account-register-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_panel_bg_args ); ?>>
|
||||
<?php if ( $panel_bg_overlay ) echo '<div class="account-register-bg-overlay fill"' . get_shortcode_inline_css( $css_panel_bg_overlay_args ) . '></div>'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-register-inner relative flex-col flex-grow dark text-center">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
<p><?php esc_html_e( "Don't have an account? Register one!", 'flatsome' ); ?></p>
|
||||
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="button white is-outline"><?php esc_html_e( 'Register an Account', 'flatsome' ); ?></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
|
||||
<div class="col-2 large-6 col">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner inner-padding">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" />
|
||||
<span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( $registration ) : ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form - Lightbox Right Pane
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$panel_bg_color = get_theme_mod( 'account_login_lightbox_side_panel_bg_color', Flatsome_Default::COLOR_PRIMARY );
|
||||
$panel_bg_image = get_theme_mod( 'account_login_lightbox_side_panel_bg_image' );
|
||||
$panel_bg_overlay = get_theme_mod( 'account_login_lightbox_side_panel_bg_overlay' );
|
||||
$css_panel_bg_args = array();
|
||||
$css_panel_bg_overlay_args = array();
|
||||
|
||||
if ( $panel_bg_image ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $panel_bg_image ) . ')',
|
||||
);
|
||||
}
|
||||
if ( $panel_bg_color ) {
|
||||
$css_panel_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_color,
|
||||
);
|
||||
}
|
||||
|
||||
if ( $panel_bg_overlay ) {
|
||||
$css_panel_bg_overlay_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $panel_bg_overlay,
|
||||
);
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container">
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
<div class="col2-set row row-collapse row-large" id="customer_login">
|
||||
|
||||
<div class="col-1 large-6 col">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner inner-padding">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $block = get_theme_mod( 'account_login_lightbox_side_panel_block' ) ) : ?>
|
||||
<div class="col-2 large-6 col">
|
||||
|
||||
<div class="account-register-inner">
|
||||
<?php echo flatsome_apply_shortcode( 'block', array( 'id' => $block ) ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : // Default. ?>
|
||||
<div class="col-2 large-6 col flex-row">
|
||||
|
||||
<?php if ( $panel_bg_image || $panel_bg_color ) : ?>
|
||||
<div class="account-register-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_panel_bg_args ); ?>>
|
||||
<?php if ( $panel_bg_overlay ) echo '<div class="account-register-bg-overlay fill"' . get_shortcode_inline_css( $css_panel_bg_overlay_args ) . '></div>'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-register-inner relative flex-col flex-grow dark text-center">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
<p><?php esc_html_e( "Don't have an account? Register one!", 'flatsome' ); ?></p>
|
||||
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="button white is-outline"><?php esc_html_e( 'Register an Account', 'flatsome' ); ?></a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
135
wp-content/themes/flatsome/woocommerce/myaccount/form-login.php
Normal file
135
wp-content/themes/flatsome/woocommerce/myaccount/form-login.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* Login Form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 4.1.0
|
||||
*
|
||||
* @flatsome-parallel-template {
|
||||
* form-login-lightbox-left-panel.php
|
||||
* form-login-lightbox-right-panel.php
|
||||
* }
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_customer_login_form' ); ?>
|
||||
|
||||
<div class="account-container lightbox-inner">
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
<div class="col2-set row row-divided row-large" id="customer_login">
|
||||
|
||||
<div class="col-1 large-6 col pb-0">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="account-login-inner">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Login', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-2 large-6 col pb-0">
|
||||
|
||||
<div class="account-register-inner">
|
||||
|
||||
<h3 class="uppercase"><?php esc_html_e( 'Register', 'woocommerce' ); ?></h3>
|
||||
|
||||
<form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> >
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_start' ); ?>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" />
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'A password will be sent to your email address.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-Button woocommerce-button button woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
85
wp-content/themes/flatsome/woocommerce/myaccount/header.php
Normal file
85
wp-content/themes/flatsome/woocommerce/myaccount/header.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
$is_facebook_login = is_nextend_facebook_login();
|
||||
$is_google_login = is_nextend_google_login();
|
||||
|
||||
$login_text = get_theme_mod( 'facebook_login_text' );
|
||||
$login_bg_image = get_theme_mod( 'facebook_login_bg', '' );
|
||||
$login_bg_color = get_theme_mod( 'my_account_title_bg_color', '' );
|
||||
|
||||
if ( $login_bg_image ) $css_login_bg_args[] = array(
|
||||
'attribute' => 'background-image',
|
||||
'value' => 'url(' . do_shortcode( $login_bg_image ) . ')',
|
||||
);
|
||||
if ( $login_bg_color ) $css_login_bg_args[] = array(
|
||||
'attribute' => 'background-color',
|
||||
'value' => $login_bg_color,
|
||||
);
|
||||
|
||||
global $wp;
|
||||
$endpoint_label = '';
|
||||
$current_url = home_url( $wp->request );
|
||||
|
||||
// Collect current WC endpoint label.
|
||||
if ( function_exists( 'wc_get_account_menu_items' ) && get_theme_mod( 'wc_account_links', 1 ) ) {
|
||||
foreach ( wc_get_account_menu_items() as $endpoint => $label ) {
|
||||
if ( untrailingslashit( wc_get_account_endpoint_url( $endpoint ) ) === $current_url ) {
|
||||
$endpoint_label = $label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="my-account-header page-title normal-title
|
||||
<?php if ( get_theme_mod( 'my_account_title_text_color', 'dark' ) == 'light' ) echo 'dark'; ?>
|
||||
<?php if ( $login_bg_image ) echo ' featured-title'; ?>">
|
||||
|
||||
<?php if ( $login_bg_image || $login_bg_color ) : ?>
|
||||
<div class="page-title-bg fill bg-fill" <?php echo get_shortcode_inline_css( $css_login_bg_args ); ?>>
|
||||
<div class="page-title-bg-overlay fill"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-title-inner flex-row container
|
||||
<?php echo ' text-' . get_theme_mod( 'my_account_title_align', 'left' ); ?>">
|
||||
<div class="flex-col flex-grow <?php if ( get_theme_mod( 'logo_position' ) == 'center' ) { echo 'text-center'; } else { echo 'medium-text-center'; } ?>">
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
|
||||
<h1 class="uppercase mb-0"><?php the_title(); ?></h1>
|
||||
<?php if ( ! empty ( $endpoint_label ) ) echo '<small class="uppercase">' . esc_html( $endpoint_label ) . '</small>'; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="text-center social-login">
|
||||
<?php if ( ! $is_facebook_login && ! $is_google_login ) {
|
||||
echo '<h1 class="uppercase mb-0">' . get_the_title() . '</h1>';
|
||||
} ?>
|
||||
|
||||
<?php if ( $is_facebook_login && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) {
|
||||
$facebook_url = add_query_arg( array( 'loginSocial' => 'facebook' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $facebook_url ); ?>" class="button social-button large facebook circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="facebook" data-popupwidth="475" data-popupheight="175">
|
||||
<i class="icon-facebook"></i>
|
||||
<span><?php _e( 'Login with <strong>Facebook</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( $is_google_login && get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' && ! is_user_logged_in() ) {
|
||||
$google_url = add_query_arg( array( 'loginSocial' => 'google' ), wp_login_url() );
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( $google_url ); ?>" class="button social-button large google-plus circle" data-plugin="nsl" data-action="connect" data-redirect="current" data-provider="google" data-popupwidth="600" data-popupheight="600">
|
||||
<i class="icon-google-plus"></i>
|
||||
<span><?php _e( 'Login with <strong>Google</strong>', 'flatsome' ); ?></span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ( $login_text ) { ?><p><?php echo do_shortcode( $login_text ); ?></p><?php } ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* My Account navigation
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/navigation.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see http://docs.woothemes.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
?>
|
Reference in New Issue
Block a user