/

callbacks as $callbacks ) { $matching_keys = \preg_grep( $pattern, \array_keys( $callbacks ) ); $count += \count( $matching_keys ); } } return $count; } /** * Get the next incomplete step. */ private static function get_next_incomplete_step() { if ( self::has_step( 'site_health' ) && '0' !== \get_option( 'activitypub_checklist_health_check_issues', (string) Health_Check::count_results( 'critical' ) ) ) { return 'site_health'; } if ( self::has_step( 'fediverse_intro' ) && ! \get_option( 'activitypub_checklist_fediverse_intro_visited', false ) ) { return 'fediverse_intro'; } if ( self::has_step( 'profile_mode' ) && ! \get_option( 'activitypub_checklist_settings_visited', false ) ) { return 'profile_mode'; } if ( self::has_step( 'profile_setup' ) && ! \get_option( 'activitypub_checklist_profile_setup_visited', false ) ) { return 'profile_setup'; } if ( self::has_step( 'features' ) && ! \get_option( 'activitypub_checklist_blocks_visited', false ) ) { return 'features'; } return ''; } /** * Check if a step exists. * * @param string $step Step slug. * @return bool */ private static function has_step( $step ) { return \has_action( 'activitypub_onboarding_steps', array( self::class, 'render_step_' . $step ) ); } /** * Render onboarding steps section. */ public static function render_onboarding_steps_section() { ?>