6 Commits

Author SHA1 Message Date
2a36fa7e31 chore: bump version to 1.9.8
All checks were successful
Build & Release Plugin / release (push) Successful in 14s
2026-02-01 04:46:27 +00:00
github-actions[bot]
4b05d67a82 chore: update manifest.json 2026-02-01 04:37:32 +00:00
71424567bf chore: bump version to 1.9.7
All checks were successful
Build & Release Plugin / release (push) Successful in 15s
2026-02-01 04:36:30 +00:00
82da1180da fix: include owner and repository in license verification request
All checks were successful
Build & Release Plugin / release (push) Successful in 6s
2026-02-01 04:36:06 +00:00
2c749eebd5 fix: enhance license validation logic in SitiWebUpdater2
All checks were successful
Build & Release Plugin / release (push) Successful in 5s
2026-02-01 04:10:01 +00:00
github-actions[bot]
04a0c8be37 chore: update manifest.json 2026-02-01 04:02:03 +00:00
3 changed files with 241 additions and 182 deletions

View File

@@ -2,7 +2,7 @@
/**
* Plugin Name: SitiAI Product Teksten
* Description: Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.
* Version: 1.9.6
* Version: 1.9.8
* Author: Roberto Guagliardo | SitiWeb
* Author URI: https://sitiweb.nl/
* Text Domain: siti-ai-product-content-generator

View File

@@ -6,7 +6,8 @@
* Updates plugins via the Siti Plugin Repo API instead of GitHub
* Fully self-contained with built-in license management
*/
class SitiWebUpdater2 {
class SitiWebUpdater2
{
private static $instances = array();
private static $global_settings_registered = false;
@@ -22,178 +23,217 @@ class SitiWebUpdater2 {
private $plugin_response;
private $option_prefix;
public function __construct( $file ) {
public function __construct($file)
{
$this->file = $file;
$this->option_prefix = 'siti_updater_' . sanitize_key( dirname( plugin_basename( $this->file ) ) ) . '_';
$this->option_prefix = 'siti_updater_' . sanitize_key(dirname(plugin_basename($this->file))) . '_';
$this->set_plugin_properties();
// Register this instance globally
self::$instances[ $this->option_prefix ] = $this;
self::$instances[$this->option_prefix] = $this;
add_action( 'admin_init', array( $this, 'set_plugin_properties' ) );
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
add_action( 'siti_updater_daily_check_' . $this->option_prefix, array( $this, 'daily_license_check' ) );
add_action('admin_init', array($this, 'set_plugin_properties'));
add_action('admin_notices', array($this, 'admin_notices'));
add_action('siti_updater_daily_check_' . $this->option_prefix, array($this, 'daily_license_check'));
if ( ! wp_next_scheduled( 'siti_updater_daily_check_' . $this->option_prefix ) ) {
wp_schedule_event( time(), 'daily', 'siti_updater_daily_check_' . $this->option_prefix );
if (!wp_next_scheduled('siti_updater_daily_check_' . $this->option_prefix)) {
wp_schedule_event(time(), 'daily', 'siti_updater_daily_check_' . $this->option_prefix);
}
return $this;
}
public function initialize() {
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_for_updates' ) );
add_filter( 'plugins_api', array( $this, 'plugin_info' ), 10, 3 );
public function initialize()
{
add_filter('pre_set_site_transient_update_plugins', array($this, 'check_for_updates'));
add_filter('plugins_api', array($this, 'plugin_info'), 10, 3);
// Register global settings page only once
if ( ! self::$global_settings_registered ) {
add_action( 'admin_menu', array( $this, 'add_global_settings_page' ) );
if (!self::$global_settings_registered) {
add_action('admin_menu', array($this, 'add_global_settings_page'));
self::$global_settings_registered = true;
}
}
public function set_plugin_properties() {
if ( ! function_exists( 'get_plugin_data' ) ) {
public function set_plugin_properties()
{
if (!function_exists('get_plugin_data')) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$this->plugin = get_plugin_data( $this->file, false, false );
$this->basename = plugin_basename( $this->file );
$this->active = is_plugin_active( $this->basename );
$this->plugin = get_plugin_data($this->file, false, false);
$this->basename = plugin_basename($this->file);
$this->active = is_plugin_active($this->basename);
}
public static function get_instances() {
public static function get_instances()
{
return self::$instances;
}
public function get_plugin_data() {
public function get_plugin_data()
{
return $this->plugin;
}
public function set_owner( $owner ) {
public function set_owner($owner)
{
$this->owner = $owner;
}
public function set_repository( $repository ) {
public function set_repository($repository)
{
$this->repository = $repository;
}
public function set_license_key( $key ) {
$sanitized_key = sanitize_text_field( (string) $key );
$stored_key = get_option( $this->option_prefix . 'license_key', '' );
public function set_license_key($key)
{
$sanitized_key = sanitize_text_field((string) $key);
$stored_key = get_option($this->option_prefix . 'license_key', '');
if ( $stored_key !== $sanitized_key ) {
if ($stored_key !== $sanitized_key) {
$this->clear_cached_license_data();
}
$this->license_key = $sanitized_key;
update_option( $this->option_prefix . 'license_key', $sanitized_key );
update_option($this->option_prefix . 'license_key', $sanitized_key);
}
public function get_license_key() {
if ( null === $this->license_key ) {
$this->license_key = get_option( $this->option_prefix . 'license_key', '' );
public function get_license_key()
{
if (null === $this->license_key) {
$this->license_key = get_option($this->option_prefix . 'license_key', '');
}
return $this->license_key;
}
public function get_license_data() {
public function get_license_data()
{
return $this->get_stored_license_data();
}
public function set_api_base_url( $api_base_url ) {
$this->api_base_url = rtrim( (string) $api_base_url, '/' );
public function set_api_base_url($api_base_url)
{
$this->api_base_url = rtrim((string) $api_base_url, '/');
}
private function get_stored_license_data() {
$data = get_option( $this->option_prefix . 'license_data', array() );
private function normalize_version($version)
{
if (!is_string($version)) {
return $version;
}
return is_array( $data ) ? $data : array();
$version = trim($version);
if ('' === $version) {
return $version;
}
if (0 === stripos($version, 'v')) {
$version = ltrim($version, 'vV');
}
return $version;
}
private function clear_cached_license_data() {
delete_option( $this->option_prefix . 'license_data' );
delete_option( $this->option_prefix . 'last_check' );
private function get_stored_license_data()
{
$data = get_option($this->option_prefix . 'license_data', array());
return is_array($data) ? $data : array();
}
private function store_license_data( $body ) {
if ( ! is_array( $body ) ) {
private function clear_cached_license_data()
{
delete_option($this->option_prefix . 'license_data');
delete_option($this->option_prefix . 'last_check');
}
private function store_license_data($body)
{
if (!is_array($body)) {
$body = array();
}
$license_data = array();
if ( isset( $body['license'] ) && is_array( $body['license'] ) ) {
if (isset($body['license']) && is_array($body['license'])) {
$license_data = $body['license'];
}
if ( empty( $license_data['key'] ) ) {
if (empty($license_data['key'])) {
$license_data['key'] = $this->get_license_key();
}
$license_data['licenseValid'] = !empty($body['valid']);
$version = null;
if ( isset( $body['pluginVersion'] ) && $body['pluginVersion'] ) {
if (isset($body['pluginVersion']) && $body['pluginVersion']) {
$version = $body['pluginVersion'];
} elseif ( isset( $body['version'] ) && $body['version'] ) {
} elseif (isset($body['version']) && $body['version']) {
$version = $body['version'];
} elseif ( isset( $license_data['pluginVersion'] ) && $license_data['pluginVersion'] ) {
} elseif (isset($license_data['pluginVersion']) && $license_data['pluginVersion']) {
$version = $license_data['pluginVersion'];
}
if ( $version ) {
$license_data['pluginVersion'] = $version;
if ($version) {
$license_data['pluginVersion'] = $this->normalize_version($version);
}
update_option( $this->option_prefix . 'license_data', $license_data );
update_option( $this->option_prefix . 'last_check', current_time( 'mysql' ) );
update_option($this->option_prefix . 'license_data', $license_data);
update_option($this->option_prefix . 'last_check', current_time('mysql'));
}
private function get_plugin_info() {
if ( is_null( $this->plugin_response ) ) {
$request_uri = sprintf( '%s/api/plugins/%s/%s', $this->api_base_url, $this->owner, $this->repository );
private function get_plugin_info()
{
if (is_null($this->plugin_response)) {
$request_uri = sprintf('%s/api/plugins/%s/%s', $this->api_base_url, $this->owner, $this->repository);
$response = wp_remote_get( $request_uri, array( 'timeout' => 15 ) );
$response = wp_remote_get($request_uri, array('timeout' => 15));
if ( is_wp_error( $response ) ) {
if (is_wp_error($response)) {
$this->plugin_response = false;
return;
}
$code = wp_remote_retrieve_response_code( $response );
if ( 200 !== $code ) {
$code = wp_remote_retrieve_response_code($response);
if (200 !== $code) {
$this->plugin_response = false;
return;
}
$body = json_decode( wp_remote_retrieve_body( $response ), true );
$body = json_decode(wp_remote_retrieve_body($response), true);
if (is_array($body) && isset($body['version'])) {
$body['version'] = $this->normalize_version($body['version']);
}
$this->plugin_response = $body;
}
}
public function check_for_updates( $transient ) {
if ( empty( $transient->checked ) ) {
public function check_for_updates($transient)
{
if (empty($transient->checked)) {
return $transient;
}
$this->get_plugin_info();
if ( false === $this->plugin_response || empty( $this->plugin_response['version'] ) ) {
if (false === $this->plugin_response || empty($this->plugin_response['version'])) {
return $transient;
}
$remote_version = $this->plugin_response['version'];
$current_version = $this->plugin['Version'];
$remote_version = $this->normalize_version($this->plugin_response['version']);
$current_version = $this->normalize_version($this->plugin['Version']);
if ( version_compare( $remote_version, $current_version, '>' ) ) {
$download_url = $this->get_download_url( 'latest' );
if ($remote_version && version_compare($remote_version, $current_version, '>')) {
$download_url = $this->get_download_url('latest');
if ( ! is_wp_error( $download_url ) ) {
$transient->response[ $this->basename ] = (object) array(
'slug' => dirname( $this->basename ),
if (!is_wp_error($download_url)) {
$transient->response[$this->basename] = (object) array(
'slug' => dirname($this->basename),
'new_version' => $remote_version,
'package' => $download_url,
'tested' => get_bloginfo( 'version' ),
'url' => $this->plugin_response['homepage'] ?? '',
'package' => $download_url,
'tested' => get_bloginfo('version'),
'url' => $this->plugin_response['homepage'] ?? '',
);
}
}
@@ -201,177 +241,196 @@ class SitiWebUpdater2 {
return $transient;
}
public function plugin_info( $result, $action, $args ) {
if ( 'plugin_information' !== $action || $args->slug !== dirname( $this->basename ) ) {
public function plugin_info($result, $action, $args)
{
if ('plugin_information' !== $action || $args->slug !== dirname($this->basename)) {
return $result;
}
$this->get_plugin_info();
if ( false === $this->plugin_response ) {
if (false === $this->plugin_response) {
return $result;
}
return (object) array(
'name' => $this->plugin_response['name'] ?? $this->plugin['Name'],
'slug' => $args->slug,
'version' => $this->plugin_response['version'],
'author' => $this->plugin_response['author'] ?? $this->plugin['Author'],
'name' => $this->plugin_response['name'] ?? $this->plugin['Name'],
'slug' => $args->slug,
'version' => $this->normalize_version($this->plugin_response['version'] ?? $this->plugin['Version']),
'author' => $this->plugin_response['author'] ?? $this->plugin['Author'],
'author_profile' => $this->plugin_response['author_url'] ?? $this->plugin['AuthorURI'],
'homepage' => $this->plugin_response['homepage'] ?? '',
'requires' => $this->plugin_response['requires'] ?? '',
'tested' => $this->plugin_response['tested'] ?? get_bloginfo( 'version' ),
'downloaded' => $this->plugin_response['downloads'] ?? 0,
'last_updated' => $this->plugin_response['last_updated'] ?? '',
'sections' => array(
'homepage' => $this->plugin_response['homepage'] ?? '',
'requires' => $this->plugin_response['requires'] ?? '',
'tested' => $this->plugin_response['tested'] ?? get_bloginfo('version'),
'downloaded' => $this->plugin_response['downloads'] ?? 0,
'last_updated' => $this->plugin_response['last_updated'] ?? '',
'sections' => array(
'description' => $this->plugin_response['description'] ?? $this->plugin['Description'],
'changelog' => $this->plugin_response['changelog'] ?? '',
'changelog' => $this->plugin_response['changelog'] ?? '',
),
'download_link' => $this->get_download_url( 'latest' ),
'download_link' => $this->get_download_url('latest'),
);
}
private function get_download_url( $version = 'latest' ) {
private function get_download_url($version = 'latest')
{
$license_key = $this->get_license_key();
if ( empty( $license_key ) ) {
return new WP_Error( 'no_license', 'Geen licentie ingesteld' );
if (empty($license_key)) {
return new WP_Error('no_license', 'Geen licentie ingesteld');
}
$hostname = parse_url( home_url(), PHP_URL_HOST );
return $this->api_base_url . '/api/licenses/download?key=' . urlencode( $license_key ) . '&hostname=' . urlencode( $hostname ) . '&version=' . urlencode( $version );
$hostname = parse_url(home_url(), PHP_URL_HOST);
return $this->api_base_url . '/api/licenses/download?key=' . urlencode($license_key) . '&hostname=' . urlencode($hostname) . '&version=' . urlencode($version);
}
public function verify_license() {
public function verify_license()
{
$license_key = $this->get_license_key();
if ( empty( $license_key ) ) {
return new WP_Error( 'missing_license', 'Geen licentiecode ingesteld.' );
if (empty($license_key)) {
return new WP_Error('missing_license', 'Geen licentiecode ingesteld.');
}
$hostname = parse_url( home_url(), PHP_URL_HOST );
$current_version = isset( $this->plugin['Version'] ) ? $this->plugin['Version'] : null;
$response = wp_remote_post( $this->api_base_url . '/api/licenses/verify', array(
$hostname = parse_url(home_url(), PHP_URL_HOST);
$current_version = isset($this->plugin['Version']) ? $this->plugin['Version'] : null;
$response = wp_remote_post($this->api_base_url . '/api/licenses/verify', array(
'headers' => array(
'Content-Type' => 'application/json',
),
'body' => wp_json_encode( array(
'key' => $license_key,
'hostname' => $hostname,
'currentVersion' => $current_version,
) ),
'body' => wp_json_encode(array(
'key' => $license_key,
'hostname' => $hostname,
'currentVersion' => $current_version,
'owner' => $this->owner,
'repository' => $this->repository,
)),
'timeout' => 15,
) );
));
if ( is_wp_error( $response ) ) {
if (is_wp_error($response)) {
return $response;
}
$code = wp_remote_retrieve_response_code( $response );
$body = json_decode( wp_remote_retrieve_body( $response ), true );
$code = wp_remote_retrieve_response_code($response);
$body = json_decode(wp_remote_retrieve_body($response), true);
if ( ! is_array( $body ) ) {
if (!is_array($body)) {
$this->clear_cached_license_data();
return new WP_Error( 'verification_failed', 'Onverwacht antwoord van licentieserver.' );
return new WP_Error('verification_failed', 'Onverwacht antwoord van licentieserver.');
}
$has_license_payload = isset( $body['license'] ) || isset( $body['pluginVersion'] ) || isset( $body['version'] );
$has_license_payload = isset($body['license']) || isset($body['pluginVersion']) || isset($body['version']);
if ( 200 !== $code ) {
if ( $has_license_payload ) {
$this->store_license_data( $body );
if (200 !== $code) {
if ($has_license_payload) {
$this->store_license_data($body);
} else {
$this->clear_cached_license_data();
}
$error_message = isset( $body['error'] ) ? $body['error'] : 'Licentie verificatie mislukt.';
return new WP_Error( 'verification_failed', $error_message );
$error_message = isset($body['error']) ? $body['error'] : 'Licentie verificatie mislukt.';
return new WP_Error('verification_failed', $error_message);
}
if ( empty( $body['valid'] ) ) {
if ( $has_license_payload ) {
$this->store_license_data( $body );
if (empty($body['valid'])) {
if ($has_license_payload) {
$this->store_license_data($body);
} else {
$this->clear_cached_license_data();
}
return new WP_Error( 'invalid_license', 'Licentie is ongeldig.' );
return new WP_Error('invalid_license', 'Licentie is ongeldig.');
}
$this->store_license_data( $body );
$this->store_license_data($body);
return $body;
}
public function is_license_valid() {
public function is_license_valid()
{
$data = $this->get_license_data();
return ! empty( $data ) && ! empty( $data['key'] );
if (empty($data) || empty($data['key'])) {
return false;
}
if (isset($data['licenseValid'])) {
return (bool) $data['licenseValid'];
}
return true;
}
public function get_latest_known_version() {
public function get_latest_known_version()
{
$this->get_plugin_info();
if ( ! empty( $this->plugin_response['version'] ) ) {
return $this->plugin_response['version'];
if (!empty($this->plugin_response['version'])) {
return $this->normalize_version($this->plugin_response['version']);
}
$license_data = $this->get_license_data();
if ( isset( $license_data['pluginVersion'] ) && $license_data['pluginVersion'] ) {
return $license_data['pluginVersion'];
if (isset($license_data['pluginVersion']) && $license_data['pluginVersion']) {
return $this->normalize_version($license_data['pluginVersion']);
}
return null;
}
public function admin_notices() {
if ( ! current_user_can( 'manage_options' ) ) {
public function admin_notices()
{
if (!current_user_can('manage_options')) {
return;
}
if ( ! $this->is_license_valid() ) {
$settings_url = admin_url( 'options-general.php?page=siti-plugin-licenses' );
if (!$this->is_license_valid()) {
$settings_url = admin_url('options-general.php?page=siti-plugin-licenses');
echo '<div class="notice notice-error"><p>';
printf(
esc_html__( '%s: Licentie ongeldig of niet ingesteld. Ga naar %s om je licentie in te voeren.', 'siti-updater' ),
esc_html( $this->plugin['Name'] ),
'<a href="' . esc_url( $settings_url ) . '">' . esc_html__( 'plugin licenties', 'siti-updater' ) . '</a>'
esc_html__('%s: Licentie ongeldig of niet ingesteld. Ga naar %s om je licentie in te voeren.', 'siti-updater'),
esc_html($this->plugin['Name']),
'<a href="' . esc_url($settings_url) . '">' . esc_html__('plugin licenties', 'siti-updater') . '</a>'
);
echo '</p></div>';
}
}
public function daily_license_check() {
public function daily_license_check()
{
$result = $this->verify_license();
if ( is_wp_error( $result ) ) {
error_log( $this->plugin['Name'] . ' License check failed: ' . $result->get_error_message() );
if (is_wp_error($result)) {
error_log($this->plugin['Name'] . ' License check failed: ' . $result->get_error_message());
}
}
public function add_global_settings_page() {
public function add_global_settings_page()
{
add_options_page(
__( 'Plugin Licenties', 'siti-updater' ),
__( 'Plugin Licenties', 'siti-updater' ),
__('Plugin Licenties', 'siti-updater'),
__('Plugin Licenties', 'siti-updater'),
'manage_options',
'siti-plugin-licenses',
array( $this, 'render_global_settings_page' )
array($this, 'render_global_settings_page')
);
}
public function render_global_settings_page() {
if ( ! current_user_can( 'manage_options' ) ) {
public function render_global_settings_page()
{
if (!current_user_can('manage_options')) {
return;
}
if ( isset( $_POST['siti_updater_save'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'siti_updater_save' ) ) {
foreach ( self::$instances as $prefix => $instance ) {
if (isset($_POST['siti_updater_save']) && wp_verify_nonce($_POST['_wpnonce'], 'siti_updater_save')) {
foreach (self::$instances as $prefix => $instance) {
$key = $prefix . 'license_key';
if ( isset( $_POST[ $key ] ) ) {
$instance->set_license_key( sanitize_text_field( $_POST[ $key ] ) );
if (isset($_POST[$key])) {
$instance->set_license_key(sanitize_text_field($_POST[$key]));
$result = $instance->verify_license();
if ( is_wp_error( $result ) ) {
if (is_wp_error($result)) {
$plugin_data = $instance->get_plugin_data();
add_settings_error( 'siti_updater', 'license_error_' . $prefix, $plugin_data['Name'] . ': ' . $result->get_error_message() );
add_settings_error('siti_updater', 'license_error_' . $prefix, $plugin_data['Name'] . ': ' . $result->get_error_message());
} else {
$plugin_data = $instance->get_plugin_data();
add_settings_error( 'siti_updater', 'license_success_' . $prefix, $plugin_data['Name'] . ': ' . __( 'Licentie succesvol opgeslagen en geverifieerd.', 'siti-updater' ), 'updated' );
add_settings_error('siti_updater', 'license_success_' . $prefix, $plugin_data['Name'] . ': ' . __('Licentie succesvol opgeslagen en geverifieerd.', 'siti-updater'), 'updated');
}
}
}
@@ -379,62 +438,61 @@ class SitiWebUpdater2 {
?>
<div class="wrap">
<h1><?php esc_html_e( 'Plugin Licenties', 'siti-updater' ); ?></h1>
<h1><?php esc_html_e('Plugin Licenties', 'siti-updater'); ?></h1>
<p class="description">
<?php esc_html_e( 'Beheer licentiecodes voor al je plugins die het Siti update systeem gebruiken.', 'siti-updater' ); ?>
<?php esc_html_e('Beheer licentiecodes voor al je plugins die het Siti update systeem gebruiken.', 'siti-updater'); ?>
</p>
<?php settings_errors( 'siti_updater' ); ?>
<?php settings_errors('siti_updater'); ?>
<form method="post" action="">
<?php wp_nonce_field( 'siti_updater_save' ); ?>
<?php wp_nonce_field('siti_updater_save'); ?>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th><?php esc_html_e( 'Plugin', 'siti-updater' ); ?></th>
<th><?php esc_html_e( 'Licentiecode', 'siti-updater' ); ?></th>
<th><?php esc_html_e( 'Geldig', 'siti-updater' ); ?></th>
<th><?php esc_html_e( 'Huidige versie', 'siti-updater' ); ?></th>
<th><?php esc_html_e( 'Nieuwste versie', 'siti-updater' ); ?></th>
<th><?php esc_html_e('Plugin', 'siti-updater'); ?></th>
<th><?php esc_html_e('Licentiecode', 'siti-updater'); ?></th>
<th><?php esc_html_e('Geldig', 'siti-updater'); ?></th>
<th><?php esc_html_e('Huidige versie', 'siti-updater'); ?></th>
<th><?php esc_html_e('Nieuwste versie', 'siti-updater'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ( self::$instances as $prefix => $instance ) :
$license_data = $instance->get_license_data();
$is_valid = $instance->is_license_valid();
$plugin_data = $instance->get_plugin_data();
<?php foreach (self::$instances as $prefix => $instance):
$license_data = $instance->get_license_data();
$is_valid = $instance->is_license_valid();
$plugin_data = $instance->get_plugin_data();
$current_version = $plugin_data['Version'];
$latest_known = $instance->get_latest_known_version();
$latest_version = $latest_known ? $latest_known : ( isset( $license_data['pluginVersion'] ) ? $license_data['pluginVersion'] : '-' );
?>
$latest_known = $instance->get_latest_known_version();
$latest_version = $latest_known ? $latest_known : (isset($license_data['pluginVersion']) ? $license_data['pluginVersion'] : '-');
?>
<tr>
<td>
<strong><?php echo esc_html( $plugin_data['Name'] ); ?></strong>
<strong><?php echo esc_html($plugin_data['Name']); ?></strong>
<br>
<small><?php echo esc_html( $plugin_data['Description'] ); ?></small>
<small><?php echo esc_html($plugin_data['Description']); ?></small>
</td>
<td>
<input type="text"
name="<?php echo esc_attr( $prefix . 'license_key' ); ?>"
value="<?php echo esc_attr( $instance->get_license_key() ); ?>"
class="regular-text"
placeholder="<?php esc_attr_e( 'Voer licentiecode in...', 'siti-updater' ); ?>" />
<input type="text" name="<?php echo esc_attr($prefix . 'license_key'); ?>"
value="<?php echo esc_attr($instance->get_license_key()); ?>" class="regular-text"
placeholder="<?php esc_attr_e('Voer licentiecode in...', 'siti-updater'); ?>" />
<p class="description">
<?php printf( esc_html__( 'Licentie voor %s. Verkrijg je code van plugins.robert.ooo', 'siti-updater' ), $plugin_data['Name'] ); ?>
<?php printf(esc_html__('Licentie voor %s. Verkrijg je code van plugins.robert.ooo', 'siti-updater'), $plugin_data['Name']); ?>
</p>
</td>
<td>
<span class="license-status <?php echo $is_valid ? 'valid' : 'invalid'; ?>">
<?php echo $is_valid ? '<span style="color: green;">✓ ' . esc_html__( 'Ja', 'siti-updater' ) . '</span>' : '<span style="color: red;">✗ ' . esc_html__( 'Nee', 'siti-updater' ) . '</span>'; ?>
<?php echo $is_valid ? '<span style="color: green;">✓ ' . esc_html__('Ja', 'siti-updater') . '</span>' : '<span style="color: red;">✗ ' . esc_html__('Nee', 'siti-updater') . '</span>'; ?>
</span>
</td>
<td>
<?php echo esc_html( $current_version ); ?>
<?php echo esc_html($current_version); ?>
</td>
<td>
<?php echo esc_html( $latest_version ); ?>
<?php if ( $latest_version && '-' !== $latest_version && version_compare( $latest_version, $current_version, '>' ) ) : ?>
<br><small style="color: orange;"><?php esc_html_e( 'Update beschikbaar!', 'siti-updater' ); ?></small>
<?php echo esc_html($latest_version); ?>
<?php if ($latest_version && '-' !== $latest_version && version_compare($latest_version, $current_version, '>')): ?>
<br><small
style="color: orange;"><?php esc_html_e('Update beschikbaar!', 'siti-updater'); ?></small>
<?php endif; ?>
</td>
</tr>
@@ -442,7 +500,8 @@ class SitiWebUpdater2 {
</tbody>
</table>
<p class="submit">
<input type="submit" name="siti_updater_save" class="button button-primary" value="<?php esc_attr_e( 'Licenties opslaan', 'siti-updater' ); ?>" />
<input type="submit" name="siti_updater_save" class="button button-primary"
value="<?php esc_attr_e('Licenties opslaan', 'siti-updater'); ?>" />
</p>
</form>
</div>

View File

@@ -1,7 +1,7 @@
{
"plugin_name": "SitiAI Product Teksten",
"description": "Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.",
"version": "1.9.5",
"version": "1.9.7",
"author": "Roberto Guagliardo | SitiWeb",
"author_url": "https://sitiweb.nl/"
}