Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of github.com:rilwis/taxonomy-meta

  • Loading branch information...
commit 81caf81d85a73d1fae2394cce3bf8621d104b6c5 2 parents 6092a91 + 1c6a292
Tran Ngoc Tuan Anh authored November 10, 2012
8  readme.txt
@@ -3,7 +3,7 @@ Contributors: rilwis
3 3
 Donate link: http://www.deluxeblogtips.com/donate
4 4
 Tags: custom-fields, custom-field, meta, taxonomy, term
5 5
 Requires at least: 3.0
6  
-Tested up to: 3.3.2
  6
+Tested up to: 3.4.2
7 7
 Stable tag: trunk
8 8
 
9 9
 Taxonomy Meta plugin helps you easily add meta values to terms, mimic custom post fields
@@ -29,8 +29,12 @@ Support input types: text, textarea, checkbox, radio box, select, wysiwyg, file
29 29
 
30 30
 == Changelog ==
31 31
 
  32
+= 1.1.3 =
  33
+
  34
+- Updated enqueuing of styles and scripts
  35
+
32 36
 = 1.1.2 =
33 37
 
34 38
 - Fix image uploader
35 39
 
36  
-== Upgrade Notice ==
  40
+== Upgrade Notice ==
27  taxonomy-meta.php
@@ -4,7 +4,7 @@
4 4
 Plugin Name: Taxonomy Meta
5 5
 Plugin URI: http://www.deluxeblogtips.com/taxonomy-meta-script-for-wordpress
6 6
 Description: Add meta values to terms, mimic custom post fields
7  
-Version: 1.1.2
  7
+Version: 1.1.3
8 8
 Author: Rilwis
9 9
 Author URI: http://www.deluxeblogtips.com
10 10
 License: GPL2+
@@ -27,11 +27,11 @@ function __construct($meta) {
27 27
 		add_action('admin_init', array(&$this, 'add'));
28 28
 		add_action('edit_term', array(&$this, 'save'), 10, 2);
29 29
 		add_action('delete_term', array(&$this, 'delete'), 10, 2);
  30
+		add_action('admin_enqueue_scripts', array(&$this, 'check_field_date'));
  31
+		add_action('admin_enqueue_scripts', array(&$this, 'check_field_color'));
  32
+		add_action('admin_enqueue_scripts', array(&$this, 'check_field_time'));
30 33
 
31 34
 		$this->check_field_upload();
32  
-		$this->check_field_color();
33  
-		$this->check_field_date();
34  
-		$this->check_field_time();
35 35
 		$this->check_field_wysiwyg();
36 36
 	}
37 37
 
@@ -307,16 +307,17 @@ function check_field_wysiwyg() {
307 307
 		if (!$this->has_field('wysiwyg')) return;
308 308
 
309 309
 		wp_enqueue_scripts('jquery');
310  
-		add_action('admin_head-edit-tags.php', array(&$this, 'add_script_wysiwyg'));
  310
+        //add_action('admin_head-edit-tags.php', array(&$this, 'add_script_wysiwyg'));
  311
+        // We don't need to use this anymore because of wp_editor
311 312
 	}
312 313
 
313 314
 	// Custom script and style for time picker
314 315
 	function add_script_wysiwyg() {
315  
-		require_once ABSPATH . '/wp-admin/includes/post.php';
  316
+        require_once ABSPATH . '/wp-admin/includes/post.php';
316 317
 
317  
-		wp_tiny_mce(false, array(
318  
-			'editor_selector' => 'theEditor'
319  
-		));
  318
+        wp_tiny_mce(false, array('editor_selector' => 'theEditor'));
  319
+		// wp_editor( '', 'theeditor', $settings = array() );
  320
+		
320 321
 	}
321 322
 
322 323
 	/******************** END WYSIWYG **********************/
@@ -325,9 +326,10 @@ function add_script_wysiwyg() {
325 326
 
326 327
 	// Add meta fields for taxonomies
327 328
 	function add() {
328  
-		foreach (get_taxonomies(array('show_ui' => true)) as $tax_name) {
  329
+		//foreach (get_taxonomies(array('show_ui' => true)) as $tax_name) {
  330
+		foreach (get_taxonomies() as $tax_name) {
329 331
 			if (in_array($tax_name, $this->_taxonomies)) {
330  
-				add_action($tax_name . '_edit_form', array(&$this, 'show'), 10, 2);
  332
+				add_action($tax_name . '_edit_form', array(&$this, 'show'), 9, 2);
331 333
 			}
332 334
 		}
333 335
 	}
@@ -411,7 +413,8 @@ function show_field_checkbox($field, $meta) {
411 413
 
412 414
 	function show_field_wysiwyg($field, $meta) {
413 415
 		$this->show_field_begin($field, $meta);
414  
-		echo "<textarea name='{$field['id']}' id='{$field['id']}' class='{$field['id']} theEditor' cols='60' rows='15' style='{$field['style']}'>$meta</textarea>";
  416
+		//echo "<textarea name='{$field['id']}' id='{$field['id']}' class='{$field['id']} theEditor' cols='60' rows='15' style='{$field['style']}'>$meta</textarea>";
  417
+		wp_editor( $meta, $field["id"], array('textarea_name'=>$field["id"],'editor_class'=> $field["id"].' theEditor') );
415 418
 		$this->show_field_end($field, $meta);
416 419
 	}
417 420
 

0 notes on commit 81caf81

Please sign in to comment.
Something went wrong with that request. Please try again.