From 75f4959b2a8ee9abc84a911b44cfa64b0d68bcc2 Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@20710 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 305867e49c..1c4310336b 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') )