WordPress.org

Make WordPress Core

Ticket #41239: 41239.diff

File 41239.diff, 444 bytes (added by jantank, 4 years ago)

Add filter in function dynamic_sidebar()

  • wp-includes/widgets.php

    diff --git wp-includes/widgets.php wp-includes/widgets.php
    index fbbdcf5..0141eee 100644
    function wp_unregister_widget_control($id) { 
    613613function dynamic_sidebar( $index = 1 ) {
    614614        global $wp_registered_sidebars, $wp_registered_widgets;
    615615
     616        $index = apply_filters( 'dynamic_sidebar_index', $index );
     617
    616618        if ( is_int( $index ) ) {
    617619                $index = "sidebar-$index";
    618620        } else {