本文整理汇总了PHP中is_bbpress函数的典型用法代码示例。如果您正苦于以下问题:PHP is_bbpress函数的具体用法?PHP is_bbpress怎么用?PHP is_bbpress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_bbpress函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _base_scripts
function _base_scripts()
{
global $post;
// remove version
add_filter('script_loader_src', 'remove_src_version');
// global styles
wp_enqueue_style('bootstrap-min', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '');
wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '');
if (class_exists('bbPress')) {
if (is_bbpress()) {
wp_enqueue_style('bbpress-custom', get_template_directory_uri() . '/assets/css/bbpress.css', array(), '');
}
}
wp_enqueue_style('custom', get_template_directory_uri() . '/assets/css/customs.css', array(), '');
wp_enqueue_style('custom-style', get_template_directory_uri() . '/style.css', array(), '');
// global scripts
wp_enqueue_script('jquery');
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '', true);
if (is_single() && get_post_type() == 'course_unit') {
wp_enqueue_script('froogaloop2', get_template_directory_uri() . '/assets/js/froogaloop2.min.js', array(), '', true);
}
if (is_page_template('page-templates/tpl-webinars.php')) {
wp_enqueue_style('fancybox', get_template_directory_uri() . '/assets/lib/fancybox/jquery.fancybox.css', array(), '');
wp_enqueue_script('fancybox', get_template_directory_uri() . '/assets/lib/fancybox/jquery.fancybox.pack.js', array(), '', true);
wp_enqueue_script('fancybox-media', get_template_directory_uri() . '/assets/lib/fancybox/helpers/jquery.fancybox-media.js', array(), '', true);
}
if (has_shortcode($post->post_content, 'iard_table')) {
wp_enqueue_script('angular', get_template_directory_uri() . '/assets/js/angular.min.js', array(), '', true);
wp_enqueue_script('angular-sanitize', get_template_directory_uri() . '/assets/js/angular-sanitize.js', array(), '', true);
wp_enqueue_script('table-app', get_template_directory_uri() . '/assets/js/tables.js', array(), '', true);
}
wp_enqueue_script('main', get_template_directory_uri() . '/assets/js/main.js', array(), '', true);
}
开发者ID:jhipwell6,项目名称:iard,代码行数:33,代码来源:functions.php
示例2: porto_page_title
function porto_page_title()
{
global $porto_settings;
$output = '';
if (!is_front_page()) {
} elseif (is_home()) {
$output .= $porto_settings['blog-title'];
}
if (is_singular()) {
$output .= porto_page_title_leaf();
} else {
if (is_post_type_archive()) {
if (is_search()) {
$output .= porto_page_title_leaf('search');
} else {
$output .= porto_page_title_archive();
}
} elseif (is_tax() || is_tag() || is_category()) {
$html = porto_page_title_leaf('term');
if (is_tag()) {
$output .= sprintf(__('Tag - %s', 'porto'), $html);
} elseif (is_tax('product_tag')) {
$output .= sprintf(__('Product Tag - %s', 'porto'), $html);
} else {
$output .= $html;
}
} elseif (is_date()) {
if (is_year()) {
$output .= porto_page_title_leaf('year');
} elseif (is_month()) {
$output .= porto_page_title_leaf('month');
} elseif (is_day()) {
$output .= porto_page_title_leaf('day');
}
} elseif (is_author()) {
$output .= porto_page_title_leaf('author');
} elseif (is_search()) {
$output .= porto_page_title_leaf('search');
} elseif (is_404()) {
$output .= porto_page_title_leaf('404');
} elseif (class_exists('bbPress') && is_bbpress()) {
if (bbp_is_search()) {
$output .= porto_page_title_leaf('bbpress_search');
} elseif (bbp_is_single_user()) {
$output .= porto_page_title_leaf('bbpress_user');
} else {
$output .= porto_page_title_leaf();
}
} else {
if (is_home() && !is_front_page()) {
if (get_option('show_on_front') == 'page') {
$output .= get_the_title(get_option('page_for_posts', true));
} else {
$output .= $porto_settings['blog-title'];
}
}
}
}
return apply_filters('porto_page_title', $output);
}
开发者ID:booklein,项目名称:wpbookle,代码行数:60,代码来源:page-title.php
示例3: display_sidebar
/**
* Alter main sidebar to display bbpress_sidebar sidebar
*
* @access public
* @since 2.1.0
*/
public function display_sidebar($sidebar)
{
if (is_bbpress() && wpex_get_mod('bbpress_custom_sidebar', true)) {
$sidebar = 'bbpress_sidebar';
}
return $sidebar;
}
开发者ID:iq007,项目名称:MadScape,代码行数:13,代码来源:bbpress.php
示例4: switch_breadcrumb_nav
public function switch_breadcrumb_nav()
{
if (is_bbpress()) {
remove_action('g1_content_begin', 'g1_add_breadcrumbs');
add_action('g1_content_begin', array($this, 'render_breadcrumb'));
}
}
开发者ID:aragonc,项目名称:3clicks,代码行数:7,代码来源:bbpress-functions.php
示例5: cuttz_bbpress_layout
function cuttz_bbpress_layout($layout)
{
if (!is_bbpress()) {
return $layout;
}
//get current layout saved in genesis setting
$gsettings = get_option(GENESIS_SETTINGS_FIELD, null);
$layout = isset($gsettings['site_layout']) ? $gsettings['site_layout'] : null;
$set = genesis_get_option('bbpress-layout', cuttz_get_skin_page_id(), false);
$set = $set == 'default' ? $layout : $set;
// if no setting in Cuttz defined then use Genesis setting
$forum_id = bbp_get_forum_id();
$forumlayout = false;
if (!empty($forum_id)) {
$forumlayout = esc_attr(get_post_meta($forum_id, '_genesis_layout', true));
if (!empty($forumlayout)) {
return $forumlayout;
}
}
if (empty($forumlayout)) {
return $set;
}
if (is_user_logged_in()) {
}
return $set;
}
开发者ID:garywp,项目名称:cuttz-framework,代码行数:26,代码来源:bbpress-ready.php
示例6: breadcrumb_trail
/**
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
* which should be used in theme templates.
*
* @since 0.1.0
* @access public
* @param array $args Arguments to pass to Breadcrumb_Trail.
* @return void
*/
function breadcrumb_trail($args = array())
{
if (function_exists('is_bbpress') && is_bbpress()) {
$breadcrumb = new bbPress_Breadcrumb_Trail($args);
} else {
$breadcrumb = new Breadcrumb_Trail($args);
}
return $breadcrumb->trail();
}
开发者ID:mrbadao,项目名称:automatic,代码行数:18,代码来源:breadcrumbs.php
示例7: sde_breadcrumb_trail
/**
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
* which should be used in theme templates.
*
* @since 0.1.0
* @access public
* @param array $args Arguments to pass to Breadcrumb_Trail.
* @return void
*/
function sde_breadcrumb_trail($args = array())
{
if (function_exists('is_bbpress') && is_bbpress()) {
$breadcrumb = new bbPress_SDE_Breadcrumb_Trail($args);
} else {
$breadcrumb = new SDE_Breadcrumb_Trail($args);
}
$breadcrumb->trail();
}
开发者ID:wppassion,项目名称:deals-engine,代码行数:18,代码来源:breadcrumb.php
示例8: reactor_breadcrumbs
/**
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
* which should be used in theme templates.
*
* @since 0.1.0
* @access public
* @param array $args Arguments to pass to Breadcrumb_Trail.
* @return void
*/
function reactor_breadcrumbs($args = array())
{
if (function_exists('is_bbpress') && is_bbpress()) {
$breadcrumb = new bbPress_Breadcrumb_Trail($args);
} else {
$breadcrumb = new Breadcrumb_Trail($args);
}
$breadcrumb->trail();
}
开发者ID:terngkub,项目名称:reactor,代码行数:18,代码来源:breadcrumbs.php
示例9: kleo_bbpress_change_layout
function kleo_bbpress_change_layout($layout)
{
if (is_bbpress()) {
$bbpress_template = sq_option('bbpress_sidebar', 'default');
if ($bbpress_template != 'default') {
$layout = $bbpress_template;
}
}
return $layout;
}
开发者ID:6226,项目名称:wp,代码行数:10,代码来源:config.php
示例10: myfossil_plugins_nav_below_fix
function myfossil_plugins_nav_below_fix($nav_below)
{
if (class_exists('bbPress') && is_bbpress()) {
return;
}
if (class_exists('BuddyPress') && is_buddypress()) {
return;
}
return $nav_below;
}
开发者ID:par-orillonsoft,项目名称:myfossil-theme,代码行数:10,代码来源:plugins.php
示例11: AA_is_bbpress
/**
* Helper function which checks whether we are running buddypress
*
* @return bool true if we are on a system running buddypress, false otherwise.
*/
function AA_is_bbpress()
{
if (function_exists('is_bbpress')) {
return is_bbpress();
}
if (is_admin() && is_plugin_active('bbpress/bbpress.php')) {
return true;
}
return false;
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:15,代码来源:helper.functions.php
示例12: ro_enqueue_bbpress_stylesheets
/**
* Load a custom.css style sheet, if it exists in a child theme.
*
* @return void
*/
function ro_enqueue_bbpress_stylesheets()
{
if (!is_admin() and is_bbpress()) {
if (is_child_theme()) {
if (file_exists(get_stylesheet_directory() . "/bbpress.css")) {
wp_enqueue_style('ro-bbpress-css', ROTW16_CURI . '/bbpress.css');
}
}
}
}
开发者ID:tdavidrussell,项目名称:twentysixteen-all,代码行数:15,代码来源:functions.php
示例13: kleo_breadcrumb
/**
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
* which should be used in theme templates.
*
* @since 0.1.0
* @access public
* @param array $args Arguments to pass to Breadcrumb_Trail.
* @return void
*/
function kleo_breadcrumb($args = array())
{
if (function_exists('bp_is_active') && !bp_is_blog_page()) {
$breadcrumb = new buddypress_Breadcrumb_Trail($args);
} elseif (function_exists('is_bbpress') && is_bbpress()) {
$breadcrumb = new bbPress_Breadcrumb_Trail($args);
} else {
$breadcrumb = new Breadcrumb_Trail($args);
}
return $breadcrumb->trail();
}
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:20,代码来源:function-breadcrumb.php
示例14: breadcrumb_trail
/**
* Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class,
* which should be used in theme templates.
*
* @since 0.1.0
* @access public
* @param array $args Arguments to pass to Breadcrumb_Trail.
* @return void
*/
function breadcrumb_trail($args = array())
{
$defaults = array('container' => 'div', 'separator' => '', 'before' => '', 'after' => '', 'show_on_front' => true, 'network' => false, 'show_title' => true, 'show_browse' => false, 'echo' => true, 'post_taxonomy' => array('post' => 'category', 'product' => 'product_cat'), 'labels' => array('browse' => '', 'home' => __('Home', THEME_LANG), 'error_404' => __('404 Not Found', THEME_LANG), 'archives' => __('Archives', THEME_LANG), 'search' => __('Search results for “%s”', THEME_LANG), 'paged' => __('Page %s', THEME_LANG), 'archive_minute' => __('Minute %s', THEME_LANG), 'archive_week' => __('Week %s', THEME_LANG), 'archive_minute_hour' => '%s', 'archive_hour' => '%s', 'archive_day' => '%s', 'archive_month' => '%s', 'archive_year' => '%s'));
$args = wp_parse_args($args, $defaults);
$args = apply_filters('breadcrumb_trail_args', $args);
if (function_exists('is_bbpress') && is_bbpress()) {
$breadcrumb = new bbPress_Breadcrumb_Trail($args);
} else {
$breadcrumb = new Breadcrumb_Trail($args);
}
return $breadcrumb->trail();
}
开发者ID:ngocthangict,项目名称:kutetheme-wp,代码行数:21,代码来源:breadcrumbs.php
示例15: __construct
public function __construct(&$plugin)
{
$this->p =& $plugin;
$this->p->debug->mark();
if (is_admin() || is_bbpress()) {
// load sharing buttons code if sharing features exist and are enabled
if (array_key_exists('ssb', $this->p->is_avail) && $this->p->is_avail['ssb'] === true) {
$classname = __CLASS__ . 'Sharing';
$this->sharing = new $classname($this->p);
}
}
}
开发者ID:christocmp,项目名称:bingopaws,代码行数:12,代码来源:bbpress.php
示例16: is_bbpress
/**
* Conditional check:
* Figure out if bbPress is installed.
* If bbPress is installed, then check that we're on a bbPress template.
*
* @return bool
*/
public static function is_bbpress()
{
/**
* Check if bbPress is installed.
* If not, then return false
*/
if (!function_exists('is_bbpress')) {
return false;
}
/**
* Return the result of the is_woocommerce() function (boolean)
*/
return is_bbpress();
}
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:21,代码来源:class-avada-options-conditionals.php
示例17: _is_portal_page
function _is_portal_page()
{
global $post;
$parents = array_reverse(get_post_ancestors($post->ID));
$parent_id = $parents[0];
if (class_exists('bbPress')) {
$is_bbpress = is_bbpress() ? true : false;
}
if (_in_array($post->ID, _portal_page_id()) || _in_array($parent_id, _portal_page_id()) || is_single() && get_post_type() == 'course_unit' || is_single() && get_post_type() == 'databank' || $is_bbpress) {
return true;
} else {
return false;
}
}
开发者ID:jhipwell6,项目名称:iard,代码行数:14,代码来源:member-functions.php
示例18: sidebar_options
/**
* Get sidebar settings based on the page type
*
* @return array
*/
public function sidebar_options()
{
if (is_home()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('blog_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('blog_archive_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
} elseif (function_exists('is_bbpress') && is_bbpress()) {
$sidebars = array('global' => Avada()->settings->get('bbpress_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
if (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
}
} elseif (function_exists('is_buddypress') && is_buddypress()) {
$sidebars = array('global' => Avada()->settings->get('bbpress_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ppbress_sidebar'), 'sidebar_2' => Avada()->settings->get('ppbress_sidebar_2'), 'position' => Avada()->settings->get('bbpress_sidebar_position'));
} elseif (class_exists('WooCommerce') && (is_product() || is_shop())) {
$sidebars = array('global' => Avada()->settings->get('woo_global_sidebar'), 'sidebar_1' => Avada()->settings->get('woo_sidebar'), 'sidebar_2' => Avada()->settings->get('woo_sidebar_2'), 'position' => Avada()->settings->get('woo_sidebar_position'));
} elseif (class_exists('WooCommerce') && (is_product_category() || is_product_tag())) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('woocommerce_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('woocommerce_archive_sidebar_2'), 'position' => Avada()->settings->get('woo_sidebar_position'));
} elseif (is_page()) {
$sidebars = array('global' => Avada()->settings->get('pages_global_sidebar'), 'sidebar_1' => Avada()->settings->get('pages_sidebar'), 'sidebar_2' => Avada()->settings->get('pages_sidebar_2'), 'position' => Avada()->settings->get('default_sidebar_pos'));
} elseif (is_single()) {
$sidebars = array('global' => Avada()->settings->get('posts_global_sidebar'), 'sidebar_1' => Avada()->settings->get('posts_sidebar'), 'sidebar_2' => Avada()->settings->get('posts_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
if (is_singular('avada_portfolio')) {
$sidebars = array('global' => Avada()->settings->get('portfolio_global_sidebar'), 'sidebar_1' => Avada()->settings->get('portfolio_sidebar'), 'sidebar_2' => Avada()->settings->get('portfolio_sidebar_2'), 'position' => Avada()->settings->get('portfolio_sidebar_position'));
} else {
if (is_singular('tribe_events') || is_singular('tribe_organizer') || is_singular('tribe_venue')) {
$sidebars = array('global' => Avada()->settings->get('ec_global_sidebar'), 'sidebar_1' => Avada()->settings->get('ec_sidebar'), 'sidebar_2' => Avada()->settings->get('ec_sidebar_2'), 'position' => Avada()->settings->get('ec_sidebar_pos'));
}
}
if (is_singular('tribe_organizer') || is_singular('tribe_venue')) {
$sidebars['global'] = 1;
}
} elseif (is_archive()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('blog_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('blog_archive_sidebar_2'), 'position' => Avada()->settings->get('blog_sidebar_position'));
if (is_post_type_archive('avada_portfolio') || is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags')) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('portfolio_archive_sidebar'), 'sidebar_2' => Avada()->settings->get('portfolio_archive_sidebar_2'), 'position' => Avada()->settings->get('portfolio_sidebar_position'));
}
} elseif (is_search()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('search_sidebar'), 'sidebar_2' => Avada()->settings->get('search_sidebar_2'), 'position' => Avada()->settings->get('search_sidebar_position'));
} else {
$sidebars = array('global' => Avada()->settings->get('pages_global_sidebar'), 'sidebar_1' => Avada()->settings->get('pages_sidebar'), 'sidebar_2' => Avada()->settings->get('pages_sidebar_2'), 'position' => Avada()->settings->get('default_sidebar_pos'));
}
if (class_exists('Tribe__Events__Main') && is_events_archive()) {
$sidebars = array('global' => '1', 'sidebar_1' => Avada()->settings->get('ec_sidebar'), 'sidebar_2' => Avada()->settings->get('ec_sidebar_2'), 'position' => Avada()->settings->get('ec_sidebar_pos'));
}
// Remove sidebars from the certain woocommerce pages
if (class_exists('WooCommerce')) {
if (is_cart() || is_checkout() || is_account_page() || get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))) {
$sidebars = array();
}
}
return $sidebars;
}
开发者ID:Aldebaran10,项目名称:avada,代码行数:55,代码来源:class-avada-layout.php
示例19: fix_breadcrumbs
public static function fix_breadcrumbs($html = '', $args = array())
{
if (function_exists('is_bbpress') && is_bbpress() && function_exists('bbp_get_breadcrumb')) {
remove_filter('bbp_no_breadcrumb', '__return_true', 20);
$html = bbp_get_breadcrumb(array('before' => $args['beforeBreadcrumbs'] . '<ol' . $args['listAttr'] . ' xmlns:v="http://rdf.data-vocabulary.org/#">', 'after' => '</ol>' . $args['afterBreadcrumbs'], 'sep' => $args['delimiter'] ? $args['delimiter'] : ' ', 'pad_sep' => false, 'sep_before' => '', 'sep_after' => '', 'crumb_before' => $args['linkBefore'], 'crumb_after' => $args['linkAfter'], 'current_before' => $args['before'], 'current_after' => $args['after']));
$html = str_replace('<a ', '<a' . $args['linkAttr'], $html);
if ($args['linkBefore'] && $args['before']) {
$html = str_replace($args['linkBefore'] . $args['before'], $args['before'], $html);
}
if ($args['linkAfter'] && $args['after']) {
$html = str_replace($args['linkAfter'] . $args['after'], $args['after'], $html);
}
add_filter('bbp_no_breadcrumb', '__return_true', 20);
}
return $html;
}
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:16,代码来源:mod-bb-press.php
示例20: ddw_gwnf_bbpress_noresults_template_logic
/**
* Template logic helper function for bbPress filter 'bbp_get_template_part'.
*
* @since 1.5.0
*
* @param array $templates
* @param string $slug
* @param string $name
*
* @return array Array of template parts for bbPress.
*/
function ddw_gwnf_bbpress_noresults_template_logic($templates, $slug, $name)
{
/** Only do stuff when on 'feedback-no-search.php' template part: */
if ($slug == 'feedback' && $name == 'no-search' && is_bbpress()) {
/** Only for no forum search results, remove this original bbPress filter */
remove_filter('the_content', 'bbp_replace_the_content');
/**
* Add our widgetized area instead.
*
* Note: This needs to happen early on, BEFORE the original bbPress content.
*/
add_action('the_content', 'ddw_gwnf_bbpress_widgetized_noresults_content', 5);
}
// end-if bbPress template part check
/** Let bbPress take over its templates again */
return $templates;
}
开发者ID:BarkerCA,项目名称:parallax,代码行数:28,代码来源:gwnf-bbpress-widgetized-noresults.php
注:本文中的is_bbpress函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论