mirror of
https://github.com/WenPai-org/wpfonts.git
synced 2025-10-06 00:04:07 +08:00
集成更新服务器
This commit is contained in:
parent
d1d3b9606f
commit
cf165c6c26
124 changed files with 13125 additions and 1 deletions
38
lib/plugin-update-checker/Puc/v5p3/Update.php
Normal file
38
lib/plugin-update-checker/Puc/v5p3/Update.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
namespace YahnisElsts\PluginUpdateChecker\v5p3;
|
||||
|
||||
use stdClass;
|
||||
|
||||
if ( !class_exists(Update::class, false) ):
|
||||
|
||||
/**
|
||||
* A simple container class for holding information about an available update.
|
||||
*
|
||||
* @author Janis Elsts
|
||||
* @access public
|
||||
*/
|
||||
abstract class Update extends 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;
|
Loading…
Add table
Add a link
Reference in a new issue