예제 #1
0
/**
 * Render Popup Columns
 *
 * @since 1.0
 *
 * @param string $column_name Column name
 * @param int $post_id Popup (Post) ID
 *
 * @return void
 */
function popmake_render_popup_columns($column_name, $post_id)
{
    if (get_post_type($post_id) == 'popup') {
        global $popmake_options;
        $post = get_post($post_id);
        setup_postdata($post);
        $post_type_object = get_post_type_object($post->post_type);
        $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
        switch ($column_name) {
            case 'popup_title':
                echo '<strong>' . esc_html(popmake_get_the_popup_title($post_id)) . '</strong>';
                break;
            case 'popup_category':
                echo get_the_term_list($post_id, 'popup_category', '', ', ', '');
                break;
            case 'popup_tag':
                echo get_the_term_list($post_id, 'popup_tag', '', ', ', '');
                break;
            case 'class':
                echo '<pre style="display:inline-block;margin:0;"><code>popmake-' . absint($post_id) . '</code></pre>';
                if ($post->post_name != $post->ID) {
                    echo '|';
                    echo '<pre style="display:inline-block;margin:0;"><code>popmake-' . $post->post_name . '</code></pre>';
                }
                break;
        }
    }
}
예제 #2
0
/** Popup Configuration *****************************************************************/
function popmake_popup_title_meta()
{
    global $post;
    if (popmake_is_admin_popup_page()) {
        ?>
		<div id="popuptitlediv">
		<div id="popuptitlewrap">
			<label class="screen-reader-text" id="popuptitle-prompt-text" for="popuptitle"><?php 
        _e('Enter popup title here', 'popup-maker');
        ?>
</label>
			<input type="text" tabindex="2" name="popup_title" size="30" value="<?php 
        esc_attr_e(popmake_get_the_popup_title($post->ID));
        ?>
" id="popuptitle" autocomplete="off" placeholder="<?php 
        _e('Enter popup title here', 'popup-maker');
        ?>
"/>
		</div>
		<div class="inside">
		</div>
		</div><?php 
    }
}
예제 #3
0
파일: popup.php 프로젝트: weerapat/wp-daily
popmake_the_popup_ID();
?>
" class="<?php 
popmake_the_popup_classes();
?>
" <?php 
popmake_the_popup_data_attr();
?>
>

	<?php 
do_action('popmake_popup_before_inner');
?>

	<?php 
if (popmake_get_the_popup_title() != '') {
    ?>
	<div class="popmake-title"><?php 
    popmake_the_popup_title();
    ?>
</div>
	<?php 
}
?>

	<?php 
popmake_the_popup_content();
?>

	<?php 
do_action('popmake_popup_after_inner');
예제 #4
0
function popmake_the_popup_title($popup_id = null)
{
    echo esc_html(popmake_get_the_popup_title($popup_id));
}