WordPress.org

Plugin Directory

Changeset 601284


Ignore:
Timestamp:
09/19/12 21:16:03 (19 months ago)
Author:
MrWiblog
Message:

1.1: Added support for creating random post dates (thanks to derscheinwelt for the suggestion and code).

Location:
demo-data-creator/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • demo-data-creator/trunk/demodata.php

    r494778 r601284  
    44Plugin URI: http://www.stillbreathing.co.uk/wordpress/demo-data-creator/ 
    55Description: Demo Data Creator is a Wordpress, WPMU and BuddyPress plugin that allows a Wordpress developer to create demo users, blogs, posts, comments and blogroll links for a Wordpress site. For BuddyPress you can also create user friendships, user statuses, user wire posts, groups, group members and group wire posts. PLEASE NOTE: deleting the data created by this plugin will delete EVERYTHING (pages, posts, comments, users - everything) on your site, so DO NOT use on a production site, or one where you want to save the data. 
    6 Version: 1.0 
     6Version: 1.1 
    77Author: Chris Taylor 
    88Author URI: http://www.stillbreathing.co.uk 
     
    1414$register->slug = "demodata"; 
    1515$register->name = "Demo Data Creator"; 
    16 $register->version = "1.0"; 
     16$register->version = "1.1"; 
    1717$register->developer = "Chris Taylor"; 
    1818$register->homepage = "http://www.stillbreathing.co.uk"; 
     
    16931693    // generate the random post data 
    16941694    $postcontent = demodata_generate_html(rand(1, $maxpostlength)); 
     1695    // generate random date (thanks to derscheinwelt for this: http://wordpress.org/support/topic/plugin-demo-data-creator-random-creation-date) 
     1696    $randdate = date('Y-m-d H:i:s', strtotime( mt_rand(-1095,10).' days' . mt_rand(0,1440). 'minutes' )); 
    16951697    // generate array of category ids 
    16961698    $cats = demodata_random_categories($blogdomain); 
    16971699    $post = array('post_status' => 'live', 
     1700    'post_date' => $randdate, 
    16981701    'post_type' => 'post', 
    16991702    'post_author' => $userid, 
  • demo-data-creator/trunk/readme.txt

    r494778 r601284  
    55Requires at least: 2.7 
    66Tested up to: 3.3.1 
    7 Stable tag: 1 
     7Stable tag: 1.1 
    88 
    99Demo Data Creator is a Wordpress and BuddyPress plugin that allows a Wordpress developer to create demo users, blogs, posts, comments and blogroll links for a Wordpress site. For BuddyPress you can also create user friendships, user statuses, user wire posts, groups, group members and group wire posts. 
     
    4242Post content and comment text is automatically generated from Lorem ipsum text, for post content it's even HTML-formatted. 
    4343 
     44Thanks to derscheinwelt for the suggestion and code to create random dates for posts. 
     45 
    4446== Installation == 
    4547 
     
    6567 
    6668== Changelog == 
     69 
     70= 1.1 (2012/09/18) = 
     71 
     72Added support for creating random post dates (thanks to derscheinwelt for the suggestion and code). 
    6773 
    6874= 1.0 (2012/01/24) = 
Note: See TracChangeset for help on using the changeset viewer.