@@ -1,19 +1,19 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Plugin installation and activation for WordPress themes. |
|
| 4 | - * |
|
| 5 | - * Please note that this is a drop-in library for a theme or plugin. |
|
| 6 | - * The authors of this library (Thomas, Gary and Juliette) are NOT responsible |
|
| 7 | - * for the support of your plugin or theme. Please contact the plugin |
|
| 8 | - * or theme author for support. |
|
| 9 | - * |
|
| 10 | - * @package TGM-Plugin-Activation |
|
| 11 | - * @version 2.5.2 |
|
| 12 | - * @link http://tgmpluginactivation.com/ |
|
| 13 | - * @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer |
|
| 14 | - * @copyright Copyright (c) 2011, Thomas Griffin |
|
| 15 | - * @license GPL-2.0+ |
|
| 16 | - */ |
|
| 3 | + * Plugin installation and activation for WordPress themes. |
|
| 4 | + * |
|
| 5 | + * Please note that this is a drop-in library for a theme or plugin. |
|
| 6 | + * The authors of this library (Thomas, Gary and Juliette) are NOT responsible |
|
| 7 | + * for the support of your plugin or theme. Please contact the plugin |
|
| 8 | + * or theme author for support. |
|
| 9 | + * |
|
| 10 | + * @package TGM-Plugin-Activation |
|
| 11 | + * @version 2.5.2 |
|
| 12 | + * @link http://tgmpluginactivation.com/ |
|
| 13 | + * @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer |
|
| 14 | + * @copyright Copyright (c) 2011, Thomas Griffin |
|
| 15 | + * @license GPL-2.0+ |
|
| 16 | + */ |
|
| 17 | 17 | |
| 18 | 18 | /* |
| 19 | 19 | Copyright 2011 Thomas Griffin (thomasgriffinmedia.com) |
@@ -1342,13 +1342,13 @@ discard block |
||
| 1342 | 1342 | $key = preg_replace( '`[^A-Za-z0-9_-]`', '', $key ); |
| 1343 | 1343 | |
| 1344 | 1344 | /** |
| 1345 | - * Filter a sanitized key string. |
|
| 1346 | - * |
|
| 1347 | - * @since 3.0.0 |
|
| 1348 | - * |
|
| 1349 | - * @param string $key Sanitized key. |
|
| 1350 | - * @param string $raw_key The key prior to sanitization. |
|
| 1351 | - */ |
|
| 1345 | + * Filter a sanitized key string. |
|
| 1346 | + * |
|
| 1347 | + * @since 3.0.0 |
|
| 1348 | + * |
|
| 1349 | + * @param string $key Sanitized key. |
|
| 1350 | + * @param string $raw_key The key prior to sanitization. |
|
| 1351 | + */ |
|
| 1352 | 1352 | return apply_filters( 'tgmpa_sanitize_key', $key, $raw_key ); |
| 1353 | 1353 | } |
| 1354 | 1354 | |
@@ -949,7 +949,8 @@ discard block |
||
| 949 | 949 | if ( ! $automatic ) { |
| 950 | 950 | // Make sure message doesn't display again if bulk activation is performed |
| 951 | 951 | // immediately after a single activation. |
| 952 | - if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. |
|
| 952 | + if ( ! isset( $_POST['action'] ) ) { |
|
| 953 | +// WPCS: CSRF OK. |
|
| 953 | 954 | echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>'; |
| 954 | 955 | } |
| 955 | 956 | } else { |
@@ -970,7 +971,8 @@ discard block |
||
| 970 | 971 | if ( ! $automatic ) { |
| 971 | 972 | // Make sure message doesn't display again if bulk activation is performed |
| 972 | 973 | // immediately after a single activation. |
| 973 | - if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. |
|
| 974 | + if ( ! isset( $_POST['action'] ) ) { |
|
| 975 | +// WPCS: CSRF OK. |
|
| 974 | 976 | echo '<div id="message" class="error"><p>', |
| 975 | 977 | sprintf( |
| 976 | 978 | esc_html( $this->strings['plugin_needs_higher_version'] ), |
@@ -1621,10 +1623,12 @@ discard block |
||
| 1621 | 1623 | if ( 'update-core' === $screen->base ) { |
| 1622 | 1624 | // Core update screen. |
| 1623 | 1625 | return true; |
| 1624 | - } elseif ( 'plugins' === $screen->base && isset( $_POST['action'] ) ) { // WPCS: CSRF ok. |
|
| 1626 | + } elseif ( 'plugins' === $screen->base && isset( $_POST['action'] ) ) { |
|
| 1627 | +// WPCS: CSRF ok. |
|
| 1625 | 1628 | // Plugins bulk update screen. |
| 1626 | 1629 | return true; |
| 1627 | - } elseif ( 'update' === $screen->base && isset( $_POST['action'] ) ) { // WPCS: CSRF ok. |
|
| 1630 | + } elseif ( 'update' === $screen->base && isset( $_POST['action'] ) ) { |
|
| 1631 | +// WPCS: CSRF ok. |
|
| 1628 | 1632 | // Individual updates (ajax call). |
| 1629 | 1633 | return true; |
| 1630 | 1634 | } |