PluginProbe
UpdraftCentral Dashboard / 0.8.13
UpdraftCentral Dashboard v0.8.13
0.8.33 0.7.2 0.7.3 0.7.4 0.8.0 0.8.1 0.8.10 0.8.11 0.8.12 0.8.13 0.8.14 0.8.15 0.8.16 0.8.17 0.8.18 0.8.19 0.8.2 0.8.20 0.8.21 0.8.22 0.8.23 0.8.24 0.8.25 0.8.26 0.8.27 All 51 releases
updraftcentral / templates / dashboard / not-authorised.php

not-authorised.php in UpdraftCentral Dashboard 0.8.13, at templates/dashboard/not-authorised.php

29 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This file displays a link for unauthorised users to logout and login with proper capabilities
4 */
5 if (!defined('UD_CENTRAL_DIR')) die('Security check');
6
7 _e('You are logged in, but your user account is not authorised to see this page.', 'updraftcentral');
8
9 if (function_exists('WC') && function_exists('woocommerce_login_form')) {
10
11 if (!function_exists('updraftcentral_woocommerce_login_form_add_redirect_field')) {
12 function updraftcentral_woocommerce_login_form_add_redirect_field() {
13 echo '<input type="hidden" name="updraftcentral_redirect_on_wc_login" value="'.esc_attr(get_permalink()).'">';
14 }
15 add_action('woocommerce_login_form', 'updraftcentral_woocommerce_login_form_add_redirect_field');
16 }
17
18 echo do_shortcode('[woocommerce_my_account]');
19 } else {
20 if (function_exists('WC') && false != ($myaccount_page_id = get_option('woocommerce_myaccount_page_id'))) {
21 $login_url = get_permalink($myaccount_page_id);
22 } else {
23 $login_url = wp_login_url(get_permalink());
24 }
25 ?>
26 <a href="<?php esc_attr_e($login_url);?>"><?php _e('Go here to log out and log in again.', 'updraftcentral');?></a>
27 <?php
28 }
29