PluginProbe
Polylang / 2.5
Polylang v2.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | settings/settings-module.php +7 -9 2.7.42.5 View file →
@@ -47,15 +47,15 @@
47 47 ),
48 48 'deactivate' => sprintf(
49 49 '<a title="%s" href="%s">%s</a>',
50 50 esc_attr__( 'Deactivate this module', 'polylang' ),
51 - esc_url( wp_nonce_url( '?page=mlang&tab=modules&pll_action=deactivate&noheader=true&module=' . $this->module, 'pll_deactivate' ) ),
51 + wp_nonce_url( '?page=mlang&amp;tab=modules&amp;pll_action=deactivate&amp;noheader=true&amp;module=' . $this->module, 'pll_deactivate' ),
52 52 esc_html__( 'Deactivate', 'polylang' )
53 53 ),
54 54 'activate' => sprintf(
55 55 '<a title="%s" href="%s">%s</a>',
56 56 esc_attr__( 'Activate this module', 'polylang' ),
57 - esc_url( wp_nonce_url( '?page=mlang&tab=modules&pll_action=activate&noheader=true&module=' . $this->module, 'pll_activate' ) ),
57 + wp_nonce_url( '?page=mlang&amp;tab=modules&amp;pll_action=activate&amp;noheader=true&amp;module=' . $this->module, 'pll_activate' ),
58 58 esc_html__( 'Activate', 'polylang' )
59 59 ),
60 60 'activated' => esc_html__( 'Activated', 'polylang' ),
61 61 'deactivated' => esc_html__( 'Deactivated', 'polylang' ),
@@ -61,10 +61,10 @@
61 61 'deactivated' => esc_html__( 'Deactivated', 'polylang' ),
62 62 );
63 63
64 64 $this->buttons = array(
65 - 'cancel' => sprintf( '<button type="button" class="button button-secondary cancel">%s</button>', esc_html__( 'Cancel', 'polylang' ) ),
66 - 'save' => sprintf( '<button type="button" class="button button-primary save">%s</button>', esc_html__( 'Save Changes', 'polylang' ) ),
65 + 'cancel' => sprintf( '<button type="button" class="button button-secondary cancel">%s</button>', esc_html__( 'Cancel' ) ),
66 + 'save' => sprintf( '<button type="button" class="button button-primary save">%s</button>', esc_html__( 'Save Changes' ) ),
67 67 );
68 68
69 69 // Ajax action to save options
70 70 add_action( 'wp_ajax_pll_save_options', array( $this, 'save_options' ) );
@@ -154,9 +154,9 @@
154 154 if ( ! current_user_can( 'manage_options' ) ) {
155 155 wp_die( -1 );
156 156 }
157 157
158 - if ( isset( $_POST['module'] ) && $this->module === $_POST['module'] ) {
158 + if ( $this->module == $_POST['module'] ) {
159 159 // It's up to the child class to decide which options are saved, whether there are errors or not
160 160 $post = array_diff_key( $_POST, array_flip( array( 'action', 'module', 'pll_ajax_backend', '_pll_nonce' ) ) );
161 161 $options = $this->update( $post );
162 162 $this->options = array_merge( $this->options, $options );
@@ -172,9 +172,9 @@
172 172 ob_start();
173 173
174 174 if ( ! get_settings_errors() ) {
175 175 // Send update message
176 - add_settings_error( 'general', 'settings_updated', __( 'Settings saved.', 'polylang' ), 'updated' );
176 + add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
177 177 settings_errors();
178 178 $x = new WP_Ajax_Response( array( 'what' => 'success', 'data' => ob_get_clean() ) );
179 179 $x->send();
180 180 } else {
@@ -193,10 +193,8 @@
193 193 *
194 194 * @return array
195 195 */
196 196 protected function get_actions() {
197 - $actions = array();
198 -
199 197 if ( $this->is_active() && $this->get_form() ) {
200 198 $actions[] = 'configure';
201 199 }
202 200
@@ -231,9 +229,9 @@
231 229 */
232 230 protected function default_upgrade_message() {
233 231 return sprintf(
234 232 '%s <a href="%s">%s</a>',
235 - __( 'To enable this feature, you need Polylang Pro.', 'polylang' ),
233 + __( 'You need Polylang Pro to enable this feature.', 'polylang' ),
236 234 'https://polylang.pro',
237 235 __( 'Upgrade now.', 'polylang' )
238 236 );
239 237 }