Add autoupdate field to plugin update info
This commit is contained in:
parent
07a4c2586f
commit
4f87723b6a
|
|
@ -39,6 +39,7 @@ if ( !class_exists(PluginInfo::class, false) ):
|
|||
public $downloaded;
|
||||
public $active_installs;
|
||||
public $last_updated;
|
||||
public $autoupdate;
|
||||
|
||||
public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@ if ( !class_exists(Update::class, false) ):
|
|||
public $requires_php = false;
|
||||
public $icons = array();
|
||||
public $filename; //Plugin filename relative to the plugins directory.
|
||||
public $autoupdate;
|
||||
|
||||
protected static $extraFields = array(
|
||||
'id', 'homepage', 'tested', 'requires_php', 'upgrade_notice', 'icons', 'filename',
|
||||
'id', 'homepage', 'tested', 'requires_php', 'upgrade_notice', 'icons', 'filename', 'autoupdate',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
@ -86,6 +87,7 @@ if ( !class_exists(Update::class, false) ):
|
|||
$update->tested = $this->tested;
|
||||
$update->requires_php = $this->requires_php;
|
||||
$update->plugin = $this->filename;
|
||||
$update->autoupdate = $this->autoupdate;
|
||||
|
||||
if ( !empty($this->upgrade_notice) ) {
|
||||
$update->upgrade_notice = $this->upgrade_notice;
|
||||
|
|
|
|||
Loading…
Reference in New Issue