Advertisement
wolfcreativo

account-signin.php

Feb 18th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.02 KB | None | 0 0
  1. <?php
  2. /**
  3.  * In job listing creation flow, this template shows above the job creation form.
  4.  *
  5.  * This template can be overridden by copying it to yourtheme/job_manager/account-signin.php.
  6.  *
  7.  * @see         https://wpjobmanager.com/document/template-overrides/
  8.  * @author      Automattic
  9.  * @package     WP Job Manager
  10.  * @category    Template
  11.  * @version     1.29.1
  12.  */
  13.  
  14. if ( ! defined( 'ABSPATH' ) ) {
  15.     exit; // Exit if accessed directly
  16. }
  17. ?>
  18. <?php if ( is_user_logged_in() ) : ?>
  19.  
  20.     <fieldset>
  21.         <label><?php _e( 'Your account', 'wp-job-manager' ); ?></label>
  22.         <div class="field account-sign-in">
  23.             <?php
  24.                 $user = wp_get_current_user();
  25.                 printf( __( 'You are currently signed in as <strong>%s</strong>.', 'wp-job-manager' ), $user->user_login );
  26.             ?>
  27.  
  28.             <!--<a class="button" href="<?php echo apply_filters( 'submit_job_form_logout_url', wp_logout_url( get_permalink() ) ); ?>"><?php _e( 'Sign out', 'wp-job-manager' ); ?></a>-->
  29.         </div>
  30.     </fieldset>
  31.  
  32. <?php else :
  33.     $account_required            = job_manager_user_requires_account();
  34.     $registration_enabled        = job_manager_enable_registration();
  35.     $registration_fields         = wpjm_get_registration_fields();
  36.     $use_standard_password_email = wpjm_use_standard_password_setup_email();
  37.     ?>
  38.     <fieldset>
  39.         <label><?php _e( 'Have an account?', 'wp-job-manager' ); ?></label>
  40.         <div class="field account-sign-in">
  41. <?php //THIS IS THE CHANGED CODE************************?>
  42.             <a class="button" data-toggle="modal" data-target="#sign-up-modal"><?php _e( 'Sign in', 'wp-job-manager' ); ?></a>
  43. <?php //END CODE ************************?>
  44.             <?php if ( $registration_enabled ) : ?>
  45.  
  46.                 <?php printf( __( 'If you don&rsquo;t have an account you can %screate one below by entering your email address/username.', 'wp-job-manager' ), $account_required ? '' : __( 'optionally', 'wp-job-manager' ) . ' ' ); ?>
  47.                 <?php if ( $use_standard_password_email ) : ?>
  48.                     <?php printf( __( 'Your account details will be confirmed via email.', 'wp-job-manager' ) ); ?>
  49.                 <?php endif; ?>
  50.  
  51.             <?php elseif ( $account_required ) : ?>
  52.  
  53.                 <?php echo apply_filters( 'submit_job_form_login_required_message',  __('You must sign in to create a new listing.', 'wp-job-manager' ) ); ?>
  54.  
  55.             <?php endif; ?>
  56.         </div>
  57.     </fieldset>
  58.     <?php
  59.     if ( ! empty( $registration_fields ) ) {
  60.         foreach ( $registration_fields as $key => $field ) {
  61.             ?>
  62.             <fieldset class="fieldset-<?php echo esc_attr( $key ); ?>">
  63.                 <label
  64.                     for="<?php echo esc_attr( $key ); ?>"><?php echo $field[ 'label' ] . apply_filters( 'submit_job_form_required_label', $field[ 'required' ] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ); ?></label>
  65.                 <div class="field <?php echo $field[ 'required' ] ? 'required-field' : ''; ?>">
  66.                     <?php get_job_manager_template( 'form-fields/' . $field[ 'type' ] . '-field.php', array( 'key'   => $key, 'field' => $field ) ); ?>
  67.                 </div>
  68.             </fieldset>
  69.             <?php
  70.         }
  71.         do_action( 'job_manager_register_form' );
  72.     }
  73.     ?>
  74. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement