• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_anspress函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init_scripts_front

function init_scripts_front()
{
    if (is_anspress()) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('tagsinput', ap_get_theme_url('js/bootstrap-tagsinput.min.js'), 'jquery', AP_VERSION);
        wp_enqueue_script('jquery-form', array('jquery'), false, true);
        wp_enqueue_script('ap-site-js', ANSPRESS_URL . 'assets/ap-site.js', 'jquery', AP_VERSION);
        wp_enqueue_script('tooltipster', ap_get_theme_url('js/jquery.tooltipster.min.js'), 'jquery', AP_VERSION);
        wp_enqueue_script('jstorage', ap_get_theme_url('js/jstorage.js'), 'jquery', AP_VERSION);
        //wp_enqueue_script( 'perfect-scrollbar', ap_get_theme_url('js/perfect-scrollbar.min.js'), 'jquery', AP_VERSION);
        wp_enqueue_script('ap-js', ap_get_theme_url('js/ap.js'), 'jquery', AP_VERSION);
        wp_enqueue_style('tagsinput', ap_get_theme_url('css/bootstrap-tagsinput.css'), array(), AP_VERSION);
        wp_enqueue_style('tooltipster', ap_get_theme_url('css/tooltipster.css'), array(), AP_VERSION);
        //wp_enqueue_style( 'perfect-scrollbar', ap_get_theme_url('css/perfect-scrollbar.min.css'), array(), AP_VERSION);
        wp_enqueue_style('ap-style', ap_get_theme_url('css/ap.css'), array(), AP_VERSION);
        wp_enqueue_style('ap-fonts', ap_get_theme_url('fonts/style.css'), array(), AP_VERSION);
        do_action('ap_enqueue');
        wp_enqueue_style('ap-overrides', ap_get_theme_url('css/overrides.css'), array(), AP_VERSION);
        ?>
			<script type="text/javascript">
				var ajaxurl = '<?php 
        echo admin_url('admin-ajax.php');
        ?>
',
				    ap_max_tags = '<?php 
        echo ap_opt('max_tags');
        ?>
';
			</script>
		<?php 
        wp_localize_script('ap-site-js', 'aplang', array('password_field_not_macthing' => __('Password not matching', 'ap'), 'password_length_less' => __('Password length must be 6 or higher', 'ap'), 'not_valid_email' => __('Not a valid email', 'ap'), 'username_less' => __('Username length must be 4 or higher', 'ap'), 'username_not_avilable' => __('Username not available', 'ap'), 'email_already_in_use' => __('Email already in use', 'ap'), 'loading' => __('Loading', 'ap'), 'sending' => __('Sending request', 'ap'), 'adding_to_fav' => __('Adding question to your favorites', 'ap'), 'voting_on_post' => __('Sending your vote', 'ap'), 'requesting_for_closing' => __('Requesting for closing this question', 'ap'), 'sending_request' => __('Submitting request', 'ap'), 'loading_comment_form' => __('Loading comment form', 'ap'), 'submitting_your_question' => __('Sending your question', 'ap'), 'submitting_your_answer' => __('Sending your answer', 'ap'), 'submitting_your_comment' => __('Sending your comment', 'ap'), 'deleting_comment' => __('Deleting comment', 'ap'), 'updating_comment' => __('Updating comment', 'ap'), 'loading_form' => __('Loading form', 'ap'), 'saving_labels' => __('Saving labels', 'ap'), 'loading_suggestions' => __('Loading suggestions', 'ap'), 'uploading_cover' => __('Uploading cover', 'ap'), 'saving_profile' => __('Saving profile', 'ap'), 'sending_message' => __('Sending message', 'ap'), 'loading_conversation' => __('Loading conversation', 'ap'), 'loading_new_message_form' => __('Loading new message form', 'ap'), 'loading_more_conversations' => __('Loading more conversations', 'ap'), 'searching_conversations' => __('Searching conversations', 'ap'), 'loading_message_edit_form' => __('Loading message form', 'ap'), 'updating_message' => __('Updating message', 'ap'), 'deleting_message' => __('Deleting message', 'ap'), 'uploading' => __('Uploading', 'ap')));
    }
}
开发者ID:coollog,项目名称:theboola,代码行数:33,代码来源:functions.php


示例2: while

    while (ap_questions()) {
        ap_the_question();
        ap_get_template_part('content-list');
    }
    ?>
			</div>
		<?php 
    ap_questions_the_pagination();
    ?>
		<?php 
} else {
    ap_get_template_part('content-none');
}
?>
	
	</div>
	<?php 
if (is_active_sidebar('ap-sidebar') && is_anspress()) {
    ?>
		<div class="ap-question-right col-md-3">
			<?php 
    dynamic_sidebar('ap-sidebar');
    ?>
		</div>
	<?php 
}
?>
</div>


开发者ID:haythameyd,项目名称:powrly,代码行数:28,代码来源:base.php


示例3: ap_get_current_page_template

function ap_get_current_page_template()
{
    if (is_anspress()) {
        $template = ap_current_page_is();
        return apply_filters('ap_current_page_template', $template . '.php');
    }
    return 'content-none.php';
}
开发者ID:haythameyd,项目名称:powrly,代码行数:8,代码来源:theme.php


示例4: editor_buttons

 /**
  * Configure which button will appear in wp_editor
  * @param  array  $buttons   Button names.
  * @param  string $editor_id Editor ID.
  * @return array
  */
 public function editor_buttons($buttons, $editor_id)
 {
     if (is_anspress()) {
         return array('bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'link', 'unlink', 'blockquote', 'pre');
     }
     return $buttons;
 }
开发者ID:kevinfodness,项目名称:anspress,代码行数:13,代码来源:hooks.php


示例5: ap_get_current_user_page_template

function ap_get_current_user_page_template()
{
    if (is_anspress()) {
        $user_page = get_query_var('user_page');
        $user_page = $user_page ? $user_page : 'profile';
        $template = 'user-' . $user_page . '.php';
        return apply_filters('ap_get_current_user_page_template', $template);
    }
    return 'content-none.php';
}
开发者ID:coollog,项目名称:theboola,代码行数:10,代码来源:anspress-user.php


示例6: is_ap_user

/**
 * Check if current page is user page
 * @return boolean
 */
function is_ap_user()
{
    if (is_anspress() && ap_current_page() == ap_get_user_page_slug()) {
        return true;
    }
    return false;
}
开发者ID:Krl4,项目名称:anspress,代码行数:11,代码来源:functions.php


示例7: wp_head

 /**
  * Add feed and links in HEAD of the document
  */
 public function wp_head()
 {
     if (is_anspress()) {
         $q_feed = get_post_type_archive_feed_link('question');
         $a_feed = get_post_type_archive_feed_link('answer');
         echo '<link rel="alternate" type="application/rss+xml" title="' . esc_attr__('Question feed', 'ap') . '" href="' . esc_url($q_feed) . '" />';
         echo '<link rel="alternate" type="application/rss+xml" title="' . esc_attr__('Answers feed', 'ap') . '" href="' . esc_url($a_feed) . '" />';
     }
     if (is_question() && get_query_var('ap_page') != 'base') {
         echo '<link rel="canonical" href="' . esc_url(get_permalink(get_question_id())) . '">';
         echo '<link rel="shortlink" href="' . esc_url(wp_get_shortlink(get_question_id())) . '" />';
     }
 }
开发者ID:Byrlyne,项目名称:anspress,代码行数:16,代码来源:class-theme.php


示例8: editor_plugins

 public function editor_plugins($plugin, $editor_id)
 {
     if (is_anspress()) {
         $plugin[] = 'wpautoresize';
     }
     return $plugin;
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:7,代码来源:actions.php


示例9: ap_truncate_chars

									<?php 
        echo ap_truncate_chars($category->description, 70);
        ?>
								</div>
							<?php 
    }
    ?>
						</div>
					</li>
				<?php 
}
?>
			</ul>
		</div>
		<?php 
ap_pagination();
?>
	</div>
	<?php 
if (is_active_sidebar('ap-category') && is_anspress()) {
    ?>
	<div class="ap-question-right col-md-3">
		<?php 
    dynamic_sidebar('ap-category');
    ?>
	</div>
	<?php 
}
?>
</div>
开发者ID:socialray,项目名称:surfied-2-0,代码行数:30,代码来源:categories.php


示例10: body_class

 public function body_class($classes)
 {
     // add anspress class to body
     if (is_anspress()) {
         $classes[] = 'anspress';
     }
     // return the $classes array
     return $classes;
 }
开发者ID:coollog,项目名称:theboola,代码行数:9,代码来源:anspress-main.php


示例11: ap_title

 public function ap_title($title)
 {
     if (is_anspress()) {
         $new_title = ap_page_title();
         $new_title = str_replace('[anspress]', $new_title, $title);
         $new_title = apply_filters('ap_title', $new_title);
         return $new_title;
     }
     return $title;
 }
开发者ID:jessor,项目名称:anspress,代码行数:10,代码来源:anspress-theme.php


示例12: is_ap_user

function is_ap_user()
{
    if (is_anspress() && get_query_var('ap_page') == 'user') {
        return true;
    }
    return false;
}
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:7,代码来源:functions.php


示例13: _e

        _e('No description.', 'tags_for_anspress');
    }
    ?>
						</div>
					</div>
				</li>
			<?php 
}
?>
		</ul><!-- close .ap-term-tag-box.clearfix -->

		<?php 
ap_pagination();
?>
	</div><!-- close #ap-tags -->

	<?php 
if (is_active_sidebar('ap-tags') && is_anspress()) {
    ?>
		<div class="ap-tags-sidebar col-md-3">
			<?php 
    dynamic_sidebar('ap-tags');
    ?>
		</div>
	<?php 
}
?>

</div><!-- close .row -->

开发者ID:cowlicker12,项目名称:tags-for-anspress,代码行数:29,代码来源:tags.php


示例14: while

    /* Start the Loop */
    while (ap_activities()) {
        ap_the_activity();
        ap_get_template_part('activity/item');
    }
    ?>
			</div>
		<?php 
    ap_activity_pagination();
    ?>
		<?php 
} else {
    ap_get_template_part('content-none');
}
?>
	</div>
	<?php 
if (is_active_sidebar('ap-activity') && is_anspress()) {
    ?>
		<div class="ap-question-right col-md-3">
			<?php 
    dynamic_sidebar('ap-activity');
    ?>
		</div>
	<?php 
}
?>
</div>


开发者ID:Byrlyne,项目名称:anspress,代码行数:28,代码来源:index.php


示例15: feed_link

 public function feed_link()
 {
     if (is_anspress()) {
         echo '<link href="' . esc_url(home_url('/feed/question-feed')) . '" title="' . __('Question >> Feed', 'ap') . '" type="application/rss+xml" rel="alternate">';
     }
 }
开发者ID:coollog,项目名称:theboola,代码行数:6,代码来源:anspress-theme.php


示例16: ap_qa_on_post

function ap_qa_on_post($post_id = false)
{
    if (is_anspress()) {
        return false;
    }
    if (!$post_id) {
        $post_id = get_the_ID();
    }
    $question_args = ap_base_page_main_query($post_id);
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    $question = new WP_Query($question_args);
    echo '<div class="anspress">';
    echo '<div class="ap-container">';
    include ap_get_theme_location('on-post.php');
    wp_reset_postdata();
    echo '<a href="' . ap_get_link_to('parent/' . get_the_ID()) . '" class="ap-view-all">' . __('View All', 'ap') . '</a>';
    echo '</div>';
    echo '</div>';
}
开发者ID:coollog,项目名称:theboola,代码行数:19,代码来源:anspress-functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_ap_user函数代码示例发布时间:2022-05-15
下一篇:
PHP is_allowed_http_origin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap