function sgPopupCallback($post)
{
    wp_nonce_field(basename(__FILE__), 'prfx_nonce');
    $prfx_stored_meta = get_post_meta($post->ID);
    ?>
	<p class="preview-paragaraph">
<?php 
    global $wpdb;
    $proposedTypes = array();
    $orderBy = 'id DESC';
    $proposedTypes = SGPopup::findAll($orderBy);
    function sgCreateSelect($options, $name, $selecteOption)
    {
        $selected = '';
        $str = "";
        $str .= "<select class=\"choose-popup-type\" name=\"{$name}\">";
        $str .= "<option value=''>Not selected</potion>";
        foreach ($options as $option) {
            if ($option) {
                $title = $option->getTitle();
                $type = $option->getType();
                $id = $option->getId();
                if ($selecteOption == $id) {
                    $selected = "selected";
                } else {
                    $selected = '';
                }
                $str .= "<option value='" . $id . "' disable='" . $id . "' " . $selected . " >{$title} - {$type}</potion>";
            }
        }
        $str .= "</select>";
        return $str;
    }
    global $post;
    $page = (int) $post->ID;
    $popup = "sg_promotional_popup";
    $popupId = SGPopup::getPagePopupId($page, $popup);
    echo sgCreateSelect($proposedTypes, 'sg_promotional_popup', $popupId);
    $SG_APP_POPUP_URL = SG_APP_POPUP_URL;
    ?>
	</p>
	<input type="hidden" value="<?php 
    echo $SG_APP_POPUP_URL;
    ?>
" id="SG_APP_POPUP_URL">
<?php 
}
							</div>
						</div>
					</div>
				</div>
				<div id="effect">
					<div id="post-body" class="metabox-holder columns-2">
						<div id="postbox-container-2" class="postbox-container">
							<div id="normal-sortables" class="meta-box-sortables ui-sortable">
								<div class="postbox popupBuilder_effect_postbox sgSameWidthPostBox" style="display: block;">
									<div class="handlediv effectTitle" title="Click to toggle"><br></div>
									<h3 class="hndle ui-sortable-handle effectTitle" style="cursor: pointer"><span>Effects</span></h3>
									<div class="effectsContent">
										<span class="liquid-width">Effect type:</span>
										<?php 
echo sgCreateSelect($sgPopupEffects, 'effect', esc_html(@$effect));
?>
										<span class="js-preview-effect"></span>
										<div class="effectWrapper"><div id="effectShow" ></div></div>

										<span  class="liquid-width">Effect duration:</span>
										<input class="input-width-static" type="text" name="duration" value="<?php 
echo esc_attr($duration);
?>
" pattern = "\d+" title="It must be number" /><span class="dashicons dashicons-info contentClick infoImageDuration sameImageStyle"></span><span class="infoDuration samefontStyle">Specify how long the popup appearance animation should take (in sec).</span></br>

										<span  class="liquid-width">Initial delay:</span>
										<input class="input-width-static" type="text" name="delay" value="<?php 
echo esc_attr($delay);
?>
"  pattern = "\d+" title="It must be number"/><span class="dashicons dashicons-info contentClick infoImageDelay sameImageStyle"></span><span class="infoDelay samefontStyle">Specify how long the popup appearance should be delayed after loading the page (in sec).</span></br>
Exemplo n.º 3
0
<div id="special-options">
	<div id="post-body" class="metabox-holder columns-2">
		<div id="postbox-container-2" class="postbox-container">
			<div id="normal-sortables" class="meta-box-sortables ui-sortable">
				<div class="postbox popup-builder-special-postbox">
					<div class="handlediv js-special-title" title="Click to toggle"><br></div>
					<h3 class="hndle ui-sortable-handle js-special-title">
						<span>
						<?php 
global $POPUP_TITLES;
$popupTypeTitle = $POPUP_TITLES[$popupType];
echo $popupTypeTitle . " <span>options</span>";
?>
						</span>
					</h3>
					<div class="special-options-content">
						<span class="liquid-width">Url:</span>
						<input class="input-width-static" type="text" name="fblike-like-url" value="<?php 
echo esc_attr(@$sgFblikeurl);
?>
">
						<span class="liquid-width">Layout:</span>
						<?php 
echo sgCreateSelect($sgFbLikeButtons, 'fblike-layout', esc_html(@$sgFbLikeLayout));
?>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>