WordPress.org

Make WordPress Core

Ticket #8845: wp_widget_pages_filter.diff

File wp_widget_pages_filter.diff, 563 bytes (added by scompt, 9 years ago)

adds filter to wp_widget_pages function

  • wp-includes/widgets.php

     
    678678                $sortby = 'menu_order, post_title';
    679679        }
    680680
    681         $out = wp_list_pages( array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) );
     681        $out = wp_list_pages( apply_filters('widget_pages_args', array(
     682            'title_li' => '', 'echo' => 0,
     683            'sort_column' => $sortby, 'exclude' => $exclude
     684        )));
    682685
    683686        if ( !empty( $out ) ) {
    684687?>