瀏覽代碼

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

Dyad 2: Correct how footer widget count was calculated
Laurel 6 年之前
父節點
當前提交
24bb2c1827
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 ) ) {
 	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.
 			// 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++;
 				$count++;
 			}
 			}
 		}
 		}