diff --git a/class-tgm-plugin-activation.php b/class-tgm-plugin-activation.php index 5cd628fb..6ae71d3c 100755 --- a/class-tgm-plugin-activation.php +++ b/class-tgm-plugin-activation.php @@ -294,6 +294,7 @@ public function __construct() { * (Inside this class context, the __set() method if not used as there is direct access.) */ public function __set( $name, $value ) { + // phpcs:ignore Squiz.PHP.NonExecutableCode.ReturnNotRequired -- See explanation above. return; } @@ -654,8 +655,11 @@ public function admin_init() { wp_enqueue_style( 'plugin-install' ); global $tab, $body_id; - $body_id = 'plugin-information'; // WPCS: override ok, prefix ok. - $tab = 'plugin-information'; // WPCS: override ok. + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- WP requirement. + $body_id = 'plugin-information'; + + // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Overriding the WP global is the point. + $tab = 'plugin-information'; install_plugin_information(); @@ -1081,7 +1085,8 @@ protected function activate_single_plugin( $file_path, $slug, $automatic = false if ( ! $automatic ) { // Make sure message doesn't display again if bulk activation is performed // immediately after a single activation. - if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. + // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Not using the superglobal. + if ( ! isset( $_POST['action'] ) ) { echo '
', esc_html( $this->strings['activated_successfully'] ), ' ', esc_html( $this->plugins[ $slug ]['name'] ), '.
', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), @@ -1405,7 +1411,7 @@ public function register( $plugin ) { 'force_activation' => false, // Boolean. 'force_deactivation' => false, // Boolean. 'external_url' => '', // String. - 'is_callable' => '', // String|Array. + 'is_callable' => '', // String or array. ); // Prepare the received data. @@ -1762,10 +1768,10 @@ protected function is_core_update_page() { if ( 'update-core' === $screen->base ) { // Core update screen. return true; - } elseif ( 'plugins' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. + } elseif ( 'plugins' === $screen->base && ! empty( $_POST['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing // Plugins bulk update screen. return true; - } elseif ( 'update' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. + } elseif ( 'update' === $screen->base && ! empty( $_POST['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing // Individual updates (ajax call). return true; } @@ -3092,9 +3098,10 @@ public function process_bulk_actions() { $last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability. $imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ) . ' ' . $last_plugin ); - printf( // WPCS: xss ok. + printf( '
%1$s %2$s.