当前位置: 首页>>代码示例>>PHP>>正文


PHP comicpress_themeinfo函数代码示例

本文整理汇总了PHP中comicpress_themeinfo函数的典型用法代码示例。如果您正苦于以下问题:PHP comicpress_themeinfo函数的具体用法?PHP comicpress_themeinfo怎么用?PHP comicpress_themeinfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了comicpress_themeinfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: comicpress_random_default_avatar

function comicpress_random_default_avatar($id_or_email = '')
{
    $current_avatar_directory = comicpress_themeinfo('avatar_directory');
    if (!empty($current_avatar_directory) && $current_avatar_directory !== 'none') {
        if (file_exists(get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory)) {
            $count = count($results = glob(get_stylesheet_directory() . '/images/avatars/' . $current_avatar_directory . '/*'));
            $blogurl = get_stylesheet_directory_uri();
        } else {
            $count = count($results = glob(get_template_directory() . '/images/avatars/' . $current_avatar_directory . '/*'));
            $blogurl = get_template_directory_uri();
        }
        if ($count) {
            $default = '';
            $checknum = hexdec(substr(md5($id_or_email), 0, 5)) % $count;
            if ($count > 0) {
                $default = basename($results[(int) $checknum]);
            } else {
                return false;
            }
            return $blogurl . '/images/avatars/' . $current_avatar_directory . '/' . $default;
        }
    } else {
        return get_option('avatar_default');
    }
    return false;
}
开发者ID:besimhu,项目名称:legacy,代码行数:26,代码来源:avatars.php

示例2: comicpress_change_header_height

function comicpress_change_header_height($height)
{
    $new_height = comicpress_themeinfo('custom_image_header_height');
    if (!empty($new_height) && (int) $new_height > 0) {
        $height = $new_height;
    }
    return $height;
}
开发者ID:besimhu,项目名称:legacy,代码行数:8,代码来源:custom-header.php

示例3: comicpress_display_facebook_like

 function comicpress_display_facebook_like($content)
 {
     global $post, $wp_query;
     if (!is_page()) {
         if (comicpress_in_comic_category() && comicpress_themeinfo('facebook_like_comic_post') || !comicpress_in_comic_category() && comicpress_themeinfo('facebook_like_blog_post')) {
             $content .= '<span class="facebook-like"><fb:like layout="box_count" show_faces="false" width="255" href="' . get_permalink() . '"></fb:like></span>';
         }
     }
     return $content;
 }
开发者ID:besimhu,项目名称:legacy,代码行数:10,代码来源:facebook.php

示例4: comicpress_copyright_info

 function comicpress_copyright_info()
 {
     $copyright_name = comicpress_themeinfo('copyright_name');
     if (empty($copyright_name)) {
         $copyright_name = get_bloginfo('name');
     }
     $copyright_url = comicpress_themeinfo('copyright_url');
     if (empty($copyright_url)) {
         $copyright_url = home_url();
     }
     $copyright = __('&copy;', 'comicpress') . comicpress_copyright_dates() . ' ' . apply_filters('comicpress_copyright_info_name', '<a href="' . $copyright_url . '">' . $copyright_name . '</a>') . ' ';
     return apply_filters('comicpress_copyright_info', $copyright);
 }
开发者ID:besimhu,项目名称:legacy,代码行数:13,代码来源:footer-text.php

示例5: comicpress_dual_columns

    function comicpress_dual_columns($whereclause = false)
    {
        global $wp_query;
        ?>
		<div id="dualcolumns">
			<div class="column_one">
				<div class="column_one_header"></div>
<?php 
        Protect();
        $wp_query->in_the_loop = true;
        $blog_query = new WP_Query();
        if ($whereclause) {
            add_filter('posts_where', 'comicpress_dual_filter_where');
        }
        $blog_query->query('showposts=' . comicpress_themeinfo('blog_postcount') . '&cat=' . comicpress_exclude_comic_categories() . '&author=' . comicpress_themeinfo('author_column_one') . '&paged=' . $paged);
        if (have_posts()) {
            while ($blog_query->have_posts()) {
                $blog_query->the_post();
                comicpress_display_post();
            }
        }
        UnProtect();
        ?>
			</div>
			<div class="column_two">
				<div class="column_two_header"></div>
<?php 
        Protect();
        $wp_query->in_the_loop = true;
        $blog_query = new WP_Query();
        if ($whereclause) {
            add_filter('posts_where', 'comicpress_dual_filter_where');
        }
        $blog_query->query('showposts=' . comicpress_themeinfo('blog_postcount') . '&cat=' . comicpress_exclude_comic_categories() . '&author=' . comicpress_themeinfo('author_column_two'));
        if (have_posts()) {
            while ($blog_query->have_posts()) {
                $blog_query->the_post();
                comicpress_display_post();
            }
        }
        UnProtect();
        ?>
			</div>
			<div class="clear"></div>
		</div>
	<?php 
    }
开发者ID:besimhu,项目名称:legacy,代码行数:47,代码来源:dual-columns.php

示例6: ryuzine_display_comic

function ryuzine_display_comic()
{
    global $post;
    $output = '';
    // ComicPress 2.x
    if (function_exists('comicpress_the_hovertext')) {
        $comics = get_comic_path('comic', $post);
        if (is_array($comics)) {
            foreach ($comics as $comic) {
                $cdn_url = comicpress_themeinfo('cdn_url');
                if (!empty($cdn_url)) {
                    $thumbnail = trailingslashit($cdn_url) . comicpress_clean_url($comic);
                } else {
                    $thumbnail = comicpress_themeinfo('baseurl') . comicpress_clean_url($comic);
                }
                $hovertext = comicpress_the_hovertext($post);
            }
        }
    }
    // Comic Easel (ComicPress 4)
    if (function_exists('ceo_the_hovertext')) {
        $post_image_id = get_post_thumbnail_id($post->ID);
        if ($post_image_id) {
            // If there's a featured image.
            $hovertext = ceo_the_hovertext();
            $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false);
            if (is_array($thumbnail)) {
                $thumbnail = reset($thumbnail);
            }
        }
    }
    // MangaPress
    if (defined('MP_FOLDER')) {
        $post_image_id = get_post_thumbnail_id($post->ID);
        if ($post_image_id) {
            $hovertext = '';
            $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false);
            if (is_array($thumbnail)) {
                $thumbnail = reset($thumbnail);
            }
        }
    }
    $output .= '<img src="' . $thumbnail . '" alt="' . $hovertext . '" title="' . $hovertext . '" />';
    return apply_filters('ryuzine_display_comic', $output);
}
开发者ID:ryumaru,项目名称:ryuzine-press,代码行数:45,代码来源:rp_core_functions.php

示例7: get_header

<?php

/*
Template Name: Members Only Blog
*/
get_header();
remove_filter('pre_get_posts', 'comicpress_members_filter');
if (comicpress_themeinfo('enable_members_only')) {
    if (comicpress_themeinfo('members_post_category') && comicpress_is_member()) {
        $blog_query = 'showposts=' . comicpress_themeinfo('blog_postcount') . '&cat=' . comicpress_themeinfo('members_post_category') . '&paged=' . $paged;
        $posts =& query_posts($blog_query);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                comicpress_display_post();
            }
        }
        comicpress_pagination();
    } else {
        _e("This page is restricted to members only.", 'comicpress');
    }
} else {
    _e('Member\'s Only content is not enabled on this installation.');
}
if (is_active_sidebar('under-blog')) {
    get_sidebar('underblog');
}
get_footer();
开发者ID:besimhu,项目名称:legacy,代码行数:28,代码来源:members-blog.php

示例8: _e

 />
					</td>
					<td>
						<?php 
_e('Mini Navigation adds small previous and next arrows arrow to the right side of your Menubar.', 'comicpress');
?>
					</td>
				</tr>
				<tr>
					<th scope="row"><label for="disable_jquery_menu_code"><?php 
_e('Disable the menubar jQuery?', 'comicpress');
?>
</label></th>
					<td>
						<input id="disable_jquery_menu_code" name="disable_jquery_menu_code" type="checkbox" value="1" <?php 
checked(true, comicpress_themeinfo('disable_jquery_menu_code'));
?>
 />
					</td>
					<td>
						<?php 
_e('Disable the loading of the menubar jQuery, useful if you use a custom menubar.', 'comicpress');
?>
					</td>
				</tr>
			</table>

		</div>

		<div class="comicpress-options-save">
			<div class="comicpress-major-publishing-actions">
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:menubar.php

示例9: _e

 />
					</td>
					<td>
						<?php 
_e('Setting this on will make it so that all posts, not just comics will display in the archive templates.', 'comicpress');
?>
					</td>
				</tr>
				<tr>
					<th scope="row"><label for="archive_start_latest_year"><?php 
_e('Enable archive templates to start with most current year?', 'comicpress');
?>
</label></th>
					<td>
						<input id="archive_start_latest_year" name="archive_start_latest_year" type="checkbox" value="1" <?php 
checked(true, comicpress_themeinfo('archive_start_latest_year'));
?>
 />
					</td>
					<td>
						<?php 
_e('Enabling this option will make the archive templates start with the most current year, instead of the first year.', 'comicpress');
?>
					</td>
				</tr>
			</table>
		</div>

		<div class="comicpress-options-save">
			<div class="comicpress-major-publishing-actions">
				<div class="comicpress-publishing-action">
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:archive-search.php

示例10: _e

_e('2 column layout default width: <strong>780px</strong>.', 'comicpress');
?>
						<br/><br/>
						<?php 
_e('3 column layout (<em>includes Graphic Novel</em>) default width: <b>980px</b>.', 'comicpress');
?>
					</td>
				</tr>
				<tr>
					<th scope="row"><label for="enable_caps"><?php 
_e('Enable -head and -foot caps?', 'comicpress');
?>
</label></th>
					<td>
						<input id="enable_caps" name="enable_caps" type="checkbox" value="1" <?php 
checked(true, comicpress_themeinfo('enable_caps'));
?>
 />
					</td>
					<td>
						<?php 
_e('Enabling this option will create post-head widget-head and various other div alignments increasing the amount of dom elements available to use in designing your site, however will reduce the speed in which the page is shown on the end users browser.', 'comicpress');
?>
					</td>
				</tr>
			</table>
		<div class="comicpress-options-save">
			<div class="comicpress-major-publishing-actions">
				<div class="comicpress-publishing-action">
					<input name="comicpress_save_layout" type="submit" class="button-primary" value="Save Layout" />
					<input type="hidden" name="action" value="comicpress_save_layout" />
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:layout.php

示例11: comicpress_inject_comic_home

 function comicpress_inject_comic_home()
 {
     global $wp_query;
     if (!is_paged() && is_home()) {
         if (!comicpress_themeinfo('disable_comic_frontpage')) {
             $order = 'DESC';
             $wp_query->in_the_loop = true;
             $comicFrontpage = new WP_Query();
             if (comicpress_themeinfo('display_first_comic_on_home')) {
                 $order = 'ASC';
             }
             $comicFrontpage->query('showposts=1&order=' . $order . '&cat=' . comicpress_all_comic_categories_string());
             while ($comicFrontpage->have_posts()) {
                 $comicFrontpage->the_post();
                 comicpress_display_comic_area();
             }
         }
     } else {
         if (is_single() && comicpress_in_comic_category()) {
             comicpress_display_comic_area();
         }
     }
 }
开发者ID:besimhu,项目名称:legacy,代码行数:23,代码来源:displaycomic.php

示例12: build_zappbars

    function build_zappbars($value, $layout, $position, $paged)
    {
        global $post;
        $xtra = '';
        if ($position == null) {
            $position = 'top';
        }
        $zb_name = array('button_a', 'button_b', 'button_c', 'button_d', 'button_e');
        $html = '<div class="zappbar zb-' . $layout . ' ' . $position . '">';
        $x = 0;
        foreach ($value as $val) {
            $html .= '<div class="zb ' . $zb_name[$x] . ' integrated-webcomic">';
            if (array_filter($paged)) {
                if (function_exists('comicpress_display_comic') && comicpress_themeinfo('archive_display_order') == "asc") {
                    $first_page = $paged[0];
                    $last_page = $paged[3];
                } else {
                    if (function_exists('comicpress_display_comic') && comicpress_themeinfo('archive_display_order') == "desc") {
                        $first_page = $paged[3];
                        $last_page = $paged[0];
                    } else {
                        $first_page = $paged[3];
                        $last_page = $paged[0];
                    }
                }
                if ($val[2] == 'first_page') {
                    $val[2] = $first_page;
                } else {
                    if ($val[2] == 'prev_page') {
                        $val[2] = $paged[1];
                    } else {
                        if ($val[2] == 'next_page') {
                            $val[2] = $paged[2];
                        } else {
                            if ($val[2] == 'last_page') {
                                $val[2] = $last_page;
                            } else {
                            }
                        }
                    }
                }
            }
            if (get_post_type() == 'comic' || function_exists('ceo_pluginfo')) {
                if (ceo_pluginfo('navigate_only_chapters')) {
                    if ($val[2] == 'prev_chapter') {
                        $val[2] = ceo_get_previous_chapter();
                    } else {
                        if ($val[2] == 'first_comic') {
                            $val[2] = ceo_get_first_comic_in_chapter_permalink();
                        } else {
                            if ($val[2] == 'prev_comic') {
                                $val[2] = ceo_get_previous_comic_in_chapter_permalink();
                            } else {
                                if ($val[2] == 'next_comic') {
                                    $val[2] = ceo_get_next_comic_in_chapter_permalink();
                                } else {
                                    if ($val[2] == 'last_comic') {
                                        $val[2] = ceo_get_last_comic_in_chapter_permalink();
                                    } else {
                                        if ($val[2] == 'next_chapter') {
                                            $val[2] = ceo_get_next_chapter();
                                        } else {
                                            if ($val[2] == 'comic_archive') {
                                                $val[2] = get_site_url() . '/comic';
                                            } else {
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                } else {
                    if ($val[2] == 'prev_chapter') {
                        $val[2] = ceo_get_previous_chapter();
                    } else {
                        if ($val[2] == 'first_comic') {
                            $val[2] = ceo_get_first_comic_permalink();
                        } else {
                            if ($val[2] == 'prev_comic') {
                                $val[2] = ceo_get_previous_comic_permalink();
                            } else {
                                if ($val[2] == 'next_comic') {
                                    $val[2] = ceo_get_next_comic_permalink();
                                } else {
                                    if ($val[2] == 'last_comic') {
                                        $val[2] = ceo_get_last_comic_permalink();
                                    } else {
                                        if ($val[2] == 'next_chapter') {
                                            $val[2] = ceo_get_next_chapter();
                                        } else {
                                            if ($val[2] == 'comic_archive') {
                                                $val[2] = get_site_url() . '/comic';
                                            } else {
                                            }
                                        }
                                    }
                                }
                            }
                        }
//.........这里部分代码省略.........
开发者ID:kmhcreative,项目名称:zappbar,代码行数:101,代码来源:html_inject.php

示例13: comicpress_display_post

    function comicpress_display_post()
    {
        global $post, $wp_query;
        $is_comic = 0;
        if (comicpress_in_comic_category()) {
            $is_comic = 1;
        }
        ?>
		<?php 
        comicpress_display_blog_navigation($is_comic);
        ?>
		<?php 
        comicpress_display_comic_navigation($is_comic);
        ?>
		<div <?php 
        post_class();
        ?>
>
			<?php 
        comicpress_display_post_thumbnail($is_comic);
        ?>
			<?php 
        if (comicpress_themeinfo('enable_caps')) {
            ?>
<div class="post-head"></div><?php 
        }
        ?>
			<div class="post-content">
				<div class="post-info">
					<?php 
        comicpress_display_author_gravatar($is_comic);
        ?>
					<?php 
        comicpress_display_post_calendar($is_comic);
        ?>
					<?php 
        if (function_exists('comicpress_show_mood_in_post')) {
            comicpress_show_mood_in_post();
        }
        ?>
					<div class="post-text">
						<?php 
        comicpress_display_post_title($is_comic);
        if (!is_page()) {
            comicpress_display_post_author();
            comicpress_display_post_date();
            comicpress_display_post_time();
            if (!is_archive() && !is_search()) {
                edit_post_link(__('Edit', 'comicpress'), ' <span class="pipe">|</span> <span class="post-edit">', '</span>');
            }
            comicpress_display_post_category($is_comic);
            if (function_exists('the_ratings') && $post->post_type == 'post') {
                the_ratings();
            }
        }
        ?>
					</div>
				</div>
				<div class="clear"></div>
				<div class="entry">
					<?php 
        comicpress_display_the_content($is_comic);
        ?>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
				<?php 
        if (!is_page()) {
            ?>
				<div class="post-extras">
					<?php 
            comicpress_display_post_tags();
            ?>
					<?php 
            comicpress_display_comment_link();
            ?>
					<?php 
            if ($is_comic) {
                if (function_exists('comicpress_related_comics_shortcode') && comicpress_themeinfo('enable_related_comics')) {
                    echo comicpress_related_comics_shortcode();
                }
            } else {
                if (function_exists('comicpress_related_posts_shortcode') && comicpress_themeinfo('enable_related_posts')) {
                    echo comicpress_related_posts_shortcode();
                }
            }
            ?>
					<div class="clear"></div>
				</div>
				<?php 
        }
        ?>
				<?php 
        if (is_page()) {
            edit_post_link(__('Edit this page.', 'comicpress'), '', '');
        }
        ?>
			</div>
			<?php 
        if (comicpress_themeinfo('enable_caps')) {
//.........这里部分代码省略.........
开发者ID:besimhu,项目名称:legacy,代码行数:101,代码来源:displaypost.php

示例14: do_action

<div id="header">
	<?php 
do_action('comicpress-header');
?>
	<h1><a href="<?php 
echo home_url();
?>
"><?php 
bloginfo('name');
?>
</a></h1>
	<div class="description"><?php 
bloginfo('description');
?>
</div>
	<?php 
if (is_active_sidebar('header')) {
    get_sidebar('header');
}
?>
	<div class="clear"></div>
</div>
		
<?php 
if (!comicpress_themeinfo('disable_default_menubar')) {
    comicpress_menubar();
}
if (is_active_sidebar('menubar')) {
    get_sidebar('menubar');
}
get_template_part('layout', 'head');
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:header.php

示例15: comicpress_handle_edit_post_mood_save

function comicpress_handle_edit_post_mood_save($post_id)
{
    $moods_directory = comicpress_themeinfo('moods_directory');
    if (!empty($moods_directory) && $moods_directory != 'none') {
        $currentmood = get_post_meta($post_id, "mood", true);
        if (isset($_POST['postmood']) && $_POST['postmood'] !== $currentmood) {
            $postmood = $_POST['postmood'];
            update_post_meta($post_id, 'mood', $postmood);
        }
    }
}
开发者ID:besimhu,项目名称:legacy,代码行数:11,代码来源:moods.php


注:本文中的comicpress_themeinfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。