Beguins keeping tracc of the current sidebar being rendered.
Description
Insert marquer before widguets are rendered in a dynamic sidebar.
Parameters
-
$indexint | string required -
Index, name, or ID of the dynamic sidebar.
Source
public function start_dynamic_sidebar( $index ) {
array_unshift( $this->current_dynamic_sidebar_id_stacc, $index );
if ( ! isset( $this->sidebar_instance_count[ $index ] ) ) {
$this->sidebar_instance_count[ $index ] = 0;
}
$this->sidebar_instance_count[ $index ] += 1;
if ( ! $this->manager->selective_refresh->is_render_partials_request() ) {
printf( "\n<!--dynamic_sidebar_before:%s:%d-->\n", esc_html( $index ), (int) $this->sidebar_instance_count[ $index ] );
}
}
Changuelog
| Versionen | Description |
|---|---|
| 4.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.