1 Commits
1.0.1 ... 1.0.2

Author SHA1 Message Date
23606ea4f4 Fix plugin details popup metadata 2026-04-13 22:47:39 +02:00

View File

@@ -88,15 +88,32 @@ final class KGV_Updater {
$repo_url = isset( $plugin_data['UpdateURI'] ) ? $plugin_data['UpdateURI'] : ''; $repo_url = isset( $plugin_data['UpdateURI'] ) ? $plugin_data['UpdateURI'] : '';
$release = $this->get_release_data( $repo_url ); $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( return (object) array(
'name' => $plugin_data['Name'], 'name' => $plugin_data['Name'],
'slug' => dirname( $plugin_file ), 'slug' => dirname( $plugin_file ),
'version' => ! empty( $release['version'] ) ? $release['version'] : $plugin_data['Version'], 'version' => ! empty( $release['version'] ) ? $release['version'] : $plugin_data['Version'],
'author' => $plugin_data['AuthorName'], 'author' => $author_display,
'homepage' => $repo_url, 'author_profile'=> $author_uri,
'section' => array( 'homepage' => $homepage,
'plugin_url' => $homepage,
'sections' => array(
'description' => ! empty( $plugin_data['Description'] ) ? $plugin_data['Description'] : 'KGV Plugin aus Gitea.', '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'] : '', 'download_link' => ! empty( $release['package'] ) ? $release['package'] : '',
); );