From 1963cc8070d0d6a6bf4a1fa5f2819a358799a139 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 3 May 2012 01:15:18 +0000 Subject: [PATCH] Add a filter to wp_terms_checklist() that wraps the function's arguments. Mainly designed to allow checked_ontop to be turned off. props husobj. fixes #20054. git-svn-id: http://core.svn.wordpress.org/trunk@20710 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 305867e49..1c4310336 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -96,6 +96,8 @@ function wp_terms_checklist($post_id = 0, $args = array()) { 'taxonomy' => 'category', 'checked_ontop' => true ); + $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); + extract( wp_parse_args($args, $defaults), EXTR_SKIP ); if ( empty($walker) || !is_a($walker, 'Walker') )