\PluginInfo

A container class for holding and transforming various plugin metadata.

Summary

Methods
Properties
Constants
fromJson()
toWpFormat()
$name
$slug
$version
$homepage
$sections
$banners
$download_url
$author
$author_homepage
$requires
$tested
$upgrade_notice
$icons
$rating
$num_ratings
$downloaded
$last_updated
$id
$filename
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : 

Type

$slug

$slug : 

Type

$version

$version : 

Type

$homepage

$homepage : 

Type

$sections

$sections : 

Type

$banners

$banners : 

Type

$download_url

$download_url : 

Type

$author

$author : 

Type

$author_homepage

$author_homepage : 

Type

$requires

$requires : 

Type

$tested

$tested : 

Type

$upgrade_notice

$upgrade_notice : 

Type

$icons

$icons : 

Type

$rating

$rating : 

Type

$num_ratings

$num_ratings : 

Type

$downloaded

$downloaded : 

Type

$last_updated

$last_updated : 

Type

$id

$id : 

Type

$filename

$filename : 

Type

Methods

fromJson()

fromJson(string  $json, boolean  $triggerErrors = false) : \PluginInfo|null

Create a new instance of PluginInfo from JSON-encoded plugin info returned by an external update API.

Parameters

string $json

Valid JSON string representing plugin info.

boolean $triggerErrors

Returns

\PluginInfo|null —

New instance of PluginInfo, or NULL on error.

toWpFormat()

toWpFormat() : object

Transform plugin info into the format used by the native WordPress.org API

Returns

object