Ei kuvausta

form-grant-access.php 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Auth form grant access
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/auth/form-grant-access.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @package WooCommerce\Templates\Auth
  15. * @version 4.3.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. ?>
  19. <?php do_action( 'woocommerce_auth_page_header' ); ?>
  20. <h1>
  21. <?php
  22. /* Translators: %s App name. */
  23. printf( esc_html__( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) );
  24. ?>
  25. </h1>
  26. <?php wc_print_notices(); ?>
  27. <p>
  28. <?php
  29. /* Translators: %1$s App name, %2$s scope. */
  30. printf( esc_html__( 'This will give "%1$s" %2$s access which will allow it to:', 'woocommerce' ), '<strong>' . esc_html( $app_name ) . '</strong>', '<strong>' . esc_html( $scope ) . '</strong>' );
  31. ?>
  32. </p>
  33. <ul class="wc-auth-permissions">
  34. <?php foreach ( $permissions as $permission ) : ?>
  35. <li><?php echo esc_html( $permission ); ?></li>
  36. <?php endforeach; ?>
  37. </ul>
  38. <div class="wc-auth-logged-in-as">
  39. <?php echo get_avatar( $user->ID, 70 ); ?>
  40. <p>
  41. <?php
  42. /* Translators: %s display name. */
  43. printf( esc_html__( 'Logged in as %s', 'woocommerce' ), esc_html( $user->display_name ) );
  44. ?>
  45. <a href="<?php echo esc_url( $logout_url ); ?>" class="wc-auth-logout"><?php esc_html_e( 'Logout', 'woocommerce' ); ?></a>
  46. </p>
  47. </div>
  48. <p class="wc-auth-actions">
  49. <a href="<?php echo esc_url( $granted_url ); ?>" class="button button-primary wc-auth-approve"><?php esc_html_e( 'Approve', 'woocommerce' ); ?></a>
  50. <a href="<?php echo esc_url( $return_url ); ?>" class="button wc-auth-deny"><?php esc_html_e( 'Deny', 'woocommerce' ); ?></a>
  51. </p>
  52. <?php do_action( 'woocommerce_auth_page_footer' ); ?>