orgen-theme/theme-update-checker/Puc/v4p8/Update.php
2023-04-06 16:58:33 +08:00

35 lines
707 B
PHP

<?php
if ( !class_exists('Puc_v4p8_Update', false) ):
/**
* A simple container class for holding information about an available update.
*
* @author Janis Elsts
* @access public
*/
abstract class Puc_v4p8_Update extends Puc_v4p8_Metadata {
public $slug;
public $version;
public $download_url;
public $translations = array();
/**
* @return string[]
*/
protected function getFieldNames() {
return array('slug', 'version', 'download_url', 'translations');
}
public function toWpFormat() {
$update = new stdClass();
$update->slug = $this->slug;
$update->new_version = $this->version;
$update->package = $this->download_url;
return $update;
}
}
endif;