Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23606ea4f4 |
@@ -88,15 +88,32 @@ final class KGV_Updater {
|
||||
|
||||
$repo_url = isset( $plugin_data['UpdateURI'] ) ? $plugin_data['UpdateURI'] : '';
|
||||
$release = $this->get_release_data( $repo_url );
|
||||
$homepage = ! empty( $plugin_data['PluginURI'] ) ? $plugin_data['PluginURI'] : $repo_url;
|
||||
|
||||
$author_name = isset( $plugin_data['AuthorName'] ) ? (string) $plugin_data['AuthorName'] : '';
|
||||
$author_uri = isset( $plugin_data['AuthorURI'] ) ? (string) $plugin_data['AuthorURI'] : '';
|
||||
$author_display = $author_name;
|
||||
|
||||
if ( '' !== $author_name && '' !== $author_uri ) {
|
||||
$author_display = sprintf(
|
||||
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
|
||||
esc_url( $author_uri ),
|
||||
esc_html( $author_name )
|
||||
);
|
||||
}
|
||||
|
||||
return (object) array(
|
||||
'name' => $plugin_data['Name'],
|
||||
'slug' => dirname( $plugin_file ),
|
||||
'version' => ! empty( $release['version'] ) ? $release['version'] : $plugin_data['Version'],
|
||||
'author' => $plugin_data['AuthorName'],
|
||||
'homepage' => $repo_url,
|
||||
'section' => array(
|
||||
'author' => $author_display,
|
||||
'author_profile'=> $author_uri,
|
||||
'homepage' => $homepage,
|
||||
'plugin_url' => $homepage,
|
||||
'sections' => array(
|
||||
'description' => ! empty( $plugin_data['Description'] ) ? $plugin_data['Description'] : 'KGV Plugin aus Gitea.',
|
||||
'installation' => 'Installation erfolgt wie gewohnt in WordPress. Updates werden automatisch ueber KGV Updater bereitgestellt.',
|
||||
'changelog' => 'Aktuelle Version: ' . ( ! empty( $release['version'] ) ? $release['version'] : $plugin_data['Version'] ),
|
||||
),
|
||||
'download_link' => ! empty( $release['package'] ) ? $release['package'] : '',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user