Browse Source

Merge pull request #590 from Automattic/fixes/589-dyad-2-footer-mixup

Dyad 2: Correct how footer widget count was calculated
Laurel 6 years ago
parent
commit
24bb2c1827
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dyad-2/functions.php

+ 2 - 2
dyad-2/functions.php

@@ -192,9 +192,9 @@ function dyad_2_count_widgets( $id ) {
 
 	if ( array_key_exists( $id, $sidebars_widgets ) ) {
 
-		foreach ( ( array ) $sidebars_widgets[ $id ] as $value ) {
+		foreach ( ( array ) $sidebars_widgets[$id] as $value ) {
 			// Don't count the Cookies or Mailchimp widgets, since they're not visible in the widget area.
-			if ( strpos( $value, 'eu_cookie_law_widget' ) === 0 || strpos( $value, 'widget_mailchimp_subscriber_popup' ) === 0 ) {
+			if ( strpos( $value, 'eu_cookie_law_widget' ) === false && strpos( $value, 'widget_mailchimp_subscriber_popup' ) === false ) {
 				$count++;
 			}
 		}