| Current Path : /home/ereika83/public_html/wp-content/plugins/instasuite-for-wordpress 4 3/admin/ |
| Current File : /home/ereika83/public_html/wp-content/plugins/instasuite-for-wordpress 4 3/admin/metabox.php |
<?php
$funnels = kyvio_call();
$meta = get_post_meta($post->ID, 'instasuite_meta', true);
$is_enabled = ( is_array($meta) && $meta['enable'] == 1 ) ? true : false;
$page_id = ( $is_enabled ) ? $meta['page_id'] : '';
echo '<input type="hidden" name="_inst_meta_nonce" value="' . wp_create_nonce('inst-meta-nonce') . '" />';
?>
<div class="inst-admin">
<div style="height:15px"></div>
<div class="checkbox checkbox-switchery">
<label>Enable Kyvio Landing Page
<input type="hidden" name="enable_instasuite" value="0" />
<input type="checkbox" name="enable_instasuite" value="1" class="switchery" data-enable-show=".instasuite-pages" data-disable-hide=".instasuite-pages" <?php echo ( $is_enabled ? 'checked="checked"' : ''); ?>>
</label>
</div>
<div class="instasuite-pages">
<div style="height:15px"></div>
<hr />
<p><strong>Select Page:</strong></p>
<select name="instasuitepage" id="instasuitepage" style="width: 100%; padding: 7px; height: auto !important">
<?php
if ( $funnels ) {
foreach ( $funnels as $funnel ) {
if ( empty($funnel->pages) )
continue;
echo '<optgroup label="' . $funnel->name . '">';
foreach ( $funnel->pages as $page ) {
$value = "{$funnel->id}:{$page->id}";
$selected = ( $page_id == $value ) ? ' selected="selected"' : '';
echo "<option value='{$value}'{$selected}>{$page->title}</option>";
}
echo '</optgroup>';
}
}
?>
</select>
</div>
</div>