Forked from fastlinemedia/gist:18b2b85686ee8aa37540
Last active
August 29, 2015 14:13
-
-
Save agusmu/fde44991a03355b0c459 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @class Export_Import_Install_Control | |
*/ | |
final class Export_Import_Install_Control extends WP_Customize_Control { | |
/** | |
* @method render_content | |
* @protected | |
*/ | |
protected function render_content() | |
{ | |
$plugin = 'customizer-export-import'; | |
$nonce = wp_create_nonce( 'install-plugin_' . $plugin ); | |
$url = admin_url( 'update.php?action=install-plugin&plugin=' . $plugin . '&_wpnonce=' . $nonce ); | |
echo '<p>' . __( 'Please install and activate the "Customizer Export/Import" plugin to proceed.', 'text-domain' ) . '</p>'; | |
echo '<a class="install-now button" href="' . $url . '">' . __( 'Install & Activate', 'text-domain' ) . '</a>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment