function popmake_popup_themes_meta_box_field_theme($popup_id)
{
    ?>
	<tr>
		<td scope="row">
			<label for="popup_theme"><strong><?php 
    _e('Theme', 'popup-maker');
    ?>
</strong></label>
			<select name="popup_theme" id="popup_theme" class="input-large">
				<?php 
    foreach (popmake_get_all_popup_themes()->posts as $theme) {
        ?>
					<option value="<?php 
        echo $theme->ID;
        ?>
" <?php 
        selected($theme->ID, popmake_get_the_popup_theme($popup_id));
        ?>
>
						<?php 
        echo $theme->post_title;
        ?>
					</option>
				<?php 
    }
    ?>
			</select>
			<p class="description"><?php 
    _e('Choose a theme for this popup.', 'popup-maker');
    ?>
</p>
		</td>
	</tr><?php 
}
예제 #2
0
function popmake_get_the_popup_data_attr($popup_id = null)
{
    if (!$popup_id) {
        $popup_id = get_the_ID();
    }
    $post = get_post($popup_id);
    $data_attr = array('id' => $popup_id, 'slug' => $post->post_name, 'theme_id' => popmake_get_the_popup_theme($popup_id), 'meta' => array('display' => popmake_get_popup_display($popup_id), 'close' => popmake_get_popup_close($popup_id), 'click_open' => popmake_get_popup_click_open($popup_id)));
    if (popmake_get_popup_auto_open($popup_id, 'enabled')) {
        $data_attr['meta']['auto_open'] = popmake_get_popup_auto_open($popup_id);
    }
    if (popmake_get_popup_admin_debug($popup_id, 'enabled')) {
        $data_attr['meta']['admin_debug'] = popmake_get_popup_admin_debug($popup_id);
    }
    return apply_filters('popmake_get_the_popup_data_attr', $data_attr, $popup_id);
}
예제 #3
0
function popmake_popup_close_text($text, $popup_id)
{
    $theme_text = get_post_meta(popmake_get_the_popup_theme($popup_id), 'popup_theme_close_text', true);
    if ($theme_text && $theme_text != '') {
        $text = $theme_text;
    }
    $popup_close_text = popmake_get_popup_close($popup_id, 'text');
    if ($popup_close_text && $popup_close_text != '') {
        $text = $popup_close_text;
    }
    return $text;
}