@@ -17,12 +17,12 @@ |
||
17 | 17 | * @link github.com/codehaiku/subway The Plugin Repository |
18 | 18 | */ |
19 | 19 | |
20 | -if ( ! defined( 'ABSPATH' ) ) { |
|
20 | +if ( ! defined('ABSPATH')) { |
|
21 | 21 | return; |
22 | 22 | } |
23 | 23 | ?> |
24 | 24 | <p class="subway-login-lost-password"> |
25 | - <a href="<?php echo esc_url( wp_lostpassword_url( $redirect = '' ) ); ?>"> |
|
26 | - <?php esc_html_e( 'Forgot Password', 'subway' ); ?> |
|
25 | + <a href="<?php echo esc_url(wp_lostpassword_url($redirect = '')); ?>"> |
|
26 | + <?php esc_html_e('Forgot Password', 'subway'); ?> |
|
27 | 27 | </a> |
28 | 28 | </p> |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | namespace Subway; |
21 | 21 | |
22 | -if (! defined('ABSPATH') ) { |
|
22 | +if ( ! defined('ABSPATH')) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | namespace Subway; |
21 | 21 | |
22 | -if (! defined('ABSPATH') ) { |
|
22 | +if ( ! defined('ABSPATH')) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $selected_login_post_id = intval(get_option('subway_login_page')); |
48 | 48 | |
49 | - if (0 === $selected_login_post_id ) { |
|
49 | + if (0 === $selected_login_post_id) { |
|
50 | 50 | |
51 | 51 | return; |
52 | 52 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $login_post = get_post($selected_login_post_id); |
56 | 56 | |
57 | - if (! empty($login_post) ) { |
|
57 | + if ( ! empty($login_post)) { |
|
58 | 58 | |
59 | 59 | return trailingslashit(get_permalink($login_post->ID)); |
60 | 60 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $excluded_pages_collection = array(); |
78 | 78 | |
79 | - if (! empty($subway_public_post) ) { |
|
79 | + if ( ! empty($subway_public_post)) { |
|
80 | 80 | |
81 | 81 | $excluded_pages_collection = explode(',', $subway_public_post); |
82 | 82 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $subway_public_post = get_option('subway_is_public'); |
100 | 100 | |
101 | - if (! empty($subway_public_post) ) { |
|
101 | + if ( ! empty($subway_public_post)) { |
|
102 | 102 | |
103 | 103 | return true; |
104 | 104 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Class Constructor. |
41 | 41 | * |
42 | - * @return void |
|
42 | + * @return Shortcodes |
|
43 | 43 | */ |
44 | 44 | private function __construct() |
45 | 45 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * Instantiate our class. |
55 | 55 | * |
56 | - * @return mixed The instance of this class. |
|
56 | + * @return Shortcodes|null The instance of this class. |
|
57 | 57 | */ |
58 | 58 | public static function instance() |
59 | 59 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * Displays the login form |
93 | 93 | * |
94 | - * @return void |
|
94 | + * @return null|string |
|
95 | 95 | */ |
96 | 96 | public function loginForm( $atts ) |
97 | 97 | { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | namespace Subway; |
21 | 21 | |
22 | -if (! defined('ABSPATH') ) { |
|
22 | +if ( ! defined('ABSPATH')) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | private function __construct() |
45 | 45 | { |
46 | 46 | |
47 | - add_action('init', array( $this, 'register')); |
|
47 | + add_action('init', array($this, 'register')); |
|
48 | 48 | |
49 | 49 | return $this; |
50 | 50 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | static $instance = null; |
62 | 62 | |
63 | - if (null === $instance ) { |
|
63 | + if (null === $instance) { |
|
64 | 64 | |
65 | 65 | $instance = new Shortcodes(); |
66 | 66 | |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | public function register() |
79 | 79 | { |
80 | 80 | |
81 | - add_shortcode('subway_login', array( $this, 'loginForm' )); |
|
81 | + add_shortcode('subway_login', array($this, 'loginForm')); |
|
82 | 82 | |
83 | - add_action('login_form_middle', array( $this, 'loginFormAction' ), 10, 2); |
|
83 | + add_action('login_form_middle', array($this, 'loginFormAction'), 10, 2); |
|
84 | 84 | |
85 | - add_action('login_form_middle', array( $this, 'lostPasswordLink' ), 10, 2); |
|
85 | + add_action('login_form_middle', array($this, 'lostPasswordLink'), 10, 2); |
|
86 | 86 | |
87 | 87 | return; |
88 | 88 | |
@@ -93,15 +93,15 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @return void |
95 | 95 | */ |
96 | - public function loginForm( $atts ) |
|
96 | + public function loginForm($atts) |
|
97 | 97 | { |
98 | - $atts = shortcode_atts( array( |
|
98 | + $atts = shortcode_atts(array( |
|
99 | 99 | 'echo' => true, |
100 | 100 | 'form_id' => 'loginform', |
101 | - 'label_username' => __( 'Username', 'subway' ), |
|
102 | - 'label_password' => __( 'Password', 'subway' ), |
|
103 | - 'label_remember' => __( 'Remember Me', 'subway' ), |
|
104 | - 'label_log_in' => __( 'Log In', 'subway' ), |
|
101 | + 'label_username' => __('Username', 'subway'), |
|
102 | + 'label_password' => __('Password', 'subway'), |
|
103 | + 'label_remember' => __('Remember Me', 'subway'), |
|
104 | + 'label_log_in' => __('Log In', 'subway'), |
|
105 | 105 | 'id_username' => 'user_login', |
106 | 106 | 'id_password' => 'user_pass', |
107 | 107 | 'id_remember' => 'rememberme', |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'value_username' => '', |
111 | 111 | 'value_remember' => false, |
112 | 112 | 'redirect' => home_url(), |
113 | - ), $atts ); |
|
113 | + ), $atts); |
|
114 | 114 | |
115 | 115 | return $this->renderTemplate($atts, 'login-form.php'); |
116 | 116 | } |
@@ -123,22 +123,22 @@ discard block |
||
123 | 123 | * |
124 | 124 | * @return string The html template content. |
125 | 125 | */ |
126 | - protected function renderTemplate( $atts, $file = '' ) |
|
126 | + protected function renderTemplate($atts, $file = '') |
|
127 | 127 | { |
128 | 128 | |
129 | 129 | ob_start(); |
130 | 130 | |
131 | - if (empty($file) ) { |
|
131 | + if (empty($file)) { |
|
132 | 132 | |
133 | 133 | return; |
134 | 134 | |
135 | 135 | } |
136 | 136 | |
137 | - $template = SUBWAY_DIR_PATH . 'templates/'.$file; |
|
137 | + $template = SUBWAY_DIR_PATH . 'templates/' . $file; |
|
138 | 138 | |
139 | - if (file_exists($template) ) { |
|
139 | + if (file_exists($template)) { |
|
140 | 140 | |
141 | - $theme_template = locate_template(array('gears/shortcodes/'.$file )); |
|
141 | + $theme_template = locate_template(array('gears/shortcodes/' . $file)); |
|
142 | 142 | |
143 | 143 | if ($theme_template) { |
144 | 144 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @return string The content of our login form action. |
171 | 171 | */ |
172 | - public function loginFormAction( $__content ) |
|
172 | + public function loginFormAction($__content) |
|
173 | 173 | { |
174 | 174 | |
175 | 175 | ob_start(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * |
188 | 188 | * @return string The content of our lost password link. |
189 | 189 | */ |
190 | - public function lostPasswordLink( $content ) |
|
190 | + public function lostPasswordLink($content) |
|
191 | 191 | { |
192 | 192 | |
193 | 193 | return $content . $this->renderTemplate( |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | namespace Subway; |
21 | 21 | |
22 | -if (! defined('ABSPATH') ) { |
|
22 | +if ( ! defined('ABSPATH')) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function __construct() |
45 | 45 | { |
46 | 46 | |
47 | - add_action('plugins_loaded', array( $this, 'subwayLocalizePlugin' )); |
|
47 | + add_action('plugins_loaded', array($this, 'subwayLocalizePlugin')); |
|
48 | 48 | |
49 | 49 | return; |
50 | 50 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | public function subwayLocalizePlugin() |
58 | 58 | { |
59 | 59 | |
60 | - load_plugin_textdomain('subway', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
|
60 | + load_plugin_textdomain('subway', false, basename(dirname(__FILE__)) . '/languages'); |
|
61 | 61 | |
62 | 62 | return; |
63 | 63 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @link github.com/codehaiku/subway The Plugin Repository |
18 | 18 | */ |
19 | 19 | |
20 | -if ( ! defined( 'ABSPATH' ) ) { |
|
20 | +if ( ! defined('ABSPATH')) { |
|
21 | 21 | return; |
22 | 22 | } |
23 | 23 | |
@@ -25,100 +25,100 @@ discard block |
||
25 | 25 | |
26 | 26 | $message_types = array(); |
27 | 27 | |
28 | -$http_request_login = filter_input( INPUT_GET, 'login', FILTER_SANITIZE_SPECIAL_CHARS ); |
|
28 | +$http_request_login = filter_input(INPUT_GET, 'login', FILTER_SANITIZE_SPECIAL_CHARS); |
|
29 | 29 | |
30 | -$http_request_type = filter_input( INPUT_GET, 'type', FILTER_SANITIZE_SPECIAL_CHARS ); |
|
30 | +$http_request_type = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_SPECIAL_CHARS); |
|
31 | 31 | |
32 | -$http_request_logout = filter_input( INPUT_GET, 'loggedout', FILTER_SANITIZE_SPECIAL_CHARS ); |
|
32 | +$http_request_logout = filter_input(INPUT_GET, 'loggedout', FILTER_SANITIZE_SPECIAL_CHARS); |
|
33 | 33 | |
34 | -if ( isset( $http_request_login ) ) { |
|
34 | +if (isset($http_request_login)) { |
|
35 | 35 | |
36 | - if ( 'failed' === $http_request_login ) { |
|
36 | + if ('failed' === $http_request_login) { |
|
37 | 37 | |
38 | - if ( isset( $http_request_type ) ) { |
|
38 | + if (isset($http_request_type)) { |
|
39 | 39 | |
40 | 40 | $message_types = array( |
41 | 41 | |
42 | 42 | 'default' => array( |
43 | - 'message' => __( 'There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway' ), |
|
43 | + 'message' => __('There was an error trying to sign-in to your account. Make sure the credentials below are correct.', 'subway'), |
|
44 | 44 | ), |
45 | 45 | '__blank' => array( |
46 | - 'message' => __( 'Required: Username and Password cannot be empty.', 'subway' ), |
|
46 | + 'message' => __('Required: Username and Password cannot be empty.', 'subway'), |
|
47 | 47 | ), |
48 | 48 | '__userempty' => array( |
49 | - 'message' => __( 'Required: Username cannot be empty.', 'subway' ), |
|
49 | + 'message' => __('Required: Username cannot be empty.', 'subway'), |
|
50 | 50 | ), |
51 | 51 | '__passempty' => array( |
52 | - 'message' => __( 'Required: Password cannot be empty.', 'subway' ), |
|
52 | + 'message' => __('Required: Password cannot be empty.', 'subway'), |
|
53 | 53 | ), |
54 | 54 | 'fb_invalid_email' => array( |
55 | - 'message' => __( 'Facebook email address is invalid or is not yet verified.', 'subway' ), |
|
55 | + 'message' => __('Facebook email address is invalid or is not yet verified.', 'subway'), |
|
56 | 56 | ), |
57 | 57 | 'fb_error' => array( |
58 | - 'message' => __( 'Facebook Application Error. Misconfigured or App is rejected.', 'subway' ), |
|
58 | + 'message' => __('Facebook Application Error. Misconfigured or App is rejected.', 'subway'), |
|
59 | 59 | ), |
60 | 60 | 'app_not_live' => array( |
61 | - 'message' => __( 'Unable to fetch your Facebook Profile.', 'subway' ), |
|
61 | + 'message' => __('Unable to fetch your Facebook Profile.', 'subway'), |
|
62 | 62 | ), |
63 | 63 | 'gears_username_or_email_exists' => array( |
64 | - 'message' => __( 'Username or email address already exists', 'subway' ), |
|
64 | + 'message' => __('Username or email address already exists', 'subway'), |
|
65 | 65 | ), |
66 | 66 | 'gp_error_authentication' => array( |
67 | - 'message' => __( 'Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway' ), |
|
67 | + 'message' => __('Google Plus Authentication Error. Invalid Client ID or Secret.', 'subway'), |
|
68 | 68 | ), |
69 | 69 | ); |
70 | 70 | |
71 | 71 | $message = $message_types['default']['message']; |
72 | 72 | |
73 | - if ( array_key_exists( $http_request_type, $message_types ) ) { |
|
73 | + if (array_key_exists($http_request_type, $message_types)) { |
|
74 | 74 | |
75 | - $message = $message_types[ $http_request_type ]['message']; |
|
75 | + $message = $message_types[$http_request_type]['message']; |
|
76 | 76 | |
77 | 77 | } |
78 | 78 | |
79 | - $error_login_message = '<div id="message" class="error">' . esc_html( $message ) . '</div>'; |
|
79 | + $error_login_message = '<div id="message" class="error">' . esc_html($message) . '</div>'; |
|
80 | 80 | |
81 | 81 | } else { |
82 | 82 | |
83 | - $error_login_message = '<div id="message" class="error">' . esc_html__( 'Error: Invalid username and password combination.', 'subway' ) . '</div>'; |
|
83 | + $error_login_message = '<div id="message" class="error">' . esc_html__('Error: Invalid username and password combination.', 'subway') . '</div>'; |
|
84 | 84 | |
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | -if ( isset( $http_request_logout ) ) { |
|
90 | - $error_login_message = '<div id="message" class="success">' . esc_html__( 'You have logged out successfully.', 'subway' ) . '</div>'; |
|
89 | +if (isset($http_request_logout)) { |
|
90 | + $error_login_message = '<div id="message" class="success">' . esc_html__('You have logged out successfully.', 'subway') . '</div>'; |
|
91 | 91 | } |
92 | 92 | |
93 | -$http_request_redirected = filter_input( INPUT_GET, '_redirected', FILTER_SANITIZE_SPECIAL_CHARS ); |
|
93 | +$http_request_redirected = filter_input(INPUT_GET, '_redirected', FILTER_SANITIZE_SPECIAL_CHARS); |
|
94 | 94 | |
95 | -if ( isset( $http_request_redirected ) ) { |
|
96 | - $error_login_message = '<div id="message" class="success">' . esc_html__( 'Members only page. Please use the login form below to access the page.', 'subway' ) . '</div>'; |
|
95 | +if (isset($http_request_redirected)) { |
|
96 | + $error_login_message = '<div id="message" class="success">' . esc_html__('Members only page. Please use the login form below to access the page.', 'subway') . '</div>'; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | ?> |
100 | -<?php if ( ! is_user_logged_in() ) { ?> |
|
100 | +<?php if ( ! is_user_logged_in()) { ?> |
|
101 | 101 | <div class="mg-top-35 mg-bottom-35 subway-login-form"> |
102 | 102 | <div class="subway-login-form-form"> |
103 | 103 | <div class="subway-login-form__actions"> |
104 | 104 | <h3> |
105 | - <?php esc_html_e( 'Account Sign-in', 'subway' ); ?> |
|
105 | + <?php esc_html_e('Account Sign-in', 'subway'); ?> |
|
106 | 106 | </h3> |
107 | - <?php do_action( 'gears_login_form' ); ?> |
|
107 | + <?php do_action('gears_login_form'); ?> |
|
108 | 108 | </div> |
109 | 109 | <div class="subway-login-form-message"> |
110 | - <?php echo wp_kses_post( $error_login_message ); ?> |
|
110 | + <?php echo wp_kses_post($error_login_message); ?> |
|
111 | 111 | </div> |
112 | 112 | <div class="subway-login-form__form"> |
113 | - <?php echo wp_login_form( $atts ); ?> |
|
113 | + <?php echo wp_login_form($atts); ?> |
|
114 | 114 | </div> |
115 | 115 | </div> |
116 | 116 | </div> |
117 | 117 | <?php } else { ?> |
118 | 118 | <div class="mg-top-35 mg-bottom-35 subway-login-sucessfull" style="background: #CDDC39; padding: 15px 15px 15px 15px;border-radius: 4px;color: #616161;"> |
119 | 119 | <p style="margin-bottom: 0px;"> |
120 | - <?php $success_message = apply_filters( 'subway_login_message_success', esc_html__( 'Great! You have succesfully logged in.', 'subway' ) ); ?> |
|
121 | - <?php echo esc_html( $success_message ); ?> |
|
120 | + <?php $success_message = apply_filters('subway_login_message_success', esc_html__('Great! You have succesfully logged in.', 'subway')); ?> |
|
121 | + <?php echo esc_html($success_message); ?> |
|
122 | 122 | </p> |
123 | 123 | </div> |
124 | 124 | <?php } ?> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package Subway |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | return; |
15 | 15 | } |
16 | 16 | |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | |
19 | 19 | <p class="description"> |
20 | 20 | <?php |
21 | - echo sprintf( __( "In case, you were locked out. Use the link below to bypass the log-in page and go directly |
|
22 | - to your website's wp-login URL (http://yoursiteurl.com/wp-login.php): <strong class='subway-settings-text-notice'>%s</strong>", 'subway' ), site_url( 'wp-login.php?no_redirect=true' ) ); |
|
21 | + echo sprintf(__("In case, you were locked out. Use the link below to bypass the log-in page and go directly |
|
22 | + to your website's wp-login URL (http://yoursiteurl.com/wp-login.php): <strong class='subway-settings-text-notice'>%s</strong>", 'subway'), site_url('wp-login.php?no_redirect=true')); |
|
23 | 23 | ?> |
24 | 24 | </p> |
25 | 25 | <?php |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package Subway |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | return; |
15 | 15 | } |
16 | 16 | |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | <!-- Page --> |
27 | 27 | <label for="subway_use_page"> |
28 | 28 | |
29 | - <input <?php checked( 'page', get_option( 'subway_redirect_type' ), true ); ?> value="page" name="subway_redirect_type" id="subway_use_page" type="radio" class="code" /> |
|
29 | + <input <?php checked('page', get_option('subway_redirect_type'), true); ?> value="page" name="subway_redirect_type" id="subway_use_page" type="radio" class="code" /> |
|
30 | 30 | |
31 | - <?php esc_html_e( 'Custom Page', 'subway' ); ?> |
|
31 | + <?php esc_html_e('Custom Page', 'subway'); ?> |
|
32 | 32 | |
33 | 33 | </label> |
34 | 34 | |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | |
37 | 37 | <label for="subway_use_custom_url"> |
38 | 38 | |
39 | - <input <?php checked( 'custom_url', get_option( 'subway_redirect_type' ), true ); ?> value="custom_url" name="subway_redirect_type" id="subway_use_custom_url" type="radio" class="code" /> |
|
39 | + <input <?php checked('custom_url', get_option('subway_redirect_type'), true); ?> value="custom_url" name="subway_redirect_type" id="subway_use_custom_url" type="radio" class="code" /> |
|
40 | 40 | |
41 | - <?php esc_html_e( 'Custom URL', 'subway' ); ?> |
|
41 | + <?php esc_html_e('Custom URL', 'subway'); ?> |
|
42 | 42 | |
43 | 43 | </label> |
44 | 44 | |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | |
47 | 47 | <label for="subway_use_default"> |
48 | 48 | |
49 | - <input <?php checked( 'default', get_option( 'subway_redirect_type' ), true ); ?> value="default" name="subway_redirect_type" id="subway_use_default" type="radio" class="code" /> |
|
49 | + <input <?php checked('default', get_option('subway_redirect_type'), true); ?> value="default" name="subway_redirect_type" id="subway_use_default" type="radio" class="code" /> |
|
50 | 50 | |
51 | - <?php esc_html_e( 'Default Behavior', 'subway' ); ?> |
|
51 | + <?php esc_html_e('Default Behavior', 'subway'); ?> |
|
52 | 52 | |
53 | 53 | </label> |
54 | 54 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | <div id="subway_redirect_page_option_section" class="hidden subway-redirect-option-section"> |
65 | 65 | |
66 | 66 | <label for="subway_redirect_page_id"> |
67 | - <?php esc_html_e( 'Select Page' ); ?> |
|
67 | + <?php esc_html_e('Select Page'); ?> |
|
68 | 68 | </label> |
69 | 69 | |
70 | 70 | <?php |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | wp_dropdown_pages( |
73 | 73 | array( |
74 | 74 | 'name' => 'subway_redirect_page_id', |
75 | - 'selected' => intval( get_option( 'subway_redirect_page_id' ) ), |
|
76 | - 'show_option_none' => esc_html__( '-', 'subway' ), |
|
75 | + 'selected' => intval(get_option('subway_redirect_page_id')), |
|
76 | + 'show_option_none' => esc_html__('-', 'subway'), |
|
77 | 77 | ) |
78 | 78 | ); |
79 | 79 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | <p class="description"> |
83 | 83 | |
84 | - <?php _e( 'The selected page will be used as the redirect endpoint for all of your users. Selecting blank (-) will redirect the user to the default redirect defined in WordPress or other plugins. Choose "Custom URL" if you want to redirect to a custom URL or domain.', 'subway' ); ?> |
|
84 | + <?php _e('The selected page will be used as the redirect endpoint for all of your users. Selecting blank (-) will redirect the user to the default redirect defined in WordPress or other plugins. Choose "Custom URL" if you want to redirect to a custom URL or domain.', 'subway'); ?> |
|
85 | 85 | |
86 | 86 | </p> |
87 | 87 | |
@@ -90,29 +90,29 @@ discard block |
||
90 | 90 | <div id="subway_redirect_custom_url_option_section" class="hidden subway-redirect-option-section"> |
91 | 91 | |
92 | 92 | <label for="subway_redirect_custom_url"> |
93 | - <?php esc_attr_e( 'Enter Redirect URL:', 'subway' ); ?> |
|
93 | + <?php esc_attr_e('Enter Redirect URL:', 'subway'); ?> |
|
94 | 94 | </label> |
95 | 95 | |
96 | - <input value="<?php echo esc_attr( esc_url( get_option( 'subway_redirect_custom_url' ) ) ); ?>" type="text" name="subway_redirect_custom_url" placeholder="<?php esc_attr_e( 'http://', 'subway' ); ?>" |
|
96 | + <input value="<?php echo esc_attr(esc_url(get_option('subway_redirect_custom_url'))); ?>" type="text" name="subway_redirect_custom_url" placeholder="<?php esc_attr_e('http://', 'subway'); ?>" |
|
97 | 97 | id="subway_redirect_custom_url" size="75" /> |
98 | 98 | |
99 | 99 | <p class="description"><br> |
100 | 100 | |
101 | 101 | <?php |
102 | - echo sprintf( __( 'When entering a custom domain, you can use a variable string such us: %1$s and %2$s. For example, http://yoursiteurl.com/members/<strong>%2$s</strong> will translate to http://yoursiteurl/members/<strong>admin</strong> where "admin" is equal to the %2$s variable; http://yoursiteurl.com/users/<strong>%1$s</strong> will translate to http://yoursiteurl.com/users/<strong>4</strong> where "4" is equal to the %1$s. Both variables refer to the current user that is logged-in.', 'subway' ), '%user_id%', '%user_name%' ); |
|
102 | + echo sprintf(__('When entering a custom domain, you can use a variable string such us: %1$s and %2$s. For example, http://yoursiteurl.com/members/<strong>%2$s</strong> will translate to http://yoursiteurl/members/<strong>admin</strong> where "admin" is equal to the %2$s variable; http://yoursiteurl.com/users/<strong>%1$s</strong> will translate to http://yoursiteurl.com/users/<strong>4</strong> where "4" is equal to the %1$s. Both variables refer to the current user that is logged-in.', 'subway'), '%user_id%', '%user_name%'); |
|
103 | 103 | ?> |
104 | 104 | |
105 | 105 | </p><br> |
106 | 106 | |
107 | 107 | <p class="description"> |
108 | 108 | |
109 | - <?php esc_attr_e( 'Leave empty to use existing WordPress or other 3rd party plugin redirect option.', 'subway' ); ?> |
|
109 | + <?php esc_attr_e('Leave empty to use existing WordPress or other 3rd party plugin redirect option.', 'subway'); ?> |
|
110 | 110 | |
111 | 111 | </p><br> |
112 | 112 | |
113 | 113 | <p class="description"> |
114 | 114 | |
115 | - <?php esc_html_e( 'Warning: External URLs are not supported by WordPress Function (wp_safe_redirect) and will be redirected back to default WordPress behavior.', 'subway' ); ?> |
|
115 | + <?php esc_html_e('Warning: External URLs are not supported by WordPress Function (wp_safe_redirect) and will be redirected back to default WordPress behavior.', 'subway'); ?> |
|
116 | 116 | |
117 | 117 | </p> |
118 | 118 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | <div id="subway_redirect_default_option_section" class="hidden subway-redirect-option-section"> |
123 | 123 | <p> |
124 | 124 | <?php |
125 | - esc_html_e( "By choosing the default behavior, the redirect type will be set to the default WordPress' behavior. For example, if you have plugins like Peter's Login Redirect. This option will disable Subway's redirect and use the Peter's Login Redirect Instead.", 'subway' ); |
|
125 | + esc_html_e("By choosing the default behavior, the redirect type will be set to the default WordPress' behavior. For example, if you have plugins like Peter's Login Redirect. This option will disable Subway's redirect and use the Peter's Login Redirect Instead.", 'subway'); |
|
126 | 126 | ?> |
127 | 127 | </p> |
128 | 128 | </div> |
@@ -10,16 +10,16 @@ |
||
10 | 10 | * @package Subway |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | return; |
15 | 15 | } |
16 | 16 | |
17 | 17 | function subway_public_post() { |
18 | 18 | |
19 | - echo '<textarea id="subway_public_post" name="subway_public_post_deprecated" rows="5" cols="95" readonly="readonly">' . esc_attr( trim( get_option( 'subway_public_post' ) ) ) . '</textarea>'; |
|
19 | + echo '<textarea id="subway_public_post" name="subway_public_post_deprecated" rows="5" cols="95" readonly="readonly">' . esc_attr(trim(get_option('subway_public_post'))) . '</textarea>'; |
|
20 | 20 | |
21 | - echo '<p class="description">' . nl2br( esc_html( "Enter the IDs of posts and pages that you wanted to show in public. You need to separate it by ',' (comma), for example: 143,123,213. Alternatively, you can enable public viewing of all of your pages and posts by checking the 'Public Website' option above.", 'subway' ) ); |
|
22 | - echo '<span class="subway-settings-notice">' . nl2br( esc_html( ' This setting is now disabled on Subway 2.0.9 and future versions. To make your post/page private, go to your individual post/page and check the "Subway: Visibility Option" checkbox.', 'subway' ) ) . '</span>' . '</p>'; |
|
21 | + echo '<p class="description">' . nl2br(esc_html("Enter the IDs of posts and pages that you wanted to show in public. You need to separate it by ',' (comma), for example: 143,123,213. Alternatively, you can enable public viewing of all of your pages and posts by checking the 'Public Website' option above.", 'subway')); |
|
22 | + echo '<span class="subway-settings-notice">' . nl2br(esc_html(' This setting is now disabled on Subway 2.0.9 and future versions. To make your post/page private, go to your individual post/page and check the "Subway: Visibility Option" checkbox.', 'subway')) . '</span>' . '</p>'; |
|
23 | 23 | |
24 | 24 | return; |
25 | 25 |