File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ Significance: minor
2
+ Type: changed
3
+
4
+ Step counts for the Welcome checklist now only take into account steps that are added in the Welcome class.
Original file line number Diff line number Diff line change @@ -139,7 +139,11 @@ private static function get_total_steps_count() {
139
139
$ count = 0 ;
140
140
141
141
if ( isset ( $ wp_filter ['activitypub_onboarding_steps ' ] ) ) {
142
- $ count = \count ( $ wp_filter ['activitypub_onboarding_steps ' ]->callbacks );
142
+ $ pattern = '/^ ' . \preg_quote ( self ::class, '/ ' ) . '/ ' ;
143
+ foreach ( $ wp_filter ['activitypub_onboarding_steps ' ]->callbacks as $ callbacks ) {
144
+ $ matching_keys = \preg_grep ( $ pattern , \array_keys ( $ callbacks ) );
145
+ $ count += \count ( $ matching_keys );
146
+ }
143
147
}
144
148
145
149
return $ count ;
You can’t perform that action at this time.
0 commit comments