/**
  * Include main UI view and add scope data into it.
  *
  * @since 0.4.0
  *
  * @return bool|string
  */
 function include_view()
 {
     $keys = Pods_Deploy_Auth::get_keys(true);
     $public_remote = pods_v_sanitized('public', $keys, '');
     $private_remote = pods_v_sanitized('private', $keys, '');
     $deploy_active = Pods_Deploy_Auth::deploy_active();
     wp_enqueue_style('pods-wizard');
     if ($deploy_active) {
         $key_gen_submit = __('Disable Deployments', 'pods-deploy');
         $key_gen_header = __('Click to revoke keys and prevent deployments to this site.', 'pods-deploy');
     } else {
         $key_gen_submit = __('Allow Deployments', 'pods-deploy');
         $key_gen_header = __('Click to generate new keys and allow deployments to this site', 'pods-deploy');
     }
     $form_fields = $this->form_fields();
     $data = compact(array('keys', 'public_local', 'private_local', 'public_remote', 'private_remote', 'deploy_active', 'key_gen_submit', 'key_gen_header', 'form_fields'));
     return pods_view(PODS_DEPLOY_DIR . 'ui/main.php', $data);
 }
예제 #2
0
<?php

$keys = Pods_Deploy_Auth::get_keys(false);
$public_local = pods_v_sanitized('public', $keys, '');
$private_local = pods_v_sanitized('private', $keys, '');
$keys = Pods_Deploy_Auth::get_keys(true);
$public_remote = pods_v_sanitized('public', $keys, '');
$private_remote = pods_v_sanitized('private', $keys, '');
$deploy_active = Pods_Deploy_Auth::deploy_active();
if ($deploy_active) {
    $key_gen_submit = __('Disable Deployments', 'pods-deploy');
    $key_gen_header = __('Click to revoke keys and prevent deployments to this site.', 'pods-deploy');
} else {
    $key_gen_submit = __('Allow Deployments', 'pods-deploy');
    $key_gen_header = __('Click to generate new keys and allow deployments to this site', 'pods-deploy');
}
?>
<div class="wrap pods-admin">
	<form action="" method="post">

		<div id="icon-pods" class="icon32"><br /></div>

		<?php 
$default = 'deploy';
$tabs = array('deploy' => __('Deploy From This Site', 'pods-deploy'), 'key-gen' => __('Allow Deploying To This Site', 'pods-deploy'));
?>

		<h2 class="nav-tab-wrapper">
			<?php 
foreach ($tabs as $tab => $label) {
    $class = '';