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


PHP bbp_is_user_home函数代码示例

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


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

示例1: graphene_bbpress_post_class

 function graphene_bbpress_post_class($classes)
 {
     if (bbp_is_user_home()) {
         $classes[] = 'nodate';
     }
     return $classes;
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:7,代码来源:theme-plugins.php

示例2: 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

示例3: genesis_post_actions

 /**
  * Tweak problematic Genesis post actions
  *
  * @access private
  * @since 0.8
  */
 public function genesis_post_actions()
 {
     /**
      * If the current theme is a child theme of Genesis that also includes
      * the template files bbPress needs, we can leave things how they are.
      */
     if (is_bbpress()) {
         /** Remove Actions ************************************************/
         // Remove genesis breadcrumbs
         remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
         /**
          * Remove post info & meta
          * 
          * If you moved the info/meta from their default locations, you are
          * on your own.
          */
         remove_action('genesis_before_post_content', 'genesis_post_info');
         remove_action('genesis_after_post_content', 'genesis_post_meta');
         /**
          * Remove Genesis post image and content
          *
          * bbPress heavily relies on the_content() so if Genesis is
          * modifying it unexpectedly, we need to un-unexpect it.
          */
         remove_action('genesis_post_content', 'genesis_do_post_image');
         remove_action('genesis_post_content', 'genesis_do_post_content');
         /**
          * Remove authorbox
          * 
          * In some odd cases the Genesis authorbox could appear
          */
         remove_action('genesis_after_post', 'genesis_do_author_box_single');
         // Remove the navigation after the post loop
         remove_action('genesis_after_endwhile', 'genesis_posts_nav');
         // Remove post title from profile pages (as they don't work)
         if (bbp_is_single_user() || bbp_is_single_user_edit() || bbp_is_user_home()) {
             remove_action('genesis_post_title', 'genesis_do_post_title');
         }
         /** Add Actions ***************************************************/
         // Re add 'the_content' back onto 'genesis_post_content'
         add_action('genesis_post_content', 'the_content');
     }
 }
开发者ID:norcross,项目名称:bbPress-Genesis-Extend,代码行数:49,代码来源:bbpress-genesis-extend.php

示例4: bbp_title

/**
 * Custom page title for bbPress pages
 *
 * @since bbPress (r2788)
 *
 * @param string $title Optional. The title (not used).
 * @param string $sep Optional, default is '»'. How to separate the
 *                     various items within the page title.
 * @param string $seplocation Optional. Direction to display title, 'right'.
 * @uses bbp_is_single_user() To check if it's a user profile page
 * @uses bbp_is_single_user_edit() To check if it's a user profile edit page
 * @uses bbp_is_user_home() To check if the profile page is of the current user
 * @uses get_query_var() To get the user id
 * @uses get_userdata() To get the user data
 * @uses bbp_is_single_forum() To check if it's a forum
 * @uses bbp_get_forum_title() To get the forum title
 * @uses bbp_is_single_topic() To check if it's a topic
 * @uses bbp_get_topic_title() To get the topic title
 * @uses bbp_is_single_reply() To check if it's a reply
 * @uses bbp_get_reply_title() To get the reply title
 * @uses is_tax() To check if it's the tag page
 * @uses get_queried_object() To get the queried object
 * @uses bbp_is_single_view() To check if it's a view
 * @uses bbp_get_view_title() To get the view title
 * @uses apply_filters() Calls 'bbp_raw_title' with the title
 * @uses apply_filters() Calls 'bbp_profile_page_wp_title' with the title,
 *                        separator and separator location
 * @return string The tite
 */
function bbp_title($title = '', $sep = '»', $seplocation = '')
{
    // Title array
    $new_title = array();
    /** Archives **************************************************************/
    // Forum Archive
    if (bbp_is_forum_archive()) {
        $new_title['text'] = bbp_get_forum_archive_title();
        // Topic Archive
    } elseif (bbp_is_topic_archive()) {
        $new_title['text'] = bbp_get_topic_archive_title();
        /** Edit ******************************************************************/
        // Forum edit page
    } elseif (bbp_is_forum_edit()) {
        $new_title['text'] = bbp_get_forum_title();
        $new_title['format'] = esc_attr__('Forum Edit: %s', 'bbpress');
        // Topic edit page
    } elseif (bbp_is_topic_edit()) {
        $new_title['text'] = bbp_get_topic_title();
        $new_title['format'] = esc_attr__('Topic Edit: %s', 'bbpress');
        // Reply edit page
    } elseif (bbp_is_reply_edit()) {
        $new_title['text'] = bbp_get_reply_title();
        $new_title['format'] = esc_attr__('Reply Edit: %s', 'bbpress');
        // Topic tag edit page
    } elseif (bbp_is_topic_tag_edit()) {
        $new_title['text'] = bbp_get_topic_tag_name();
        $new_title['format'] = esc_attr__('Topic Tag Edit: %s', 'bbpress');
        /** Singles ***************************************************************/
        // Forum page
    } elseif (bbp_is_single_forum()) {
        $new_title['text'] = bbp_get_forum_title();
        $new_title['format'] = esc_attr__('Forum: %s', 'bbpress');
        // Topic page
    } elseif (bbp_is_single_topic()) {
        $new_title['text'] = bbp_get_topic_title();
        $new_title['format'] = esc_attr__('Topic: %s', 'bbpress');
        // Replies
    } elseif (bbp_is_single_reply()) {
        $new_title['text'] = bbp_get_reply_title();
        // Topic tag page
    } elseif (bbp_is_topic_tag() || get_query_var('bbp_topic_tag')) {
        $new_title['text'] = bbp_get_topic_tag_name();
        $new_title['format'] = esc_attr__('Topic Tag: %s', 'bbpress');
        /** Users *****************************************************************/
        // Profile page
    } elseif (bbp_is_single_user()) {
        // User is viewing their own profile
        if (bbp_is_user_home()) {
            $new_title['text'] = esc_attr_x('Your', 'User viewing his/her own profile', 'bbpress');
            // User is viewing someone else's profile (so use their display name)
        } else {
            $new_title['text'] = sprintf(esc_attr_x("%s's", 'User viewing another users profile', 'bbpress'), get_userdata(bbp_get_user_id())->display_name);
        }
        // User topics created
        if (bbp_is_single_user_topics()) {
            $new_title['format'] = esc_attr__("%s Topics", 'bbpress');
            // User rueplies created
        } elseif (bbp_is_single_user_replies()) {
            $new_title['format'] = esc_attr__("%s Replies", 'bbpress');
            // User favorites
        } elseif (bbp_is_favorites()) {
            $new_title['format'] = esc_attr__("%s Favorites", 'bbpress');
            // User subscriptions
        } elseif (bbp_is_subscriptions()) {
            $new_title['format'] = esc_attr__("%s Subscriptions", 'bbpress');
            // User "home"
        } else {
            $new_title['format'] = esc_attr__("%s Profile", 'bbpress');
        }
        // Profile edit page
//.........这里部分代码省略.........
开发者ID:danielcoats,项目名称:schoolpress,代码行数:101,代码来源:template.php

示例5: get_post_meta

        }
        if ($sidebar_1 != 'None' && $sidebar_2 != 'None') {
            $body_classes[] = 'double-sidebars';
        }
    } else {
        $sidebar_1 = get_post_meta($c_pageID, 'sbg_selected_sidebar_replacement', true);
        $sidebar_2 = get_post_meta($c_pageID, 'sbg_selected_sidebar_2_replacement', true);
        if (is_array($sidebar_1) && $sidebar_1[0]) {
            $body_classes[] = 'has-sidebar';
        }
        if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0]) {
            $body_classes[] = 'double-sidebars';
        }
    }
}
if (is_bbpress() && (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search())) {
    $sidebar_1 = $smof_data['ppbress_sidebar'];
    $sidebar_2 = $smof_data['ppbress_sidebar_2'];
    if ($sidebar_1 != 'None') {
        $body_classes[] = 'has-sidebar';
    }
    if ($sidebar_1 != 'None' && $sidebar_2 != 'None') {
        $body_classes[] = 'double-sidebars';
    }
}
if (class_exists('TribeEvents') && is_events_archive()) {
    if ($smof_data['pages_sidebar'] != 'None') {
        $sidebar_1 = array($smof_data['pages_sidebar']);
    } else {
        $sidebar_1 = '';
    }
开发者ID:bbwebservices,项目名称:cl2,代码行数:31,代码来源:header.php

示例6: bbp_topic_id

 * @subpackage Theme
 */
?>

<ul id="bbp-topic-<?php 
bbp_topic_id();
?>
" <?php 
bbp_topic_class();
?>
>

	<li class="bbp-topic-title">

		<?php 
if (bbp_is_user_home()) {
    ?>

			<?php 
    if (bbp_is_favorites()) {
        ?>

				<span class="bbp-topic-action">

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

					<?php 
        bbp_user_favorites_link(array('before' => '', 'favorite' => '+', 'favorited' => '&times;'));
        ?>
开发者ID:berniecultess,项目名称:infirev,代码行数:31,代码来源:loop-single-topic.php

示例7: bbp_get_template_part

				<?php 
    //bbp_get_template_part( 'pagination', 'topics' );
    ?>

				<?php 
    bbp_get_template_part('loop', 'topics');
    ?>

				<?php 
    bbp_get_template_part('pagination', 'topics');
    ?>

			<?php 
} else {
    ?>

				<p><?php 
    bbp_is_user_home() ? _e('You have not created any topics.', 'firmasite') : _e('This user has not created any topics.', 'firmasite');
    ?>
</p>

			<?php 
}
?>

		</div>
	</div><!-- #bbp-user-topics-started -->

	<?php 
do_action('bbp_template_after_user_topics_created');
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:30,代码来源:user-topics-created.php

示例8: child_before_content

function child_before_content()
{
    // Set the default
    if (empty($columns)) {
        $columns = 'nine';
    } else {
        // Check the function for a returned variable
        $columns = $columns;
    }
    // force wide on onecolumn-page template
    if (is_page_template('onecolumn-page.php')) {
        $columns = 'fourteen';
    }
    // force wide on bbPress pages
    if (class_exists('bbPress')) {
        if (is_bbpress()) {
            $columns = 'fourteen';
        }
        // unless it's the member profile
        if (bbp_is_user_home()) {
            $columns = 'nine';
        }
    }
    // bbPress
    // Apply the markup
    echo "<a name=\"top\" id=\"top\"></a>";
    // detect the page layout
    $sidebar_position = of_get_option('page_layout');
    //sidebar positon left and not a wide page
    if ($sidebar_position == "left" && !is_page_template('onecolumn-page.php') && is_dynamic_sidebar()) {
        echo "<div id=\"content\" class=\"{$columns} columns left omega\">";
        // sidebar right and
    } elseif ($sidebar_position == "right" && !is_page_template('onecolumn-page.php') && is_dynamic_sidebar()) {
        echo "<div id=\"content\" class=\"{$columns} columns offset-by-one\">";
    } else {
        echo "<div id=\"content\" class=\"{$columns} columns wide\">";
    }
}
开发者ID:JMulligan,项目名称:skeleton_wp,代码行数:38,代码来源:functions.php

示例9: bbp_get_template_part

				<?php 
    bbp_get_template_part('pagination', 'topics');
    ?>

				<?php 
    bbp_get_template_part('loop', 'topics');
    ?>

				<?php 
    bbp_get_template_part('pagination', 'topics');
    ?>

			<?php 
} else {
    ?>

				<p><?php 
    bbp_is_user_home() ? esc_html_e('You have not created any topics.', 'monsoon') : esc_html_e('This user has not created any topics.', 'monsoon');
    ?>
</p>

			<?php 
}
?>

		</div>
	</div><!-- #bbp-user-topics-started -->

	<?php 
do_action('bbp_template_after_user_topics_created');
开发者ID:estrategasdigitales,项目名称:flazam,代码行数:30,代码来源:user-topics-created.php

示例10: bbp_make_ham_user

/**
 * Mark a users topics and replies as spam when the user is marked as spam
 *
 * @since bbPress (r3405)
 *
 * @global WPDB $wpdb
 * @param int $user_id Optional. User ID to unspam. Defaults to displayed user.
 *
 * @uses bbp_is_single_user()
 * @uses bbp_is_user_home()
 * @uses bbp_get_displayed_user_id()
 * @uses bbp_is_user_keymaster()
 * @uses get_blogs_of_user()
 * @uses bbp_get_topic_post_type()
 * @uses bbp_get_reply_post_type()
 * @uses switch_to_blog()
 * @uses get_post_type()
 * @uses bbp_unspam_topic()
 * @uses bbp_unspam_reply()
 * @uses restore_current_blog()
 *
 * @return If no user ID passed
 */
function bbp_make_ham_user($user_id = 0)
{
    // Use displayed user if it's not yourself
    if (empty($user_id) && bbp_is_single_user() && !bbp_is_user_home()) {
        $user_id = bbp_get_displayed_user_id();
    }
    // Bail if no user ID
    if (empty($user_id)) {
        return false;
    }
    // Bail if user ID is keymaster
    if (bbp_is_user_keymaster($user_id)) {
        return false;
    }
    // Arm the torpedos
    global $wpdb;
    // Get the blog IDs of the user to mark as spam
    $blogs = get_blogs_of_user($user_id, true);
    // If user has no blogs, they are a guest on this site
    if (empty($blogs)) {
        $blogs[$wpdb->blogid] = array();
    }
    // Make array of post types to mark as spam
    $post_types = array(bbp_get_topic_post_type(), bbp_get_reply_post_type());
    $post_types = "'" . implode("', '", $post_types) . "'";
    // Loop through blogs and remove their posts
    foreach ((array) array_keys($blogs) as $blog_id) {
        // Switch to the blog ID
        switch_to_blog($blog_id);
        // Get topics and replies
        $posts = $wpdb->get_col($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE post_author = %d AND post_status = '%s' AND post_type IN ( {$post_types} )", $user_id, bbp_get_spam_status_id()));
        // Loop through posts and spam them
        if (!empty($posts)) {
            foreach ($posts as $post_id) {
                // The routines for topics ang replies are different, so use the
                // correct one based on the post type
                switch (get_post_type($post_id)) {
                    case bbp_get_topic_post_type():
                        bbp_unspam_topic($post_id);
                        break;
                    case bbp_get_reply_post_type():
                        bbp_unspam_reply($post_id);
                        break;
                }
            }
        }
        // Switch back to current blog
        restore_current_blog();
    }
    // Success
    return true;
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:75,代码来源:capabilities.php

示例11: bbp_forum_id

 * @subpackage Atelier
 */
?>

<ul id="bbp-forum-<?php 
bbp_forum_id();
?>
" <?php 
bbp_forum_class();
?>
>

	<li class="bbp-forum-info">

		<?php 
if (bbp_is_user_home() && bbp_is_subscriptions()) {
    ?>

			<span class="bbp-row-actions">

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

				<?php 
    bbp_forum_subscription_link(array('before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;'));
    ?>

				<?php 
    do_action('bbp_theme_after_forum_subscription_action');
    ?>
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:31,代码来源:loop-single-forum.php

示例12: widget


//.........这里部分代码省略.........
            bbp_user_profile_url(bbp_get_current_user_id());
            ?>
" class="submit user-submit thumbnail pull-left"><?php 
            echo get_avatar(bbp_get_current_user_id(), '64');
            ?>
</a>
				<h4><?php 
            bbp_user_profile_link(bbp_get_current_user_id());
            ?>
</h4>
				<div class="btn-group">
					<a class="btn btn-default btn-sm" href="<?php 
            bbp_user_profile_edit_url(bbp_get_current_user_id());
            ?>
" title="<?php 
            printf(esc_attr__("Edit Your Profile", 'ipt_kb'));
            ?>
"><span class="glyphicon glyphicon-edit"></span> <?php 
            _e('Edit', 'bbpress');
            ?>
</a>
					<?php 
            bbp_logout_link();
            ?>
				</div>

				<div class="clearfix"></div>

				<div class="list-group">
					<a href="<?php 
            bbp_user_profile_url(bbp_get_current_user_id());
            ?>
" class="list-group-item bbp-user-forum-role <?php 
            if (bbp_is_user_home() && bbp_is_single_user_profile()) {
                echo 'active';
            }
            ?>
">
						<span class="glyphicon ipt-icomoon-user4"></span> <?php 
            printf(__('%s Forum Role', 'ipt_kb'), '<span class="badge">' . bbp_get_user_display_role(bbp_get_current_user_id()) . '</span>');
            ?>
					</a>
					<a href="<?php 
            bbp_user_topics_created_url(bbp_get_current_user_id());
            ?>
" class="list-group-item bbp-user-topic-count <?php 
            if (bbp_is_user_home() && bbp_is_single_user_topics()) {
                echo 'active';
            }
            ?>
">
						<span class="glyphicon ipt-icomoon-bubbles4"></span> <?php 
            printf(__('%s Topics Started', 'ipt_kb'), '<span class="badge">' . bbp_get_user_topic_count_raw(bbp_get_current_user_id()) . '</span>');
            ?>
					</a>
					<a href="<?php 
            bbp_user_replies_created_url(bbp_get_current_user_id());
            ?>
" class="list-group-item bbp-user-reply-count <?php 
            if (bbp_is_user_home() && bbp_is_single_user_replies()) {
                echo 'active';
            }
            ?>
">
						<span class="glyphicon ipt-icomoon-reply"></span> <?php 
            printf(__('%s Replies Created', 'ipt_kb'), '<span class="badge">' . bbp_get_user_reply_count_raw(bbp_get_current_user_id()) . '</span>');
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:67,代码来源:class-ipt-kb-bbp-login-widget.php

示例13: bbp_get_template_part

			<?php 
    bbp_get_template_part('loop', 'single-topic');
    ?>

		<?php 
}
?>

	</li>

	<li class="bbp-footer">

		<div class="tr">
			<p>
				<span class="td colspan<?php 
echo bbp_is_user_home() && (bbp_is_favorites() || bbp_is_subscriptions()) ? '5' : '4';
?>
">&nbsp;</span>
			</p>
		</div><!-- .tr -->

	</li>

</ul><!-- #bbp-forum-<?php 
bbp_forum_id();
?>
 -->

<?php 
do_action('bbp_template_after_topics_loop');
开发者ID:kanawanzx,项目名称:support_forum,代码行数:30,代码来源:loop-topics.php

示例14: bbp_get_template_part

				<?php 
    bbp_get_template_part('pagination', 'replies');
    ?>

				<?php 
    bbp_get_template_part('loop', 'replies');
    ?>

				<?php 
    bbp_get_template_part('pagination', 'replies');
    ?>

			<?php 
} else {
    ?>

				<p><?php 
    bbp_is_user_home() ? _e('You have not replied to any topics.', 'wpdance') : _e('This user has not replied to any topics.', 'wpdance');
    ?>
</p>

			<?php 
}
?>

		</div>
	</div><!-- #bbp-user-replies-created -->

	<?php 
do_action('bbp_template_after_user_replies');
开发者ID:mynein,项目名称:myne,代码行数:30,代码来源:user-replies-created.php

示例15: cb_bbp_author_details

 function cb_bbp_author_details($cb_author_id, $cb_desc = true)
 {
     $cb_author_email = get_the_author_meta('publicemail', $cb_author_id);
     $cb_author_name = get_the_author_meta('display_name', $cb_author_id);
     $cb_author_position = get_the_author_meta('position', $cb_author_id);
     $cb_author_tw = get_the_author_meta('twitter', $cb_author_id);
     $cb_author_go = get_the_author_meta('googleplus', $cb_author_id);
     $cb_author_www = get_the_author_meta('url', $cb_author_id);
     $cb_author_desc = get_the_author_meta('description', $cb_author_id);
     $cb_author_posts = count_user_posts($cb_author_id);
     $cb_author_output = NULL;
     $cb_author_output .= '<div class="cb-author-details cb-bbp clearfix"><div class="cb-mask"><a href="' . bbp_get_user_profile_url() . '" title="' . bbp_get_displayed_user_field('display_name') . '" rel="me">' . get_avatar(bbp_get_displayed_user_field('user_email', 'raw'), apply_filters('bbp_single_user_details_avatar_size', 150)) . '</a></div><div class="cb-meta"><h3><a href="' . bbp_get_user_profile_url() . '" title="' . bbp_get_displayed_user_field('display_name') . '">' . $cb_author_name . '</a></h3>';
     if ($cb_author_position != NULL) {
         $cb_author_output .= '<div class="cb-author-position">' . $cb_author_position . '</div>';
     }
     if ($cb_author_desc != NULL && $cb_desc == true) {
         $cb_author_output .= '<p class="cb-author-bio">' . $cb_author_desc . '</p>';
     }
     if ($cb_author_email != NULL || $cb_author_www != NULL || $cb_author_tw != NULL || $cb_author_go != NULL) {
         $cb_author_output .= '<div class="cb-author-page-contact">';
     }
     if ($cb_author_email != NULL) {
         $cb_author_output .= '<a href="mailto:' . $cb_author_email . '"><i class="icon-envelope-alt cb-tip-bot" title="' . __('Email', 'cubell') . '"></i></a>';
     }
     if ($cb_author_www != NULL) {
         $cb_author_output .= ' <a href="' . $cb_author_www . '" target="_blank"><i class="icon-link cb-tip-bot" title="' . __('Website', 'cubell') . '"></i></a> ';
     }
     if ($cb_author_tw != NULL) {
         $cb_author_output .= ' <a href="//www.twitter.com/' . $cb_author_tw . '" target="_blank" ><i class="icon-twitter cb-tip-bot" title="Twitter"></i></a>';
     }
     if ($cb_author_go != NULL) {
         $cb_author_output .= ' <a href="' . $cb_author_go . '" rel="publisher" target="_top" title="Google+" class="cb-googleplus cb-tip-bot" ><img src="//ssl.gstatic.com/images/icons/gplus-32.png"  data-src-retina="//ssl.gstatic.com/images/icons/gplus-64.png" alt="Google+" ></a>';
     }
     if ($cb_author_email != NULL || $cb_author_www != NULL || $cb_author_go != NULL || $cb_author_tw != NULL) {
         $cb_author_output .= '</div>';
     }
     $cb_author_output .= '<div id="cb-user-nav"><ul>';
     if (bbp_is_single_user_replies()) {
         $cb_user_current = 'current';
     }
     $cb_author_output .= '<li class="';
     if (bbp_is_single_user_topics()) {
         $cb_author_output .= 'current';
     }
     $cb_author_output .= '"><span class="bbp-user-topics-created-link"><a href="' . bbp_get_user_topics_created_url() . '">' . __('Topics Started', 'bbpress') . '</a></span></li>';
     $cb_author_output .= '<li class="';
     if (bbp_is_single_user_replies()) {
         $cb_author_output .= 'current';
     }
     $cb_author_output .= '"><span class="bbp-user-replies-created-link"><a href="' . bbp_get_user_replies_created_url() . '">' . __('Replies Created', 'bbpress') . '</a></span></li>';
     if (bbp_is_favorites_active()) {
         $cb_author_output .= '<li class="';
         if (bbp_is_favorites()) {
             $cb_author_output .= 'current';
         }
         $cb_author_output .= '"><span class="bbp-user-favorites-link"><a href="' . bbp_get_favorites_permalink() . '">' . __('Favorites', 'bbpress') . '</a></span></li>';
     }
     if (bbp_is_user_home() || current_user_can('edit_users')) {
         if (bbp_is_subscriptions_active()) {
             $cb_author_output .= '<li class="';
             if (bbp_is_subscriptions()) {
                 $cb_author_output .= 'current';
             }
             $cb_author_output .= '"><span class="bbp-user-subscriptions-link"><a href="' . bbp_get_subscriptions_permalink() . '">' . __('Subscriptions', 'bbpress') . '</a></span></li>';
         }
         $cb_author_output .= '<li class="';
         if (bbp_is_single_user_edit()) {
             $cb_author_output .= 'current';
         }
         $cb_author_output .= '"><span class="bbp-user-edit-link"><a href="' . bbp_get_user_profile_edit_url() . '">' . __('Edit', 'bbpress') . '</a></span></li>';
     }
     $cb_author_output .= '</ul></div><!-- #cb-user-nav -->';
     $cb_author_output .= '</div></div>';
     return $cb_author_output;
 }
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:75,代码来源:core.php


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