?> <?php if (bbp_show_lead_topic()) { ?> <?php bbp_get_template_part('bbpress/content', 'single-topic-lead'); ?> <?php } ?> <?php if (bbp_get_query_name() || bbp_has_replies()) { ?> <?php bbp_get_template_part('bbpress/pagination', 'replies'); ?> <?php bbp_get_template_part('bbpress/loop', 'replies'); ?> <?php bbp_get_template_part('bbpress/pagination', 'replies'); ?> <?php
/** * Check the passed parameter against the current _bbp_query_name * * @since bbPress (r2980) * * @uses bbp_get_query_name() Get the query var '_bbp_query_name' * @return bool True if match, false if not */ function bbp_is_query_name($name = '') { return (bool) (bbp_get_query_name() == $name); }
/** * Enqueue the required Javascript files * * @since bbPress (r3732) * * @uses bbp_is_single_forum() To check if it's the forum page * @uses bbp_is_single_topic() To check if it's the topic page * @uses bbp_thread_replies() To check if threaded replies are enabled * @uses bbp_is_single_user_edit() To check if it's the profile edit page * @uses wp_enqueue_script() To enqueue the scripts */ public function enqueue_scripts() { // Setup scripts array $scripts = array(); // Always pull in jQuery for TinyMCE shortcode usage if (bbp_use_wp_editor()) { error_log("og is single editor " . bbp_get_topic_post_type() . " query: " . bbp_get_query_name() . " is singular: " . is_singular(bbp_get_topic_post_type())); $scripts['bbpress-editor'] = array('file' => 'js/editor.js', 'dependencies' => array('jquery')); } // Forum-specific scripts if (bbp_is_single_forum() || bbp_use_wp_editor()) { error_log("og is single forum"); $scripts['bbpress-forum'] = array('file' => 'js/forum.js', 'dependencies' => array('jquery')); } // Topic-specific scripts if (bbp_is_single_topic() || bbp_use_wp_editor()) { // Topic favorite/unsubscribe $scripts['bbpress-topic'] = array('file' => 'js/topic.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()) { $scripts['bbpress-user'] = array('file' => 'js/user.js', 'dependencies' => array('user-query')); } // 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, 'screen'); } }