@@ -181,10 +181,13 @@ |
||
181 | 181 | }); |
182 | 182 | </script> |
183 | 183 | <p class="howto"><?php echo esc_html( $howto ); ?></p> |
184 | - <?php else : ?> |
|
184 | + <?php else { |
|
185 | + : ?> |
|
185 | 186 | <?php // Site is public! Explain to them ?> |
186 | 187 | <p><em> |
187 | - <?php esc_html_e( 'You have chosen to make your site public inside Settings > Subway. Make your site private so that you can select visibility options.', 'subway' ); ?> |
|
188 | + <?php esc_html_e( 'You have chosen to make your site public inside Settings > Subway. Make your site private so that you can select visibility options.', 'subway' ); |
|
189 | +} |
|
190 | +?> |
|
188 | 191 | </em> |
189 | 192 | </p> |
190 | 193 | <?php endif; ?> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | namespace Subway; |
21 | 21 | |
22 | 22 | if (! defined('ABSPATH') ) { |
23 | - return; |
|
23 | + return; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -36,47 +36,47 @@ discard block |
||
36 | 36 | final class Enqueue |
37 | 37 | { |
38 | 38 | |
39 | - /** |
|
40 | - * Registers our CSS and Javascript to WordPress Enqueue Handler. |
|
41 | - * |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - public static function registerJs() |
|
45 | - { |
|
39 | + /** |
|
40 | + * Registers our CSS and Javascript to WordPress Enqueue Handler. |
|
41 | + * |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + public static function registerJs() |
|
45 | + { |
|
46 | 46 | |
47 | - $post_id = absint(get_queried_object_id()); |
|
47 | + $post_id = absint(get_queried_object_id()); |
|
48 | 48 | |
49 | - $signin_page = absint(get_option('subway_login_page')); |
|
49 | + $signin_page = absint(get_option('subway_login_page')); |
|
50 | 50 | |
51 | - wp_enqueue_style('subway-style', SUBWAY_DIR_URL . 'assets/css/subway.css'); |
|
51 | + wp_enqueue_style('subway-style', SUBWAY_DIR_URL . 'assets/css/subway.css'); |
|
52 | 52 | |
53 | - // Only load the stylesheet and javascript documents inside our sign-in page. |
|
54 | - if ($post_id === $signin_page ) { |
|
53 | + // Only load the stylesheet and javascript documents inside our sign-in page. |
|
54 | + if ($post_id === $signin_page ) { |
|
55 | 55 | |
56 | - if (! is_user_logged_in() ) { |
|
56 | + if (! is_user_logged_in() ) { |
|
57 | 57 | |
58 | - wp_enqueue_script( |
|
59 | - 'subway-script', |
|
60 | - SUBWAY_DIR_URL . 'assets/js/subway.js', |
|
61 | - array( 'jquery' ) |
|
62 | - ); |
|
58 | + wp_enqueue_script( |
|
59 | + 'subway-script', |
|
60 | + SUBWAY_DIR_URL . 'assets/js/subway.js', |
|
61 | + array( 'jquery' ) |
|
62 | + ); |
|
63 | 63 | |
64 | - wp_localize_script( |
|
65 | - 'subway-script', 'subway_config', array( |
|
66 | - 'ajax_url' => admin_url('admin-ajax.php'), |
|
67 | - 'login_http_error' => esc_html__( |
|
68 | - 'An error occured while |
|
64 | + wp_localize_script( |
|
65 | + 'subway-script', 'subway_config', array( |
|
66 | + 'ajax_url' => admin_url('admin-ajax.php'), |
|
67 | + 'login_http_error' => esc_html__( |
|
68 | + 'An error occured while |
|
69 | 69 | transmitting the data. Refresh the page and try again', |
70 | - 'subway' |
|
71 | - ), |
|
72 | - ) |
|
73 | - ); |
|
70 | + 'subway' |
|
71 | + ), |
|
72 | + ) |
|
73 | + ); |
|
74 | 74 | |
75 | - } |
|
76 | - } |
|
75 | + } |
|
76 | + } |
|
77 | 77 | |
78 | - return; |
|
78 | + return; |
|
79 | 79 | |
80 | - } |
|
80 | + } |
|
81 | 81 | |
82 | 82 | } |