From 88760dea758752c27db7ce15cd5acf902661ff9a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 9 Sep 2011 16:09:22 +0100 Subject: [PATCH] Admin changes --- admin/admin-settings-forms.php | 2 ++ admin/admin-settings.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/admin/admin-settings-forms.php b/admin/admin-settings-forms.php index 1ca3a58ace8..0bd26f4f716 100644 --- a/admin/admin-settings-forms.php +++ b/admin/admin-settings-forms.php @@ -138,8 +138,10 @@ function woocommerce_admin_fields($options) { if (isset($value['name']) && $value['name']) echo '

'.$value['name'].'

'; if (isset($value['desc']) && $value['desc']) echo wpautop(wptexturize($value['desc'])); echo ''. "\n\n"; + if (isset($value['id']) && $value['id']) do_action('woocommerce_settings_'.sanitize_title($value['id'])); break; case 'sectionend': + if (isset($value['id']) && $value['id']) do_action('woocommerce_settings_'.sanitize_title($value['id']).'_end'); echo '
'; break; case 'text': diff --git a/admin/admin-settings.php b/admin/admin-settings.php index f0222fc217b..ff63806826e 100644 --- a/admin/admin-settings.php +++ b/admin/admin-settings.php @@ -221,7 +221,7 @@ $woocommerce_settings = apply_filters('woocommerce_settings', array( array( 'type' => 'tab', 'tabname' => __('Catalog', 'woothemes') ), - array( 'name' => __('Catalog Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => '' ), + array( 'name' => __('Catalog Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'catalog_options' ), array( 'name' => __('Product fields', 'woothemes'), @@ -261,9 +261,9 @@ $woocommerce_settings = apply_filters('woocommerce_settings', array( 'type' => 'checkbox' ), - array( 'type' => 'sectionend'), + array( 'type' => 'sectionend', 'id' => 'catalog_options'), - array( 'name' => __('Image Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => '' ), + array( 'name' => __('Image Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'image_options' ), array( 'name' => __('Catalog images', 'woothemes'), @@ -292,9 +292,9 @@ $woocommerce_settings = apply_filters('woocommerce_settings', array( 'std' => '90' ), - array( 'type' => 'sectionend'), + array( 'type' => 'sectionend', 'id' => 'image_options'), - array( 'name' => __('Pricing Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => '' ), + array( 'name' => __('Pricing Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'pricing_options' ), array( 'name' => __('Currency', 'woothemes'), @@ -378,9 +378,9 @@ $woocommerce_settings = apply_filters('woocommerce_settings', array( 'type' => 'text', ), - array( 'type' => 'sectionend'), + array( 'type' => 'sectionend', 'id' => 'pricing_options' ), - array( 'name' => __('Inventory Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => '' ), + array( 'name' => __('Inventory Options', 'woothemes'), 'type' => 'title','desc' => '', 'id' => 'inventory_options' ), array( 'name' => __('Manage stock', 'woothemes'), @@ -435,7 +435,7 @@ $woocommerce_settings = apply_filters('woocommerce_settings', array( 'type' => 'checkbox' ), - array( 'type' => 'sectionend'), + array( 'type' => 'sectionend', 'id' => 'inventory_options'), array( 'type' => 'tabend'),