From 50442c59141957b83560637d3010772d21e5e736 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 4 Dec 2006 00:48:03 +0000 Subject: [PATCH] Hooks needed to allow alternate category admin inteface. Props alexkingorg. fixes #3408 git-svn-id: https://develop.svn.wordpress.org/trunk@4595 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 7 +++++++ wp-admin/edit-category-form.php | 2 ++ 2 files changed, 9 insertions(+) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 659a6ba3f9..e86bd4aaab 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -716,12 +716,19 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0 ) { $categories = get_categories( 'hide_empty=0' ); if ( $categories ) { + ob_start(); foreach ( $categories as $category ) { if ( $category->category_parent == $parent) { echo "\t" . _cat_row( $category, $level ); cat_rows( $category->cat_ID, $level +1, $categories ); } } + $output = ob_get_contents(); + ob_end_clean(); + + $output = apply_filters('cat_rows', $output); + + echo $output; } else { return false; } diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index f4992ea480..18c9ecc173 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -5,12 +5,14 @@ if ( ! empty($cat_ID) ) { $form = '
'; $action = 'editedcat'; $nonce_action = 'update-category_' . $cat_ID; + do_action('edit_category_form_pre', $category); } else { $heading = __('Add Category'); $submit_text = __('Add Category »'); $form = ''; $action = 'addcat'; $nonce_action = 'add-category'; + do_action('add_category_form_pre', $category); } ?>