Some checks failed
Tests / PHP 7.0 (push) Has been cancelled
Tests / PHP 7.4 (push) Has been cancelled
Tests / PHP 8.0 (push) Has been cancelled
Tests / Code Style (push) Has been cancelled
Sync Wiki / Sync Wiki to GitHub (push) Has been cancelled
Release / Build and Release (push) Has been cancelled
66 lines
3.2 KiB
PHP
66 lines
3.2 KiB
PHP
<?php
|
|
/**
|
|
* Modal Template
|
|
*
|
|
* @package WPALLSTARS\PluginStarterTemplate
|
|
*/
|
|
|
|
// If this file is called directly, abort.
|
|
if (!defined('WPINC')) {
|
|
die;
|
|
}
|
|
?>
|
|
|
|
<!-- Update Source Modal -->
|
|
<div id="wpst-update-source-modal" class="wpst-modal">
|
|
<div class="wpst-modal-content">
|
|
<div class="wpst-modal-header">
|
|
<h2 class="wpst-modal-title"><?php esc_html_e('Select Update Source', 'wp-plugin-starter-template'); ?></h2>
|
|
<span class="wpst-modal-close">×</span>
|
|
</div>
|
|
|
|
<div class="wpst-modal-body">
|
|
<p><?php esc_html_e('Choose your preferred source for plugin updates:', 'wp-plugin-starter-template'); ?></p>
|
|
|
|
<div class="wpst-modal-message"></div>
|
|
|
|
<div class="wpst-source-options">
|
|
<?php
|
|
// Get current update source
|
|
$current_source = get_option('wpst_update_source', 'wordpress.org');
|
|
?>
|
|
|
|
<label class="wpst-source-option <?php echo $current_source === 'wordpress.org' ? 'selected' : ''; ?>">
|
|
<input type="radio" name="update_source" value="wordpress.org" <?php checked($current_source, 'wordpress.org'); ?>>
|
|
<span class="wpst-source-option-label"><?php esc_html_e('WordPress.org', 'wp-plugin-starter-template'); ?></span>
|
|
<div class="wpst-source-option-description">
|
|
<?php esc_html_e('Receive updates from the official WordPress.org repository. Recommended for most users.', 'wp-plugin-starter-template'); ?>
|
|
</div>
|
|
</label>
|
|
|
|
<label class="wpst-source-option <?php echo $current_source === 'github' ? 'selected' : ''; ?>">
|
|
<input type="radio" name="update_source" value="github" <?php checked($current_source, 'github'); ?>>
|
|
<span class="wpst-source-option-label"><?php esc_html_e('GitHub', 'wp-plugin-starter-template'); ?></span>
|
|
<div class="wpst-source-option-description">
|
|
<?php esc_html_e('Receive updates from the GitHub repository. May include pre-release versions.', 'wp-plugin-starter-template'); ?>
|
|
</div>
|
|
</label>
|
|
|
|
<label class="wpst-source-option <?php echo $current_source === 'gitea' ? 'selected' : ''; ?>">
|
|
<input type="radio" name="update_source" value="gitea" <?php checked($current_source, 'gitea'); ?>>
|
|
<span class="wpst-source-option-label"><?php esc_html_e('Gitea', 'wp-plugin-starter-template'); ?></span>
|
|
<div class="wpst-source-option-description">
|
|
<?php esc_html_e('Receive updates from the Gitea repository. May include pre-release versions.', 'wp-plugin-starter-template'); ?>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="wpst-modal-footer">
|
|
<button type="button" id="wpst-save-source" class="button button-primary">
|
|
<?php esc_html_e('Save', 'wp-plugin-starter-template'); ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|