function graphene_bbpress_post_class($classes) { if (bbp_is_user_home()) { $classes[] = 'nodate'; } return $classes; }
/** * 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; }
/** * 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'); } }
/** * 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 } elseif (bbp_is_single_user_edit()) { // Current user if (bbp_is_user_home_edit()) { $new_title['text'] = esc_attr__('Edit Your Profile', 'bbpress'); // Other user } else { $new_title['text'] = get_userdata(bbp_get_user_id())->display_name; $new_title['format'] = esc_attr__("Edit %s's Profile", 'bbpress'); } /** Views *****************************************************************/ // Views } elseif (bbp_is_single_view()) { $new_title['text'] = bbp_get_view_title(); $new_title['format'] = esc_attr__('View: %s', 'bbpress'); /** Search ****************************************************************/ // Search } elseif (bbp_is_search()) { $new_title['text'] = bbp_get_search_title(); } // This filter is deprecated. Use 'bbp_before_title_parse_args' instead. $new_title = apply_filters('bbp_raw_title_array', $new_title); // Set title array defaults $new_title = bbp_parse_args($new_title, array('text' => $title, 'format' => '%s'), 'title'); // Get the formatted raw title $new_title = sprintf($new_title['format'], $new_title['text']); // Filter the raw title $new_title = apply_filters('bbp_raw_title', $new_title, $sep, $seplocation); // Compare new title with original title if ($new_title === $title) { return $title; } // Temporary separator, for accurate flipping, if necessary $t_sep = '%WP_TITILE_SEP%'; $prefix = ''; if (!empty($new_title)) { $prefix = " {$sep} "; } // sep on right, so reverse the order if ('right' === $seplocation) { $new_title_array = array_reverse(explode($t_sep, $new_title)); $new_title = implode(" {$sep} ", $new_title_array) . $prefix; // sep on left, do not reverse } else { $new_title_array = explode($t_sep, $new_title); $new_title = $prefix . implode(" {$sep} ", $new_title_array); } // Filter and return return apply_filters('bbp_title', $new_title, $sep, $seplocation); }
} 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 = ''; }
* @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' => '×')); ?>
<?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');
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\">"; } }
<?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');
/** * 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; }
* @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' => '×')); ?> <?php do_action('bbp_theme_after_forum_subscription_action'); ?>
/** * Displays the output, the login form * * @since bbPress (r2827) * * @param mixed $args Arguments * @param array $instance Instance * @uses apply_filters() Calls 'bbp_login_widget_title' with the title * @uses get_template_part() To get the login/logged in form */ public function widget($args = array(), $instance = array()) { // Get widget settings $settings = $this->parse_settings($instance); // Typical WordPress filter $settings['title'] = apply_filters('widget_title', $settings['title'], $instance, $this->id_base); // bbPress filters $settings['title'] = apply_filters('bbp_login_widget_title', $settings['title'], $instance, $this->id_base); $settings['register'] = apply_filters('bbp_login_widget_register', $settings['register'], $instance, $this->id_base); $settings['lostpass'] = apply_filters('bbp_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base); echo $args['before_widget']; if (!empty($settings['title'])) { echo $args['before_title'] . $settings['title'] . $args['after_title']; } if (!is_user_logged_in()) { ?> <form method="post" action="<?php bbp_wp_login_action(array('context' => 'login_post')); ?> " class="bbp-login-form"> <fieldset> <legend><?php _e('Log In', 'bbpress'); ?> </legend> <div class="bbp-username form-group"> <label for="user_login" class="sr-only"><?php _e('Username', 'bbpress'); ?> : </label> <div class="input-group"> <span class="input-group-addon"> <span class="glyphicon ipt-icomoon-user"></span> </span> <input placeholder="<?php _e('Username', 'bbpress'); ?> " class="form-control" type="text" name="log" value="<?php bbp_sanitize_val('user_login', 'text'); ?> " size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?> " /> </div> </div> <div class="bbp-password form-group"> <label for="user_pass" class="sr-only"><?php _e('Password', 'bbpress'); ?> : </label> <div class="input-group"> <span class="input-group-addon"> <span class="glyphicon ipt-icomoon-console"></span> </span> <input placeholder="<?php _e('Password', 'bbpress'); ?> " class="form-control" type="password" name="pwd" value="<?php bbp_sanitize_val('user_pass', 'password'); ?> " size="20" id="user_pass" tabindex="<?php bbp_tab_index(); ?> " /> </div> </div> <?php do_action('login_form'); ?> <div class="bbp-remember-me checkbox"> <input type="checkbox" name="rememberme" value="forever" <?php checked(bbp_get_sanitize_val('rememberme', 'checkbox'), true, true); ?> id="rememberme" tabindex="<?php bbp_tab_index(); ?> " /> <label for="rememberme"><?php _e('Remember Me', 'bbpress'); ?> </label> </div> <div class="bbp-submit-wrapper btn-group"> <?php if (!empty($settings['lostpass'])) { ?> <a href="<?php echo esc_url($settings['lostpass']); ?> " title="<?php esc_attr_e('Lost Password', 'bbpress'); ?> " class="bbp-lostpass-link btn btn-default"><span class="glyphicon ipt-icomoon-info"></span></a> <?php } ?> <?php if (!empty($settings['register'])) { ?> <a href="<?php echo esc_url($settings['register']); ?> " title="<?php esc_attr_e('Register', 'bbpress'); ?> " class="bbp-register-link btn btn-default"><span class="glyphicon ipt-icomoon-signup"></span> <?php _e('Register', 'bbpress'); ?> </a> <?php } ?> <button class="btn btn-primary" type="submit" name="user-submit" id="user-submit" tabindex="<?php bbp_tab_index(); ?> " class="button submit user-submit"><span class="glyphicon ipt-icomoon-switch"></span> <?php _e('Log In', 'bbpress'); ?> </button> </div> <?php bbp_user_login_fields(); ?> </fieldset> </form> <?php } else { ?> <div class="bbp-logged-in"> <a href="<?php 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>'); ?> </a> <?php if (bbp_is_favorites_active()) { ?> <a href="<?php bbp_favorites_permalink(bbp_get_current_user_id()); ?> " class="list-group-item bbp-user-favorite-count <?php if (bbp_is_user_home() && bbp_is_favorites()) { echo 'active'; } ?> " title="<?php printf(esc_attr__("Your Favorites", 'ipt_kb')); ?> "> <span class="glyphicon ipt-icomoon-heart"></span> <?php printf(__('%s Favorites', 'ipt_kb'), '<span class="badge">' . count(bbp_get_user_favorites_topic_ids(bbp_get_current_user_id())) . '</span>'); ?> </a> <?php } ?> <?php if (bbp_is_subscriptions_active()) { ?> <a href="<?php bbp_subscriptions_permalink(bbp_get_current_user_id()); ?> " class="list-group-item bbp-user-subscribe-count <?php if (bbp_is_user_home() && bbp_is_subscriptions()) { echo 'active'; } ?> " title="<?php printf(esc_attr__("Your Subscriptions", 'ipt_kb')); ?> "> <span class="glyphicon ipt-icomoon-bookmarks"></span> <?php printf(__('%s Subscriptions', 'ipt_kb'), '<span class="badge">' . count(bbp_get_user_subscribed_topic_ids(bbp_get_current_user_id())) . '</span>'); ?> </a> <?php } ?> </div> </div> <?php } echo $args['after_widget']; }
<?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'; ?> "> </span> </p> </div><!-- .tr --> </li> </ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> --> <?php do_action('bbp_template_after_topics_loop');
<?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');
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; }
?> <?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 are not currently subscribed to any topics.', 'bbpress') : esc_html_e('This user is not currently subscribed to any topics.', 'bbpress'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-subscriptions --> <?php } ?> <?php
<h2 class="entry-title"><?php bbp_is_user_home() ? _e("Your Forum Signature", "gd-bbpress-tools") : _e("User Forum Signature", "gd-bbpress-tools"); ?></h2> <fieldset class="bbp-form"> <legend><?php bbp_is_user_home() ? _e("Your Forum Signature", "gd-bbpress-tools") : _e("User Forum Signature", "gd-bbpress-tools"); ?></legend> <?php do_action('bbp_user_edit_before_signature'); ?> <div> <label for="signature"><?php _e("Signature", "gd-bbpress-tools"); ?></label> <fieldset class="bbp-form password"> <textarea name="signature" id="signature" rows="5" cols="30" tabindex="<?php bbp_tab_index(); ?>" style="width: 100%;"><?php echo esc_attr($_signature); ?></textarea> <span class="description"> <?php echo sprintf(__("Signature length is limited to %s characters.", "gd-bbpress-tools"), $this->max_length); ?><br/> <?php do_action('bbp_user_edit_signature_info'); ?> </span> </fieldset> </div> <?php do_action('bbp_user_edit_after_signature'); ?> </fieldset>
/** * Check if on an allowed bbPress component * * @since 4.2.0 * * @return boolean true if an allowed component, false otherwise */ function bp_registration_bbpress_allowed_areas() { if (!function_exists('bbp_is_user_home')) { return false; } if (bbp_is_user_home() || bbp_is_user_home_edit()) { return true; } return false; }
<?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 currently have no favorite topics.', 'bbpress') : _e('This user has no favorite topics.', 'bbpress'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-favorites --> <?php do_action('bbp_template_after_user_favorites');
/** * Calculate any extra classes for the <body> element. * These are then added using the 'body_class' filter. * Documentation: ttps://codex.wordpress.org/Plugin_API/Filter_Reference/body_class */ public function body_classes($classes) { $sidebar_1 = $this->sidebar_context(1); $sidebar_2 = $this->sidebar_context(2); $c_pageID = Avada::c_pageID(); $classes[] = 'fusion-body'; if (is_page_template('blank.php')) { $classes[] = 'body_blank'; } if (!Avada()->settings->get('header_sticky_tablet')) { $classes[] = 'no-tablet-sticky-header'; } if (!Avada()->settings->get('header_sticky_mobile')) { $classes[] = 'no-mobile-sticky-header'; } if (Avada()->settings->get('mobile_slidingbar_widgets')) { $classes[] = 'no-mobile-slidingbar'; } if (Avada()->settings->get('status_totop')) { $classes[] = 'no-totop'; } if (!Avada()->settings->get('status_totop_mobile')) { $classes[] = 'no-mobile-totop'; } if ('horizontal' == Avada()->settings->get('woocommerce_product_tab_design') && is_singular('product')) { $classes[] = 'woo-tabs-horizontal'; } if ('modern' == Avada()->settings->get('mobile_menu_design')) { $classes[] = 'mobile-logo-pos-' . strtolower(Avada()->settings->get('logo_alignment')); } if ('Boxed' == Avada()->settings->get('layout') && 'default' == get_post_meta($c_pageID, 'pyre_page_bg_layout', true) || 'boxed' == get_post_meta($c_pageID, 'pyre_page_bg_layout', true)) { $classes[] = 'layout-boxed-mode'; } else { $classes[] = 'layout-wide-mode'; } if (is_array($sidebar_1) && !empty($sidebar_1) && ($sidebar_1[0] || '0' == $sidebar_1[0]) && !is_buddypress() && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) { $classes[] = 'has-sidebar'; } if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0] && !is_buddypress() && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) { $classes[] = 'double-sidebars'; } if (is_page_template('side-navigation.php') && is_array($sidebar_2) && $sidebar_2[0]) { $classes[] = 'double-sidebars'; } if (is_home()) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if (is_archive() && (!is_buddypress() && !is_bbpress() && (class_exists('WooCommerce') && !is_shop()) || !class_exists('WooCommerce')) && !is_tax('portfolio_category') && !is_tax('portfolio_skills') && !is_tax('portfolio_tags') && !is_tax('product_cat') && !is_tax('product_tag')) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if (is_tax('portfolio_category') || is_tax('portfolio_skills') || is_tax('portfolio_tags')) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if (is_tax('product_cat') || is_tax('product_tag')) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if (is_search()) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if ((is_bbpress() || is_buddypress()) && !bbp_is_forum_archive() && !bbp_is_topic_archive() && !bbp_is_user_home() && !bbp_is_search()) { if (Avada()->settings->get('bbpress_global_sidebar')) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } else { if (is_array($sidebar_1) && $sidebar_1[0]) { $classes[] = 'has-sidebar'; } if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0]) { $classes[] = 'double-sidebars'; } } } if ((is_bbpress() || is_buddypress()) && (bbp_is_forum_archive() || bbp_is_topic_archive() || bbp_is_user_home() || bbp_is_search())) { if ('None' != $sidebar_1) { $classes[] = 'has-sidebar'; } if ('None' != $sidebar_1 && 'None' != $sidebar_2) { $classes[] = 'double-sidebars'; } } if (class_exists('Tribe__Events__Main') && is_events_archive()) { if (is_array($sidebar_1) && $sidebar_1[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) { $classes[] = 'has-sidebar'; } if (is_array($sidebar_1) && $sidebar_1[0] && is_array($sidebar_2) && $sidebar_2[0] && !is_bbpress() && !is_page_template('100-width.php') && (!class_exists('WooCommerce') || class_exists('WooCommerce') && !is_cart() && !is_checkout() && !is_account_page() && !(get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))))) { $classes[] = 'double-sidebars'; } } if ('no' != get_post_meta($c_pageID, 'pyre_display_header', true)) { if ('Left' == Avada()->settings->get('header_position') || 'Right' == Avada()->settings->get('header_position')) { $classes[] = 'side-header'; } if ('Left' == Avada()->settings->get('header_position')) { $classes[] = 'side-header-left'; } elseif ('Right' == Avada()->settings->get('header_position')) { $classes[] = 'side-header-right'; } $classes[] = 'menu-text-align-' . strtolower(Avada()->settings->get('menu_text_align')); } $classes[] = 'mobile-menu-design-' . Avada()->settings->get('mobile_menu_design'); return $classes; }
<?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.', 'bbpress') : _e('This user has not created any topics.', 'bbpress'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-topics-started --> <?php do_action('bbp_template_after_user_topics_created');
<?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() ? esc_html_e('You have not replied to any topics.', 'monsoon') : esc_html_e('This user has not replied to any topics.', 'monsoon'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-replies-created --> <?php do_action('bbp_template_after_user_replies');
/** * 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 = '') { // Store original title to compare $_title = $title; /** Archives **************************************************************/ // Forum Archive if (bbp_is_forum_archive()) { $title = bbp_get_forum_archive_title(); // Topic Archive } elseif (bbp_is_topic_archive()) { $title = bbp_get_topic_archive_title(); /** Singles ***************************************************************/ // Forum page } elseif (bbp_is_single_forum()) { $title = sprintf(__('Forum: %s', 'bbpress'), bbp_get_forum_title()); // Topic page } elseif (bbp_is_single_topic()) { $title = sprintf(__('Topic: %s', 'bbpress'), bbp_get_topic_title()); // Replies } elseif (bbp_is_single_reply()) { $title = bbp_get_reply_title(); // Topic tag page (or edit) } elseif (bbp_is_topic_tag() || bbp_is_topic_tag_edit() || get_query_var('bbp_topic_tag')) { $term = get_queried_object(); $title = sprintf(__('Topic Tag: %s', 'bbpress'), $term->name); /** Users *****************************************************************/ // Profile page } elseif (bbp_is_single_user()) { // Current users profile if (bbp_is_user_home()) { $title = __('Your Profile', 'bbpress'); // Other users profile } else { $userdata = get_userdata(bbp_get_user_id()); $title = sprintf(__('%s\'s Profile', 'bbpress'), $userdata->display_name); } // Profile edit page } elseif (bbp_is_single_user_edit()) { // Current users profile if (bbp_is_user_home_edit()) { $title = __('Edit Your Profile', 'bbpress'); // Other users profile } else { $userdata = get_userdata(bbp_get_user_id()); $title = sprintf(__('Edit %s\'s Profile', 'bbpress'), $userdata->display_name); } /** Views *****************************************************************/ // Views } elseif (bbp_is_single_view()) { $title = sprintf(__('View: %s', 'bbpress'), bbp_get_view_title()); } // Filter the raw title $title = apply_filters('bbp_raw_title', $title, $sep, $seplocation); // Compare new title with original title if ($title == $_title) { return $title; } // Temporary separator, for accurate flipping, if necessary $t_sep = '%WP_TITILE_SEP%'; $prefix = ''; if (!empty($title)) { $prefix = " {$sep} "; } // sep on right, so reverse the order if ('right' == $seplocation) { $title_array = explode($t_sep, $title); $title_array = array_reverse($title_array); $title = implode(" {$sep} ", $title_array) . $prefix; // sep on left, do not reverse } else { $title_array = explode($t_sep, $title); $title = $prefix . implode(" {$sep} ", $title_array); } // Filter and return return apply_filters('bbp_title', $title, $sep, $seplocation); }
do_action('bbp_user_edit_after_account'); ?> </fieldset> <?php do_action('bbp_user_edit_after'); ?> <fieldset class="submit"> <legend><?php _e('Save Changes', 'bbpress'); ?> </legend> <div> <?php bbp_edit_user_form_fields(); ?> <button type="submit" tabindex="<?php bbp_tab_index(); ?> " id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home() ? _e('Update Profile', 'bbpress') : _e('Update User', 'bbpress'); ?> </button> </div> </fieldset> </form>
?> " title="<?php printf(esc_attr__("%s's Favorites", 'bbpress'), bbp_get_displayed_user_field('display_name')); ?> "><?php _e('Favorites', 'bbpress'); ?> </a> </span> </li> <?php } ?> <?php if (bbp_is_user_home() || current_user_can('edit_users')) { ?> <?php if (bbp_is_subscriptions_active()) { ?> <li class="<?php if (bbp_is_subscriptions()) { ?> current<?php } ?> "> <span class="bbp-user-subscriptions-link"> <a href="<?php bbp_subscriptions_permalink();
/** * Super admin privileges notice * * @since 2.0.0 bbPress (r2688) * * @uses is_multisite() To check if the blog is multisite * @uses bbp_is_single_user() To check if it's the profile page * @uses bbp_is_single_user_edit() To check if it's the profile edit page * @uses current_user_can() To check if the current user can manage network * options * @uses bbp_get_displayed_user_id() To get the displayed user id * @uses is_super_admin() To check if the user is super admin * @uses bbp_is_user_home() To check if it's the user home * @uses bbp_is_user_home_edit() To check if it's the user home edit */ function bbp_notice_edit_user_is_super_admin() { if (is_multisite() && (bbp_is_single_user() || bbp_is_single_user_edit()) && current_user_can('manage_network_options') && is_super_admin(bbp_get_displayed_user_id())) { ?> <div class="bbp-template-notice important"> <ul> <li><?php bbp_is_user_home() || bbp_is_user_home_edit() ? esc_html_e('You have super admin privileges.', 'bbpress') : esc_html_e('This user has super admin privileges.', 'bbpress'); ?> </li> </ul> </div> <?php } }
<div class="bbp-user-section panel-body"> <?php if (bbp_get_user_replies_created()) { ?> <?php bbp_get_template_part('loop', 'replies'); ?> <?php } else { ?> <p><?php bbp_is_user_home() ? _e('You have not replied to any topics.', 'omega-td') : _e('This user has not replied to any topics.', 'omega-td'); ?> </p> <?php } ?> </div> <div class="panel-footer"> <?php bbp_get_template_part('pagination', 'replies'); ?> </div> </div><!-- #bbp-user-replies-created -->
function st_before_content($columns) { // // Specify the number of columns in conditional statements // See http://codex.wordpress.org/Conditional_Tags for a full list // // If necessary, you can pass $columns as a variable in your template files: // st_before_content('six'); // // Set the default if (empty($columns)) { $columns = 'eleven'; } else { // Check the function for a returned variable $columns = $columns; } // Example of further conditionals: // (be sure to add the excess of 16 to st_before_sidebar as well) if (is_page_template('onecolumn-page.php')) { $columns = 'sixteen'; } // check to see if bbpress is installed if (class_exists('bbPress')) { // force wide on bbPress pages if (is_bbpress()) { $columns = 'sixteen'; } // unless it's the member profile if (bbp_is_user_home()) { $columns = 'eleven'; } } // bbPress // Apply the markup echo "<a name=\"top\" id=\"top\"></a>"; echo "<div id=\"content\" class=\"{$columns} columns\">"; }
?> <?php bbp_get_template_part('loop', 'topics'); ?> <?php bbp_get_template_part('pagination', 'topics'); ?> <?php } else { ?> <p><?php bbp_is_user_home() ? _e('You are not currently subscribed to any topics.', 'wpdance') : _e('This user is not currently subscribed to any topics.', 'wpdance'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-subscriptions --> <?php } ?> <?php
<?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.', 'firmasite') : _e('This user has not replied to any topics.', 'firmasite'); ?> </p> <?php } ?> </div> </div><!-- #bbp-user-replies-created --> <?php do_action('bbp_template_after_user_replies');