本文整理汇总了PHP中is_bbpress函数的典型用法代码示例。如果您正苦于以下问题:PHP is_bbpress函数的具体用法?PHP is_bbpress怎么用?PHP is_bbpress使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_bbpress函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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;
}
示例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'));
}
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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');
}
}
}
}
示例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();
}
示例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();
}
示例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);
}
}
}