Completed
Pull Request — develop (#516)
by
unknown
02:15
created
class-tgm-plugin-activation.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1892,7 +1892,7 @@  discard block
 block discarded – undo
1892 1892
 		 *
1893 1893
 		 * @since 2.4.0
1894 1894
 		 *
1895
-		 * @return object The TGM_Plugin_Activation object.
1895
+		 * @return TGM_Plugin_Activation The TGM_Plugin_Activation object.
1896 1896
 		 */
1897 1897
 		public static function get_instance() {
1898 1898
 			if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) {
@@ -2049,7 +2049,7 @@  discard block
 block discarded – undo
2049 2049
 		 *
2050 2050
 		 * @since 2.5.0
2051 2051
 		 *
2052
-		 * @return array CSS classnames.
2052
+		 * @return string[] CSS classnames.
2053 2053
 		 */
2054 2054
 		public function get_table_classes() {
2055 2055
 			return array( 'widefat', 'fixed' );
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1327,13 +1327,13 @@
 block discarded – undo
1327 1327
 			$key     = preg_replace( '`[^A-Za-z0-9_-]`', '', $key );
1328 1328
 
1329 1329
 			/**
1330
-			* Filter a sanitized key string.
1331
-			*
1332
-			* @since 3.0.0
1333
-			*
1334
-			* @param string $key     Sanitized key.
1335
-			* @param string $raw_key The key prior to sanitization.
1336
-			*/
1330
+			 * Filter a sanitized key string.
1331
+			 *
1332
+			 * @since 3.0.0
1333
+			 *
1334
+			 * @param string $key     Sanitized key.
1335
+			 * @param string $raw_key The key prior to sanitization.
1336
+			 */
1337 1337
 			return apply_filters( 'tgmpa_sanitize_key', $key, $raw_key );
1338 1338
 		}
1339 1339
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -971,7 +971,8 @@  discard block
 block discarded – undo
971 971
 					if ( ! $automatic ) {
972 972
 						// Make sure message doesn't display again if bulk activation is performed
973 973
 						// immediately after a single activation.
974
-						if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
974
+						if ( ! isset( $_POST['action'] ) ) {
975
+// WPCS: CSRF OK.
975 976
 							echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>';
976 977
 						}
977 978
 					} else {
@@ -992,7 +993,8 @@  discard block
 block discarded – undo
992 993
 				if ( ! $automatic ) {
993 994
 					// Make sure message doesn't display again if bulk activation is performed
994 995
 					// immediately after a single activation.
995
-					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
996
+					if ( ! isset( $_POST['action'] ) ) {
997
+// WPCS: CSRF OK.
996 998
 						echo '<div id="message" class="error"><p>',
997 999
 							sprintf(
998 1000
 								esc_html( $this->strings['plugin_needs_higher_version'] ),
Please login to merge, or discard this patch.
Spacing   +274 added lines, -274 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 		 */
256 256
 		public function __construct() {
257 257
 			// Set the current WordPress version.
258
-			$this->wp_version = $GLOBALS['wp_version'];
258
+			$this->wp_version = $GLOBALS[ 'wp_version' ];
259 259
 
260 260
 			// Announce that the class is ready, and pass the object (for advanced use).
261 261
 			do_action_ref_array( 'tgmpa_init', array( $this ) );
@@ -442,15 +442,15 @@  discard block
 block discarded – undo
442 442
 		public function add_plugin_action_link_filters() {
443 443
 			foreach ( $this->plugins as $slug => $plugin ) {
444 444
 				if ( false === $this->can_plugin_activate( $slug ) ) {
445
-					add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_activate' ), 20 );
445
+					add_filter( 'plugin_action_links_'.$plugin[ 'file_path' ], array( $this, 'filter_plugin_action_links_activate' ), 20 );
446 446
 				}
447 447
 
448
-				if ( true === $plugin['force_activation'] ) {
449
-					add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_deactivate' ), 20 );
448
+				if ( true === $plugin[ 'force_activation' ] ) {
449
+					add_filter( 'plugin_action_links_'.$plugin[ 'file_path' ], array( $this, 'filter_plugin_action_links_deactivate' ), 20 );
450 450
 				}
451 451
 
452 452
 				if ( false !== $this->does_plugin_require_update( $slug ) ) {
453
-					add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_update' ), 20 );
453
+					add_filter( 'plugin_action_links_'.$plugin[ 'file_path' ], array( $this, 'filter_plugin_action_links_update' ), 20 );
454 454
 				}
455 455
 			}
456 456
 		}
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 		 * @return array
466 466
 		 */
467 467
 		public function filter_plugin_action_links_activate( $actions ) {
468
-			unset( $actions['activate'] );
468
+			unset( $actions[ 'activate' ] );
469 469
 
470 470
 			return $actions;
471 471
 		}
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 		 * @return array
480 480
 		 */
481 481
 		public function filter_plugin_action_links_deactivate( $actions ) {
482
-			unset( $actions['deactivate'] );
482
+			unset( $actions[ 'deactivate' ] );
483 483
 
484 484
 			return $actions;
485 485
 		}
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 		 * @return array
495 495
 		 */
496 496
 		public function filter_plugin_action_links_update( $actions ) {
497
-			$actions['update'] = sprintf(
497
+			$actions[ 'update' ] = sprintf(
498 498
 				'<a href="%1$s" title="%2$s" class="edit">%3$s</a>',
499 499
 				esc_url( $this->get_tgmpa_status_url( 'update' ) ),
500 500
 				esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'tgmpa' ),
@@ -532,9 +532,9 @@  discard block
 block discarded – undo
532 532
 				return;
533 533
 			}
534 534
 
535
-			if ( isset( $_REQUEST['tab'] ) && 'plugin-information' === $_REQUEST['tab'] ) {
535
+			if ( isset( $_REQUEST[ 'tab' ] ) && 'plugin-information' === $_REQUEST[ 'tab' ] ) {
536 536
 				// Needed for install_plugin_information().
537
-				require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
537
+				require_once ABSPATH.'wp-admin/includes/plugin-install.php';
538 538
 
539 539
 				wp_enqueue_style( 'plugin-install' );
540 540
 
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 		 * @since 2.1.0
563 563
 		 */
564 564
 		public function thickbox() {
565
-			if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) ) {
565
+			if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_'.$this->id, true ) ) {
566 566
 				add_thickbox();
567 567
 			}
568 568
 		}
@@ -591,11 +591,11 @@  discard block
 block discarded – undo
591 591
 			$args = apply_filters(
592 592
 				'tgmpa_admin_menu_args',
593 593
 				array(
594
-					'parent_slug' => $this->parent_slug,                     // Parent Menu slug.
595
-					'page_title'  => $this->strings['page_title'],           // Page title.
596
-					'menu_title'  => $this->strings['menu_title'],           // Menu title.
597
-					'capability'  => $this->capability,                      // Capability.
598
-					'menu_slug'   => $this->menu,                            // Menu slug.
594
+					'parent_slug' => $this->parent_slug, // Parent Menu slug.
595
+					'page_title'  => $this->strings[ 'page_title' ], // Page title.
596
+					'menu_title'  => $this->strings[ 'menu_title' ], // Menu title.
597
+					'capability'  => $this->capability, // Capability.
598
+					'menu_slug'   => $this->menu, // Menu slug.
599 599
 					'function'    => array( $this, 'install_plugins_page' ), // Callback.
600 600
 				)
601 601
 			);
@@ -616,10 +616,10 @@  discard block
 block discarded – undo
616 616
 			}
617 617
 
618 618
 			if ( 'themes.php' === $this->parent_slug ) {
619
-				$this->page_hook = call_user_func( 'add_theme_page', $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
619
+				$this->page_hook = call_user_func( 'add_theme_page', $args[ 'page_title' ], $args[ 'menu_title' ], $args[ 'capability' ], $args[ 'menu_slug' ], $args[ 'function' ] );
620 620
 			} else {
621 621
 				$type = 'submenu';
622
-				$this->page_hook = call_user_func( "add_{$type}_page", $args['parent_slug'], $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
622
+				$this->page_hook = call_user_func( "add_{$type}_page", $args[ 'parent_slug' ], $args[ 'page_title' ], $args[ 'menu_title' ], $args[ 'capability' ], $args[ 'menu_slug' ], $args[ 'function' ] );
623 623
 			}
624 624
 		}
625 625
 
@@ -688,37 +688,37 @@  discard block
 block discarded – undo
688 688
 		 * @return boolean True on success, false on failure.
689 689
 		 */
690 690
 		protected function do_plugin_install() {
691
-			if ( empty( $_GET['plugin'] ) ) {
691
+			if ( empty( $_GET[ 'plugin' ] ) ) {
692 692
 				return false;
693 693
 			}
694 694
 
695 695
 			// All plugin information will be stored in an array for processing.
696
-			$slug = $this->sanitize_key( urldecode( $_GET['plugin'] ) );
696
+			$slug = $this->sanitize_key( urldecode( $_GET[ 'plugin' ] ) );
697 697
 
698 698
 			if ( ! isset( $this->plugins[ $slug ] ) ) {
699 699
 				return false;
700 700
 			}
701 701
 
702 702
 			// Was an install or upgrade action link clicked?
703
-			if ( ( isset( $_GET['tgmpa-install'] ) && 'install-plugin' === $_GET['tgmpa-install'] ) || ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) ) {
703
+			if ( ( isset( $_GET[ 'tgmpa-install' ] ) && 'install-plugin' === $_GET[ 'tgmpa-install' ] ) || ( isset( $_GET[ 'tgmpa-update' ] ) && 'update-plugin' === $_GET[ 'tgmpa-update' ] ) ) {
704 704
 
705 705
 				$install_type = 'install';
706
-				if ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) {
706
+				if ( isset( $_GET[ 'tgmpa-update' ] ) && 'update-plugin' === $_GET[ 'tgmpa-update' ] ) {
707 707
 					$install_type = 'update';
708 708
 				}
709 709
 
710
-				check_admin_referer( 'tgmpa-' . $install_type, 'tgmpa-nonce' );
710
+				check_admin_referer( 'tgmpa-'.$install_type, 'tgmpa-nonce' );
711 711
 
712 712
 				// Pass necessary information via URL if WP_Filesystem is needed.
713 713
 				$url = wp_nonce_url(
714 714
 					add_query_arg(
715 715
 						array(
716 716
 							'plugin'                 => urlencode( $slug ),
717
-							'tgmpa-' . $install_type => $install_type . '-plugin',
717
+							'tgmpa-'.$install_type => $install_type.'-plugin',
718 718
 						),
719 719
 						$this->get_tgmpa_url()
720 720
 					),
721
-					'tgmpa-' . $install_type,
721
+					'tgmpa-'.$install_type,
722 722
 					'tgmpa-nonce'
723 723
 				);
724 724
 
@@ -737,29 +737,29 @@  discard block
 block discarded – undo
737 737
 
738 738
 				// Prep variables for Plugin_Installer_Skin class.
739 739
 				$extra         = array();
740
-				$extra['slug'] = $slug; // Needed for potentially renaming of directory name.
740
+				$extra[ 'slug' ] = $slug; // Needed for potentially renaming of directory name.
741 741
 				$source        = $this->get_download_url( $slug );
742
-				$api           = ( 'repo' === $this->plugins[ $slug ]['source_type'] ) ? $this->get_plugins_api( $slug ) : null;
742
+				$api           = ( 'repo' === $this->plugins[ $slug ][ 'source_type' ] ) ? $this->get_plugins_api( $slug ) : null;
743 743
 				$api           = ( false !== $api ) ? $api : null;
744 744
 
745 745
 				$url = add_query_arg(
746 746
 					array(
747
-						'action' => $install_type . '-plugin',
747
+						'action' => $install_type.'-plugin',
748 748
 						'plugin' => urlencode( $slug ),
749 749
 					),
750 750
 					'update.php'
751 751
 				);
752 752
 
753 753
 				if ( ! class_exists( 'Plugin_Upgrader', false ) ) {
754
-					require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
754
+					require_once ABSPATH.'wp-admin/includes/class-wp-upgrader.php';
755 755
 				}
756 756
 
757
-				$title     = ( 'update' === $install_type ) ? $this->strings['updating'] : $this->strings['installing'];
757
+				$title     = ( 'update' === $install_type ) ? $this->strings[ 'updating' ] : $this->strings[ 'installing' ];
758 758
 				$skin_args = array(
759
-					'type'   => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload',
760
-					'title'  => sprintf( $title, $this->plugins[ $slug ]['name'] ),
759
+					'type'   => ( 'bundled' !== $this->plugins[ $slug ][ 'source_type' ] ) ? 'web' : 'upload',
760
+					'title'  => sprintf( $title, $this->plugins[ $slug ][ 'name' ] ),
761 761
 					'url'    => esc_url_raw( $url ),
762
-					'nonce'  => $install_type . '-plugin_' . $slug,
762
+					'nonce'  => $install_type.'-plugin_'.$slug,
763 763
 					'plugin' => '',
764 764
 					'api'    => $api,
765 765
 					'extra'  => $extra,
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 				unset( $title );
768 768
 
769 769
 				if ( 'update' === $install_type ) {
770
-					$skin_args['plugin'] = $this->plugins[ $slug ]['file_path'];
770
+					$skin_args[ 'plugin' ] = $this->plugins[ $slug ][ 'file_path' ];
771 771
 					$skin                = new Plugin_Upgrader_Skin( $skin_args );
772 772
 				} else {
773 773
 					$skin = new Plugin_Installer_Skin( $skin_args );
@@ -782,10 +782,10 @@  discard block
 block discarded – undo
782 782
 				if ( 'update' === $install_type ) {
783 783
 					// Inject our info into the update transient.
784 784
 					$to_inject                    = array( $slug => $this->plugins[ $slug ] );
785
-					$to_inject[ $slug ]['source'] = $source;
785
+					$to_inject[ $slug ][ 'source' ] = $source;
786 786
 					$this->inject_update_info( $to_inject );
787 787
 
788
-					$upgrader->upgrade( $this->plugins[ $slug ]['file_path'] );
788
+					$upgrader->upgrade( $this->plugins[ $slug ][ 'file_path' ] );
789 789
 				} else {
790 790
 					$upgrader->install( $source );
791 791
 				}
@@ -808,18 +808,18 @@  discard block
 block discarded – undo
808 808
 
809 809
 				// Display message based on if all plugins are now active or not.
810 810
 				if ( $this->is_tgmpa_complete() ) {
811
-					echo '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'tgmpa' ) . '</a>' ), '</p>';
811
+					echo '<p>', sprintf( esc_html( $this->strings[ 'complete' ] ), '<a href="'.esc_url( self_admin_url() ).'">'.esc_html__( 'Return to the Dashboard', 'tgmpa' ).'</a>' ), '</p>';
812 812
 					echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
813 813
 				} else {
814
-					echo '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
814
+					echo '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings[ 'return' ] ), '</a></p>';
815 815
 				}
816 816
 
817 817
 				return true;
818
-			} elseif ( isset( $this->plugins[ $slug ]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) {
818
+			} elseif ( isset( $this->plugins[ $slug ][ 'file_path' ], $_GET[ 'tgmpa-activate' ] ) && 'activate-plugin' === $_GET[ 'tgmpa-activate' ] ) {
819 819
 				// Activate action link was clicked.
820 820
 				check_admin_referer( 'tgmpa-activate', 'tgmpa-nonce' );
821 821
 
822
-				if ( false === $this->activate_single_plugin( $this->plugins[ $slug ]['file_path'], $slug ) ) {
822
+				if ( false === $this->activate_single_plugin( $this->plugins[ $slug ][ 'file_path' ], $slug ) ) {
823 823
 					return true; // Finish execution of the function early as we encountered an error.
824 824
 				}
825 825
 			}
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 			}
843 843
 
844 844
 			foreach ( $plugins as $slug => $plugin ) {
845
-				$file_path = $plugin['file_path'];
845
+				$file_path = $plugin[ 'file_path' ];
846 846
 
847 847
 				if ( empty( $repo_updates->response[ $file_path ] ) ) {
848 848
 					$repo_updates->response[ $file_path ] = new stdClass;
@@ -851,10 +851,10 @@  discard block
 block discarded – undo
851 851
 				// We only really need to set package, but let's do all we can in case WP changes something.
852 852
 				$repo_updates->response[ $file_path ]->slug        = $slug;
853 853
 				$repo_updates->response[ $file_path ]->plugin      = $file_path;
854
-				$repo_updates->response[ $file_path ]->new_version = $plugin['version'];
855
-				$repo_updates->response[ $file_path ]->package     = $plugin['source'];
856
-				if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin['external_url'] ) ) {
857
-					$repo_updates->response[ $file_path ]->url = $plugin['external_url'];
854
+				$repo_updates->response[ $file_path ]->new_version = $plugin[ 'version' ];
855
+				$repo_updates->response[ $file_path ]->package     = $plugin[ 'source' ];
856
+				if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin[ 'external_url' ] ) ) {
857
+					$repo_updates->response[ $file_path ]->url = $plugin[ 'external_url' ];
858 858
 				}
859 859
 			}
860 860
 
@@ -878,13 +878,13 @@  discard block
 block discarded – undo
878 878
 		 * @return string $source
879 879
 		 */
880 880
 		public function maybe_adjust_source_dir( $source, $remote_source, $upgrader ) {
881
-			if ( ! $this->is_tgmpa_page() || ! is_object( $GLOBALS['wp_filesystem'] ) ) {
881
+			if ( ! $this->is_tgmpa_page() || ! is_object( $GLOBALS[ 'wp_filesystem' ] ) ) {
882 882
 				return $source;
883 883
 			}
884 884
 
885 885
 			// Check for single file plugins.
886
-			$source_files = array_keys( $GLOBALS['wp_filesystem']->dirlist( $remote_source ) );
887
-			if ( 1 === count( $source_files ) && false === $GLOBALS['wp_filesystem']->is_dir( $source ) ) {
886
+			$source_files = array_keys( $GLOBALS[ 'wp_filesystem' ]->dirlist( $remote_source ) );
887
+			if ( 1 === count( $source_files ) && false === $GLOBALS[ 'wp_filesystem' ]->is_dir( $source ) ) {
888 888
 				return $source;
889 889
 			}
890 890
 
@@ -892,12 +892,12 @@  discard block
 block discarded – undo
892 892
 			$desired_slug = '';
893 893
 
894 894
 			// Figure out what the slug is supposed to be.
895
-			if ( false === $upgrader->bulk && ! empty( $upgrader->skin->options['extra']['slug'] ) ) {
896
-				$desired_slug = $upgrader->skin->options['extra']['slug'];
895
+			if ( false === $upgrader->bulk && ! empty( $upgrader->skin->options[ 'extra' ][ 'slug' ] ) ) {
896
+				$desired_slug = $upgrader->skin->options[ 'extra' ][ 'slug' ];
897 897
 			} else {
898 898
 				// Bulk installer contains less info, so fall back on the info registered here.
899 899
 				foreach ( $this->plugins as $slug => $plugin ) {
900
-					if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin['name'] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) {
900
+					if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin[ 'name' ] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) {
901 901
 						$desired_slug = $slug;
902 902
 						break;
903 903
 					}
@@ -910,15 +910,15 @@  discard block
 block discarded – undo
910 910
 
911 911
 				if ( ! empty( $subdir_name ) && $subdir_name !== $desired_slug ) {
912 912
 					$from = untrailingslashit( $source );
913
-					$to   = trailingslashit( $remote_source ) . $desired_slug;
913
+					$to   = trailingslashit( $remote_source ).$desired_slug;
914 914
 
915
-					if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) {
915
+					if ( true === $GLOBALS[ 'wp_filesystem' ]->move( $from, $to ) ) {
916 916
 						return trailingslashit( $to );
917 917
 					} else {
918
-						return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
918
+						return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ).' '.esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
919 919
 					}
920 920
 				} elseif ( empty( $subdir_name ) ) {
921
-					return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
921
+					return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ).' '.esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
922 922
 				}
923 923
 			}
924 924
 
@@ -942,19 +942,19 @@  discard block
 block discarded – undo
942 942
 
943 943
 				if ( is_wp_error( $activate ) ) {
944 944
 					echo '<div id="message" class="error"><p>', wp_kses_post( $activate->get_error_message() ), '</p></div>',
945
-						'<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
945
+						'<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings[ 'return' ] ), '</a></p>';
946 946
 
947 947
 					return false; // End it here if there is an error with activation.
948 948
 				} else {
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.
953
-							echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>';
952
+						if ( ! isset( $_POST[ 'action' ] ) ) { // WPCS: CSRF OK.
953
+							echo '<div id="message" class="updated"><p>', esc_html( $this->strings[ 'activated_successfully' ] ), ' <strong>', esc_html( $this->plugins[ $slug ][ 'name' ] ), '.</strong></p></div>';
954 954
 						}
955 955
 					} else {
956 956
 						// Simpler message layout for use on the plugin install page.
957
-						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
957
+						echo '<p>', esc_html( $this->strings[ 'plugin_activated' ] ), '</p>';
958 958
 					}
959 959
 				}
960 960
 			} elseif ( $this->is_plugin_active( $slug ) ) {
@@ -962,25 +962,25 @@  discard block
 block discarded – undo
962 962
 				// on the plugin install page.
963 963
 				echo '<div id="message" class="error"><p>',
964 964
 					sprintf(
965
-						esc_html( $this->strings['plugin_already_active'] ),
966
-						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
965
+						esc_html( $this->strings[ 'plugin_already_active' ] ),
966
+						'<strong>'.esc_html( $this->plugins[ $slug ][ 'name' ] ).'</strong>'
967 967
 					),
968 968
 					'</p></div>';
969 969
 			} elseif ( $this->does_plugin_require_update( $slug ) ) {
970 970
 				if ( ! $automatic ) {
971 971
 					// Make sure message doesn't display again if bulk activation is performed
972 972
 					// immediately after a single activation.
973
-					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
973
+					if ( ! isset( $_POST[ 'action' ] ) ) { // WPCS: CSRF OK.
974 974
 						echo '<div id="message" class="error"><p>',
975 975
 							sprintf(
976
-								esc_html( $this->strings['plugin_needs_higher_version'] ),
977
-								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
976
+								esc_html( $this->strings[ 'plugin_needs_higher_version' ] ),
977
+								'<strong>'.esc_html( $this->plugins[ $slug ][ 'name' ] ).'</strong>'
978 978
 							),
979 979
 							'</p></div>';
980 980
 					}
981 981
 				} else {
982 982
 					// Simpler message layout for use on the plugin install page.
983
-					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';
983
+					echo '<p>', sprintf( esc_html( $this->strings[ 'plugin_needs_higher_version' ] ), esc_html( $this->plugins[ $slug ][ 'name' ] ) ), '</p>';
984 984
 				}
985 985
 			}
986 986
 
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
 		 */
1005 1005
 		public function notices() {
1006 1006
 			// Remove nag on the install page / Return early if the nag message has been dismissed or user < author.
1007
-			if ( $this->is_tgmpa_page() || get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) || ! current_user_can( apply_filters( 'tgmpa_show_admin_notice_capability', 'publish_posts' ) ) ) {
1007
+			if ( $this->is_tgmpa_page() || get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_'.$this->id, true ) || ! current_user_can( apply_filters( 'tgmpa_show_admin_notice_capability', 'publish_posts' ) ) ) {
1008 1008
 				return;
1009 1009
 			}
1010 1010
 
@@ -1026,13 +1026,13 @@  discard block
 block discarded – undo
1026 1026
 					if ( current_user_can( 'install_plugins' ) ) {
1027 1027
 						$install_link_count++;
1028 1028
 
1029
-						if ( true === $plugin['required'] ) {
1030
-							$message['notice_can_install_required'][] = $slug;
1029
+						if ( true === $plugin[ 'required' ] ) {
1030
+							$message[ 'notice_can_install_required' ][ ] = $slug;
1031 1031
 						} else {
1032
-							$message['notice_can_install_recommended'][] = $slug;
1032
+							$message[ 'notice_can_install_recommended' ][ ] = $slug;
1033 1033
 						}
1034 1034
 					}
1035
-					if ( true === $plugin['required'] ) {
1035
+					if ( true === $plugin[ 'required' ] ) {
1036 1036
 						$total_required_action_count++;
1037 1037
 					}
1038 1038
 				} else {
@@ -1040,13 +1040,13 @@  discard block
 block discarded – undo
1040 1040
 						if ( current_user_can( 'activate_plugins' ) ) {
1041 1041
 							$activate_link_count++;
1042 1042
 
1043
-							if ( true === $plugin['required'] ) {
1044
-								$message['notice_can_activate_required'][] = $slug;
1043
+							if ( true === $plugin[ 'required' ] ) {
1044
+								$message[ 'notice_can_activate_required' ][ ] = $slug;
1045 1045
 							} else {
1046
-								$message['notice_can_activate_recommended'][] = $slug;
1046
+								$message[ 'notice_can_activate_recommended' ][ ] = $slug;
1047 1047
 							}
1048 1048
 						}
1049
-						if ( true === $plugin['required'] ) {
1049
+						if ( true === $plugin[ 'required' ] ) {
1050 1050
 							$total_required_action_count++;
1051 1051
 						}
1052 1052
 					}
@@ -1057,12 +1057,12 @@  discard block
 block discarded – undo
1057 1057
 							$update_link_count++;
1058 1058
 
1059 1059
 							if ( $this->does_plugin_require_update( $slug ) ) {
1060
-								$message['notice_ask_to_update'][] = $slug;
1060
+								$message[ 'notice_ask_to_update' ][ ] = $slug;
1061 1061
 							} elseif ( false !== $this->does_plugin_have_update( $slug ) ) {
1062
-								$message['notice_ask_to_update_maybe'][] = $slug;
1062
+								$message[ 'notice_ask_to_update_maybe' ][ ] = $slug;
1063 1063
 							}
1064 1064
 						}
1065
-						if ( true === $plugin['required'] ) {
1065
+						if ( true === $plugin[ 'required' ] ) {
1066 1066
 							$total_required_action_count++;
1067 1067
 						}
1068 1068
 					}
@@ -1077,10 +1077,10 @@  discard block
 block discarded – undo
1077 1077
 
1078 1078
 				// As add_settings_error() wraps the final message in a <p> and as the final message can't be
1079 1079
 				// filtered, using <p>'s in our html would render invalid html output.
1080
-				$line_template = '<span style="display: block; margin: 0.5em 0.5em 0 0; clear: both;">%s</span>' . "\n";
1080
+				$line_template = '<span style="display: block; margin: 0.5em 0.5em 0 0; clear: both;">%s</span>'."\n";
1081 1081
 
1082 1082
 				if ( ! current_user_can( 'activate_plugins' ) && ! current_user_can( 'install_plugins' ) && ! current_user_can( 'update_plugins' ) ) {
1083
-					$rendered = esc_html__( $this->strings['notice_cannot_install_activate'] ) . ' ' . esc_html__( $this->strings['contact_admin'] );
1083
+					$rendered = esc_html__( $this->strings[ 'notice_cannot_install_activate' ] ).' '.esc_html__( $this->strings[ 'contact_admin' ] );
1084 1084
 					$rendered .= $this->create_user_action_links_for_notice( 0, 0, 0, $line_template );
1085 1085
 				} else {
1086 1086
 
@@ -1095,14 +1095,14 @@  discard block
 block discarded – undo
1095 1095
 
1096 1096
 						// Get the external info link for a plugin if one is available.
1097 1097
 						foreach ( $plugin_group as $plugin_slug ) {
1098
-							$linked_plugins[] = $this->get_info_link( $plugin_slug );
1098
+							$linked_plugins[ ] = $this->get_info_link( $plugin_slug );
1099 1099
 						}
1100 1100
 						unset( $plugin_slug );
1101 1101
 
1102 1102
 						$count          = count( $plugin_group );
1103 1103
 						$linked_plugins = array_map( array( 'TGMPA_Utils', 'wrap_in_em' ), $linked_plugins );
1104 1104
 						$last_plugin    = array_pop( $linked_plugins ); // Pop off last name to prep for readability.
1105
-						$imploded       = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ) . ' ' . $last_plugin );
1105
+						$imploded       = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ).' '.esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ).' '.$last_plugin );
1106 1106
 
1107 1107
 						$rendered .= sprintf(
1108 1108
 							$line_template,
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 			}
1125 1125
 
1126 1126
 			// Admin options pages already output settings_errors, so this is to avoid duplication.
1127
-			if ( 'options-general' !== $GLOBALS['current_screen']->parent_base ) {
1127
+			if ( 'options-general' !== $GLOBALS[ 'current_screen' ]->parent_base ) {
1128 1128
 				$this->display_settings_errors();
1129 1129
 			}
1130 1130
 		}
@@ -1146,32 +1146,32 @@  discard block
 block discarded – undo
1146 1146
 				'install'  => '',
1147 1147
 				'update'   => '',
1148 1148
 				'activate' => '',
1149
-				'dismiss'  => $this->dismissable ? '<a href="' . esc_url( wp_nonce_url( add_query_arg( 'tgmpa-dismiss', 'dismiss_admin_notices' ), 'tgmpa-dismiss-' . get_current_user_id() ) ) . '" class="dismiss-notice" target="_parent">' . esc_html( $this->strings['dismiss'] ) . '</a>' : '',
1149
+				'dismiss'  => $this->dismissable ? '<a href="'.esc_url( wp_nonce_url( add_query_arg( 'tgmpa-dismiss', 'dismiss_admin_notices' ), 'tgmpa-dismiss-'.get_current_user_id() ) ).'" class="dismiss-notice" target="_parent">'.esc_html( $this->strings[ 'dismiss' ] ).'</a>' : '',
1150 1150
 			);
1151 1151
 
1152 1152
 			$link_template = '<a href="%2$s">%1$s</a>';
1153 1153
 
1154 1154
 			if ( current_user_can( 'install_plugins' ) ) {
1155 1155
 				if ( $install_count > 0 ) {
1156
-					$action_links['install'] = sprintf(
1156
+					$action_links[ 'install' ] = sprintf(
1157 1157
 						$link_template,
1158
-						translate_nooped_plural( $this->strings['install_link'], $install_count, 'tgmpa' ),
1158
+						translate_nooped_plural( $this->strings[ 'install_link' ], $install_count, 'tgmpa' ),
1159 1159
 						esc_url( $this->get_tgmpa_status_url( 'install' ) )
1160 1160
 					);
1161 1161
 				}
1162 1162
 				if ( $update_count > 0 ) {
1163
-					$action_links['update'] = sprintf(
1163
+					$action_links[ 'update' ] = sprintf(
1164 1164
 						$link_template,
1165
-						translate_nooped_plural( $this->strings['update_link'], $update_count, 'tgmpa' ),
1165
+						translate_nooped_plural( $this->strings[ 'update_link' ], $update_count, 'tgmpa' ),
1166 1166
 						esc_url( $this->get_tgmpa_status_url( 'update' ) )
1167 1167
 					);
1168 1168
 				}
1169 1169
 			}
1170 1170
 
1171 1171
 			if ( current_user_can( 'activate_plugins' ) && $activate_count > 0 ) {
1172
-				$action_links['activate'] = sprintf(
1172
+				$action_links[ 'activate' ] = sprintf(
1173 1173
 					$link_template,
1174
-					translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'tgmpa' ),
1174
+					translate_nooped_plural( $this->strings[ 'activate_link' ], $activate_count, 'tgmpa' ),
1175 1175
 					esc_url( $this->get_tgmpa_status_url( 'activate' ) )
1176 1176
 				);
1177 1177
 			}
@@ -1199,8 +1199,8 @@  discard block
 block discarded – undo
1199 1199
 		 * @return string
1200 1200
 		 */
1201 1201
 		protected function get_admin_notice_class() {
1202
-			if ( ! empty( $this->strings['nag_type'] ) ) {
1203
-				return sanitize_html_class( strtolower( $this->strings['nag_type'] ) );
1202
+			if ( ! empty( $this->strings[ 'nag_type' ] ) ) {
1203
+				return sanitize_html_class( strtolower( $this->strings[ 'nag_type' ] ) );
1204 1204
 			} else {
1205 1205
 				if ( version_compare( $this->wp_version, '4.2', '>=' ) ) {
1206 1206
 					return 'notice-warning';
@@ -1223,7 +1223,7 @@  discard block
 block discarded – undo
1223 1223
 			settings_errors( 'tgmpa' );
1224 1224
 
1225 1225
 			foreach ( (array) $wp_settings_errors as $key => $details ) {
1226
-				if ( 'tgmpa' === $details['setting'] ) {
1226
+				if ( 'tgmpa' === $details[ 'setting' ] ) {
1227 1227
 					unset( $wp_settings_errors[ $key ] );
1228 1228
 					break;
1229 1229
 				}
@@ -1238,8 +1238,8 @@  discard block
 block discarded – undo
1238 1238
 		 * @since 2.1.0
1239 1239
 		 */
1240 1240
 		public function dismiss() {
1241
-			if ( isset( $_GET['tgmpa-dismiss'] ) && check_admin_referer( 'tgmpa-dismis-' . get_current_user_id() ) ) {
1242
-				update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, 1 );
1241
+			if ( isset( $_GET[ 'tgmpa-dismiss' ] ) && check_admin_referer( 'tgmpa-dismis-'.get_current_user_id() ) ) {
1242
+				update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_'.$this->id, 1 );
1243 1243
 			}
1244 1244
 		}
1245 1245
 
@@ -1255,54 +1255,54 @@  discard block
 block discarded – undo
1255 1255
 		 * @return null Return early if incorrect argument.
1256 1256
 		 */
1257 1257
 		public function register( $plugin ) {
1258
-			if ( empty( $plugin['slug'] ) || empty( $plugin['name'] ) ) {
1258
+			if ( empty( $plugin[ 'slug' ] ) || empty( $plugin[ 'name' ] ) ) {
1259 1259
 				return;
1260 1260
 			}
1261 1261
 
1262
-			if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[ $plugin['slug'] ] ) ) {
1262
+			if ( empty( $plugin[ 'slug' ] ) || ! is_string( $plugin[ 'slug' ] ) || isset( $this->plugins[ $plugin[ 'slug' ] ] ) ) {
1263 1263
 				return;
1264 1264
 			}
1265 1265
 
1266 1266
 			$defaults = array(
1267
-				'name'               => '',      // String
1268
-				'slug'               => '',      // String
1269
-				'source'             => 'repo',  // String
1270
-				'required'           => false,   // Boolean
1271
-				'version'            => '',      // String
1272
-				'force_activation'   => false,   // Boolean
1273
-				'force_deactivation' => false,   // Boolean
1274
-				'external_url'       => '',      // String
1275
-				'is_callable'        => '',      // String|Array.
1267
+				'name'               => '', // String
1268
+				'slug'               => '', // String
1269
+				'source'             => 'repo', // String
1270
+				'required'           => false, // Boolean
1271
+				'version'            => '', // String
1272
+				'force_activation'   => false, // Boolean
1273
+				'force_deactivation' => false, // Boolean
1274
+				'external_url'       => '', // String
1275
+				'is_callable'        => '', // String|Array.
1276 1276
 			);
1277 1277
 
1278 1278
 			// Prepare the received data.
1279 1279
 			$plugin = wp_parse_args( $plugin, $defaults );
1280 1280
 
1281 1281
 			// Standardize the received slug.
1282
-			$plugin['slug'] = $this->sanitize_key( $plugin['slug'] );
1282
+			$plugin[ 'slug' ] = $this->sanitize_key( $plugin[ 'slug' ] );
1283 1283
 
1284 1284
 			// Forgive users for using string versions of booleans or floats for version number.
1285
-			$plugin['version']            = (string) $plugin['version'];
1286
-			$plugin['source']             = empty( $plugin['source'] ) ? 'repo' : $plugin['source'];
1287
-			$plugin['required']           = TGMPA_Utils::validate_bool( $plugin['required'] );
1288
-			$plugin['force_activation']   = TGMPA_Utils::validate_bool( $plugin['force_activation'] );
1289
-			$plugin['force_deactivation'] = TGMPA_Utils::validate_bool( $plugin['force_deactivation'] );
1285
+			$plugin[ 'version' ]            = (string) $plugin[ 'version' ];
1286
+			$plugin[ 'source' ]             = empty( $plugin[ 'source' ] ) ? 'repo' : $plugin[ 'source' ];
1287
+			$plugin[ 'required' ]           = TGMPA_Utils::validate_bool( $plugin[ 'required' ] );
1288
+			$plugin[ 'force_activation' ]   = TGMPA_Utils::validate_bool( $plugin[ 'force_activation' ] );
1289
+			$plugin[ 'force_deactivation' ] = TGMPA_Utils::validate_bool( $plugin[ 'force_deactivation' ] );
1290 1290
 
1291 1291
 			// Enrich the received data.
1292
-			$plugin['file_path']   = $this->_get_plugin_basename_from_slug( $plugin['slug'] );
1293
-			$plugin['source_type'] = $this->get_plugin_source_type( $plugin['source'] );
1292
+			$plugin[ 'file_path' ]   = $this->_get_plugin_basename_from_slug( $plugin[ 'slug' ] );
1293
+			$plugin[ 'source_type' ] = $this->get_plugin_source_type( $plugin[ 'source' ] );
1294 1294
 
1295 1295
 			// Set the class properties.
1296
-			$this->plugins[ $plugin['slug'] ]    = $plugin;
1297
-			$this->sort_order[ $plugin['slug'] ] = $plugin['name'];
1296
+			$this->plugins[ $plugin[ 'slug' ] ]    = $plugin;
1297
+			$this->sort_order[ $plugin[ 'slug' ] ] = $plugin[ 'name' ];
1298 1298
 
1299 1299
 			// Should we add the force activation hook ?
1300
-			if ( true === $plugin['force_activation'] ) {
1300
+			if ( true === $plugin[ 'force_activation' ] ) {
1301 1301
 				$this->has_forced_activation = true;
1302 1302
 			}
1303 1303
 
1304 1304
 			// Should we add the force deactivation hook ?
1305
-			if ( true === $plugin['force_deactivation'] ) {
1305
+			if ( true === $plugin[ 'force_deactivation' ] ) {
1306 1306
 				$this->has_forced_deactivation = true;
1307 1307
 			}
1308 1308
 		}
@@ -1428,11 +1428,11 @@  discard block
 block discarded – undo
1428 1428
 		 */
1429 1429
 		public function populate_file_path( $plugin_slug = '' ) {
1430 1430
 			if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[ $plugin_slug ] ) ) {
1431
-				$this->plugins[ $plugin_slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug );
1431
+				$this->plugins[ $plugin_slug ][ 'file_path' ] = $this->_get_plugin_basename_from_slug( $plugin_slug );
1432 1432
 			} else {
1433 1433
 				// Add file_path key for all plugins.
1434 1434
 				foreach ( $this->plugins as $slug => $values ) {
1435
-					$this->plugins[ $slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $slug );
1435
+					$this->plugins[ $slug ][ 'file_path' ] = $this->_get_plugin_basename_from_slug( $slug );
1436 1436
 				}
1437 1437
 			}
1438 1438
 		}
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
 			$keys = array_keys( $this->get_plugins() );
1451 1451
 
1452 1452
 			foreach ( $keys as $key ) {
1453
-				if ( preg_match( '|^' . $slug . '/|', $key ) ) {
1453
+				if ( preg_match( '|^'.$slug.'/|', $key ) ) {
1454 1454
 					return $key;
1455 1455
 				}
1456 1456
 			}
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
 		 */
1473 1473
 		public function _get_plugin_data_from_name( $name, $data = 'slug' ) {
1474 1474
 			foreach ( $this->plugins as $values ) {
1475
-				if ( $name === $values['name'] && isset( $values[ $data ] ) ) {
1475
+				if ( $name === $values[ 'name' ] && isset( $values[ $data ] ) ) {
1476 1476
 					return $values[ $data ];
1477 1477
 				}
1478 1478
 			}
@@ -1491,13 +1491,13 @@  discard block
 block discarded – undo
1491 1491
 		public function get_download_url( $slug ) {
1492 1492
 			$dl_source = '';
1493 1493
 
1494
-			switch ( $this->plugins[ $slug ]['source_type'] ) {
1494
+			switch ( $this->plugins[ $slug ][ 'source_type' ] ) {
1495 1495
 				case 'repo':
1496 1496
 					return $this->get_wp_repo_download_url( $slug );
1497 1497
 				case 'external':
1498
-					return $this->plugins[ $slug ]['source'];
1498
+					return $this->plugins[ $slug ][ 'source' ];
1499 1499
 				case 'bundled':
1500
-					return $this->default_path . $this->plugins[ $slug ]['source'];
1500
+					return $this->default_path.$this->plugins[ $slug ][ 'source' ];
1501 1501
 			}
1502 1502
 
1503 1503
 			return $dl_source; // Should never happen.
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
 
1536 1536
 			if ( ! isset( $api[ $slug ] ) ) {
1537 1537
 				if ( ! function_exists( 'plugins_api' ) ) {
1538
-					require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
1538
+					require_once ABSPATH.'wp-admin/includes/plugin-install.php';
1539 1539
 				}
1540 1540
 
1541 1541
 				$response = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false ) ) );
@@ -1543,7 +1543,7 @@  discard block
 block discarded – undo
1543 1543
 				$api[ $slug ] = false;
1544 1544
 
1545 1545
 				if ( is_wp_error( $response ) ) {
1546
-					wp_die( esc_html( $this->strings['oops'] ) );
1546
+					wp_die( esc_html( $this->strings[ 'oops' ] ) );
1547 1547
 				} else {
1548 1548
 					$api[ $slug ] = $response;
1549 1549
 				}
@@ -1562,13 +1562,13 @@  discard block
 block discarded – undo
1562 1562
 		 *                or the plugin name if not.
1563 1563
 		 */
1564 1564
 		public function get_info_link( $slug ) {
1565
-			if ( ! empty( $this->plugins[ $slug ]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ]['external_url'] ) ) {
1565
+			if ( ! empty( $this->plugins[ $slug ][ 'external_url' ] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ][ 'external_url' ] ) ) {
1566 1566
 				$link = sprintf(
1567 1567
 					'<a href="%1$s" target="_blank">%2$s</a>',
1568
-					esc_url( $this->plugins[ $slug ]['external_url'] ),
1569
-					esc_html( $this->plugins[ $slug ]['name'] )
1568
+					esc_url( $this->plugins[ $slug ][ 'external_url' ] ),
1569
+					esc_html( $this->plugins[ $slug ][ 'name' ] )
1570 1570
 				);
1571
-			} elseif ( 'repo' === $this->plugins[ $slug ]['source_type'] ) {
1571
+			} elseif ( 'repo' === $this->plugins[ $slug ][ 'source_type' ] ) {
1572 1572
 				$url = add_query_arg(
1573 1573
 					array(
1574 1574
 						'tab'       => 'plugin-information',
@@ -1583,10 +1583,10 @@  discard block
 block discarded – undo
1583 1583
 				$link = sprintf(
1584 1584
 					'<a href="%1$s" class="thickbox">%2$s</a>',
1585 1585
 					esc_url( $url ),
1586
-					esc_html( $this->plugins[ $slug ]['name'] )
1586
+					esc_html( $this->plugins[ $slug ][ 'name' ] )
1587 1587
 				);
1588 1588
 			} else {
1589
-				$link = esc_html( $this->plugins[ $slug ]['name'] ); // No hyperlink.
1589
+				$link = esc_html( $this->plugins[ $slug ][ 'name' ] ); // No hyperlink.
1590 1590
 			}
1591 1591
 
1592 1592
 			return $link;
@@ -1600,7 +1600,7 @@  discard block
 block discarded – undo
1600 1600
 		 * @return boolean True when on the TGMPA page, false otherwise.
1601 1601
 		 */
1602 1602
 		protected function is_tgmpa_page() {
1603
-			return isset( $_GET['page'] ) && $this->menu === $_GET['page'];
1603
+			return isset( $_GET[ 'page' ] ) && $this->menu === $_GET[ 'page' ];
1604 1604
 		}
1605 1605
 
1606 1606
 		/**
@@ -1682,7 +1682,7 @@  discard block
 block discarded – undo
1682 1682
 		public function is_plugin_installed( $slug ) {
1683 1683
 			$installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
1684 1684
 
1685
-			return ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ] ) );
1685
+			return ( ! empty( $installed_plugins[ $this->plugins[ $slug ][ 'file_path' ] ] ) );
1686 1686
 		}
1687 1687
 
1688 1688
 		/**
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
 		 * @return bool True if active, false otherwise.
1695 1695
 		 */
1696 1696
 		public function is_plugin_active( $slug ) {
1697
-			return ( ( ! empty( $this->plugins[ $slug ]['is_callable'] ) && is_callable( $this->plugins[ $slug ]['is_callable'] ) ) || is_plugin_active( $this->plugins[ $slug ]['file_path'] ) );
1697
+			return ( ( ! empty( $this->plugins[ $slug ][ 'is_callable' ] ) && is_callable( $this->plugins[ $slug ][ 'is_callable' ] ) ) || is_plugin_active( $this->plugins[ $slug ][ 'file_path' ] ) );
1698 1698
 		}
1699 1699
 
1700 1700
 		/**
@@ -1708,7 +1708,7 @@  discard block
 block discarded – undo
1708 1708
 		 */
1709 1709
 		public function can_plugin_update( $slug ) {
1710 1710
 			// We currently can't get reliable info on non-WP-repo plugins - issue #380.
1711
-			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
1711
+			if ( 'repo' !== $this->plugins[ $slug ][ 'source_type' ] ) {
1712 1712
 				return true;
1713 1713
 			}
1714 1714
 
@@ -1764,8 +1764,8 @@  discard block
 block discarded – undo
1764 1764
 		public function get_installed_version( $slug ) {
1765 1765
 			$installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
1766 1766
 
1767
-			if ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'] ) ) {
1768
-				return $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'];
1767
+			if ( ! empty( $installed_plugins[ $this->plugins[ $slug ][ 'file_path' ] ][ 'Version' ] ) ) {
1768
+				return $installed_plugins[ $this->plugins[ $slug ][ 'file_path' ] ][ 'Version' ];
1769 1769
 			}
1770 1770
 
1771 1771
 			return '';
@@ -1781,7 +1781,7 @@  discard block
 block discarded – undo
1781 1781
 		 */
1782 1782
 		public function does_plugin_require_update( $slug ) {
1783 1783
 			$installed_version = $this->get_installed_version( $slug );
1784
-			$minimum_version   = $this->plugins[ $slug ]['version'];
1784
+			$minimum_version   = $this->plugins[ $slug ][ 'version' ];
1785 1785
 
1786 1786
 			return version_compare( $minimum_version, $installed_version, '>' );
1787 1787
 		}
@@ -1796,9 +1796,9 @@  discard block
 block discarded – undo
1796 1796
 		 */
1797 1797
 		public function does_plugin_have_update( $slug ) {
1798 1798
 			// Presume bundled and external plugins will point to a package which meets the minimum required version.
1799
-			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
1799
+			if ( 'repo' !== $this->plugins[ $slug ][ 'source_type' ] ) {
1800 1800
 				if ( $this->does_plugin_require_update( $slug ) ) {
1801
-					return $this->plugins[ $slug ]['version'];
1801
+					return $this->plugins[ $slug ][ 'version' ];
1802 1802
 				}
1803 1803
 
1804 1804
 				return false;
@@ -1806,8 +1806,8 @@  discard block
 block discarded – undo
1806 1806
 
1807 1807
 			$repo_updates = get_site_transient( 'update_plugins' );
1808 1808
 
1809
-			if ( isset( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version ) ) {
1810
-				return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version;
1809
+			if ( isset( $repo_updates->response[ $this->plugins[ $slug ][ 'file_path' ] ]->new_version ) ) {
1810
+				return $repo_updates->response[ $this->plugins[ $slug ][ 'file_path' ] ]->new_version;
1811 1811
 			}
1812 1812
 
1813 1813
 			return false;
@@ -1823,14 +1823,14 @@  discard block
 block discarded – undo
1823 1823
 		 */
1824 1824
 		public function get_upgrade_notice( $slug ) {
1825 1825
 			// We currently can't get reliable info on non-WP-repo plugins - issue #380.
1826
-			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
1826
+			if ( 'repo' !== $this->plugins[ $slug ][ 'source_type' ] ) {
1827 1827
 				return '';
1828 1828
 			}
1829 1829
 
1830 1830
 			$repo_updates = get_site_transient( 'update_plugins' );
1831 1831
 
1832
-			if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice ) ) {
1833
-				return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice;
1832
+			if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ][ 'file_path' ] ]->upgrade_notice ) ) {
1833
+				return $repo_updates->response[ $this->plugins[ $slug ][ 'file_path' ] ]->upgrade_notice;
1834 1834
 			}
1835 1835
 
1836 1836
 			return '';
@@ -1846,7 +1846,7 @@  discard block
 block discarded – undo
1846 1846
 		 */
1847 1847
 		public function get_plugins( $plugin_folder = '' ) {
1848 1848
 			if ( ! function_exists( 'get_plugins' ) ) {
1849
-				require_once ABSPATH . 'wp-admin/includes/plugin.php';
1849
+				require_once ABSPATH.'wp-admin/includes/plugin.php';
1850 1850
 			}
1851 1851
 
1852 1852
 			return get_plugins( $plugin_folder );
@@ -1861,7 +1861,7 @@  discard block
 block discarded – undo
1861 1861
 		 * @since 2.1.1
1862 1862
 		 */
1863 1863
 		public function update_dismiss() {
1864
-			delete_metadata( 'user', null, 'tgmpa_dismissed_notice_' . $this->id, null, true );
1864
+			delete_metadata( 'user', null, 'tgmpa_dismissed_notice_'.$this->id, null, true );
1865 1865
 		}
1866 1866
 
1867 1867
 		/**
@@ -1880,13 +1880,13 @@  discard block
 block discarded – undo
1880 1880
 		 */
1881 1881
 		public function force_activation() {
1882 1882
 			foreach ( $this->plugins as $slug => $plugin ) {
1883
-				if ( true === $plugin['force_activation'] ) {
1883
+				if ( true === $plugin[ 'force_activation' ] ) {
1884 1884
 					if ( ! $this->is_plugin_installed( $slug ) ) {
1885 1885
 						// Oops, plugin isn't there so iterate to next condition.
1886 1886
 						continue;
1887 1887
 					} elseif ( $this->can_plugin_activate( $slug ) ) {
1888 1888
 						// There we go, activate the plugin.
1889
-						activate_plugin( $plugin['file_path'] );
1889
+						activate_plugin( $plugin[ 'file_path' ] );
1890 1890
 					}
1891 1891
 				}
1892 1892
 			}
@@ -1907,8 +1907,8 @@  discard block
 block discarded – undo
1907 1907
 		public function force_deactivation() {
1908 1908
 			foreach ( $this->plugins as $slug => $plugin ) {
1909 1909
 				// Only proceed forward if the parameter is set to true and plugin is active.
1910
-				if ( true === $plugin['force_deactivation'] && $this->is_plugin_active( $slug ) ) {
1911
-					deactivate_plugins( $plugin['file_path'] );
1910
+				if ( true === $plugin[ 'force_deactivation' ] && $this->is_plugin_active( $slug ) ) {
1911
+					deactivate_plugins( $plugin[ 'file_path' ] );
1912 1912
 				}
1913 1913
 			}
1914 1914
 		}
@@ -1949,7 +1949,7 @@  discard block
 block discarded – undo
1949 1949
 		 * Ensure only one instance of the class is ever invoked.
1950 1950
 		 */
1951 1951
 		function load_tgm_plugin_activation() {
1952
-			$GLOBALS['tgmpa'] = TGM_Plugin_Activation::get_instance();
1952
+			$GLOBALS[ 'tgmpa' ] = TGM_Plugin_Activation::get_instance();
1953 1953
 		}
1954 1954
 	}
1955 1955
 
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
 	 * @param array $config  Optional. An array of configuration values.
1972 1972
 	 */
1973 1973
 	function tgmpa( $plugins, $config = array() ) {
1974
-		$instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
1974
+		$instance = call_user_func( array( get_class( $GLOBALS[ 'tgmpa' ] ), 'get_instance' ) );
1975 1975
 
1976 1976
 		foreach ( $plugins as $plugin ) {
1977 1977
 			call_user_func( array( $instance, 'register' ), $plugin );
@@ -1979,17 +1979,17 @@  discard block
 block discarded – undo
1979 1979
 
1980 1980
 		if ( ! empty( $config ) && is_array( $config ) ) {
1981 1981
 			// Send out notices for deprecated arguments passed.
1982
-			if ( isset( $config['notices'] ) ) {
1982
+			if ( isset( $config[ 'notices' ] ) ) {
1983 1983
 				_deprecated_argument( __FUNCTION__, '2.2.0', 'The `notices` config parameter was renamed to `has_notices` in TGMPA 2.2.0. Please adjust your configuration.' );
1984
-				if ( ! isset( $config['has_notices'] ) ) {
1985
-					$config['has_notices'] = $config['notices'];
1984
+				if ( ! isset( $config[ 'has_notices' ] ) ) {
1985
+					$config[ 'has_notices' ] = $config[ 'notices' ];
1986 1986
 				}
1987 1987
 			}
1988 1988
 
1989
-			if ( isset( $config['parent_menu_slug'] ) ) {
1989
+			if ( isset( $config[ 'parent_menu_slug' ] ) ) {
1990 1990
 				_deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_menu_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
1991 1991
 			}
1992
-			if ( isset( $config['parent_url_slug'] ) ) {
1992
+			if ( isset( $config[ 'parent_url_slug' ] ) ) {
1993 1993
 				_deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_url_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
1994 1994
 			}
1995 1995
 
@@ -2005,7 +2005,7 @@  discard block
 block discarded – undo
2005 2005
  * @since 2.2.0
2006 2006
  */
2007 2007
 if ( ! class_exists( 'WP_List_Table' ) ) {
2008
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
2008
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
2009 2009
 }
2010 2010
 
2011 2011
 if ( ! class_exists( 'TGMPA_List_Table' ) ) {
@@ -2066,7 +2066,7 @@  discard block
 block discarded – undo
2066 2066
 		 * @since 2.2.0
2067 2067
 		 */
2068 2068
 		public function __construct() {
2069
-			$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
2069
+			$this->tgmpa = call_user_func( array( get_class( $GLOBALS[ 'tgmpa' ] ), 'get_instance' ) );
2070 2070
 
2071 2071
 			parent::__construct(
2072 2072
 				array(
@@ -2076,8 +2076,8 @@  discard block
 block discarded – undo
2076 2076
 				)
2077 2077
 			);
2078 2078
 
2079
-			if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'install', 'update', 'activate' ), true ) ) {
2080
-				$this->view_context = sanitize_key( $_REQUEST['plugin_status'] );
2079
+			if ( isset( $_REQUEST[ 'plugin_status' ] ) && in_array( $_REQUEST[ 'plugin_status' ], array( 'install', 'update', 'activate' ), true ) ) {
2080
+				$this->view_context = sanitize_key( $_REQUEST[ 'plugin_status' ] );
2081 2081
 			}
2082 2082
 
2083 2083
 			add_filter( 'tgmpa_table_data_items', array( $this, 'sort_table_items' ) );
@@ -2124,20 +2124,20 @@  discard block
 block discarded – undo
2124 2124
 			}
2125 2125
 
2126 2126
 			foreach ( $plugins[ $this->view_context ] as $slug => $plugin ) {
2127
-				$table_data[ $i ]['sanitized_plugin']  = $plugin['name'];
2128
-				$table_data[ $i ]['slug']              = $slug;
2129
-				$table_data[ $i ]['plugin']            = '<strong>' . $this->tgmpa->get_info_link( $slug ) . '</strong>';
2130
-				$table_data[ $i ]['source']            = $this->get_plugin_source_type_text( $plugin['source_type'] );
2131
-				$table_data[ $i ]['type']              = $this->get_plugin_advise_type_text( $plugin['required'] );
2132
-				$table_data[ $i ]['status']            = $this->get_plugin_status_text( $slug );
2133
-				$table_data[ $i ]['installed_version'] = $this->tgmpa->get_installed_version( $slug );
2134
-				$table_data[ $i ]['minimum_version']   = $plugin['version'];
2135
-				$table_data[ $i ]['available_version'] = $this->tgmpa->does_plugin_have_update( $slug );
2127
+				$table_data[ $i ][ 'sanitized_plugin' ]  = $plugin[ 'name' ];
2128
+				$table_data[ $i ][ 'slug' ]              = $slug;
2129
+				$table_data[ $i ][ 'plugin' ]            = '<strong>'.$this->tgmpa->get_info_link( $slug ).'</strong>';
2130
+				$table_data[ $i ][ 'source' ]            = $this->get_plugin_source_type_text( $plugin[ 'source_type' ] );
2131
+				$table_data[ $i ][ 'type' ]              = $this->get_plugin_advise_type_text( $plugin[ 'required' ] );
2132
+				$table_data[ $i ][ 'status' ]            = $this->get_plugin_status_text( $slug );
2133
+				$table_data[ $i ][ 'installed_version' ] = $this->tgmpa->get_installed_version( $slug );
2134
+				$table_data[ $i ][ 'minimum_version' ]   = $plugin[ 'version' ];
2135
+				$table_data[ $i ][ 'available_version' ] = $this->tgmpa->does_plugin_have_update( $slug );
2136 2136
 
2137 2137
 				// Prep the upgrade notice info.
2138 2138
 				$upgrade_notice = $this->tgmpa->get_upgrade_notice( $slug );
2139 2139
 				if ( ! empty( $upgrade_notice ) ) {
2140
-					$table_data[ $i ]['upgrade_notice'] = $upgrade_notice;
2140
+					$table_data[ $i ][ 'upgrade_notice' ] = $upgrade_notice;
2141 2141
 
2142 2142
 					add_action( "tgmpa_after_plugin_row_$slug", array( $this, 'wp_plugin_update_row' ), 10, 2 );
2143 2143
 				}
@@ -2168,17 +2168,17 @@  discard block
 block discarded – undo
2168 2168
 					// No need to display plugins if they are installed, up-to-date and active.
2169 2169
 					continue;
2170 2170
 				} else {
2171
-					$plugins['all'][ $slug ] = $plugin;
2171
+					$plugins[ 'all' ][ $slug ] = $plugin;
2172 2172
 
2173 2173
 					if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
2174
-						$plugins['install'][ $slug ] = $plugin;
2174
+						$plugins[ 'install' ][ $slug ] = $plugin;
2175 2175
 					} else {
2176 2176
 						if ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
2177
-							$plugins['update'][ $slug ] = $plugin;
2177
+							$plugins[ 'update' ][ $slug ] = $plugin;
2178 2178
 						}
2179 2179
 
2180 2180
 						if ( $this->tgmpa->can_plugin_activate( $slug ) ) {
2181
-							$plugins['activate'][ $slug ] = $plugin;
2181
+							$plugins[ 'activate' ][ $slug ] = $plugin;
2182 2182
 						}
2183 2183
 					}
2184 2184
 				}
@@ -2298,8 +2298,8 @@  discard block
 block discarded – undo
2298 2298
 			$name = array();
2299 2299
 
2300 2300
 			foreach ( $items as $i => $plugin ) {
2301
-				$type[ $i ] = $plugin['type']; // Required / recommended.
2302
-				$name[ $i ] = $plugin['sanitized_plugin'];
2301
+				$type[ $i ] = $plugin[ 'type' ]; // Required / recommended.
2302
+				$name[ $i ] = $plugin[ 'sanitized_plugin' ];
2303 2303
 			}
2304 2304
 
2305 2305
 			array_multisort( $type, SORT_DESC, $name, SORT_ASC, $items );
@@ -2381,9 +2381,9 @@  discard block
 block discarded – undo
2381 2381
 		public function column_cb( $item ) {
2382 2382
 			return sprintf(
2383 2383
 				'<input type="checkbox" name="%1$s[]" value="%2$s" id="%3$s" />',
2384
-				esc_attr( $this->_args['singular'] ),
2385
-				esc_attr( $item['slug'] ),
2386
-				esc_attr( $item['sanitized_plugin'] )
2384
+				esc_attr( $this->_args[ 'singular' ] ),
2385
+				esc_attr( $item[ 'slug' ] ),
2386
+				esc_attr( $item[ 'sanitized_plugin' ] )
2387 2387
 			);
2388 2388
 		}
2389 2389
 
@@ -2398,7 +2398,7 @@  discard block
 block discarded – undo
2398 2398
 		public function column_plugin( $item ) {
2399 2399
 			return sprintf(
2400 2400
 				'%1$s %2$s',
2401
-				$item['plugin'],
2401
+				$item[ 'plugin' ],
2402 2402
 				$this->row_actions( $this->get_row_actions( $item ), true )
2403 2403
 			);
2404 2404
 		}
@@ -2414,38 +2414,38 @@  discard block
 block discarded – undo
2414 2414
 		public function column_version( $item ) {
2415 2415
 			$output = array();
2416 2416
 
2417
-			if ( $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
2418
-				$installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'tgmpa' );
2417
+			if ( $this->tgmpa->is_plugin_installed( $item[ 'slug' ] ) ) {
2418
+				$installed = ! empty( $item[ 'installed_version' ] ) ? $item[ 'installed_version' ] : _x( 'unknown', 'as in: "version nr unknown"', 'tgmpa' );
2419 2419
 
2420 2420
 				$color = '';
2421
-				if ( ! empty( $item['minimum_version'] ) && $this->tgmpa->does_plugin_require_update( $item['slug'] ) ) {
2421
+				if ( ! empty( $item[ 'minimum_version' ] ) && $this->tgmpa->does_plugin_require_update( $item[ 'slug' ] ) ) {
2422 2422
 					$color = ' color: #ff0000; font-weight: bold;';
2423 2423
 				}
2424 2424
 
2425
-				$output[] = sprintf(
2426
-					'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'tgmpa' ) . '</p>',
2425
+				$output[ ] = sprintf(
2426
+					'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>'.__( 'Installed version:', 'tgmpa' ).'</p>',
2427 2427
 					$color,
2428 2428
 					$installed
2429 2429
 				);
2430 2430
 			}
2431 2431
 
2432
-			if ( ! empty( $item['minimum_version'] ) ) {
2433
-				$output[] = sprintf(
2434
-					'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'tgmpa' ) . '</p>',
2435
-					$item['minimum_version']
2432
+			if ( ! empty( $item[ 'minimum_version' ] ) ) {
2433
+				$output[ ] = sprintf(
2434
+					'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>'.__( 'Minimum required version:', 'tgmpa' ).'</p>',
2435
+					$item[ 'minimum_version' ]
2436 2436
 				);
2437 2437
 			}
2438 2438
 
2439
-			if ( ! empty( $item['available_version'] ) ) {
2439
+			if ( ! empty( $item[ 'available_version' ] ) ) {
2440 2440
 				$color = '';
2441
-				if ( ! empty( $item['minimum_version'] ) && version_compare( $item['available_version'], $item['minimum_version'], '>=' ) ) {
2441
+				if ( ! empty( $item[ 'minimum_version' ] ) && version_compare( $item[ 'available_version' ], $item[ 'minimum_version' ], '>=' ) ) {
2442 2442
 					$color = ' color: #71C671; font-weight: bold;';
2443 2443
 				}
2444 2444
 
2445
-				$output[] = sprintf(
2446
-					'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'tgmpa' ) . '</p>',
2445
+				$output[ ] = sprintf(
2446
+					'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>'.__( 'Available version:', 'tgmpa' ).'</p>',
2447 2447
 					$color,
2448
-					$item['available_version']
2448
+					$item[ 'available_version' ]
2449 2449
 				);
2450 2450
 			}
2451 2451
 
@@ -2466,7 +2466,7 @@  discard block
 block discarded – undo
2466 2466
 		 * @since 2.2.0
2467 2467
 		 */
2468 2468
 		public function no_items() {
2469
-			echo esc_html__( 'No plugins to install, update or activate.', 'tgmpa' ) . ' <a href="' . esc_url( self_admin_url() ) . '"> ' . esc_html__( 'Return to the Dashboard', 'tgmpa' ) . '</a>';
2469
+			echo esc_html__( 'No plugins to install, update or activate.', 'tgmpa' ).' <a href="'.esc_url( self_admin_url() ).'"> '.esc_html__( 'Return to the Dashboard', 'tgmpa' ).'</a>';
2470 2470
 			echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
2471 2471
 		}
2472 2472
 
@@ -2486,8 +2486,8 @@  discard block
 block discarded – undo
2486 2486
 			);
2487 2487
 
2488 2488
 			if ( 'all' === $this->view_context || 'update' === $this->view_context ) {
2489
-				$columns['version'] = __( 'Version', 'tgmpa' );
2490
-				$columns['status']  = __( 'Status', 'tgmpa' );
2489
+				$columns[ 'version' ] = __( 'Version', 'tgmpa' );
2490
+				$columns[ 'status' ]  = __( 'Status', 'tgmpa' );
2491 2491
 			}
2492 2492
 
2493 2493
 			return apply_filters( 'tgmpa_table_columns', $columns );
@@ -2534,20 +2534,20 @@  discard block
 block discarded – undo
2534 2534
 			$action_links = array();
2535 2535
 
2536 2536
 			// Display the 'Install' action link if the plugin is not yet available.
2537
-			if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
2537
+			if ( ! $this->tgmpa->is_plugin_installed( $item[ 'slug' ] ) ) {
2538 2538
 				/* translators: %s: plugin name in screen reader markup */
2539
-				$actions['install'] = __( 'Install %s', 'tgmpa' );
2539
+				$actions[ 'install' ] = __( 'Install %s', 'tgmpa' );
2540 2540
 			} else {
2541 2541
 				// Display the 'Update' action link if an update is available and WP complies with plugin minimum.
2542
-				if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) {
2542
+				if ( false !== $this->tgmpa->does_plugin_have_update( $item[ 'slug' ] ) && $this->tgmpa->can_plugin_update( $item[ 'slug' ] ) ) {
2543 2543
 					/* translators: %s: plugin name in screen reader markup */
2544
-					$actions['update'] = __( 'Update %s', 'tgmpa' );
2544
+					$actions[ 'update' ] = __( 'Update %s', 'tgmpa' );
2545 2545
 				}
2546 2546
 
2547 2547
 				// Display the 'Activate' action link, but only if the plugin meets the minimum version.
2548
-				if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) {
2548
+				if ( $this->tgmpa->can_plugin_activate( $item[ 'slug' ] ) ) {
2549 2549
 					/* translators: %s: plugin name in screen reader markup */
2550
-					$actions['activate'] = __( 'Activate %s', 'tgmpa' );
2550
+					$actions[ 'activate' ] = __( 'Activate %s', 'tgmpa' );
2551 2551
 				}
2552 2552
 			}
2553 2553
 
@@ -2556,24 +2556,24 @@  discard block
 block discarded – undo
2556 2556
 				$nonce_url = wp_nonce_url(
2557 2557
 					add_query_arg(
2558 2558
 						array(
2559
-							'plugin'           => urlencode( $item['slug'] ),
2560
-							'tgmpa-' . $action => $action . '-plugin',
2559
+							'plugin'           => urlencode( $item[ 'slug' ] ),
2560
+							'tgmpa-'.$action => $action.'-plugin',
2561 2561
 						),
2562 2562
 						$this->tgmpa->get_tgmpa_url()
2563 2563
 					),
2564
-					'tgmpa-' . $action,
2564
+					'tgmpa-'.$action,
2565 2565
 					'tgmpa-nonce'
2566 2566
 				);
2567 2567
 
2568 2568
 				$action_links[ $action ] = sprintf(
2569
-					'<a href="%1$s">' . esc_html( $text ) . '</a>',
2569
+					'<a href="%1$s">'.esc_html( $text ).'</a>',
2570 2570
 					esc_url( $nonce_url ),
2571
-					'<span class="screen-reader-text">' . esc_html( $item['sanitized_plugin'] ) . '</span>'
2571
+					'<span class="screen-reader-text">'.esc_html( $item[ 'sanitized_plugin' ] ).'</span>'
2572 2572
 				);
2573 2573
 			}
2574 2574
 
2575 2575
 			$prefix = ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) ? 'network_admin_' : '';
2576
-			return apply_filters( "tgmpa_{$prefix}plugin_action_links", array_filter( $action_links ), $item['slug'], $item, $this->view_context );
2576
+			return apply_filters( "tgmpa_{$prefix}plugin_action_links", array_filter( $action_links ), $item[ 'slug' ], $item, $this->view_context );
2577 2577
 		}
2578 2578
 
2579 2579
 		/**
@@ -2594,7 +2594,7 @@  discard block
 block discarded – undo
2594 2594
 			 *
2595 2595
 			 * @since 2.5.0
2596 2596
 			 */
2597
-			do_action( "tgmpa_after_plugin_row_{$item['slug']}", $item['slug'], $item, $this->view_context );
2597
+			do_action( "tgmpa_after_plugin_row_{$item[ 'slug' ]}", $item[ 'slug' ], $item, $this->view_context );
2598 2598
 		}
2599 2599
 
2600 2600
 		/**
@@ -2609,7 +2609,7 @@  discard block
 block discarded – undo
2609 2609
 		 * @return null Return early if upgrade notice is empty.
2610 2610
 		 */
2611 2611
 		public function wp_plugin_update_row( $slug, $item ) {
2612
-			if ( empty( $item['upgrade_notice'] ) ) {
2612
+			if ( empty( $item[ 'upgrade_notice' ] ) ) {
2613 2613
 				return;
2614 2614
 			}
2615 2615
 
@@ -2618,7 +2618,7 @@  discard block
 block discarded – undo
2618 2618
 					<td colspan="', absint( $this->get_column_count() ), '" class="plugin-update colspanchange">
2619 2619
 						<div class="update-message">',
2620 2620
 							esc_html__( 'Upgrade message from the plugin author:', 'tgmpa' ),
2621
-							' <strong>', wp_kses_data( $item['upgrade_notice'] ), '</strong>
2621
+							' <strong>', wp_kses_data( $item[ 'upgrade_notice' ] ), '</strong>
2622 2622
 						</div>
2623 2623
 					</td>
2624 2624
 				</tr>';
@@ -2650,16 +2650,16 @@  discard block
 block discarded – undo
2650 2650
 
2651 2651
 			if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) {
2652 2652
 				if ( current_user_can( 'install_plugins' ) ) {
2653
-					$actions['tgmpa-bulk-install'] = __( 'Install', 'tgmpa' );
2653
+					$actions[ 'tgmpa-bulk-install' ] = __( 'Install', 'tgmpa' );
2654 2654
 				}
2655 2655
 			}
2656 2656
 
2657 2657
 			if ( 'install' !== $this->view_context ) {
2658 2658
 				if ( current_user_can( 'update_plugins' ) ) {
2659
-					$actions['tgmpa-bulk-update'] = __( 'Update', 'tgmpa' );
2659
+					$actions[ 'tgmpa-bulk-update' ] = __( 'Update', 'tgmpa' );
2660 2660
 				}
2661 2661
 				if ( current_user_can( 'activate_plugins' ) ) {
2662
-					$actions['tgmpa-bulk-activate'] = __( 'Activate', 'tgmpa' );
2662
+					$actions[ 'tgmpa-bulk-activate' ] = __( 'Activate', 'tgmpa' );
2663 2663
 				}
2664 2664
 			}
2665 2665
 
@@ -2678,7 +2678,7 @@  discard block
 block discarded – undo
2678 2678
 			// Bulk installation process.
2679 2679
 			if ( 'tgmpa-bulk-install' === $this->current_action() || 'tgmpa-bulk-update' === $this->current_action() ) {
2680 2680
 
2681
-				check_admin_referer( 'bulk-' . $this->_args['plural'] );
2681
+				check_admin_referer( 'bulk-'.$this->_args[ 'plural' ] );
2682 2682
 
2683 2683
 				$install_type = 'install';
2684 2684
 				if ( 'tgmpa-bulk-update' === $this->current_action() ) {
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
 				$plugins_to_install = array();
2689 2689
 
2690 2690
 				// Did user actually select any plugins to install/update ?
2691
-				if ( empty( $_POST['plugin'] ) ) {
2691
+				if ( empty( $_POST[ 'plugin' ] ) ) {
2692 2692
 					if ( 'install' === $install_type ) {
2693 2693
 						$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
2694 2694
 					} else {
@@ -2700,11 +2700,11 @@  discard block
 block discarded – undo
2700 2700
 					return false;
2701 2701
 				}
2702 2702
 
2703
-				if ( is_array( $_POST['plugin'] ) ) {
2704
-					$plugins_to_install = (array) $_POST['plugin'];
2705
-				} elseif ( is_string( $_POST['plugin'] ) ) {
2703
+				if ( is_array( $_POST[ 'plugin' ] ) ) {
2704
+					$plugins_to_install = (array) $_POST[ 'plugin' ];
2705
+				} elseif ( is_string( $_POST[ 'plugin' ] ) ) {
2706 2706
 					// Received via Filesystem page - un-flatten array (WP bug #19643).
2707
-					$plugins_to_install = explode( ',', $_POST['plugin'] );
2707
+					$plugins_to_install = explode( ',', $_POST[ 'plugin' ] );
2708 2708
 				}
2709 2709
 
2710 2710
 				// Sanitize the received input.
@@ -2746,11 +2746,11 @@  discard block
 block discarded – undo
2746 2746
 				// Pass all necessary information if WP_Filesystem is needed.
2747 2747
 				$url = wp_nonce_url(
2748 2748
 					$this->tgmpa->get_tgmpa_url(),
2749
-					'bulk-' . $this->_args['plural']
2749
+					'bulk-'.$this->_args[ 'plural' ]
2750 2750
 				);
2751 2751
 
2752 2752
 				// Give validated data back to $_POST which is the only place the filesystem looks for extra fields.
2753
-				$_POST['plugin'] = implode( ',', $plugins_to_install ); // Work around for WP bug #19643.
2753
+				$_POST[ 'plugin' ] = implode( ',', $plugins_to_install ); // Work around for WP bug #19643.
2754 2754
 
2755 2755
 				$method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
2756 2756
 				$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem.
@@ -2777,22 +2777,22 @@  discard block
 block discarded – undo
2777 2777
 
2778 2778
 				// Prepare the data for validated plugins for the install/upgrade.
2779 2779
 				foreach ( $plugins_to_install as $slug ) {
2780
-					$name   = $this->tgmpa->plugins[ $slug ]['name'];
2780
+					$name   = $this->tgmpa->plugins[ $slug ][ 'name' ];
2781 2781
 					$source = $this->tgmpa->get_download_url( $slug );
2782 2782
 
2783 2783
 					if ( ! empty( $name ) && ! empty( $source ) ) {
2784
-						$names[] = $name;
2784
+						$names[ ] = $name;
2785 2785
 
2786 2786
 						switch ( $install_type ) {
2787 2787
 
2788 2788
 							case 'install':
2789
-								$sources[] = $source;
2789
+								$sources[ ] = $source;
2790 2790
 								break;
2791 2791
 
2792 2792
 							case 'update':
2793
-								$file_paths[]                 = $this->tgmpa->plugins[ $slug ]['file_path'];
2793
+								$file_paths[ ]                 = $this->tgmpa->plugins[ $slug ][ 'file_path' ];
2794 2794
 								$to_inject[ $slug ]           = $this->tgmpa->plugins[ $slug ];
2795
-								$to_inject[ $slug ]['source'] = $source;
2795
+								$to_inject[ $slug ][ 'source' ] = $source;
2796 2796
 								break;
2797 2797
 						}
2798 2798
 					}
@@ -2804,7 +2804,7 @@  discard block
 block discarded – undo
2804 2804
 					new TGMPA_Bulk_Installer_Skin(
2805 2805
 						array(
2806 2806
 							'url'          => esc_url_raw( $this->tgmpa->get_tgmpa_url() ),
2807
-							'nonce'        => 'bulk-' . $this->_args['plural'],
2807
+							'nonce'        => 'bulk-'.$this->_args[ 'plural' ],
2808 2808
 							'names'        => $names,
2809 2809
 							'install_type' => $install_type,
2810 2810
 						)
@@ -2837,10 +2837,10 @@  discard block
 block discarded – undo
2837 2837
 
2838 2838
 			// Bulk activation process.
2839 2839
 			if ( 'tgmpa-bulk-activate' === $this->current_action() ) {
2840
-				check_admin_referer( 'bulk-' . $this->_args['plural'] );
2840
+				check_admin_referer( 'bulk-'.$this->_args[ 'plural' ] );
2841 2841
 
2842 2842
 				// Did user actually select any plugins to activate ?
2843
-				if ( empty( $_POST['plugin'] ) ) {
2843
+				if ( empty( $_POST[ 'plugin' ] ) ) {
2844 2844
 					echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'tgmpa' ), '</p></div>';
2845 2845
 
2846 2846
 					return false;
@@ -2848,8 +2848,8 @@  discard block
 block discarded – undo
2848 2848
 
2849 2849
 				// Grab plugin data from $_POST.
2850 2850
 				$plugins = array();
2851
-				if ( isset( $_POST['plugin'] ) ) {
2852
-					$plugins = array_map( 'urldecode', (array) $_POST['plugin'] );
2851
+				if ( isset( $_POST[ 'plugin' ] ) ) {
2852
+					$plugins = array_map( 'urldecode', (array) $_POST[ 'plugin' ] );
2853 2853
 					$plugins = array_map( array( $this->tgmpa, 'sanitize_key' ), $plugins );
2854 2854
 				}
2855 2855
 
@@ -2859,8 +2859,8 @@  discard block
 block discarded – undo
2859 2859
 				// Grab the file paths for the selected & inactive plugins from the registration array.
2860 2860
 				foreach ( $plugins as $slug ) {
2861 2861
 					if ( $this->tgmpa->can_plugin_activate( $slug ) ) {
2862
-						$plugins_to_activate[] = $this->tgmpa->plugins[ $slug ]['file_path'];
2863
-						$plugin_names[]        = $this->tgmpa->plugins[ $slug ]['name'];
2862
+						$plugins_to_activate[ ] = $this->tgmpa->plugins[ $slug ][ 'file_path' ];
2863
+						$plugin_names[ ]        = $this->tgmpa->plugins[ $slug ][ 'name' ];
2864 2864
 					}
2865 2865
 				}
2866 2866
 				unset( $slug );
@@ -2881,7 +2881,7 @@  discard block
 block discarded – undo
2881 2881
 					$count        = count( $plugin_names ); // Count so we can use _n function.
2882 2882
 					$plugin_names = array_map( array( 'TGMPA_Utils', 'wrap_in_strong' ), $plugin_names );
2883 2883
 					$last_plugin  = array_pop( $plugin_names ); // Pop off last name to prep for readability.
2884
-					$imploded     = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ) . ' ' . $last_plugin );
2884
+					$imploded     = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ).' '.esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ).' '.$last_plugin );
2885 2885
 
2886 2886
 					printf( // WPCS: xss ok.
2887 2887
 						'<div id="message" class="updated"><p>%1$s %2$s.</p></div>',
@@ -2984,16 +2984,16 @@  discard block
 block discarded – undo
2984 2984
 	 */
2985 2985
 	function tgmpa_load_bulk_installer() {
2986 2986
 		// Silently fail if 2.5+ is loaded *after* an older version.
2987
-		if ( ! isset( $GLOBALS['tgmpa'] ) ) {
2987
+		if ( ! isset( $GLOBALS[ 'tgmpa' ] ) ) {
2988 2988
 			return;
2989 2989
 		}
2990 2990
 
2991 2991
 		// Get TGMPA class instance.
2992
-		$tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
2992
+		$tgmpa_instance = call_user_func( array( get_class( $GLOBALS[ 'tgmpa' ] ), 'get_instance' ) );
2993 2993
 
2994
-		if ( isset( $_GET['page'] ) && $tgmpa_instance->menu === $_GET['page'] ) {
2994
+		if ( isset( $_GET[ 'page' ] ) && $tgmpa_instance->menu === $_GET[ 'page' ] ) {
2995 2995
 			if ( ! class_exists( 'Plugin_Upgrader', false ) ) {
2996
-				require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
2996
+				require_once ABSPATH.'wp-admin/includes/class-wp-upgrader.php';
2997 2997
 			}
2998 2998
 
2999 2999
 			if ( ! class_exists( 'TGMPA_Bulk_Installer' ) ) {
@@ -3060,11 +3060,11 @@  discard block
 block discarded – undo
3060 3060
 					 */
3061 3061
 					public function __construct( $skin = null ) {
3062 3062
 						// Get TGMPA class instance.
3063
-						$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
3063
+						$this->tgmpa = call_user_func( array( get_class( $GLOBALS[ 'tgmpa' ] ), 'get_instance' ) );
3064 3064
 
3065 3065
 						parent::__construct( $skin );
3066 3066
 
3067
-						if ( isset( $this->skin->options['install_type'] ) && 'update' === $this->skin->options['install_type'] ) {
3067
+						if ( isset( $this->skin->options[ 'install_type' ] ) && 'update' === $this->skin->options[ 'install_type' ] ) {
3068 3068
 							$this->clear_destination = true;
3069 3069
 						}
3070 3070
 
@@ -3081,8 +3081,8 @@  discard block
 block discarded – undo
3081 3081
 					 * @since 2.2.0
3082 3082
 					 */
3083 3083
 					public function activate_strings() {
3084
-						$this->strings['activation_failed']  = __( 'Plugin activation failed.', 'tgmpa' );
3085
-						$this->strings['activation_success'] = __( 'Plugin activated successfully.', 'tgmpa' );
3084
+						$this->strings[ 'activation_failed' ]  = __( 'Plugin activation failed.', 'tgmpa' );
3085
+						$this->strings[ 'activation_success' ] = __( 'Plugin activated successfully.', 'tgmpa' );
3086 3086
 					}
3087 3087
 
3088 3088
 					/**
@@ -3100,7 +3100,7 @@  discard block
 block discarded – undo
3100 3100
 
3101 3101
 						// Reset the strings in case we changed one during automatic activation.
3102 3102
 						if ( $this->tgmpa->is_automatic ) {
3103
-							if ( 'update' === $this->skin->options['install_type'] ) {
3103
+							if ( 'update' === $this->skin->options[ 'install_type' ] ) {
3104 3104
 								$this->upgrade_strings();
3105 3105
 							} else {
3106 3106
 								$this->install_strings();
@@ -3258,7 +3258,7 @@  discard block
 block discarded – undo
3258 3258
 						remove_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 );
3259 3259
 
3260 3260
 						// Force refresh of plugin update information.
3261
-						wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
3261
+						wp_clean_plugins_cache( $parsed_args[ 'clear_update_cache' ] );
3262 3262
 
3263 3263
 						return $results;
3264 3264
 					}
@@ -3309,13 +3309,13 @@  discard block
 block discarded – undo
3309 3309
 								$activate = activate_plugin( $plugin_info );
3310 3310
 
3311 3311
 								// Adjust the success string based on the activation result.
3312
-								$this->strings['process_success'] = $this->strings['process_success'] . "<br />\n";
3312
+								$this->strings[ 'process_success' ] = $this->strings[ 'process_success' ]."<br />\n";
3313 3313
 
3314 3314
 								if ( is_wp_error( $activate ) ) {
3315 3315
 									$this->skin->error( $activate );
3316
-									$this->strings['process_success'] .= $this->strings['activation_failed'];
3316
+									$this->strings[ 'process_success' ] .= $this->strings[ 'activation_failed' ];
3317 3317
 								} else {
3318
-									$this->strings['process_success'] .= $this->strings['activation_success'];
3318
+									$this->strings[ 'process_success' ] .= $this->strings[ 'activation_success' ];
3319 3319
 								}
3320 3320
 							}
3321 3321
 						}
@@ -3391,7 +3391,7 @@  discard block
 block discarded – undo
3391 3391
 					 */
3392 3392
 					public function __construct( $args = array() ) {
3393 3393
 						// Get TGMPA class instance.
3394
-						$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
3394
+						$this->tgmpa = call_user_func( array( get_class( $GLOBALS[ 'tgmpa' ] ), 'get_instance' ) );
3395 3395
 
3396 3396
 						// Parse default and new args.
3397 3397
 						$defaults = array(
@@ -3400,10 +3400,10 @@  discard block
 block discarded – undo
3400 3400
 							'names'        => array(),
3401 3401
 							'install_type' => 'install',
3402 3402
 						);
3403
-						$args     = wp_parse_args( $args, $defaults );
3403
+						$args = wp_parse_args( $args, $defaults );
3404 3404
 
3405 3405
 						// Set plugin names to $this->plugin_names property.
3406
-						$this->plugin_names = $args['names'];
3406
+						$this->plugin_names = $args[ 'names' ];
3407 3407
 
3408 3408
 						// Extract the new args.
3409 3409
 						parent::__construct( $args );
@@ -3418,25 +3418,25 @@  discard block
 block discarded – undo
3418 3418
 					 * @since 2.2.0
3419 3419
 					 */
3420 3420
 					public function add_strings() {
3421
-						if ( 'update' === $this->options['install_type'] ) {
3421
+						if ( 'update' === $this->options[ 'install_type' ] ) {
3422 3422
 							parent::add_strings();
3423
-							$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3423
+							$this->upgrader->strings[ 'skin_before_update_header' ] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3424 3424
 						} else {
3425
-							$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa' );
3426
-							$this->upgrader->strings['skin_update_failed']       = __( 'The installation of %1$s failed.', 'tgmpa' );
3425
+							$this->upgrader->strings[ 'skin_update_failed_error' ] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa' );
3426
+							$this->upgrader->strings[ 'skin_update_failed' ]       = __( 'The installation of %1$s failed.', 'tgmpa' );
3427 3427
 
3428 3428
 							if ( $this->tgmpa->is_automatic ) {
3429 3429
 								// Automatic activation strings.
3430
-								$this->upgrader->strings['skin_upgrade_start']        = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
3431
-								$this->upgrader->strings['skin_update_successful']    = __( '%1$s installed and activated successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
3432
-								$this->upgrader->strings['skin_upgrade_end']          = __( 'All installations and activations have been completed.', 'tgmpa' );
3433
-								$this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3430
+								$this->upgrader->strings[ 'skin_upgrade_start' ]        = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
3431
+								$this->upgrader->strings[ 'skin_update_successful' ]    = __( '%1$s installed and activated successfully.', 'tgmpa' ).' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>'.esc_html__( 'Show Details', 'tgmpa' ).'</span><span class="hidden">'.esc_html__( 'Hide Details', 'tgmpa' ).'</span>.</a>';
3432
+								$this->upgrader->strings[ 'skin_upgrade_end' ]          = __( 'All installations and activations have been completed.', 'tgmpa' );
3433
+								$this->upgrader->strings[ 'skin_before_update_header' ] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3434 3434
 							} else {
3435 3435
 								// Default installation strings.
3436
-								$this->upgrader->strings['skin_upgrade_start']        = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
3437
-								$this->upgrader->strings['skin_update_successful']    = esc_html__( '%1$s installed successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
3438
-								$this->upgrader->strings['skin_upgrade_end']          = __( 'All installations have been completed.', 'tgmpa' );
3439
-								$this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3436
+								$this->upgrader->strings[ 'skin_upgrade_start' ]        = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
3437
+								$this->upgrader->strings[ 'skin_update_successful' ]    = esc_html__( '%1$s installed successfully.', 'tgmpa' ).' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>'.esc_html__( 'Show Details', 'tgmpa' ).'</span><span class="hidden">'.esc_html__( 'Hide Details', 'tgmpa' ).'</span>.</a>';
3438
+								$this->upgrader->strings[ 'skin_upgrade_end' ]          = __( 'All installations have been completed.', 'tgmpa' );
3439
+								$this->upgrader->strings[ 'skin_before_update_header' ] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
3440 3440
 							}
3441 3441
 						}
3442 3442
 					}
@@ -3494,12 +3494,12 @@  discard block
 block discarded – undo
3494 3494
 						if ( $this->tgmpa->is_tgmpa_complete() ) {
3495 3495
 							// All plugins are active, so we display the complete string and hide the menu to protect users.
3496 3496
 							echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
3497
-							$update_actions['dashboard'] = sprintf(
3498
-								esc_html( $this->tgmpa->strings['complete'] ),
3499
-								'<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'tgmpa' ) . '</a>'
3497
+							$update_actions[ 'dashboard' ] = sprintf(
3498
+								esc_html( $this->tgmpa->strings[ 'complete' ] ),
3499
+								'<a href="'.esc_url( self_admin_url() ).'">'.esc_html__( 'Return to the Dashboard', 'tgmpa' ).'</a>'
3500 3500
 							);
3501 3501
 						} else {
3502
-							$update_actions['tgmpa_page'] = '<a href="' . esc_url( $this->tgmpa->get_tgmpa_url() ) . '" target="_parent">' . esc_html( $this->tgmpa->strings['return'] ) . '</a>';
3502
+							$update_actions[ 'tgmpa_page' ] = '<a href="'.esc_url( $this->tgmpa->get_tgmpa_url() ).'" target="_parent">'.esc_html( $this->tgmpa->strings[ 'return' ] ).'</a>';
3503 3503
 						}
3504 3504
 
3505 3505
 						/**
@@ -3589,7 +3589,7 @@  discard block
 block discarded – undo
3589 3589
 		 * @return string
3590 3590
 		 */
3591 3591
 		public static function wrap_in_em( $string ) {
3592
-			return '<em>' . wp_kses_post( $string ) . '</em>';
3592
+			return '<em>'.wp_kses_post( $string ).'</em>';
3593 3593
 		}
3594 3594
 
3595 3595
 		/**
@@ -3603,7 +3603,7 @@  discard block
 block discarded – undo
3603 3603
 		 * @return string
3604 3604
 		 */
3605 3605
 		public static function wrap_in_strong( $string ) {
3606
-			return '<strong>' . wp_kses_post( $string ) . '</strong>';
3606
+			return '<strong>'.wp_kses_post( $string ).'</strong>';
3607 3607
 		}
3608 3608
 
3609 3609
 		/**
@@ -3640,7 +3640,7 @@  discard block
 block discarded – undo
3640 3640
 		 */
3641 3641
 		protected static function emulate_filter_bool( $value ) {
3642 3642
 			// @codingStandardsIgnoreStart
3643
-			static $true  = array(
3643
+			static $true = array(
3644 3644
 				'1',
3645 3645
 				'true', 'True', 'TRUE',
3646 3646
 				'y', 'Y',
Please login to merge, or discard this patch.
example.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file represents an example of the code that themes would use to register
4
- * the required plugins.
5
- *
6
- * It is expected that theme authors would copy and paste this code into their
7
- * functions.php file, and amend to suit.
8
- *
9
- * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
10
- *
11
- * @package    TGM-Plugin-Activation
12
- * @subpackage Example
13
- * @version    2.5.2
14
- * @author     Thomas Griffin, Gary Jones, Juliette Reinders Folmer
15
- * @copyright  Copyright (c) 2011, Thomas Griffin
16
- * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
17
- * @link       https://github.com/TGMPA/TGM-Plugin-Activation
18
- */
3
+	 * This file represents an example of the code that themes would use to register
4
+	 * the required plugins.
5
+	 *
6
+	 * It is expected that theme authors would copy and paste this code into their
7
+	 * functions.php file, and amend to suit.
8
+	 *
9
+	 * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
10
+	 *
11
+	 * @package    TGM-Plugin-Activation
12
+	 * @subpackage Example
13
+	 * @version    2.5.2
14
+	 * @author     Thomas Griffin, Gary Jones, Juliette Reinders Folmer
15
+	 * @copyright  Copyright (c) 2011, Thomas Griffin
16
+	 * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
17
+	 * @link       https://github.com/TGMPA/TGM-Plugin-Activation
18
+	 */
19 19
 
20 20
 /**
21 21
  * Include the TGM_Plugin_Activation class.
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 /**
21 21
  * Include the TGM_Plugin_Activation class.
22 22
  */
23
-require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
23
+require_once dirname( __FILE__ ).'/class-tgm-plugin-activation.php';
24 24
 
25 25
 add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );
26 26
 /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		array(
49 49
 			'name'               => 'TGM Example Plugin', // The plugin name.
50 50
 			'slug'               => 'tgm-example-plugin', // The plugin slug (typically the folder name).
51
-			'source'             => get_stylesheet_directory() . '/lib/plugins/tgm-example-plugin.zip', // The plugin source.
51
+			'source'             => get_stylesheet_directory().'/lib/plugins/tgm-example-plugin.zip', // The plugin source.
52 52
 			'required'           => true, // If false, the plugin is only 'recommended' instead of required.
53 53
 			'version'            => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin.
54 54
 			'force_activation'   => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.
@@ -106,16 +106,16 @@  discard block
 block discarded – undo
106 106
 	 * Only uncomment the strings in the config array if you want to customize the strings.
107 107
 	 */
108 108
 	$config = array(
109
-		'id'           => 'tgmpa',                 // Unique ID for hashing notices for multiple instances of TGMPA.
110
-		'default_path' => '',                      // Default absolute path to bundled plugins.
109
+		'id'           => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.
110
+		'default_path' => '', // Default absolute path to bundled plugins.
111 111
 		'menu'         => 'tgmpa-install-plugins', // Menu slug.
112
-		'parent_slug'  => 'themes.php',            // Parent menu slug.
113
-		'capability'   => 'edit_theme_options',    // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
114
-		'has_notices'  => true,                    // Show admin notices or not.
115
-		'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
116
-		'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
117
-		'is_automatic' => false,                   // Automatically activate plugins after installation or not.
118
-		'message'      => '',                      // Message to output right before the plugins table.
112
+		'parent_slug'  => 'themes.php', // Parent menu slug.
113
+		'capability'   => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
114
+		'has_notices'  => true, // Show admin notices or not.
115
+		'dismissable'  => true, // If false, a user cannot dismiss the nag message.
116
+		'dismiss_msg'  => '', // If 'dismissable' is false, this message will be output at top of nag.
117
+		'is_automatic' => false, // Automatically activate plugins after installation or not.
118
+		'message'      => '', // Message to output right before the plugins table.
119 119
 
120 120
 		/*
121 121
 		'strings'      => array(
Please login to merge, or discard this patch.