Closed brajeshwar closed 12 years ago
You can simply add another key to the packages array with the theme slug or plugin slug and all the info about the theme or plugin. Like below.
$packages['theme'] = array( //Replace theme with theme stylesheet slug that the update is for
'versions' => array(
'1.0' => array( //Array name should be set to current version of update
'version' => '1.0', //Current version available
'date' => '2010-04-10', //Date version was released
/*
Remove line below if using one time download link
*/
'package' => 'http://url_to_your_site/theme.zip', // The zip file of the theme update
/*
Use below value if using the one time download link. Point to location of download.php file on your server.
*/
//'package' => 'http://url_to_your_site/download.php?key=' . $strKey,
//'file_name' => 'theme.zip', //File name of theme zip file
'author' => 'Author Name', //Author of theme
'name' => 'Theme Name', //Name of theme
'requires'=> '3.1', //Wordpress version required
'tested' => '3.1', //WordPress version tested up to
'screenshot_url'=> 'http://url_to_your_theme_site/screenshot.png' //url of screenshot of theme
)
),
'info' => array(
'url' => 'http://url_to_your_theme_site' // Website devoted to theme if available
)
);
$packages['second-theme'] = array( //Replace theme with theme stylesheet slug that the update is for
'versions' => array(
'2.0' => array( //Array name should be set to current version of update
'version' => '2.0', //Current version available
'date' => '2010-04-10', //Date version was released
/*
Remove line below if using one time download link
*/
'package' => 'http://url_to_your_site/theme.zip', // The zip file of the theme update
/*
Use below value if using the one time download link. Point to location of download.php file on your server.
*/
//'package' => 'http://url_to_your_site/download.php?key=' . $strKey,
//'file_name' => 'theme.zip', //File name of theme zip file
'author' => 'Author Name', //Author of theme
'name' => 'Theme Name', //Name of theme
'requires'=> '3.1', //Wordpress version required
'tested' => '3.1', //WordPress version tested up to
'screenshot_url'=> 'http://url_to_your_theme_site/screenshot.png' //url of screenshot of theme
)
),
'info' => array(
'url' => 'http://url_to_your_theme_site' // Website devoted to theme if available
)
);
Looking at the codes, it looks more like, it's setup for a single theme or a single plugin. Are you working on making this a way to be like a central setup to update multiple plugins and themes?