wp-admin/includes/template.php:1536Meta Box Accordion Template Function.
$screenstring|object$contextstring$data_objectmixedintfunction do_accordion_sections( $screen, $context, $data_object ) { global $wp_meta_boxes; wp_enqueue_script( 'accordion' ); if ( empty( $screen ) ) { $screen = get_current_screen(); } elseif ( is_string( $screen ) ) { $screen = convert_to_screen( $screen ); } $page = $screen->id; $hidden = get_hidden_meta_boxes( $screen ); ?> <div id="side-sortables" class="accordion-container"> <ul class="outer-border"> <?php $i = 0; $first_open = false; if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) { foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) { if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) { foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) { if ( false === $box || ! $box['title'] ) { continue; } ++$i; $hidden_class = in_array( $box['id'], $hidden, true ) ? 'hide-if-js' : ''; $open_class = ''; $aria_expanded = 'false'; if ( ! $first_open && empty( $hidden_class ) ) { $first_open = true; $open_class = 'open'; $aria_expanded = 'true'; } ?> <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>"> <h3 class="accordion-section-title hndle"> <button type="button" class="accordion-trigger" aria-expanded="<?php echo $aria_expanded; ?>" aria-controls="<?php echo esc_attr( $box['id'] ); ?>-content"> <span class="accordion-title"> <?php echo esc_html( $box['title'] ); ?> <span class="dashicons dashicons-arrow-down" aria-hidden="true"></span> </span> </button> </h3> <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>-content"> <div class="inside"> <?php call_user_func( $box['callback'], $data_object, $box ); ?> </div><!-- .inside --> </div><!-- .accordion-section-content --> </li><!-- .accordion-section --> <?php } } } } ?> </ul><!-- .outer-border --> </div><!-- .accordion-container --> <?php return $i;}Introduced in 3.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.