| @@ -704,11 +704,11 @@ discard block | ||
| 704 | 704 | $args = apply_filters( | 
| 705 | 705 | 'tgmpa_admin_menu_args', | 
| 706 | 706 | array( | 
| 707 | - 'parent_slug' => $this->parent_slug, // Parent Menu slug. | |
| 708 | - 'page_title' => $this->strings['page_title'], // Page title. | |
| 709 | - 'menu_title' => $this->strings['menu_title'], // Menu title. | |
| 710 | - 'capability' => $this->capability, // Capability. | |
| 711 | - 'menu_slug' => $this->menu, // Menu slug. | |
| 707 | + 'parent_slug' => $this->parent_slug, // Parent Menu slug. | |
| 708 | + 'page_title' => $this->strings['page_title'], // Page title. | |
| 709 | + 'menu_title' => $this->strings['menu_title'], // Menu title. | |
| 710 | + 'capability' => $this->capability, // Capability. | |
| 711 | + 'menu_slug' => $this->menu, // Menu slug. | |
| 712 | 712 | 'function' => array( $this, 'install_plugins_page' ), // Callback. | 
| 713 | 713 | ) | 
| 714 | 714 | ); | 
| @@ -810,7 +810,7 @@ discard block | ||
| 810 | 810 | // All plugin information will be stored in an array for processing. | 
| 811 | 811 | $slug = $this->sanitize_key( urldecode( $_GET['plugin'] ) ); | 
| 812 | 812 | |
| 813 | -			if ( ! isset( $this->plugins[ $slug ] ) ) { | |
| 813 | +			if ( ! isset( $this->plugins[$slug] ) ) { | |
| 814 | 814 | return false; | 
| 815 | 815 | } | 
| 816 | 816 | |
| @@ -855,7 +855,7 @@ discard block | ||
| 855 | 855 | $extra = array(); | 
| 856 | 856 | $extra['slug'] = $slug; // Needed for potentially renaming of directory name. | 
| 857 | 857 | $source = $this->get_download_url( $slug ); | 
| 858 | - $api = ( 'repo' === $this->plugins[ $slug ]['source_type'] ) ? $this->get_plugins_api( $slug ) : null; | |
| 858 | + $api = ( 'repo' === $this->plugins[$slug]['source_type'] ) ? $this->get_plugins_api( $slug ) : null; | |
| 859 | 859 | $api = ( false !== $api ) ? $api : null; | 
| 860 | 860 | |
| 861 | 861 | $url = add_query_arg( | 
| @@ -872,8 +872,8 @@ discard block | ||
| 872 | 872 | |
| 873 | 873 | $title = ( 'update' === $install_type ) ? $this->strings['updating'] : $this->strings['installing']; | 
| 874 | 874 | $skin_args = array( | 
| 875 | - 'type' => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload', | |
| 876 | - 'title' => sprintf( $title, $this->plugins[ $slug ]['name'] ), | |
| 875 | + 'type' => ( 'bundled' !== $this->plugins[$slug]['source_type'] ) ? 'web' : 'upload', | |
| 876 | + 'title' => sprintf( $title, $this->plugins[$slug]['name'] ), | |
| 877 | 877 | 'url' => esc_url_raw( $url ), | 
| 878 | 878 | 'nonce' => $install_type . '-plugin_' . $slug, | 
| 879 | 879 | 'plugin' => '', | 
| @@ -883,7 +883,7 @@ discard block | ||
| 883 | 883 | unset( $title ); | 
| 884 | 884 | |
| 885 | 885 |  				if ( 'update' === $install_type ) { | 
| 886 | - $skin_args['plugin'] = $this->plugins[ $slug ]['file_path']; | |
| 886 | + $skin_args['plugin'] = $this->plugins[$slug]['file_path']; | |
| 887 | 887 | $skin = new Plugin_Upgrader_Skin( $skin_args ); | 
| 888 | 888 |  				} else { | 
| 889 | 889 | $skin = new Plugin_Installer_Skin( $skin_args ); | 
| @@ -898,12 +898,12 @@ discard block | ||
| 898 | 898 |  				if ( 'update' === $install_type ) { | 
| 899 | 899 | // Inject our info into the update transient. | 
| 900 | 900 | $to_inject = array( | 
| 901 | - $slug => $this->plugins[ $slug ], | |
| 901 | + $slug => $this->plugins[$slug], | |
| 902 | 902 | ); | 
| 903 | - $to_inject[ $slug ]['source'] = $source; | |
| 903 | + $to_inject[$slug]['source'] = $source; | |
| 904 | 904 | $this->inject_update_info( $to_inject ); | 
| 905 | 905 | |
| 906 | - $upgrader->upgrade( $this->plugins[ $slug ]['file_path'] ); | |
| 906 | + $upgrader->upgrade( $this->plugins[$slug]['file_path'] ); | |
| 907 | 907 |  				} else { | 
| 908 | 908 | $upgrader->install( $source ); | 
| 909 | 909 | } | 
| @@ -933,11 +933,11 @@ discard block | ||
| 933 | 933 | } | 
| 934 | 934 | |
| 935 | 935 | return true; | 
| 936 | -			} elseif ( isset( $this->plugins[ $slug ]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) { | |
| 936 | +			} elseif ( isset( $this->plugins[$slug]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) { | |
| 937 | 937 | // Activate action link was clicked. | 
| 938 | 938 | check_admin_referer( 'tgmpa-activate', 'tgmpa-nonce' ); | 
| 939 | 939 | |
| 940 | -				if ( false === $this->activate_single_plugin( $this->plugins[ $slug ]['file_path'], $slug ) ) { | |
| 940 | +				if ( false === $this->activate_single_plugin( $this->plugins[$slug]['file_path'], $slug ) ) { | |
| 941 | 941 | return true; // Finish execution of the function early as we encountered an error. | 
| 942 | 942 | } | 
| 943 | 943 | } | 
| @@ -962,17 +962,17 @@ discard block | ||
| 962 | 962 |  			foreach ( $plugins as $slug => $plugin ) { | 
| 963 | 963 | $file_path = $plugin['file_path']; | 
| 964 | 964 | |
| 965 | -				if ( empty( $repo_updates->response[ $file_path ] ) ) { | |
| 966 | - $repo_updates->response[ $file_path ] = new stdClass(); | |
| 965 | +				if ( empty( $repo_updates->response[$file_path] ) ) { | |
| 966 | + $repo_updates->response[$file_path] = new stdClass(); | |
| 967 | 967 | } | 
| 968 | 968 | |
| 969 | 969 | // We only really need to set package, but let's do all we can in case WP changes something. | 
| 970 | - $repo_updates->response[ $file_path ]->slug = $slug; | |
| 971 | - $repo_updates->response[ $file_path ]->plugin = $file_path; | |
| 972 | - $repo_updates->response[ $file_path ]->new_version = $plugin['version']; | |
| 973 | - $repo_updates->response[ $file_path ]->package = $plugin['source']; | |
| 974 | -				if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin['external_url'] ) ) { | |
| 975 | - $repo_updates->response[ $file_path ]->url = $plugin['external_url']; | |
| 970 | + $repo_updates->response[$file_path]->slug = $slug; | |
| 971 | + $repo_updates->response[$file_path]->plugin = $file_path; | |
| 972 | + $repo_updates->response[$file_path]->new_version = $plugin['version']; | |
| 973 | + $repo_updates->response[$file_path]->package = $plugin['source']; | |
| 974 | +				if ( empty( $repo_updates->response[$file_path]->url ) && ! empty( $plugin['external_url'] ) ) { | |
| 975 | + $repo_updates->response[$file_path]->url = $plugin['external_url']; | |
| 976 | 976 | } | 
| 977 | 977 | } | 
| 978 | 978 | |
| @@ -1015,7 +1015,7 @@ discard block | ||
| 1015 | 1015 |  			} else { | 
| 1016 | 1016 | // Bulk installer contains less info, so fall back on the info registered here. | 
| 1017 | 1017 |  				foreach ( $this->plugins as $slug => $plugin ) { | 
| 1018 | -					if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin['name'] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) { | |
| 1018 | +					if ( ! empty( $upgrader->skin->plugin_names[$upgrader->skin->i] ) && $plugin['name'] === $upgrader->skin->plugin_names[$upgrader->skin->i] ) { | |
| 1019 | 1019 | $desired_slug = $slug; | 
| 1020 | 1020 | break; | 
| 1021 | 1021 | } | 
| @@ -1082,7 +1082,7 @@ discard block | ||
| 1082 | 1082 | // Make sure message doesn't display again if bulk activation is performed | 
| 1083 | 1083 | // immediately after a single activation. | 
| 1084 | 1084 |  						if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. | 
| 1085 | - echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>'; | |
| 1085 | + echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[$slug]['name'] ), '.</strong></p></div>'; | |
| 1086 | 1086 | } | 
| 1087 | 1087 |  					} else { | 
| 1088 | 1088 | // Simpler message layout for use on the plugin install page. | 
| @@ -1095,7 +1095,7 @@ discard block | ||
| 1095 | 1095 | echo '<div id="message" class="error"><p>', | 
| 1096 | 1096 | sprintf( | 
| 1097 | 1097 | esc_html( $this->strings['plugin_already_active'] ), | 
| 1098 | - '<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>' | |
| 1098 | + '<strong>' . esc_html( $this->plugins[$slug]['name'] ) . '</strong>' | |
| 1099 | 1099 | ), | 
| 1100 | 1100 | '</p></div>'; | 
| 1101 | 1101 |  			} elseif ( $this->does_plugin_require_update( $slug ) ) { | 
| @@ -1106,13 +1106,13 @@ discard block | ||
| 1106 | 1106 | echo '<div id="message" class="error"><p>', | 
| 1107 | 1107 | sprintf( | 
| 1108 | 1108 | esc_html( $this->strings['plugin_needs_higher_version'] ), | 
| 1109 | - '<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>' | |
| 1109 | + '<strong>' . esc_html( $this->plugins[$slug]['name'] ) . '</strong>' | |
| 1110 | 1110 | ), | 
| 1111 | 1111 | '</p></div>'; | 
| 1112 | 1112 | } | 
| 1113 | 1113 |  				} else { | 
| 1114 | 1114 | // Simpler message layout for use on the plugin install page. | 
| 1115 | - echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>'; | |
| 1115 | + echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[$slug]['name'] ) ), '</p>'; | |
| 1116 | 1116 | } | 
| 1117 | 1117 | } | 
| 1118 | 1118 | |
| @@ -1154,7 +1154,7 @@ discard block | ||
| 1154 | 1154 | continue; | 
| 1155 | 1155 | } | 
| 1156 | 1156 | |
| 1157 | -				if(false === $plugin['has_notices']){ | |
| 1157 | +				if ( false === $plugin['has_notices'] ) { | |
| 1158 | 1158 | continue; | 
| 1159 | 1159 | } | 
| 1160 | 1160 | |
| @@ -1243,7 +1243,7 @@ discard block | ||
| 1243 | 1243 | $rendered .= sprintf( | 
| 1244 | 1244 | $line_template, | 
| 1245 | 1245 | sprintf( | 
| 1246 | - translate_nooped_plural( $this->strings[ $type ], $count, 'tgmpa' ), | |
| 1246 | + translate_nooped_plural( $this->strings[$type], $count, 'tgmpa' ), | |
| 1247 | 1247 | $imploded, | 
| 1248 | 1248 | $count | 
| 1249 | 1249 | ) | 
| @@ -1360,7 +1360,7 @@ discard block | ||
| 1360 | 1360 | |
| 1361 | 1361 |  			foreach ( (array) $wp_settings_errors as $key => $details ) { | 
| 1362 | 1362 |  				if ( 'tgmpa' === $details['setting'] ) { | 
| 1363 | - unset( $wp_settings_errors[ $key ] ); | |
| 1363 | + unset( $wp_settings_errors[$key] ); | |
| 1364 | 1364 | break; | 
| 1365 | 1365 | } | 
| 1366 | 1366 | } | 
| @@ -1396,21 +1396,21 @@ discard block | ||
| 1396 | 1396 | return; | 
| 1397 | 1397 | } | 
| 1398 | 1398 | |
| 1399 | -			if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[ $plugin['slug'] ] ) ) { | |
| 1399 | +			if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[$plugin['slug']] ) ) { | |
| 1400 | 1400 | return; | 
| 1401 | 1401 | } | 
| 1402 | 1402 | |
| 1403 | 1403 | $defaults = array( | 
| 1404 | - 'name' => '', // String. | |
| 1405 | - 'slug' => '', // String. | |
| 1406 | - 'source' => 'repo', // String. | |
| 1407 | - 'required' => false, // Boolean. | |
| 1408 | - 'version' => '', // String. | |
| 1409 | - 'force_activation' => false, // Boolean. | |
| 1410 | - 'force_deactivation' => false, // Boolean. | |
| 1411 | - 'external_url' => '', // String. | |
| 1412 | - 'is_callable' => '', // String|Array. | |
| 1413 | - 'has_notices' => true, // Boolean. | |
| 1404 | + 'name' => '', // String. | |
| 1405 | + 'slug' => '', // String. | |
| 1406 | + 'source' => 'repo', // String. | |
| 1407 | + 'required' => false, // Boolean. | |
| 1408 | + 'version' => '', // String. | |
| 1409 | + 'force_activation' => false, // Boolean. | |
| 1410 | + 'force_deactivation' => false, // Boolean. | |
| 1411 | + 'external_url' => '', // String. | |
| 1412 | + 'is_callable' => '', // String|Array. | |
| 1413 | + 'has_notices' => true, // Boolean. | |
| 1414 | 1414 | ); | 
| 1415 | 1415 | |
| 1416 | 1416 | // Prepare the received data. | 
| @@ -1432,8 +1432,8 @@ discard block | ||
| 1432 | 1432 | $plugin['source_type'] = $this->get_plugin_source_type( $plugin['source'] ); | 
| 1433 | 1433 | |
| 1434 | 1434 | // Set the class properties. | 
| 1435 | - $this->plugins[ $plugin['slug'] ] = $plugin; | |
| 1436 | - $this->sort_order[ $plugin['slug'] ] = $plugin['name']; | |
| 1435 | + $this->plugins[$plugin['slug']] = $plugin; | |
| 1436 | + $this->sort_order[$plugin['slug']] = $plugin['name']; | |
| 1437 | 1437 | |
| 1438 | 1438 | // Should we add the force activation hook ? | 
| 1439 | 1439 |  			if ( true === $plugin['force_activation'] ) { | 
| @@ -1517,11 +1517,11 @@ discard block | ||
| 1517 | 1517 | ); | 
| 1518 | 1518 | |
| 1519 | 1519 |  			foreach ( $keys as $key ) { | 
| 1520 | -				if ( isset( $config[ $key ] ) ) { | |
| 1521 | -					if ( is_array( $config[ $key ] ) ) { | |
| 1522 | - $this->$key = array_merge( $this->$key, $config[ $key ] ); | |
| 1520 | +				if ( isset( $config[$key] ) ) { | |
| 1521 | +					if ( is_array( $config[$key] ) ) { | |
| 1522 | + $this->$key = array_merge( $this->$key, $config[$key] ); | |
| 1523 | 1523 |  					} else { | 
| 1524 | - $this->$key = $config[ $key ]; | |
| 1524 | + $this->$key = $config[$key]; | |
| 1525 | 1525 | } | 
| 1526 | 1526 | } | 
| 1527 | 1527 | } | 
| @@ -1566,12 +1566,12 @@ discard block | ||
| 1566 | 1566 | * Parameter added in v2.5.0. | 
| 1567 | 1567 | */ | 
| 1568 | 1568 |  		public function populate_file_path( $plugin_slug = '' ) { | 
| 1569 | -			if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[ $plugin_slug ] ) ) { | |
| 1570 | - $this->plugins[ $plugin_slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug ); | |
| 1569 | +			if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[$plugin_slug] ) ) { | |
| 1570 | + $this->plugins[$plugin_slug]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug ); | |
| 1571 | 1571 |  			} else { | 
| 1572 | 1572 | // Add file_path key for all plugins. | 
| 1573 | 1573 |  				foreach ( $this->plugins as $slug => $values ) { | 
| 1574 | - $this->plugins[ $slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $slug ); | |
| 1574 | + $this->plugins[$slug]['file_path'] = $this->_get_plugin_basename_from_slug( $slug ); | |
| 1575 | 1575 | } | 
| 1576 | 1576 | } | 
| 1577 | 1577 | } | 
| @@ -1611,8 +1611,8 @@ discard block | ||
| 1611 | 1611 | */ | 
| 1612 | 1612 |  		public function _get_plugin_data_from_name( $name, $data = 'slug' ) { | 
| 1613 | 1613 |  			foreach ( $this->plugins as $values ) { | 
| 1614 | -				if ( $name === $values['name'] && isset( $values[ $data ] ) ) { | |
| 1615 | - return $values[ $data ]; | |
| 1614 | +				if ( $name === $values['name'] && isset( $values[$data] ) ) { | |
| 1615 | + return $values[$data]; | |
| 1616 | 1616 | } | 
| 1617 | 1617 | } | 
| 1618 | 1618 | |
| @@ -1630,13 +1630,13 @@ discard block | ||
| 1630 | 1630 |  		public function get_download_url( $slug ) { | 
| 1631 | 1631 | $dl_source = ''; | 
| 1632 | 1632 | |
| 1633 | -			switch ( $this->plugins[ $slug ]['source_type'] ) { | |
| 1633 | +			switch ( $this->plugins[$slug]['source_type'] ) { | |
| 1634 | 1634 | case 'repo': | 
| 1635 | 1635 | return $this->get_wp_repo_download_url( $slug ); | 
| 1636 | 1636 | case 'external': | 
| 1637 | - return $this->plugins[ $slug ]['source']; | |
| 1637 | + return $this->plugins[$slug]['source']; | |
| 1638 | 1638 | case 'bundled': | 
| 1639 | - return $this->default_path . $this->plugins[ $slug ]['source']; | |
| 1639 | + return $this->default_path . $this->plugins[$slug]['source']; | |
| 1640 | 1640 | } | 
| 1641 | 1641 | |
| 1642 | 1642 | return $dl_source; // Should never happen. | 
| @@ -1672,7 +1672,7 @@ discard block | ||
| 1672 | 1672 |  		protected function get_plugins_api( $slug ) { | 
| 1673 | 1673 | static $api = array(); // Cache received responses. | 
| 1674 | 1674 | |
| 1675 | -			if ( ! isset( $api[ $slug ] ) ) { | |
| 1675 | +			if ( ! isset( $api[$slug] ) ) { | |
| 1676 | 1676 |  				if ( ! function_exists( 'plugins_api' ) ) { | 
| 1677 | 1677 | require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; | 
| 1678 | 1678 | } | 
| @@ -1687,16 +1687,16 @@ discard block | ||
| 1687 | 1687 | ) | 
| 1688 | 1688 | ); | 
| 1689 | 1689 | |
| 1690 | - $api[ $slug ] = false; | |
| 1690 | + $api[$slug] = false; | |
| 1691 | 1691 | |
| 1692 | 1692 |  				if ( is_wp_error( $response ) ) { | 
| 1693 | 1693 | wp_die( esc_html( $this->strings['oops'] ) ); | 
| 1694 | 1694 |  				} else { | 
| 1695 | - $api[ $slug ] = $response; | |
| 1695 | + $api[$slug] = $response; | |
| 1696 | 1696 | } | 
| 1697 | 1697 | } | 
| 1698 | 1698 | |
| 1699 | - return $api[ $slug ]; | |
| 1699 | + return $api[$slug]; | |
| 1700 | 1700 | } | 
| 1701 | 1701 | |
| 1702 | 1702 | /** | 
| @@ -1709,13 +1709,13 @@ discard block | ||
| 1709 | 1709 | * or the plugin name if not. | 
| 1710 | 1710 | */ | 
| 1711 | 1711 |  		public function get_info_link( $slug ) { | 
| 1712 | -			if ( ! empty( $this->plugins[ $slug ]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ]['external_url'] ) ) { | |
| 1712 | +			if ( ! empty( $this->plugins[$slug]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[$slug]['external_url'] ) ) { | |
| 1713 | 1713 | $link = sprintf( | 
| 1714 | 1714 | '<a href="%1$s" target="_blank">%2$s</a>', | 
| 1715 | - esc_url( $this->plugins[ $slug ]['external_url'] ), | |
| 1716 | - esc_html( $this->plugins[ $slug ]['name'] ) | |
| 1715 | + esc_url( $this->plugins[$slug]['external_url'] ), | |
| 1716 | + esc_html( $this->plugins[$slug]['name'] ) | |
| 1717 | 1717 | ); | 
| 1718 | -			} elseif ( 'repo' === $this->plugins[ $slug ]['source_type'] ) { | |
| 1718 | +			} elseif ( 'repo' === $this->plugins[$slug]['source_type'] ) { | |
| 1719 | 1719 | $url = add_query_arg( | 
| 1720 | 1720 | array( | 
| 1721 | 1721 | 'tab' => 'plugin-information', | 
| @@ -1730,10 +1730,10 @@ discard block | ||
| 1730 | 1730 | $link = sprintf( | 
| 1731 | 1731 | '<a href="%1$s" class="thickbox">%2$s</a>', | 
| 1732 | 1732 | esc_url( $url ), | 
| 1733 | - esc_html( $this->plugins[ $slug ]['name'] ) | |
| 1733 | + esc_html( $this->plugins[$slug]['name'] ) | |
| 1734 | 1734 | ); | 
| 1735 | 1735 |  			} else { | 
| 1736 | - $link = esc_html( $this->plugins[ $slug ]['name'] ); // No hyperlink. | |
| 1736 | + $link = esc_html( $this->plugins[$slug]['name'] ); // No hyperlink. | |
| 1737 | 1737 | } | 
| 1738 | 1738 | |
| 1739 | 1739 | return $link; | 
| @@ -1858,7 +1858,7 @@ discard block | ||
| 1858 | 1858 |  		public function is_plugin_installed( $slug ) { | 
| 1859 | 1859 | $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached). | 
| 1860 | 1860 | |
| 1861 | - return ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ] ) ); | |
| 1861 | + return ( ! empty( $installed_plugins[$this->plugins[$slug]['file_path']] ) ); | |
| 1862 | 1862 | } | 
| 1863 | 1863 | |
| 1864 | 1864 | /** | 
| @@ -1870,7 +1870,7 @@ discard block | ||
| 1870 | 1870 | * @return bool True if active, false otherwise. | 
| 1871 | 1871 | */ | 
| 1872 | 1872 |  		public function is_plugin_active( $slug ) { | 
| 1873 | - return ( ( ! empty( $this->plugins[ $slug ]['is_callable'] ) && is_callable( $this->plugins[ $slug ]['is_callable'] ) ) || is_plugin_active( $this->plugins[ $slug ]['file_path'] ) ); | |
| 1873 | + return ( ( ! empty( $this->plugins[$slug]['is_callable'] ) && is_callable( $this->plugins[$slug]['is_callable'] ) ) || is_plugin_active( $this->plugins[$slug]['file_path'] ) ); | |
| 1874 | 1874 | } | 
| 1875 | 1875 | |
| 1876 | 1876 | /** | 
| @@ -1884,7 +1884,7 @@ discard block | ||
| 1884 | 1884 | */ | 
| 1885 | 1885 |  		public function can_plugin_update( $slug ) { | 
| 1886 | 1886 | // We currently can't get reliable info on non-WP-repo plugins - issue #380. | 
| 1887 | -			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { | |
| 1887 | +			if ( 'repo' !== $this->plugins[$slug]['source_type'] ) { | |
| 1888 | 1888 | return true; | 
| 1889 | 1889 | } | 
| 1890 | 1890 | |
| @@ -1940,8 +1940,8 @@ discard block | ||
| 1940 | 1940 |  		public function get_installed_version( $slug ) { | 
| 1941 | 1941 | $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached). | 
| 1942 | 1942 | |
| 1943 | -			if ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'] ) ) { | |
| 1944 | - return $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version']; | |
| 1943 | +			if ( ! empty( $installed_plugins[$this->plugins[$slug]['file_path']]['Version'] ) ) { | |
| 1944 | + return $installed_plugins[$this->plugins[$slug]['file_path']]['Version']; | |
| 1945 | 1945 | } | 
| 1946 | 1946 | |
| 1947 | 1947 | return ''; | 
| @@ -1957,7 +1957,7 @@ discard block | ||
| 1957 | 1957 | */ | 
| 1958 | 1958 |  		public function does_plugin_require_update( $slug ) { | 
| 1959 | 1959 | $installed_version = $this->get_installed_version( $slug ); | 
| 1960 | - $minimum_version = $this->plugins[ $slug ]['version']; | |
| 1960 | + $minimum_version = $this->plugins[$slug]['version']; | |
| 1961 | 1961 | |
| 1962 | 1962 | return version_compare( $minimum_version, $installed_version, '>' ); | 
| 1963 | 1963 | } | 
| @@ -1972,9 +1972,9 @@ discard block | ||
| 1972 | 1972 | */ | 
| 1973 | 1973 |  		public function does_plugin_have_update( $slug ) { | 
| 1974 | 1974 | // Presume bundled and external plugins will point to a package which meets the minimum required version. | 
| 1975 | -			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { | |
| 1975 | +			if ( 'repo' !== $this->plugins[$slug]['source_type'] ) { | |
| 1976 | 1976 |  				if ( $this->does_plugin_require_update( $slug ) ) { | 
| 1977 | - return $this->plugins[ $slug ]['version']; | |
| 1977 | + return $this->plugins[$slug]['version']; | |
| 1978 | 1978 | } | 
| 1979 | 1979 | |
| 1980 | 1980 | return false; | 
| @@ -1982,8 +1982,8 @@ discard block | ||
| 1982 | 1982 | |
| 1983 | 1983 | $repo_updates = get_site_transient( 'update_plugins' ); | 
| 1984 | 1984 | |
| 1985 | -			if ( isset( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version ) ) { | |
| 1986 | - return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version; | |
| 1985 | +			if ( isset( $repo_updates->response[$this->plugins[$slug]['file_path']]->new_version ) ) { | |
| 1986 | + return $repo_updates->response[$this->plugins[$slug]['file_path']]->new_version; | |
| 1987 | 1987 | } | 
| 1988 | 1988 | |
| 1989 | 1989 | return false; | 
| @@ -1999,14 +1999,14 @@ discard block | ||
| 1999 | 1999 | */ | 
| 2000 | 2000 |  		public function get_upgrade_notice( $slug ) { | 
| 2001 | 2001 | // We currently can't get reliable info on non-WP-repo plugins - issue #380. | 
| 2002 | -			if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { | |
| 2002 | +			if ( 'repo' !== $this->plugins[$slug]['source_type'] ) { | |
| 2003 | 2003 | return ''; | 
| 2004 | 2004 | } | 
| 2005 | 2005 | |
| 2006 | 2006 | $repo_updates = get_site_transient( 'update_plugins' ); | 
| 2007 | 2007 | |
| 2008 | -			if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice ) ) { | |
| 2009 | - return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice; | |
| 2008 | +			if ( ! empty( $repo_updates->response[$this->plugins[$slug]['file_path']]->upgrade_notice ) ) { | |
| 2009 | + return $repo_updates->response[$this->plugins[$slug]['file_path']]->upgrade_notice; | |
| 2010 | 2010 | } | 
| 2011 | 2011 | |
| 2012 | 2012 | return ''; | 
| @@ -2090,7 +2090,7 @@ discard block | ||
| 2090 | 2090 | */ | 
| 2091 | 2091 |  				if ( true === $plugin['force_deactivation'] && is_plugin_active( $plugin['file_path'] ) ) { | 
| 2092 | 2092 | deactivate_plugins( $plugin['file_path'] ); | 
| 2093 | - $deactivated[ $plugin['file_path'] ] = time(); | |
| 2093 | + $deactivated[$plugin['file_path']] = time(); | |
| 2094 | 2094 | } | 
| 2095 | 2095 | } | 
| 2096 | 2096 | |
| @@ -2327,30 +2327,30 @@ discard block | ||
| 2327 | 2327 | $i = 0; | 
| 2328 | 2328 | |
| 2329 | 2329 | // Redirect to the 'all' view if no plugins were found for the selected view context. | 
| 2330 | -			if ( empty( $plugins[ $this->view_context ] ) ) { | |
| 2330 | +			if ( empty( $plugins[$this->view_context] ) ) { | |
| 2331 | 2331 | $this->view_context = 'all'; | 
| 2332 | 2332 | } | 
| 2333 | 2333 | |
| 2334 | -			foreach ( $plugins[ $this->view_context ] as $slug => $plugin ) { | |
| 2335 | - $table_data[ $i ]['sanitized_plugin'] = $plugin['name']; | |
| 2336 | - $table_data[ $i ]['slug'] = $slug; | |
| 2337 | - $table_data[ $i ]['plugin'] = '<strong>' . $this->tgmpa->get_info_link( $slug ) . '</strong>'; | |
| 2338 | - $table_data[ $i ]['source'] = $this->get_plugin_source_type_text( $plugin['source_type'] ); | |
| 2339 | - $table_data[ $i ]['type'] = $this->get_plugin_advise_type_text( $plugin['required'] ); | |
| 2340 | - $table_data[ $i ]['status'] = $this->get_plugin_status_text( $slug ); | |
| 2341 | - $table_data[ $i ]['installed_version'] = $this->tgmpa->get_installed_version( $slug ); | |
| 2342 | - $table_data[ $i ]['minimum_version'] = $plugin['version']; | |
| 2343 | - $table_data[ $i ]['available_version'] = $this->tgmpa->does_plugin_have_update( $slug ); | |
| 2334 | +			foreach ( $plugins[$this->view_context] as $slug => $plugin ) { | |
| 2335 | + $table_data[$i]['sanitized_plugin'] = $plugin['name']; | |
| 2336 | + $table_data[$i]['slug'] = $slug; | |
| 2337 | + $table_data[$i]['plugin'] = '<strong>' . $this->tgmpa->get_info_link( $slug ) . '</strong>'; | |
| 2338 | + $table_data[$i]['source'] = $this->get_plugin_source_type_text( $plugin['source_type'] ); | |
| 2339 | + $table_data[$i]['type'] = $this->get_plugin_advise_type_text( $plugin['required'] ); | |
| 2340 | + $table_data[$i]['status'] = $this->get_plugin_status_text( $slug ); | |
| 2341 | + $table_data[$i]['installed_version'] = $this->tgmpa->get_installed_version( $slug ); | |
| 2342 | + $table_data[$i]['minimum_version'] = $plugin['version']; | |
| 2343 | + $table_data[$i]['available_version'] = $this->tgmpa->does_plugin_have_update( $slug ); | |
| 2344 | 2344 | |
| 2345 | 2345 | // Prep the upgrade notice info. | 
| 2346 | 2346 | $upgrade_notice = $this->tgmpa->get_upgrade_notice( $slug ); | 
| 2347 | 2347 |  				if ( ! empty( $upgrade_notice ) ) { | 
| 2348 | - $table_data[ $i ]['upgrade_notice'] = $upgrade_notice; | |
| 2348 | + $table_data[$i]['upgrade_notice'] = $upgrade_notice; | |
| 2349 | 2349 | |
| 2350 | 2350 |  					add_action( "tgmpa_after_plugin_row_{$slug}", array( $this, 'wp_plugin_update_row' ), 10, 2 ); | 
| 2351 | 2351 | } | 
| 2352 | 2352 | |
| 2353 | - $table_data[ $i ] = apply_filters( 'tgmpa_table_data_item', $table_data[ $i ], $plugin ); | |
| 2353 | + $table_data[$i] = apply_filters( 'tgmpa_table_data_item', $table_data[$i], $plugin ); | |
| 2354 | 2354 | |
| 2355 | 2355 | $i++; | 
| 2356 | 2356 | } | 
| @@ -2376,17 +2376,17 @@ discard block | ||
| 2376 | 2376 | // No need to display plugins if they are installed, up-to-date and active. | 
| 2377 | 2377 | continue; | 
| 2378 | 2378 |  				} else { | 
| 2379 | - $plugins['all'][ $slug ] = $plugin; | |
| 2379 | + $plugins['all'][$slug] = $plugin; | |
| 2380 | 2380 | |
| 2381 | 2381 |  					if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) { | 
| 2382 | - $plugins['install'][ $slug ] = $plugin; | |
| 2382 | + $plugins['install'][$slug] = $plugin; | |
| 2383 | 2383 |  					} else { | 
| 2384 | 2384 |  						if ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) { | 
| 2385 | - $plugins['update'][ $slug ] = $plugin; | |
| 2385 | + $plugins['update'][$slug] = $plugin; | |
| 2386 | 2386 | } | 
| 2387 | 2387 | |
| 2388 | 2388 |  						if ( $this->tgmpa->can_plugin_activate( $slug ) ) { | 
| 2389 | - $plugins['activate'][ $slug ] = $plugin; | |
| 2389 | + $plugins['activate'][$slug] = $plugin; | |
| 2390 | 2390 | } | 
| 2391 | 2391 | } | 
| 2392 | 2392 | } | 
| @@ -2404,7 +2404,7 @@ discard block | ||
| 2404 | 2404 | */ | 
| 2405 | 2405 |  		protected function set_view_totals( $plugins ) { | 
| 2406 | 2406 |  			foreach ( $plugins as $type => $list ) { | 
| 2407 | - $this->view_totals[ $type ] = count( $list ); | |
| 2407 | + $this->view_totals[$type] = count( $list ); | |
| 2408 | 2408 | } | 
| 2409 | 2409 | } | 
| 2410 | 2410 | |
| @@ -2506,8 +2506,8 @@ discard block | ||
| 2506 | 2506 | $name = array(); | 
| 2507 | 2507 | |
| 2508 | 2508 |  			foreach ( $items as $i => $plugin ) { | 
| 2509 | - $type[ $i ] = $plugin['type']; // Required / recommended. | |
| 2510 | - $name[ $i ] = $plugin['sanitized_plugin']; | |
| 2509 | + $type[$i] = $plugin['type']; // Required / recommended. | |
| 2510 | + $name[$i] = $plugin['sanitized_plugin']; | |
| 2511 | 2511 | } | 
| 2512 | 2512 | |
| 2513 | 2513 | array_multisort( $type, SORT_DESC, $name, SORT_ASC, $items ); | 
| @@ -2554,7 +2554,7 @@ discard block | ||
| 2554 | 2554 | |
| 2555 | 2555 |  				if ( ! empty( $text ) ) { | 
| 2556 | 2556 | |
| 2557 | - $status_links[ $type ] = sprintf( | |
| 2557 | + $status_links[$type] = sprintf( | |
| 2558 | 2558 | '<a href="%s"%s>%s</a>', | 
| 2559 | 2559 | esc_url( $this->tgmpa->get_tgmpa_status_url( $type ) ), | 
| 2560 | 2560 | ( $type === $this->view_context ) ? ' class="current"' : '', | 
| @@ -2577,7 +2577,7 @@ discard block | ||
| 2577 | 2577 | * @return string | 
| 2578 | 2578 | */ | 
| 2579 | 2579 |  		public function column_default( $item, $column_name ) { | 
| 2580 | - return $item[ $column_name ]; | |
| 2580 | + return $item[$column_name]; | |
| 2581 | 2581 | } | 
| 2582 | 2582 | |
| 2583 | 2583 | /** | 
| @@ -2777,7 +2777,7 @@ discard block | ||
| 2777 | 2777 | 'tgmpa-nonce' | 
| 2778 | 2778 | ); | 
| 2779 | 2779 | |
| 2780 | - $action_links[ $action ] = sprintf( | |
| 2780 | + $action_links[$action] = sprintf( | |
| 2781 | 2781 | '<a href="%1$s">' . esc_html( $text ) . '</a>', // $text contains the second placeholder. | 
| 2782 | 2782 | esc_url( $nonce_url ), | 
| 2783 | 2783 | '<span class="screen-reader-text">' . esc_html( $item['sanitized_plugin'] ) . '</span>' | 
| @@ -2928,19 +2928,19 @@ discard block | ||
| 2928 | 2928 | // Validate the received input. | 
| 2929 | 2929 |  				foreach ( $plugins_to_install as $key => $slug ) { | 
| 2930 | 2930 | // Check if the plugin was registered with TGMPA and remove if not. | 
| 2931 | -					if ( ! isset( $this->tgmpa->plugins[ $slug ] ) ) { | |
| 2932 | - unset( $plugins_to_install[ $key ] ); | |
| 2931 | +					if ( ! isset( $this->tgmpa->plugins[$slug] ) ) { | |
| 2932 | + unset( $plugins_to_install[$key] ); | |
| 2933 | 2933 | continue; | 
| 2934 | 2934 | } | 
| 2935 | 2935 | |
| 2936 | 2936 | // For install: make sure this is a plugin we *can* install and not one already installed. | 
| 2937 | 2937 |  					if ( 'install' === $install_type && true === $this->tgmpa->is_plugin_installed( $slug ) ) { | 
| 2938 | - unset( $plugins_to_install[ $key ] ); | |
| 2938 | + unset( $plugins_to_install[$key] ); | |
| 2939 | 2939 | } | 
| 2940 | 2940 | |
| 2941 | 2941 | // For updates: make sure this is a plugin we *can* update (update available and WP version ok). | 
| 2942 | 2942 |  					if ( 'update' === $install_type && false === $this->tgmpa->is_plugin_updatetable( $slug ) ) { | 
| 2943 | - unset( $plugins_to_install[ $key ] ); | |
| 2943 | + unset( $plugins_to_install[$key] ); | |
| 2944 | 2944 | } | 
| 2945 | 2945 | } | 
| 2946 | 2946 | |
| @@ -2992,7 +2992,7 @@ discard block | ||
| 2992 | 2992 | |
| 2993 | 2993 | // Prepare the data for validated plugins for the install/upgrade. | 
| 2994 | 2994 |  				foreach ( $plugins_to_install as $slug ) { | 
| 2995 | - $name = $this->tgmpa->plugins[ $slug ]['name']; | |
| 2995 | + $name = $this->tgmpa->plugins[$slug]['name']; | |
| 2996 | 2996 | $source = $this->tgmpa->get_download_url( $slug ); | 
| 2997 | 2997 | |
| 2998 | 2998 |  					if ( ! empty( $name ) && ! empty( $source ) ) { | 
| @@ -3005,9 +3005,9 @@ discard block | ||
| 3005 | 3005 | break; | 
| 3006 | 3006 | |
| 3007 | 3007 | case 'update': | 
| 3008 | - $file_paths[] = $this->tgmpa->plugins[ $slug ]['file_path']; | |
| 3009 | - $to_inject[ $slug ] = $this->tgmpa->plugins[ $slug ]; | |
| 3010 | - $to_inject[ $slug ]['source'] = $source; | |
| 3008 | + $file_paths[] = $this->tgmpa->plugins[$slug]['file_path']; | |
| 3009 | + $to_inject[$slug] = $this->tgmpa->plugins[$slug]; | |
| 3010 | + $to_inject[$slug]['source'] = $source; | |
| 3011 | 3011 | break; | 
| 3012 | 3012 | } | 
| 3013 | 3013 | } | 
| @@ -3074,8 +3074,8 @@ discard block | ||
| 3074 | 3074 | // Grab the file paths for the selected & inactive plugins from the registration array. | 
| 3075 | 3075 |  				foreach ( $plugins as $slug ) { | 
| 3076 | 3076 |  					if ( $this->tgmpa->can_plugin_activate( $slug ) ) { | 
| 3077 | - $plugins_to_activate[] = $this->tgmpa->plugins[ $slug ]['file_path']; | |
| 3078 | - $plugin_names[] = $this->tgmpa->plugins[ $slug ]['name']; | |
| 3077 | + $plugins_to_activate[] = $this->tgmpa->plugins[$slug]['file_path']; | |
| 3078 | + $plugin_names[] = $this->tgmpa->plugins[$slug]['name']; | |
| 3079 | 3079 | } | 
| 3080 | 3080 | } | 
| 3081 | 3081 | unset( $slug ); | 
| @@ -3107,8 +3107,8 @@ discard block | ||
| 3107 | 3107 | // Update recently activated plugins option. | 
| 3108 | 3108 | $recent = (array) get_option( 'recently_activated' ); | 
| 3109 | 3109 |  					foreach ( $plugins_to_activate as $plugin => $time ) { | 
| 3110 | -						if ( isset( $recent[ $plugin ] ) ) { | |
| 3111 | - unset( $recent[ $plugin ] ); | |
| 3110 | +						if ( isset( $recent[$plugin] ) ) { | |
| 3111 | + unset( $recent[$plugin] ); | |
| 3112 | 3112 | } | 
| 3113 | 3113 | } | 
| 3114 | 3114 | update_option( 'recently_activated', $recent ); | 
| @@ -3439,7 +3439,7 @@ discard block | ||
| 3439 | 3439 | ) | 
| 3440 | 3440 | ); | 
| 3441 | 3441 | |
| 3442 | - $results[ $plugin ] = $this->result; | |
| 3442 | + $results[$plugin] = $this->result; | |
| 3443 | 3443 | |
| 3444 | 3444 | // Prevent credentials auth screen from displaying multiple times. | 
| 3445 | 3445 |  							if ( false === $result ) { | 
| @@ -3629,7 +3629,7 @@ discard block | ||
| 3629 | 3629 | 'names' => array(), | 
| 3630 | 3630 | 'install_type' => 'install', | 
| 3631 | 3631 | ); | 
| 3632 | - $args = wp_parse_args( $args, $defaults ); | |
| 3632 | + $args = wp_parse_args( $args, $defaults ); | |
| 3633 | 3633 | |
| 3634 | 3634 | // Set plugin names to $this->plugin_names property. | 
| 3635 | 3635 | $this->plugin_names = $args['names']; | 
| @@ -3691,7 +3691,7 @@ discard block | ||
| 3691 | 3691 | */ | 
| 3692 | 3692 |  					public function before( $title = '' ) { | 
| 3693 | 3693 |  						if ( empty( $title ) ) { | 
| 3694 | - $title = esc_html( $this->plugin_names[ $this->i ] ); | |
| 3694 | + $title = esc_html( $this->plugin_names[$this->i] ); | |
| 3695 | 3695 | } | 
| 3696 | 3696 | parent::before( $title ); | 
| 3697 | 3697 | } | 
| @@ -3708,7 +3708,7 @@ discard block | ||
| 3708 | 3708 | */ | 
| 3709 | 3709 |  					public function after( $title = '' ) { | 
| 3710 | 3710 |  						if ( empty( $title ) ) { | 
| 3711 | - $title = esc_html( $this->plugin_names[ $this->i ] ); | |
| 3711 | + $title = esc_html( $this->plugin_names[$this->i] ); | |
| 3712 | 3712 | } | 
| 3713 | 3713 | parent::after( $title ); | 
| 3714 | 3714 | |
| @@ -3881,7 +3881,7 @@ discard block | ||
| 3881 | 3881 | */ | 
| 3882 | 3882 |  		protected static function emulate_filter_bool( $value ) { | 
| 3883 | 3883 | // @codingStandardsIgnoreStart | 
| 3884 | - static $true = array( | |
| 3884 | + static $true = array( | |
| 3885 | 3885 | '1', | 
| 3886 | 3886 | 'true', 'True', 'TRUE', | 
| 3887 | 3887 | 'y', 'Y', | 
| @@ -1081,7 +1081,8 @@ discard block | ||
| 1081 | 1081 |  					if ( ! $automatic ) { | 
| 1082 | 1082 | // Make sure message doesn't display again if bulk activation is performed | 
| 1083 | 1083 | // immediately after a single activation. | 
| 1084 | -						if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. | |
| 1084 | +						if ( ! isset( $_POST['action'] ) ) { | |
| 1085 | +// WPCS: CSRF OK. | |
| 1085 | 1086 | echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>'; | 
| 1086 | 1087 | } | 
| 1087 | 1088 |  					} else { | 
| @@ -1102,7 +1103,8 @@ discard block | ||
| 1102 | 1103 |  				if ( ! $automatic ) { | 
| 1103 | 1104 | // Make sure message doesn't display again if bulk activation is performed | 
| 1104 | 1105 | // immediately after a single activation. | 
| 1105 | -					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. | |
| 1106 | +					if ( ! isset( $_POST['action'] ) ) { | |
| 1107 | +// WPCS: CSRF OK. | |
| 1106 | 1108 | echo '<div id="message" class="error"><p>', | 
| 1107 | 1109 | sprintf( | 
| 1108 | 1110 | esc_html( $this->strings['plugin_needs_higher_version'] ), | 
| @@ -1154,7 +1156,7 @@ discard block | ||
| 1154 | 1156 | continue; | 
| 1155 | 1157 | } | 
| 1156 | 1158 | |
| 1157 | -				if(false === $plugin['has_notices']){ | |
| 1159 | +				if(false === $plugin['has_notices']) { | |
| 1158 | 1160 | continue; | 
| 1159 | 1161 | } | 
| 1160 | 1162 | |
| @@ -1768,10 +1770,12 @@ discard block | ||
| 1768 | 1770 |  			if ( 'update-core' === $screen->base ) { | 
| 1769 | 1771 | // Core update screen. | 
| 1770 | 1772 | return true; | 
| 1771 | -			} elseif ( 'plugins' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. | |
| 1773 | +			} elseif ( 'plugins' === $screen->base && ! empty( $_POST['action'] ) ) { | |
| 1774 | +// WPCS: CSRF ok. | |
| 1772 | 1775 | // Plugins bulk update screen. | 
| 1773 | 1776 | return true; | 
| 1774 | -			} elseif ( 'update' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. | |
| 1777 | +			} elseif ( 'update' === $screen->base && ! empty( $_POST['action'] ) ) { | |
| 1778 | +// WPCS: CSRF ok. | |
| 1775 | 1779 | // Individual updates (ajax call). | 
| 1776 | 1780 | return true; | 
| 1777 | 1781 | } |