-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy_seed.php
More file actions
26 lines (22 loc) · 780 Bytes
/
copy_seed.php
File metadata and controls
26 lines (22 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/*
Name: copy_skin.php
Author: Tim Milligan
Description: Copies the seed data from one skin to another. You can then generate a zip file for the new skin and distribute it normally.
Version: 2.0
*/
// Thesis 2 skin you're trying to generate the seed for:
$original_skin = 'thesis_classic';
$new_skin = 'test';
// Initialize arrays
$seed = array();
$items = array('boxes', 'templates', 'packages', 'snippets', 'vars', 'css', 'css_custom');
// Connect to WP
define('WP_USE_THEMES', false);
define('WP_DEBUG', false);
require('wp-blog-header.php');
foreach ($items as $item) {
$seed[$item] = get_option(sprintf('%s_%s', $original_skin, $item), '');
update_option(sprintf('%s_%s', $new_skin, $item), $seed[$item]);
}
echo "[$new_skin] seeded with [$original_skin] data.";