first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,356 @@
<?php
/**
* Functions of the Default template-pack
*
* @package bbPress
* @subpackage BBP_Theme_Compat
* @since 2.1.0 bbPress (r3732)
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/** Theme Setup ***************************************************************/
if ( ! class_exists( 'BBP_Default' ) ) :
/**
* Loads bbPress Default Theme functionality
*
* This is not a real theme by WordPress standards, and is instead used as the
* fallback for any WordPress theme that does not have bbPress templates in it.
*
* To make your custom theme bbPress compatible and customize the templates, you
* can copy these files into your theme without needing to merge anything
* together; bbPress should safely handle the rest.
*
* See @link BBP_Theme_Compat() for more.
*
* @since 2.1.0 bbPress (r3732)
*
* @package bbPress
* @subpackage BBP_Theme_Compat
*/
class BBP_Default extends BBP_Theme_Compat {
/** Functions *************************************************************/
/**
* The main bbPress (Default) Loader
*
* @since 2.1.0 bbPress (r3732)
*/
public function __construct( $properties = array() ) {
parent::__construct( bbp_parse_args( $properties, array(
'id' => 'default',
'name' => 'bbPress Default',
'version' => bbp_get_asset_version(),
'dir' => trailingslashit( bbpress()->themes_dir . 'default' ),
'url' => trailingslashit( bbpress()->themes_url . 'default' ),
), 'default_theme' ) );
$this->setup_actions();
}
/**
* Setup the theme hooks
*
* @since 2.1.0 bbPress (r3732)
*
* @access private
*/
private function setup_actions() {
/** Scripts ***********************************************************/
add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); // Enqueue theme CSS
add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Enqueue theme JS
add_filter( 'bbp_enqueue_scripts', array( $this, 'localize_topic_script' ) ); // Enqueue theme script localization
add_action( 'bbp_ajax_favorite', array( $this, 'ajax_favorite' ) ); // Handles the topic ajax favorite/unfavorite
add_action( 'bbp_ajax_subscription', array( $this, 'ajax_subscription' ) ); // Handles the topic ajax subscribe/unsubscribe
/** Template Wrappers *************************************************/
add_action( 'bbp_before_main_content', array( $this, 'before_main_content' ) ); // Top wrapper HTML
add_action( 'bbp_after_main_content', array( $this, 'after_main_content' ) ); // Bottom wrapper HTML
/** Override **********************************************************/
do_action_ref_array( 'bbp_theme_compat_actions', array( &$this ) );
}
/**
* Inserts HTML at the top of the main content area to be compatible with
* the Twenty Twelve theme.
*
* @since 2.1.0 bbPress (r3732)
*/
public function before_main_content() {
?>
<div id="bbp-container">
<div id="bbp-content" role="main">
<?php
}
/**
* Inserts HTML at the bottom of the main content area to be compatible with
* the Twenty Twelve theme.
*
* @since 2.1.0 bbPress (r3732)
*/
public function after_main_content() {
?>
</div><!-- #bbp-content -->
</div><!-- #bbp-container -->
<?php
}
/**
* Load the theme CSS
*
* @since 2.1.0 bbPress (r3732)
*/
public function enqueue_styles() {
// Setup the default styling
$defaults = array(
'bbp-default' => array(
'file' => 'css/bbpress.css',
'dependencies' => array()
)
);
// Optionally support an RTL variant
if ( is_rtl() ) {
$defaults['bbp-default-rtl'] = array(
'file' => 'css/bbpress-rtl.css',
'dependencies' => array()
);
}
// Get and filter the bbp-default style
$styles = apply_filters( 'bbp_default_styles', $defaults );
// Enqueue the styles
foreach ( $styles as $handle => $attributes ) {
bbp_enqueue_style( $handle, $attributes['file'], $attributes['dependencies'], $this->version );
}
}
/**
* Enqueue the required JavaScript files
*
* @since 2.1.0 bbPress (r3732)
*/
public function enqueue_scripts() {
// Setup scripts array
$scripts = array();
// Editor scripts
// @see https://bbpress.trac.wordpress.org/ticket/2930
if ( bbp_use_wp_editor() && is_bbpress() ) {
$scripts['bbpress-editor'] = array(
'file' => 'js/editor.js',
'dependencies' => array( 'jquery' )
);
}
// Forum-specific scripts
if ( bbp_is_single_forum() ) {
$scripts['bbpress-engagements'] = array(
'file' => 'js/engagements.js',
'dependencies' => array( 'jquery' )
);
}
// Topic-specific scripts
if ( bbp_is_single_topic() || bbp_is_topic_edit() ) {
// Engagements
$scripts['bbpress-engagements'] = array(
'file' => 'js/engagements.js',
'dependencies' => array( 'jquery' )
);
// Hierarchical replies
if ( bbp_thread_replies() ) {
$scripts['bbpress-reply'] = array(
'file' => 'js/reply.js',
'dependencies' => array( 'jquery' )
);
}
}
// User Profile edit
if ( bbp_is_single_user_edit() ) {
wp_enqueue_script( 'user-profile' );
}
// Filter the scripts
$scripts = apply_filters( 'bbp_default_scripts', $scripts );
// Enqueue the scripts
foreach ( $scripts as $handle => $attributes ) {
bbp_enqueue_script( $handle, $attributes['file'], $attributes['dependencies'], $this->version, true );
}
}
/**
* Load localizations for topic script
*
* These localizations require information that may not be loaded even by init.
*
* @since 2.1.0 bbPress (r3732)
*/
public function localize_topic_script() {
// Single forum or topic
if ( bbp_is_single_forum() || bbp_is_single_topic() ) {
wp_localize_script( 'bbpress-engagements', 'bbpEngagementJS', array(
'object_id' => get_the_ID(),
'bbp_ajaxurl' => bbp_get_ajax_url(),
'generic_ajax_error' => esc_html__( 'Something went wrong. Refresh your browser and try again.', 'bbpress' ),
) );
}
}
/**
* AJAX handler to add or remove a topic from a user's favorites
*
* @since 2.1.0 bbPress (r3732)
*/
public function ajax_favorite() {
// Bail if favorites are not active
if ( ! bbp_is_favorites_active() ) {
bbp_ajax_response( false, esc_html__( 'Favorites are no longer active.', 'bbpress' ), 300 );
}
// Bail if user is not logged in
if ( ! is_user_logged_in() ) {
bbp_ajax_response( false, esc_html__( 'Please login to favorite.', 'bbpress' ), 301 );
}
// Get user and topic data
$user_id = bbp_get_current_user_id();
$id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;
$type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post';
// Bail if user cannot add favorites for this user
if ( ! current_user_can( 'edit_user', $user_id ) ) {
bbp_ajax_response( false, esc_html__( 'You do not have permission to do this.', 'bbpress' ), 302 );
}
// Get the object
if ( 'post' === $type ) {
$object = get_post( $id );
}
// Bail if topic cannot be found
if ( empty( $object ) ) {
bbp_ajax_response( false, esc_html__( 'Favorite failed.', 'bbpress' ), 303 );
}
// Bail if user did not take this action
if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-favorite_' . $object->ID ) ) {
bbp_ajax_response( false, esc_html__( 'Are you sure you meant to do that?', 'bbpress' ), 304 );
}
// Take action
$status = bbp_is_user_favorite( $user_id, $object->ID )
? bbp_remove_user_favorite( $user_id, $object->ID )
: bbp_add_user_favorite( $user_id, $object->ID );
// Bail if action failed
if ( empty( $status ) ) {
bbp_ajax_response( false, esc_html__( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );
}
// Put subscription attributes in convenient array
$attrs = array(
'object_id' => $object->ID,
'object_type' => $type,
'user_id' => $user_id
);
// Action succeeded
bbp_ajax_response( true, bbp_get_user_favorites_link( $attrs, $user_id, false ), 200 );
}
/**
* AJAX handler to Subscribe/Unsubscribe a user from a topic
*
* @since 2.1.0 bbPress (r3732)
*/
public function ajax_subscription() {
// Bail if subscriptions are not active
if ( ! bbp_is_subscriptions_active() ) {
bbp_ajax_response( false, esc_html__( 'Subscriptions are no longer active.', 'bbpress' ), 300 );
}
// Bail if user is not logged in
if ( ! is_user_logged_in() ) {
bbp_ajax_response( false, esc_html__( 'Please login to subscribe.', 'bbpress' ), 301 );
}
// Get user and topic data
$user_id = bbp_get_current_user_id();
$id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;
$type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post';
// Bail if user cannot add favorites for this user
if ( ! current_user_can( 'edit_user', $user_id ) ) {
bbp_ajax_response( false, esc_html__( 'You do not have permission to do this.', 'bbpress' ), 302 );
}
// Get the object
if ( 'post' === $type ) {
$object = get_post( $id );
}
// Bail if topic cannot be found
if ( empty( $object ) ) {
bbp_ajax_response( false, esc_html__( 'Subscription failed.', 'bbpress' ), 303 );
}
// Bail if user did not take this action
if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $object->ID ) ) {
bbp_ajax_response( false, esc_html__( 'Are you sure you meant to do that?', 'bbpress' ), 304 );
}
// Take action
$status = bbp_is_user_subscribed( $user_id, $object->ID )
? bbp_remove_user_subscription( $user_id, $object->ID )
: bbp_add_user_subscription( $user_id, $object->ID );
// Bail if action failed
if ( empty( $status ) ) {
bbp_ajax_response( false, esc_html__( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );
}
// Put subscription attributes in convenient array
$attrs = array(
'object_id' => $object->ID,
'object_type' => $type,
'user_id' => $user_id
);
// Add separator to topic if favorites is active
if ( ( 'post' === $type ) && ( bbp_get_topic_post_type() === get_post_type( $object ) ) && bbp_is_favorites_active() ) {
$attrs['before'] = '&nbsp;|&nbsp;';
}
// Action succeeded
bbp_ajax_response( true, bbp_get_user_subscribe_link( $attrs, $user_id, false ), 200 );
}
}
new BBP_Default();
endif;

View File

@@ -0,0 +1,29 @@
<?php
/**
* Topic Lock Alert
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_theme_before_alert_topic_lock' ); ?>
<?php if ( bbp_show_topic_lock_alert() ) : ?>
<div class="bbp-alert-outer">
<div class="bbp-alert-inner">
<p class="bbp-alert-description"><?php bbp_topic_lock_description(); ?></p>
<p class="bbp-alert-actions">
<a class="bbp-alert-back" href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php esc_html_e( 'Leave', 'bbpress' ); ?></a>
<a class="bbp-alert-close" href="#"><?php esc_html_e( 'Stay', 'bbpress' ); ?></a>
</p>
</div>
</div>
<?php endif;
do_action( 'bbp_theme_after_alert_topic_lock' );

View File

@@ -0,0 +1,37 @@
<?php
/**
* Archive Forum Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_get_template_part( 'form', 'search' ); ?>
<?php bbp_breadcrumb(); ?>
<?php bbp_forum_subscription_link(); ?>
<?php do_action( 'bbp_template_before_forums_index' ); ?>
<?php if ( bbp_has_forums() ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_forums_index' ); ?>
</div>

View File

@@ -0,0 +1,57 @@
<?php
/**
* Archive Topic Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<?php bbp_get_template_part( 'form', 'search' ); ?>
</div>
<?php endif; ?>
<?php bbp_breadcrumb(); ?>
<?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
<?php if ( bbp_is_topic_tag() ) : ?>
<?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
<?php do_action( 'bbp_template_before_topics_index' ); ?>
<?php if ( bbp_has_topics() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_topics_index' ); ?>
</div>

View File

@@ -0,0 +1,44 @@
<?php
/**
* Search Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_set_query_name( bbp_get_search_rewrite_id() ); ?>
<?php do_action( 'bbp_template_before_search' ); ?>
<?php if ( bbp_has_search_results() ) : ?>
<?php bbp_get_template_part( 'pagination', 'search' ); ?>
<?php bbp_get_template_part( 'loop', 'search' ); ?>
<?php bbp_get_template_part( 'pagination', 'search' ); ?>
<?php elseif ( bbp_get_search_terms() ) : ?>
<?php bbp_get_template_part( 'feedback', 'no-search' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'form', 'search' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_search_results' ); ?>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Single Forum Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_forum_subscription_link(); ?>
<?php do_action( 'bbp_template_before_single_forum' ); ?>
<?php if ( post_password_required() ) : ?>
<?php bbp_get_template_part( 'form', 'protected' ); ?>
<?php else : ?>
<?php bbp_single_forum_description(); ?>
<?php if ( bbp_has_forums() ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php endif; ?>
<?php if ( ! bbp_is_forum_category() && bbp_has_topics() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'form', 'topic' ); ?>
<?php elseif ( ! bbp_is_forum_category() ) : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php bbp_get_template_part( 'form', 'topic' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_single_forum' ); ?>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/**
* Single Reply Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php do_action( 'bbp_template_before_single_reply' ); ?>
<?php if ( post_password_required() ) : ?>
<?php bbp_get_template_part( 'form', 'protected' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_single_reply' ); ?>
</div>

View File

@@ -0,0 +1,99 @@
<?php
/**
* Single Topic Lead Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_lead_topic' ); ?>
<ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
<li class="bbp-header">
<div class="bbp-topic-author"><?php esc_html_e( 'Creator', 'bbpress' ); ?></div><!-- .bbp-topic-author -->
<div class="bbp-topic-content">
<?php esc_html_e( 'Topic', 'bbpress' ); ?>
</div><!-- .bbp-topic-content -->
</li><!-- .bbp-header -->
<li class="bbp-body">
<div class="bbp-topic-header">
<div class="bbp-meta">
<span class="bbp-topic-post-date"><?php bbp_topic_post_date(); ?></span>
<a href="<?php bbp_topic_permalink(); ?>" class="bbp-topic-permalink">#<?php bbp_topic_id(); ?></a>
<?php do_action( 'bbp_theme_before_topic_admin_links' ); ?>
<?php bbp_topic_admin_links(); ?>
<?php do_action( 'bbp_theme_after_topic_admin_links' ); ?>
</div><!-- .bbp-meta -->
</div><!-- .bbp-topic-header -->
<div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
<div class="bbp-topic-author">
<?php do_action( 'bbp_theme_before_topic_author_details' ); ?>
<?php bbp_topic_author_link( array( 'show_role' => true ) ); ?>
<?php if ( current_user_can( 'moderate', bbp_get_reply_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
<div class="bbp-topic-ip"><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>
<?php do_action( 'bbp_theme_after_topic_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_topic_author_details' ); ?>
</div><!-- .bbp-topic-author -->
<div class="bbp-topic-content">
<?php do_action( 'bbp_theme_before_topic_content' ); ?>
<?php bbp_topic_content(); ?>
<?php do_action( 'bbp_theme_after_topic_content' ); ?>
</div><!-- .bbp-topic-content -->
</div><!-- #post-<?php bbp_topic_id(); ?> -->
</li><!-- .bbp-body -->
<li class="bbp-footer">
<div class="bbp-topic-author"><?php esc_html_e( 'Creator', 'bbpress' ); ?></div>
<div class="bbp-topic-content">
<?php esc_html_e( 'Topic', 'bbpress' ); ?>
</div><!-- .bbp-topic-content -->
</li>
</ul><!-- #bbp-topic-<?php bbp_topic_id(); ?>-lead -->
<?php do_action( 'bbp_template_after_lead_topic' );

View File

@@ -0,0 +1,59 @@
<?php
/**
* Single Topic Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_topic_subscription_link(); ?>
<?php bbp_topic_favorite_link(); ?>
<?php do_action( 'bbp_template_before_single_topic' ); ?>
<?php if ( post_password_required() ) : ?>
<?php bbp_get_template_part( 'form', 'protected' ); ?>
<?php else : ?>
<?php bbp_topic_tag_list(); ?>
<?php bbp_single_topic_description(); ?>
<?php if ( bbp_show_lead_topic() ) : ?>
<?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
<?php endif; ?>
<?php if ( bbp_has_replies() ) : ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php bbp_get_template_part( 'loop', 'replies' ); ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php endif; ?>
<?php bbp_get_template_part( 'form', 'reply' ); ?>
<?php endif; ?>
<?php bbp_get_template_part( 'alert', 'topic-lock' ); ?>
<?php do_action( 'bbp_template_after_single_topic' ); ?>
</div>

View File

@@ -0,0 +1,38 @@
<?php
/**
* Single User Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php do_action( 'bbp_template_notices' ); ?>
<?php do_action( 'bbp_template_before_user_wrapper' ); ?>
<div id="bbp-user-wrapper">
<?php bbp_get_template_part( 'user', 'details' ); ?>
<div id="bbp-user-body">
<?php if ( bbp_is_favorites() ) bbp_get_template_part( 'user', 'favorites' ); ?>
<?php if ( bbp_is_subscriptions() ) bbp_get_template_part( 'user', 'subscriptions' ); ?>
<?php if ( bbp_is_single_user_engagements() ) bbp_get_template_part( 'user', 'engagements' ); ?>
<?php if ( bbp_is_single_user_topics() ) bbp_get_template_part( 'user', 'topics-created' ); ?>
<?php if ( bbp_is_single_user_replies() ) bbp_get_template_part( 'user', 'replies-created' ); ?>
<?php if ( bbp_is_single_user_edit() ) bbp_get_template_part( 'form', 'user-edit' ); ?>
<?php if ( bbp_is_single_user_profile() ) bbp_get_template_part( 'user', 'profile' ); ?>
</div>
</div>
<?php do_action( 'bbp_template_after_user_wrapper' ); ?>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Single View Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_set_query_name( bbp_get_view_rewrite_id() ); ?>
<?php if ( bbp_view_query() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
<?php bbp_reset_query_name(); ?>
</div>

View File

@@ -0,0 +1,80 @@
<?php
/**
* Statistics Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
// Get the statistics
$stats = bbp_get_statistics(); ?>
<dl role="main">
<?php do_action( 'bbp_before_statistics' ); ?>
<dt><?php esc_html_e( 'Registered Users', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['user_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Forums', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['forum_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Topics', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['topic_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Replies', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['reply_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Topic Tags', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['topic_tag_count'] ); ?></strong>
</dd>
<?php if ( ! empty( $stats['empty_topic_tag_count'] ) ) : ?>
<dt><?php esc_html_e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['empty_topic_tag_count'] ); ?></strong>
</dd>
<?php endif; ?>
<?php if ( ! empty( $stats['topic_count_hidden'] ) ) : ?>
<dt><?php esc_html_e( 'Hidden Topics', 'bbpress' ); ?></dt>
<dd>
<strong>
<abbr title="<?php echo esc_attr( $stats['hidden_topic_title'] ); ?>"><?php echo esc_html( $stats['topic_count_hidden'] ); ?></abbr>
</strong>
</dd>
<?php endif; ?>
<?php if ( ! empty( $stats['reply_count_hidden'] ) ) : ?>
<dt><?php esc_html_e( 'Hidden Replies', 'bbpress' ); ?></dt>
<dd>
<strong>
<abbr title="<?php echo esc_attr( $stats['hidden_reply_title'] ); ?>"><?php echo esc_html( $stats['reply_count_hidden'] ); ?></abbr>
</strong>
</dd>
<?php endif; ?>
<?php do_action( 'bbp_after_statistics' ); ?>
</dl>
<?php unset( $stats );

View File

@@ -0,0 +1,31 @@
<?php
/**
* Topic Tag Edit Content Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
<?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?>
<?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
<?php do_action( 'bbp_template_before_topic_tag_edit' ); ?>
<?php bbp_get_template_part( 'form', 'topic-tag' ); ?>
<?php do_action( 'bbp_template_after_topic_tag_edit' ); ?>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Logged In Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'You are already logged in.', 'bbpress' ); ?></li>
</ul>
</div>

View File

@@ -0,0 +1,24 @@
<?php
/**
* No Access Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="forum-private" class="bbp-forum-content">
<h1 class="entry-title"><?php esc_html_e( 'Private', 'bbpress' ); ?></h1>
<div class="entry-content">
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'You do not have permission to view this forum.', 'bbpress' ); ?></li>
</ul>
</div>
</div>
</div><!-- #forum-private -->

View File

@@ -0,0 +1,19 @@
<?php
/**
* No Forums Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Oh, bother! No forums were found here.', 'bbpress' ); ?></li>
</ul>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* No Replies Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Oh, bother! No replies were found here.', 'bbpress' ); ?></li>
</ul>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* No Search Results Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Oh, bother! No search results were found here.', 'bbpress' ); ?></li>
</ul>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* No Topics Feedback Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Oh, bother! No topics were found here.', 'bbpress' ); ?></li>
</ul>
</div>

View File

@@ -0,0 +1,43 @@
<?php
/**
* Anonymous User
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_current_user_can_access_anonymous_user_form() ) : ?>
<?php do_action( 'bbp_theme_before_anonymous_form' ); ?>
<fieldset class="bbp-form">
<legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? esc_html_e( 'Author Information', 'bbpress' ) : esc_html_e( 'Your information:', 'bbpress' ); ?></legend>
<?php do_action( 'bbp_theme_anonymous_form_extras_top' ); ?>
<p>
<label for="bbp_anonymous_author"><?php esc_html_e( 'Name (required):', 'bbpress' ); ?></label><br />
<input type="text" id="bbp_anonymous_author" value="<?php bbp_author_display_name(); ?>" size="40" maxlength="100" name="bbp_anonymous_name" autocomplete="off" />
</p>
<p>
<label for="bbp_anonymous_email"><?php esc_html_e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
<input type="text" id="bbp_anonymous_email" value="<?php bbp_author_email(); ?>" size="40" maxlength="100" name="bbp_anonymous_email" />
</p>
<p>
<label for="bbp_anonymous_website"><?php esc_html_e( 'Website:', 'bbpress' ); ?></label><br />
<input type="text" id="bbp_anonymous_website" value="<?php bbp_author_url(); ?>" size="40" maxlength="200" name="bbp_anonymous_website" />
</p>
<?php do_action( 'bbp_theme_anonymous_form_extras_bottom' ); ?>
</fieldset>
<?php do_action( 'bbp_theme_after_anonymous_form' ); ?>
<?php endif;

View File

@@ -0,0 +1,207 @@
<?php
/**
* New/Edit Forum
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_is_forum_edit() ) : ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_single_forum_description( array( 'forum_id' => bbp_get_forum_id() ) ); ?>
<?php endif; ?>
<?php if ( bbp_current_user_can_access_create_forum_form() ) : ?>
<div id="new-forum-<?php bbp_forum_id(); ?>" class="bbp-forum-form">
<form id="new-post" name="new-post" method="post">
<?php do_action( 'bbp_theme_before_forum_form' ); ?>
<fieldset class="bbp-form">
<legend>
<?php
if ( bbp_is_forum_edit() ) :
printf( esc_html__( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() );
else :
bbp_is_single_forum()
? printf( esc_html__( 'Create New Forum in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() )
: esc_html_e( 'Create New Forum', 'bbpress' );
endif;
?>
</legend>
<?php do_action( 'bbp_theme_before_forum_form_notices' ); ?>
<?php if ( ! bbp_is_forum_edit() && bbp_is_forum_closed() ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'This forum is closed to new content, however your posting capabilities still allow you to post.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div>
<?php do_action( 'bbp_theme_before_forum_form_title' ); ?>
<p>
<label for="bbp_forum_title"><?php printf( esc_html__( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
<input type="text" id="bbp_forum_title" value="<?php bbp_form_forum_title(); ?>" size="40" name="bbp_forum_title" maxlength="<?php bbp_title_max_length(); ?>" />
</p>
<?php do_action( 'bbp_theme_after_forum_form_title' ); ?>
<?php do_action( 'bbp_theme_before_forum_form_content' ); ?>
<?php bbp_the_content( array( 'context' => 'forum' ) ); ?>
<?php do_action( 'bbp_theme_after_forum_form_content' ); ?>
<?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
<p class="form-allowed-tags">
<label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
<code><?php bbp_allowed_tags(); ?></code>
</p>
<?php endif; ?>
<?php if ( bbp_allow_forum_mods() && current_user_can( 'assign_moderators' ) ) : ?>
<?php do_action( 'bbp_theme_before_forum_form_mods' ); ?>
<p>
<label for="bbp_moderators"><?php esc_html_e( 'Forum Moderators:', 'bbpress' ); ?></label><br />
<input type="text" value="<?php bbp_form_forum_moderators(); ?>" size="40" name="bbp_moderators" id="bbp_moderators" />
</p>
<?php do_action( 'bbp_theme_after_forum_form_mods' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_forum_form_type' ); ?>
<p>
<label for="bbp_forum_type"><?php esc_html_e( 'Forum Type:', 'bbpress' ); ?></label><br />
<?php bbp_form_forum_type_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_forum_form_type' ); ?>
<?php do_action( 'bbp_theme_before_forum_form_status' ); ?>
<p>
<label for="bbp_forum_status"><?php esc_html_e( 'Status:', 'bbpress' ); ?></label><br />
<?php bbp_form_forum_status_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_forum_form_status' ); ?>
<?php do_action( 'bbp_theme_before_forum_visibility_status' ); ?>
<p>
<label for="bbp_forum_visibility"><?php esc_html_e( 'Visibility:', 'bbpress' ); ?></label><br />
<?php bbp_form_forum_visibility_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_forum_visibility_status' ); ?>
<?php do_action( 'bbp_theme_before_forum_form_parent' ); ?>
<p>
<label for="bbp_forum_parent_id"><?php esc_html_e( 'Parent Forum:', 'bbpress' ); ?></label><br />
<?php
bbp_dropdown( array(
'select_id' => 'bbp_forum_parent_id',
'show_none' => esc_html__( '&mdash; No parent &mdash;', 'bbpress' ),
'selected' => bbp_get_form_forum_parent(),
'exclude' => bbp_get_forum_id()
) );
?>
</p>
<?php do_action( 'bbp_theme_after_forum_form_parent' ); ?>
<?php do_action( 'bbp_theme_before_forum_form_submit_wrapper' ); ?>
<div class="bbp-submit-wrapper">
<?php do_action( 'bbp_theme_before_forum_form_submit_button' ); ?>
<button type="submit" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
<?php do_action( 'bbp_theme_after_forum_form_submit_button' ); ?>
</div>
<?php do_action( 'bbp_theme_after_forum_form_submit_wrapper' ); ?>
</div>
<?php bbp_forum_form_fields(); ?>
</fieldset>
<?php do_action( 'bbp_theme_after_forum_form' ); ?>
</form>
</div>
<?php elseif ( bbp_is_forum_closed() ) : ?>
<div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
<div class="bbp-template-notice">
<ul>
<li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
</ul>
</div>
</div>
<?php else : ?>
<div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
<div class="bbp-template-notice">
<ul>
<li><?php is_user_logged_in()
? esc_html_e( 'You cannot create new forums.', 'bbpress' )
: esc_html_e( 'You must be logged in to create new forums.', 'bbpress' );
?></li>
</ul>
</div>
</div>
<?php endif; ?>
<?php if ( bbp_is_forum_edit() ) : ?>
</div>
<?php endif;

View File

@@ -0,0 +1,22 @@
<?php
/**
* Password Protected
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<fieldset class="bbp-form" id="bbp-protected">
<Legend><?php esc_html_e( 'Protected', 'bbpress' ); ?></legend>
<?php echo get_the_password_form(); ?>
</fieldset>
</div>

View File

@@ -0,0 +1,102 @@
<?php
/**
* Move Reply
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
<div id="move-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-move">
<form id="move_reply" name="move_reply" method="post">
<fieldset class="bbp-form">
<legend><?php printf( esc_html__( 'Move reply "%s"', 'bbpress' ), bbp_get_reply_title() ); ?></legend>
<div>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'You can either make this reply a new topic with a new title, or merge it into an existing topic.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'If you choose an existing topic, replies will be ordered by the time and date they were created.', 'bbpress' ); ?></li>
</ul>
</div>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Move Method', 'bbpress' ); ?></legend>
<div>
<input name="bbp_reply_move_option" id="bbp_reply_move_option_reply" type="radio" checked="checked" value="topic" />
<label for="bbp_reply_move_option_reply"><?php printf( esc_html__( 'New topic in %s titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_reply_forum_id( bbp_get_reply_id() ) ) ); ?></label>
<input type="text" id="bbp_reply_move_destination_title" value="<?php printf( esc_html__( 'Moved: %s', 'bbpress' ), bbp_get_reply_title() ); ?>" size="35" name="bbp_reply_move_destination_title" />
</div>
<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) ) ) ) : ?>
<div>
<input name="bbp_reply_move_option" id="bbp_reply_move_option_existing" type="radio" value="existing" />
<label for="bbp_reply_move_option_existing"><?php esc_html_e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
<?php
bbp_dropdown( array(
'post_type' => bbp_get_topic_post_type(),
'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ),
'selected' => -1,
'exclude' => bbp_get_reply_topic_id( bbp_get_reply_id() ),
'select_id' => 'bbp_destination_topic'
) );
?>
</div>
<?php endif; ?>
</fieldset>
<div class="bbp-template-notice error" role="alert" tabindex="-1">
<ul>
<li><?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-submit-wrapper">
<button type="submit" id="bbp_move_reply_submit" name="bbp_move_reply_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
</div>
</div>
<?php bbp_move_reply_form_fields(); ?>
</fieldset>
</form>
</div>
<?php else : ?>
<div id="no-reply-<?php bbp_reply_id(); ?>" class="bbp-no-reply">
<div class="entry-content"><?php is_user_logged_in()
? esc_html_e( 'You do not have permission to edit this reply.', 'bbpress' )
: esc_html_e( 'You cannot edit this reply.', 'bbpress' );
?></div>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Search
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<form role="search" method="get" id="bbp-reply-search-form">
<div>
<label class="screen-reader-text hidden" for="rs"><?php esc_html_e( 'Search replies:', 'bbpress' ); ?></label>
<input type="text" value="<?php bbp_search_terms(); ?>" name="rs" id="rs" />
<input class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" />
</div>
</form>
</div>
<?php endif;

View File

@@ -0,0 +1,241 @@
<?php
/**
* New/Edit Reply
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_is_reply_edit() ) : ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php endif; ?>
<?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
<div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form">
<form id="new-post" name="new-post" method="post">
<?php do_action( 'bbp_theme_before_reply_form' ); ?>
<fieldset class="bbp-form">
<legend><?php printf( esc_html__( 'Reply To: %s', 'bbpress' ), ( bbp_get_form_reply_to() ) ? sprintf( esc_html__( 'Reply #%1$s in %2$s', 'bbpress' ), bbp_get_form_reply_to(), bbp_get_topic_title() ) : bbp_get_topic_title() ); ?></legend>
<?php do_action( 'bbp_theme_before_reply_form_notices' ); ?>
<?php if ( ! bbp_is_topic_open() && ! bbp_is_reply_edit() ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to reply.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php if ( ! bbp_is_reply_edit() && bbp_is_forum_closed() ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'This forum is closed to new content, however your posting capabilities still allow you to post.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div>
<?php bbp_get_template_part( 'form', 'anonymous' ); ?>
<?php do_action( 'bbp_theme_before_reply_form_content' ); ?>
<?php bbp_the_content( array( 'context' => 'reply' ) ); ?>
<?php do_action( 'bbp_theme_after_reply_form_content' ); ?>
<?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
<p class="form-allowed-tags">
<label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
<code><?php bbp_allowed_tags(); ?></code>
</p>
<?php endif; ?>
<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_reply_form_tags' ); ?>
<p>
<label for="bbp_topic_tags"><?php esc_html_e( 'Tags:', 'bbpress' ); ?></label><br />
<input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />
</p>
<?php do_action( 'bbp_theme_after_reply_form_tags' ); ?>
<?php endif; ?>
<?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_reply_edit() || ( bbp_is_reply_edit() && ! bbp_is_reply_anonymous() ) ) ) : ?>
<?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?>
<p>
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> />
<?php if ( bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() ) ) : ?>
<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
<?php else : ?>
<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
<?php endif; ?>
</p>
<?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?>
<?php endif; ?>
<?php if ( bbp_is_reply_edit() ) : ?>
<?php if ( current_user_can( 'moderate', bbp_get_reply_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_reply_form_reply_to' ); ?>
<p class="form-reply-to">
<label for="bbp_reply_to"><?php esc_html_e( 'Reply To:', 'bbpress' ); ?></label><br />
<?php bbp_reply_to_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_reply_form_reply_to' ); ?>
<?php do_action( 'bbp_theme_before_reply_form_status' ); ?>
<p>
<label for="bbp_reply_status"><?php esc_html_e( 'Reply Status:', 'bbpress' ); ?></label><br />
<?php bbp_form_reply_status_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_reply_form_status' ); ?>
<?php endif; ?>
<?php if ( bbp_allow_revisions() ) : ?>
<?php do_action( 'bbp_theme_before_reply_form_revisions' ); ?>
<fieldset class="bbp-form">
<legend>
<input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> />
<label for="bbp_log_reply_edit"><?php esc_html_e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
</legend>
<div>
<label for="bbp_reply_edit_reason"><?php printf( esc_html__( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
<input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
</div>
</fieldset>
<?php do_action( 'bbp_theme_after_reply_form_revisions' ); ?>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_reply_form_submit_wrapper' ); ?>
<div class="bbp-submit-wrapper">
<?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?>
<?php bbp_cancel_reply_to_link(); ?>
<button type="submit" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
<?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>
</div>
<?php do_action( 'bbp_theme_after_reply_form_submit_wrapper' ); ?>
</div>
<?php bbp_reply_form_fields(); ?>
</fieldset>
<?php do_action( 'bbp_theme_after_reply_form' ); ?>
</form>
</div>
<?php elseif ( bbp_is_topic_closed() ) : ?>
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
<div class="bbp-template-notice">
<ul>
<li><?php printf( esc_html__( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></li>
</ul>
</div>
</div>
<?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?>
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
<div class="bbp-template-notice">
<ul>
<li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li>
</ul>
</div>
</div>
<?php else : ?>
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
<div class="bbp-template-notice">
<ul>
<li><?php is_user_logged_in()
? esc_html_e( 'You cannot reply to this topic.', 'bbpress' )
: esc_html_e( 'You must be logged in to reply to this topic.', 'bbpress' );
?></li>
</ul>
</div>
<?php if ( ! is_user_logged_in() ) : ?>
<?php bbp_get_template_part( 'form', 'user-login' ); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ( bbp_is_reply_edit() ) : ?>
</div>
<?php endif;

View File

@@ -0,0 +1,26 @@
<?php
/**
* Search
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<form role="search" method="get" id="bbp-search-form">
<div>
<label class="screen-reader-text hidden" for="bbp_search"><?php esc_html_e( 'Search for:', 'bbpress' ); ?></label>
<input type="hidden" name="action" value="bbp-search-request" />
<input type="text" value="<?php bbp_search_terms(); ?>" name="bbp_search" id="bbp_search" />
<input class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" />
</div>
</form>
</div>
<?php endif;

View File

@@ -0,0 +1,124 @@
<?php
/**
* Merge Topic
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
<div id="merge-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-merge">
<form id="merge_topic" name="merge_topic" method="post">
<fieldset class="bbp-form">
<legend><?php printf( esc_html__( 'Merge topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
<div>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></li>
<li><?php esc_html_e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Replies to both topics are merged chronologically, ordered by the time and date they were published. Topics may be updated to a 1 second difference to maintain chronological order based on the merge direction.', 'bbpress' ); ?></li>
</ul>
</div>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Destination', 'bbpress' ); ?></legend>
<div>
<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
<label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'bbpress' ); ?></label>
<?php
bbp_dropdown( array(
'post_type' => bbp_get_topic_post_type(),
'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
'post_status' => bbp_get_public_topic_statuses(),
'selected' => -1,
'exclude' => bbp_get_topic_id(),
'select_id' => 'bbp_destination_topic'
) );
?>
<?php else : ?>
<label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>
<?php endif; ?>
</div>
</fieldset>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Topic Extras', 'bbpress' ); ?></legend>
<div>
<?php if ( bbp_is_subscriptions_active() ) : ?>
<input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'bbpress' ); ?></label><br />
<?php endif; ?>
<input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'bbpress' ); ?></label><br />
<?php if ( bbp_allow_topic_tags() ) : ?>
<input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'bbpress' ); ?></label><br />
<?php endif; ?>
</div>
</fieldset>
<div class="bbp-template-notice error">
<ul>
<li><?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-submit-wrapper">
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
</div>
</div>
<?php bbp_merge_topic_form_fields(); ?>
</fieldset>
</form>
</div>
<?php else : ?>
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="entry-content"><?php is_user_logged_in()
? esc_html_e( 'You do not have permission to edit this topic.', 'bbpress' )
: esc_html_e( 'You cannot edit this topic.', 'bbpress' );
?></div>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Search
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( bbp_allow_search() ) : ?>
<div class="bbp-search-form">
<form role="search" method="get" id="bbp-topic-search-form">
<div>
<label class="screen-reader-text hidden" for="ts"><?php esc_html_e( 'Search topics:', 'bbpress' ); ?></label>
<input type="text" value="<?php bbp_search_terms(); ?>" name="ts" id="ts" />
<input class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" />
</div>
</form>
</div>
<?php endif;

View File

@@ -0,0 +1,128 @@
<?php
/**
* Split Topic
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php if ( is_user_logged_in() && current_user_can( 'edit_topic', bbp_get_topic_id() ) ) : ?>
<div id="split-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-split">
<form id="split_topic" name="split_topic" method="post">
<fieldset class="bbp-form">
<legend><?php printf( esc_html__( 'Split topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
<div>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></li>
</ul>
</div>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Split Method', 'bbpress' ); ?></legend>
<div>
<input name="bbp_topic_split_option" id="bbp_topic_split_option_reply" type="radio" checked="checked" value="reply" />
<label for="bbp_topic_split_option_reply"><?php printf( esc_html__( 'New topic in %s titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
<input type="text" id="bbp_topic_split_destination_title" value="<?php printf( esc_html__( 'Split: %s', 'bbpress' ), bbp_get_topic_title() ); ?>" size="35" name="bbp_topic_split_destination_title" />
</div>
<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>
<div>
<input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" />
<label for="bbp_topic_split_option_existing"><?php esc_html_e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
<?php
bbp_dropdown( array(
'post_type' => bbp_get_topic_post_type(),
'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ),
'post_status' => bbp_get_public_topic_statuses(),
'selected' => -1,
'exclude' => bbp_get_topic_id(),
'select_id' => 'bbp_destination_topic'
) );
?>
</div>
<?php endif; ?>
</fieldset>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Topic Extras', 'bbpress' ); ?></legend>
<div>
<?php if ( bbp_is_subscriptions_active() ) : ?>
<input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_subscribers"><?php esc_html_e( 'Copy subscribers to the new topic', 'bbpress' ); ?></label><br />
<?php endif; ?>
<input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_favoriters"><?php esc_html_e( 'Copy favoriters to the new topic', 'bbpress' ); ?></label><br />
<?php if ( bbp_allow_topic_tags() ) : ?>
<input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_tags"><?php esc_html_e( 'Copy topic tags to the new topic', 'bbpress' ); ?></label><br />
<?php endif; ?>
</div>
</fieldset>
<div class="bbp-template-notice error" role="alert" tabindex="-1">
<ul>
<li><?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-submit-wrapper">
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
</div>
</div>
<?php bbp_split_topic_form_fields(); ?>
</fieldset>
</form>
</div>
<?php else : ?>
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="entry-content"><?php is_user_logged_in()
? esc_html_e( 'You do not have permission to edit this topic.', 'bbpress' )
: esc_html_e( 'You cannot edit this topic.', 'bbpress' );
?></div>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,133 @@
<?php
/**
* Edit Topic Tag
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( current_user_can( 'edit_topic_tags' ) ) : ?>
<div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form">
<fieldset class="bbp-form" id="bbp-edit-topic-tag">
<legend><?php printf( esc_html__( 'Manage Tag: "%s"', 'bbpress' ), bbp_get_topic_tag_name() ); ?></legend>
<fieldset class="bbp-form" id="tag-rename">
<legend><?php esc_html_e( 'Rename', 'bbpress' ); ?></legend>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'Leave the slug empty to have one automatically generated.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Changing the slug affects its permalink. Any links to the old slug will stop working.', 'bbpress' ); ?></li>
</ul>
</div>
<form id="rename_tag" name="rename_tag" method="post">
<div>
<label for="tag-name"><?php esc_html_e( 'Name:', 'bbpress' ); ?></label>
<input type="text" id="tag-name" name="tag-name" size="20" maxlength="40" value="<?php echo esc_attr( bbp_get_topic_tag_name() ); ?>" />
</div>
<div>
<label for="tag-slug"><?php esc_html_e( 'Slug:', 'bbpress' ); ?></label>
<input type="text" id="tag-slug" name="tag-slug" size="20" maxlength="40" value="<?php echo esc_attr( apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) ); ?>" />
</div>
<div>
<label for="tag-description"><?php esc_html_e( 'Description:', 'bbpress' ); ?></label>
<input type="text" id="tag-description" name="tag-description" size="20" value="<?php echo esc_attr( bbp_get_topic_tag_description( array( 'before' => '', 'after' => '' ) ) ); ?>" />
</div>
<div class="bbp-submit-wrapper">
<button type="submit" class="button submit"><?php esc_attr_e( 'Update', 'bbpress' ); ?></button>
<input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
<input type="hidden" name="action" value="bbp-update-topic-tag" />
<?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?>
</div>
</form>
</fieldset>
<fieldset class="bbp-form" id="tag-merge">
<legend><?php esc_html_e( 'Merge', 'bbpress' ); ?></legend>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Merging tags together cannot be undone.', 'bbpress' ); ?></li>
</ul>
</div>
<form id="merge_tag" name="merge_tag" method="post">
<div>
<label for="tag-existing-name"><?php esc_html_e( 'Existing tag:', 'bbpress' ); ?></label>
<input type="text" id="tag-existing-name" name="tag-existing-name" size="22" maxlength="40" />
</div>
<div class="bbp-submit-wrapper">
<button type="submit" class="button submit" onclick="return confirm('<?php echo esc_js( sprintf( esc_html__( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');"><?php esc_attr_e( 'Merge', 'bbpress' ); ?></button>
<input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
<input type="hidden" name="action" value="bbp-merge-topic-tag" />
<?php wp_nonce_field( 'merge-tag_' . bbp_get_topic_tag_id() ); ?>
</div>
</form>
</fieldset>
<?php if ( current_user_can( 'delete_topic_tags' ) ) : ?>
<fieldset class="bbp-form" id="delete-tag">
<legend><?php esc_html_e( 'Delete', 'bbpress' ); ?></legend>
<div class="bbp-template-notice info">
<ul>
<li><?php esc_html_e( 'This does not delete your topics. Only the tag itself is deleted.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></li>
<li><?php esc_html_e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></li>
</ul>
</div>
<form id="delete_tag" name="delete_tag" method="post">
<div class="bbp-submit-wrapper">
<button type="submit" class="button submit" onclick="return confirm('<?php echo esc_js( sprintf( esc_html__( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');"><?php esc_attr_e( 'Delete', 'bbpress' ); ?></button>
<input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
<input type="hidden" name="action" value="bbp-delete-topic-tag" />
<?php wp_nonce_field( 'delete-tag_' . bbp_get_topic_tag_id() ); ?>
</div>
</form>
</fieldset>
<?php endif; ?>
</fieldset>
</div>
<?php endif;

View File

@@ -0,0 +1,268 @@
<?php
/**
* New/Edit Topic
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( ! bbp_is_single_forum() ) : ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php endif; ?>
<?php if ( bbp_is_topic_edit() ) : ?>
<?php bbp_topic_tag_list( bbp_get_topic_id() ); ?>
<?php bbp_single_topic_description( array( 'topic_id' => bbp_get_topic_id() ) ); ?>
<?php bbp_get_template_part( 'alert', 'topic-lock' ); ?>
<?php endif; ?>
<?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>
<div id="new-topic-<?php bbp_topic_id(); ?>" class="bbp-topic-form">
<form id="new-post" name="new-post" method="post">
<?php do_action( 'bbp_theme_before_topic_form' ); ?>
<fieldset class="bbp-form">
<legend>
<?php
if ( bbp_is_topic_edit() ) :
printf( esc_html__( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_topic_title() );
else :
( bbp_is_single_forum() && bbp_get_forum_title() )
? printf( esc_html__( 'Create New Topic in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() )
: esc_html_e( 'Create New Topic', 'bbpress' );
endif;
?>
</legend>
<?php do_action( 'bbp_theme_before_topic_form_notices' ); ?>
<?php if ( ! bbp_is_topic_edit() && bbp_is_forum_closed() ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to create a topic.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
</ul>
</div>
<?php endif; ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div>
<?php bbp_get_template_part( 'form', 'anonymous' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_title' ); ?>
<p>
<label for="bbp_topic_title"><?php printf( esc_html__( 'Topic Title (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
<input type="text" id="bbp_topic_title" value="<?php bbp_form_topic_title(); ?>" size="40" name="bbp_topic_title" maxlength="<?php bbp_title_max_length(); ?>" />
</p>
<?php do_action( 'bbp_theme_after_topic_form_title' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_content' ); ?>
<?php bbp_the_content( array( 'context' => 'topic' ) ); ?>
<?php do_action( 'bbp_theme_after_topic_form_content' ); ?>
<?php if ( ! ( bbp_use_wp_editor() || current_user_can( 'unfiltered_html' ) ) ) : ?>
<p class="form-allowed-tags">
<label><?php printf( esc_html__( 'You may use these %s tags and attributes:', 'bbpress' ), '<abbr title="HyperText Markup Language">HTML</abbr>' ); ?></label><br />
<code><?php bbp_allowed_tags(); ?></code>
</p>
<?php endif; ?>
<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_tags' ); ?>
<p>
<label for="bbp_topic_tags"><?php esc_html_e( 'Topic Tags:', 'bbpress' ); ?></label><br />
<input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />
</p>
<?php do_action( 'bbp_theme_after_topic_form_tags' ); ?>
<?php endif; ?>
<?php if ( ! bbp_is_single_forum() ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_forum' ); ?>
<p>
<label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></label><br />
<?php
bbp_dropdown( array(
'show_none' => esc_html__( '&mdash; No forum &mdash;', 'bbpress' ),
'selected' => bbp_get_form_topic_forum()
) );
?>
</p>
<?php do_action( 'bbp_theme_after_topic_form_forum' ); ?>
<?php endif; ?>
<?php if ( current_user_can( 'moderate', bbp_get_topic_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_type' ); ?>
<p>
<label for="bbp_stick_topic"><?php esc_html_e( 'Topic Type:', 'bbpress' ); ?></label><br />
<?php bbp_form_topic_type_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_topic_form_type' ); ?>
<?php do_action( 'bbp_theme_before_topic_form_status' ); ?>
<p>
<label for="bbp_topic_status"><?php esc_html_e( 'Topic Status:', 'bbpress' ); ?></label><br />
<?php bbp_form_topic_status_dropdown(); ?>
</p>
<?php do_action( 'bbp_theme_after_topic_form_status' ); ?>
<?php endif; ?>
<?php if ( bbp_is_subscriptions_active() && ! bbp_is_anonymous() && ( ! bbp_is_topic_edit() || ( bbp_is_topic_edit() && ! bbp_is_topic_anonymous() ) ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_subscriptions' ); ?>
<p>
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> />
<?php if ( bbp_is_topic_edit() && ( bbp_get_topic_author_id() !== bbp_get_current_user_id() ) ) : ?>
<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
<?php else : ?>
<label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
<?php endif; ?>
</p>
<?php do_action( 'bbp_theme_after_topic_form_subscriptions' ); ?>
<?php endif; ?>
<?php if ( bbp_allow_revisions() && bbp_is_topic_edit() ) : ?>
<?php do_action( 'bbp_theme_before_topic_form_revisions' ); ?>
<fieldset class="bbp-form">
<legend>
<input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" <?php bbp_form_topic_log_edit(); ?> />
<label for="bbp_log_topic_edit"><?php esc_html_e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
</legend>
<div>
<label for="bbp_topic_edit_reason"><?php printf( esc_html__( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
<input type="text" value="<?php bbp_form_topic_edit_reason(); ?>" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
</div>
</fieldset>
<?php do_action( 'bbp_theme_after_topic_form_revisions' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_topic_form_submit_wrapper' ); ?>
<div class="bbp-submit-wrapper">
<?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
<button type="submit" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
<?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
</div>
<?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?>
</div>
<?php bbp_topic_form_fields(); ?>
</fieldset>
<?php do_action( 'bbp_theme_after_topic_form' ); ?>
</form>
</div>
<?php elseif ( bbp_is_forum_closed() ) : ?>
<div id="forum-closed-<?php bbp_forum_id(); ?>" class="bbp-forum-closed">
<div class="bbp-template-notice">
<ul>
<li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
</ul>
</div>
</div>
<?php else : ?>
<div id="no-topic-<?php bbp_forum_id(); ?>" class="bbp-no-topic">
<div class="bbp-template-notice">
<ul>
<li><?php is_user_logged_in()
? esc_html_e( 'You cannot create new topics.', 'bbpress' )
: esc_html_e( 'You must be logged in to create new topics.', 'bbpress' );
?></li>
</ul>
</div>
<?php if ( ! is_user_logged_in() ) : ?>
<?php bbp_get_template_part( 'form', 'user-login' ); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ( ! bbp_is_single_forum() ) : ?>
</div>
<?php endif;

View File

@@ -0,0 +1,172 @@
<?php
/**
* bbPress User Profile Edit Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<form id="bbp-your-profile" method="post" enctype="multipart/form-data">
<h2 class="entry-title"><?php esc_html_e( 'Name', 'bbpress' ) ?></h2>
<?php do_action( 'bbp_user_edit_before' ); ?>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Name', 'bbpress' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_name' ); ?>
<div>
<label for="first_name"><?php esc_html_e( 'First Name', 'bbpress' ) ?></label>
<input type="text" name="first_name" id="first_name" value="<?php bbp_displayed_user_field( 'first_name', 'edit' ); ?>" class="regular-text" />
</div>
<div>
<label for="last_name"><?php esc_html_e( 'Last Name', 'bbpress' ) ?></label>
<input type="text" name="last_name" id="last_name" value="<?php bbp_displayed_user_field( 'last_name', 'edit' ); ?>" class="regular-text" />
</div>
<div>
<label for="nickname"><?php esc_html_e( 'Nickname', 'bbpress' ); ?></label>
<input type="text" name="nickname" id="nickname" value="<?php bbp_displayed_user_field( 'nickname', 'edit' ); ?>" class="regular-text" />
</div>
<div>
<label for="display_name"><?php esc_html_e( 'Display Name', 'bbpress' ) ?></label>
<?php bbp_edit_user_display_name(); ?>
</div>
<?php do_action( 'bbp_user_edit_after_name' ); ?>
</fieldset>
<h2 class="entry-title"><?php esc_html_e( 'Contact Info', 'bbpress' ) ?></h2>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Contact Info', 'bbpress' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_contact' ); ?>
<div>
<label for="url"><?php esc_html_e( 'Website', 'bbpress' ) ?></label>
<input type="text" name="url" id="url" value="<?php bbp_displayed_user_field( 'user_url', 'edit' ); ?>" maxlength="200" class="regular-text code" />
</div>
<?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?>
<div>
<label for="<?php echo esc_attr( $name ); ?>"><?php echo apply_filters( 'user_' . $name . '_label', $desc ); ?></label>
<input type="text" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="<?php bbp_displayed_user_field( $name, 'edit' ); ?>" class="regular-text" />
</div>
<?php endforeach; ?>
<?php do_action( 'bbp_user_edit_after_contact' ); ?>
</fieldset>
<h2 class="entry-title"><?php bbp_is_user_home_edit()
? esc_html_e( 'About Yourself', 'bbpress' )
: esc_html_e( 'About the user', 'bbpress' );
?></h2>
<fieldset class="bbp-form">
<legend><?php bbp_is_user_home_edit()
? esc_html_e( 'About Yourself', 'bbpress' )
: esc_html_e( 'About the user', 'bbpress' );
?></legend>
<?php do_action( 'bbp_user_edit_before_about' ); ?>
<div>
<label for="description"><?php esc_html_e( 'Biographical Info', 'bbpress' ); ?></label>
<textarea name="description" id="description" rows="5" cols="30"><?php bbp_displayed_user_field( 'description', 'edit' ); ?></textarea>
</div>
<?php do_action( 'bbp_user_edit_after_about' ); ?>
</fieldset>
<h2 class="entry-title"><?php esc_html_e( 'Account', 'bbpress' ) ?></h2>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Account', 'bbpress' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_account' ); ?>
<div>
<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?></label>
<input type="text" name="user_login" id="user_login" value="<?php bbp_displayed_user_field( 'user_login', 'edit' ); ?>" maxlength="100" disabled="disabled" class="regular-text" />
</div>
<div>
<label for="email"><?php esc_html_e( 'Email', 'bbpress' ); ?></label>
<input type="text" name="email" id="email" value="<?php bbp_displayed_user_field( 'user_email', 'edit' ); ?>" maxlength="100" class="regular-text" autocomplete="off" />
</div>
<?php bbp_get_template_part( 'form', 'user-passwords' ); ?>
<div>
<label for="locale"><?php esc_html_e( 'Language', 'bbpress' ) ?></label>
<?php bbp_edit_user_language(); ?>
</div>
<?php do_action( 'bbp_user_edit_after_account' ); ?>
</fieldset>
<?php if ( ! bbp_is_user_home_edit() && current_user_can( 'promote_user', bbp_get_displayed_user_id() ) ) : ?>
<h2 class="entry-title"><?php esc_html_e( 'User Role', 'bbpress' ) ?></h2>
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'User Role', 'bbpress' ); ?></legend>
<?php do_action( 'bbp_user_edit_before_role' ); ?>
<?php if ( is_multisite() && is_super_admin() && current_user_can( 'manage_network_options' ) ) : ?>
<div>
<label for="super_admin"><?php esc_html_e( 'Network Role', 'bbpress' ); ?></label>
<label>
<input class="checkbox" type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> />
<?php esc_html_e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
</label>
</div>
<?php endif; ?>
<?php bbp_get_template_part( 'form', 'user-roles' ); ?>
<?php do_action( 'bbp_user_edit_after_role' ); ?>
</fieldset>
<?php endif; ?>
<?php do_action( 'bbp_user_edit_after' ); ?>
<fieldset class="submit">
<legend><?php esc_html_e( 'Save Changes', 'bbpress' ); ?></legend>
<div>
<?php bbp_edit_user_form_fields(); ?>
<button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home_edit()
? esc_html_e( 'Update Profile', 'bbpress' )
: esc_html_e( 'Update User', 'bbpress' );
?></button>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,44 @@
<?php
/**
* User Login Form
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Log In', 'bbpress' ); ?></legend>
<div class="bbp-username">
<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label>
<input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" maxlength="100" id="user_login" autocomplete="off" />
</div>
<div class="bbp-password">
<label for="user_pass"><?php esc_html_e( 'Password', 'bbpress' ); ?>: </label>
<input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" />
</div>
<div class="bbp-remember-me">
<input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" />
<label for="rememberme"><?php esc_html_e( 'Keep me signed in', 'bbpress' ); ?></label>
</div>
<?php do_action( 'login_form' ); ?>
<div class="bbp-submit-wrapper">
<button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php esc_html_e( 'Log In', 'bbpress' ); ?></button>
<?php bbp_user_login_fields(); ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,36 @@
<?php
/**
* User Lost Password Form
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<form method="post" action="<?php bbp_wp_login_action( array( 'action' => 'lostpassword', 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Lost Password', 'bbpress' ); ?></legend>
<div class="bbp-username">
<p>
<label for="user_login" class="hide"><?php esc_html_e( 'Username or Email', 'bbpress' ); ?>: </label>
<input type="text" name="user_login" value="" size="20" id="user_login" maxlength="100" autocomplete="off" />
</p>
</div>
<?php do_action( 'login_form', 'resetpass' ); ?>
<div class="bbp-submit-wrapper">
<button type="submit" name="user-submit" class="button submit user-submit"><?php esc_html_e( 'Reset My Password', 'bbpress' ); ?></button>
<?php bbp_user_lost_pass_fields(); ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,55 @@
<?php
/**
* User Password Generator
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
// Filters the display of the password fields
if ( apply_filters( 'show_password_fields', true, bbpress()->displayed_user ) ) : ?>
<script type="text/javascript">
document.body.className = document.body.className.replace( 'no-js', 'js' );
</script>
<div id="password" class="user-pass1-wrap">
<label for="user_login"><?php esc_html_e( 'Password', 'bbpress' ); ?></label>
<button type="button" class="button wp-generate-pw hide-if-no-js"><?php esc_html_e( 'Generate Password', 'bbpress' ); ?></button>
<fieldset class="bbp-form password wp-pwd hide-if-js">
<span class="password-input-wrapper">
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
</span>
<span class="password-button-wrapper">
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password', 'bbpress' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php esc_html_e( 'Hide', 'bbpress' ); ?></span>
</button><button type="button" class="button wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change', 'bbpress' ); ?>">
<span class="dashicons dashicons-no"></span>
<span class="text"><?php esc_html_e( 'Cancel', 'bbpress' ); ?></span>
</button>
</span>
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
</fieldset>
</div>
<div class="user-pass2-wrap hide-if-js">
<label for="pass2"><?php esc_html_e( 'Repeat New Password', 'bbpress' ); ?></label>
<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" />
<p class="description"><?php esc_html_e( 'Type your new password again.', 'bbpress' ); ?></p>
</div>
<div class="pw-weak">
<label for="pw_weak"><?php esc_html_e( 'Confirm', 'bbpress' ); ?></label>
<input type="checkbox" name="pw_weak" id="pw_weak" class="pw-checkbox checkbox" />
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
</div>
<?php endif;

View File

@@ -0,0 +1,51 @@
<?php
/**
* User Registration Form
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
<fieldset class="bbp-form">
<legend><?php esc_html_e( 'Create an Account', 'bbpress' ); ?></legend>
<?php do_action( 'bbp_template_before_register_fields' ); ?>
<div class="bbp-template-notice">
<ul>
<li><?php esc_html_e( 'Your username must be unique, and cannot be changed later.', 'bbpress' ); ?></li>
<li><?php esc_html_e( 'We use your email address to email you a secure password and verify your account.', 'bbpress' ); ?></li>
</ul>
</div>
<div class="bbp-username">
<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label>
<input type="text" name="user_login" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" maxlength="100" autocomplete="off" />
</div>
<div class="bbp-email">
<label for="user_email"><?php esc_html_e( 'Email', 'bbpress' ); ?>: </label>
<input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" maxlength="100" autocomplete="off" />
</div>
<?php do_action( 'register_form' ); ?>
<div class="bbp-submit-wrapper">
<button type="submit" name="user-submit" class="button submit user-submit"><?php esc_html_e( 'Register', 'bbpress' ); ?></button>
<?php bbp_user_register_fields(); ?>
</div>
<?php do_action( 'bbp_template_after_register_fields' ); ?>
</fieldset>
</form>

View File

@@ -0,0 +1,27 @@
<?php
/**
* User Roles Profile Edit Part
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div>
<label for="role"><?php esc_html_e( 'Blog Role', 'bbpress' ) ?></label>
<?php bbp_edit_user_blog_role(); ?>
</div>
<div>
<label for="forum-role"><?php esc_html_e( 'Forum Role', 'bbpress' ) ?></label>
<?php bbp_edit_user_forums_role(); ?>
</div>

View File

@@ -0,0 +1,51 @@
<?php
/**
* Forums Loop
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_forums_loop' ); ?>
<ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
<li class="bbp-header">
<ul class="forum-titles">
<li class="bbp-forum-info"><?php esc_html_e( 'Forum', 'bbpress' ); ?></li>
<li class="bbp-forum-topic-count"><?php esc_html_e( 'Topics', 'bbpress' ); ?></li>
<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic()
? esc_html_e( 'Replies', 'bbpress' )
: esc_html_e( 'Posts', 'bbpress' );
?></li>
<li class="bbp-forum-freshness"><?php esc_html_e( 'Last Post', 'bbpress' ); ?></li>
</ul>
</li><!-- .bbp-header -->
<li class="bbp-body">
<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
<?php bbp_get_template_part( 'loop', 'single-forum' ); ?>
<?php endwhile; ?>
</li><!-- .bbp-body -->
<li class="bbp-footer">
<div class="tr">
<p class="td colspan4">&nbsp;</p>
</div><!-- .tr -->
</li><!-- .bbp-footer -->
</ul><!-- .forums-directory -->
<?php do_action( 'bbp_template_after_forums_loop' );

View File

@@ -0,0 +1,52 @@
<?php
/**
* Replies Loop
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_replies_loop' ); ?>
<ul id="topic-<?php bbp_topic_id(); ?>-replies" class="forums bbp-replies">
<li class="bbp-header">
<div class="bbp-reply-author"><?php esc_html_e( 'Author', 'bbpress' ); ?></div><!-- .bbp-reply-author -->
<div class="bbp-reply-content"><?php bbp_show_lead_topic()
? esc_html_e( 'Replies', 'bbpress' )
: esc_html_e( 'Posts', 'bbpress' );
?></div><!-- .bbp-reply-content -->
</li><!-- .bbp-header -->
<li class="bbp-body">
<?php if ( bbp_thread_replies() ) : ?>
<?php bbp_list_replies(); ?>
<?php else : ?>
<?php while ( bbp_replies() ) : bbp_the_reply(); ?>
<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
<?php endwhile; ?>
<?php endif; ?>
</li><!-- .bbp-body -->
<li class="bbp-footer">
<div class="bbp-reply-author"><?php esc_html_e( 'Author', 'bbpress' ); ?></div>
<div class="bbp-reply-content"><?php bbp_show_lead_topic()
? esc_html_e( 'Replies', 'bbpress' )
: esc_html_e( 'Posts', 'bbpress' );
?></div><!-- .bbp-reply-content -->
</li><!-- .bbp-footer -->
</ul><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
<?php do_action( 'bbp_template_after_replies_loop' );

View File

@@ -0,0 +1,43 @@
<?php
/**
* Search Loop - Single Forum
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-forum-header">
<div class="bbp-meta">
<span class="bbp-forum-post-date"><?php printf( esc_html__( 'Last updated %s', 'bbpress' ), bbp_get_forum_last_active_time() ); ?></span>
<a href="<?php bbp_forum_permalink(); ?>" class="bbp-forum-permalink">#<?php bbp_forum_id(); ?></a>
</div><!-- .bbp-meta -->
<div class="bbp-forum-title">
<?php do_action( 'bbp_theme_before_forum_title' ); ?>
<h3><?php esc_html_e( 'Forum:', 'bbpress' ); ?>
<a href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></h3>
<?php do_action( 'bbp_theme_after_forum_title' ); ?>
</div><!-- .bbp-forum-title -->
</div><!-- .bbp-forum-header -->
<div id="post-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>
<div class="bbp-forum-content">
<?php do_action( 'bbp_theme_before_forum_content' ); ?>
<?php bbp_forum_content(); ?>
<?php do_action( 'bbp_theme_after_forum_content' ); ?>
</div><!-- .bbp-forum-content -->
</div><!-- #post-<?php bbp_forum_id(); ?> -->

View File

@@ -0,0 +1,58 @@
<?php
/**
* Search Loop - Single Reply
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-reply-header">
<div class="bbp-meta">
<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
</div><!-- .bbp-meta -->
<div class="bbp-reply-title">
<h3><?php esc_html_e( 'In reply to: ', 'bbpress' ); ?>
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a></h3>
</div><!-- .bbp-reply-title -->
</div><!-- .bbp-reply-header -->
<div id="post-<?php bbp_reply_id(); ?>" <?php bbp_reply_class(); ?>>
<div class="bbp-reply-author">
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?>
<?php if ( bbp_is_user_keymaster() ) : ?>
<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
</div><!-- .bbp-reply-author -->
<div class="bbp-reply-content">
<?php do_action( 'bbp_theme_before_reply_content' ); ?>
<?php bbp_reply_content(); ?>
<?php do_action( 'bbp_theme_after_reply_content' ); ?>
</div><!-- .bbp-reply-content -->
</div><!-- #post-<?php bbp_reply_id(); ?> -->

View File

@@ -0,0 +1,80 @@
<?php
/**
* Search Loop - Single Topic
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div class="bbp-topic-header">
<div class="bbp-meta">
<span class="bbp-topic-post-date"><?php bbp_topic_post_date( bbp_get_topic_id() ); ?></span>
<a href="<?php bbp_topic_permalink(); ?>" class="bbp-topic-permalink">#<?php bbp_topic_id(); ?></a>
</div><!-- .bbp-meta -->
<div class="bbp-topic-title">
<?php do_action( 'bbp_theme_before_topic_title' ); ?>
<h3><?php esc_html_e( 'Topic:', 'bbpress' ); ?>
<a href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a></h3>
<div class="bbp-topic-title-meta">
<?php if ( function_exists( 'bbp_is_forum_group_forum' ) && bbp_is_forum_group_forum( bbp_get_topic_forum_id() ) ) : ?>
<?php esc_html_e( 'in group forum ', 'bbpress' ); ?>
<?php else : ?>
<?php esc_html_e( 'in forum ', 'bbpress' ); ?>
<?php endif; ?>
<a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a>
</div><!-- .bbp-topic-title-meta -->
<?php do_action( 'bbp_theme_after_topic_title' ); ?>
</div><!-- .bbp-topic-title -->
</div><!-- .bbp-topic-header -->
<div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
<div class="bbp-topic-author">
<?php do_action( 'bbp_theme_before_topic_author_details' ); ?>
<?php bbp_topic_author_link( array( 'show_role' => true ) ); ?>
<?php if ( bbp_is_user_keymaster() ) : ?>
<?php do_action( 'bbp_theme_before_topic_author_admin_details' ); ?>
<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>
<?php do_action( 'bbp_theme_after_topic_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_topic_author_details' ); ?>
</div><!-- .bbp-topic-author -->
<div class="bbp-topic-content">
<?php do_action( 'bbp_theme_before_topic_content' ); ?>
<?php bbp_topic_content(); ?>
<?php do_action( 'bbp_theme_after_topic_content' ); ?>
</div><!-- .bbp-topic-content -->
</div><!-- #post-<?php bbp_topic_id(); ?> -->

View File

@@ -0,0 +1,53 @@
<?php
/**
* Search Loop
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_search_results_loop' ); ?>
<ul id="bbp-search-results" class="forums bbp-search-results">
<li class="bbp-header">
<div class="bbp-search-author"><?php esc_html_e( 'Author', 'bbpress' ); ?></div><!-- .bbp-reply-author -->
<div class="bbp-search-content">
<?php esc_html_e( 'Search Results', 'bbpress' ); ?>
</div><!-- .bbp-search-content -->
</li><!-- .bbp-header -->
<li class="bbp-body">
<?php while ( bbp_search_results() ) : bbp_the_search_result(); ?>
<?php bbp_get_template_part( 'loop', 'search-' . get_post_type() ); ?>
<?php endwhile; ?>
</li><!-- .bbp-body -->
<li class="bbp-footer">
<div class="bbp-search-author"><?php esc_html_e( 'Author', 'bbpress' ); ?></div>
<div class="bbp-search-content">
<?php esc_html_e( 'Search Results', 'bbpress' ); ?>
</div><!-- .bbp-search-content -->
</li><!-- .bbp-footer -->
</ul><!-- #bbp-search-results -->
<?php do_action( 'bbp_template_after_search_results_loop' );

View File

@@ -0,0 +1,76 @@
<?php
/**
* Forums Loop - Single Forum
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<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' ); ?>
</span>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_forum_title' ); ?>
<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
<?php do_action( 'bbp_theme_after_forum_title' ); ?>
<?php do_action( 'bbp_theme_before_forum_description' ); ?>
<div class="bbp-forum-content"><?php bbp_forum_content(); ?></div>
<?php do_action( 'bbp_theme_after_forum_description' ); ?>
<?php do_action( 'bbp_theme_before_forum_sub_forums' ); ?>
<?php bbp_list_forums(); ?>
<?php do_action( 'bbp_theme_after_forum_sub_forums' ); ?>
<?php bbp_forum_row_actions(); ?>
</li>
<li class="bbp-forum-topic-count"><?php bbp_forum_topic_count(); ?></li>
<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></li>
<li class="bbp-forum-freshness">
<?php do_action( 'bbp_theme_before_forum_freshness_link' ); ?>
<?php bbp_forum_freshness_link(); ?>
<?php do_action( 'bbp_theme_after_forum_freshness_link' ); ?>
<p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_author' ); ?>
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
<?php do_action( 'bbp_theme_after_topic_author' ); ?>
</p>
</li>
</ul><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->

View File

@@ -0,0 +1,69 @@
<?php
/**
* Replies Loop - Single Reply
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
<div class="bbp-meta">
<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
<?php if ( bbp_is_single_user_replies() ) : ?>
<span class="bbp-header">
<?php esc_html_e( 'in reply to: ', 'bbpress' ); ?>
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
</span>
<?php endif; ?>
<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
<?php bbp_reply_admin_links(); ?>
<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
</div><!-- .bbp-meta -->
</div><!-- #post-<?php bbp_reply_id(); ?> -->
<div <?php bbp_reply_class(); ?>>
<div class="bbp-reply-author">
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?>
<?php if ( current_user_can( 'moderate', bbp_get_reply_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
</div><!-- .bbp-reply-author -->
<div class="bbp-reply-content">
<?php do_action( 'bbp_theme_before_reply_content' ); ?>
<?php bbp_reply_content(); ?>
<?php do_action( 'bbp_theme_after_reply_content' ); ?>
</div><!-- .bbp-reply-content -->
</div><!-- .reply -->

View File

@@ -0,0 +1,105 @@
<?php
/**
* Topics Loop - Single
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
?>
<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-row-actions">
<?php do_action( 'bbp_theme_before_topic_favorites_action' ); ?>
<?php bbp_topic_favorite_link( array( 'before' => '', 'favorite' => '+', 'favorited' => '&times;' ) ); ?>
<?php do_action( 'bbp_theme_after_topic_favorites_action' ); ?>
</span>
<?php elseif ( bbp_is_subscriptions() ) : ?>
<span class="bbp-row-actions">
<?php do_action( 'bbp_theme_before_topic_subscription_action' ); ?>
<?php bbp_topic_subscription_link( array( 'before' => '', 'subscribe' => '+', 'unsubscribe' => '&times;' ) ); ?>
<?php do_action( 'bbp_theme_after_topic_subscription_action' ); ?>
</span>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_theme_before_topic_title' ); ?>
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a>
<?php do_action( 'bbp_theme_after_topic_title' ); ?>
<?php bbp_topic_pagination(); ?>
<?php do_action( 'bbp_theme_before_topic_meta' ); ?>
<p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_started_by' ); ?>
<span class="bbp-topic-started-by"><?php printf( esc_html__( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
<?php do_action( 'bbp_theme_after_topic_started_by' ); ?>
<?php if ( ! bbp_is_single_forum() || ( bbp_get_topic_forum_id() !== bbp_get_forum_id() ) ) : ?>
<?php do_action( 'bbp_theme_before_topic_started_in' ); ?>
<span class="bbp-topic-started-in"><?php printf( esc_html__( 'in: %1$s', 'bbpress' ), '<a href="' . bbp_get_forum_permalink( bbp_get_topic_forum_id() ) . '">' . bbp_get_forum_title( bbp_get_topic_forum_id() ) . '</a>' ); ?></span>
<?php do_action( 'bbp_theme_after_topic_started_in' ); ?>
<?php endif; ?>
</p>
<?php do_action( 'bbp_theme_after_topic_meta' ); ?>
<?php bbp_topic_row_actions(); ?>
</li>
<li class="bbp-topic-voice-count"><?php bbp_topic_voice_count(); ?></li>
<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? bbp_topic_reply_count() : bbp_topic_post_count(); ?></li>
<li class="bbp-topic-freshness">
<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
<?php bbp_topic_freshness_link(); ?>
<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
<p class="bbp-topic-meta">
<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
<?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
</p>
</li>
</ul><!-- #bbp-topic-<?php bbp_topic_id(); ?> -->

View File

@@ -0,0 +1,47 @@
<?php
/**
* Topics Loop
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_topics_loop' ); ?>
<ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics">
<li class="bbp-header">
<ul class="forum-titles">
<li class="bbp-topic-title"><?php esc_html_e( 'Topic', 'bbpress' ); ?></li>
<li class="bbp-topic-voice-count"><?php esc_html_e( 'Voices', 'bbpress' ); ?></li>
<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic()
? esc_html_e( 'Replies', 'bbpress' )
: esc_html_e( 'Posts', 'bbpress' );
?></li>
<li class="bbp-topic-freshness"><?php esc_html_e( 'Last Post', 'bbpress' ); ?></li>
</ul>
</li>
<li class="bbp-body">
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
</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' );

View File

@@ -0,0 +1,20 @@
<?php
/**
* Pagination for pages of replies (when viewing a topic)
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_pagination_loop' ); ?>
<div class="bbp-pagination">
<div class="bbp-pagination-count"><?php bbp_topic_pagination_count(); ?></div>
<div class="bbp-pagination-links"><?php bbp_topic_pagination_links(); ?></div>
</div>
<?php do_action( 'bbp_template_after_pagination_loop' );

View File

@@ -0,0 +1,20 @@
<?php
/**
* Pagination for pages of search results
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_pagination_loop' ); ?>
<div class="bbp-pagination">
<div class="bbp-pagination-count"><?php bbp_search_pagination_count(); ?></div>
<div class="bbp-pagination-links"><?php bbp_search_pagination_links(); ?></div>
</div>
<?php do_action( 'bbp_template_after_pagination_loop' );

View File

@@ -0,0 +1,20 @@
<?php
/**
* Pagination for pages of topics (when viewing a forum)
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_pagination_loop' ); ?>
<div class="bbp-pagination">
<div class="bbp-pagination-count"><?php bbp_forum_pagination_count(); ?></div>
<div class="bbp-pagination-links"><?php bbp_forum_pagination_links(); ?></div>
</div>
<?php do_action( 'bbp_template_after_pagination_loop' );

View File

@@ -0,0 +1,87 @@
<?php
/**
* User Details
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_details' ); ?>
<div id="bbp-single-user-details">
<div id="bbp-user-avatar">
<span class='vcard'>
<a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me">
<?php echo get_avatar( bbp_get_displayed_user_field( 'user_email', 'raw' ), apply_filters( 'bbp_single_user_details_avatar_size', 150 ) ); ?>
</a>
</span>
</div>
<?php do_action( 'bbp_template_before_user_details_menu_items' ); ?>
<div id="bbp-user-navigation">
<ul>
<li class="<?php if ( bbp_is_single_user_profile() ) :?>current<?php endif; ?>">
<span class="vcard bbp-user-profile-link">
<a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"><?php esc_html_e( 'Profile', 'bbpress' ); ?></a>
</span>
</li>
<li class="<?php if ( bbp_is_single_user_topics() ) :?>current<?php endif; ?>">
<span class='bbp-user-topics-created-link'>
<a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Topics Started', 'bbpress' ); ?></a>
</span>
</li>
<li class="<?php if ( bbp_is_single_user_replies() ) :?>current<?php endif; ?>">
<span class='bbp-user-replies-created-link'>
<a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Replies Created', 'bbpress' ); ?></a>
</span>
</li>
<?php if ( bbp_is_engagements_active() ) : ?>
<li class="<?php if ( bbp_is_single_user_engagements() ) :?>current<?php endif; ?>">
<span class='bbp-user-engagements-created-link'>
<a href="<?php bbp_user_engagements_url(); ?>" title="<?php printf( esc_attr__( "%s's Engagements", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Engagements', 'bbpress' ); ?></a>
</span>
</li>
<?php endif; ?>
<?php if ( bbp_is_favorites_active() ) : ?>
<li class="<?php if ( bbp_is_favorites() ) :?>current<?php endif; ?>">
<span class="bbp-user-favorites-link">
<a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Favorites', 'bbpress' ); ?></a>
</span>
</li>
<?php endif; ?>
<?php if ( bbp_is_user_home() || current_user_can( 'edit_user', bbp_get_displayed_user_id() ) ) : ?>
<?php if ( bbp_is_subscriptions_active() ) : ?>
<li class="<?php if ( bbp_is_subscriptions() ) :?>current<?php endif; ?>">
<span class="bbp-user-subscriptions-link">
<a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Subscriptions', 'bbpress' ); ?></a>
</span>
</li>
<?php endif; ?>
<li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>">
<span class="bbp-user-edit-link">
<a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php esc_html_e( 'Edit', 'bbpress' ); ?></a>
</span>
</li>
<?php endif; ?>
</ul>
<?php do_action( 'bbp_template_after_user_details_menu_items' ); ?>
</div>
</div>
<?php do_action( 'bbp_template_after_user_details' );

View File

@@ -0,0 +1,39 @@
<?php
/**
* User Engagements
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_engagements' ); ?>
<div id="bbp-user-engagements" class="bbp-user-engagements">
<?php bbp_get_template_part( 'form', 'topic-search' ); ?>
<h2 class="entry-title"><?php esc_html_e( 'Topics Engaged In', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_engagements() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
</div>
</div><!-- #bbp-user-engagements -->
<?php do_action( 'bbp_template_after_user_engagements' );

View File

@@ -0,0 +1,39 @@
<?php
/**
* User Favorites
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_favorites' ); ?>
<div id="bbp-user-favorites" class="bbp-user-favorites">
<?php bbp_get_template_part( 'form', 'topic-search' ); ?>
<h2 class="entry-title"><?php esc_html_e( 'Favorite Forum Topics', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_favorites() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
</div>
</div><!-- #bbp-user-favorites -->
<?php do_action( 'bbp_template_after_user_favorites' );

View File

@@ -0,0 +1,48 @@
<?php
/**
* User Profile
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_profile' ); ?>
<div id="bbp-user-profile" class="bbp-user-profile">
<h2 class="entry-title">@<?php bbp_displayed_user_field( 'user_nicename' ); ?></h2>
<div class="bbp-user-section">
<h3><?php esc_html_e( 'Profile', 'bbpress' ); ?></h3>
<p class="bbp-user-forum-role"><?php printf( esc_html__( 'Registered: %s', 'bbpress' ), bbp_get_time_since( bbp_get_displayed_user_field( 'user_registered' ) ) ); ?></p>
<?php if ( bbp_get_displayed_user_field( 'description' ) ) : ?>
<p class="bbp-user-description"><?php echo bbp_rel_nofollow( bbp_get_displayed_user_field( 'description' ) ); ?></p>
<?php endif; ?>
<?php if ( bbp_get_displayed_user_field( 'user_url' ) ) : ?>
<p class="bbp-user-website"><?php printf( esc_html__( 'Website: %s', 'bbpress' ), bbp_rel_nofollow( bbp_make_clickable( bbp_get_displayed_user_field( 'user_url' ) ) ) ); ?></p>
<?php endif; ?>
<hr>
<h3><?php esc_html_e( 'Forums', 'bbpress' ); ?></h3>
<?php if ( bbp_get_user_last_posted() ) : ?>
<p class="bbp-user-last-activity"><?php printf( esc_html__( 'Last Activity: %s', 'bbpress' ), bbp_get_time_since( bbp_get_user_last_posted(), false, true ) ); ?></p>
<?php endif; ?>
<p class="bbp-user-topic-count"><?php printf( esc_html__( 'Topics Started: %s', 'bbpress' ), bbp_get_user_topic_count() ); ?></p>
<p class="bbp-user-reply-count"><?php printf( esc_html__( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count() ); ?></p>
<p class="bbp-user-forum-role"><?php printf( esc_html__( 'Forum Role: %s', 'bbpress' ), bbp_get_user_display_role() ); ?></p>
</div>
</div><!-- #bbp-author-topics-started -->
<?php do_action( 'bbp_template_after_user_profile' );

View File

@@ -0,0 +1,39 @@
<?php
/**
* User Replies Created
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_replies' ); ?>
<div id="bbp-user-replies-created" class="bbp-user-replies-created">
<?php bbp_get_template_part( 'form', 'reply-search' ); ?>
<h2 class="entry-title"><?php esc_html_e( 'Forum Replies Created', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_replies_created() ) : ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php bbp_get_template_part( 'loop', 'replies' ); ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-replies' ); ?>
<?php endif; ?>
</div>
</div><!-- #bbp-user-replies-created -->
<?php do_action( 'bbp_template_after_user_replies' );

View File

@@ -0,0 +1,62 @@
<?php
/**
* User Subscriptions
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_subscriptions' ); ?>
<?php if ( bbp_is_subscriptions_active() ) : ?>
<?php if ( bbp_is_user_home() || current_user_can( 'edit_user', bbp_get_displayed_user_id() ) ) : ?>
<div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
<?php bbp_get_template_part( 'form', 'topic-search' ); ?>
<h2 class="entry-title"><?php esc_html_e( 'Subscribed Forums', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_forum_subscriptions() ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
<?php endif; ?>
</div>
<h2 class="entry-title"><?php esc_html_e( 'Subscribed Topics', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_topic_subscriptions() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
</div>
</div><!-- #bbp-user-subscriptions -->
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_user_subscriptions' );

View File

@@ -0,0 +1,39 @@
<?php
/**
* User Topics Created
*
* @package bbPress
* @subpackage Theme
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
do_action( 'bbp_template_before_user_topics_created' ); ?>
<div id="bbp-user-topics-started" class="bbp-user-topics-started">
<?php bbp_get_template_part( 'form', 'topic-search' ); ?>
<h2 class="entry-title"><?php esc_html_e( 'Forum Topics Started', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php if ( bbp_get_user_topics_started() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
</div>
</div><!-- #bbp-user-topics-started -->
<?php do_action( 'bbp_template_after_user_topics_created' );

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,28 @@
<?php
/**
* bbPress - Forum Archive
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div id="forum-front" class="bbp-forum-front">
<h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
</div>
</div><!-- #forum-front -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,28 @@
<?php
/**
* bbPress - Topic Archive
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div id="topic-front" class="bbp-topics-front">
<h1 class="entry-title"><?php bbp_topic_archive_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
</div>
</div><!-- #topics-front -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template Name: bbPress - Create Topic
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-new-topic" class="bbp-new-topic">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<?php bbp_get_template_part( 'form', 'topic' ); ?>
</div>
</div><!-- #bbp-new-topic -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,58 @@
<?php
/**
* Template Name: bbPress - Statistics
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-statistics" class="bbp-statistics">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php get_the_content() ? the_content() : wpautop( esc_html__( 'Here are the statistics and popular topics of our forums.', 'bbpress' ) ); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_get_template_part( 'content', 'statistics' ); ?>
<?php do_action( 'bbp_before_popular_topics' ); ?>
<?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
<?php if ( bbp_view_query( 'popular' ) ) : ?>
<h2 class="entry-title"><?php esc_html_e( 'Popular Topics', 'bbpress' ); ?></h2>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php endif; ?>
<?php bbp_reset_query_name(); ?>
<?php do_action( 'bbp_after_popular_topics' ); ?>
</div>
</div>
</div><!-- #bbp-statistics -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template Name: bbPress - Forums (Index)
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="forum-front" class="bbp-forum-front">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>
</div>
</div><!-- #forum-front -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,34 @@
<?php
/**
* Template Name: bbPress - Topics (Newest)
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="topics-front" class="bbp-topics-front">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
</div>
</div><!-- #topics-front -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,42 @@
<?php
/**
* Template Name: bbPress - Topic Tags
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-topic-tags" class="bbp-topic-tags">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php get_the_content() ? the_content() : wpautop( esc_html__( 'This is a collection of tags that are currently popular on our forums.', 'bbpress' ) ); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<div id="bbp-topic-hot-tags">
<?php wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>
</div>
</div>
</div>
</div><!-- #bbp-topic-tags -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,55 @@
<?php
/**
* Template Name: bbPress - Topics (No Replies)
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="topics-front" class="bbp-topics-front">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_set_query_name( 'bbp_no_replies' ); ?>
<?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'meta_value' => '1', 'meta_type' => 'NUMERIC', 'meta_compare' => '<', 'orderby' => 'date', 'show_stickies' => false ) ) ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-topics' ); ?>
<?php endif; ?>
<?php bbp_reset_query_name(); ?>
</div>
</div>
</div><!-- #topics-front -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,43 @@
<?php
/**
* Template Name: bbPress - User Login
*
* @package bbPress
* @subpackage Theme
*/
// No logged in users
bbp_logged_in_redirect();
// Begin Template
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-login" class="bbp-login">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_get_template_part( 'form', 'user-login' ); ?>
</div>
</div>
</div><!-- #bbp-login -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,43 @@
<?php
/**
* Template Name: bbPress - User Lost Password
*
* @package bbPress
* @subpackage Theme
*/
// No logged in users
bbp_logged_in_redirect();
// Begin Template
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-lost-pass" class="bbp-lost-pass">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_get_template_part( 'form', 'user-lost-pass' ); ?>
</div>
</div>
</div><!-- #bbp-lost-pass -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,43 @@
<?php
/**
* Template Name: bbPress - User Register
*
* @package bbPress
* @subpackage Theme
*/
// No logged in users
bbp_logged_in_redirect();
// Begin Template
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-register" class="bbp-register">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<div id="bbpress-forums" class="bbpress-wrapper">
<?php bbp_breadcrumb(); ?>
<?php bbp_get_template_part( 'form', 'user-register' ); ?>
</div>
</div>
</div><!-- #bbp-register -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,30 @@
<?php
/**
* Edit handler for forums
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'forum' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,40 @@
<?php
/**
* Single Forum
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( bbp_user_can_view_forum() ) : ?>
<div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-content">
<h1 class="entry-title"><?php bbp_forum_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-forum' ); ?>
</div>
</div><!-- #forum-<?php bbp_forum_id(); ?> -->
<?php else : // Forum exists, user no access ?>
<?php bbp_get_template_part( 'feedback', 'no-access' ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,30 @@
<?php
/**
* Edit handler for replies
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'reply' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,32 @@
<?php
/**
* Move reply page
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'reply-move' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,40 @@
<?php
/**
* Single Reply
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_reply_forum_id() ) ) ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-reply-wrapper-<?php bbp_reply_id(); ?>" class="bbp-reply-wrapper">
<h1 class="entry-title"><?php bbp_reply_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-reply' ); ?>
</div><!-- .entry-content -->
</div><!-- #bbp-reply-wrapper-<?php bbp_reply_id(); ?> -->
<?php endwhile; ?>
<?php elseif ( bbp_is_forum_private( bbp_get_reply_forum_id(), false ) ) : ?>
<?php bbp_get_template_part( 'feedback', 'no-access' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,30 @@
<?php
/**
* Edit handler for topics
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'topic' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,32 @@
<?php
/**
* Merge topic page
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'topic-merge' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,32 @@
<?php
/**
* Split topic page
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-edit-page" class="bbp-edit-page">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'form', 'topic-split' ); ?>
</div>
</div><!-- #bbp-edit-page -->
<?php endwhile; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,40 @@
<?php
/**
* Single Topic
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="bbp-topic-wrapper-<?php bbp_topic_id(); ?>" class="bbp-topic-wrapper">
<h1 class="entry-title"><?php bbp_topic_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-topic' ); ?>
</div>
</div><!-- #bbp-topic-wrapper-<?php bbp_topic_id(); ?> -->
<?php endwhile; ?>
<?php elseif ( bbp_is_forum_private( bbp_get_topic_forum_id(), false ) ) : ?>
<?php bbp_get_template_part( 'feedback', 'no-access' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,25 @@
<?php
/**
* bbPress User Profile Edit
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<div id="bbp-user-<?php bbp_current_user_id(); ?>" class="bbp-single-user">
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-user' ); ?>
</div><!-- .entry-content -->
</div><!-- #bbp-user-<?php bbp_current_user_id(); ?> -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,25 @@
<?php
/**
* Single User
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<div id="bbp-user-<?php bbp_current_user_id(); ?>" class="bbp-single-user">
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-user' ); ?>
</div><!-- .entry-content -->
</div><!-- #bbp-user-<?php bbp_current_user_id(); ?> -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,28 @@
<?php
/**
* Single View
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div id="bbp-view-<?php bbp_view_id(); ?>" class="bbp-view">
<h1 class="entry-title"><?php bbp_view_title(); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'single-view' ); ?>
</div>
</div><!-- #bbp-view-<?php bbp_view_id(); ?> -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,29 @@
<?php
/**
* Topic Tag Edit
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div id="topic-tag" class="bbp-topic-tag">
<h1 class="entry-title"><?php printf( esc_html__( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'topic-tag-edit' ); ?>
</div>
</div><!-- #topic-tag -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,28 @@
<?php
/**
* Topic Tag
*
* @package bbPress
* @subpackage Theme
*/
get_header(); ?>
<?php do_action( 'bbp_before_main_content' ); ?>
<?php do_action( 'bbp_template_notices' ); ?>
<div id="topic-tag" class="bbp-topic-tag">
<h1 class="entry-title"><?php printf( esc_html__( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1>
<div class="entry-content">
<?php bbp_get_template_part( 'content', 'archive-topic' ); ?>
</div>
</div><!-- #topic-tag -->
<?php do_action( 'bbp_after_main_content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer();

View File

@@ -0,0 +1,53 @@
/* global edButtons, QTags, tinymce */
jQuery(document).ready( function() {
/* Use backticks instead of <code> for the Code button in the editor */
if ( typeof( edButtons ) !== 'undefined' ) {
edButtons[110] = new QTags.TagButton( 'code', 'code', '`', '`', 'c' );
QTags._buttonsInit();
}
/* Tab from topic title */
jQuery( '#bbp_topic_title' ).bind( 'keydown.editor-focus', function(e) {
if ( e.which !== 9 ) {
return;
}
if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
if ( typeof( tinymce ) !== 'undefined' ) {
if ( ! tinymce.activeEditor.isHidden() ) {
var editor = tinymce.activeEditor.editorContainer;
jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
} else {
jQuery( 'textarea.bbp-the-content' ).focus();
}
} else {
jQuery( 'textarea.bbp-the-content' ).focus();
}
e.preventDefault();
}
});
/* Shift + tab from topic tags */
jQuery( '#bbp_topic_tags' ).bind( 'keydown.editor-focus', function(e) {
if ( e.which !== 9 ) {
return;
}
if ( e.shiftKey && !e.ctrlKey && !e.altKey ) {
if ( typeof( tinymce ) !== 'undefined' ) {
if ( ! tinymce.activeEditor.isHidden() ) {
var editor = tinymce.activeEditor.editorContainer;
jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
} else {
jQuery( 'textarea.bbp-the-content' ).focus();
}
} else {
jQuery( 'textarea.bbp-the-content' ).focus();
}
e.preventDefault();
}
});
});

View File

@@ -0,0 +1,3 @@
/*! This file is automatically generated. */
jQuery(document).ready(function(){"undefined"!=typeof edButtons&&(edButtons[110]=new QTags.TagButton("code","code","`","`","c"),QTags._buttonsInit()),jQuery("#bbp_topic_title").bind("keydown.editor-focus",function(e){if(9===e.which&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){if("undefined"!=typeof tinymce)if(tinymce.activeEditor.isHidden())jQuery("textarea.bbp-the-content").focus();else{var t=tinymce.activeEditor.editorContainer;jQuery("#"+t+" td.mceToolbar > a").focus()}else jQuery("textarea.bbp-the-content").focus();e.preventDefault()}}),jQuery("#bbp_topic_tags").bind("keydown.editor-focus",function(e){if(9===e.which&&e.shiftKey&&!e.ctrlKey&&!e.altKey){if("undefined"!=typeof tinymce)if(tinymce.activeEditor.isHidden())jQuery("textarea.bbp-the-content").focus();else{var t=tinymce.activeEditor.editorContainer;jQuery("#"+t+" td.mceToolbar > a").focus()}else jQuery("textarea.bbp-the-content").focus();e.preventDefault()}})});

View File

@@ -0,0 +1,62 @@
/* global bbpEngagementJS */
jQuery( document ).ready( function ( $ ) {
function bbp_ajax_call( action, object, type, nonce, update_selector ) {
var $data = {
action : action,
id : object,
type : type,
nonce : nonce
};
$.post( bbpEngagementJS.bbp_ajaxurl, $data, function ( response ) {
if ( response.success ) {
$( update_selector ).html( response.content );
} else {
if ( !response.content ) {
response.content = bbpEngagementJS.generic_ajax_error;
}
window.alert( response.content );
}
} );
}
$( '#favorite-toggle' ).on( 'click', 'span a.favorite-toggle', function( e ) {
e.preventDefault();
bbp_ajax_call(
'favorite',
$( this ).data( 'bbp-object-id' ),
$( this ).data( 'bbp-object-type' ),
$( this ).data( 'bbp-nonce' ),
'#favorite-toggle'
);
} );
$( '#subscription-toggle' ).on( 'click', 'span a.subscription-toggle', function( e ) {
e.preventDefault();
bbp_ajax_call(
'subscription',
$( this ).data( 'bbp-object-id' ),
$( this ).data( 'bbp-object-type' ),
$( this ).data( 'bbp-nonce' ),
'#subscription-toggle'
);
} );
$( '.bbp-alert-outer' ).on( 'click', '.bbp-alert-close', function( e ) {
e.preventDefault();
$( this ).closest( '.bbp-alert-outer' ).fadeOut();
} );
$( '.bbp-alert-outer' ).on( 'click', function( e ) {
if ( this === e.target ) {
$( this ).closest( '.bbp-alert-outer' ).fadeOut();
}
} );
$( document ).keyup( function( e ) {
if ( e.keyCode === 27 ) {
$( '.bbp-alert-outer .bbp-alert-close' ).click();
}
} );
} );

View File

@@ -0,0 +1,3 @@
/*! This file is automatically generated. */
jQuery(document).ready(function(t){function e(e,o,n,a,c){var b={action:e,id:o,type:n,nonce:a};t.post(bbpEngagementJS.bbp_ajaxurl,b,function(e){e.success?t(c).html(e.content):(e.content||(e.content=bbpEngagementJS.generic_ajax_error),window.alert(e.content))})}t("#favorite-toggle").on("click","span a.favorite-toggle",function(o){o.preventDefault(),e("favorite",t(this).data("bbp-object-id"),t(this).data("bbp-object-type"),t(this).data("bbp-nonce"),"#favorite-toggle")}),t("#subscription-toggle").on("click","span a.subscription-toggle",function(o){o.preventDefault(),e("subscription",t(this).data("bbp-object-id"),t(this).data("bbp-object-type"),t(this).data("bbp-nonce"),"#subscription-toggle")}),t(".bbp-alert-outer").on("click",".bbp-alert-close",function(e){e.preventDefault(),t(this).closest(".bbp-alert-outer").fadeOut()}),t(".bbp-alert-outer").on("click",function(e){this===e.target&&t(this).closest(".bbp-alert-outer").fadeOut()}),t(document).keyup(function(e){27===e.keyCode&&t(".bbp-alert-outer .bbp-alert-close").click()})});

View File

@@ -0,0 +1,239 @@
/* globals tinyMCE */
addReply = {
/**
* Move the reply form when "Reply" is clicked.
*
* @since 2.6.2
* @param {string} replyId
* @param {string} parentId
* @param {string} respondId
* @param {string} postId
* @returns {undefined|Boolean}
*/
moveForm: function ( replyId, parentId, respondId, postId ) {
/* Get initial elements */
var t = this,
reply = t.getElement( replyId ),
respond = t.getElement( respondId ),
cancel = t.getElement( 'bbp-cancel-reply-to-link' ),
parent = t.getElement( 'bbp_reply_to' ),
post = t.getElement( 'bbp_topic_id' );
/* Remove the editor, if its already been moved */
t.removeEditor();
/* Allow click to go through */
if ( ! reply || ! respond || ! cancel || ! parent ) {
return;
}
t.respondId = respondId;
postId = postId || false;
/* Setup a temporary div for relocating back when clicking cancel */
if ( ! t.getElement( 'bbp-temp-form-div' ) ) {
var div = document.createElement( 'div' );
div.id = 'bbp-temp-form-div';
div.style.display = 'none';
respond.parentNode.appendChild( div );
}
/* Relocate the element */
reply.parentNode.appendChild( respond );
if ( post && postId ) {
post.value = postId;
}
parent.value = parentId;
cancel.style.display = '';
/* Add the editor where it now belongs */
t.addEditor();
/**
* When cancelling a Reply.
*
* @since 2.6.2
* @returns {void}
*/
cancel.onclick = function () {
t.cancelForm( this );
};
t.scrollToForm();
/* Prevent click from going through */
return false;
},
/**
* Cancel the reply form.
*
* @since 2.6.6
* @returns {void}
*/
cancelForm: function () {
var r = addReply,
temp = r.getElement( 'bbp-temp-form-div' ),
cancel = r.getElement( 'bbp-cancel-reply-to-link' ),
respond = r.getElement( r.respondId );
r.removeEditor();
/* Allow click to go through */
if ( ! temp || ! respond ) {
return;
}
r.getElement( 'bbp_reply_to' ).value = '0';
temp.parentNode.insertBefore( respond, temp );
temp.parentNode.removeChild( temp );
cancel.style.display = 'none';
cancel.onclick = null;
r.addEditor();
r.scrollToForm();
/* Prevent click from going through */
return false;
},
/**
* Scrolls to the top of the page.
*
* @since 2.6.2
* @return {void}
*/
scrollToForm: function() {
/* Get initial variables to start computing boundaries */
var t = this,
form = t.getElement( 'new-post' ),
elemRect = form.getBoundingClientRect(),
position = (window.pageYOffset || document.scrollTop) - (document.clientTop || 0),
destination = ( position + elemRect.top ),
negative = ( destination < position ), // jshint ignore:line
adminbar = t.getElement( 'wpadminbar'),
offset = 0;
/* Offset by the adminbar */
if ( adminbar && ( typeof ( adminbar ) !== 'undefined' ) ) {
offset = adminbar.scrollHeight;
}
/* Compute the difference, depending on direction */
/* jshint ignore:start */
distance = ( true === negative )
? ( position - destination )
: ( destination - position );
/* Do some math to compute the animation steps */
var vast = ( distance > 800 ),
speed_step = vast ? 30 : 20,
speed = Math.min( 12, Math.round( distance / speed_step ) ),
step = Math.round( distance / speed_step ),
steps = [],
timer = 0;
/* Scroll up */
if ( true === negative ) {
while ( position > destination ) {
position -= step;
if ( position < destination ) {
position = destination;
}
steps.push( position - offset );
setTimeout( function() {
window.scrollTo( 0, steps.shift() );
}, timer * speed );
timer++;
}
/* Scroll down */
} else {
while ( position < destination ) {
position += step;
if ( position > destination ) {
position = destination;
}
steps.push( position - offset );
setTimeout( function() {
window.scrollTo( 0, steps.shift() );
}, timer * speed );
timer++;
}
}
/* jshint ignore:end */
},
/**
* Get an element by ID
*
* @since 2.6.2
* @param {string} e
* @returns {HTMLElement} Element
*/
getElement: function (e) {
return document.getElementById(e);
},
/**
* Remove the Editor
*
* @since 2.6.2
* @returns {void}
*/
removeEditor: function () {
/* Bail to avoid error */
if ( typeof ( tinyMCE ) === 'undefined' ) {
return;
}
var tmce = tinyMCE.get( 'bbp_reply_content' );
if ( tmce && ! tmce.isHidden() ) {
this.mode = 'tmce';
tmce.remove();
} else {
this.mode = 'html';
}
},
/**
* Add the Editor
*
* @since 2.6.2
* @returns {void}
*/
addEditor: function () {
/* Bail to avoid error */
if ( typeof ( tinyMCE ) === 'undefined' ) {
return;
}
if ( 'tmce' === this.mode ) {
switchEditors.go( 'bbp_reply_content', 'tmce' );
} else if ( 'html' === this.mode ) {
switchEditors.go( 'bbp_reply_content', 'html' );
}
}
};

View File

@@ -0,0 +1,3 @@
/*! This file is automatically generated. */
addReply={moveForm:function(e,t,n,o){var i=this,d=i.getElement(e),l=i.getElement(n),r=i.getElement("bbp-cancel-reply-to-link"),m=i.getElement("bbp_reply_to"),c=i.getElement("bbp_topic_id");if(i.removeEditor(),d&&l&&r&&m){if(i.respondId=n,o=o||!1,!i.getElement("bbp-temp-form-div")){var p=document.createElement("div");p.id="bbp-temp-form-div",p.style.display="none",l.parentNode.appendChild(p)}return d.parentNode.appendChild(l),c&&o&&(c.value=o),m.value=t,r.style.display="",i.addEditor(),r.onclick=function(){i.cancelForm(this)},i.scrollToForm(),!1}},cancelForm:function(){var e=addReply,t=e.getElement("bbp-temp-form-div"),n=e.getElement("bbp-cancel-reply-to-link"),o=e.getElement(e.respondId);if(e.removeEditor(),t&&o)return e.getElement("bbp_reply_to").value="0",t.parentNode.insertBefore(o,t),t.parentNode.removeChild(t),n.style.display="none",n.onclick=null,e.addEditor(),e.scrollToForm(),!1},scrollToForm:function(){var e=this,t=e.getElement("new-post").getBoundingClientRect(),n=(window.pageYOffset||document.scrollTop)-(document.clientTop||0),o=n+t.top,i=o<n,d=e.getElement("wpadminbar"),l=0;d&&void 0!==d&&(l=d.scrollHeight),distance=!0===i?n-o:o-n;var r=distance>800?30:20,m=Math.min(12,Math.round(distance/r)),c=Math.round(distance/r),p=[],s=0;if(!0===i)for(;n>o;)(n-=c)<o&&(n=o),p.push(n-l),setTimeout(function(){window.scrollTo(0,p.shift())},s*m),s++;else for(;n<o;)(n+=c)>o&&(n=o),p.push(n-l),setTimeout(function(){window.scrollTo(0,p.shift())},s*m),s++},getElement:function(e){return document.getElementById(e)},removeEditor:function(){if("undefined"!=typeof tinyMCE){var e=tinyMCE.get("bbp_reply_content");e&&!e.isHidden()?(this.mode="tmce",e.remove()):this.mode="html"}},addEditor:function(){"undefined"!=typeof tinyMCE&&("tmce"===this.mode?switchEditors.go("bbp_reply_content","tmce"):"html"===this.mode&&switchEditors.go("bbp_reply_content","html"))}};