Plugin Directory

Changeset 197142


Ignore:
Timestamp:
01/23/2010 04:39:04 PM (16 years ago)
Author:
johncoswell
Message:

updating to 0.2.1

Location:
post-fixtures
Files:
4 edited
6 copied

Legend:

Unmodified
Added
Removed
  • post-fixtures/tags/0.2.1/classes/PostFixtures.inc

    r194981 r197142  
    66class PostFixtures {
    77    var $messages;
     8    var $created_categories = array();
    89
    910    /**
     
    263264        foreach ($nodes as $node) {
    264265            $joined_nodes[] = $node;
    265             $parent = $category_ids_by_slug[implode('/', $joined_nodes)] = wp_insert_category(array('cat_name' => $node, 'category_nicename' => $node, 'category_parent' => $parent));
     266            $key = implode('/', $joined_nodes);
     267
     268            if (isset($this->created_categories[$key])) {
     269                $parent = $this->created_categories[$key];
     270            } else {
     271              $parent = wp_insert_category(array('cat_name' => $node, 'category_nicename' => $node, 'category_parent' => $parent));
     272              $this->created_categories[$key] = $parent;
     273            }
     274            $category_ids_by_slug[$key] = $parent;
    266275        }
    267276        return $category_ids_by_slug;
  • post-fixtures/tags/0.2.1/post-fixtures.php

    r194981 r197142  
    44Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
    55Description: Tear down and build up well crafted posts, categories, meta data, and other WordPress data in a test environment.
    6 Version: 0.2
     6Version: 0.2.1
    77Author: John Bintz
    88Author URI: http://www.coswellproductions.com/wordpress/
  • post-fixtures/tags/0.2.1/readme.txt

    r194981 r197142  
    55Requires at least: 2.8
    66Tested up to: 2.9.1
    7 Stable tag: 0.2
     7Stable tag: 0.2.1
    88
    99Post Fixtures let you quickly tear down and set up test environments within your development WordPress environment.
     
    105105== Changelog ==
    106106
     107= 0.2.1 =
     108
     109* Bugfix for multiple generated nested categories.
     110
    107111= 0.2 =
    108112
     
    111115== Upgrade Notice ==
    112116
     117= 0.2.1 =
     118
     119* Bugfix for multiple generated nested categories.
     120
    113121= 0.2 =
    114122
  • post-fixtures/trunk/classes/PostFixtures.inc

    r194981 r197142  
    66class PostFixtures {
    77    var $messages;
     8    var $created_categories = array();
    89
    910    /**
     
    263264        foreach ($nodes as $node) {
    264265            $joined_nodes[] = $node;
    265             $parent = $category_ids_by_slug[implode('/', $joined_nodes)] = wp_insert_category(array('cat_name' => $node, 'category_nicename' => $node, 'category_parent' => $parent));
     266            $key = implode('/', $joined_nodes);
     267
     268            if (isset($this->created_categories[$key])) {
     269                $parent = $this->created_categories[$key];
     270            } else {
     271              $parent = wp_insert_category(array('cat_name' => $node, 'category_nicename' => $node, 'category_parent' => $parent));
     272              $this->created_categories[$key] = $parent;
     273            }
     274            $category_ids_by_slug[$key] = $parent;
    266275        }
    267276        return $category_ids_by_slug;
  • post-fixtures/trunk/post-fixtures.php

    r194981 r197142  
    44Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
    55Description: Tear down and build up well crafted posts, categories, meta data, and other WordPress data in a test environment.
    6 Version: 0.2
     6Version: 0.2.1
    77Author: John Bintz
    88Author URI: http://www.coswellproductions.com/wordpress/
  • post-fixtures/trunk/readme.txt

    r194981 r197142  
    55Requires at least: 2.8
    66Tested up to: 2.9.1
    7 Stable tag: 0.2
     7Stable tag: 0.2.1
    88
    99Post Fixtures let you quickly tear down and set up test environments within your development WordPress environment.
     
    105105== Changelog ==
    106106
     107= 0.2.1 =
     108
     109* Bugfix for multiple generated nested categories.
     110
    107111= 0.2 =
    108112
     
    111115== Upgrade Notice ==
    112116
     117= 0.2.1 =
     118
     119* Bugfix for multiple generated nested categories.
     120
    113121= 0.2 =
    114122
Note: See TracChangeset for help on using the changeset viewer.