Fix theme installation and activation with AJAX-based approach
This commit is contained in:
@ -39,19 +39,13 @@ if (!defined('ABSPATH')) {
|
||||
<?php esc_html_e('Activate'); ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
// Use the standard WordPress theme installation URL format
|
||||
$install_url = wp_nonce_url(
|
||||
admin_url('update.php?action=install-theme&theme=kadence'),
|
||||
'install-theme_kadence'
|
||||
);
|
||||
?>
|
||||
<a href="<?php echo esc_url($install_url); ?>"
|
||||
<button type="button"
|
||||
class="button button-primary install-now"
|
||||
data-slug="kadence"
|
||||
data-name="Kadence">
|
||||
data-name="Kadence"
|
||||
aria-label="<?php esc_attr_e('Install Kadence'); ?>">
|
||||
<?php esc_html_e('Install'); ?>
|
||||
</a>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
|
Reference in New Issue
Block a user