Version Description
- BuddyPress integration
- Multisite integration
- Fixed a bushel of bugs
- Fixed tag pagination again
- Fixed ajax priority loading
Download this release
Release Info
Developer | johnjamesjacoby |
Plugin | bbPress |
Version | 2.0-rc-2 |
Comparing to | |
See all releases |
Code changes from version 2.0-beta-3b to 2.0-rc-2
- bbp-admin/bbp-admin.php +76 -84
- bbp-admin/bbp-forums.php +10 -24
- bbp-admin/bbp-functions.php +28 -3
- bbp-admin/bbp-metaboxes.php +13 -15
- bbp-admin/bbp-replies.php +15 -29
- bbp-admin/bbp-settings.php +16 -0
- bbp-admin/bbp-topics.php +12 -26
- bbp-admin/bbp-users.php +8 -28
- bbp-admin/importers/bbpress.php +6 -6
- bbp-includes/bbp-common-functions.php +88 -23
- bbp-includes/bbp-common-template.php +275 -103
- bbp-includes/bbp-core-caps.php +92 -3
- bbp-includes/bbp-core-classes.php +13 -13
- bbp-includes/bbp-core-compatibility.php +141 -51
- bbp-includes/bbp-core-hooks.php +71 -51
- bbp-includes/bbp-core-options.php +17 -0
- bbp-includes/bbp-core-shortcodes.php +125 -101
- bbp-includes/bbp-core-widgets.php +61 -3
- bbp-includes/{bbp-core-akismet.php → bbp-extend-akismet.php} +9 -17
- bbp-includes/bbp-extend-buddypress.php +533 -0
- bbp-includes/bbp-forum-functions.php +71 -6
- bbp-includes/bbp-forum-template.php +22 -17
- bbp-includes/bbp-reply-functions.php +516 -414
- bbp-includes/bbp-reply-template.php +96 -78
- bbp-includes/bbp-topic-functions.php +969 -813
- bbp-includes/bbp-topic-template.php +244 -115
- bbp-includes/bbp-user-functions.php +264 -127
- bbp-includes/bbp-user-template.php +148 -54
- bbp-languages/bbpress.pot +2047 -1959
- bbp-themes/bbp-twentyten/bbpress/content-single-topic.php +0 -1
- bbp-themes/bbp-twentyten/bbpress/content-single-user-edit.php +0 -1
- bbp-themes/bbp-twentyten/bbpress/content-single-view.php +0 -1
- bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-anonymous.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-protected.php +0 -3
- bbp-themes/bbp-twentyten/bbpress/form-reply.php +78 -77
- bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php +2 -2
- bbp-themes/bbp-twentyten/bbpress/form-topic.php +5 -8
- bbp-themes/bbp-twentyten/bbpress/form-user-edit.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-user-login.php +2 -2
- bbp-themes/bbp-twentyten/bbpress/form-user-register.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/loop-topics.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/user-posts.php +0 -23
- bbp-themes/bbp-twentyten/css/bbpress-rtl.css +16 -3
- bbp-themes/bbp-twentyten/css/bbpress.css +24 -5
- bbp-themes/bbp-twentyten/functions.php +122 -112
- bbp-themes/bbp-twentyten/js/topic.js +26 -19
- bbp-themes/bbp-twentyten/page-create-topic.php +0 -2
- bbp-themes/bbp-twentyten/page-forum-statistics.php +4 -4
- bbp-themes/bbp-twentyten/page-topic-tags.php +1 -1
- bbp-themes/bbp-twentyten/single-forum.php +1 -1
- bbp-themes/bbp-twentyten/single-reply-edit.php +0 -1
- bbp-themes/bbp-twentyten/single-topic-merge.php +0 -1
- bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php +40 -0
- bbp-themes/bbp-twentyten/taxonomy-topic-tag.php +0 -2
- bbpress.php +218 -227
- readme.txt +15 -3
bbp-admin/bbp-admin.php
CHANGED
@@ -25,48 +25,35 @@ class BBP_Admin {
|
|
25 |
/**
|
26 |
* @var string URL to the bbPress images directory
|
27 |
*/
|
28 |
-
|
29 |
|
30 |
/**
|
31 |
* @var string URL to the bbPress admin styles directory
|
32 |
*/
|
33 |
-
|
34 |
|
35 |
/** URLs ******************************************************************/
|
36 |
|
37 |
/**
|
38 |
* @var bool Enable recounts in Tools area
|
39 |
*/
|
40 |
-
|
41 |
|
42 |
/** Functions *************************************************************/
|
43 |
|
44 |
-
/**
|
45 |
-
* The main bbPress admin loader (PHP4 compat)
|
46 |
-
*
|
47 |
-
* @since bbPress (r2515)
|
48 |
-
*
|
49 |
-
* @uses BBP_Admin::_setup_globals() Setup the globals needed
|
50 |
-
* @uses BBP_Admin::_includes() Include the required files
|
51 |
-
* @uses BBP_Admin::_setup_actions() Setup the hooks and actions
|
52 |
-
*/
|
53 |
-
function BBP_Admin() {
|
54 |
-
$this->__construct();
|
55 |
-
}
|
56 |
-
|
57 |
/**
|
58 |
* The main bbPress admin loader
|
59 |
*
|
60 |
* @since bbPress (r2515)
|
61 |
*
|
62 |
-
* @uses BBP_Admin::
|
63 |
-
* @uses BBP_Admin::
|
64 |
-
* @uses BBP_Admin::
|
65 |
*/
|
66 |
-
function __construct() {
|
67 |
-
$this->
|
68 |
-
$this->
|
69 |
-
$this->
|
70 |
}
|
71 |
|
72 |
/**
|
@@ -78,7 +65,7 @@ class BBP_Admin {
|
|
78 |
* @uses add_action() To add various actions
|
79 |
* @uses add_filter() To add various filters
|
80 |
*/
|
81 |
-
function
|
82 |
|
83 |
/** General Actions ***************************************************/
|
84 |
|
@@ -111,6 +98,9 @@ class BBP_Admin {
|
|
111 |
|
112 |
// Add link to settings page
|
113 |
add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 );
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
/**
|
@@ -119,7 +109,7 @@ class BBP_Admin {
|
|
119 |
* @since bbPress (r2646)
|
120 |
* @access private
|
121 |
*/
|
122 |
-
function
|
123 |
global $bbp;
|
124 |
|
125 |
// Files to include
|
@@ -139,7 +129,7 @@ class BBP_Admin {
|
|
139 |
* @since bbPress (r2646)
|
140 |
* @access private
|
141 |
*/
|
142 |
-
function
|
143 |
global $bbp;
|
144 |
|
145 |
// Admin url
|
@@ -161,7 +151,7 @@ class BBP_Admin {
|
|
161 |
* @uses add_options_page() To add the Forums settings page in Settings
|
162 |
* section
|
163 |
*/
|
164 |
-
function admin_menus() {
|
165 |
|
166 |
// Recounts
|
167 |
if ( is_super_admin() || !empty( $this->enable_recounts ) )
|
@@ -181,7 +171,7 @@ class BBP_Admin {
|
|
181 |
* @uses register_setting() To register various settings
|
182 |
* @uses do_action() Calls 'bbp_register_admin_settings'
|
183 |
*/
|
184 |
-
function register_admin_settings() {
|
185 |
|
186 |
/** Main Section ******************************************************/
|
187 |
|
@@ -208,30 +198,36 @@ class BBP_Admin {
|
|
208 |
add_settings_field( '_bbp_allow_anonymous', __( 'Allow Anonymous Posting', 'bbpress' ), 'bbp_admin_setting_callback_anonymous', 'bbpress', 'bbp_main' );
|
209 |
register_setting ( 'bbpress', '_bbp_allow_anonymous', 'intval' );
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
/** Per Page Section **************************************************/
|
212 |
|
213 |
// Add the per page section
|
214 |
-
add_settings_section( 'bbp_per_page', __( 'Per Page',
|
215 |
|
216 |
// Topics per page setting
|
217 |
-
add_settings_field( '_bbp_topics_per_page', __( 'Topics
|
218 |
register_setting ( 'bbpress', '_bbp_topics_per_page', 'intval' );
|
219 |
|
220 |
// Replies per page setting
|
221 |
-
add_settings_field( '_bbp_replies_per_page', __( 'Replies
|
222 |
register_setting ( 'bbpress', '_bbp_replies_per_page', 'intval' );
|
223 |
|
224 |
/** Per RSS Page Section **********************************************/
|
225 |
|
226 |
// Add the per page section
|
227 |
-
add_settings_section( 'bbp_per_rss_page', __( 'Per RSS Page',
|
228 |
|
229 |
// Topics per page setting
|
230 |
-
add_settings_field( '_bbp_topics_per_page', __( 'Topics
|
231 |
register_setting ( 'bbpress', '_bbp_topics_per_rss_page', 'intval' );
|
232 |
|
233 |
// Replies per page setting
|
234 |
-
add_settings_field( '_bbp_replies_per_page', __( 'Replies
|
235 |
register_setting ( 'bbpress', '_bbp_replies_per_rss_page', 'intval' );
|
236 |
|
237 |
/** Front Slugs *******************************************************/
|
@@ -240,11 +236,11 @@ class BBP_Admin {
|
|
240 |
add_settings_section( 'bbp_root_slug', __( 'Archive Slugs', 'bbpress' ), 'bbp_admin_setting_callback_root_slug_section', 'bbpress' );
|
241 |
|
242 |
// Root slug setting
|
243 |
-
add_settings_field ( '_bbp_root_slug', __( 'Forums
|
244 |
register_setting ( 'bbpress', '_bbp_root_slug', 'esc_sql' );
|
245 |
|
246 |
// Topic archive setting
|
247 |
-
add_settings_field ( '_bbp_topic_archive_slug', __( 'Topics
|
248 |
register_setting ( 'bbpress', '_bbp_topic_archive_slug', 'esc_sql' );
|
249 |
|
250 |
/** Single slugs ******************************************************/
|
@@ -284,45 +280,44 @@ class BBP_Admin {
|
|
284 |
|
285 |
do_action( 'bbp_register_admin_settings' );
|
286 |
}
|
287 |
-
/**
|
288 |
-
* Register the importers
|
289 |
-
*
|
290 |
-
* @todo Make this better
|
291 |
-
*
|
292 |
-
* @since bbPress (r2737)
|
293 |
-
*
|
294 |
-
* @uses do_action() Calls 'bbp_register_importers'
|
295 |
-
*/
|
296 |
-
function register_importers() {
|
297 |
-
|
298 |
-
// Leave if we're not in the import section
|
299 |
-
if ( !defined( 'WP_LOAD_IMPORTERS' ) )
|
300 |
-
return;
|
301 |
-
|
302 |
-
global $bbp;
|
303 |
-
|
304 |
-
// Load Importer API
|
305 |
-
require_once( ABSPATH . 'wp-admin/includes/import.php' );
|
306 |
-
|
307 |
-
// Load our importers
|
308 |
-
// The logic here needs to be improved upon
|
309 |
-
$importers = apply_filters( 'bbp_importers', array( 'bbpress' ) );
|
310 |
-
|
311 |
-
// Loop through included importers
|
312 |
-
foreach ( $importers as $importer ) {
|
313 |
-
|
314 |
-
// Compile the importer path
|
315 |
-
$import_file = $bbp->plugin_dir . 'bbp-admin/importers/' . $importer . '.php';
|
316 |
-
|
317 |
-
// If the file exists, include it
|
318 |
-
if ( file_exists( $import_file ) )
|
319 |
-
require( $import_file );
|
320 |
-
}
|
321 |
|
322 |
-
|
323 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
|
|
|
|
|
|
|
|
|
326 |
/**
|
327 |
* Admin area activation notice
|
328 |
*
|
@@ -335,7 +330,7 @@ class BBP_Admin {
|
|
335 |
* @uses current_user_can() To check notice should be displayed.
|
336 |
* @uses current_theme_supports() To check theme for bbPress support
|
337 |
*/
|
338 |
-
function activation_notice() {
|
339 |
global $bbp, $pagenow;
|
340 |
|
341 |
// Bail if not on admin theme page
|
@@ -347,13 +342,13 @@ class BBP_Admin {
|
|
347 |
return;
|
348 |
|
349 |
// Set $bbp->theme_compat to true to bypass nag
|
350 |
-
if ( !empty( $bbp->theme_compat->theme ) && !current_theme_supports( 'bbpress' ) )
|
351 |
|
352 |
<div id="message" class="updated fade">
|
353 |
-
<p style="line-height: 150%"><?php printf( __( "
|
354 |
</div>
|
355 |
|
356 |
-
<?php
|
357 |
}
|
358 |
|
359 |
/**
|
@@ -365,7 +360,7 @@ class BBP_Admin {
|
|
365 |
* @param string $file Current plugin basename
|
366 |
* @return array Processed links
|
367 |
*/
|
368 |
-
function add_settings_link( $links, $file ) {
|
369 |
global $bbp;
|
370 |
|
371 |
if ( plugin_basename( $bbp->file ) == $file ) {
|
@@ -383,7 +378,7 @@ class BBP_Admin {
|
|
383 |
*
|
384 |
* @uses do_action() Calls 'bbp_admin_init'
|
385 |
*/
|
386 |
-
function init() {
|
387 |
do_action( 'bbp_admin_init' );
|
388 |
}
|
389 |
|
@@ -394,7 +389,7 @@ class BBP_Admin {
|
|
394 |
*
|
395 |
* @uses wp_add_dashboard_widget() To add the dashboard widget
|
396 |
*/
|
397 |
-
function dashboard_widget_right_now() {
|
398 |
wp_add_dashboard_widget( 'bbp-dashboard-right-now', __( 'Right Now in Forums', 'bbpress' ), 'bbp_dashboard_widget_right_now' );
|
399 |
}
|
400 |
|
@@ -407,12 +402,9 @@ class BBP_Admin {
|
|
407 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
408 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
409 |
* @uses sanitize_html_class() To sanitize the classes
|
410 |
-
* @uses bbp_is_forum() To check if it is a forum page
|
411 |
-
* @uses bbp_is_topic() To check if it is a topic page
|
412 |
-
* @uses bbp_is_reply() To check if it is a reply page
|
413 |
* @uses do_action() Calls 'bbp_admin_head'
|
414 |
*/
|
415 |
-
function admin_head() {
|
416 |
|
417 |
// Icons for top level admin menus
|
418 |
$menu_icon_url = $this->images_url . 'menu.png';
|
@@ -641,7 +633,7 @@ class BBP_Admin {
|
|
641 |
*
|
642 |
* @uses wp_admin_css_color() To register the color scheme
|
643 |
*/
|
644 |
-
function register_admin_style () {
|
645 |
wp_admin_css_color( 'bbpress', __( 'Green', 'bbpress' ), $this->styles_url . 'admin.css', array( '#222222', '#006600', '#deece1', '#6eb469' ) );
|
646 |
}
|
647 |
}
|
25 |
/**
|
26 |
* @var string URL to the bbPress images directory
|
27 |
*/
|
28 |
+
public $images_url = '';
|
29 |
|
30 |
/**
|
31 |
* @var string URL to the bbPress admin styles directory
|
32 |
*/
|
33 |
+
public $styles_url = '';
|
34 |
|
35 |
/** URLs ******************************************************************/
|
36 |
|
37 |
/**
|
38 |
* @var bool Enable recounts in Tools area
|
39 |
*/
|
40 |
+
public $enable_recounts = false;
|
41 |
|
42 |
/** Functions *************************************************************/
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* The main bbPress admin loader
|
46 |
*
|
47 |
* @since bbPress (r2515)
|
48 |
*
|
49 |
+
* @uses BBP_Admin::setup_globals() Setup the globals needed
|
50 |
+
* @uses BBP_Admin::includes() Include the required files
|
51 |
+
* @uses BBP_Admin::setup_actions() Setup the hooks and actions
|
52 |
*/
|
53 |
+
public function __construct() {
|
54 |
+
$this->setup_globals();
|
55 |
+
$this->includes();
|
56 |
+
$this->setup_actions();
|
57 |
}
|
58 |
|
59 |
/**
|
65 |
* @uses add_action() To add various actions
|
66 |
* @uses add_filter() To add various filters
|
67 |
*/
|
68 |
+
private function setup_actions() {
|
69 |
|
70 |
/** General Actions ***************************************************/
|
71 |
|
98 |
|
99 |
// Add link to settings page
|
100 |
add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 10, 2 );
|
101 |
+
|
102 |
+
// Add sample permalink filter
|
103 |
+
add_filter( 'post_type_link', 'bbp_filter_sample_permalink', 10, 4 );
|
104 |
}
|
105 |
|
106 |
/**
|
109 |
* @since bbPress (r2646)
|
110 |
* @access private
|
111 |
*/
|
112 |
+
private function includes() {
|
113 |
global $bbp;
|
114 |
|
115 |
// Files to include
|
129 |
* @since bbPress (r2646)
|
130 |
* @access private
|
131 |
*/
|
132 |
+
private function setup_globals() {
|
133 |
global $bbp;
|
134 |
|
135 |
// Admin url
|
151 |
* @uses add_options_page() To add the Forums settings page in Settings
|
152 |
* section
|
153 |
*/
|
154 |
+
public function admin_menus() {
|
155 |
|
156 |
// Recounts
|
157 |
if ( is_super_admin() || !empty( $this->enable_recounts ) )
|
171 |
* @uses register_setting() To register various settings
|
172 |
* @uses do_action() Calls 'bbp_register_admin_settings'
|
173 |
*/
|
174 |
+
public function register_admin_settings() {
|
175 |
|
176 |
/** Main Section ******************************************************/
|
177 |
|
198 |
add_settings_field( '_bbp_allow_anonymous', __( 'Allow Anonymous Posting', 'bbpress' ), 'bbp_admin_setting_callback_anonymous', 'bbpress', 'bbp_main' );
|
199 |
register_setting ( 'bbpress', '_bbp_allow_anonymous', 'intval' );
|
200 |
|
201 |
+
// Allow global access setting
|
202 |
+
if ( is_multisite() ) {
|
203 |
+
add_settings_field( '_bbp_allow_global_access', __( 'Allow Global Access', 'bbpress' ), 'bbp_admin_setting_callback_global_access', 'bbpress', 'bbp_main' );
|
204 |
+
register_setting ( 'bbpress', '_bbp_allow_global_access', 'intval' );
|
205 |
+
}
|
206 |
+
|
207 |
/** Per Page Section **************************************************/
|
208 |
|
209 |
// Add the per page section
|
210 |
+
add_settings_section( 'bbp_per_page', __( 'Per Page', 'bbpress' ), 'bbp_admin_setting_callback_per_page_section', 'bbpress' );
|
211 |
|
212 |
// Topics per page setting
|
213 |
+
add_settings_field( '_bbp_topics_per_page', __( 'Topics', 'bbpress' ), 'bbp_admin_setting_callback_topics_per_page', 'bbpress', 'bbp_per_page' );
|
214 |
register_setting ( 'bbpress', '_bbp_topics_per_page', 'intval' );
|
215 |
|
216 |
// Replies per page setting
|
217 |
+
add_settings_field( '_bbp_replies_per_page', __( 'Replies', 'bbpress' ), 'bbp_admin_setting_callback_replies_per_page', 'bbpress', 'bbp_per_page' );
|
218 |
register_setting ( 'bbpress', '_bbp_replies_per_page', 'intval' );
|
219 |
|
220 |
/** Per RSS Page Section **********************************************/
|
221 |
|
222 |
// Add the per page section
|
223 |
+
add_settings_section( 'bbp_per_rss_page', __( 'Per RSS Page', 'bbpress' ), 'bbp_admin_setting_callback_per_rss_page_section', 'bbpress' );
|
224 |
|
225 |
// Topics per page setting
|
226 |
+
add_settings_field( '_bbp_topics_per_page', __( 'Topics', 'bbpress' ), 'bbp_admin_setting_callback_topics_per_rss_page', 'bbpress', 'bbp_per_rss_page' );
|
227 |
register_setting ( 'bbpress', '_bbp_topics_per_rss_page', 'intval' );
|
228 |
|
229 |
// Replies per page setting
|
230 |
+
add_settings_field( '_bbp_replies_per_page', __( 'Replies', 'bbpress' ), 'bbp_admin_setting_callback_replies_per_rss_page', 'bbpress', 'bbp_per_rss_page' );
|
231 |
register_setting ( 'bbpress', '_bbp_replies_per_rss_page', 'intval' );
|
232 |
|
233 |
/** Front Slugs *******************************************************/
|
236 |
add_settings_section( 'bbp_root_slug', __( 'Archive Slugs', 'bbpress' ), 'bbp_admin_setting_callback_root_slug_section', 'bbpress' );
|
237 |
|
238 |
// Root slug setting
|
239 |
+
add_settings_field ( '_bbp_root_slug', __( 'Forums base', 'bbpress' ), 'bbp_admin_setting_callback_root_slug', 'bbpress', 'bbp_root_slug' );
|
240 |
register_setting ( 'bbpress', '_bbp_root_slug', 'esc_sql' );
|
241 |
|
242 |
// Topic archive setting
|
243 |
+
add_settings_field ( '_bbp_topic_archive_slug', __( 'Topics base', 'bbpress' ), 'bbp_admin_setting_callback_topic_archive_slug', 'bbpress', 'bbp_root_slug' );
|
244 |
register_setting ( 'bbpress', '_bbp_topic_archive_slug', 'esc_sql' );
|
245 |
|
246 |
/** Single slugs ******************************************************/
|
280 |
|
281 |
do_action( 'bbp_register_admin_settings' );
|
282 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
|
284 |
+
/**
|
285 |
+
* Register the importers
|
286 |
+
*
|
287 |
+
* @since bbPress (r2737)
|
288 |
+
*
|
289 |
+
* @uses do_action() Calls 'bbp_register_importers'
|
290 |
+
*/
|
291 |
+
public function register_importers() {
|
292 |
+
|
293 |
+
// Leave if we're not in the import section
|
294 |
+
if ( !defined( 'WP_LOAD_IMPORTERS' ) )
|
295 |
+
return;
|
296 |
+
|
297 |
+
global $bbp;
|
298 |
+
|
299 |
+
// Load Importer API
|
300 |
+
require_once( ABSPATH . 'wp-admin/includes/import.php' );
|
301 |
+
|
302 |
+
// Load our importers
|
303 |
+
$importers = apply_filters( 'bbp_importers', array( 'bbpress' ) );
|
304 |
+
|
305 |
+
// Loop through included importers
|
306 |
+
foreach ( $importers as $importer ) {
|
307 |
+
|
308 |
+
// Compile the importer path
|
309 |
+
$import_file = $bbp->plugin_dir . 'bbp-admin/importers/' . $importer . '.php';
|
310 |
+
|
311 |
+
// If the file exists, include it
|
312 |
+
if ( file_exists( $import_file ) ) {
|
313 |
+
require( $import_file );
|
314 |
+
}
|
315 |
}
|
316 |
|
317 |
+
// Don't do anything we wouldn't do
|
318 |
+
do_action( 'bbp_register_importers' );
|
319 |
+
}
|
320 |
+
|
321 |
/**
|
322 |
* Admin area activation notice
|
323 |
*
|
330 |
* @uses current_user_can() To check notice should be displayed.
|
331 |
* @uses current_theme_supports() To check theme for bbPress support
|
332 |
*/
|
333 |
+
public function activation_notice() {
|
334 |
global $bbp, $pagenow;
|
335 |
|
336 |
// Bail if not on admin theme page
|
342 |
return;
|
343 |
|
344 |
// Set $bbp->theme_compat to true to bypass nag
|
345 |
+
if ( !empty( $bbp->theme_compat->theme ) && !current_theme_supports( 'bbpress' ) ) : ?>
|
346 |
|
347 |
<div id="message" class="updated fade">
|
348 |
+
<p style="line-height: 150%"><?php printf( __( "Your active theme does not include bbPress template files. Your forums are using the default styling included with bbPress.", 'bbpress' ), admin_url( 'themes.php' ), admin_url( 'theme-install.php?type=tag&s=bbpress&tab=search' ) ) ?></p>
|
349 |
</div>
|
350 |
|
351 |
+
<?php endif;
|
352 |
}
|
353 |
|
354 |
/**
|
360 |
* @param string $file Current plugin basename
|
361 |
* @return array Processed links
|
362 |
*/
|
363 |
+
public function add_settings_link( $links, $file ) {
|
364 |
global $bbp;
|
365 |
|
366 |
if ( plugin_basename( $bbp->file ) == $file ) {
|
378 |
*
|
379 |
* @uses do_action() Calls 'bbp_admin_init'
|
380 |
*/
|
381 |
+
public function init() {
|
382 |
do_action( 'bbp_admin_init' );
|
383 |
}
|
384 |
|
389 |
*
|
390 |
* @uses wp_add_dashboard_widget() To add the dashboard widget
|
391 |
*/
|
392 |
+
public function dashboard_widget_right_now() {
|
393 |
wp_add_dashboard_widget( 'bbp-dashboard-right-now', __( 'Right Now in Forums', 'bbpress' ), 'bbp_dashboard_widget_right_now' );
|
394 |
}
|
395 |
|
402 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
403 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
404 |
* @uses sanitize_html_class() To sanitize the classes
|
|
|
|
|
|
|
405 |
* @uses do_action() Calls 'bbp_admin_head'
|
406 |
*/
|
407 |
+
public function admin_head() {
|
408 |
|
409 |
// Icons for top level admin menus
|
410 |
$menu_icon_url = $this->images_url . 'menu.png';
|
633 |
*
|
634 |
* @uses wp_admin_css_color() To register the color scheme
|
635 |
*/
|
636 |
+
public function register_admin_style () {
|
637 |
wp_admin_css_color( 'bbpress', __( 'Green', 'bbpress' ), $this->styles_url . 'admin.css', array( '#222222', '#006600', '#deece1', '#6eb469' ) );
|
638 |
}
|
639 |
}
|
bbp-admin/bbp-forums.php
CHANGED
@@ -29,30 +29,19 @@ class BBP_Forums_Admin {
|
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
32 |
-
/**
|
33 |
-
* The main bbPress forums admin loader (PHP4 compat)
|
34 |
-
*
|
35 |
-
* @since bbPress (r2515)
|
36 |
-
*
|
37 |
-
* @uses BBP_Forums_Admin::_setup_globals() Setup the globals needed
|
38 |
-
* @uses BBP_Forums_Admin::_setup_actions() Setup the hooks and actions
|
39 |
-
*/
|
40 |
-
function BBP_Forums_Admin() {
|
41 |
-
$this->__construct();
|
42 |
-
}
|
43 |
-
|
44 |
/**
|
45 |
* The main bbPress forums admin loader
|
46 |
*
|
47 |
* @since bbPress (r2515)
|
48 |
*
|
49 |
-
* @uses BBP_Forums_Admin::
|
50 |
-
* @uses BBP_Forums_Admin::
|
|
|
51 |
*/
|
52 |
function __construct() {
|
53 |
-
$this->
|
54 |
-
$this->
|
55 |
-
$this->
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -67,7 +56,7 @@ class BBP_Forums_Admin {
|
|
67 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
68 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
69 |
*/
|
70 |
-
function
|
71 |
|
72 |
// Add some general styling to the admin area
|
73 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
@@ -93,7 +82,7 @@ class BBP_Forums_Admin {
|
|
93 |
* @since bbPress (r2646)
|
94 |
* @access private
|
95 |
*/
|
96 |
-
function
|
97 |
|
98 |
// Setup the post type for this admin component
|
99 |
$this->post_type = bbp_get_forum_post_type();
|
@@ -105,7 +94,7 @@ class BBP_Forums_Admin {
|
|
105 |
* @since bbPress (r3119)
|
106 |
* @access private
|
107 |
*/
|
108 |
-
function
|
109 |
|
110 |
// Define local variable(s)
|
111 |
$contextual_help = array();
|
@@ -312,9 +301,6 @@ class BBP_Forums_Admin {
|
|
312 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
313 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
314 |
* @uses sanitize_html_class() To sanitize the classes
|
315 |
-
* @uses bbp_is_forum() To check if it is a forum page
|
316 |
-
* @uses bbp_is_topic() To check if it is a topic page
|
317 |
-
* @uses bbp_is_reply() To check if it is a reply page
|
318 |
* @uses do_action() Calls 'bbp_admin_head'
|
319 |
*/
|
320 |
function admin_head() {
|
@@ -563,7 +549,7 @@ endif; // class_exists check
|
|
563 |
*
|
564 |
* @uses BBP_Forums_Admin
|
565 |
*/
|
566 |
-
function
|
567 |
global $bbp;
|
568 |
|
569 |
$bbp->admin->forums = new BBP_Forums_Admin();
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* The main bbPress forums admin loader
|
34 |
*
|
35 |
* @since bbPress (r2515)
|
36 |
*
|
37 |
+
* @uses BBP_Forums_Admin::setup_globals() Setup the globals needed
|
38 |
+
* @uses BBP_Forums_Admin::setup_actions() Setup the hooks and actions
|
39 |
+
* @uses BBP_Forums_Admin::setup_help() Setup the help text
|
40 |
*/
|
41 |
function __construct() {
|
42 |
+
$this->setup_globals();
|
43 |
+
$this->setup_actions();
|
44 |
+
$this->setup_help();
|
45 |
}
|
46 |
|
47 |
/**
|
56 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
57 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
58 |
*/
|
59 |
+
function setup_actions() {
|
60 |
|
61 |
// Add some general styling to the admin area
|
62 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
82 |
* @since bbPress (r2646)
|
83 |
* @access private
|
84 |
*/
|
85 |
+
function setup_globals() {
|
86 |
|
87 |
// Setup the post type for this admin component
|
88 |
$this->post_type = bbp_get_forum_post_type();
|
94 |
* @since bbPress (r3119)
|
95 |
* @access private
|
96 |
*/
|
97 |
+
function setup_help() {
|
98 |
|
99 |
// Define local variable(s)
|
100 |
$contextual_help = array();
|
301 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
302 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
303 |
* @uses sanitize_html_class() To sanitize the classes
|
|
|
|
|
|
|
304 |
* @uses do_action() Calls 'bbp_admin_head'
|
305 |
*/
|
306 |
function admin_head() {
|
549 |
*
|
550 |
* @uses BBP_Forums_Admin
|
551 |
*/
|
552 |
+
function bbp_admin_forums() {
|
553 |
global $bbp;
|
554 |
|
555 |
$bbp->admin->forums = new BBP_Forums_Admin();
|
bbp-admin/bbp-functions.php
CHANGED
@@ -270,11 +270,11 @@ function bbp_recount_topic_hidden_replies() {
|
|
270 |
$statement = __( 'Counting the number of spammed and trashed replies in each topic… %s', 'bbpress' );
|
271 |
$result = __( 'Failed!', 'bbpress' );
|
272 |
|
273 |
-
$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '
|
274 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
275 |
return array( 1, sprintf( $statement, $result ) );
|
276 |
|
277 |
-
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '
|
278 |
if ( is_wp_error( $wpdb->query( $sql ) ) )
|
279 |
return array( 2, sprintf( $statement, $result ) );
|
280 |
|
@@ -300,7 +300,7 @@ function bbp_recount_forum_topics() {
|
|
300 |
$statement = __( 'Counting the number of topics in each forum… %s', 'bbpress' );
|
301 |
$result = __( 'Failed!', 'bbpress' );
|
302 |
|
303 |
-
$sql_delete = "DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ( '
|
304 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
305 |
return array( 1, sprintf( $statement, $result ) );
|
306 |
|
@@ -903,4 +903,29 @@ function bbp_recount_rewalk() {
|
|
903 |
return array( 0, sprintf( $statement, $result ) );
|
904 |
}
|
905 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
906 |
?>
|
270 |
$statement = __( 'Counting the number of spammed and trashed replies in each topic… %s', 'bbpress' );
|
271 |
$result = __( 'Failed!', 'bbpress' );
|
272 |
|
273 |
+
$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '_bbp_reply_count_hidden';";
|
274 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
275 |
return array( 1, sprintf( $statement, $result ) );
|
276 |
|
277 |
+
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$wpdb->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` IN ( '" . join( "','", array( 'trash', $bbp->spam_status_id ) ) . "') GROUP BY `post_parent`);";
|
278 |
if ( is_wp_error( $wpdb->query( $sql ) ) )
|
279 |
return array( 2, sprintf( $statement, $result ) );
|
280 |
|
300 |
$statement = __( 'Counting the number of topics in each forum… %s', 'bbpress' );
|
301 |
$result = __( 'Failed!', 'bbpress' );
|
302 |
|
303 |
+
$sql_delete = "DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ( '_bbp_topic_count', '_bbp_total_topic_count' );";
|
304 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
305 |
return array( 1, sprintf( $statement, $result ) );
|
306 |
|
903 |
return array( 0, sprintf( $statement, $result ) );
|
904 |
}
|
905 |
|
906 |
+
/**
|
907 |
+
* Filter sample permalinks so that certain languages display properly.
|
908 |
+
*
|
909 |
+
* @since bbPress (r3336)
|
910 |
+
*
|
911 |
+
* @param string $post_link Custom post type permalink
|
912 |
+
* @param object $post Post data object
|
913 |
+
* @param bool $leavename Optional, defaults to false. Whether to keep post name or page name.
|
914 |
+
* @param bool $sample Optional, defaults to false. Is it a sample permalink.
|
915 |
+
*
|
916 |
+
* @uses is_admin() To make sure we're on an admin page
|
917 |
+
* @uses bbp_is_custom_post_type() To get the forum post type
|
918 |
+
*
|
919 |
+
* @return string The custom post type permalink
|
920 |
+
*/
|
921 |
+
function bbp_filter_sample_permalink( $post_link, $post, $leavename, $sample ) {
|
922 |
+
|
923 |
+
// Bail if not on an admin page and not getting a sample permalink
|
924 |
+
if ( !empty( $sample ) && is_admin() && bbp_is_custom_post_type() )
|
925 |
+
return urldecode( $post_link );
|
926 |
+
|
927 |
+
// Return post link
|
928 |
+
return $post_link;
|
929 |
+
}
|
930 |
+
|
931 |
?>
|
bbp-admin/bbp-metaboxes.php
CHANGED
@@ -14,8 +14,6 @@
|
|
14 |
*
|
15 |
* Adds a dashboard widget with forum statistics
|
16 |
*
|
17 |
-
* @todo Check for updates and show notice
|
18 |
-
*
|
19 |
* @since bbPress (r2770)
|
20 |
*
|
21 |
* @uses bbp_get_statistics() To get the forum statistics
|
@@ -102,7 +100,7 @@ function bbp_dashboard_widget_right_now() {
|
|
102 |
$num = $topic_tag_count;
|
103 |
$text = _n( 'Topic Tag', 'Topic Tags', $topic_tag_count, 'bbpress' );
|
104 |
if ( current_user_can( 'manage_topic_tags' ) ) {
|
105 |
-
$link = add_query_arg( array( 'taxonomy' =>
|
106 |
$num = '<a href="' . $link . '">' . $num . '</a>';
|
107 |
$text = '<a href="' . $link . '">' . $text . '</a>';
|
108 |
}
|
@@ -143,13 +141,13 @@ function bbp_dashboard_widget_right_now() {
|
|
143 |
|
144 |
</tr>
|
145 |
|
146 |
-
<?php if ( isset( $
|
147 |
|
148 |
<tr>
|
149 |
|
150 |
<?php
|
151 |
-
$num = $
|
152 |
-
$text = _n( 'Hidden Topic', 'Hidden Topics', $
|
153 |
$link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
|
154 |
$num = '<a href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $num . '</a>';
|
155 |
$text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $text . '</a>';
|
@@ -162,13 +160,13 @@ function bbp_dashboard_widget_right_now() {
|
|
162 |
|
163 |
<?php endif; ?>
|
164 |
|
165 |
-
<?php if ( isset( $
|
166 |
|
167 |
<tr>
|
168 |
|
169 |
<?php
|
170 |
-
$num = $
|
171 |
-
$text = _n( 'Hidden Reply', 'Hidden Replies', $
|
172 |
$link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
|
173 |
$num = '<a href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $num . '</a>';
|
174 |
$text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $text . '</a>';
|
@@ -188,7 +186,7 @@ function bbp_dashboard_widget_right_now() {
|
|
188 |
<?php
|
189 |
$num = $empty_topic_tag_count;
|
190 |
$text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $empty_topic_tag_count, 'bbpress' );
|
191 |
-
$link = add_query_arg( array( 'taxonomy' =>
|
192 |
$num = '<a href="' . $link . '">' . $num . '</a>';
|
193 |
$text = '<a class="waiting" href="' . $link . '">' . $text . '</a>';
|
194 |
?>
|
@@ -220,7 +218,7 @@ function bbp_dashboard_widget_right_now() {
|
|
220 |
</p>
|
221 |
|
222 |
<span id="wp-version-message">
|
223 |
-
<?php printf( __( 'You are using <span class="b">bbPress %s</span>.', 'bbpress' ),
|
224 |
</span>
|
225 |
|
226 |
</div>
|
@@ -467,21 +465,21 @@ function bbp_author_metabox() {
|
|
467 |
|
468 |
<p>
|
469 |
<label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label>
|
470 |
-
<input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_name', true ); ?>" size="
|
471 |
</p>
|
472 |
|
473 |
<p><strong><?php _e( 'Email', 'bbpress' ); ?></strong></p>
|
474 |
|
475 |
<p>
|
476 |
<label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label>
|
477 |
-
<input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_email', true ); ?>" size="
|
478 |
</p>
|
479 |
|
480 |
<p><strong><?php _e( 'Website', 'bbpress' ); ?></strong></p>
|
481 |
|
482 |
<p>
|
483 |
<label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label>
|
484 |
-
<input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_website', true ); ?>" size="
|
485 |
</p>
|
486 |
|
487 |
<?php endif; ?>
|
@@ -490,7 +488,7 @@ function bbp_author_metabox() {
|
|
490 |
|
491 |
<p>
|
492 |
<label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label>
|
493 |
-
<input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo get_post_meta( $post_id, '_bbp_author_ip', true ); ?>" size="
|
494 |
</p>
|
495 |
|
496 |
<?php
|
14 |
*
|
15 |
* Adds a dashboard widget with forum statistics
|
16 |
*
|
|
|
|
|
17 |
* @since bbPress (r2770)
|
18 |
*
|
19 |
* @uses bbp_get_statistics() To get the forum statistics
|
100 |
$num = $topic_tag_count;
|
101 |
$text = _n( 'Topic Tag', 'Topic Tags', $topic_tag_count, 'bbpress' );
|
102 |
if ( current_user_can( 'manage_topic_tags' ) ) {
|
103 |
+
$link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) );
|
104 |
$num = '<a href="' . $link . '">' . $num . '</a>';
|
105 |
$text = '<a href="' . $link . '">' . $text . '</a>';
|
106 |
}
|
141 |
|
142 |
</tr>
|
143 |
|
144 |
+
<?php if ( isset( $topic_count_hidden ) ) : ?>
|
145 |
|
146 |
<tr>
|
147 |
|
148 |
<?php
|
149 |
+
$num = $topic_count_hidden;
|
150 |
+
$text = _n( 'Hidden Topic', 'Hidden Topics', $topic_count_hidden, 'bbpress' );
|
151 |
$link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
|
152 |
$num = '<a href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $num . '</a>';
|
153 |
$text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $text . '</a>';
|
160 |
|
161 |
<?php endif; ?>
|
162 |
|
163 |
+
<?php if ( isset( $reply_count_hidden ) ) : ?>
|
164 |
|
165 |
<tr>
|
166 |
|
167 |
<?php
|
168 |
+
$num = $reply_count_hidden;
|
169 |
+
$text = _n( 'Hidden Reply', 'Hidden Replies', $reply_count_hidden, 'bbpress' );
|
170 |
$link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
|
171 |
$num = '<a href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $num . '</a>';
|
172 |
$text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $text . '</a>';
|
186 |
<?php
|
187 |
$num = $empty_topic_tag_count;
|
188 |
$text = _n( 'Empty Topic Tag', 'Empty Topic Tags', $empty_topic_tag_count, 'bbpress' );
|
189 |
+
$link = add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit-tags.php' ) );
|
190 |
$num = '<a href="' . $link . '">' . $num . '</a>';
|
191 |
$text = '<a class="waiting" href="' . $link . '">' . $text . '</a>';
|
192 |
?>
|
218 |
</p>
|
219 |
|
220 |
<span id="wp-version-message">
|
221 |
+
<?php printf( __( 'You are using <span class="b">bbPress %s</span>.', 'bbpress' ), $bbp->version ); ?>
|
222 |
</span>
|
223 |
|
224 |
</div>
|
465 |
|
466 |
<p>
|
467 |
<label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label>
|
468 |
+
<input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_name', true ); ?>" size="25" />
|
469 |
</p>
|
470 |
|
471 |
<p><strong><?php _e( 'Email', 'bbpress' ); ?></strong></p>
|
472 |
|
473 |
<p>
|
474 |
<label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label>
|
475 |
+
<input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_email', true ); ?>" size="25" />
|
476 |
</p>
|
477 |
|
478 |
<p><strong><?php _e( 'Website', 'bbpress' ); ?></strong></p>
|
479 |
|
480 |
<p>
|
481 |
<label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label>
|
482 |
+
<input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_website', true ); ?>" size="25" />
|
483 |
</p>
|
484 |
|
485 |
<?php endif; ?>
|
488 |
|
489 |
<p>
|
490 |
<label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label>
|
491 |
+
<input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo get_post_meta( $post_id, '_bbp_author_ip', true ); ?>" size="25" disabled="disabled" />
|
492 |
</p>
|
493 |
|
494 |
<?php
|
bbp-admin/bbp-replies.php
CHANGED
@@ -29,30 +29,19 @@ class BBP_Replies_Admin {
|
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
32 |
-
/**
|
33 |
-
* The main bbPress admin loader (PHP4 compat)
|
34 |
-
*
|
35 |
-
* @since bbPress (r2515)
|
36 |
-
*
|
37 |
-
* @uses BBP_Replies_Admin::_setup_globals() Setup the globals needed
|
38 |
-
* @uses BBP_Topics_Admin::_setup_actions() Setup the hooks and actions
|
39 |
-
*/
|
40 |
-
function BBP_Replies_Admin() {
|
41 |
-
$this->__construct();
|
42 |
-
}
|
43 |
-
|
44 |
/**
|
45 |
* The main bbPress admin loader
|
46 |
*
|
47 |
* @since bbPress (r2515)
|
48 |
*
|
49 |
-
* @uses BBP_Replies_Admin::
|
50 |
-
* @uses BBP_Replies_Admin::
|
|
|
51 |
*/
|
52 |
function __construct() {
|
53 |
-
$this->
|
54 |
-
$this->
|
55 |
-
$this->
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -67,7 +56,7 @@ class BBP_Replies_Admin {
|
|
67 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
68 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
69 |
*/
|
70 |
-
function
|
71 |
|
72 |
// Add some general styling to the admin area
|
73 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
@@ -105,7 +94,7 @@ class BBP_Replies_Admin {
|
|
105 |
* @since bbPress (r2646)
|
106 |
* @access private
|
107 |
*/
|
108 |
-
function
|
109 |
|
110 |
// Setup the post type for this admin component
|
111 |
$this->post_type = bbp_get_reply_post_type();
|
@@ -117,7 +106,7 @@ class BBP_Replies_Admin {
|
|
117 |
* @since bbPress (r3119)
|
118 |
* @access private
|
119 |
*/
|
120 |
-
function
|
121 |
|
122 |
// Define local variable(s)
|
123 |
$contextual_help = array();
|
@@ -153,11 +142,11 @@ class BBP_Replies_Admin {
|
|
153 |
$bbp_contextual_help[] = __( 'You can customize the display of this screen in a number of ways:', 'bbpress' );
|
154 |
$bbp_contextual_help[] =
|
155 |
'<ul>' .
|
156 |
-
'<li>' . __( 'You can hide/display columns based on your needs (Forum, Topic, Author, and Created) and decide how many replies to list per screen using the Screen Options tab.') . '</li>' .
|
157 |
-
'<li>' . __( 'You can filter the list of replies by reply status using the text links in the upper left to show All, Published, Pending Review, Draft, or Trashed topics. The default view is to show all replies.') . '</li>' .
|
158 |
-
'<li>' . __( 'You can view replies in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' .
|
159 |
-
'<li>' . __( 'You can refine the list to show only replies from a specific month by using the dropdown menus above the replies list. Click the Filter button after making your selection.') . '</li>' .
|
160 |
-
'<li>' . __( 'You can also show only replies from a specific parent forum by using the parent forum dropdown above the replies list and selecting the parent forum. Click the Filter button after making your selection.') . '</li>' .
|
161 |
'</ul>';
|
162 |
|
163 |
$bbp_contextual_help[] = __( 'Hovering over a row in the replies list will display action links that allow you to manage your reply. You can perform the following actions:', 'bbpress' );
|
@@ -348,9 +337,6 @@ class BBP_Replies_Admin {
|
|
348 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
349 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
350 |
* @uses sanitize_html_class() To sanitize the classes
|
351 |
-
* @uses bbp_is_forum() To check if it is a forum page
|
352 |
-
* @uses bbp_is_topic() To check if it is a topic page
|
353 |
-
* @uses bbp_is_reply() To check if it is a reply page
|
354 |
* @uses do_action() Calls 'bbp_admin_head'
|
355 |
*/
|
356 |
function admin_head() {
|
@@ -883,7 +869,7 @@ endif; // class_exists check
|
|
883 |
*
|
884 |
* @uses BBP_Replies_Admin
|
885 |
*/
|
886 |
-
function
|
887 |
global $bbp;
|
888 |
|
889 |
$bbp->admin->replies = new BBP_Replies_Admin();
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* The main bbPress admin loader
|
34 |
*
|
35 |
* @since bbPress (r2515)
|
36 |
*
|
37 |
+
* @uses BBP_Replies_Admin::setup_globals() Setup the globals needed
|
38 |
+
* @uses BBP_Replies_Admin::setup_actions() Setup the hooks and actions
|
39 |
+
* @uses BBP_Replies_Admin::setup_actions() Setup the help text
|
40 |
*/
|
41 |
function __construct() {
|
42 |
+
$this->setup_globals();
|
43 |
+
$this->setup_actions();
|
44 |
+
$this->setup_help();
|
45 |
}
|
46 |
|
47 |
/**
|
56 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
57 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
58 |
*/
|
59 |
+
function setup_actions() {
|
60 |
|
61 |
// Add some general styling to the admin area
|
62 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
94 |
* @since bbPress (r2646)
|
95 |
* @access private
|
96 |
*/
|
97 |
+
function setup_globals() {
|
98 |
|
99 |
// Setup the post type for this admin component
|
100 |
$this->post_type = bbp_get_reply_post_type();
|
106 |
* @since bbPress (r3119)
|
107 |
* @access private
|
108 |
*/
|
109 |
+
function setup_help() {
|
110 |
|
111 |
// Define local variable(s)
|
112 |
$contextual_help = array();
|
142 |
$bbp_contextual_help[] = __( 'You can customize the display of this screen in a number of ways:', 'bbpress' );
|
143 |
$bbp_contextual_help[] =
|
144 |
'<ul>' .
|
145 |
+
'<li>' . __( 'You can hide/display columns based on your needs (Forum, Topic, Author, and Created) and decide how many replies to list per screen using the Screen Options tab.', 'bbpress' ) . '</li>' .
|
146 |
+
'<li>' . __( 'You can filter the list of replies by reply status using the text links in the upper left to show All, Published, Pending Review, Draft, or Trashed topics. The default view is to show all replies.', 'bbpress' ) . '</li>' .
|
147 |
+
'<li>' . __( 'You can view replies in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.', 'bbpress' ) . '</li>' .
|
148 |
+
'<li>' . __( 'You can refine the list to show only replies from a specific month by using the dropdown menus above the replies list. Click the Filter button after making your selection.', 'bbpress' ) . '</li>' .
|
149 |
+
'<li>' . __( 'You can also show only replies from a specific parent forum by using the parent forum dropdown above the replies list and selecting the parent forum. Click the Filter button after making your selection.', 'bbpress' ) . '</li>' .
|
150 |
'</ul>';
|
151 |
|
152 |
$bbp_contextual_help[] = __( 'Hovering over a row in the replies list will display action links that allow you to manage your reply. You can perform the following actions:', 'bbpress' );
|
337 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
338 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
339 |
* @uses sanitize_html_class() To sanitize the classes
|
|
|
|
|
|
|
340 |
* @uses do_action() Calls 'bbp_admin_head'
|
341 |
*/
|
342 |
function admin_head() {
|
869 |
*
|
870 |
* @uses BBP_Replies_Admin
|
871 |
*/
|
872 |
+
function bbp_admin_replies() {
|
873 |
global $bbp;
|
874 |
|
875 |
$bbp->admin->replies = new BBP_Replies_Admin();
|
bbp-admin/bbp-settings.php
CHANGED
@@ -105,6 +105,22 @@ function bbp_admin_setting_callback_anonymous() {
|
|
105 |
<?php
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
/** Start Per Page Section ****************************************************/
|
109 |
|
110 |
/**
|
105 |
<?php
|
106 |
}
|
107 |
|
108 |
+
/**
|
109 |
+
* Allow global access setting field
|
110 |
+
*
|
111 |
+
* @since bbPress (r3378)
|
112 |
+
*
|
113 |
+
* @uses checked() To display the checked attribute
|
114 |
+
*/
|
115 |
+
function bbp_admin_setting_callback_global_access() {
|
116 |
+
?>
|
117 |
+
|
118 |
+
<input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( false ) ); ?> />
|
119 |
+
<label for="_bbp_allow_global_access"><?php _e( 'Allow all users of your multisite installation to create topics and replies', 'bbpress' ); ?></label>
|
120 |
+
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
|
124 |
/** Start Per Page Section ****************************************************/
|
125 |
|
126 |
/**
|
bbp-admin/bbp-topics.php
CHANGED
@@ -29,30 +29,19 @@ class BBP_Topics_Admin {
|
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
32 |
-
/**
|
33 |
-
* The main bbPress topics admin loader (PHP4 compat)
|
34 |
-
*
|
35 |
-
* @since bbPress (r2515)
|
36 |
-
*
|
37 |
-
* @uses BBP_Topics_Admin::_setup_globals() Setup the globals needed
|
38 |
-
* @uses BBP_Topics_Admin::_setup_actions() Setup the hooks and actions
|
39 |
-
*/
|
40 |
-
function BBP_Topics_Admin() {
|
41 |
-
$this->__construct();
|
42 |
-
}
|
43 |
-
|
44 |
/**
|
45 |
* The main bbPress topics admin loader
|
46 |
*
|
47 |
* @since bbPress (r2515)
|
48 |
*
|
49 |
-
* @uses BBP_Topics_Admin::
|
50 |
-
* @uses BBP_Topics_Admin::
|
|
|
51 |
*/
|
52 |
function __construct() {
|
53 |
-
$this->
|
54 |
-
$this->
|
55 |
-
$this->
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -67,7 +56,7 @@ class BBP_Topics_Admin {
|
|
67 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
68 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
69 |
*/
|
70 |
-
function
|
71 |
|
72 |
// Add some general styling to the admin area
|
73 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
@@ -105,7 +94,7 @@ class BBP_Topics_Admin {
|
|
105 |
* @since bbPress (r2646)
|
106 |
* @access private
|
107 |
*/
|
108 |
-
function
|
109 |
|
110 |
// Setup the post type for this admin component
|
111 |
$this->post_type = bbp_get_topic_post_type();
|
@@ -117,7 +106,7 @@ class BBP_Topics_Admin {
|
|
117 |
* @since bbPress (r3119)
|
118 |
* @access private
|
119 |
*/
|
120 |
-
function
|
121 |
|
122 |
// Define local variable(s)
|
123 |
$contextual_help = array();
|
@@ -211,7 +200,7 @@ class BBP_Topics_Admin {
|
|
211 |
|
212 |
// Add help
|
213 |
global $bbp;
|
214 |
-
add_contextual_help( 'edit-' .
|
215 |
}
|
216 |
|
217 |
/**
|
@@ -369,14 +358,11 @@ class BBP_Topics_Admin {
|
|
369 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
370 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
371 |
* @uses sanitize_html_class() To sanitize the classes
|
372 |
-
* @uses bbp_is_forum() To check if it is a forum page
|
373 |
-
* @uses bbp_is_topic() To check if it is a topic page
|
374 |
-
* @uses bbp_is_reply() To check if it is a reply page
|
375 |
* @uses do_action() Calls 'bbp_admin_head'
|
376 |
*/
|
377 |
function admin_head() {
|
378 |
|
379 |
-
if (
|
380 |
|
381 |
<style type="text/css" media="screen">
|
382 |
/*<![CDATA[*/
|
@@ -959,7 +945,7 @@ endif; // class_exists check
|
|
959 |
*
|
960 |
* @uses BBP_Forums_Admin
|
961 |
*/
|
962 |
-
function
|
963 |
global $bbp;
|
964 |
|
965 |
$bbp->admin->topics = new BBP_Topics_Admin();
|
29 |
|
30 |
/** Functions *************************************************************/
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* The main bbPress topics admin loader
|
34 |
*
|
35 |
* @since bbPress (r2515)
|
36 |
*
|
37 |
+
* @uses BBP_Topics_Admin::setup_globals() Setup the globals needed
|
38 |
+
* @uses BBP_Topics_Admin::setup_actions() Setup the hooks and actions
|
39 |
+
* @uses BBP_Topics_Admin::setup_help() Setup the help text
|
40 |
*/
|
41 |
function __construct() {
|
42 |
+
$this->setup_globals();
|
43 |
+
$this->setup_actions();
|
44 |
+
$this->setup_help();
|
45 |
}
|
46 |
|
47 |
/**
|
56 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
57 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
58 |
*/
|
59 |
+
function setup_actions() {
|
60 |
|
61 |
// Add some general styling to the admin area
|
62 |
add_action( 'admin_head', array( $this, 'admin_head' ) );
|
94 |
* @since bbPress (r2646)
|
95 |
* @access private
|
96 |
*/
|
97 |
+
function setup_globals() {
|
98 |
|
99 |
// Setup the post type for this admin component
|
100 |
$this->post_type = bbp_get_topic_post_type();
|
106 |
* @since bbPress (r3119)
|
107 |
* @access private
|
108 |
*/
|
109 |
+
function setup_help() {
|
110 |
|
111 |
// Define local variable(s)
|
112 |
$contextual_help = array();
|
200 |
|
201 |
// Add help
|
202 |
global $bbp;
|
203 |
+
add_contextual_help( 'edit-' . bbp_get_topic_tag_tax_id(), $contextual_help );
|
204 |
}
|
205 |
|
206 |
/**
|
358 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
359 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
360 |
* @uses sanitize_html_class() To sanitize the classes
|
|
|
|
|
|
|
361 |
* @uses do_action() Calls 'bbp_admin_head'
|
362 |
*/
|
363 |
function admin_head() {
|
364 |
|
365 |
+
if ( get_post_type() == $this->post_type ) : ?>
|
366 |
|
367 |
<style type="text/css" media="screen">
|
368 |
/*<![CDATA[*/
|
945 |
*
|
946 |
* @uses BBP_Forums_Admin
|
947 |
*/
|
948 |
+
function bbp_admin_topics() {
|
949 |
global $bbp;
|
950 |
|
951 |
$bbp->admin->topics = new BBP_Topics_Admin();
|
bbp-admin/bbp-users.php
CHANGED
@@ -24,29 +24,17 @@ class BBP_Users_Admin {
|
|
24 |
|
25 |
/** Functions *************************************************************/
|
26 |
|
27 |
-
/**
|
28 |
-
* The bbPress users admin loader (PHP4 compat)
|
29 |
-
*
|
30 |
-
* @since bbPress (r2515)
|
31 |
-
*
|
32 |
-
* @uses BBP_Users_Admin::_setup_globals() Setup the globals needed
|
33 |
-
* @uses BBP_Users_Admin::_setup_actions() Setup the hooks and actions
|
34 |
-
*/
|
35 |
-
function BBP_Users_Admin() {
|
36 |
-
$this->__construct();
|
37 |
-
}
|
38 |
-
|
39 |
/**
|
40 |
* The bbPress users admin loader
|
41 |
*
|
42 |
* @since bbPress (r2515)
|
43 |
*
|
44 |
-
* @uses BBP_Users_Admin::
|
45 |
-
* @uses BBP_Users_Admin::
|
46 |
*/
|
47 |
function __construct() {
|
48 |
-
$this->
|
49 |
-
$this->
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -57,7 +45,7 @@ class BBP_Users_Admin {
|
|
57 |
*
|
58 |
* @uses add_action() To add various actions
|
59 |
*/
|
60 |
-
function
|
61 |
|
62 |
// User profile edit/display actions
|
63 |
add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) );
|
@@ -74,7 +62,7 @@ class BBP_Users_Admin {
|
|
74 |
* @since bbPress (r2646)
|
75 |
* @access private
|
76 |
*/
|
77 |
-
function
|
78 |
|
79 |
/**
|
80 |
* Add some general styling to the admin area
|
@@ -91,32 +79,24 @@ class BBP_Users_Admin {
|
|
91 |
/**
|
92 |
* Responsible for saving additional profile options and settings
|
93 |
*
|
94 |
-
* @todo Everything
|
95 |
-
*
|
96 |
* @since bbPress (r2464)
|
97 |
*
|
98 |
* @param $user_id The user id
|
99 |
* @uses do_action() Calls 'bbp_user_profile_update'
|
100 |
* @return bool Always false
|
101 |
*/
|
102 |
-
function user_profile_update( $user_id ) {
|
103 |
-
return false;
|
104 |
-
}
|
105 |
|
106 |
/**
|
107 |
* Responsible for saving additional profile options and settings
|
108 |
*
|
109 |
-
* @todo Everything
|
110 |
-
*
|
111 |
* @since bbPress (r2464)
|
112 |
*
|
113 |
* @param WP_User $profileuser User data
|
114 |
* @uses do_action() Calls 'bbp_user_profile_forums'
|
115 |
* @return bool Always false
|
116 |
*/
|
117 |
-
function user_profile_forums( $profileuser ) {
|
118 |
-
return false;
|
119 |
-
}
|
120 |
}
|
121 |
endif; // class exists
|
122 |
|
24 |
|
25 |
/** Functions *************************************************************/
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* The bbPress users admin loader
|
29 |
*
|
30 |
* @since bbPress (r2515)
|
31 |
*
|
32 |
+
* @uses BBP_Users_Admin::setup_globals() Setup the globals needed
|
33 |
+
* @uses BBP_Users_Admin::setup_actions() Setup the hooks and actions
|
34 |
*/
|
35 |
function __construct() {
|
36 |
+
$this->setup_globals();
|
37 |
+
$this->setup_actions();
|
38 |
}
|
39 |
|
40 |
/**
|
45 |
*
|
46 |
* @uses add_action() To add various actions
|
47 |
*/
|
48 |
+
function setup_actions() {
|
49 |
|
50 |
// User profile edit/display actions
|
51 |
add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) );
|
62 |
* @since bbPress (r2646)
|
63 |
* @access private
|
64 |
*/
|
65 |
+
function setup_globals() { }
|
66 |
|
67 |
/**
|
68 |
* Add some general styling to the admin area
|
79 |
/**
|
80 |
* Responsible for saving additional profile options and settings
|
81 |
*
|
|
|
|
|
82 |
* @since bbPress (r2464)
|
83 |
*
|
84 |
* @param $user_id The user id
|
85 |
* @uses do_action() Calls 'bbp_user_profile_update'
|
86 |
* @return bool Always false
|
87 |
*/
|
88 |
+
function user_profile_update( $user_id ) { }
|
|
|
|
|
89 |
|
90 |
/**
|
91 |
* Responsible for saving additional profile options and settings
|
92 |
*
|
|
|
|
|
93 |
* @since bbPress (r2464)
|
94 |
*
|
95 |
* @param WP_User $profileuser User data
|
96 |
* @uses do_action() Calls 'bbp_user_profile_forums'
|
97 |
* @return bool Always false
|
98 |
*/
|
99 |
+
function user_profile_forums( $profileuser ) { }
|
|
|
|
|
100 |
}
|
101 |
endif; // class exists
|
102 |
|
bbp-admin/importers/bbpress.php
CHANGED
@@ -30,7 +30,7 @@ class BPDB extends WPDB {
|
|
30 |
parent::__construct( $dbuser, $dbpassword, $dbname, $dbhost );
|
31 |
|
32 |
$args = func_get_args();
|
33 |
-
$args = call_user_func_array( array( &$this, '
|
34 |
|
35 |
if ( $args['host'] )
|
36 |
$this->db_servers['dbh_global'] = $args;
|
@@ -54,7 +54,7 @@ class BPDB extends WPDB {
|
|
54 |
* Initialises the class variables based on provided arguments.
|
55 |
* Based on, and taken from, the BackPress class in turn taken from the 1.0 branch of bbPress.
|
56 |
*/
|
57 |
-
function
|
58 |
{
|
59 |
if ( 4 == func_num_args() ) {
|
60 |
$args = array(
|
@@ -872,7 +872,7 @@ class bbPress_Importer {
|
|
872 |
<?php
|
873 |
|
874 |
if ( !$forums = bb_get_forums() ) {
|
875 |
-
echo "<li><strong>" . __( 'No forums
|
876 |
return;
|
877 |
}
|
878 |
|
@@ -893,7 +893,7 @@ class bbPress_Importer {
|
|
893 |
'post_status' => 'publish',
|
894 |
'comment_status' => 'closed',
|
895 |
'ping_status' => 'closed',
|
896 |
-
'post_name' => $forum->forum_slug,
|
897 |
'post_parent' => !empty( $forum->forum_parent ) ? $forum_map[$forum->forum_parent] : 0,
|
898 |
'post_type' => bbp_get_forum_post_type(),
|
899 |
'menu_order' => $forum->forum_order
|
@@ -950,7 +950,7 @@ class bbPress_Importer {
|
|
950 |
'post_author' => $topic->topic_poster,
|
951 |
'post_content' => $first_post->post_text,
|
952 |
'post_title' => $topic->topic_title,
|
953 |
-
'post_name' => $topic->topic_slug,
|
954 |
'post_status' => $topic_status,
|
955 |
'post_date_gmt' => $topic->topic_start_time,
|
956 |
'post_date' => get_date_from_gmt( $topic->topic_start_time ),
|
@@ -1071,7 +1071,7 @@ class bbPress_Importer {
|
|
1071 |
update_post_meta( $inserted_topic, '_bbp_last_active_id', $last_active_id );
|
1072 |
update_post_meta( $inserted_topic, '_bbp_last_active_time', $last_active_time );
|
1073 |
update_post_meta( $inserted_topic, '_bbp_reply_count', $replies );
|
1074 |
-
update_post_meta( $inserted_topic, '
|
1075 |
|
1076 |
// Voices will be done by recount
|
1077 |
|
30 |
parent::__construct( $dbuser, $dbpassword, $dbname, $dbhost );
|
31 |
|
32 |
$args = func_get_args();
|
33 |
+
$args = call_user_func_array( array( &$this, 'init' ), $args );
|
34 |
|
35 |
if ( $args['host'] )
|
36 |
$this->db_servers['dbh_global'] = $args;
|
54 |
* Initialises the class variables based on provided arguments.
|
55 |
* Based on, and taken from, the BackPress class in turn taken from the 1.0 branch of bbPress.
|
56 |
*/
|
57 |
+
function init( $args )
|
58 |
{
|
59 |
if ( 4 == func_num_args() ) {
|
60 |
$args = array(
|
872 |
<?php
|
873 |
|
874 |
if ( !$forums = bb_get_forums() ) {
|
875 |
+
echo "<li><strong>" . __( 'No forums found', 'bbpress' ) . "</strong></li></ol>\n";
|
876 |
return;
|
877 |
}
|
878 |
|
893 |
'post_status' => 'publish',
|
894 |
'comment_status' => 'closed',
|
895 |
'ping_status' => 'closed',
|
896 |
+
'post_name' => ( strlen( $forum->forum_slug ) > 200 ) ? sanitize_title_with_dashes( $forum->forum_slug ) : $forum->forum_slug,
|
897 |
'post_parent' => !empty( $forum->forum_parent ) ? $forum_map[$forum->forum_parent] : 0,
|
898 |
'post_type' => bbp_get_forum_post_type(),
|
899 |
'menu_order' => $forum->forum_order
|
950 |
'post_author' => $topic->topic_poster,
|
951 |
'post_content' => $first_post->post_text,
|
952 |
'post_title' => $topic->topic_title,
|
953 |
+
'post_name' => ( strlen( $topic->topic_slug ) > 200 ) ? sanitize_title_with_dashes( $topic->topic_slug ) : $topic->topic_slug,
|
954 |
'post_status' => $topic_status,
|
955 |
'post_date_gmt' => $topic->topic_start_time,
|
956 |
'post_date' => get_date_from_gmt( $topic->topic_start_time ),
|
1071 |
update_post_meta( $inserted_topic, '_bbp_last_active_id', $last_active_id );
|
1072 |
update_post_meta( $inserted_topic, '_bbp_last_active_time', $last_active_time );
|
1073 |
update_post_meta( $inserted_topic, '_bbp_reply_count', $replies );
|
1074 |
+
update_post_meta( $inserted_topic, '_bbp_reply_count_hidden', $hidden_replies );
|
1075 |
|
1076 |
// Voices will be done by recount
|
1077 |
|
bbp-includes/bbp-common-functions.php
CHANGED
@@ -250,10 +250,25 @@ function bbp_get_view_all( $cap = 'moderate' ) {
|
|
250 |
* @return int Current page number
|
251 |
*/
|
252 |
function bbp_get_paged() {
|
|
|
253 |
|
254 |
// Make sure to not paginate widget queries
|
255 |
-
if ( !bbp_is_query_name( 'bbp_widget' )
|
256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
|
258 |
// Default to first page
|
259 |
return 1;
|
@@ -430,7 +445,7 @@ function bbp_get_statistics( $args = '' ) {
|
|
430 |
$topics['trashed'] = ( !empty( $count_trashed_topics ) && current_user_can( 'view_trash' ) ) ? (int) $all_topics->{$bbp->trash_status_id} : 0;
|
431 |
|
432 |
// Total hidden (private + spam + trash)
|
433 |
-
$
|
434 |
|
435 |
// Generate the hidden topic count's title attribute
|
436 |
$topic_titles[] = !empty( $topics['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $topics['private'] ) ) : '';
|
@@ -462,7 +477,7 @@ function bbp_get_statistics( $args = '' ) {
|
|
462 |
$replies['trashed'] = ( !empty( $count_trashed_replies ) && current_user_can( 'view_trash' ) ) ? (int) $all_replies->{$bbp->trash_status_id} : 0;
|
463 |
|
464 |
// Total hidden (private + spam + trash)
|
465 |
-
$
|
466 |
|
467 |
// Generate the hidden topic count's title attribute
|
468 |
$reply_titles[] = !empty( $replies['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $replies['private'] ) ) : '';
|
@@ -479,16 +494,16 @@ function bbp_get_statistics( $args = '' ) {
|
|
479 |
if ( !empty( $count_tags ) ) {
|
480 |
|
481 |
// Get the count
|
482 |
-
$topic_tag_count = wp_count_terms(
|
483 |
|
484 |
// Empty tags
|
485 |
if ( !empty( $count_empty_tags ) && current_user_can( 'edit_topic_tags' ) ) {
|
486 |
-
$empty_topic_tag_count = wp_count_terms(
|
487 |
}
|
488 |
}
|
489 |
|
490 |
// Tally the tallies
|
491 |
-
$statistics = compact( 'user_count', 'forum_count', 'topic_count', '
|
492 |
$statistics = array_map( 'absint', $statistics );
|
493 |
$statistics = array_map( 'number_format_i18n', $statistics );
|
494 |
|
@@ -668,15 +683,15 @@ function bbp_filter_anonymous_post_data( $args = '', $is_edit = false ) {
|
|
668 |
|
669 |
// Filter variables and add errors if necessary
|
670 |
if ( !$bbp_anonymous_name = apply_filters( 'bbp_pre_anonymous_post_author_name', $bbp_anonymous_name ) )
|
671 |
-
|
672 |
|
673 |
if ( !$bbp_anonymous_email = apply_filters( 'bbp_pre_anonymous_post_author_email', $bbp_anonymous_email ) )
|
674 |
-
|
675 |
|
676 |
// Website is optional
|
677 |
$bbp_anonymous_website = apply_filters( 'bbp_pre_anonymous_post_author_website', $bbp_anonymous_website );
|
678 |
|
679 |
-
if ( !
|
680 |
$retval = compact( 'bbp_anonymous_name', 'bbp_anonymous_email', 'bbp_anonymous_website' );
|
681 |
else
|
682 |
$retval = false;
|
@@ -800,9 +815,6 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
|
|
800 |
*
|
801 |
* @since bbPress (r2668)
|
802 |
*
|
803 |
-
* @todo When Akismet is made to work with bbPress posts, add a check if the
|
804 |
-
* post is spam or not, to avoid sending out mails for spam posts
|
805 |
-
*
|
806 |
* @param int $reply_id ID of the newly made reply
|
807 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
808 |
* @uses bbp_get_reply() To get the reply
|
@@ -854,7 +866,7 @@ function bbp_notify_subscribers( $reply_id = 0 ) {
|
|
854 |
continue;
|
855 |
|
856 |
// For plugins
|
857 |
-
if ( !$message = apply_filters( 'bbp_subscription_mail_message', __( "%1\$s wrote:\n\n%2\$s\n\nPost Link: %3\$s\n\nYou're getting this mail because you subscribed to the topic, visit the topic and login to unsubscribe." ), $reply->ID, $topic->ID, $user_id ) )
|
858 |
continue;
|
859 |
|
860 |
// Get user data of this user
|
@@ -886,17 +898,20 @@ function bbp_notify_subscribers( $reply_id = 0 ) {
|
|
886 |
*/
|
887 |
function bbp_logout_url( $url = '', $redirect_to = '' ) {
|
888 |
|
889 |
-
// Rejig the $redirect_to
|
890 |
-
if ( !isset( $_SERVER['REDIRECT_URL'] ) || ( !$redirect_to = home_url( $_SERVER['REDIRECT_URL'] ) ) )
|
891 |
-
$redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
|
892 |
-
|
893 |
// Make sure we are directing somewhere
|
894 |
-
if ( empty( $redirect_to ) )
|
|
|
|
|
|
|
|
|
|
|
|
|
895 |
$redirect_to = home_url( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' );
|
896 |
|
897 |
-
|
898 |
-
|
899 |
-
|
|
|
900 |
|
901 |
// Filter and return
|
902 |
return apply_filters( 'bbp_logout_url', $url, $redirect_to );
|
@@ -951,7 +966,7 @@ function bbp_pre_get_posts_exclude_forums( $posts_query ) {
|
|
951 |
|
952 |
// Get any existing meta queries
|
953 |
$meta_query = $posts_query->get( 'meta_query' );
|
954 |
-
|
955 |
// Add our meta query to existing
|
956 |
$meta_query[] = $forum_ids;
|
957 |
|
@@ -1333,4 +1348,54 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
1333 |
return $query_vars;
|
1334 |
}
|
1335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1336 |
?>
|
250 |
* @return int Current page number
|
251 |
*/
|
252 |
function bbp_get_paged() {
|
253 |
+
global $wp_query;
|
254 |
|
255 |
// Make sure to not paginate widget queries
|
256 |
+
if ( !bbp_is_query_name( 'bbp_widget' ) ) {
|
257 |
+
|
258 |
+
// Check the query var
|
259 |
+
if ( get_query_var( 'paged' ) ) {
|
260 |
+
$paged = get_query_var( 'paged' );
|
261 |
+
|
262 |
+
// Check query paged
|
263 |
+
} elseif ( !empty( $wp_query->query['paged'] ) ) {
|
264 |
+
$paged = $wp_query->query['paged'];
|
265 |
+
}
|
266 |
+
|
267 |
+
// Paged found
|
268 |
+
if ( !empty( $paged ) ) {
|
269 |
+
return (int) $paged;
|
270 |
+
}
|
271 |
+
}
|
272 |
|
273 |
// Default to first page
|
274 |
return 1;
|
445 |
$topics['trashed'] = ( !empty( $count_trashed_topics ) && current_user_can( 'view_trash' ) ) ? (int) $all_topics->{$bbp->trash_status_id} : 0;
|
446 |
|
447 |
// Total hidden (private + spam + trash)
|
448 |
+
$topic_count_hidden = $topics['private'] + $topics['spammed'] + $topics['trashed'];
|
449 |
|
450 |
// Generate the hidden topic count's title attribute
|
451 |
$topic_titles[] = !empty( $topics['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $topics['private'] ) ) : '';
|
477 |
$replies['trashed'] = ( !empty( $count_trashed_replies ) && current_user_can( 'view_trash' ) ) ? (int) $all_replies->{$bbp->trash_status_id} : 0;
|
478 |
|
479 |
// Total hidden (private + spam + trash)
|
480 |
+
$reply_count_hidden = $replies['private'] + $replies['spammed'] + $replies['trashed'];
|
481 |
|
482 |
// Generate the hidden topic count's title attribute
|
483 |
$reply_titles[] = !empty( $replies['private'] ) ? sprintf( __( 'Private: %s', 'bbpress' ), number_format_i18n( $replies['private'] ) ) : '';
|
494 |
if ( !empty( $count_tags ) ) {
|
495 |
|
496 |
// Get the count
|
497 |
+
$topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id(), array( 'hide_empty' => true ) );
|
498 |
|
499 |
// Empty tags
|
500 |
if ( !empty( $count_empty_tags ) && current_user_can( 'edit_topic_tags' ) ) {
|
501 |
+
$empty_topic_tag_count = wp_count_terms( bbp_get_topic_tag_tax_id() ) - $topic_tag_count;
|
502 |
}
|
503 |
}
|
504 |
|
505 |
// Tally the tallies
|
506 |
+
$statistics = compact( 'user_count', 'forum_count', 'topic_count', 'topic_count_hidden', 'reply_count', 'reply_count_hidden', 'topic_tag_count', 'empty_topic_tag_count' );
|
507 |
$statistics = array_map( 'absint', $statistics );
|
508 |
$statistics = array_map( 'number_format_i18n', $statistics );
|
509 |
|
683 |
|
684 |
// Filter variables and add errors if necessary
|
685 |
if ( !$bbp_anonymous_name = apply_filters( 'bbp_pre_anonymous_post_author_name', $bbp_anonymous_name ) )
|
686 |
+
bbp_add_error( 'bbp_anonymous_name', __( '<strong>ERROR</strong>: Invalid author name submitted!', 'bbpress' ) );
|
687 |
|
688 |
if ( !$bbp_anonymous_email = apply_filters( 'bbp_pre_anonymous_post_author_email', $bbp_anonymous_email ) )
|
689 |
+
bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address submitted!', 'bbpress' ) );
|
690 |
|
691 |
// Website is optional
|
692 |
$bbp_anonymous_website = apply_filters( 'bbp_pre_anonymous_post_author_website', $bbp_anonymous_website );
|
693 |
|
694 |
+
if ( !bbp_has_errors() )
|
695 |
$retval = compact( 'bbp_anonymous_name', 'bbp_anonymous_email', 'bbp_anonymous_website' );
|
696 |
else
|
697 |
$retval = false;
|
815 |
*
|
816 |
* @since bbPress (r2668)
|
817 |
*
|
|
|
|
|
|
|
818 |
* @param int $reply_id ID of the newly made reply
|
819 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
820 |
* @uses bbp_get_reply() To get the reply
|
866 |
continue;
|
867 |
|
868 |
// For plugins
|
869 |
+
if ( !$message = apply_filters( 'bbp_subscription_mail_message', __( "%1\$s wrote:\n\n%2\$s\n\nPost Link: %3\$s\n\nYou're getting this mail because you subscribed to the topic, visit the topic and login to unsubscribe.", 'bbpress' ), $reply->ID, $topic->ID, $user_id ) )
|
870 |
continue;
|
871 |
|
872 |
// Get user data of this user
|
898 |
*/
|
899 |
function bbp_logout_url( $url = '', $redirect_to = '' ) {
|
900 |
|
|
|
|
|
|
|
|
|
901 |
// Make sure we are directing somewhere
|
902 |
+
if ( empty( $redirect_to ) && !strstr( $url, 'redirect_to' ) ) {
|
903 |
+
|
904 |
+
// Rejig the $redirect_to
|
905 |
+
if ( !isset( $_SERVER['REDIRECT_URL'] ) || ( $redirect_to != home_url( $_SERVER['REDIRECT_URL'] ) ) ) {
|
906 |
+
$redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
|
907 |
+
}
|
908 |
+
|
909 |
$redirect_to = home_url( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' );
|
910 |
|
911 |
+
// Sanitize $redirect_to and add it to full $url
|
912 |
+
$redirect_to = add_query_arg( array( 'loggedout' => 'true' ), esc_url( $redirect_to ) );
|
913 |
+
$url = add_query_arg( array( 'redirect_to' => urlencode( $redirect_to ) ), $url );
|
914 |
+
}
|
915 |
|
916 |
// Filter and return
|
917 |
return apply_filters( 'bbp_logout_url', $url, $redirect_to );
|
966 |
|
967 |
// Get any existing meta queries
|
968 |
$meta_query = $posts_query->get( 'meta_query' );
|
969 |
+
|
970 |
// Add our meta query to existing
|
971 |
$meta_query[] = $forum_ids;
|
972 |
|
1348 |
return $query_vars;
|
1349 |
}
|
1350 |
|
1351 |
+
/** Errors ********************************************************************/
|
1352 |
+
|
1353 |
+
/**
|
1354 |
+
* Adds an error message to later be output in the theme
|
1355 |
+
*
|
1356 |
+
* @since bbPress (r3381)
|
1357 |
+
*
|
1358 |
+
* @global bbPress $bbp
|
1359 |
+
*
|
1360 |
+
* @see WP_Error()
|
1361 |
+
* @uses WP_Error::add();
|
1362 |
+
*
|
1363 |
+
* @param string $code Unique code for the error message
|
1364 |
+
* @param string $message Translated error message
|
1365 |
+
* @param string $data Any additional data passed with the error message
|
1366 |
+
*/
|
1367 |
+
function bbp_add_error( $code = '', $message = '', $data = '' ) {
|
1368 |
+
global $bbp;
|
1369 |
+
|
1370 |
+
$bbp->errors->add( $code, $message, $data );
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
/**
|
1374 |
+
* Check if error messages exist in queue
|
1375 |
+
*
|
1376 |
+
* @since bbPress (r3381)
|
1377 |
+
*
|
1378 |
+
* @global bbPress $bbp
|
1379 |
+
*
|
1380 |
+
* @see WP_Error()
|
1381 |
+
*
|
1382 |
+
* @uses is_wp_error()
|
1383 |
+
* @usese WP_Error::get_error_codes()
|
1384 |
+
*/
|
1385 |
+
function bbp_has_errors() {
|
1386 |
+
global $bbp;
|
1387 |
+
|
1388 |
+
// Assume no errors
|
1389 |
+
$has_errors = false;
|
1390 |
+
|
1391 |
+
// Check for errors
|
1392 |
+
if ( $bbp->errors->get_error_codes() )
|
1393 |
+
$has_errors = true;
|
1394 |
+
|
1395 |
+
// Filter return value
|
1396 |
+
$has_errors = apply_filters( 'bbp_has_errors', $has_errors, $bbp->errors );
|
1397 |
+
|
1398 |
+
return $has_errors;
|
1399 |
+
}
|
1400 |
+
|
1401 |
?>
|
bbp-includes/bbp-common-template.php
CHANGED
@@ -36,6 +36,30 @@ function bbp_footer() {
|
|
36 |
|
37 |
/** is_ ***********************************************************************/
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
/**
|
40 |
* Check if current page is a bbPress forum
|
41 |
*
|
@@ -48,49 +72,61 @@ function bbp_footer() {
|
|
48 |
* @return bool True if it's a forum page, false if not
|
49 |
*/
|
50 |
function bbp_is_forum( $post_id = 0 ) {
|
51 |
-
global $bbp, $wp_query;
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
if ( is_singular( bbp_get_forum_post_type() ) )
|
56 |
-
return true;
|
57 |
-
|
58 |
-
if ( isset( $wp_query->query_vars['post_type'] ) && ( bbp_get_forum_post_type() === $wp_query->query_vars['post_type'] ) )
|
59 |
-
return true;
|
60 |
-
|
61 |
-
if ( isset( $bbp->forum_query->post->post_type ) && ( bbp_get_forum_post_type() === $bbp->forum_query->post->post_type ) )
|
62 |
-
return true;
|
63 |
-
|
64 |
-
if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && ( bbp_get_forum_post_type() === $_GET['post_type'] ) )
|
65 |
-
return true;
|
66 |
|
67 |
-
|
68 |
-
|
|
|
69 |
|
70 |
-
return
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* Check if we are viewing a forum archive.
|
75 |
*
|
76 |
* @since bbPress (r3251)
|
77 |
-
*
|
78 |
* @uses is_post_type_archive() To check if we are looking at the forum archive
|
79 |
* @uses bbp_get_forum_post_type() To get the forum post type ID
|
80 |
*
|
81 |
* @return bool
|
82 |
*/
|
83 |
function bbp_is_forum_archive() {
|
84 |
-
|
85 |
-
|
86 |
// Default to false
|
87 |
$retval = false;
|
88 |
|
89 |
// In forum archive
|
90 |
-
if ( is_post_type_archive( bbp_get_forum_post_type() ) )
|
91 |
$retval = true;
|
92 |
-
|
93 |
-
return apply_filters( 'bbp_is_forum_archive',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -106,50 +142,61 @@ function bbp_is_forum_archive() {
|
|
106 |
* @return bool True if it's a topic page, false if not
|
107 |
*/
|
108 |
function bbp_is_topic( $post_id = 0 ) {
|
109 |
-
global $bbp, $wp_query;
|
110 |
|
111 |
-
//
|
112 |
-
|
113 |
-
return false;
|
114 |
|
115 |
-
|
|
|
|
|
116 |
|
117 |
-
|
118 |
-
|
119 |
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
|
126 |
-
|
127 |
-
|
|
|
128 |
|
129 |
-
return
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
* Check if we are viewing a topic archive.
|
134 |
*
|
135 |
* @since bbPress (r3251)
|
136 |
-
*
|
137 |
* @uses is_post_type_archive() To check if we are looking at the topic archive
|
138 |
* @uses bbp_get_topic_post_type() To get the topic post type ID
|
139 |
*
|
140 |
* @return bool
|
141 |
*/
|
142 |
function bbp_is_topic_archive() {
|
143 |
-
global $bbp;
|
144 |
|
145 |
// Default to false
|
146 |
$retval = false;
|
147 |
|
148 |
// In topic archive
|
149 |
-
if ( is_post_type_archive( bbp_get_topic_post_type() ) )
|
150 |
$retval = true;
|
151 |
-
|
152 |
-
return apply_filters( 'bbp_is_topic_archive',
|
153 |
}
|
154 |
|
155 |
/**
|
@@ -163,7 +210,7 @@ function bbp_is_topic_archive() {
|
|
163 |
function bbp_is_topic_edit() {
|
164 |
global $wp_query;
|
165 |
|
166 |
-
if ( !empty( $wp_query->bbp_is_topic_edit ) && $wp_query->bbp_is_topic_edit == true )
|
167 |
return true;
|
168 |
|
169 |
return false;
|
@@ -207,12 +254,29 @@ function bbp_is_topic_split() {
|
|
207 |
* @since bbPress (r3311)
|
208 |
*
|
209 |
* @global bbPress $bbp
|
210 |
-
* @return bool True if it's a topic tag, false if not
|
211 |
*/
|
212 |
function bbp_is_topic_tag() {
|
213 |
global $bbp;
|
214 |
|
215 |
-
if ( is_tax( $bbp->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
return true;
|
217 |
|
218 |
return false;
|
@@ -262,27 +326,15 @@ function bbp_is_custom_post_type() {
|
|
262 |
* @return bool True if it's a reply page, false if not
|
263 |
*/
|
264 |
function bbp_is_reply( $post_id = 0 ) {
|
265 |
-
global $bbp, $wp_query;
|
266 |
-
|
267 |
-
// Return false if it's a edit reply page
|
268 |
-
if ( bbp_is_reply_edit() )
|
269 |
-
return false;
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
if ( is_singular( bbp_get_reply_post_type() ) )
|
274 |
-
return true;
|
275 |
-
|
276 |
-
if ( isset( $wp_query->query_vars['post_type'] ) && ( bbp_get_reply_post_type() === $wp_query->query_vars['post_type'] ) )
|
277 |
-
return true;
|
278 |
-
|
279 |
-
if ( isset( $_GET['post_type'] ) && !empty( $_GET['post_type'] ) && ( bbp_get_reply_post_type() === $_GET['post_type'] ) )
|
280 |
-
return true;
|
281 |
|
282 |
-
|
283 |
-
|
|
|
284 |
|
285 |
-
return
|
286 |
}
|
287 |
|
288 |
/**
|
@@ -302,6 +354,30 @@ function bbp_is_reply_edit() {
|
|
302 |
return false;
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
/**
|
306 |
* Check if current page is a bbPress user's favorites page (profile page)
|
307 |
*
|
@@ -314,7 +390,7 @@ function bbp_is_favorites() {
|
|
314 |
|
315 |
$retval = bbp_is_query_name( 'bbp_user_profile_favorites' );
|
316 |
|
317 |
-
return apply_filters( 'bbp_is_favorites',
|
318 |
}
|
319 |
|
320 |
/**
|
@@ -329,7 +405,7 @@ function bbp_is_subscriptions() {
|
|
329 |
|
330 |
$retval = bbp_is_query_name( 'bbp_user_profile_subscriptions' );
|
331 |
|
332 |
-
return apply_filters( 'bbp_is_subscriptions',
|
333 |
}
|
334 |
|
335 |
/**
|
@@ -345,7 +421,7 @@ function bbp_is_topics_created() {
|
|
345 |
|
346 |
$retval = bbp_is_query_name( 'bbp_user_profile_topics_created' );
|
347 |
|
348 |
-
return apply_filters( 'bbp_is_topics_created',
|
349 |
}
|
350 |
|
351 |
/**
|
@@ -425,12 +501,12 @@ function bbp_is_single_view() {
|
|
425 |
*
|
426 |
* @param array $wp_classes
|
427 |
* @param array $custom_classes
|
428 |
-
* @uses
|
429 |
-
* @uses
|
430 |
* @uses bbp_is_topic_edit()
|
431 |
* @uses bbp_is_topic_merge()
|
432 |
* @uses bbp_is_topic_split()
|
433 |
-
* @uses
|
434 |
* @uses bbp_is_reply_edit()
|
435 |
* @uses bbp_is_reply_edit()
|
436 |
* @uses bbp_is_single_view()
|
@@ -450,18 +526,21 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
450 |
|
451 |
if ( bbp_is_forum_archive() )
|
452 |
$bbp_classes[] = bbp_get_forum_post_type() . '-archive';
|
453 |
-
|
454 |
if ( bbp_is_topic_archive() )
|
455 |
$bbp_classes[] = bbp_get_topic_post_type() . '-archive';
|
456 |
-
|
457 |
/** Components ************************************************************/
|
458 |
|
459 |
-
if (
|
460 |
$bbp_classes[] = bbp_get_forum_post_type();
|
461 |
|
462 |
-
if (
|
463 |
$bbp_classes[] = bbp_get_topic_post_type();
|
464 |
|
|
|
|
|
|
|
465 |
if ( bbp_is_topic_edit() )
|
466 |
$bbp_classes[] = bbp_get_topic_post_type() . '-edit';
|
467 |
|
@@ -471,9 +550,6 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
471 |
if ( bbp_is_topic_split() )
|
472 |
$bbp_classes[] = bbp_get_topic_post_type() . '-split';
|
473 |
|
474 |
-
if ( bbp_is_reply() )
|
475 |
-
$bbp_classes[] = bbp_get_reply_post_type();
|
476 |
-
|
477 |
if ( bbp_is_reply_edit() )
|
478 |
$bbp_classes[] = bbp_get_reply_post_type() . '-edit';
|
479 |
|
@@ -533,6 +609,95 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
533 |
return apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
|
534 |
}
|
535 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
/** Forms *********************************************************************/
|
537 |
|
538 |
/**
|
@@ -866,7 +1031,7 @@ function bbp_dropdown( $args = '' ) {
|
|
866 |
* @uses bbp_is_topic_edit() To check if it's the topic edit page
|
867 |
* @uses wp_nonce_field() To generate hidden nonce fields
|
868 |
* @uses bbp_topic_id() To output the topic id
|
869 |
-
* @uses
|
870 |
* @uses bbp_forum_id() To output the forum id
|
871 |
*/
|
872 |
function bbp_topic_form_fields() {
|
@@ -887,7 +1052,7 @@ function bbp_topic_form_fields() {
|
|
887 |
|
888 |
else :
|
889 |
|
890 |
-
if (
|
891 |
|
892 |
<input type="hidden" name="bbp_forum_id" id="bbp_forum_id" value="<?php bbp_forum_id(); ?>" />
|
893 |
|
@@ -952,16 +1117,16 @@ function bbp_reply_form_fields() {
|
|
952 |
?>
|
953 |
|
954 |
<?php
|
955 |
-
|
956 |
wp_nonce_field( 'bbp-new-reply' );
|
957 |
|
958 |
// Show redirect field if not viewing a specific topic
|
959 |
-
if (
|
960 |
|
961 |
<input type="hidden" name="redirect_to" id="bbp_redirect_to" value="<?php the_permalink(); ?>" />
|
962 |
|
963 |
<?php endif;
|
964 |
-
|
965 |
}
|
966 |
}
|
967 |
|
@@ -1263,11 +1428,11 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1263 |
|
1264 |
// No custom home text
|
1265 |
if ( empty( $args['home_text'] ) ) {
|
1266 |
-
|
1267 |
// Set home text to page title
|
1268 |
if ( $front_id = get_option( 'page_on_front' ) ) {
|
1269 |
$pre_front_text = get_the_title( $front_id );
|
1270 |
-
|
1271 |
// Default to 'Home'
|
1272 |
} else {
|
1273 |
$pre_front_text = __( 'Home', 'bbpress' );
|
@@ -1283,7 +1448,7 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1283 |
}
|
1284 |
$pre_root_text = bbp_get_forum_archive_title();
|
1285 |
}
|
1286 |
-
|
1287 |
/** Includes **********************************************************/
|
1288 |
|
1289 |
// Root slug is also the front page
|
@@ -1299,7 +1464,7 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1299 |
$pre_include_root = false;
|
1300 |
|
1301 |
/** Current Text ******************************************************/
|
1302 |
-
|
1303 |
// Forum archive
|
1304 |
if ( bbp_is_forum_archive() )
|
1305 |
$pre_current_text = bbp_get_forum_archive_title();
|
@@ -1313,21 +1478,25 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1313 |
$pre_current_text = bbp_get_view_title();
|
1314 |
|
1315 |
// Single Forum
|
1316 |
-
elseif (
|
1317 |
$pre_current_text = bbp_get_forum_title();
|
1318 |
|
1319 |
// Single Topic
|
1320 |
-
elseif (
|
1321 |
$pre_current_text = bbp_get_topic_title();
|
1322 |
|
1323 |
// Single Topic
|
1324 |
-
elseif (
|
1325 |
$pre_current_text = bbp_get_reply_title();
|
1326 |
|
1327 |
// Topic Tag
|
1328 |
-
elseif (
|
1329 |
$pre_current_text = sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() );
|
1330 |
|
|
|
|
|
|
|
|
|
1331 |
// Single
|
1332 |
else
|
1333 |
$pre_current_text = get_the_title();
|
@@ -1355,7 +1524,7 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1355 |
'include_current' => $pre_include_current,
|
1356 |
'current_text' => $pre_current_text
|
1357 |
);
|
1358 |
-
$r = apply_filters( 'bbp_get_breadcrumb_pre', wp_parse_args( $args, $defaults ) );
|
1359 |
extract( $r );
|
1360 |
|
1361 |
/** Ancestors *********************************************************/
|
@@ -1370,11 +1539,11 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1370 |
|
1371 |
// Do we want to include a link to the forum root?
|
1372 |
if ( !empty( $include_root ) || empty( $root_text ) ) {
|
1373 |
-
|
1374 |
// Page exists at root slug path, so use its permalink
|
1375 |
if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) {
|
1376 |
$root_url = get_permalink( $page->ID );
|
1377 |
-
|
1378 |
// Use the root slug
|
1379 |
} else {
|
1380 |
$root_url = get_post_type_archive_link( bbp_get_forum_post_type() );
|
@@ -1416,6 +1585,10 @@ function bbp_breadcrumb( $args = array() ) {
|
|
1416 |
break;
|
1417 |
}
|
1418 |
}
|
|
|
|
|
|
|
|
|
1419 |
}
|
1420 |
|
1421 |
/** Current ***********************************************************/
|
@@ -1491,7 +1664,7 @@ function bbp_template_notices() {
|
|
1491 |
global $bbp;
|
1492 |
|
1493 |
// Bail if no notices or errors
|
1494 |
-
if ( !isset( $bbp->errors ) || !
|
1495 |
return;
|
1496 |
|
1497 |
// Define local variable(s)
|
@@ -1580,11 +1753,11 @@ function bbp_logout_link( $redirect_to = '' ) {
|
|
1580 |
* @uses bbp_is_user_home() To check if the profile page is of the current user
|
1581 |
* @uses get_query_var() To get the user id
|
1582 |
* @uses get_userdata() To get the user data
|
1583 |
-
* @uses
|
1584 |
* @uses bbp_get_forum_title() To get the forum title
|
1585 |
-
* @uses
|
1586 |
* @uses bbp_get_topic_title() To get the topic title
|
1587 |
-
* @uses
|
1588 |
* @uses bbp_get_reply_title() To get the reply title
|
1589 |
* @uses is_tax() To check if it's the tag page
|
1590 |
* @uses get_queried_object() To get the queried object
|
@@ -1596,7 +1769,6 @@ function bbp_logout_link( $redirect_to = '' ) {
|
|
1596 |
* @return string The tite
|
1597 |
*/
|
1598 |
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
1599 |
-
global $bbp;
|
1600 |
|
1601 |
// Store original title to compare
|
1602 |
$_title = $title;
|
@@ -1614,19 +1786,19 @@ function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
|
1614 |
/** Singles ***************************************************************/
|
1615 |
|
1616 |
// Forum page
|
1617 |
-
} elseif (
|
1618 |
$title = sprintf( __( 'Forum: %s', 'bbpress' ), bbp_get_forum_title() );
|
1619 |
|
1620 |
// Topic page
|
1621 |
-
} elseif (
|
1622 |
$title = sprintf( __( 'Topic: %s', 'bbpress' ), bbp_get_topic_title() );
|
1623 |
|
1624 |
// Replies
|
1625 |
-
} elseif (
|
1626 |
$title = bbp_get_reply_title();
|
1627 |
|
1628 |
// Topic tag page
|
1629 |
-
} elseif (
|
1630 |
$term = get_queried_object();
|
1631 |
$title = sprintf( __( 'Topic Tag: %s', 'bbpress' ), $term->name );
|
1632 |
|
@@ -1638,7 +1810,7 @@ function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
|
1638 |
// Current users profile
|
1639 |
if ( bbp_is_user_home() ) {
|
1640 |
$title = __( 'Your Profile', 'bbpress' );
|
1641 |
-
|
1642 |
// Other users profile
|
1643 |
} else {
|
1644 |
$userdata = get_userdata( get_query_var( 'bbp_user_id' ) );
|
@@ -1651,7 +1823,7 @@ function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
|
1651 |
// Current users profile
|
1652 |
if ( bbp_is_user_home() ) {
|
1653 |
$title = __( 'Edit Your Profile', 'bbpress' );
|
1654 |
-
|
1655 |
// Other users profile
|
1656 |
} else {
|
1657 |
$userdata = get_userdata( get_query_var( 'bbp_user_id' ) );
|
36 |
|
37 |
/** is_ ***********************************************************************/
|
38 |
|
39 |
+
/**
|
40 |
+
* Check if current site is public
|
41 |
+
*
|
42 |
+
* @since bbPress (r3398)
|
43 |
+
*
|
44 |
+
* @global WPDB $wpdb
|
45 |
+
* @param int $site_id
|
46 |
+
* @return bool True if site is public, false if private
|
47 |
+
*/
|
48 |
+
function bbp_is_site_public( $site_id = 0 ) {
|
49 |
+
|
50 |
+
// Get the current site ID
|
51 |
+
if ( empty( $site_id ) ) {
|
52 |
+
global $wpdb;
|
53 |
+
|
54 |
+
$site_id = (int) $wpdb->blogid;
|
55 |
+
}
|
56 |
+
|
57 |
+
// Get the site visibility setting
|
58 |
+
$public = get_blog_option( $site_id, 'blog_public', 1 );
|
59 |
+
|
60 |
+
return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id );
|
61 |
+
}
|
62 |
+
|
63 |
/**
|
64 |
* Check if current page is a bbPress forum
|
65 |
*
|
72 |
* @return bool True if it's a forum page, false if not
|
73 |
*/
|
74 |
function bbp_is_forum( $post_id = 0 ) {
|
|
|
75 |
|
76 |
+
// Assume false
|
77 |
+
$retval = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
+
// Supplied ID is a forum
|
80 |
+
if ( !empty( $post_id ) && ( bbp_get_forum_post_type() == get_post_type( $post_id ) ))
|
81 |
+
$retval = true;
|
82 |
|
83 |
+
return (bool) apply_filters( 'bbp_is_forum', $retval, $post_id );
|
84 |
}
|
85 |
|
86 |
/**
|
87 |
* Check if we are viewing a forum archive.
|
88 |
*
|
89 |
* @since bbPress (r3251)
|
90 |
+
*
|
91 |
* @uses is_post_type_archive() To check if we are looking at the forum archive
|
92 |
* @uses bbp_get_forum_post_type() To get the forum post type ID
|
93 |
*
|
94 |
* @return bool
|
95 |
*/
|
96 |
function bbp_is_forum_archive() {
|
97 |
+
|
|
|
98 |
// Default to false
|
99 |
$retval = false;
|
100 |
|
101 |
// In forum archive
|
102 |
+
if ( is_post_type_archive( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_forum_archive' ) )
|
103 |
$retval = true;
|
104 |
+
|
105 |
+
return (bool) apply_filters( 'bbp_is_forum_archive', $retval );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Viewing a single forum
|
110 |
+
*
|
111 |
+
* @since bbPress (r3338)
|
112 |
+
*
|
113 |
+
* @uses is_single()
|
114 |
+
* @uses bbp_get_forum_post_type()
|
115 |
+
* @uses get_post_type()
|
116 |
+
* @uses apply_filters()
|
117 |
+
*
|
118 |
+
* @return bool
|
119 |
+
*/
|
120 |
+
function bbp_is_single_forum() {
|
121 |
+
|
122 |
+
// Assume false
|
123 |
+
$retval = false;
|
124 |
+
|
125 |
+
// Single and a match
|
126 |
+
if ( is_singular( bbp_get_forum_post_type() ) || bbp_is_query_name( 'bbp_single_forum' ) )
|
127 |
+
$retval = true;
|
128 |
+
|
129 |
+
return (bool) apply_filters( 'bbp_is_single_forum', $retval );
|
130 |
}
|
131 |
|
132 |
/**
|
142 |
* @return bool True if it's a topic page, false if not
|
143 |
*/
|
144 |
function bbp_is_topic( $post_id = 0 ) {
|
|
|
145 |
|
146 |
+
// Assume false
|
147 |
+
$retval = false;
|
|
|
148 |
|
149 |
+
// Supplied ID is a topic
|
150 |
+
if ( !empty( $post_id ) && ( bbp_get_topic_post_type() == get_post_type( $post_id ) ) )
|
151 |
+
$retval = true;
|
152 |
|
153 |
+
return (bool) apply_filters( 'bbp_is_topic', $retval, $post_id );
|
154 |
+
}
|
155 |
|
156 |
+
/**
|
157 |
+
* Viewing a single topic
|
158 |
+
*
|
159 |
+
* @since bbPress (r3338)
|
160 |
+
*
|
161 |
+
* @uses is_single()
|
162 |
+
* @uses bbp_get_topic_post_type()
|
163 |
+
* @uses get_post_type()
|
164 |
+
* @uses apply_filters()
|
165 |
+
*
|
166 |
+
* @return bool
|
167 |
+
*/
|
168 |
+
function bbp_is_single_topic() {
|
169 |
|
170 |
+
// Assume false
|
171 |
+
$retval = false;
|
172 |
|
173 |
+
// Single and a match
|
174 |
+
if ( is_singular( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_single_topic' ) )
|
175 |
+
$retval = true;
|
176 |
|
177 |
+
return (bool) apply_filters( 'bbp_is_single_topic', $retval );
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
* Check if we are viewing a topic archive.
|
182 |
*
|
183 |
* @since bbPress (r3251)
|
184 |
+
*
|
185 |
* @uses is_post_type_archive() To check if we are looking at the topic archive
|
186 |
* @uses bbp_get_topic_post_type() To get the topic post type ID
|
187 |
*
|
188 |
* @return bool
|
189 |
*/
|
190 |
function bbp_is_topic_archive() {
|
|
|
191 |
|
192 |
// Default to false
|
193 |
$retval = false;
|
194 |
|
195 |
// In topic archive
|
196 |
+
if ( is_post_type_archive( bbp_get_topic_post_type() ) || bbp_is_query_name( 'bbp_topic_archive' ) )
|
197 |
$retval = true;
|
198 |
+
|
199 |
+
return (bool) apply_filters( 'bbp_is_topic_archive', $retval );
|
200 |
}
|
201 |
|
202 |
/**
|
210 |
function bbp_is_topic_edit() {
|
211 |
global $wp_query;
|
212 |
|
213 |
+
if ( !empty( $wp_query->bbp_is_topic_edit ) && ( $wp_query->bbp_is_topic_edit == true ) )
|
214 |
return true;
|
215 |
|
216 |
return false;
|
254 |
* @since bbPress (r3311)
|
255 |
*
|
256 |
* @global bbPress $bbp
|
257 |
+
* @return bool True if it's a topic tag, false if not
|
258 |
*/
|
259 |
function bbp_is_topic_tag() {
|
260 |
global $bbp;
|
261 |
|
262 |
+
if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) )
|
263 |
+
return true;
|
264 |
+
|
265 |
+
return false;
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Check if the current page is editing a topic tag
|
270 |
+
*
|
271 |
+
* @since bbPress (r3346)
|
272 |
+
*
|
273 |
+
* @uses WP_Query Checks if WP_Query::bbp_is_topic_tag_edit is true
|
274 |
+
* @return bool True if editing a topic tag, false if not
|
275 |
+
*/
|
276 |
+
function bbp_is_topic_tag_edit() {
|
277 |
+
global $wp_query;
|
278 |
+
|
279 |
+
if ( !empty( $wp_query->bbp_is_topic_tag_edit ) && ( true == $wp_query->bbp_is_topic_tag_edit ) )
|
280 |
return true;
|
281 |
|
282 |
return false;
|
326 |
* @return bool True if it's a reply page, false if not
|
327 |
*/
|
328 |
function bbp_is_reply( $post_id = 0 ) {
|
|
|
|
|
|
|
|
|
|
|
329 |
|
330 |
+
// Assume false
|
331 |
+
$retval = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
+
// Supplied ID is a reply
|
334 |
+
if ( !empty( $post_id ) && ( bbp_get_reply_post_type() == get_post_type( $post_id ) ) )
|
335 |
+
$retval = true;
|
336 |
|
337 |
+
return (bool) apply_filters( 'bbp_is_reply', $retval, $post_id );
|
338 |
}
|
339 |
|
340 |
/**
|
354 |
return false;
|
355 |
}
|
356 |
|
357 |
+
/**
|
358 |
+
* Viewing a single reply
|
359 |
+
*
|
360 |
+
* @since bbPress (r3344)
|
361 |
+
*
|
362 |
+
* @uses is_single()
|
363 |
+
* @uses bbp_get_reply_post_type()
|
364 |
+
* @uses get_post_type()
|
365 |
+
* @uses apply_filters()
|
366 |
+
*
|
367 |
+
* @return bool
|
368 |
+
*/
|
369 |
+
function bbp_is_single_reply() {
|
370 |
+
|
371 |
+
// Assume false
|
372 |
+
$retval = false;
|
373 |
+
|
374 |
+
// Single and a match
|
375 |
+
if ( is_singular( bbp_get_reply_post_type() ) || ( bbp_is_query_name( 'bbp_single_reply' ) ) )
|
376 |
+
$retval = true;
|
377 |
+
|
378 |
+
return (bool) apply_filters( 'bbp_is_single_reply', $retval );
|
379 |
+
}
|
380 |
+
|
381 |
/**
|
382 |
* Check if current page is a bbPress user's favorites page (profile page)
|
383 |
*
|
390 |
|
391 |
$retval = bbp_is_query_name( 'bbp_user_profile_favorites' );
|
392 |
|
393 |
+
return (bool) apply_filters( 'bbp_is_favorites', $retval );
|
394 |
}
|
395 |
|
396 |
/**
|
405 |
|
406 |
$retval = bbp_is_query_name( 'bbp_user_profile_subscriptions' );
|
407 |
|
408 |
+
return (bool) apply_filters( 'bbp_is_subscriptions', $retval );
|
409 |
}
|
410 |
|
411 |
/**
|
421 |
|
422 |
$retval = bbp_is_query_name( 'bbp_user_profile_topics_created' );
|
423 |
|
424 |
+
return (bool) apply_filters( 'bbp_is_topics_created', $retval );
|
425 |
}
|
426 |
|
427 |
/**
|
501 |
*
|
502 |
* @param array $wp_classes
|
503 |
* @param array $custom_classes
|
504 |
+
* @uses bbp_is_single_forum()
|
505 |
+
* @uses bbp_is_single_topic()
|
506 |
* @uses bbp_is_topic_edit()
|
507 |
* @uses bbp_is_topic_merge()
|
508 |
* @uses bbp_is_topic_split()
|
509 |
+
* @uses bbp_is_single_reply()
|
510 |
* @uses bbp_is_reply_edit()
|
511 |
* @uses bbp_is_reply_edit()
|
512 |
* @uses bbp_is_single_view()
|
526 |
|
527 |
if ( bbp_is_forum_archive() )
|
528 |
$bbp_classes[] = bbp_get_forum_post_type() . '-archive';
|
529 |
+
|
530 |
if ( bbp_is_topic_archive() )
|
531 |
$bbp_classes[] = bbp_get_topic_post_type() . '-archive';
|
532 |
+
|
533 |
/** Components ************************************************************/
|
534 |
|
535 |
+
if ( bbp_is_single_forum() )
|
536 |
$bbp_classes[] = bbp_get_forum_post_type();
|
537 |
|
538 |
+
if ( bbp_is_single_topic() )
|
539 |
$bbp_classes[] = bbp_get_topic_post_type();
|
540 |
|
541 |
+
if ( bbp_is_single_reply() )
|
542 |
+
$bbp_classes[] = bbp_get_reply_post_type();
|
543 |
+
|
544 |
if ( bbp_is_topic_edit() )
|
545 |
$bbp_classes[] = bbp_get_topic_post_type() . '-edit';
|
546 |
|
550 |
if ( bbp_is_topic_split() )
|
551 |
$bbp_classes[] = bbp_get_topic_post_type() . '-split';
|
552 |
|
|
|
|
|
|
|
553 |
if ( bbp_is_reply_edit() )
|
554 |
$bbp_classes[] = bbp_get_reply_post_type() . '-edit';
|
555 |
|
609 |
return apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
|
610 |
}
|
611 |
|
612 |
+
/**
|
613 |
+
* Use the above is_() functions to return if in any bbPress page
|
614 |
+
*
|
615 |
+
* @since bbPress (r3344)
|
616 |
+
*
|
617 |
+
* @uses bbp_is_single_forum()
|
618 |
+
* @uses bbp_is_single_topic()
|
619 |
+
* @uses bbp_is_topic_edit()
|
620 |
+
* @uses bbp_is_topic_merge()
|
621 |
+
* @uses bbp_is_topic_split()
|
622 |
+
* @uses bbp_is_single_reply()
|
623 |
+
* @uses bbp_is_reply_edit()
|
624 |
+
* @uses bbp_is_reply_edit()
|
625 |
+
* @uses bbp_is_single_view()
|
626 |
+
* @uses bbp_is_single_user_edit()
|
627 |
+
* @uses bbp_is_single_user()
|
628 |
+
* @uses bbp_is_user_home()
|
629 |
+
* @uses bbp_is_subscriptions()
|
630 |
+
* @uses bbp_is_favorites()
|
631 |
+
* @uses bbp_is_topics_created()
|
632 |
+
* @return bool In a bbPress page
|
633 |
+
*/
|
634 |
+
function is_bbpress() {
|
635 |
+
|
636 |
+
// Defalt to false
|
637 |
+
$retval = false;
|
638 |
+
|
639 |
+
/** Archives **************************************************************/
|
640 |
+
|
641 |
+
if ( bbp_is_forum_archive() )
|
642 |
+
$retval = true;
|
643 |
+
|
644 |
+
elseif ( bbp_is_topic_archive() )
|
645 |
+
$retval = true;
|
646 |
+
|
647 |
+
elseif ( bbp_is_topic_tag() )
|
648 |
+
$retval = true;
|
649 |
+
|
650 |
+
/** Components ************************************************************/
|
651 |
+
|
652 |
+
elseif ( bbp_is_single_forum() )
|
653 |
+
$retval = true;
|
654 |
+
|
655 |
+
elseif ( bbp_is_single_topic() )
|
656 |
+
$retval = true;
|
657 |
+
|
658 |
+
elseif ( bbp_is_single_reply() )
|
659 |
+
$retval = true;
|
660 |
+
|
661 |
+
elseif ( bbp_is_topic_edit() )
|
662 |
+
$retval = true;
|
663 |
+
|
664 |
+
elseif ( bbp_is_topic_merge() )
|
665 |
+
$retval = true;
|
666 |
+
|
667 |
+
elseif ( bbp_is_topic_split() )
|
668 |
+
$retval = true;
|
669 |
+
|
670 |
+
elseif ( bbp_is_reply_edit() )
|
671 |
+
$retval = true;
|
672 |
+
|
673 |
+
elseif ( bbp_is_single_view() )
|
674 |
+
$retval = true;
|
675 |
+
|
676 |
+
/** User ******************************************************************/
|
677 |
+
|
678 |
+
elseif ( bbp_is_single_user_edit() )
|
679 |
+
$retval = true;
|
680 |
+
|
681 |
+
elseif ( bbp_is_single_user() )
|
682 |
+
$retval = true;
|
683 |
+
|
684 |
+
elseif ( bbp_is_user_home() )
|
685 |
+
$retval = true;
|
686 |
+
|
687 |
+
elseif ( bbp_is_topics_created() )
|
688 |
+
$retval = true;
|
689 |
+
|
690 |
+
elseif ( bbp_is_favorites() )
|
691 |
+
$retval = true;
|
692 |
+
|
693 |
+
elseif ( bbp_is_subscriptions() )
|
694 |
+
$retval = true;
|
695 |
+
|
696 |
+
/** Done ******************************************************************/
|
697 |
+
|
698 |
+
return apply_filters( 'is_bbpress', $retval );
|
699 |
+
}
|
700 |
+
|
701 |
/** Forms *********************************************************************/
|
702 |
|
703 |
/**
|
1031 |
* @uses bbp_is_topic_edit() To check if it's the topic edit page
|
1032 |
* @uses wp_nonce_field() To generate hidden nonce fields
|
1033 |
* @uses bbp_topic_id() To output the topic id
|
1034 |
+
* @uses bbp_is_single_forum() To check if it's a forum page
|
1035 |
* @uses bbp_forum_id() To output the forum id
|
1036 |
*/
|
1037 |
function bbp_topic_form_fields() {
|
1052 |
|
1053 |
else :
|
1054 |
|
1055 |
+
if ( bbp_is_single_forum() ) : ?>
|
1056 |
|
1057 |
<input type="hidden" name="bbp_forum_id" id="bbp_forum_id" value="<?php bbp_forum_id(); ?>" />
|
1058 |
|
1117 |
?>
|
1118 |
|
1119 |
<?php
|
1120 |
+
|
1121 |
wp_nonce_field( 'bbp-new-reply' );
|
1122 |
|
1123 |
// Show redirect field if not viewing a specific topic
|
1124 |
+
if ( bbp_is_query_name( 'bbp_single_topic' ) ) : ?>
|
1125 |
|
1126 |
<input type="hidden" name="redirect_to" id="bbp_redirect_to" value="<?php the_permalink(); ?>" />
|
1127 |
|
1128 |
<?php endif;
|
1129 |
+
|
1130 |
}
|
1131 |
}
|
1132 |
|
1428 |
|
1429 |
// No custom home text
|
1430 |
if ( empty( $args['home_text'] ) ) {
|
1431 |
+
|
1432 |
// Set home text to page title
|
1433 |
if ( $front_id = get_option( 'page_on_front' ) ) {
|
1434 |
$pre_front_text = get_the_title( $front_id );
|
1435 |
+
|
1436 |
// Default to 'Home'
|
1437 |
} else {
|
1438 |
$pre_front_text = __( 'Home', 'bbpress' );
|
1448 |
}
|
1449 |
$pre_root_text = bbp_get_forum_archive_title();
|
1450 |
}
|
1451 |
+
|
1452 |
/** Includes **********************************************************/
|
1453 |
|
1454 |
// Root slug is also the front page
|
1464 |
$pre_include_root = false;
|
1465 |
|
1466 |
/** Current Text ******************************************************/
|
1467 |
+
|
1468 |
// Forum archive
|
1469 |
if ( bbp_is_forum_archive() )
|
1470 |
$pre_current_text = bbp_get_forum_archive_title();
|
1478 |
$pre_current_text = bbp_get_view_title();
|
1479 |
|
1480 |
// Single Forum
|
1481 |
+
elseif ( bbp_is_single_forum() )
|
1482 |
$pre_current_text = bbp_get_forum_title();
|
1483 |
|
1484 |
// Single Topic
|
1485 |
+
elseif ( bbp_is_single_topic() )
|
1486 |
$pre_current_text = bbp_get_topic_title();
|
1487 |
|
1488 |
// Single Topic
|
1489 |
+
elseif ( bbp_is_single_reply() )
|
1490 |
$pre_current_text = bbp_get_reply_title();
|
1491 |
|
1492 |
// Topic Tag
|
1493 |
+
elseif ( bbp_is_topic_tag() )
|
1494 |
$pre_current_text = sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() );
|
1495 |
|
1496 |
+
// Edit Topic Tag
|
1497 |
+
elseif ( bbp_is_topic_tag_edit() )
|
1498 |
+
$pre_current_text = __( 'Edit', 'bbpress' );
|
1499 |
+
|
1500 |
// Single
|
1501 |
else
|
1502 |
$pre_current_text = get_the_title();
|
1524 |
'include_current' => $pre_include_current,
|
1525 |
'current_text' => $pre_current_text
|
1526 |
);
|
1527 |
+
$r = apply_filters( 'bbp_get_breadcrumb_pre', wp_parse_args( $args, $defaults ) );
|
1528 |
extract( $r );
|
1529 |
|
1530 |
/** Ancestors *********************************************************/
|
1539 |
|
1540 |
// Do we want to include a link to the forum root?
|
1541 |
if ( !empty( $include_root ) || empty( $root_text ) ) {
|
1542 |
+
|
1543 |
// Page exists at root slug path, so use its permalink
|
1544 |
if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) {
|
1545 |
$root_url = get_permalink( $page->ID );
|
1546 |
+
|
1547 |
// Use the root slug
|
1548 |
} else {
|
1549 |
$root_url = get_post_type_archive_link( bbp_get_forum_post_type() );
|
1585 |
break;
|
1586 |
}
|
1587 |
}
|
1588 |
+
|
1589 |
+
// Edit topic tag
|
1590 |
+
} elseif ( bbp_is_topic_tag_edit() ) {
|
1591 |
+
$breadcrumbs[] = '<a href="' . get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) . '">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>';
|
1592 |
}
|
1593 |
|
1594 |
/** Current ***********************************************************/
|
1664 |
global $bbp;
|
1665 |
|
1666 |
// Bail if no notices or errors
|
1667 |
+
if ( !isset( $bbp->errors ) || !bbp_has_errors() )
|
1668 |
return;
|
1669 |
|
1670 |
// Define local variable(s)
|
1753 |
* @uses bbp_is_user_home() To check if the profile page is of the current user
|
1754 |
* @uses get_query_var() To get the user id
|
1755 |
* @uses get_userdata() To get the user data
|
1756 |
+
* @uses bbp_is_single_forum() To check if it's a forum
|
1757 |
* @uses bbp_get_forum_title() To get the forum title
|
1758 |
+
* @uses bbp_is_single_topic() To check if it's a topic
|
1759 |
* @uses bbp_get_topic_title() To get the topic title
|
1760 |
+
* @uses bbp_is_single_reply() To check if it's a reply
|
1761 |
* @uses bbp_get_reply_title() To get the reply title
|
1762 |
* @uses is_tax() To check if it's the tag page
|
1763 |
* @uses get_queried_object() To get the queried object
|
1769 |
* @return string The tite
|
1770 |
*/
|
1771 |
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
|
|
1772 |
|
1773 |
// Store original title to compare
|
1774 |
$_title = $title;
|
1786 |
/** Singles ***************************************************************/
|
1787 |
|
1788 |
// Forum page
|
1789 |
+
} elseif ( bbp_is_single_forum() ) {
|
1790 |
$title = sprintf( __( 'Forum: %s', 'bbpress' ), bbp_get_forum_title() );
|
1791 |
|
1792 |
// Topic page
|
1793 |
+
} elseif ( bbp_is_single_topic() ) {
|
1794 |
$title = sprintf( __( 'Topic: %s', 'bbpress' ), bbp_get_topic_title() );
|
1795 |
|
1796 |
// Replies
|
1797 |
+
} elseif ( bbp_is_single_reply() ) {
|
1798 |
$title = bbp_get_reply_title();
|
1799 |
|
1800 |
// Topic tag page
|
1801 |
+
} elseif ( bbp_is_topic_tag() ) {
|
1802 |
$term = get_queried_object();
|
1803 |
$title = sprintf( __( 'Topic Tag: %s', 'bbpress' ), $term->name );
|
1804 |
|
1810 |
// Current users profile
|
1811 |
if ( bbp_is_user_home() ) {
|
1812 |
$title = __( 'Your Profile', 'bbpress' );
|
1813 |
+
|
1814 |
// Other users profile
|
1815 |
} else {
|
1816 |
$userdata = get_userdata( get_query_var( 'bbp_user_id' ) );
|
1823 |
// Current users profile
|
1824 |
if ( bbp_is_user_home() ) {
|
1825 |
$title = __( 'Edit Your Profile', 'bbpress' );
|
1826 |
+
|
1827 |
// Other users profile
|
1828 |
} else {
|
1829 |
$userdata = get_userdata( get_query_var( 'bbp_user_id' ) );
|
bbp-includes/bbp-core-caps.php
CHANGED
@@ -148,6 +148,16 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
148 |
break;
|
149 |
|
150 |
// Editing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
case 'edit_forum' :
|
152 |
case 'edit_topic' :
|
153 |
case 'edit_reply' :
|
@@ -156,8 +166,15 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
156 |
$caps = array();
|
157 |
$post_type = get_post_type_object( $post->post_type );
|
158 |
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
160 |
$caps[] = $post_type->cap->edit_posts;
|
|
|
|
|
161 |
else
|
162 |
$caps[] = $post_type->cap->edit_others_posts;
|
163 |
}
|
@@ -171,8 +188,15 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
171 |
$caps = array();
|
172 |
$post_type = get_post_type_object( $post->post_type );
|
173 |
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
175 |
$caps[] = $post_type->cap->delete_posts;
|
|
|
|
|
176 |
else
|
177 |
$caps[] = $post_type->cap->delete_others_posts;
|
178 |
}
|
@@ -185,7 +209,14 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
185 |
if ( $post = get_post( $args[0] ) ) {
|
186 |
$caps = array();
|
187 |
$post_type = get_post_type_object( $post->post_type );
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
}
|
190 |
|
191 |
break;
|
@@ -403,4 +434,62 @@ function bbp_get_caps_for_role( $role = '' ) {
|
|
403 |
return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
|
404 |
}
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
?>
|
148 |
break;
|
149 |
|
150 |
// Editing
|
151 |
+
case 'edit_forums' :
|
152 |
+
case 'edit_topics' :
|
153 |
+
case 'edit_replies' :
|
154 |
+
|
155 |
+
// Add do_not_allow cap if user is spam or deleted
|
156 |
+
if ( bbp_is_user_spammer( $user_id ) || bbp_is_user_deleted( $user_id ) )
|
157 |
+
$caps = array( 'do_not_allow' );
|
158 |
+
|
159 |
+
break;
|
160 |
+
|
161 |
case 'edit_forum' :
|
162 |
case 'edit_topic' :
|
163 |
case 'edit_reply' :
|
166 |
$caps = array();
|
167 |
$post_type = get_post_type_object( $post->post_type );
|
168 |
|
169 |
+
// Add 'do_not_allow' cap if user is spam or deleted
|
170 |
+
if ( bbp_is_user_spammer( $user_id ) || bbp_is_user_deleted( $user_id ) )
|
171 |
+
$caps[] = 'do_not_allow';
|
172 |
+
|
173 |
+
// Map to edit_posts
|
174 |
+
elseif ( (int) $user_id == (int) $post->post_author )
|
175 |
$caps[] = $post_type->cap->edit_posts;
|
176 |
+
|
177 |
+
// Map to edit_others_posts
|
178 |
else
|
179 |
$caps[] = $post_type->cap->edit_others_posts;
|
180 |
}
|
188 |
$caps = array();
|
189 |
$post_type = get_post_type_object( $post->post_type );
|
190 |
|
191 |
+
// Add 'do_not_allow' cap if user is spam or deleted
|
192 |
+
if ( bbp_is_user_spammer( $user_id ) || bbp_is_user_deleted( $user_id ) )
|
193 |
+
$caps[] = 'do_not_allow';
|
194 |
+
|
195 |
+
// Map to delete_posts
|
196 |
+
elseif ( (int) $user_id == (int) $post->post_author )
|
197 |
$caps[] = $post_type->cap->delete_posts;
|
198 |
+
|
199 |
+
// Map to delete_others_posts
|
200 |
else
|
201 |
$caps[] = $post_type->cap->delete_others_posts;
|
202 |
}
|
209 |
if ( $post = get_post( $args[0] ) ) {
|
210 |
$caps = array();
|
211 |
$post_type = get_post_type_object( $post->post_type );
|
212 |
+
|
213 |
+
// Add 'do_not_allow' cap if user is spam or deleted
|
214 |
+
if ( bbp_is_user_spammer( $user_id ) || bbp_is_user_deleted( $user_id ) )
|
215 |
+
$caps[] = 'do_not_allow';
|
216 |
+
|
217 |
+
// Map to delete_others_posts
|
218 |
+
else
|
219 |
+
$caps[] = $post_type->cap->delete_others_posts;
|
220 |
}
|
221 |
|
222 |
break;
|
434 |
return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
|
435 |
}
|
436 |
|
437 |
+
/**
|
438 |
+
* Add the default role and mapped bbPress caps to the current user if needed
|
439 |
+
*
|
440 |
+
* This function will bail if the forum is not global in a multisite
|
441 |
+
* installation of WordPress, or if the user is marked as spam or deleted.
|
442 |
+
*
|
443 |
+
* @since bbPress (r3380)
|
444 |
+
*
|
445 |
+
* @uses is_multisite()
|
446 |
+
* @uses bbp_allow_global_access()
|
447 |
+
* @uses bbp_is_user_deleted()
|
448 |
+
* @uses bbp_is_user_spammer()
|
449 |
+
* @uses is_user_logged_in()
|
450 |
+
* @uses current_user_can()
|
451 |
+
* @uses get_option()
|
452 |
+
* @uses bbp_get_caps_for_role()
|
453 |
+
*
|
454 |
+
* @global bbPress $bbp
|
455 |
+
* @return If not multisite, not global, or user is deleted/spammed
|
456 |
+
*/
|
457 |
+
function bbp_global_access_role_mask() {
|
458 |
+
|
459 |
+
// Bail if not multisite or forum is not global
|
460 |
+
if ( !is_multisite() || !bbp_allow_global_access() )
|
461 |
+
return;
|
462 |
+
|
463 |
+
// Bail if user is marked as spam or is deleted
|
464 |
+
if ( bbp_is_user_deleted() || bbp_is_user_spammer() )
|
465 |
+
return;
|
466 |
+
|
467 |
+
// Normal user is logged in but has no caps
|
468 |
+
if ( is_user_logged_in() && current_user_can( 'exist' ) && !current_user_can( 'read' ) ) {
|
469 |
+
global $bbp;
|
470 |
+
|
471 |
+
// Get default role for this site
|
472 |
+
$default_role = get_option( 'default_role' );
|
473 |
+
|
474 |
+
// Get bbPress caps for the default role
|
475 |
+
$caps_for_role = bbp_get_caps_for_role( $default_role );
|
476 |
+
|
477 |
+
// Set all caps to true
|
478 |
+
foreach ( $caps_for_role as $cap ) {
|
479 |
+
$mapped_meta_caps[$cap] = true;
|
480 |
+
}
|
481 |
+
|
482 |
+
// Add 'read' cap just in case
|
483 |
+
$mapped_meta_caps['read'] = true;
|
484 |
+
|
485 |
+
// Allow global access caps to be manipulated
|
486 |
+
$mapped_meta_caps = apply_filters( 'bbp_global_access_mapped_meta_caps', $mapped_meta_caps );
|
487 |
+
|
488 |
+
// Assign the role and mapped caps to the current user
|
489 |
+
$bbp->current_user->roles[0] = $default_role;
|
490 |
+
$bbp->current_user->caps = $mapped_meta_caps;
|
491 |
+
$bbp->current_user->allcaps = $mapped_meta_caps;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
?>
|
bbp-includes/bbp-core-classes.php
CHANGED
@@ -64,17 +64,17 @@ class BBP_Component {
|
|
64 |
* - slug: Unique slug (used in query string and permalinks)
|
65 |
* - query: The loop for this component (WP_Query)
|
66 |
* - current_id: The current ID of the queried object
|
67 |
-
* @uses BBP_Component::
|
68 |
-
* @uses BBP_Component::
|
69 |
-
* @uses BBP_Component::
|
70 |
*/
|
71 |
function BBP_Component( $args = '' ) {
|
72 |
if ( empty( $args ) )
|
73 |
return;
|
74 |
|
75 |
-
$this->
|
76 |
-
$this->
|
77 |
-
$this->
|
78 |
}
|
79 |
|
80 |
/**
|
@@ -86,7 +86,7 @@ class BBP_Component {
|
|
86 |
* @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_id'
|
87 |
* @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_slug'
|
88 |
*/
|
89 |
-
function
|
90 |
$this->name = $args['name'];
|
91 |
$this->id = apply_filters( 'bbp_' . $this->name . '_id', $args['id'] );
|
92 |
$this->slug = apply_filters( 'bbp_' . $this->name . '_slug', $args['slug'] );
|
@@ -98,10 +98,10 @@ class BBP_Component {
|
|
98 |
* @since bbPress (r2700)
|
99 |
* @access private
|
100 |
*
|
101 |
-
* @uses do_action() Calls 'bbp_{@link BBP_Component::name}
|
102 |
*/
|
103 |
-
function
|
104 |
-
do_action( 'bbp_' . $this->name . '
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -112,9 +112,9 @@ class BBP_Component {
|
|
112 |
*
|
113 |
* @uses add_action() To add various actions
|
114 |
* @uses do_action() Calls
|
115 |
-
* 'bbp_{@link BBP_Component::name}
|
116 |
*/
|
117 |
-
function
|
118 |
// Register post types
|
119 |
add_action( 'bbp_register_post_types', array ( $this, 'register_post_types' ), 10, 2 );
|
120 |
|
@@ -128,7 +128,7 @@ class BBP_Component {
|
|
128 |
add_action( 'bbp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10, 2 );
|
129 |
|
130 |
// Additional actions can be attached here
|
131 |
-
do_action( 'bbp_' . $this->name . '
|
132 |
}
|
133 |
|
134 |
/**
|
64 |
* - slug: Unique slug (used in query string and permalinks)
|
65 |
* - query: The loop for this component (WP_Query)
|
66 |
* - current_id: The current ID of the queried object
|
67 |
+
* @uses BBP_Component::setup_globals() Setup the globals needed
|
68 |
+
* @uses BBP_Component::includes() Include the required files
|
69 |
+
* @uses BBP_Component::setup_actions() Setup the hooks and actions
|
70 |
*/
|
71 |
function BBP_Component( $args = '' ) {
|
72 |
if ( empty( $args ) )
|
73 |
return;
|
74 |
|
75 |
+
$this->setup_globals( $args );
|
76 |
+
$this->includes();
|
77 |
+
$this->setup_actions();
|
78 |
}
|
79 |
|
80 |
/**
|
86 |
* @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_id'
|
87 |
* @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_slug'
|
88 |
*/
|
89 |
+
function setup_globals( $args = '' ) {
|
90 |
$this->name = $args['name'];
|
91 |
$this->id = apply_filters( 'bbp_' . $this->name . '_id', $args['id'] );
|
92 |
$this->slug = apply_filters( 'bbp_' . $this->name . '_slug', $args['slug'] );
|
98 |
* @since bbPress (r2700)
|
99 |
* @access private
|
100 |
*
|
101 |
+
* @uses do_action() Calls 'bbp_{@link BBP_Component::name}includes'
|
102 |
*/
|
103 |
+
function includes() {
|
104 |
+
do_action( 'bbp_' . $this->name . 'includes' );
|
105 |
}
|
106 |
|
107 |
/**
|
112 |
*
|
113 |
* @uses add_action() To add various actions
|
114 |
* @uses do_action() Calls
|
115 |
+
* 'bbp_{@link BBP_Component::name}setup_actions'
|
116 |
*/
|
117 |
+
function setup_actions() {
|
118 |
// Register post types
|
119 |
add_action( 'bbp_register_post_types', array ( $this, 'register_post_types' ), 10, 2 );
|
120 |
|
128 |
add_action( 'bbp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10, 2 );
|
129 |
|
130 |
// Additional actions can be attached here
|
131 |
+
do_action( 'bbp_' . $this->name . 'setup_actions' );
|
132 |
}
|
133 |
|
134 |
/**
|
bbp-includes/bbp-core-compatibility.php
CHANGED
@@ -28,18 +28,16 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
28 |
* @since bbPress (r3311)
|
29 |
*
|
30 |
* @global bbPress $bbp
|
31 |
-
* @param string $theme
|
32 |
* @uses current_theme_supports()
|
33 |
*/
|
34 |
-
function
|
35 |
-
|
|
|
36 |
// Check if current theme supports bbPress
|
37 |
if ( empty( $bbp->theme_compat->theme ) && !current_theme_supports( 'bbpress' ) ) {
|
38 |
-
|
39 |
-
global $bbp;
|
40 |
-
|
41 |
if ( empty( $theme ) ) {
|
42 |
-
$theme = array(
|
43 |
'dir' => $bbp->themes_dir . '/bbp-twentyten',
|
44 |
'url' => $bbp->themes_url . '/bbp-twentyten'
|
45 |
);
|
@@ -69,17 +67,13 @@ function bbp_theme_compat_enqueue_css() {
|
|
69 |
|
70 |
/** Default CSS ***************************************************/
|
71 |
|
72 |
-
//
|
73 |
-
if (
|
|
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
// Left to right
|
80 |
-
} else {
|
81 |
-
wp_enqueue_style( 'bbpress-style', bbp_get_theme_compat_url() . '/css/bbpress.css' );
|
82 |
-
}
|
83 |
}
|
84 |
}
|
85 |
}
|
@@ -200,9 +194,9 @@ function bbp_set_theme_compat_active( $set = true ) {
|
|
200 |
*/
|
201 |
function bbp_set_theme_compat_templates( $templates = array() ) {
|
202 |
global $bbp;
|
203 |
-
|
204 |
$bbp->theme_compat->templates = $templates;
|
205 |
-
|
206 |
return $bbp->theme_compat->templates;
|
207 |
}
|
208 |
|
@@ -218,9 +212,9 @@ function bbp_set_theme_compat_templates( $templates = array() ) {
|
|
218 |
*/
|
219 |
function bbp_set_theme_compat_template( $template = '' ) {
|
220 |
global $bbp;
|
221 |
-
|
222 |
$bbp->theme_compat->template = $template;
|
223 |
-
|
224 |
return $bbp->theme_compat->template;
|
225 |
}
|
226 |
|
@@ -250,7 +244,12 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
250 |
'post_date' => get_the_date(),
|
251 |
'post_content' => get_the_content(),
|
252 |
'post_type' => get_post_type(),
|
253 |
-
'post_status' => get_post_status()
|
|
|
|
|
|
|
|
|
|
|
254 |
);
|
255 |
|
256 |
// Empty defaults
|
@@ -262,11 +261,21 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
262 |
'post_date' => 0,
|
263 |
'post_content' => '',
|
264 |
'post_type' => 'page',
|
265 |
-
'post_status' => 'publish'
|
|
|
|
|
|
|
|
|
|
|
266 |
);
|
267 |
}
|
268 |
$dummy = wp_parse_args( $args, $defaults );
|
269 |
|
|
|
|
|
|
|
|
|
|
|
270 |
// Setup the dummy post object
|
271 |
$wp_query->post->ID = $dummy['ID'];
|
272 |
$wp_query->post->post_title = $dummy['post_title'];
|
@@ -280,16 +289,16 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
280 |
$post = $wp_query->post;
|
281 |
|
282 |
// Setup the dummy post loop
|
283 |
-
$wp_query->posts[] = $wp_query->post;
|
284 |
|
285 |
// Prevent comments form from appearing
|
286 |
$wp_query->post_count = 1;
|
287 |
-
$wp_query->is_404 =
|
288 |
-
$wp_query->is_page =
|
289 |
-
$wp_query->is_single =
|
290 |
-
$wp_query->is_archive =
|
291 |
-
$wp_query->is_tax =
|
292 |
-
|
293 |
// If we are resetting a post, we are in theme compat
|
294 |
bbp_set_theme_compat_active();
|
295 |
}
|
@@ -599,7 +608,42 @@ function bbp_get_reply_edit_template() {
|
|
599 |
|
600 |
$templates = apply_filters( 'bbp_get_reply_edit_template', $templates );
|
601 |
$templates = bbp_set_theme_compat_templates( $templates );
|
602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
$template = locate_template( $templates, false, false );
|
604 |
$template = bbp_set_theme_compat_template( $template );
|
605 |
|
@@ -677,25 +721,31 @@ function bbp_template_include_theme_supports( $template = '' ) {
|
|
677 |
if ( current_theme_supports( 'bbpress' ) ) {
|
678 |
|
679 |
// Viewing a user
|
680 |
-
if ( bbp_is_single_user()
|
681 |
|
682 |
// Editing a user
|
683 |
-
elseif ( bbp_is_single_user_edit()
|
684 |
|
685 |
// Single View
|
686 |
-
elseif ( bbp_is_single_view()
|
687 |
|
688 |
// Topic merge
|
689 |
-
elseif ( bbp_is_topic_merge()
|
690 |
|
691 |
// Topic split
|
692 |
-
elseif ( bbp_is_topic_split()
|
693 |
|
694 |
// Topic edit
|
695 |
-
elseif ( bbp_is_topic_edit()
|
696 |
|
697 |
// Editing a reply
|
698 |
-
elseif ( bbp_is_reply_edit()
|
|
|
|
|
|
|
|
|
|
|
|
|
699 |
endif;
|
700 |
|
701 |
// Custom template file exists
|
@@ -737,7 +787,8 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
737 |
'post_date' => 0,
|
738 |
'post_content' => '',
|
739 |
'post_type' => bbp_get_forum_post_type(),
|
740 |
-
'post_status' => 'publish'
|
|
|
741 |
) );
|
742 |
|
743 |
/** Topics ************************************************************/
|
@@ -753,7 +804,8 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
753 |
'post_date' => 0,
|
754 |
'post_content' => '',
|
755 |
'post_type' => bbp_get_topic_post_type(),
|
756 |
-
'post_status' => 'publish'
|
|
|
757 |
) );
|
758 |
|
759 |
// Single topic
|
@@ -767,7 +819,8 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
767 |
'post_date' => 0,
|
768 |
'post_content' => get_post_field( 'post_content', bbp_get_topic_id() ),
|
769 |
'post_type' => bbp_get_topic_post_type(),
|
770 |
-
'post_status' => bbp_get_topic_status()
|
|
|
771 |
) );
|
772 |
|
773 |
/** Replies ***********************************************************/
|
@@ -818,6 +871,16 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
818 |
|
819 |
/** Topic Tags ********************************************************/
|
820 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
} elseif ( bbp_is_topic_tag() ) {
|
822 |
|
823 |
// Stash the current term in a new var
|
@@ -825,7 +888,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
825 |
|
826 |
// Reset the post with our new title
|
827 |
bbp_theme_compat_reset_post( array(
|
828 |
-
'post_title' => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' )
|
829 |
) );
|
830 |
|
831 |
/** Single Forums/Topics/Replies **************************************/
|
@@ -925,7 +988,7 @@ function bbp_replace_the_content( $content = '' ) {
|
|
925 |
|
926 |
// Forum archive
|
927 |
} elseif ( bbp_is_forum_archive() ) {
|
928 |
-
|
929 |
// Page exists where this archive should be
|
930 |
if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) {
|
931 |
|
@@ -1018,7 +1081,15 @@ function bbp_replace_the_content( $content = '' ) {
|
|
1018 |
/** Topic Tags ********************************************************/
|
1019 |
|
1020 |
} elseif ( get_query_var( 'bbp_topic_tag' ) ) {
|
1021 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
|
1023 |
/** Forums/Topics/Replies *********************************************/
|
1024 |
|
@@ -1100,20 +1171,30 @@ function bbp_replace_the_content( $content = '' ) {
|
|
1100 |
*
|
1101 |
* @param string $redirect_url Redirect url
|
1102 |
* @uses WP_Rewrite::using_permalinks() To check if the blog is using permalinks
|
1103 |
-
* @uses bbp_is_topic() To check if it's a topic page
|
1104 |
* @uses bbp_get_paged() To get the current page number
|
1105 |
-
* @uses
|
|
|
1106 |
* @return bool|string False if it's a topic/forum and their first page,
|
1107 |
* otherwise the redirect url
|
1108 |
*/
|
1109 |
function bbp_redirect_canonical( $redirect_url ) {
|
1110 |
global $wp_rewrite;
|
1111 |
|
|
|
1112 |
if ( $wp_rewrite->using_permalinks() ) {
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1117 |
}
|
1118 |
|
1119 |
return $redirect_url;
|
@@ -1152,7 +1233,7 @@ function bbp_set_404() {
|
|
1152 |
* @return mixed False if no page, Page object if true
|
1153 |
*/
|
1154 |
function bbp_get_page_by_path( $path = '' ) {
|
1155 |
-
|
1156 |
// Default to false
|
1157 |
$retval = false;
|
1158 |
|
@@ -1431,8 +1512,17 @@ function bbp_pre_get_posts( $posts_query ) {
|
|
1431 |
elseif ( $posts_query->get( 'post_type' ) == bbp_get_reply_post_type() )
|
1432 |
$posts_query->bbp_is_reply_edit = true;
|
1433 |
|
|
|
|
|
|
|
|
|
1434 |
// We save post revisions on our own
|
1435 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
|
|
|
|
|
|
|
|
|
|
1436 |
}
|
1437 |
|
1438 |
return $posts_query;
|
28 |
* @since bbPress (r3311)
|
29 |
*
|
30 |
* @global bbPress $bbp
|
31 |
+
* @param string $theme
|
32 |
* @uses current_theme_supports()
|
33 |
*/
|
34 |
+
function bbp_setup_theme_compat( $theme = array() ) {
|
35 |
+
global $bbp;
|
36 |
+
|
37 |
// Check if current theme supports bbPress
|
38 |
if ( empty( $bbp->theme_compat->theme ) && !current_theme_supports( 'bbpress' ) ) {
|
|
|
|
|
|
|
39 |
if ( empty( $theme ) ) {
|
40 |
+
$theme = array(
|
41 |
'dir' => $bbp->themes_dir . '/bbp-twentyten',
|
42 |
'url' => $bbp->themes_url . '/bbp-twentyten'
|
43 |
);
|
67 |
|
68 |
/** Default CSS ***************************************************/
|
69 |
|
70 |
+
// Right to left
|
71 |
+
if ( is_rtl() ) {
|
72 |
+
wp_enqueue_style( 'bbpress-style', bbp_get_theme_compat_url() . '/css/bbpress-rtl.css' );
|
73 |
|
74 |
+
// Left to right
|
75 |
+
} else {
|
76 |
+
wp_enqueue_style( 'bbpress-style', bbp_get_theme_compat_url() . '/css/bbpress.css' );
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
}
|
79 |
}
|
194 |
*/
|
195 |
function bbp_set_theme_compat_templates( $templates = array() ) {
|
196 |
global $bbp;
|
197 |
+
|
198 |
$bbp->theme_compat->templates = $templates;
|
199 |
+
|
200 |
return $bbp->theme_compat->templates;
|
201 |
}
|
202 |
|
212 |
*/
|
213 |
function bbp_set_theme_compat_template( $template = '' ) {
|
214 |
global $bbp;
|
215 |
+
|
216 |
$bbp->theme_compat->template = $template;
|
217 |
+
|
218 |
return $bbp->theme_compat->template;
|
219 |
}
|
220 |
|
244 |
'post_date' => get_the_date(),
|
245 |
'post_content' => get_the_content(),
|
246 |
'post_type' => get_post_type(),
|
247 |
+
'post_status' => get_post_status(),
|
248 |
+
'is_404' => false,
|
249 |
+
'is_page' => false,
|
250 |
+
'is_single' => false,
|
251 |
+
'is_archive' => false,
|
252 |
+
'is_tax' => false,
|
253 |
);
|
254 |
|
255 |
// Empty defaults
|
261 |
'post_date' => 0,
|
262 |
'post_content' => '',
|
263 |
'post_type' => 'page',
|
264 |
+
'post_status' => 'publish',
|
265 |
+
'is_404' => false,
|
266 |
+
'is_page' => false,
|
267 |
+
'is_single' => false,
|
268 |
+
'is_archive' => false,
|
269 |
+
'is_tax' => false,
|
270 |
);
|
271 |
}
|
272 |
$dummy = wp_parse_args( $args, $defaults );
|
273 |
|
274 |
+
// Clear out the post related globals
|
275 |
+
unset( $wp_query->posts );
|
276 |
+
unset( $wp_query->post );
|
277 |
+
unset( $post );
|
278 |
+
|
279 |
// Setup the dummy post object
|
280 |
$wp_query->post->ID = $dummy['ID'];
|
281 |
$wp_query->post->post_title = $dummy['post_title'];
|
289 |
$post = $wp_query->post;
|
290 |
|
291 |
// Setup the dummy post loop
|
292 |
+
$wp_query->posts[0] = $wp_query->post;
|
293 |
|
294 |
// Prevent comments form from appearing
|
295 |
$wp_query->post_count = 1;
|
296 |
+
$wp_query->is_404 = $dummy['is_404'];
|
297 |
+
$wp_query->is_page = $dummy['is_page'];
|
298 |
+
$wp_query->is_single = $dummy['is_single'];
|
299 |
+
$wp_query->is_archive = $dummy['is_archive'];
|
300 |
+
$wp_query->is_tax = $dummy['is_tax'];
|
301 |
+
|
302 |
// If we are resetting a post, we are in theme compat
|
303 |
bbp_set_theme_compat_active();
|
304 |
}
|
608 |
|
609 |
$templates = apply_filters( 'bbp_get_reply_edit_template', $templates );
|
610 |
$templates = bbp_set_theme_compat_templates( $templates );
|
611 |
+
|
612 |
+
$template = locate_template( $templates, false, false );
|
613 |
+
$template = bbp_set_theme_compat_template( $template );
|
614 |
+
|
615 |
+
return $template;
|
616 |
+
}
|
617 |
+
|
618 |
+
/**
|
619 |
+
* Get the topic edit template
|
620 |
+
*
|
621 |
+
* @since bbPress (r3311)
|
622 |
+
*
|
623 |
+
* @uses bbp_get_topic_post_type()
|
624 |
+
* @uses apply_filters()
|
625 |
+
*
|
626 |
+
* @return array
|
627 |
+
*/
|
628 |
+
function bbp_get_topic_tag_edit_template() {
|
629 |
+
|
630 |
+
$tt_id = bbp_get_topic_tag_tax_id();
|
631 |
+
$templates = array(
|
632 |
+
|
633 |
+
// Single Topic Tag Edit
|
634 |
+
'taxonomy-' . $tt_id . '-edit.php',
|
635 |
+
'bbpress/taxonomy-' . $tt_id . '-edit.php',
|
636 |
+
'forums/taxonomy-' . $tt_id . '-edit.php',
|
637 |
+
|
638 |
+
// Single Topic Tag
|
639 |
+
'taxonomy-' . $tt_id . '.php',
|
640 |
+
'forums/taxonomy-' . $tt_id . '.php',
|
641 |
+
'bbpress/taxonomy-' . $tt_id . '.php',
|
642 |
+
);
|
643 |
+
|
644 |
+
$templates = apply_filters( 'bbp_get_topic_tag_edit_template', $templates );
|
645 |
+
$templates = bbp_set_theme_compat_templates( $templates );
|
646 |
+
|
647 |
$template = locate_template( $templates, false, false );
|
648 |
$template = bbp_set_theme_compat_template( $template );
|
649 |
|
721 |
if ( current_theme_supports( 'bbpress' ) ) {
|
722 |
|
723 |
// Viewing a user
|
724 |
+
if ( bbp_is_single_user() && ( $new_template = bbp_get_single_user_template() ) ) :
|
725 |
|
726 |
// Editing a user
|
727 |
+
elseif ( bbp_is_single_user_edit() && ( $new_template = bbp_get_single_user_edit_template() ) ) :
|
728 |
|
729 |
// Single View
|
730 |
+
elseif ( bbp_is_single_view() && ( $new_template = bbp_get_single_view_template() ) ) :
|
731 |
|
732 |
// Topic merge
|
733 |
+
elseif ( bbp_is_topic_merge() && ( $new_template = bbp_get_topic_merge_template() ) ) :
|
734 |
|
735 |
// Topic split
|
736 |
+
elseif ( bbp_is_topic_split() && ( $new_template = bbp_get_topic_split_template() ) ) :
|
737 |
|
738 |
// Topic edit
|
739 |
+
elseif ( bbp_is_topic_edit() && ( $new_template = bbp_get_topic_edit_template() ) ) :
|
740 |
|
741 |
// Editing a reply
|
742 |
+
elseif ( bbp_is_reply_edit() && ( $new_template = bbp_get_reply_edit_template() ) ) :
|
743 |
+
|
744 |
+
// Editing a topic tag
|
745 |
+
elseif ( bbp_is_topic_tag() && ( $new_template = bbp_get_topic_tag_template() ) ) :
|
746 |
+
|
747 |
+
// Editing a topic tag
|
748 |
+
elseif ( bbp_is_topic_tag_edit() && ( $new_template = bbp_get_topic_tag_edit_template() ) ) :
|
749 |
endif;
|
750 |
|
751 |
// Custom template file exists
|
787 |
'post_date' => 0,
|
788 |
'post_content' => '',
|
789 |
'post_type' => bbp_get_forum_post_type(),
|
790 |
+
'post_status' => 'publish',
|
791 |
+
'is_archive' => true
|
792 |
) );
|
793 |
|
794 |
/** Topics ************************************************************/
|
804 |
'post_date' => 0,
|
805 |
'post_content' => '',
|
806 |
'post_type' => bbp_get_topic_post_type(),
|
807 |
+
'post_status' => 'publish',
|
808 |
+
'is_archive' => true
|
809 |
) );
|
810 |
|
811 |
// Single topic
|
819 |
'post_date' => 0,
|
820 |
'post_content' => get_post_field( 'post_content', bbp_get_topic_id() ),
|
821 |
'post_type' => bbp_get_topic_post_type(),
|
822 |
+
'post_status' => bbp_get_topic_status(),
|
823 |
+
'is_single' => true
|
824 |
) );
|
825 |
|
826 |
/** Replies ***********************************************************/
|
871 |
|
872 |
/** Topic Tags ********************************************************/
|
873 |
|
874 |
+
} elseif ( bbp_is_topic_tag_edit() ) {
|
875 |
+
|
876 |
+
// Stash the current term in a new var
|
877 |
+
set_query_var( 'bbp_topic_tag', get_query_var( 'term' ) );
|
878 |
+
|
879 |
+
// Reset the post with our new title
|
880 |
+
bbp_theme_compat_reset_post( array(
|
881 |
+
'post_title' => sprintf( __( 'Edit Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' )
|
882 |
+
) );
|
883 |
+
|
884 |
} elseif ( bbp_is_topic_tag() ) {
|
885 |
|
886 |
// Stash the current term in a new var
|
888 |
|
889 |
// Reset the post with our new title
|
890 |
bbp_theme_compat_reset_post( array(
|
891 |
+
'post_title' => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' )
|
892 |
) );
|
893 |
|
894 |
/** Single Forums/Topics/Replies **************************************/
|
988 |
|
989 |
// Forum archive
|
990 |
} elseif ( bbp_is_forum_archive() ) {
|
991 |
+
|
992 |
// Page exists where this archive should be
|
993 |
if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) {
|
994 |
|
1081 |
/** Topic Tags ********************************************************/
|
1082 |
|
1083 |
} elseif ( get_query_var( 'bbp_topic_tag' ) ) {
|
1084 |
+
|
1085 |
+
// Edit topic tag
|
1086 |
+
if ( bbp_is_topic_tag_edit() ) {
|
1087 |
+
$new_content = $bbp->shortcodes->display_topic_tag_form();
|
1088 |
+
|
1089 |
+
// Show topics of tag
|
1090 |
+
} else {
|
1091 |
+
$new_content = $bbp->shortcodes->display_topics_of_tag( array( 'id' => bbp_get_topic_tag_id() ) );
|
1092 |
+
}
|
1093 |
|
1094 |
/** Forums/Topics/Replies *********************************************/
|
1095 |
|
1171 |
*
|
1172 |
* @param string $redirect_url Redirect url
|
1173 |
* @uses WP_Rewrite::using_permalinks() To check if the blog is using permalinks
|
|
|
1174 |
* @uses bbp_get_paged() To get the current page number
|
1175 |
+
* @uses bbp_is_single_topic() To check if it's a topic page
|
1176 |
+
* @uses bbp_is_single_forum() To check if it's a forum page
|
1177 |
* @return bool|string False if it's a topic/forum and their first page,
|
1178 |
* otherwise the redirect url
|
1179 |
*/
|
1180 |
function bbp_redirect_canonical( $redirect_url ) {
|
1181 |
global $wp_rewrite;
|
1182 |
|
1183 |
+
// Canonical is for the beautiful
|
1184 |
if ( $wp_rewrite->using_permalinks() ) {
|
1185 |
+
|
1186 |
+
// Only if paginating
|
1187 |
+
if ( 1 < bbp_get_paged() ) {
|
1188 |
+
|
1189 |
+
// Only on single topics...
|
1190 |
+
if ( bbp_is_single_topic() ) {
|
1191 |
+
$redirect_url = false;
|
1192 |
+
|
1193 |
+
// ...and single replies
|
1194 |
+
} elseif ( bbp_is_single_forum() ) {
|
1195 |
+
$redirect_url = false;
|
1196 |
+
}
|
1197 |
+
}
|
1198 |
}
|
1199 |
|
1200 |
return $redirect_url;
|
1233 |
* @return mixed False if no page, Page object if true
|
1234 |
*/
|
1235 |
function bbp_get_page_by_path( $path = '' ) {
|
1236 |
+
|
1237 |
// Default to false
|
1238 |
$retval = false;
|
1239 |
|
1512 |
elseif ( $posts_query->get( 'post_type' ) == bbp_get_reply_post_type() )
|
1513 |
$posts_query->bbp_is_reply_edit = true;
|
1514 |
|
1515 |
+
// We are editing a topic tag
|
1516 |
+
elseif ( bbp_is_topic_tag() )
|
1517 |
+
$posts_query->bbp_is_topic_tag_edit = true;
|
1518 |
+
|
1519 |
// We save post revisions on our own
|
1520 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
1521 |
+
|
1522 |
+
// Topic tag page
|
1523 |
+
} elseif ( bbp_is_topic_tag() ) {
|
1524 |
+
$posts_query->query_vars['post_type'] = bbp_get_topic_post_type();
|
1525 |
+
$posts_query->query_vars['posts_per_page'] = get_option( '_bbp_topics_per_page', 15 );
|
1526 |
}
|
1527 |
|
1528 |
return $posts_query;
|
bbp-includes/bbp-core-hooks.php
CHANGED
@@ -12,10 +12,10 @@
|
|
12 |
*
|
13 |
* There are a few common places that additional actions can currently be found
|
14 |
*
|
15 |
-
* - bbPress: In {@link bbPress::
|
16 |
-
* - Component: In {@link BBP_Component::
|
17 |
* bbp-includes/bbp-classes.php
|
18 |
-
* - Admin: More in {@link BBP_Admin::
|
19 |
* bbp-admin/bbp-admin.php
|
20 |
*/
|
21 |
|
@@ -33,7 +33,9 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
33 |
*/
|
34 |
add_action( 'plugins_loaded', 'bbp_loaded', 10 );
|
35 |
add_action( 'init', 'bbp_init', 10 );
|
|
|
36 |
add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 );
|
|
|
37 |
add_filter( 'template_include', 'bbp_template_include', 10 );
|
38 |
|
39 |
/**
|
@@ -56,40 +58,31 @@ add_action( 'bbp_loaded', 'bbp_register_theme_directory', 10 );
|
|
56 |
* The load order helps to load code at the correct time.
|
57 |
* v---Load order
|
58 |
*/
|
59 |
-
add_action( 'bbp_init', '
|
60 |
add_action( 'bbp_init', 'bbp_setup_current_user', 4 );
|
61 |
add_action( 'bbp_init', 'bbp_setup_theme_compat', 6 );
|
62 |
add_action( 'bbp_init', 'bbp_setup_akismet', 8 );
|
63 |
-
add_action( 'bbp_init', '
|
64 |
-
add_action( 'bbp_init', '
|
65 |
-
add_action( 'bbp_init', '
|
66 |
-
add_action( 'bbp_init', '
|
67 |
-
add_action( 'bbp_init', '
|
68 |
-
add_action( 'bbp_init', '
|
|
|
69 |
add_action( 'bbp_init', 'bbp_ready', 999 );
|
70 |
|
71 |
-
//
|
72 |
-
add_action( '
|
73 |
-
add_action( 'bbp_setup_theme_compat', 'bbp_theme_compat_enqueue_css' );
|
74 |
|
75 |
-
//
|
76 |
-
|
77 |
-
add_action( 'bbp_init', 'bbp_admin' );
|
78 |
-
add_action( 'bbp_admin_init', 'bbp_forums_admin', 9 );
|
79 |
-
add_action( 'bbp_admin_init', 'bbp_topics_admin', 9 );
|
80 |
-
add_action( 'bbp_admin_init', 'bbp_replies_admin', 9 );
|
81 |
-
add_action( 'bbp_admin_init', 'bbp_admin_settings_help' );
|
82 |
-
add_action( 'admin_menu', 'bbp_admin_separator' );
|
83 |
-
add_action( 'custom_menu_order', 'bbp_admin_custom_menu_order' );
|
84 |
-
add_action( 'menu_order', 'bbp_admin_menu_order' );
|
85 |
-
}
|
86 |
|
87 |
// Widgets
|
88 |
-
add_action( '
|
89 |
-
add_action( '
|
90 |
-
add_action( '
|
91 |
-
add_action( '
|
92 |
-
add_action( '
|
93 |
|
94 |
// Template - Head, foot, errors and messages
|
95 |
add_action( 'wp_head', 'bbp_head' );
|
@@ -301,15 +294,7 @@ add_filter( 'bbp_get_user_profile_link', 'stripslashes' );
|
|
301 |
add_filter( 'bbp_get_user_profile_edit_link', 'wp_rel_nofollow' );
|
302 |
add_filter( 'bbp_get_user_profile_edit_link', 'stripslashes' );
|
303 |
|
304 |
-
// Run wp_kses_data on topic/reply content in admin section
|
305 |
-
if ( is_admin() ) {
|
306 |
-
add_filter( 'bbp_get_reply_content', 'wp_kses_data' );
|
307 |
-
add_filter( 'bbp_get_topic_content', 'wp_kses_data' );
|
308 |
-
}
|
309 |
-
|
310 |
// Run filters on reply content
|
311 |
-
if ( !is_admin() )
|
312 |
-
add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 1, 2 );
|
313 |
add_filter( 'bbp_get_reply_content', 'capital_P_dangit' );
|
314 |
add_filter( 'bbp_get_reply_content', 'wptexturize', 3 );
|
315 |
add_filter( 'bbp_get_reply_content', 'convert_chars', 5 );
|
@@ -319,8 +304,6 @@ add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
|
|
319 |
add_filter( 'bbp_get_reply_content', 'wpautop', 30 );
|
320 |
|
321 |
// Run filters on topic content
|
322 |
-
if ( !is_admin() )
|
323 |
-
add_filter( 'bbp_get_topic_content', 'bbp_topic_content_append_revisions', 1, 2 );
|
324 |
add_filter( 'bbp_get_topic_content', 'capital_P_dangit' );
|
325 |
add_filter( 'bbp_get_topic_content', 'wptexturize', 3 );
|
326 |
add_filter( 'bbp_get_topic_content', 'convert_chars', 5 );
|
@@ -329,6 +312,10 @@ add_filter( 'bbp_get_topic_content', 'force_balance_tags', 25 );
|
|
329 |
add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
|
330 |
add_filter( 'bbp_get_topic_content', 'wpautop', 30 );
|
331 |
|
|
|
|
|
|
|
|
|
332 |
// Canonical
|
333 |
add_filter( 'redirect_canonical', 'bbp_redirect_canonical' );
|
334 |
|
@@ -394,6 +381,28 @@ function bbp_allowed_themes( $themes ) {
|
|
394 |
}
|
395 |
add_filter( 'allowed_themes', 'bbp_allowed_themes' );
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
/** Main Actions **************************************************************/
|
398 |
|
399 |
/**
|
@@ -462,6 +471,17 @@ function bbp_init() {
|
|
462 |
do_action ( 'bbp_init' );
|
463 |
}
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
/** Supplemental Actions ******************************************************/
|
466 |
|
467 |
/**
|
@@ -482,7 +502,7 @@ function bbp_setup_current_user() {
|
|
482 |
*
|
483 |
* @uses do_action() Calls 'bbp_load_textdomain'
|
484 |
*/
|
485 |
-
function
|
486 |
do_action( 'bbp_load_textdomain' );
|
487 |
}
|
488 |
|
@@ -541,6 +561,17 @@ function bbp_register_views() {
|
|
541 |
do_action ( 'bbp_register_views' );
|
542 |
}
|
543 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
/**
|
545 |
* Add the bbPress-specific rewrite tags
|
546 |
*
|
@@ -565,17 +596,6 @@ function bbp_generate_rewrite_rules( $wp_rewrite ) {
|
|
565 |
do_action_ref_array( 'bbp_generate_rewrite_rules', array( &$wp_rewrite ) );
|
566 |
}
|
567 |
|
568 |
-
/**
|
569 |
-
* Setup bbPress theme compatability actions
|
570 |
-
*
|
571 |
-
* @since bbPress (r3028)
|
572 |
-
*
|
573 |
-
* @uses do_action() Calls 'bbp_setup_theme_compat'
|
574 |
-
*/
|
575 |
-
function bbp_setup_theme_compat() {
|
576 |
-
do_action( 'bbp_setup_theme_compat' );
|
577 |
-
}
|
578 |
-
|
579 |
/** Final Action **************************************************************/
|
580 |
|
581 |
/**
|
12 |
*
|
13 |
* There are a few common places that additional actions can currently be found
|
14 |
*
|
15 |
+
* - bbPress: In {@link bbPress::setup_actions()} in bbpress.php
|
16 |
+
* - Component: In {@link BBP_Component::setup_actions()} in
|
17 |
* bbp-includes/bbp-classes.php
|
18 |
+
* - Admin: More in {@link BBP_Admin::setup_actions()} in
|
19 |
* bbp-admin/bbp-admin.php
|
20 |
*/
|
21 |
|
33 |
*/
|
34 |
add_action( 'plugins_loaded', 'bbp_loaded', 10 );
|
35 |
add_action( 'init', 'bbp_init', 10 );
|
36 |
+
add_action( 'widgets_init', 'bbp_widgets_init', 10 );
|
37 |
add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 );
|
38 |
+
add_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts', 10 );
|
39 |
add_filter( 'template_include', 'bbp_template_include', 10 );
|
40 |
|
41 |
/**
|
58 |
* The load order helps to load code at the correct time.
|
59 |
* v---Load order
|
60 |
*/
|
61 |
+
add_action( 'bbp_init', 'bbp_load_textdomain', 2 );
|
62 |
add_action( 'bbp_init', 'bbp_setup_current_user', 4 );
|
63 |
add_action( 'bbp_init', 'bbp_setup_theme_compat', 6 );
|
64 |
add_action( 'bbp_init', 'bbp_setup_akismet', 8 );
|
65 |
+
add_action( 'bbp_init', 'bbp_setup_buddypress', 10 );
|
66 |
+
add_action( 'bbp_init', 'bbp_register_post_types', 12 );
|
67 |
+
add_action( 'bbp_init', 'bbp_register_post_statuses', 14 );
|
68 |
+
add_action( 'bbp_init', 'bbp_register_taxonomies', 16 );
|
69 |
+
add_action( 'bbp_init', 'bbp_register_views', 18 );
|
70 |
+
add_action( 'bbp_init', 'bbp_register_shortcodes', 20 );
|
71 |
+
add_action( 'bbp_init', 'bbp_add_rewrite_tags', 22 );
|
72 |
add_action( 'bbp_init', 'bbp_ready', 999 );
|
73 |
|
74 |
+
// Multisite Global Forum Access
|
75 |
+
add_action( 'bbp_setup_current_user', 'bbp_global_access_role_mask', 10 );
|
|
|
76 |
|
77 |
+
// Theme Compat
|
78 |
+
add_action( 'bbp_enqueue_scripts', 'bbp_theme_compat_enqueue_css', 10 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
// Widgets
|
81 |
+
add_action( 'bbp_widgets_init', array( 'BBP_Login_Widget', 'register_widget' ), 10 );
|
82 |
+
add_action( 'bbp_widgets_init', array( 'BBP_Views_Widget', 'register_widget' ), 10 );
|
83 |
+
add_action( 'bbp_widgets_init', array( 'BBP_Forums_Widget', 'register_widget' ), 10 );
|
84 |
+
add_action( 'bbp_widgets_init', array( 'BBP_Topics_Widget', 'register_widget' ), 10 );
|
85 |
+
add_action( 'bbp_widgets_init', array( 'BBP_Replies_Widget', 'register_widget' ), 10 );
|
86 |
|
87 |
// Template - Head, foot, errors and messages
|
88 |
add_action( 'wp_head', 'bbp_head' );
|
294 |
add_filter( 'bbp_get_user_profile_edit_link', 'wp_rel_nofollow' );
|
295 |
add_filter( 'bbp_get_user_profile_edit_link', 'stripslashes' );
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
// Run filters on reply content
|
|
|
|
|
298 |
add_filter( 'bbp_get_reply_content', 'capital_P_dangit' );
|
299 |
add_filter( 'bbp_get_reply_content', 'wptexturize', 3 );
|
300 |
add_filter( 'bbp_get_reply_content', 'convert_chars', 5 );
|
304 |
add_filter( 'bbp_get_reply_content', 'wpautop', 30 );
|
305 |
|
306 |
// Run filters on topic content
|
|
|
|
|
307 |
add_filter( 'bbp_get_topic_content', 'capital_P_dangit' );
|
308 |
add_filter( 'bbp_get_topic_content', 'wptexturize', 3 );
|
309 |
add_filter( 'bbp_get_topic_content', 'convert_chars', 5 );
|
312 |
add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
|
313 |
add_filter( 'bbp_get_topic_content', 'wpautop', 30 );
|
314 |
|
315 |
+
// Revisions
|
316 |
+
add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 1, 2 );
|
317 |
+
add_filter( 'bbp_get_topic_content', 'bbp_topic_content_append_revisions', 1, 2 );
|
318 |
+
|
319 |
// Canonical
|
320 |
add_filter( 'redirect_canonical', 'bbp_redirect_canonical' );
|
321 |
|
381 |
}
|
382 |
add_filter( 'allowed_themes', 'bbp_allowed_themes' );
|
383 |
|
384 |
+
/** Admin *********************************************************************/
|
385 |
+
|
386 |
+
if ( is_admin() ) {
|
387 |
+
|
388 |
+
/** Actions ***************************************************************/
|
389 |
+
|
390 |
+
add_action( 'bbp_init', 'bbp_admin' );
|
391 |
+
add_action( 'bbp_admin_init', 'bbp_admin_forums', 9 );
|
392 |
+
add_action( 'bbp_admin_init', 'bbp_admin_topics', 9 );
|
393 |
+
add_action( 'bbp_admin_init', 'bbp_admin_replies', 9 );
|
394 |
+
add_action( 'bbp_admin_init', 'bbp_admin_settings_help' );
|
395 |
+
add_action( 'admin_menu', 'bbp_admin_separator' );
|
396 |
+
add_action( 'custom_menu_order', 'bbp_admin_custom_menu_order' );
|
397 |
+
add_action( 'menu_order', 'bbp_admin_menu_order' );
|
398 |
+
|
399 |
+
/** Filters ***************************************************************/
|
400 |
+
|
401 |
+
// Run wp_kses_data on topic/reply content in admin section
|
402 |
+
add_filter( 'bbp_get_reply_content', 'wp_kses_data' );
|
403 |
+
add_filter( 'bbp_get_topic_content', 'wp_kses_data' );
|
404 |
+
}
|
405 |
+
|
406 |
/** Main Actions **************************************************************/
|
407 |
|
408 |
/**
|
471 |
do_action ( 'bbp_init' );
|
472 |
}
|
473 |
|
474 |
+
/**
|
475 |
+
* Initialize widgets
|
476 |
+
*
|
477 |
+
* @since bbPress (r3389)
|
478 |
+
*
|
479 |
+
* @uses do_action() Calls 'bbp_widgets_init'
|
480 |
+
*/
|
481 |
+
function bbp_widgets_init() {
|
482 |
+
do_action ( 'bbp_widgets_init' );
|
483 |
+
}
|
484 |
+
|
485 |
/** Supplemental Actions ******************************************************/
|
486 |
|
487 |
/**
|
502 |
*
|
503 |
* @uses do_action() Calls 'bbp_load_textdomain'
|
504 |
*/
|
505 |
+
function bbp_load_textdomain() {
|
506 |
do_action( 'bbp_load_textdomain' );
|
507 |
}
|
508 |
|
561 |
do_action ( 'bbp_register_views' );
|
562 |
}
|
563 |
|
564 |
+
/**
|
565 |
+
* Enqueue bbPress specific CSS and JS
|
566 |
+
*
|
567 |
+
* @since bbPress (r3373)
|
568 |
+
*
|
569 |
+
* @uses do_action() Calls 'bbp_enqueue_scripts'
|
570 |
+
*/
|
571 |
+
function bbp_enqueue_scripts() {
|
572 |
+
do_action ( 'bbp_enqueue_scripts' );
|
573 |
+
}
|
574 |
+
|
575 |
/**
|
576 |
* Add the bbPress-specific rewrite tags
|
577 |
*
|
596 |
do_action_ref_array( 'bbp_generate_rewrite_rules', array( &$wp_rewrite ) );
|
597 |
}
|
598 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
/** Final Action **************************************************************/
|
600 |
|
601 |
/**
|
bbp-includes/bbp-core-options.php
CHANGED
@@ -46,6 +46,9 @@ function bbp_add_options() {
|
|
46 |
// Allow anonymous posting
|
47 |
'_bbp_allow_anonymous' => false,
|
48 |
|
|
|
|
|
|
|
49 |
/** Per Page **********************************************************/
|
50 |
|
51 |
// Topics per page
|
@@ -183,6 +186,20 @@ function bbp_allow_anonymous( $default = false ) {
|
|
183 |
return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) );
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
/**
|
187 |
* Output the maximum length of a title
|
188 |
*
|
46 |
// Allow anonymous posting
|
47 |
'_bbp_allow_anonymous' => false,
|
48 |
|
49 |
+
// Users from all sites can post
|
50 |
+
'_bbp_allow_global_access' => false,
|
51 |
+
|
52 |
/** Per Page **********************************************************/
|
53 |
|
54 |
// Topics per page
|
186 |
return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) );
|
187 |
}
|
188 |
|
189 |
+
/**
|
190 |
+
* Is this forum available to all users on all sites in this installation?
|
191 |
+
*
|
192 |
+
* @since bbPress (r3378)
|
193 |
+
*
|
194 |
+
* @param $default bool Optional. Default value
|
195 |
+
*
|
196 |
+
* @uses get_option() To get the global access option
|
197 |
+
* @return bool Is global access allowed?
|
198 |
+
*/
|
199 |
+
function bbp_allow_global_access( $default = false ) {
|
200 |
+
return apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
|
201 |
+
}
|
202 |
+
|
203 |
/**
|
204 |
* Output the maximum length of a title
|
205 |
*
|
bbp-includes/bbp-core-shortcodes.php
CHANGED
@@ -23,7 +23,7 @@ class BBP_Shortcodes {
|
|
23 |
/**
|
24 |
* @var array Shortcode => function
|
25 |
*/
|
26 |
-
|
27 |
|
28 |
/** Functions *************************************************************/
|
29 |
|
@@ -32,23 +32,12 @@ class BBP_Shortcodes {
|
|
32 |
*
|
33 |
* @since bbPress (r3031)
|
34 |
*
|
35 |
-
* @uses
|
|
|
36 |
*/
|
37 |
-
function
|
38 |
-
$this->
|
39 |
-
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Add the register_shortcodes action to bbp_init
|
43 |
-
*
|
44 |
-
* @since bbPress (r3031)
|
45 |
-
*
|
46 |
-
* @uses _setup_globals()
|
47 |
-
* @uses _add_shortcodes()
|
48 |
-
*/
|
49 |
-
function __construct() {
|
50 |
-
$this->_setup_globals();
|
51 |
-
$this->_add_shortcodes();
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -59,7 +48,7 @@ class BBP_Shortcodes {
|
|
59 |
*
|
60 |
* @uses apply_filters()
|
61 |
*/
|
62 |
-
function
|
63 |
|
64 |
// Setup the shortcodes
|
65 |
$this->codes = apply_filters( 'bbp_shortcodes', array(
|
@@ -122,12 +111,10 @@ class BBP_Shortcodes {
|
|
122 |
* @uses add_shortcode()
|
123 |
* @uses do_action()
|
124 |
*/
|
125 |
-
function
|
126 |
|
127 |
-
// Loop through the shortcodes
|
128 |
foreach( $this->codes as $code => $function )
|
129 |
-
|
130 |
-
// Add each shortcode
|
131 |
add_shortcode( $code, $function );
|
132 |
|
133 |
// Custom shortcodes
|
@@ -141,18 +128,18 @@ class BBP_Shortcodes {
|
|
141 |
*
|
142 |
* @global bbPress $bbp
|
143 |
*/
|
144 |
-
function
|
145 |
global $bbp;
|
146 |
|
147 |
// Unset global queries
|
148 |
-
$bbp->forum_query =
|
149 |
-
$bbp->topic_query =
|
150 |
-
$bbp->reply_query =
|
151 |
|
152 |
// Unset global ID's
|
153 |
-
$bbp->current_forum_id =
|
154 |
-
$bbp->current_topic_id =
|
155 |
-
$bbp->current_reply_id =
|
156 |
|
157 |
// Reset the post data
|
158 |
wp_reset_postdata();
|
@@ -168,9 +155,18 @@ class BBP_Shortcodes {
|
|
168 |
* in the correct location in the_content() instead of when it's created.
|
169 |
*
|
170 |
* @since bbPress (r3079)
|
|
|
|
|
|
|
|
|
171 |
* @uses ob_start()
|
172 |
*/
|
173 |
-
function
|
|
|
|
|
|
|
|
|
|
|
174 |
ob_start();
|
175 |
}
|
176 |
|
@@ -179,20 +175,23 @@ class BBP_Shortcodes {
|
|
179 |
*
|
180 |
* @since bbPress( r3079)
|
181 |
*
|
182 |
-
* @uses BBP_Shortcodes::
|
183 |
* @return string Contents of output buffer.
|
184 |
*/
|
185 |
-
function
|
186 |
|
187 |
// Put output into usable variable
|
188 |
$output = ob_get_contents();
|
189 |
|
190 |
// Unset globals
|
191 |
-
$this->
|
192 |
|
193 |
// Flush the output buffer
|
194 |
ob_end_clean();
|
195 |
|
|
|
|
|
|
|
196 |
return $output;
|
197 |
}
|
198 |
|
@@ -211,13 +210,13 @@ class BBP_Shortcodes {
|
|
211 |
* @uses get_template_part()
|
212 |
* @return string
|
213 |
*/
|
214 |
-
function display_forum_index() {
|
215 |
|
216 |
// Unset globals
|
217 |
-
$this->
|
218 |
|
219 |
// Start output buffer
|
220 |
-
$this->
|
221 |
|
222 |
// Breadcrumb
|
223 |
bbp_breadcrumb();
|
@@ -237,7 +236,7 @@ class BBP_Shortcodes {
|
|
237 |
do_action( 'bbp_template_after_forums_index' );
|
238 |
|
239 |
// Return contents of output buffer
|
240 |
-
return $this->
|
241 |
}
|
242 |
|
243 |
/**
|
@@ -254,7 +253,7 @@ class BBP_Shortcodes {
|
|
254 |
* @uses bbp_single_forum_description()
|
255 |
* @return string
|
256 |
*/
|
257 |
-
function display_forum( $attr, $content = '' ) {
|
258 |
global $bbp;
|
259 |
|
260 |
// Sanity check required info
|
@@ -269,7 +268,7 @@ class BBP_Shortcodes {
|
|
269 |
return $content;
|
270 |
|
271 |
// Start output buffer
|
272 |
-
$this->
|
273 |
|
274 |
// Check forum caps
|
275 |
if ( bbp_user_can_view_forum( array( 'forum_id' => $forum_id ) ) ) {
|
@@ -311,7 +310,7 @@ class BBP_Shortcodes {
|
|
311 |
if ( !bbp_is_forum_category( $forum_id ) ) {
|
312 |
|
313 |
// Unset globals
|
314 |
-
$this->
|
315 |
|
316 |
// Reset necessary forum_query attributes for topics loop to function
|
317 |
$bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
|
@@ -349,7 +348,7 @@ class BBP_Shortcodes {
|
|
349 |
}
|
350 |
|
351 |
// Return contents of output buffer
|
352 |
-
return $this->
|
353 |
}
|
354 |
|
355 |
/** Topic shortcodes ******************************************************/
|
@@ -368,7 +367,7 @@ class BBP_Shortcodes {
|
|
368 |
* @uses get_template_part()
|
369 |
* @return string
|
370 |
*/
|
371 |
-
function display_topic_index() {
|
372 |
|
373 |
// Query defaults
|
374 |
$topics_query = array(
|
@@ -378,10 +377,10 @@ class BBP_Shortcodes {
|
|
378 |
);
|
379 |
|
380 |
// Unset globals
|
381 |
-
$this->
|
382 |
|
383 |
// Start output buffer
|
384 |
-
$this->
|
385 |
|
386 |
// Breadcrumb
|
387 |
bbp_breadcrumb();
|
@@ -404,7 +403,7 @@ class BBP_Shortcodes {
|
|
404 |
do_action( 'bbp_template_after_topics_index' );
|
405 |
|
406 |
// Return contents of output buffer
|
407 |
-
return $this->
|
408 |
}
|
409 |
|
410 |
/**
|
@@ -421,7 +420,7 @@ class BBP_Shortcodes {
|
|
421 |
* @uses get_template_part()
|
422 |
* @return string
|
423 |
*/
|
424 |
-
function display_topic( $attr, $content = '' ) {
|
425 |
global $bbp;
|
426 |
|
427 |
// Sanity check required info
|
@@ -444,7 +443,7 @@ class BBP_Shortcodes {
|
|
444 |
) );
|
445 |
|
446 |
// Unset globals
|
447 |
-
$this->
|
448 |
|
449 |
// Reset the queries if not in theme compat
|
450 |
if ( !bbp_is_theme_compat_active() ) {
|
@@ -461,7 +460,7 @@ class BBP_Shortcodes {
|
|
461 |
}
|
462 |
|
463 |
// Start output buffer
|
464 |
-
$this->
|
465 |
|
466 |
// Check forum caps
|
467 |
if ( bbp_user_can_view_forum( array( 'forum_id' => $forum_id ) ) ) {
|
@@ -493,14 +492,9 @@ class BBP_Shortcodes {
|
|
493 |
|
494 |
// Load the topic
|
495 |
if ( bbp_has_replies( $replies_query ) ) {
|
496 |
-
|
497 |
bbp_get_template_part( 'bbpress/pagination', 'replies' );
|
498 |
bbp_get_template_part( 'bbpress/loop', 'replies' );
|
499 |
bbp_get_template_part( 'bbpress/pagination', 'replies' );
|
500 |
-
|
501 |
-
// No replies
|
502 |
-
} else {
|
503 |
-
bbp_get_template_part( 'bbpress/content', 'single-topic-lead' );
|
504 |
}
|
505 |
|
506 |
// Reply form
|
@@ -516,7 +510,7 @@ class BBP_Shortcodes {
|
|
516 |
}
|
517 |
|
518 |
// Return contents of output buffer
|
519 |
-
return $this->
|
520 |
}
|
521 |
|
522 |
/**
|
@@ -528,16 +522,16 @@ class BBP_Shortcodes {
|
|
528 |
* @uses current_theme_supports()
|
529 |
* @uses get_template_part()
|
530 |
*/
|
531 |
-
function display_topic_form() {
|
532 |
|
533 |
// Start output buffer
|
534 |
-
$this->
|
535 |
|
536 |
// Output templates
|
537 |
bbp_get_template_part( 'bbpress/form', 'topic' );
|
538 |
|
539 |
// Return contents of output buffer
|
540 |
-
return $this->
|
541 |
}
|
542 |
|
543 |
/** Replies ***************************************************************/
|
@@ -551,16 +545,16 @@ class BBP_Shortcodes {
|
|
551 |
* @uses current_theme_supports()
|
552 |
* @uses get_template_part()
|
553 |
*/
|
554 |
-
function display_reply_form() {
|
555 |
|
556 |
// Start output buffer
|
557 |
-
$this->
|
558 |
|
559 |
// Output templates
|
560 |
bbp_get_template_part( 'bbpress/form', 'reply' );
|
561 |
|
562 |
// Return contents of output buffer
|
563 |
-
return $this->
|
564 |
}
|
565 |
|
566 |
/** Topic Tags ************************************************************/
|
@@ -571,29 +565,26 @@ class BBP_Shortcodes {
|
|
571 |
*
|
572 |
* @since bbPress (r3110)
|
573 |
*
|
574 |
-
* @global bbPress $bbp
|
575 |
-
*
|
576 |
* @return string
|
577 |
*/
|
578 |
-
function display_topic_tags() {
|
579 |
-
global $bbp;
|
580 |
|
581 |
// Unset globals
|
582 |
-
$this->
|
583 |
|
584 |
// Start output buffer
|
585 |
-
$this->
|
586 |
|
587 |
// Output the topic tags
|
588 |
wp_tag_cloud( array(
|
589 |
'smallest' => 9,
|
590 |
'largest' => 38,
|
591 |
'number' => 80,
|
592 |
-
'taxonomy' =>
|
593 |
) );
|
594 |
|
595 |
// Return contents of output buffer
|
596 |
-
return $this->
|
597 |
}
|
598 |
|
599 |
/**
|
@@ -602,16 +593,13 @@ class BBP_Shortcodes {
|
|
602 |
*
|
603 |
* @since bbPress (r3110)
|
604 |
*
|
605 |
-
* @global bbPress $bbp
|
606 |
-
*
|
607 |
* @param array $attr
|
608 |
* @param string $content
|
609 |
* @uses current_theme_supports()
|
610 |
* @uses get_template_part()
|
611 |
* @return string
|
612 |
*/
|
613 |
-
function display_topics_of_tag( $attr, $content = '' ) {
|
614 |
-
global $bbp;
|
615 |
|
616 |
// Sanity check required info
|
617 |
if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) )
|
@@ -622,16 +610,16 @@ class BBP_Shortcodes {
|
|
622 |
|
623 |
// Setup tax query
|
624 |
$args = array( 'tax_query' => array( array(
|
625 |
-
'taxonomy' =>
|
626 |
'field' => 'id',
|
627 |
'terms' => $tag_id
|
628 |
) ) );
|
629 |
|
630 |
// Unset globals
|
631 |
-
$this->
|
632 |
|
633 |
// Start output buffer
|
634 |
-
$this->
|
635 |
|
636 |
// Breadcrumb
|
637 |
bbp_breadcrumb();
|
@@ -640,16 +628,13 @@ class BBP_Shortcodes {
|
|
640 |
bbp_topic_tag_description();
|
641 |
|
642 |
// Before tag topics
|
643 |
-
do_action( '
|
644 |
|
645 |
// Load the topics
|
646 |
if ( bbp_has_topics( $args ) ) {
|
647 |
-
|
648 |
-
// Template files
|
649 |
bbp_get_template_part( 'bbpress/pagination', 'topics' );
|
650 |
bbp_get_template_part( 'bbpress/loop', 'topics' );
|
651 |
bbp_get_template_part( 'bbpress/pagination', 'topics' );
|
652 |
-
bbp_get_template_part( 'bbpress/form', 'topic-tag' );
|
653 |
|
654 |
// No topics
|
655 |
} else {
|
@@ -657,10 +642,49 @@ class BBP_Shortcodes {
|
|
657 |
}
|
658 |
|
659 |
// After tag topics
|
660 |
-
do_action( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
|
662 |
// Return contents of output buffer
|
663 |
-
return $this->
|
664 |
}
|
665 |
|
666 |
/** Views *****************************************************************/
|
@@ -679,7 +703,7 @@ class BBP_Shortcodes {
|
|
679 |
* @uses bbp_single_forum_description()
|
680 |
* @return string
|
681 |
*/
|
682 |
-
function display_view( $attr, $content = '' ) {
|
683 |
global $bbp;
|
684 |
|
685 |
// Sanity check required info
|
@@ -690,7 +714,7 @@ class BBP_Shortcodes {
|
|
690 |
$view_id = $attr['id'];
|
691 |
|
692 |
// Start output buffer
|
693 |
-
$this->
|
694 |
|
695 |
// Breadcrumb
|
696 |
bbp_breadcrumb();
|
@@ -707,7 +731,7 @@ class BBP_Shortcodes {
|
|
707 |
/** Topics ********************************************************/
|
708 |
|
709 |
// Unset globals
|
710 |
-
$this->
|
711 |
|
712 |
// Load the topic index
|
713 |
if ( bbp_view_query( $view_id ) ) {
|
@@ -722,7 +746,7 @@ class BBP_Shortcodes {
|
|
722 |
}
|
723 |
|
724 |
// Return contents of output buffer
|
725 |
-
return $this->
|
726 |
}
|
727 |
|
728 |
/** Account ***************************************************************/
|
@@ -736,14 +760,14 @@ class BBP_Shortcodes {
|
|
736 |
*
|
737 |
* @return string
|
738 |
*/
|
739 |
-
function display_login() {
|
740 |
global $bbp;
|
741 |
|
742 |
// Unset globals
|
743 |
-
$this->
|
744 |
|
745 |
// Start output buffer
|
746 |
-
$this->
|
747 |
|
748 |
// Output templates
|
749 |
if ( !is_user_logged_in() )
|
@@ -752,7 +776,7 @@ class BBP_Shortcodes {
|
|
752 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
753 |
|
754 |
// Return contents of output buffer
|
755 |
-
return $this->
|
756 |
}
|
757 |
|
758 |
/**
|
@@ -764,14 +788,14 @@ class BBP_Shortcodes {
|
|
764 |
*
|
765 |
* @return string
|
766 |
*/
|
767 |
-
function display_register() {
|
768 |
global $bbp;
|
769 |
|
770 |
// Unset globals
|
771 |
-
$this->
|
772 |
|
773 |
// Start output buffer
|
774 |
-
$this->
|
775 |
|
776 |
// Output templates
|
777 |
if ( !is_user_logged_in() )
|
@@ -780,7 +804,7 @@ class BBP_Shortcodes {
|
|
780 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
781 |
|
782 |
// Return contents of output buffer
|
783 |
-
return $this->
|
784 |
}
|
785 |
|
786 |
/**
|
@@ -792,14 +816,14 @@ class BBP_Shortcodes {
|
|
792 |
*
|
793 |
* @return string
|
794 |
*/
|
795 |
-
function display_lost_pass() {
|
796 |
global $bbp;
|
797 |
|
798 |
// Unset globals
|
799 |
-
$this->
|
800 |
|
801 |
// Start output buffer
|
802 |
-
$this->
|
803 |
|
804 |
// Output templates
|
805 |
if ( !is_user_logged_in() )
|
@@ -808,7 +832,7 @@ class BBP_Shortcodes {
|
|
808 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
809 |
|
810 |
// Return contents of output buffer
|
811 |
-
return $this->
|
812 |
}
|
813 |
|
814 |
/** Other *****************************************************************/
|
@@ -822,19 +846,19 @@ class BBP_Shortcodes {
|
|
822 |
*
|
823 |
* @return string
|
824 |
*/
|
825 |
-
function display_breadcrumb() {
|
826 |
|
827 |
// Unset globals
|
828 |
-
$this->
|
829 |
|
830 |
// Start output buffer
|
831 |
-
$this->
|
832 |
|
833 |
// Output breadcrumb
|
834 |
bbp_breadcrumb();
|
835 |
|
836 |
// Return contents of output buffer
|
837 |
-
return $this->
|
838 |
}
|
839 |
}
|
840 |
endif;
|
23 |
/**
|
24 |
* @var array Shortcode => function
|
25 |
*/
|
26 |
+
public $codes = array();
|
27 |
|
28 |
/** Functions *************************************************************/
|
29 |
|
32 |
*
|
33 |
* @since bbPress (r3031)
|
34 |
*
|
35 |
+
* @uses setup_globals()
|
36 |
+
* @uses add_shortcodes()
|
37 |
*/
|
38 |
+
public function __construct() {
|
39 |
+
$this->setup_globals();
|
40 |
+
$this->add_shortcodes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
48 |
*
|
49 |
* @uses apply_filters()
|
50 |
*/
|
51 |
+
private function setup_globals() {
|
52 |
|
53 |
// Setup the shortcodes
|
54 |
$this->codes = apply_filters( 'bbp_shortcodes', array(
|
111 |
* @uses add_shortcode()
|
112 |
* @uses do_action()
|
113 |
*/
|
114 |
+
private function add_shortcodes() {
|
115 |
|
116 |
+
// Loop through and add the shortcodes
|
117 |
foreach( $this->codes as $code => $function )
|
|
|
|
|
118 |
add_shortcode( $code, $function );
|
119 |
|
120 |
// Custom shortcodes
|
128 |
*
|
129 |
* @global bbPress $bbp
|
130 |
*/
|
131 |
+
private function unset_globals() {
|
132 |
global $bbp;
|
133 |
|
134 |
// Unset global queries
|
135 |
+
$bbp->forum_query = new stdClass;
|
136 |
+
$bbp->topic_query = new stdClass;
|
137 |
+
$bbp->reply_query = new stdClass;
|
138 |
|
139 |
// Unset global ID's
|
140 |
+
$bbp->current_forum_id = 0;
|
141 |
+
$bbp->current_topic_id = 0;
|
142 |
+
$bbp->current_reply_id = 0;
|
143 |
|
144 |
// Reset the post data
|
145 |
wp_reset_postdata();
|
155 |
* in the correct location in the_content() instead of when it's created.
|
156 |
*
|
157 |
* @since bbPress (r3079)
|
158 |
+
*
|
159 |
+
* @param string $query_name
|
160 |
+
*
|
161 |
+
* @uses bbp_set_query_name()
|
162 |
* @uses ob_start()
|
163 |
*/
|
164 |
+
private function start( $query_name = '' ) {
|
165 |
+
|
166 |
+
// Set query name
|
167 |
+
bbp_set_query_name( $query_name );
|
168 |
+
|
169 |
+
// Start output buffer
|
170 |
ob_start();
|
171 |
}
|
172 |
|
175 |
*
|
176 |
* @since bbPress( r3079)
|
177 |
*
|
178 |
+
* @uses BBP_Shortcodes::unset_globals() Cleans up global values
|
179 |
* @return string Contents of output buffer.
|
180 |
*/
|
181 |
+
private function end() {
|
182 |
|
183 |
// Put output into usable variable
|
184 |
$output = ob_get_contents();
|
185 |
|
186 |
// Unset globals
|
187 |
+
$this->unset_globals();
|
188 |
|
189 |
// Flush the output buffer
|
190 |
ob_end_clean();
|
191 |
|
192 |
+
// Reset the query name
|
193 |
+
bbp_reset_query_name();
|
194 |
+
|
195 |
return $output;
|
196 |
}
|
197 |
|
210 |
* @uses get_template_part()
|
211 |
* @return string
|
212 |
*/
|
213 |
+
public function display_forum_index() {
|
214 |
|
215 |
// Unset globals
|
216 |
+
$this->unset_globals();
|
217 |
|
218 |
// Start output buffer
|
219 |
+
$this->start( 'bbp_forum_archive' );
|
220 |
|
221 |
// Breadcrumb
|
222 |
bbp_breadcrumb();
|
236 |
do_action( 'bbp_template_after_forums_index' );
|
237 |
|
238 |
// Return contents of output buffer
|
239 |
+
return $this->end();
|
240 |
}
|
241 |
|
242 |
/**
|
253 |
* @uses bbp_single_forum_description()
|
254 |
* @return string
|
255 |
*/
|
256 |
+
public function display_forum( $attr, $content = '' ) {
|
257 |
global $bbp;
|
258 |
|
259 |
// Sanity check required info
|
268 |
return $content;
|
269 |
|
270 |
// Start output buffer
|
271 |
+
$this->start( 'bbp_single_forum' );
|
272 |
|
273 |
// Check forum caps
|
274 |
if ( bbp_user_can_view_forum( array( 'forum_id' => $forum_id ) ) ) {
|
310 |
if ( !bbp_is_forum_category( $forum_id ) ) {
|
311 |
|
312 |
// Unset globals
|
313 |
+
$this->unset_globals();
|
314 |
|
315 |
// Reset necessary forum_query attributes for topics loop to function
|
316 |
$bbp->forum_query->query_vars['post_type'] = bbp_get_forum_post_type();
|
348 |
}
|
349 |
|
350 |
// Return contents of output buffer
|
351 |
+
return $this->end();
|
352 |
}
|
353 |
|
354 |
/** Topic shortcodes ******************************************************/
|
367 |
* @uses get_template_part()
|
368 |
* @return string
|
369 |
*/
|
370 |
+
public function display_topic_index() {
|
371 |
|
372 |
// Query defaults
|
373 |
$topics_query = array(
|
377 |
);
|
378 |
|
379 |
// Unset globals
|
380 |
+
$this->unset_globals();
|
381 |
|
382 |
// Start output buffer
|
383 |
+
$this->start( 'bbp_topic_archive' );
|
384 |
|
385 |
// Breadcrumb
|
386 |
bbp_breadcrumb();
|
403 |
do_action( 'bbp_template_after_topics_index' );
|
404 |
|
405 |
// Return contents of output buffer
|
406 |
+
return $this->end();
|
407 |
}
|
408 |
|
409 |
/**
|
420 |
* @uses get_template_part()
|
421 |
* @return string
|
422 |
*/
|
423 |
+
public function display_topic( $attr, $content = '' ) {
|
424 |
global $bbp;
|
425 |
|
426 |
// Sanity check required info
|
443 |
) );
|
444 |
|
445 |
// Unset globals
|
446 |
+
$this->unset_globals();
|
447 |
|
448 |
// Reset the queries if not in theme compat
|
449 |
if ( !bbp_is_theme_compat_active() ) {
|
460 |
}
|
461 |
|
462 |
// Start output buffer
|
463 |
+
$this->start( 'bbp_single_topic' );
|
464 |
|
465 |
// Check forum caps
|
466 |
if ( bbp_user_can_view_forum( array( 'forum_id' => $forum_id ) ) ) {
|
492 |
|
493 |
// Load the topic
|
494 |
if ( bbp_has_replies( $replies_query ) ) {
|
|
|
495 |
bbp_get_template_part( 'bbpress/pagination', 'replies' );
|
496 |
bbp_get_template_part( 'bbpress/loop', 'replies' );
|
497 |
bbp_get_template_part( 'bbpress/pagination', 'replies' );
|
|
|
|
|
|
|
|
|
498 |
}
|
499 |
|
500 |
// Reply form
|
510 |
}
|
511 |
|
512 |
// Return contents of output buffer
|
513 |
+
return $this->end();
|
514 |
}
|
515 |
|
516 |
/**
|
522 |
* @uses current_theme_supports()
|
523 |
* @uses get_template_part()
|
524 |
*/
|
525 |
+
public function display_topic_form() {
|
526 |
|
527 |
// Start output buffer
|
528 |
+
$this->start( 'bbp_topic_form' );
|
529 |
|
530 |
// Output templates
|
531 |
bbp_get_template_part( 'bbpress/form', 'topic' );
|
532 |
|
533 |
// Return contents of output buffer
|
534 |
+
return $this->end();
|
535 |
}
|
536 |
|
537 |
/** Replies ***************************************************************/
|
545 |
* @uses current_theme_supports()
|
546 |
* @uses get_template_part()
|
547 |
*/
|
548 |
+
public function display_reply_form() {
|
549 |
|
550 |
// Start output buffer
|
551 |
+
$this->start( 'bbp_reply_form' );
|
552 |
|
553 |
// Output templates
|
554 |
bbp_get_template_part( 'bbpress/form', 'reply' );
|
555 |
|
556 |
// Return contents of output buffer
|
557 |
+
return $this->end();
|
558 |
}
|
559 |
|
560 |
/** Topic Tags ************************************************************/
|
565 |
*
|
566 |
* @since bbPress (r3110)
|
567 |
*
|
|
|
|
|
568 |
* @return string
|
569 |
*/
|
570 |
+
public function display_topic_tags() {
|
|
|
571 |
|
572 |
// Unset globals
|
573 |
+
$this->unset_globals();
|
574 |
|
575 |
// Start output buffer
|
576 |
+
$this->start( 'bbp_topic_tags' );
|
577 |
|
578 |
// Output the topic tags
|
579 |
wp_tag_cloud( array(
|
580 |
'smallest' => 9,
|
581 |
'largest' => 38,
|
582 |
'number' => 80,
|
583 |
+
'taxonomy' => bbp_get_topic_tag_tax_id()
|
584 |
) );
|
585 |
|
586 |
// Return contents of output buffer
|
587 |
+
return $this->end();
|
588 |
}
|
589 |
|
590 |
/**
|
593 |
*
|
594 |
* @since bbPress (r3110)
|
595 |
*
|
|
|
|
|
596 |
* @param array $attr
|
597 |
* @param string $content
|
598 |
* @uses current_theme_supports()
|
599 |
* @uses get_template_part()
|
600 |
* @return string
|
601 |
*/
|
602 |
+
public function display_topics_of_tag( $attr, $content = '' ) {
|
|
|
603 |
|
604 |
// Sanity check required info
|
605 |
if ( !empty( $content ) || ( empty( $attr['id'] ) || !is_numeric( $attr['id'] ) ) )
|
610 |
|
611 |
// Setup tax query
|
612 |
$args = array( 'tax_query' => array( array(
|
613 |
+
'taxonomy' => bbp_get_topic_tag_tax_id(),
|
614 |
'field' => 'id',
|
615 |
'terms' => $tag_id
|
616 |
) ) );
|
617 |
|
618 |
// Unset globals
|
619 |
+
$this->unset_globals();
|
620 |
|
621 |
// Start output buffer
|
622 |
+
$this->start( 'bbp_topics_of_tag' );
|
623 |
|
624 |
// Breadcrumb
|
625 |
bbp_breadcrumb();
|
628 |
bbp_topic_tag_description();
|
629 |
|
630 |
// Before tag topics
|
631 |
+
do_action( 'bbp_template_before_topic_tag' );
|
632 |
|
633 |
// Load the topics
|
634 |
if ( bbp_has_topics( $args ) ) {
|
|
|
|
|
635 |
bbp_get_template_part( 'bbpress/pagination', 'topics' );
|
636 |
bbp_get_template_part( 'bbpress/loop', 'topics' );
|
637 |
bbp_get_template_part( 'bbpress/pagination', 'topics' );
|
|
|
638 |
|
639 |
// No topics
|
640 |
} else {
|
642 |
}
|
643 |
|
644 |
// After tag topics
|
645 |
+
do_action( 'bbp_template_after_topic_tag' );
|
646 |
+
|
647 |
+
// Return contents of output buffer
|
648 |
+
return $this->end();
|
649 |
+
}
|
650 |
+
|
651 |
+
/**
|
652 |
+
* Display the contents of a specific topic tag in an output buffer
|
653 |
+
* and return to ensure that post/page contents are displayed first.
|
654 |
+
*
|
655 |
+
* @since bbPress (r3346)
|
656 |
+
*
|
657 |
+
* @param array $attr
|
658 |
+
* @param string $content
|
659 |
+
* @uses current_theme_supports()
|
660 |
+
* @uses get_template_part()
|
661 |
+
* @return string
|
662 |
+
*/
|
663 |
+
public function display_topic_tag_form() {
|
664 |
+
|
665 |
+
// Unset globals
|
666 |
+
$this->unset_globals();
|
667 |
+
|
668 |
+
// Start output buffer
|
669 |
+
$this->start( 'bbp_topic_tag_edit' );
|
670 |
+
|
671 |
+
// Breadcrumb
|
672 |
+
bbp_breadcrumb();
|
673 |
+
|
674 |
+
// Tag description
|
675 |
+
bbp_topic_tag_description();
|
676 |
+
|
677 |
+
// Before tag topics
|
678 |
+
do_action( 'bbp_template_before_topic_tag_edit' );
|
679 |
+
|
680 |
+
// Tag editing form
|
681 |
+
bbp_get_template_part( 'bbpress/form', 'topic-tag' );
|
682 |
+
|
683 |
+
// After tag topics
|
684 |
+
do_action( 'bbp_template_after_topic_tag_edit' );
|
685 |
|
686 |
// Return contents of output buffer
|
687 |
+
return $this->end();
|
688 |
}
|
689 |
|
690 |
/** Views *****************************************************************/
|
703 |
* @uses bbp_single_forum_description()
|
704 |
* @return string
|
705 |
*/
|
706 |
+
public function display_view( $attr, $content = '' ) {
|
707 |
global $bbp;
|
708 |
|
709 |
// Sanity check required info
|
714 |
$view_id = $attr['id'];
|
715 |
|
716 |
// Start output buffer
|
717 |
+
$this->start( 'bbp_single_view' );
|
718 |
|
719 |
// Breadcrumb
|
720 |
bbp_breadcrumb();
|
731 |
/** Topics ********************************************************/
|
732 |
|
733 |
// Unset globals
|
734 |
+
$this->unset_globals();
|
735 |
|
736 |
// Load the topic index
|
737 |
if ( bbp_view_query( $view_id ) ) {
|
746 |
}
|
747 |
|
748 |
// Return contents of output buffer
|
749 |
+
return $this->end();
|
750 |
}
|
751 |
|
752 |
/** Account ***************************************************************/
|
760 |
*
|
761 |
* @return string
|
762 |
*/
|
763 |
+
public function display_login() {
|
764 |
global $bbp;
|
765 |
|
766 |
// Unset globals
|
767 |
+
$this->unset_globals();
|
768 |
|
769 |
// Start output buffer
|
770 |
+
$this->start( 'bbp_login' );
|
771 |
|
772 |
// Output templates
|
773 |
if ( !is_user_logged_in() )
|
776 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
777 |
|
778 |
// Return contents of output buffer
|
779 |
+
return $this->end();
|
780 |
}
|
781 |
|
782 |
/**
|
788 |
*
|
789 |
* @return string
|
790 |
*/
|
791 |
+
public function display_register() {
|
792 |
global $bbp;
|
793 |
|
794 |
// Unset globals
|
795 |
+
$this->unset_globals();
|
796 |
|
797 |
// Start output buffer
|
798 |
+
$this->start( 'bbp_register' );
|
799 |
|
800 |
// Output templates
|
801 |
if ( !is_user_logged_in() )
|
804 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
805 |
|
806 |
// Return contents of output buffer
|
807 |
+
return $this->end();
|
808 |
}
|
809 |
|
810 |
/**
|
816 |
*
|
817 |
* @return string
|
818 |
*/
|
819 |
+
public function display_lost_pass() {
|
820 |
global $bbp;
|
821 |
|
822 |
// Unset globals
|
823 |
+
$this->unset_globals();
|
824 |
|
825 |
// Start output buffer
|
826 |
+
$this->start( 'bbp_lost_pass' );
|
827 |
|
828 |
// Output templates
|
829 |
if ( !is_user_logged_in() )
|
832 |
bbp_get_template_part( 'bbpress/feedback', 'logged-in' );
|
833 |
|
834 |
// Return contents of output buffer
|
835 |
+
return $this->end();
|
836 |
}
|
837 |
|
838 |
/** Other *****************************************************************/
|
846 |
*
|
847 |
* @return string
|
848 |
*/
|
849 |
+
public function display_breadcrumb() {
|
850 |
|
851 |
// Unset globals
|
852 |
+
$this->unset_globals();
|
853 |
|
854 |
// Start output buffer
|
855 |
+
$this->ob_start();
|
856 |
|
857 |
// Output breadcrumb
|
858 |
bbp_breadcrumb();
|
859 |
|
860 |
// Return contents of output buffer
|
861 |
+
return $this->end();
|
862 |
}
|
863 |
}
|
864 |
endif;
|
bbp-includes/bbp-core-widgets.php
CHANGED
@@ -23,6 +23,17 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
23 |
*/
|
24 |
class BBP_Login_Widget extends WP_Widget {
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* bbPress Login Widget
|
28 |
*
|
@@ -66,7 +77,7 @@ class BBP_Login_Widget extends WP_Widget {
|
|
66 |
|
67 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
68 |
<fieldset>
|
69 |
-
<legend><?php _e( '
|
70 |
|
71 |
<div class="bbp-username">
|
72 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
|
@@ -156,6 +167,17 @@ class BBP_Login_Widget extends WP_Widget {
|
|
156 |
*/
|
157 |
class BBP_Views_Widget extends WP_Widget {
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* bbPress View Widget
|
161 |
*
|
@@ -262,6 +284,17 @@ class BBP_Views_Widget extends WP_Widget {
|
|
262 |
*/
|
263 |
class BBP_Forums_Widget extends WP_Widget {
|
264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
/**
|
266 |
* bbPress Forum Widget
|
267 |
*
|
@@ -374,7 +407,7 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
374 |
</p>
|
375 |
|
376 |
<p>
|
377 |
-
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php _e( 'Parent
|
378 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo $parent_forum; ?>" />
|
379 |
</label>
|
380 |
|
@@ -398,6 +431,17 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
398 |
*/
|
399 |
class BBP_Topics_Widget extends WP_Widget {
|
400 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
/**
|
402 |
* bbPress Topic Widget
|
403 |
*
|
@@ -578,6 +622,17 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
578 |
*/
|
579 |
class BBP_Replies_Widget extends WP_Widget {
|
580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
/**
|
582 |
* bbPress Replies Widget
|
583 |
*
|
@@ -652,8 +707,11 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
652 |
<li>
|
653 |
|
654 |
<?php
|
|
|
|
|
|
|
655 |
/* translators: bbpress replies widget: 1: reply author, 2: reply link, 3: reply date, 4: reply time */
|
656 |
-
printf( _x( $show_date == 'on' ? '%1$s on %2$s, %3$s, %4$s' : '%1$s on %2$s', 'widgets', 'bbpress' ),
|
657 |
?>
|
658 |
|
659 |
</li>
|
23 |
*/
|
24 |
class BBP_Login_Widget extends WP_Widget {
|
25 |
|
26 |
+
/**
|
27 |
+
* Register the widget
|
28 |
+
*
|
29 |
+
* @since bbPress (r3389)
|
30 |
+
*
|
31 |
+
* @uses register_widget()
|
32 |
+
*/
|
33 |
+
function register_widget() {
|
34 |
+
register_widget( 'BBP_Login_Widget' );
|
35 |
+
}
|
36 |
+
|
37 |
/**
|
38 |
* bbPress Login Widget
|
39 |
*
|
77 |
|
78 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
79 |
<fieldset>
|
80 |
+
<legend><?php _e( 'Log In', 'bbpress' ); ?></legend>
|
81 |
|
82 |
<div class="bbp-username">
|
83 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
|
167 |
*/
|
168 |
class BBP_Views_Widget extends WP_Widget {
|
169 |
|
170 |
+
/**
|
171 |
+
* Register the widget
|
172 |
+
*
|
173 |
+
* @since bbPress (r3389)
|
174 |
+
*
|
175 |
+
* @uses register_widget()
|
176 |
+
*/
|
177 |
+
function register_widget() {
|
178 |
+
register_widget( 'BBP_Views_Widget' );
|
179 |
+
}
|
180 |
+
|
181 |
/**
|
182 |
* bbPress View Widget
|
183 |
*
|
284 |
*/
|
285 |
class BBP_Forums_Widget extends WP_Widget {
|
286 |
|
287 |
+
/**
|
288 |
+
* Register the widget
|
289 |
+
*
|
290 |
+
* @since bbPress (r3389)
|
291 |
+
*
|
292 |
+
* @uses register_widget()
|
293 |
+
*/
|
294 |
+
function register_widget() {
|
295 |
+
register_widget( 'BBP_Forums_Widget' );
|
296 |
+
}
|
297 |
+
|
298 |
/**
|
299 |
* bbPress Forum Widget
|
300 |
*
|
407 |
</p>
|
408 |
|
409 |
<p>
|
410 |
+
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php _e( 'Parent Forum:', 'bbpress' ); ?>
|
411 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo $parent_forum; ?>" />
|
412 |
</label>
|
413 |
|
431 |
*/
|
432 |
class BBP_Topics_Widget extends WP_Widget {
|
433 |
|
434 |
+
/**
|
435 |
+
* Register the widget
|
436 |
+
*
|
437 |
+
* @since bbPress (r3389)
|
438 |
+
*
|
439 |
+
* @uses register_widget()
|
440 |
+
*/
|
441 |
+
function register_widget() {
|
442 |
+
register_widget( 'BBP_Topics_Widget' );
|
443 |
+
}
|
444 |
+
|
445 |
/**
|
446 |
* bbPress Topic Widget
|
447 |
*
|
622 |
*/
|
623 |
class BBP_Replies_Widget extends WP_Widget {
|
624 |
|
625 |
+
/**
|
626 |
+
* Register the widget
|
627 |
+
*
|
628 |
+
* @since bbPress (r3389)
|
629 |
+
*
|
630 |
+
* @uses register_widget()
|
631 |
+
*/
|
632 |
+
function register_widget() {
|
633 |
+
register_widget( 'BBP_Replies_Widget' );
|
634 |
+
}
|
635 |
+
|
636 |
/**
|
637 |
* bbPress Replies Widget
|
638 |
*
|
707 |
<li>
|
708 |
|
709 |
<?php
|
710 |
+
$author_link = bbp_get_reply_author_link( array( 'type' => 'both', 'size' => 14 ) );
|
711 |
+
$reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url() ) . '" title="' . bbp_get_reply_excerpt( bbp_get_reply_id(), 50 ) . '">' . bbp_get_reply_topic_title() . '</a>';
|
712 |
+
|
713 |
/* translators: bbpress replies widget: 1: reply author, 2: reply link, 3: reply date, 4: reply time */
|
714 |
+
printf( _x( $show_date == 'on' ? '%1$s on %2$s, %3$s, %4$s' : '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link, get_the_date(), get_the_time() );
|
715 |
?>
|
716 |
|
717 |
</li>
|
bbp-includes/{bbp-core-akismet.php → bbp-extend-akismet.php}
RENAMED
@@ -21,15 +21,6 @@ if ( !class_exists( 'BBP_Akismet' ) ) :
|
|
21 |
*/
|
22 |
class BBP_Akismet {
|
23 |
|
24 |
-
/**
|
25 |
-
* The main bbPress Akismet loader (PHP4 compat)
|
26 |
-
*
|
27 |
-
* @since bbPress (r3277)
|
28 |
-
*/
|
29 |
-
function BBP_Akismet() {
|
30 |
-
$this->__construct();
|
31 |
-
}
|
32 |
-
|
33 |
/**
|
34 |
* The main bbPress Akismet loader
|
35 |
*
|
@@ -38,7 +29,7 @@ class BBP_Akismet {
|
|
38 |
* @uses add_filter()
|
39 |
*/
|
40 |
function __construct() {
|
41 |
-
$this->
|
42 |
}
|
43 |
|
44 |
/**
|
@@ -50,10 +41,7 @@ class BBP_Akismet {
|
|
50 |
* @uses add_filter() To add various filters
|
51 |
* @uses add_action() To add various actions
|
52 |
*/
|
53 |
-
function
|
54 |
-
|
55 |
-
// Bail if no akismet
|
56 |
-
if ( !defined( 'AKISMET_VERSION' ) ) return;
|
57 |
|
58 |
// bbPress functions to check for spam
|
59 |
$checks['check'] = array(
|
@@ -539,7 +527,7 @@ class BBP_Akismet {
|
|
539 |
$topic_id = bbp_get_topic_id( $topic_id );
|
540 |
|
541 |
// Get any pre-existing terms
|
542 |
-
$existing_terms = wp_get_object_terms( $topic_id,
|
543 |
|
544 |
// Save the terms for later in case the reply gets hammed
|
545 |
if ( !empty( $terms ) )
|
@@ -553,7 +541,7 @@ class BBP_Akismet {
|
|
553 |
endif;
|
554 |
|
555 |
/**
|
556 |
-
* Loads Akismet
|
557 |
*
|
558 |
* @since bbPress (r3277)
|
559 |
*
|
@@ -563,7 +551,11 @@ endif;
|
|
563 |
function bbp_setup_akismet() {
|
564 |
global $bbp;
|
565 |
|
566 |
-
|
|
|
|
|
|
|
|
|
567 |
}
|
568 |
|
569 |
?>
|
21 |
*/
|
22 |
class BBP_Akismet {
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* The main bbPress Akismet loader
|
26 |
*
|
29 |
* @uses add_filter()
|
30 |
*/
|
31 |
function __construct() {
|
32 |
+
$this->setup_actions();
|
33 |
}
|
34 |
|
35 |
/**
|
41 |
* @uses add_filter() To add various filters
|
42 |
* @uses add_action() To add various actions
|
43 |
*/
|
44 |
+
function setup_actions() {
|
|
|
|
|
|
|
45 |
|
46 |
// bbPress functions to check for spam
|
47 |
$checks['check'] = array(
|
527 |
$topic_id = bbp_get_topic_id( $topic_id );
|
528 |
|
529 |
// Get any pre-existing terms
|
530 |
+
$existing_terms = wp_get_object_terms( $topic_id, bbp_get_topic_tag_tax_id(), array( 'fields' => 'names' ) );
|
531 |
|
532 |
// Save the terms for later in case the reply gets hammed
|
533 |
if ( !empty( $terms ) )
|
541 |
endif;
|
542 |
|
543 |
/**
|
544 |
+
* Loads Akismet inside the bbPress global class
|
545 |
*
|
546 |
* @since bbPress (r3277)
|
547 |
*
|
551 |
function bbp_setup_akismet() {
|
552 |
global $bbp;
|
553 |
|
554 |
+
// Bail if no akismet
|
555 |
+
if ( !defined( 'AKISMET_VERSION' ) ) return;
|
556 |
+
|
557 |
+
// Instantiate Akismet for bbPress
|
558 |
+
$bbp->extend->akismet = new BBP_Akismet();
|
559 |
}
|
560 |
|
561 |
?>
|
bbp-includes/bbp-extend-buddypress.php
ADDED
@@ -0,0 +1,533 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Main bbPress BuddyPress Class
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage BuddyPress
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
+
|
13 |
+
if ( !class_exists( 'BBP_BuddyPress' ) ) :
|
14 |
+
/**
|
15 |
+
* Loads BuddyPress extension
|
16 |
+
*
|
17 |
+
* @since bbPress (r3395)
|
18 |
+
*
|
19 |
+
* @package bbPress
|
20 |
+
* @subpackage BuddyPress
|
21 |
+
*/
|
22 |
+
class BBP_BuddyPress {
|
23 |
+
|
24 |
+
/** Variables *************************************************************/
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The name of the BuddyPress component, used in activity streams
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
private $component = '';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Forum Create Activty Action
|
35 |
+
*
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
private $forum_create = '';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Topic Create Activty Action
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
private $topic_create = '';
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Topic Close Activty Action
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
private $topic_close = '';
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Topic Edit Activty Action
|
56 |
+
*
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
private $topic_edit = '';
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Topic Open Activty Action
|
63 |
+
*
|
64 |
+
* @var string
|
65 |
+
*/
|
66 |
+
private $topic_open = '';
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Reply Create Activty Action
|
70 |
+
*
|
71 |
+
* @var string
|
72 |
+
*/
|
73 |
+
private $reply_create = '';
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Reply Edit Activty Action
|
77 |
+
*
|
78 |
+
* @var string
|
79 |
+
*/
|
80 |
+
private $reply_edit = '';
|
81 |
+
|
82 |
+
/** Functions *************************************************************/
|
83 |
+
|
84 |
+
/**
|
85 |
+
* The main bbPress BuddyPress loader
|
86 |
+
*
|
87 |
+
* @since bbPress (r3395)
|
88 |
+
*/
|
89 |
+
function __construct() {
|
90 |
+
$this->setup_globals();
|
91 |
+
$this->setup_actions();
|
92 |
+
$this->setup_filters();
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Extension variables
|
97 |
+
*
|
98 |
+
* @since bbPress (r3395)
|
99 |
+
* @access private
|
100 |
+
*
|
101 |
+
* @uses apply_filters() Calls various filters
|
102 |
+
*/
|
103 |
+
private function setup_globals() {
|
104 |
+
|
105 |
+
// The name of the BuddyPress component, used in activity streams
|
106 |
+
$this->component = 'bbpress';
|
107 |
+
|
108 |
+
// Forums
|
109 |
+
$this->forum_create = 'bbp_forum_create';
|
110 |
+
|
111 |
+
// Topics
|
112 |
+
$this->topic_create = 'bbp_topic_create';
|
113 |
+
$this->topic_edit = 'bbp_topic_edit';
|
114 |
+
$this->topic_close = 'bbp_topic_close';
|
115 |
+
$this->topic_open = 'bbp_topic_open';
|
116 |
+
|
117 |
+
// Replies
|
118 |
+
$this->reply_create = 'bbp_topic_create';
|
119 |
+
$this->reply_edit = 'bbp_topic_edit';
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Setup the actions
|
124 |
+
*
|
125 |
+
* @since bbPress (r3395)
|
126 |
+
* @access private
|
127 |
+
*
|
128 |
+
* @uses add_filter() To add various filters
|
129 |
+
* @uses add_action() To add various actions
|
130 |
+
*/
|
131 |
+
private function setup_actions() {
|
132 |
+
|
133 |
+
/** Activity **********************************************************/
|
134 |
+
|
135 |
+
// Register the activity stream actions
|
136 |
+
add_action( 'bp_register_activity_actions', array( $this, 'register_activity_actions' ) );
|
137 |
+
|
138 |
+
// Hook into topic creation
|
139 |
+
add_action( 'bbp_new_topic', array( $this, 'topic_create' ), 10, 4 );
|
140 |
+
|
141 |
+
// Hook into reply creation
|
142 |
+
add_action( 'bbp_new_reply', array( $this, 'reply_create' ), 10, 5 );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Setup the filters
|
147 |
+
*
|
148 |
+
* @since bbPress (r3395)
|
149 |
+
* @access private
|
150 |
+
*
|
151 |
+
* @uses add_filter() To add various filters
|
152 |
+
* @uses add_action() To add various actions
|
153 |
+
*/
|
154 |
+
private function setup_filters() {
|
155 |
+
|
156 |
+
/** Activity **********************************************************/
|
157 |
+
|
158 |
+
// Obey BuddyPress commenting rules
|
159 |
+
add_filter( 'bp_activity_can_comment', array( $this, 'activity_can_comment' ) );
|
160 |
+
|
161 |
+
// Link directly to the topic or reply
|
162 |
+
add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 );
|
163 |
+
|
164 |
+
/** Profiles **********************************************************/
|
165 |
+
|
166 |
+
// Override bbPress user profile URL with BuddyPress profile URL
|
167 |
+
add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Register our activity actions with BuddyPress
|
172 |
+
*
|
173 |
+
* @since bbPress (r3395)
|
174 |
+
*
|
175 |
+
* @uses bp_activity_set_action()
|
176 |
+
*/
|
177 |
+
public function register_activity_actions() {
|
178 |
+
|
179 |
+
// Topics
|
180 |
+
bp_activity_set_action( $this->component, $this->topic_create, __( 'New topic created', 'bbpress' ) );
|
181 |
+
|
182 |
+
// Replies
|
183 |
+
bp_activity_set_action( $this->component, $this->reply_create, __( 'New reply created', 'bbpress' ) );
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Wrapper for recoding bbPress actions to the BuddyPress activity stream
|
188 |
+
*
|
189 |
+
* @since bbPress (r3395)
|
190 |
+
*
|
191 |
+
* @param type $args Array of arguments for bp_activity_add()
|
192 |
+
* @uses bbp_get_current_user_id()
|
193 |
+
* @uses bp_core_current_time()
|
194 |
+
* @uses wp_parse_args()
|
195 |
+
* @uses aplly_filters()
|
196 |
+
* @uses bp_activity_add()
|
197 |
+
*
|
198 |
+
* @return type Activity ID if successful, false if not
|
199 |
+
*/
|
200 |
+
private function record_activity( $args = '' ) {
|
201 |
+
|
202 |
+
// Bail if activity is not active
|
203 |
+
if ( !bp_is_active( 'activity' ) )
|
204 |
+
return false;
|
205 |
+
|
206 |
+
// Default activity args
|
207 |
+
$defaults = array (
|
208 |
+
'user_id' => bbp_get_current_user_id(),
|
209 |
+
'type' => '',
|
210 |
+
'action' => '',
|
211 |
+
'item_id' => '',
|
212 |
+
'secondary_item_id' => '',
|
213 |
+
'content' => '',
|
214 |
+
'primary_link' => '',
|
215 |
+
'component' => $this->component,
|
216 |
+
'recorded_time' => bp_core_current_time(),
|
217 |
+
'hide_sitewide' => false
|
218 |
+
);
|
219 |
+
|
220 |
+
// Parse the difference
|
221 |
+
$activity = wp_parse_args( $args, $defaults );
|
222 |
+
|
223 |
+
// Just in-time filtering of activity stream contents
|
224 |
+
$activity = apply_filters( 'bbp_record_activity', $activity );
|
225 |
+
|
226 |
+
// Add the activity
|
227 |
+
return bp_activity_add( $activity );
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Wrapper for deleting bbPress actions from BuddyPress activity stream
|
232 |
+
*
|
233 |
+
* @since bbPress (r3395)
|
234 |
+
*
|
235 |
+
* @param type $args Array of arguments for bp_activity_add()
|
236 |
+
* @uses bbp_get_current_user_id()
|
237 |
+
* @uses bp_core_current_time()
|
238 |
+
* @uses wp_parse_args()
|
239 |
+
* @uses aplly_filters()
|
240 |
+
* @uses bp_activity_add()
|
241 |
+
*
|
242 |
+
* @return type Activity ID if successful, false if not
|
243 |
+
*/
|
244 |
+
public function delete_activity( $args = '' ) {
|
245 |
+
|
246 |
+
// Bail if activity is not active
|
247 |
+
if ( !bp_is_active( 'activity' ) )
|
248 |
+
return;
|
249 |
+
|
250 |
+
// Default activity args
|
251 |
+
$defaults = array(
|
252 |
+
'item_id' => false,
|
253 |
+
'component' => $this->component,
|
254 |
+
'type' => false,
|
255 |
+
'user_id' => false,
|
256 |
+
'secondary_item_id' => false
|
257 |
+
);
|
258 |
+
|
259 |
+
// Parse the differenc
|
260 |
+
$activity = wp_parse_args( $args, $defaults );
|
261 |
+
|
262 |
+
// Just in-time filtering of activity stream contents
|
263 |
+
$activity = apply_filters( 'bbp_delete_activity', $activity );
|
264 |
+
|
265 |
+
// Delete the activity
|
266 |
+
bp_activity_delete_by_item_id( $activity );
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Maybe disable activity stream comments on select actions
|
271 |
+
*
|
272 |
+
* @since bbPress (r3399)
|
273 |
+
*
|
274 |
+
* @global BP_Activity_Template $activities_template
|
275 |
+
* @global BuddyPress $bp
|
276 |
+
* @param boolean $can_comment
|
277 |
+
* @uses bp_get_activity_action_name()
|
278 |
+
* @return boolean
|
279 |
+
*/
|
280 |
+
public function activity_can_comment( $can_comment = true ) {
|
281 |
+
global $activities_template, $bp;
|
282 |
+
|
283 |
+
// Already forced off, so comply
|
284 |
+
if ( false === $can_comment )
|
285 |
+
return $can_comment;
|
286 |
+
|
287 |
+
// Check if blog & forum activity stream commenting is off
|
288 |
+
if ( ( false === $activities_template->disable_blogforum_replies ) || (int) $activities_template->disable_blogforum_replies ) {
|
289 |
+
|
290 |
+
// Get the current action name
|
291 |
+
$action_name = bp_get_activity_action_name();
|
292 |
+
|
293 |
+
// Setup the array of possibly disabled actions
|
294 |
+
$disabled_actions = array(
|
295 |
+
$this->topic_create,
|
296 |
+
$this->reply_create
|
297 |
+
);
|
298 |
+
|
299 |
+
// Check if this activity stream action is disabled
|
300 |
+
if ( in_array( $action_name, $disabled_actions ) ) {
|
301 |
+
$can_comment = false;
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
return $can_comment;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Maybe link directly to topics and replies in activity stream entries
|
310 |
+
*
|
311 |
+
* @since bbPress (r3399)
|
312 |
+
*
|
313 |
+
* @param string $link
|
314 |
+
* @param mixed $activity_object
|
315 |
+
*
|
316 |
+
* @return string The link to the activity stream item
|
317 |
+
*/
|
318 |
+
public function activity_get_permalink( $link = '', $activity_object = false ) {
|
319 |
+
|
320 |
+
// Setup the array of actions to link directly to
|
321 |
+
$disabled_actions = array(
|
322 |
+
$this->topic_create,
|
323 |
+
$this->reply_create
|
324 |
+
);
|
325 |
+
|
326 |
+
// Check if this activity stream action is directly linked
|
327 |
+
if ( in_array( $activity_object->type, $disabled_actions ) ) {
|
328 |
+
$link = $activity_object->primary_link;
|
329 |
+
}
|
330 |
+
|
331 |
+
return $link;
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Override bbPress profile URL with BuddyPress profile URL
|
336 |
+
*
|
337 |
+
* @since bbPress (r3401)
|
338 |
+
*
|
339 |
+
* @param string $url
|
340 |
+
* @param int $user_id
|
341 |
+
* @param string $user_nicename
|
342 |
+
*
|
343 |
+
* @return string
|
344 |
+
*/
|
345 |
+
public function user_profile_url( $user_id ) {
|
346 |
+
$profile_url = bp_core_get_user_domain( $user_id );
|
347 |
+
|
348 |
+
return $profile_url;
|
349 |
+
}
|
350 |
+
|
351 |
+
/** Topics ****************************************************************/
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Record an activity stream entry when a topic is created
|
355 |
+
*
|
356 |
+
* @since bbPress (r3395)
|
357 |
+
*
|
358 |
+
* @param int $topic_id
|
359 |
+
* @param int $forum_id
|
360 |
+
* @param array $anonymous_data
|
361 |
+
* @param int $topic_author_id
|
362 |
+
*
|
363 |
+
* @uses bbp_get_topic_id()
|
364 |
+
* @uses bbp_get_forum_id()
|
365 |
+
* @uses bbp_get_user_profile_link()
|
366 |
+
* @uses bbp_get_topic_permalink()
|
367 |
+
* @uses bbp_get_topic_title()
|
368 |
+
* @uses bbp_get_topic_content()
|
369 |
+
* @uses bbp_get_forum_permalink()
|
370 |
+
* @uses bbp_get_forum_title()
|
371 |
+
* @uses bp_create_excerpt()
|
372 |
+
* @uses apply_filters()
|
373 |
+
*
|
374 |
+
* @return Bail early if topic is by anonywous user
|
375 |
+
*/
|
376 |
+
public function topic_create( $topic_id, $forum_id, $anonymous_data, $topic_author_id ) {
|
377 |
+
|
378 |
+
// Bail early if topic is by anonywous user
|
379 |
+
if ( !empty( $anonymous_data ) )
|
380 |
+
return;
|
381 |
+
|
382 |
+
// Bail if site is private
|
383 |
+
if ( !bbp_is_site_public() )
|
384 |
+
return;
|
385 |
+
|
386 |
+
// Validate activity data
|
387 |
+
$user_id = $topic_author_id;
|
388 |
+
$topic_id = bbp_get_topic_id( $topic_id );
|
389 |
+
$forum_id = bbp_get_forum_id( $forum_id );
|
390 |
+
|
391 |
+
// Bail if forum is not public
|
392 |
+
if ( !bbp_is_forum_public( $forum_id ) )
|
393 |
+
return;
|
394 |
+
|
395 |
+
// User link for topic author
|
396 |
+
$user_link = bbp_get_user_profile_link( $user_id );
|
397 |
+
|
398 |
+
// Topic
|
399 |
+
$topic_permalink = bbp_get_topic_permalink( $topic_id );
|
400 |
+
$topic_title = bbp_get_topic_title ( $topic_id );
|
401 |
+
$topic_content = bbp_get_topic_content ( $topic_id );
|
402 |
+
$topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
|
403 |
+
|
404 |
+
// Forum
|
405 |
+
$forum_permalink = bbp_get_forum_permalink( $forum_id );
|
406 |
+
$forum_title = bbp_get_forum_title ( $forum_id );
|
407 |
+
$forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
|
408 |
+
|
409 |
+
// Activity action & text
|
410 |
+
$activity_text = sprintf( __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
|
411 |
+
$activity_action = apply_filters( 'bbp_activity_topic_create', $activity_text, $user_id, $topic_id, $forum_id );
|
412 |
+
$activity_content = apply_filters( 'bbp_activity_topic_create_excerpt', bp_create_excerpt( $topic_content ), $topic_content );
|
413 |
+
|
414 |
+
// Compile the activity stream results
|
415 |
+
$activity = array(
|
416 |
+
'user_id' => $user_id,
|
417 |
+
'action' => $activity_action,
|
418 |
+
'content' => $activity_content,
|
419 |
+
'primary_link' => $topic_permalink,
|
420 |
+
'type' => $this->topic_create,
|
421 |
+
'item_id' => $topic_id,
|
422 |
+
'secondary_item_id' => $forum_id,
|
423 |
+
);
|
424 |
+
|
425 |
+
// Record the activity
|
426 |
+
$this->record_activity( $activity );
|
427 |
+
}
|
428 |
+
|
429 |
+
/** Replies ***************************************************************/
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Record an activity stream entry when a reply is created
|
433 |
+
*
|
434 |
+
* @since bbPress (r3395)
|
435 |
+
*
|
436 |
+
* @param int $topic_id
|
437 |
+
* @param int $forum_id
|
438 |
+
* @param array $anonymous_data
|
439 |
+
* @param int $topic_author_id
|
440 |
+
*
|
441 |
+
* @uses bbp_get_reply_id()
|
442 |
+
* @uses bbp_get_topic_id()
|
443 |
+
* @uses bbp_get_forum_id()
|
444 |
+
* @uses bbp_get_user_profile_link()
|
445 |
+
* @uses bbp_get_reply_url()
|
446 |
+
* @uses bbp_get_reply_content()
|
447 |
+
* @uses bbp_get_topic_permalink()
|
448 |
+
* @uses bbp_get_topic_title()
|
449 |
+
* @uses bbp_get_forum_permalink()
|
450 |
+
* @uses bbp_get_forum_title()
|
451 |
+
* @uses bp_create_excerpt()
|
452 |
+
* @uses apply_filters()
|
453 |
+
*
|
454 |
+
* @return Bail early if topic is by anonywous user
|
455 |
+
*/
|
456 |
+
public function reply_create( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author_id ) {
|
457 |
+
|
458 |
+
// Do not log activity of anonymous users
|
459 |
+
if ( !empty( $anonymous_data ) )
|
460 |
+
return;
|
461 |
+
|
462 |
+
// Bail if site is private
|
463 |
+
if ( !bbp_is_site_public() )
|
464 |
+
return;
|
465 |
+
|
466 |
+
// Validate activity data
|
467 |
+
$user_id = $reply_author_id;
|
468 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
469 |
+
$topic_id = bbp_get_topic_id( $topic_id );
|
470 |
+
$forum_id = bbp_get_forum_id( $forum_id );
|
471 |
+
|
472 |
+
// Bail if forum is not public
|
473 |
+
if ( !bbp_is_forum_public( $forum_id ) )
|
474 |
+
return;
|
475 |
+
|
476 |
+
// Setup links for activity stream
|
477 |
+
$user_link = bbp_get_user_profile_link( $user_id );
|
478 |
+
|
479 |
+
// Reply
|
480 |
+
$reply_url = bbp_get_reply_url ( $reply_id );
|
481 |
+
$reply_content = bbp_get_reply_content( $reply_id );
|
482 |
+
|
483 |
+
// Topic
|
484 |
+
$topic_permalink = bbp_get_topic_permalink( $topic_id );
|
485 |
+
$topic_title = bbp_get_topic_title ( $topic_id );
|
486 |
+
$topic_link = '<a href="' . $topic_permalink . '" title="' . $topic_title . '">' . $topic_title . '</a>';
|
487 |
+
|
488 |
+
// Forum
|
489 |
+
$forum_permalink = bbp_get_forum_permalink( $forum_id );
|
490 |
+
$forum_title = bbp_get_forum_title ( $forum_id );
|
491 |
+
$forum_link = '<a href="' . $forum_permalink . '" title="' . $forum_title . '">' . $forum_title . '</a>';
|
492 |
+
|
493 |
+
// Activity action & text
|
494 |
+
$activity_text = sprintf( __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
|
495 |
+
$activity_action = apply_filters( 'bbp_activity_reply_create', $activity_text, $user_id, $reply_id, $topic_id );
|
496 |
+
$activity_content = apply_filters( 'bbp_activity_reply_create_excerpt', bp_create_excerpt( $reply_content ), $reply_content );
|
497 |
+
|
498 |
+
// Compile the activity stream results
|
499 |
+
$activity = array(
|
500 |
+
'user_id' => $user_id,
|
501 |
+
'action' => $activity_action,
|
502 |
+
'content' => $activity_content,
|
503 |
+
'primary_link' => $reply_url,
|
504 |
+
'type' => $this->reply_create,
|
505 |
+
'item_id' => $reply_id,
|
506 |
+
'secondary_item_id' => $topic_id,
|
507 |
+
);
|
508 |
+
|
509 |
+
// Record the activity
|
510 |
+
$this->record_activity( $activity );
|
511 |
+
}
|
512 |
+
}
|
513 |
+
endif;
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Loads BuddyPress inside the bbPress global class
|
517 |
+
*
|
518 |
+
* @since bbPress (r3395)
|
519 |
+
*
|
520 |
+
* @global bbPress $bbp
|
521 |
+
* @return If bbPress is not active
|
522 |
+
*/
|
523 |
+
function bbp_setup_buddypress() {
|
524 |
+
global $bbp;
|
525 |
+
|
526 |
+
// Bail if no BuddyPress
|
527 |
+
if ( !defined( 'BP_VERSION' ) ) return;
|
528 |
+
|
529 |
+
// Instantiate BuddyPress for bbPress
|
530 |
+
$bbp->extend->buddypress = new BBP_BuddyPress();
|
531 |
+
}
|
532 |
+
|
533 |
+
?>
|
bbp-includes/bbp-forum-functions.php
CHANGED
@@ -10,6 +10,71 @@
|
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/** Walk **********************************************************************/
|
14 |
|
15 |
/**
|
@@ -534,7 +599,7 @@ function bbp_update_forum_topic_count( $forum_id = 0 ) {
|
|
534 |
$total_topics = $topics + $children_topic_count;
|
535 |
|
536 |
// Update the count
|
537 |
-
update_post_meta( $forum_id, '
|
538 |
update_post_meta( $forum_id, '_bbp_total_topic_count', (int) $total_topics );
|
539 |
|
540 |
return apply_filters( 'bbp_update_forum_topic_count', (int) $total_topics, $forum_id );
|
@@ -554,11 +619,11 @@ function bbp_update_forum_topic_count( $forum_id = 0 ) {
|
|
554 |
* @uses wpdb::prepare() To prepare our sql query
|
555 |
* @uses wpdb::get_col() To execute our query and get the column back
|
556 |
* @uses update_post_meta() To update the forum hidden topic count meta
|
557 |
-
* @uses apply_filters() Calls '
|
558 |
* hidden topic count and forum id
|
559 |
* @return int Topic hidden topic count
|
560 |
*/
|
561 |
-
function
|
562 |
global $wpdb, $bbp;
|
563 |
|
564 |
// If topic_id was passed as $forum_id, then get its forum
|
@@ -582,7 +647,7 @@ function bbp_update_forum_hidden_topic_count( $forum_id = 0, $topic_count = 0 )
|
|
582 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) $topic_count );
|
583 |
}
|
584 |
|
585 |
-
return apply_filters( '
|
586 |
}
|
587 |
|
588 |
/**
|
@@ -656,7 +721,7 @@ function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
|
656 |
* @uses bbp_update_forum_subforum_count() To update the subforum count
|
657 |
* @uses bbp_update_forum_topic_count() To update the forum topic count
|
658 |
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
659 |
-
* @uses
|
660 |
*/
|
661 |
function bbp_update_forum( $args = '' ) {
|
662 |
$defaults = array(
|
@@ -688,7 +753,7 @@ function bbp_update_forum( $args = '' ) {
|
|
688 |
bbp_update_forum_subforum_count ( $forum_id );
|
689 |
bbp_update_forum_reply_count ( $forum_id );
|
690 |
bbp_update_forum_topic_count ( $forum_id );
|
691 |
-
|
692 |
|
693 |
// Update the parent forum if one was passed
|
694 |
if ( !empty( $post_parent ) && is_numeric( $post_parent ) ) {
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
+
/** Insert ********************************************************************/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* A wrapper for wp_insert_post() that also includes the necessary meta values
|
17 |
+
* for the forum to function properly.
|
18 |
+
*
|
19 |
+
* @since bbPress (r3349)
|
20 |
+
*
|
21 |
+
* @uses wp_parse_args()
|
22 |
+
* @uses bbp_get_forum_post_type()
|
23 |
+
* @uses wp_insert_post()
|
24 |
+
* @uses update_post_meta()
|
25 |
+
*
|
26 |
+
* @param array $forum_data Forum post data
|
27 |
+
* @param arrap $forum_meta Forum meta data
|
28 |
+
*/
|
29 |
+
function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
30 |
+
|
31 |
+
// Forum
|
32 |
+
$default_forum = array(
|
33 |
+
'post_parent' => 0, // forum ID
|
34 |
+
'post_status' => 'publish',
|
35 |
+
'post_type' => bbp_get_forum_post_type(),
|
36 |
+
'post_author' => 0,
|
37 |
+
'post_password' => '',
|
38 |
+
'post_content' => '',
|
39 |
+
'post_title' => '',
|
40 |
+
'menu_order' => 0,
|
41 |
+
);
|
42 |
+
|
43 |
+
// Parse args
|
44 |
+
$forum_data = wp_parse_args( $forum_data, $default_forum );
|
45 |
+
|
46 |
+
// Insert forum
|
47 |
+
$forum_id = wp_insert_post( $forum_data );
|
48 |
+
|
49 |
+
// Bail if no forum was added
|
50 |
+
if ( empty( $forum_id ) )
|
51 |
+
return false;
|
52 |
+
|
53 |
+
// Forum meta
|
54 |
+
$default_meta = array(
|
55 |
+
'reply_count' => 0,
|
56 |
+
'topic_count' => 0,
|
57 |
+
'topic_count_hidden' => 0,
|
58 |
+
'total_reply_count' => 0,
|
59 |
+
'total_topic_count' => 0,
|
60 |
+
'last_topic_id' => 0,
|
61 |
+
'last_reply_id' => 0,
|
62 |
+
'last_active_id' => 0,
|
63 |
+
'last_active_time' => 0,
|
64 |
+
'forum_subforum_count' => 0,
|
65 |
+
);
|
66 |
+
|
67 |
+
// Parse args
|
68 |
+
$forum_meta = wp_parse_args( $forum_meta, $default_meta );
|
69 |
+
|
70 |
+
// Insert forum meta
|
71 |
+
foreach ( $forum_meta as $meta_key => $meta_value )
|
72 |
+
update_post_meta( $forum_id, '_bbp_' . $meta_key, $meta_value );
|
73 |
+
|
74 |
+
// Return new forum ID
|
75 |
+
return $forum_id;
|
76 |
+
}
|
77 |
+
|
78 |
/** Walk **********************************************************************/
|
79 |
|
80 |
/**
|
599 |
$total_topics = $topics + $children_topic_count;
|
600 |
|
601 |
// Update the count
|
602 |
+
update_post_meta( $forum_id, '_bbp_topic_count', (int) $topics );
|
603 |
update_post_meta( $forum_id, '_bbp_total_topic_count', (int) $total_topics );
|
604 |
|
605 |
return apply_filters( 'bbp_update_forum_topic_count', (int) $total_topics, $forum_id );
|
619 |
* @uses wpdb::prepare() To prepare our sql query
|
620 |
* @uses wpdb::get_col() To execute our query and get the column back
|
621 |
* @uses update_post_meta() To update the forum hidden topic count meta
|
622 |
+
* @uses apply_filters() Calls 'bbp_update_forum_topic_count_hidden' with the
|
623 |
* hidden topic count and forum id
|
624 |
* @return int Topic hidden topic count
|
625 |
*/
|
626 |
+
function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 ) {
|
627 |
global $wpdb, $bbp;
|
628 |
|
629 |
// If topic_id was passed as $forum_id, then get its forum
|
647 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) $topic_count );
|
648 |
}
|
649 |
|
650 |
+
return apply_filters( 'bbp_update_forum_topic_count_hidden', (int) $topic_count, $forum_id );
|
651 |
}
|
652 |
|
653 |
/**
|
721 |
* @uses bbp_update_forum_subforum_count() To update the subforum count
|
722 |
* @uses bbp_update_forum_topic_count() To update the forum topic count
|
723 |
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
724 |
+
* @uses bbp_update_forum_topic_count_hidden() To update the hidden topic count
|
725 |
*/
|
726 |
function bbp_update_forum( $args = '' ) {
|
727 |
$defaults = array(
|
753 |
bbp_update_forum_subforum_count ( $forum_id );
|
754 |
bbp_update_forum_reply_count ( $forum_id );
|
755 |
bbp_update_forum_topic_count ( $forum_id );
|
756 |
+
bbp_update_forum_topic_count_hidden( $forum_id );
|
757 |
|
758 |
// Update the parent forum if one was passed
|
759 |
if ( !empty( $post_parent ) && is_numeric( $post_parent ) ) {
|
bbp-includes/bbp-forum-template.php
CHANGED
@@ -60,9 +60,6 @@ function bbp_forum_post_type() {
|
|
60 |
function bbp_has_forums( $args = '' ) {
|
61 |
global $bbp;
|
62 |
|
63 |
-
// Make sure we're back where we started
|
64 |
-
wp_reset_postdata();
|
65 |
-
|
66 |
// Setup possible post__not_in array
|
67 |
$post_stati[] = 'publish';
|
68 |
|
@@ -115,7 +112,15 @@ function bbp_has_forums( $args = '' ) {
|
|
115 |
*/
|
116 |
function bbp_forums() {
|
117 |
global $bbp;
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
|
121 |
/**
|
@@ -153,8 +158,8 @@ function bbp_forum_id( $forum_id = 0 ) {
|
|
153 |
* @uses bbPress::forum_query::in_the_loop To check if we're in the loop
|
154 |
* @uses bbPress::forum_query::post::ID To get the forum id
|
155 |
* @uses WP_Query::post::ID To get the forum id
|
156 |
-
* @uses
|
157 |
-
* @uses
|
158 |
* @uses bbp_get_topic_forum_id() To get the topic forum id
|
159 |
* @uses get_post_field() To get the post's post type
|
160 |
* @uses apply_filters() Calls 'bbp_get_forum_id' with the forum id and
|
@@ -173,11 +178,11 @@ function bbp_forum_id( $forum_id = 0 ) {
|
|
173 |
$bbp_forum_id = $bbp->current_forum_id = $bbp->forum_query->post->ID;
|
174 |
|
175 |
// Currently viewing a forum
|
176 |
-
elseif (
|
177 |
$bbp_forum_id = $bbp->current_forum_id = $wp_query->post->ID;
|
178 |
|
179 |
// Currently viewing a topic
|
180 |
-
elseif (
|
181 |
$bbp_forum_id = $bbp->current_forum_id = bbp_get_topic_forum_id();
|
182 |
|
183 |
// Fallback
|
@@ -1062,7 +1067,7 @@ function bbp_forum_topics_link( $forum_id = 0 ) {
|
|
1062 |
* @uses bbp_get_forum_topic_count() To get the forum topic count
|
1063 |
* @uses bbp_get_forum_permalink() To get the forum permalink
|
1064 |
* @uses remove_query_arg() To remove args from the url
|
1065 |
-
* @uses
|
1066 |
* topic count
|
1067 |
* @uses current_user_can() To check if the current user can edit others
|
1068 |
* topics
|
@@ -1086,7 +1091,7 @@ function bbp_forum_topics_link( $forum_id = 0 ) {
|
|
1086 |
$retval .= $topics;
|
1087 |
|
1088 |
// This forum has hidden topics
|
1089 |
-
if ( current_user_can( 'edit_others_topics' ) && ( $deleted =
|
1090 |
|
1091 |
// Extra text
|
1092 |
$extra = sprintf( __( ' (+ %d hidden)', 'bbpress' ), $deleted );
|
@@ -1161,7 +1166,7 @@ function bbp_forum_topic_count( $forum_id = 0, $total_count = true ) {
|
|
1161 |
*/
|
1162 |
function bbp_get_forum_topic_count( $forum_id = 0, $total_count = true ) {
|
1163 |
$forum_id = bbp_get_forum_id( $forum_id );
|
1164 |
-
$topics = get_post_meta( $forum_id, empty( $total_count ) ? '
|
1165 |
|
1166 |
return apply_filters( 'bbp_get_forum_topic_count', (int) $topics, $forum_id );
|
1167 |
}
|
@@ -1240,10 +1245,10 @@ function bbp_forum_post_count( $forum_id = 0, $total_count = true ) {
|
|
1240 |
* @since bbPress (r2883)
|
1241 |
*
|
1242 |
* @param int $forum_id Optional. Topic id
|
1243 |
-
* @uses
|
1244 |
*/
|
1245 |
-
function
|
1246 |
-
echo
|
1247 |
}
|
1248 |
/**
|
1249 |
* Return total hidden topic count of a forum (hidden includes trashed
|
@@ -1254,15 +1259,15 @@ function bbp_forum_hidden_topic_count( $forum_id = 0 ) {
|
|
1254 |
* @param int $forum_id Optional. Topic id
|
1255 |
* @uses bbp_get_forum_id() To get the forum id
|
1256 |
* @uses get_post_meta() To get the hidden topic count
|
1257 |
-
* @uses apply_filters() Calls '
|
1258 |
* the hidden topic count and forum id
|
1259 |
* @return int Topic hidden topic count
|
1260 |
*/
|
1261 |
-
function
|
1262 |
$forum_id = bbp_get_forum_id( $forum_id );
|
1263 |
$topics = get_post_meta( $forum_id, '_bbp_topic_count_hidden', true );
|
1264 |
|
1265 |
-
return apply_filters( '
|
1266 |
}
|
1267 |
|
1268 |
/**
|
60 |
function bbp_has_forums( $args = '' ) {
|
61 |
global $bbp;
|
62 |
|
|
|
|
|
|
|
63 |
// Setup possible post__not_in array
|
64 |
$post_stati[] = 'publish';
|
65 |
|
112 |
*/
|
113 |
function bbp_forums() {
|
114 |
global $bbp;
|
115 |
+
|
116 |
+
// Put into variable to check against next
|
117 |
+
$have_posts = $bbp->forum_query->have_posts();
|
118 |
+
|
119 |
+
// Reset the post data when finished
|
120 |
+
if ( empty( $have_posts ) )
|
121 |
+
wp_reset_postdata();
|
122 |
+
|
123 |
+
return $have_posts;
|
124 |
}
|
125 |
|
126 |
/**
|
158 |
* @uses bbPress::forum_query::in_the_loop To check if we're in the loop
|
159 |
* @uses bbPress::forum_query::post::ID To get the forum id
|
160 |
* @uses WP_Query::post::ID To get the forum id
|
161 |
+
* @uses bbp_is_single_forum() To check if it's a forum page
|
162 |
+
* @uses bbp_is_single_topic() To check if it's a topic page
|
163 |
* @uses bbp_get_topic_forum_id() To get the topic forum id
|
164 |
* @uses get_post_field() To get the post's post type
|
165 |
* @uses apply_filters() Calls 'bbp_get_forum_id' with the forum id and
|
178 |
$bbp_forum_id = $bbp->current_forum_id = $bbp->forum_query->post->ID;
|
179 |
|
180 |
// Currently viewing a forum
|
181 |
+
elseif ( bbp_is_single_forum() && isset( $wp_query->post->ID ) )
|
182 |
$bbp_forum_id = $bbp->current_forum_id = $wp_query->post->ID;
|
183 |
|
184 |
// Currently viewing a topic
|
185 |
+
elseif ( bbp_is_single_topic() )
|
186 |
$bbp_forum_id = $bbp->current_forum_id = bbp_get_topic_forum_id();
|
187 |
|
188 |
// Fallback
|
1067 |
* @uses bbp_get_forum_topic_count() To get the forum topic count
|
1068 |
* @uses bbp_get_forum_permalink() To get the forum permalink
|
1069 |
* @uses remove_query_arg() To remove args from the url
|
1070 |
+
* @uses bbp_get_forum_topic_count_hidden() To get the forum hidden
|
1071 |
* topic count
|
1072 |
* @uses current_user_can() To check if the current user can edit others
|
1073 |
* topics
|
1091 |
$retval .= $topics;
|
1092 |
|
1093 |
// This forum has hidden topics
|
1094 |
+
if ( current_user_can( 'edit_others_topics' ) && ( $deleted = bbp_get_forum_topic_count_hidden( $forum_id ) ) ) {
|
1095 |
|
1096 |
// Extra text
|
1097 |
$extra = sprintf( __( ' (+ %d hidden)', 'bbpress' ), $deleted );
|
1166 |
*/
|
1167 |
function bbp_get_forum_topic_count( $forum_id = 0, $total_count = true ) {
|
1168 |
$forum_id = bbp_get_forum_id( $forum_id );
|
1169 |
+
$topics = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_topic_count' : '_bbp_total_topic_count', true );
|
1170 |
|
1171 |
return apply_filters( 'bbp_get_forum_topic_count', (int) $topics, $forum_id );
|
1172 |
}
|
1245 |
* @since bbPress (r2883)
|
1246 |
*
|
1247 |
* @param int $forum_id Optional. Topic id
|
1248 |
+
* @uses bbp_get_forum_topic_count_hidden() To get the forum hidden topic count
|
1249 |
*/
|
1250 |
+
function bbp_forum_topic_count_hidden( $forum_id = 0 ) {
|
1251 |
+
echo bbp_get_forum_topic_count_hidden( $forum_id );
|
1252 |
}
|
1253 |
/**
|
1254 |
* Return total hidden topic count of a forum (hidden includes trashed
|
1259 |
* @param int $forum_id Optional. Topic id
|
1260 |
* @uses bbp_get_forum_id() To get the forum id
|
1261 |
* @uses get_post_meta() To get the hidden topic count
|
1262 |
+
* @uses apply_filters() Calls 'bbp_get_forum_topic_count_hidden' with
|
1263 |
* the hidden topic count and forum id
|
1264 |
* @return int Topic hidden topic count
|
1265 |
*/
|
1266 |
+
function bbp_get_forum_topic_count_hidden( $forum_id = 0 ) {
|
1267 |
$forum_id = bbp_get_forum_id( $forum_id );
|
1268 |
$topics = get_post_meta( $forum_id, '_bbp_topic_count_hidden', true );
|
1269 |
|
1270 |
+
return apply_filters( 'bbp_get_forum_topic_count_hidden', (int) $topics, $forum_id );
|
1271 |
}
|
1272 |
|
1273 |
/**
|
bbp-includes/bbp-reply-functions.php
CHANGED
@@ -10,98 +10,67 @@
|
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
-
/**
|
14 |
-
* Update the reply with its forum id it is in
|
15 |
-
*
|
16 |
-
* @since bbPress (r2855)
|
17 |
-
*
|
18 |
-
* @param int $reply_id Optional. Reply id to update
|
19 |
-
* @param int $forum_id Optional. Forum id
|
20 |
-
* @uses bbp_get_reply_id() To get the reply id
|
21 |
-
* @uses bbp_get_forum_id() To get the forum id
|
22 |
-
* @uses get_post_ancestors() To get the reply's forum
|
23 |
-
* @uses get_post_field() To get the post type of the post
|
24 |
-
* @uses update_post_meta() To update the reply forum id meta
|
25 |
-
* @uses apply_filters() Calls 'bbp_update_reply_forum_id' with the forum id
|
26 |
-
* and reply id
|
27 |
-
* @return bool Reply's forum id
|
28 |
-
*/
|
29 |
-
function bbp_update_reply_forum_id( $reply_id = 0, $forum_id = 0 ) {
|
30 |
-
|
31 |
-
// Validation
|
32 |
-
$reply_id = bbp_get_reply_id( $reply_id );
|
33 |
-
$forum_id = bbp_get_forum_id( $forum_id );
|
34 |
-
|
35 |
-
// If no forum_id was passed, walk up ancestors and look for forum type
|
36 |
-
if ( empty( $forum_id ) ) {
|
37 |
-
|
38 |
-
// Get ancestors
|
39 |
-
$ancestors = get_post_ancestors( $reply_id );
|
40 |
-
|
41 |
-
// Loop through ancestors
|
42 |
-
foreach ( $ancestors as $ancestor ) {
|
43 |
-
|
44 |
-
// Get first parent that is a forum
|
45 |
-
if ( get_post_field( 'post_type', $ancestor ) == bbp_get_forum_post_type() ) {
|
46 |
-
$forum_id = $ancestor;
|
47 |
-
|
48 |
-
// Found a forum, so exit the loop and continue
|
49 |
-
continue;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
// Update the forum ID
|
55 |
-
bbp_update_forum_id( $reply_id, $forum_id );
|
56 |
-
|
57 |
-
return apply_filters( 'bbp_update_reply_forum_id', (int) $forum_id, $reply_id );
|
58 |
-
}
|
59 |
|
60 |
/**
|
61 |
-
*
|
|
|
62 |
*
|
63 |
-
* @since bbPress (
|
64 |
*
|
65 |
-
* @
|
66 |
-
* @
|
67 |
-
* @uses
|
68 |
-
* @uses
|
69 |
-
*
|
70 |
-
* @
|
71 |
-
* @
|
72 |
-
* @uses apply_filters() Calls 'bbp_update_reply_topic_id' with the topic id
|
73 |
-
* and reply id
|
74 |
-
* @return bool Reply's topic id
|
75 |
*/
|
76 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
-
//
|
79 |
-
$
|
80 |
-
$topic_id = bbp_get_topic_id( $topic_id );
|
81 |
|
82 |
-
//
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
|
|
|
87 |
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
$topic_id = $ancestor;
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
}
|
99 |
-
}
|
100 |
|
101 |
-
// Update the topic
|
102 |
-
|
|
|
|
|
103 |
|
104 |
-
|
|
|
105 |
}
|
106 |
|
107 |
/** Post Form Handlers ********************************************************/
|
@@ -139,200 +108,206 @@ function bbp_update_reply_topic_id( $reply_id = 0, $topic_id = 0 ) {
|
|
139 |
*/
|
140 |
function bbp_new_reply_handler() {
|
141 |
|
142 |
-
//
|
143 |
-
if ( 'POST'
|
144 |
-
|
145 |
|
146 |
-
|
147 |
-
|
|
|
148 |
|
149 |
-
|
150 |
-
$topic_id = $forum_id = $reply_author = $anonymous_data = 0;
|
151 |
-
$reply_title = $reply_content = $terms = '';
|
152 |
|
153 |
-
|
|
|
154 |
|
155 |
-
|
156 |
-
|
|
|
157 |
|
158 |
-
|
159 |
-
$anonymous_data = bbp_filter_anonymous_post_data();
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
bbp_set_current_anonymous_user_data( $anonymous_data );
|
164 |
-
}
|
165 |
|
166 |
-
//
|
167 |
-
|
168 |
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
|
174 |
-
|
175 |
-
|
176 |
|
|
|
|
|
|
|
177 |
}
|
178 |
|
179 |
-
|
|
|
180 |
|
181 |
-
|
182 |
-
if ( isset( $_POST['bbp_topic_id'] ) && ( !$topic_id = (int) $_POST['bbp_topic_id'] ) )
|
183 |
-
$bbp->errors->add( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID is missing.', 'bbpress' ) );
|
184 |
|
185 |
-
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
|
191 |
-
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
remove_filter( 'bbp_new_reply_pre_content', 'wp_filter_kses' );
|
197 |
-
}
|
198 |
|
199 |
-
|
200 |
|
201 |
-
|
202 |
-
|
|
|
|
|
|
|
203 |
|
204 |
-
|
205 |
-
$reply_title = apply_filters( 'bbp_new_reply_pre_title', $reply_title );
|
206 |
|
207 |
-
|
208 |
-
|
209 |
-
$bbp->errors->add( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your reply needs a title.', 'bbpress' ) );
|
210 |
|
211 |
-
|
|
|
212 |
|
213 |
-
|
214 |
-
|
|
|
215 |
|
216 |
-
|
217 |
-
$reply_content = apply_filters( 'bbp_new_reply_pre_content', $reply_content );
|
218 |
|
219 |
-
|
220 |
-
|
221 |
-
$bbp->errors->add( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
|
222 |
|
223 |
-
|
|
|
224 |
|
225 |
-
|
226 |
-
|
|
|
227 |
|
228 |
-
|
229 |
|
230 |
-
|
231 |
-
|
232 |
|
233 |
-
|
234 |
|
235 |
-
|
236 |
-
|
237 |
|
238 |
-
|
239 |
|
240 |
-
|
|
|
241 |
|
242 |
-
|
243 |
|
244 |
-
|
245 |
-
if ( !is_wp_error( $bbp->errors ) || !$bbp->errors->get_error_codes() ) {
|
246 |
|
247 |
-
|
248 |
|
249 |
-
|
250 |
-
|
251 |
-
'post_author' => $reply_author,
|
252 |
-
'post_title' => $reply_title,
|
253 |
-
'post_content' => $reply_content,
|
254 |
-
'post_parent' => $topic_id,
|
255 |
-
'post_status' => 'publish',
|
256 |
-
'post_type' => bbp_get_reply_post_type()
|
257 |
-
);
|
258 |
|
259 |
-
|
260 |
-
$reply_data = apply_filters( 'bbp_new_reply_pre_insert', $reply_data );
|
261 |
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
-
|
|
|
266 |
|
267 |
-
|
268 |
-
|
269 |
|
270 |
-
|
271 |
|
272 |
-
|
273 |
-
|
274 |
|
275 |
-
|
276 |
-
$terms = wp_set_post_terms( $topic_id, $terms, $bbp->topic_tag_id, false );
|
277 |
|
278 |
-
|
279 |
-
|
280 |
-
$bbp->errors->add( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was some problem adding the tags to the topic.', 'bbpress' ) );
|
281 |
|
282 |
-
|
|
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
|
|
|
287 |
|
288 |
-
|
289 |
-
wp_trash_post( $reply_id );
|
290 |
|
291 |
-
|
292 |
-
|
|
|
293 |
|
294 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
}
|
300 |
|
301 |
-
|
302 |
-
|
303 |
-
// If reply or topic are spam, officially spam this reply
|
304 |
-
if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == $bbp->spam_status_id ) )
|
305 |
-
add_post_meta( $reply_id, '_bbp_spam_meta_status', 'publish' );
|
306 |
|
307 |
-
|
|
|
|
|
308 |
|
309 |
-
|
310 |
|
311 |
-
|
|
|
|
|
312 |
|
313 |
-
|
314 |
-
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
315 |
|
316 |
-
|
317 |
-
$reply_url = bbp_get_reply_url( $reply_id, $redirect_to );
|
318 |
|
319 |
-
|
320 |
-
$reply_url = apply_filters( 'bbp_new_reply_redirect_to', $reply_url, $redirect_to );
|
321 |
|
322 |
-
|
|
|
323 |
|
324 |
-
|
325 |
-
|
326 |
|
327 |
-
|
328 |
-
|
329 |
|
330 |
-
/**
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
}
|
337 |
}
|
338 |
}
|
@@ -369,195 +344,201 @@ function bbp_new_reply_handler() {
|
|
369 |
*/
|
370 |
function bbp_edit_reply_handler() {
|
371 |
|
372 |
-
//
|
373 |
-
if ( 'POST'
|
374 |
-
|
375 |
-
|
376 |
-
// Define local variable(s)
|
377 |
-
$reply = $reply_id = $topic_id = $forum_id = $anonymous_data = 0;
|
378 |
-
$reply_title = $reply_content = $reply_edit_reason = $terms = '';
|
379 |
|
380 |
-
|
|
|
|
|
381 |
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
|
386 |
-
|
387 |
-
elseif ( is_numeric( $_POST['bbp_reply_id'] ) )
|
388 |
-
$reply_id = (int) $_POST['bbp_reply_id'];
|
389 |
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
|
394 |
-
|
395 |
-
|
|
|
|
|
|
|
396 |
|
397 |
-
|
398 |
-
|
|
|
399 |
|
400 |
-
|
401 |
-
|
402 |
|
403 |
-
|
404 |
-
|
405 |
-
$bbp->errors->add( 'bbp_edit_reply_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
|
406 |
-
}
|
407 |
|
408 |
-
|
409 |
-
|
410 |
|
411 |
-
|
412 |
-
|
|
|
413 |
}
|
414 |
-
}
|
415 |
|
416 |
-
//
|
417 |
-
|
418 |
-
|
419 |
-
|
|
|
420 |
}
|
|
|
421 |
|
422 |
-
|
|
|
|
|
|
|
|
|
423 |
|
424 |
-
|
425 |
|
426 |
-
|
427 |
|
428 |
-
|
429 |
|
430 |
-
|
431 |
-
if ( !empty( $forum_id ) && ( $forum_id != $reply->post_parent ) ) {
|
432 |
|
433 |
-
|
434 |
-
|
435 |
-
$bbp->errors->add( 'bbp_edit_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics or replies can be created in it.', 'bbpress' ) );
|
436 |
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
}
|
449 |
|
450 |
-
|
|
|
|
|
|
|
451 |
|
452 |
-
|
453 |
-
$reply_title = esc_attr( strip_tags( $_POST['bbp_reply_title'] ) );
|
454 |
|
455 |
-
|
456 |
-
$reply_title =
|
457 |
|
458 |
-
|
|
|
459 |
|
460 |
-
|
461 |
-
$reply_content = $_POST['bbp_reply_content'];
|
462 |
|
463 |
-
|
464 |
-
$reply_content =
|
465 |
|
466 |
-
|
467 |
-
|
468 |
-
$bbp->errors->add( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
|
469 |
|
470 |
-
|
|
|
|
|
471 |
|
472 |
-
|
473 |
-
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
474 |
|
475 |
-
|
|
|
476 |
|
477 |
-
|
478 |
|
479 |
-
|
480 |
|
481 |
-
|
482 |
-
if ( !is_wp_error( $bbp->errors ) || !$bbp->errors->get_error_codes() ) {
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
'ID' => $reply_id,
|
487 |
-
'post_title' => $reply_title,
|
488 |
-
'post_content' => $reply_content
|
489 |
-
);
|
490 |
|
491 |
-
|
492 |
-
|
|
|
|
|
|
|
|
|
493 |
|
494 |
-
|
495 |
-
|
496 |
|
497 |
-
|
|
|
498 |
|
499 |
-
|
500 |
-
$terms = apply_filters( 'bbp_edit_reply_pre_set_terms', $terms, $topic_id, $reply_id );
|
501 |
|
502 |
-
|
503 |
-
|
504 |
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
if ( !empty( $_POST['bbp_reply_edit_reason'] ) )
|
513 |
-
$reply_edit_reason = esc_attr( strip_tags( $_POST['bbp_reply_edit_reason'] ) );
|
514 |
-
|
515 |
-
// Update revision log
|
516 |
-
if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1 == $_POST['bbp_log_reply_edit'] ) && ( $revision_id = wp_save_post_revision( $reply_id ) ) ) {
|
517 |
-
bbp_update_reply_revision_log( array(
|
518 |
-
'reply_id' => $reply_id,
|
519 |
-
'revision_id' => $revision_id,
|
520 |
-
'author_id' => bbp_get_current_user_id(),
|
521 |
-
'reason' => $reply_edit_reason
|
522 |
-
) );
|
523 |
-
}
|
524 |
|
525 |
-
|
526 |
|
527 |
-
|
|
|
|
|
528 |
|
529 |
-
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
-
|
533 |
|
534 |
-
|
535 |
|
536 |
-
|
|
|
537 |
|
538 |
-
|
539 |
-
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
540 |
|
541 |
-
|
542 |
-
$reply_url = bbp_get_reply_url( $reply_id, $redirect_to );
|
543 |
|
544 |
-
|
545 |
-
$reply_url = apply_filters( 'bbp_edit_reply_redirect_to', $reply_url, $redirect_to );
|
546 |
|
547 |
-
|
|
|
548 |
|
549 |
-
|
550 |
-
|
551 |
|
552 |
-
|
553 |
-
|
554 |
|
555 |
-
/**
|
556 |
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
}
|
562 |
}
|
563 |
}
|
@@ -687,7 +668,7 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
|
|
687 |
* @uses bbp_update_topic_last_active_time() To update the last active topic meta
|
688 |
* @uses bbp_update_topic_voice_count() To update the topic voice count
|
689 |
* @uses bbp_update_topic_reply_count() To update the topic reply count
|
690 |
-
* @uses
|
691 |
* count
|
692 |
* @uses bbp_is_forum() To check if the ancestor is a forum
|
693 |
* @uses bbp_update_forum_last_topic_id() To update the last topic id forum meta
|
@@ -698,18 +679,22 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
|
|
698 |
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
699 |
*/
|
700 |
function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id = 0, $topic_id = 0, $refresh = true ) {
|
701 |
-
global $bbp;
|
702 |
|
703 |
// Verify the reply ID
|
704 |
-
|
|
|
|
|
|
|
705 |
|
706 |
// Get the topic ID if none was passed
|
707 |
-
if ( empty( $topic_id ) )
|
708 |
$topic_id = bbp_get_reply_topic_id( $reply_id );
|
|
|
709 |
|
710 |
// Get the forum ID if none was passed
|
711 |
-
if ( empty( $forum_id ) )
|
712 |
$forum_id = bbp_get_reply_forum_id( $reply_id );
|
|
|
713 |
}
|
714 |
|
715 |
// Set the active_id based on topic_id/reply_id
|
@@ -747,7 +732,7 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
|
|
747 |
// Counts
|
748 |
bbp_update_topic_voice_count ( $ancestor );
|
749 |
bbp_update_topic_reply_count ( $ancestor );
|
750 |
-
|
751 |
|
752 |
// Forum meta relating to most recent topic
|
753 |
} elseif ( bbp_is_forum( $ancestor ) ) {
|
@@ -772,6 +757,102 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
|
|
772 |
}
|
773 |
}
|
774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
/**
|
776 |
* Update the revision log of the reply
|
777 |
*
|
@@ -844,92 +925,113 @@ function bbp_update_reply_revision_log( $args = '' ) {
|
|
844 |
*/
|
845 |
function bbp_toggle_reply_handler() {
|
846 |
|
847 |
-
//
|
848 |
-
if ( 'GET'
|
849 |
-
|
850 |
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
$post_data = array( 'ID' => $reply_id ); // Prelim array
|
855 |
|
856 |
-
|
857 |
-
|
858 |
-
|
|
|
|
|
859 |
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
|
|
|
|
|
|
|
|
865 |
|
866 |
-
|
867 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
868 |
|
869 |
-
|
870 |
-
|
871 |
-
check_ajax_referer( 'spam-reply_' . $reply_id );
|
872 |
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
break;
|
878 |
|
879 |
-
|
880 |
-
|
|
|
881 |
|
882 |
-
|
|
|
|
|
883 |
|
884 |
-
if ( empty( $sub_action ) )
|
885 |
break;
|
886 |
|
887 |
-
|
888 |
-
|
889 |
-
check_ajax_referer( 'trash-' . bbp_get_reply_post_type() . '_' . $reply_id );
|
890 |
|
891 |
-
|
892 |
-
|
893 |
|
894 |
-
|
895 |
-
|
896 |
-
case 'untrash':
|
897 |
-
check_ajax_referer( 'untrash-' . bbp_get_reply_post_type() . '_' . $reply_id );
|
898 |
|
899 |
-
|
900 |
-
|
901 |
|
902 |
-
|
|
|
903 |
|
904 |
-
|
905 |
-
|
906 |
|
907 |
-
|
908 |
-
|
909 |
|
910 |
-
|
911 |
-
|
912 |
|
913 |
-
|
914 |
-
|
915 |
|
916 |
-
//
|
917 |
-
|
918 |
|
919 |
-
//
|
920 |
-
if (
|
|
|
921 |
|
922 |
-
|
923 |
-
$redirect = bbp_get_reply_url( $reply_id );
|
924 |
-
wp_redirect( $redirect );
|
925 |
|
926 |
-
|
927 |
-
|
928 |
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
}
|
933 |
}
|
934 |
}
|
935 |
|
@@ -1140,7 +1242,7 @@ function bbp_untrashed_reply( $reply_id = 0 ) {
|
|
1140 |
*
|
1141 |
* @global bbPress $bbp
|
1142 |
*
|
1143 |
-
* @uses
|
1144 |
* @uses bbp_user_can_view_forum()
|
1145 |
* @uses bbp_get_topic_forum_id()
|
1146 |
* @uses bbp_show_load_topic()
|
@@ -1170,11 +1272,11 @@ function bbp_display_replies_feed_rss2( $replies_query = array() ) {
|
|
1170 |
global $bbp;
|
1171 |
|
1172 |
// User cannot access forum this topic is in
|
1173 |
-
if (
|
1174 |
return;
|
1175 |
|
1176 |
// Adjust the title based on context
|
1177 |
-
if (
|
1178 |
$title = apply_filters( 'wp_title_rss', get_wp_title_rss( ' » ' ) );
|
1179 |
elseif ( !bbp_show_lead_topic() )
|
1180 |
$title = ' » ' . __( 'All Posts', 'bbpress' );
|
@@ -1201,12 +1303,12 @@ function bbp_display_replies_feed_rss2( $replies_query = array() ) {
|
|
1201 |
<link><?php self_link(); ?></link>
|
1202 |
<description><?php //?></description>
|
1203 |
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
|
1204 |
-
<generator>http://bbpress.org/?v=<?php echo
|
1205 |
<language><?php echo get_option( 'rss_language' ); ?></language>
|
1206 |
|
1207 |
<?php do_action( 'bbp_feed_head' ); ?>
|
1208 |
|
1209 |
-
<?php if (
|
1210 |
<?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) : ?>
|
1211 |
<?php if ( bbp_show_lead_topic() ) : ?>
|
1212 |
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
+
/** Insert ********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
+
* A wrapper for wp_insert_post() that also includes the necessary meta values
|
17 |
+
* for the reply to function properly.
|
18 |
*
|
19 |
+
* @since bbPress (r3349)
|
20 |
*
|
21 |
+
* @uses wp_parse_args()
|
22 |
+
* @uses bbp_get_reply_post_type()
|
23 |
+
* @uses wp_insert_post()
|
24 |
+
* @uses update_post_meta()
|
25 |
+
*
|
26 |
+
* @param array $reply_data Forum post data
|
27 |
+
* @param arrap $reply_meta Forum meta data
|
|
|
|
|
|
|
28 |
*/
|
29 |
+
function bbp_insert_reply( $reply_data = array(), $reply_meta = array() ) {
|
30 |
+
|
31 |
+
// Forum
|
32 |
+
$default_reply = array(
|
33 |
+
'post_parent' => 0, // topic ID
|
34 |
+
'post_status' => 'publish',
|
35 |
+
'post_type' => bbp_get_reply_post_type(),
|
36 |
+
'post_author' => 0,
|
37 |
+
'post_password' => '',
|
38 |
+
'post_content' => '',
|
39 |
+
'post_title' => '',
|
40 |
+
'menu_order' => 0,
|
41 |
+
);
|
42 |
|
43 |
+
// Parse args
|
44 |
+
$reply_data = wp_parse_args( $reply_data, $default_reply );
|
|
|
45 |
|
46 |
+
// Insert reply
|
47 |
+
$reply_id = wp_insert_post( $reply_data );
|
48 |
|
49 |
+
// Bail if no reply was added
|
50 |
+
if ( empty( $reply_id ) )
|
51 |
+
return false;
|
52 |
|
53 |
+
// Forum meta
|
54 |
+
$default_meta = array(
|
55 |
+
'author_ip' => bbp_current_author_ip(),
|
56 |
+
'forum_id' => 0,
|
57 |
+
'topic_id' => 0,
|
58 |
+
);
|
59 |
|
60 |
+
// Parse args
|
61 |
+
$reply_meta = wp_parse_args( $reply_meta, $default_meta );
|
|
|
62 |
|
63 |
+
// Insert reply meta
|
64 |
+
foreach ( $reply_meta as $meta_key => $meta_value )
|
65 |
+
update_post_meta( $reply_id, '_bbp_' . $meta_key, $meta_value );
|
|
|
|
|
66 |
|
67 |
+
// Update the topic
|
68 |
+
$topic_id = bbp_get_reply_topic_id( $reply_id );
|
69 |
+
if ( !empty( $topic_id ) )
|
70 |
+
bbp_update_topic( $topic_id );
|
71 |
|
72 |
+
// Return new reply ID
|
73 |
+
return $reply_id;
|
74 |
}
|
75 |
|
76 |
/** Post Form Handlers ********************************************************/
|
108 |
*/
|
109 |
function bbp_new_reply_handler() {
|
110 |
|
111 |
+
// Bail if not a POST action
|
112 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
113 |
+
return;
|
114 |
|
115 |
+
// Bail if action is not bbp-new-reply
|
116 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-new-reply' !== $_POST['action'] ) )
|
117 |
+
return;
|
118 |
|
119 |
+
global $bbp;
|
|
|
|
|
120 |
|
121 |
+
// Nonce check
|
122 |
+
check_admin_referer( 'bbp-new-reply' );
|
123 |
|
124 |
+
// Define local variable(s)
|
125 |
+
$topic_id = $forum_id = $reply_author = $anonymous_data = 0;
|
126 |
+
$reply_title = $reply_content = $terms = '';
|
127 |
|
128 |
+
/** Reply Author ******************************************************/
|
|
|
129 |
|
130 |
+
// User is anonymous
|
131 |
+
if ( bbp_is_anonymous() ) {
|
|
|
|
|
132 |
|
133 |
+
// Filter anonymous data
|
134 |
+
$anonymous_data = bbp_filter_anonymous_post_data();
|
135 |
|
136 |
+
// Anonymous data checks out, so set cookies, etc...
|
137 |
+
if ( !empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
|
138 |
+
bbp_set_current_anonymous_user_data( $anonymous_data );
|
139 |
+
}
|
140 |
|
141 |
+
// User is logged in
|
142 |
+
} else {
|
143 |
|
144 |
+
// User cannot create replies
|
145 |
+
if ( !current_user_can( 'publish_replies' ) ) {
|
146 |
+
bbp_add_error( 'bbp_reply_permissions', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
|
147 |
}
|
148 |
|
149 |
+
// Reply author is current user
|
150 |
+
$reply_author = bbp_get_current_user_id();
|
151 |
|
152 |
+
}
|
|
|
|
|
153 |
|
154 |
+
/** Topic ID **********************************************************/
|
155 |
|
156 |
+
// Handle Topic ID to append reply to
|
157 |
+
if ( isset( $_POST['bbp_topic_id'] ) && ( !$topic_id = (int) $_POST['bbp_topic_id'] ) )
|
158 |
+
bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID is missing.', 'bbpress' ) );
|
159 |
|
160 |
+
/** Forum ID **********************************************************/
|
161 |
|
162 |
+
// Handle Forum ID to adjust counts of
|
163 |
+
if ( isset( $_POST['bbp_forum_id'] ) && ( !$forum_id = (int) $_POST['bbp_forum_id'] ) )
|
164 |
+
bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
|
|
|
|
|
165 |
|
166 |
+
/** Unfiltered HTML ***************************************************/
|
167 |
|
168 |
+
// Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
|
169 |
+
if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $topic_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
|
170 |
+
remove_filter( 'bbp_new_reply_pre_title', 'wp_filter_kses' );
|
171 |
+
remove_filter( 'bbp_new_reply_pre_content', 'wp_filter_kses' );
|
172 |
+
}
|
173 |
|
174 |
+
/** Reply Title *******************************************************/
|
|
|
175 |
|
176 |
+
if ( !empty( $_POST['bbp_reply_title'] ) )
|
177 |
+
$reply_title = esc_attr( strip_tags( $_POST['bbp_reply_title'] ) );
|
|
|
178 |
|
179 |
+
// Filter and sanitize
|
180 |
+
$reply_title = apply_filters( 'bbp_new_reply_pre_title', $reply_title );
|
181 |
|
182 |
+
// No reply title
|
183 |
+
if ( empty( $reply_title ) )
|
184 |
+
bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your reply needs a title.', 'bbpress' ) );
|
185 |
|
186 |
+
/** Reply Content *****************************************************/
|
|
|
187 |
|
188 |
+
if ( !empty( $_POST['bbp_reply_content'] ) )
|
189 |
+
$reply_content = $_POST['bbp_reply_content'];
|
|
|
190 |
|
191 |
+
// Filter and sanitize
|
192 |
+
$reply_content = apply_filters( 'bbp_new_reply_pre_content', $reply_content );
|
193 |
|
194 |
+
// No reply content
|
195 |
+
if ( empty( $reply_content ) )
|
196 |
+
bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
|
197 |
|
198 |
+
/** Reply Flooding ****************************************************/
|
199 |
|
200 |
+
if ( !bbp_check_for_flood( $anonymous_data, $reply_author ) )
|
201 |
+
bbp_add_error( 'bbp_reply_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
|
202 |
|
203 |
+
/** Reply Duplicate ***************************************************/
|
204 |
|
205 |
+
if ( !bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) )
|
206 |
+
bbp_add_error( 'bbp_reply_duplicate', __( '<strong>ERROR</strong>: Duplicate reply detected; it looks as though you’ve already said that!', 'bbpress' ) );
|
207 |
|
208 |
+
/** Topic Tags ********************************************************/
|
209 |
|
210 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) )
|
211 |
+
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
212 |
|
213 |
+
/** Additional Actions (Before Save) **********************************/
|
214 |
|
215 |
+
do_action( 'bbp_new_reply_pre_extras' );
|
|
|
216 |
|
217 |
+
/** No Errors *********************************************************/
|
218 |
|
219 |
+
// Handle insertion into posts table
|
220 |
+
if ( !bbp_has_errors() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
+
/** Create new reply **********************************************/
|
|
|
223 |
|
224 |
+
// Add the content of the form to $post as an array
|
225 |
+
$reply_data = array(
|
226 |
+
'post_author' => $reply_author,
|
227 |
+
'post_title' => $reply_title,
|
228 |
+
'post_content' => $reply_content,
|
229 |
+
'post_parent' => $topic_id,
|
230 |
+
'post_status' => 'publish',
|
231 |
+
'post_type' => bbp_get_reply_post_type()
|
232 |
+
);
|
233 |
|
234 |
+
// Just in time manipulation of reply data before being created
|
235 |
+
$reply_data = apply_filters( 'bbp_new_reply_pre_insert', $reply_data );
|
236 |
|
237 |
+
// Insert reply
|
238 |
+
$reply_id = wp_insert_post( $reply_data );
|
239 |
|
240 |
+
/** No Errors *****************************************************/
|
241 |
|
242 |
+
// Check for missing reply_id or error
|
243 |
+
if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
|
244 |
|
245 |
+
/** Topic Tags ************************************************/
|
|
|
246 |
|
247 |
+
// Just in time manipulation of reply terms before being edited
|
248 |
+
$terms = apply_filters( 'bbp_new_reply_pre_set_terms', $terms, $topic_id, $reply_id );
|
|
|
249 |
|
250 |
+
// Insert terms
|
251 |
+
$terms = wp_set_post_terms( $topic_id, $terms, bbp_get_topic_tag_tax_id(), false );
|
252 |
|
253 |
+
// Term error
|
254 |
+
if ( is_wp_error( $terms ) ) {
|
255 |
+
bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
|
256 |
+
}
|
257 |
|
258 |
+
/** Trash Check ***********************************************/
|
|
|
259 |
|
260 |
+
// If this reply starts as trash, add it to pre_trashed_replies
|
261 |
+
// for the topic, so it is properly restored.
|
262 |
+
if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] == $bbp->trash_status_id ) ) {
|
263 |
|
264 |
+
// Trash the reply
|
265 |
+
wp_trash_post( $reply_id );
|
266 |
|
267 |
+
// Get pre_trashed_replies for topic
|
268 |
+
$pre_trashed_replies = get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
|
|
|
269 |
|
270 |
+
// Add this reply to the end of the existing replies
|
271 |
+
$pre_trashed_replies[] = $reply_id;
|
|
|
|
|
|
|
272 |
|
273 |
+
// Update the pre_trashed_reply post meta
|
274 |
+
update_post_meta( $topic_id, '_bbp_pre_trashed_replies', $pre_trashed_replies );
|
275 |
+
}
|
276 |
|
277 |
+
/** Spam Check ************************************************/
|
278 |
|
279 |
+
// If reply or topic are spam, officially spam this reply
|
280 |
+
if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == $bbp->spam_status_id ) )
|
281 |
+
add_post_meta( $reply_id, '_bbp_spam_meta_status', 'publish' );
|
282 |
|
283 |
+
/** Update counts, etc... *************************************/
|
|
|
284 |
|
285 |
+
do_action( 'bbp_new_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author );
|
|
|
286 |
|
287 |
+
/** Redirect **************************************************/
|
|
|
288 |
|
289 |
+
// Redirect to
|
290 |
+
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
291 |
|
292 |
+
// Get the reply URL
|
293 |
+
$reply_url = bbp_get_reply_url( $reply_id, $redirect_to );
|
294 |
|
295 |
+
// Allow to be filtered
|
296 |
+
$reply_url = apply_filters( 'bbp_new_reply_redirect_to', $reply_url, $redirect_to );
|
297 |
|
298 |
+
/** Successful Save *******************************************/
|
299 |
|
300 |
+
// Redirect back to new reply
|
301 |
+
wp_safe_redirect( $reply_url );
|
302 |
+
|
303 |
+
// For good measure
|
304 |
+
exit();
|
305 |
+
|
306 |
+
/** Errors ********************************************************/
|
307 |
+
|
308 |
+
} else {
|
309 |
+
$append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
|
310 |
+
bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
|
311 |
}
|
312 |
}
|
313 |
}
|
344 |
*/
|
345 |
function bbp_edit_reply_handler() {
|
346 |
|
347 |
+
// Bail if not a POST action
|
348 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
349 |
+
return;
|
|
|
|
|
|
|
|
|
350 |
|
351 |
+
// Bail if action is not bbp-edit-reply
|
352 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-edit-reply' !== $_POST['action'] ) )
|
353 |
+
return;
|
354 |
|
355 |
+
// Define local variable(s)
|
356 |
+
$reply = $reply_id = $topic_id = $forum_id = $anonymous_data = 0;
|
357 |
+
$reply_title = $reply_content = $reply_edit_reason = $terms = '';
|
358 |
|
359 |
+
/** Reply *************************************************************/
|
|
|
|
|
360 |
|
361 |
+
// Reply id was not passed
|
362 |
+
if ( empty( $_POST['bbp_reply_id'] ) ) {
|
363 |
+
bbp_add_error( 'bbp_edit_reply_id', __( '<strong>ERROR</strong>: Reply ID not found.', 'bbpress' ) );
|
364 |
|
365 |
+
// Reply id was passed
|
366 |
+
} elseif ( is_numeric( $_POST['bbp_reply_id'] ) ) {
|
367 |
+
$reply_id = (int) $_POST['bbp_reply_id'];
|
368 |
+
$reply = bbp_get_reply( $reply_id );
|
369 |
+
}
|
370 |
|
371 |
+
// Reply does not exist
|
372 |
+
if ( empty( $reply ) ) {
|
373 |
+
bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>ERROR</strong>: The reply you want to edit was not found.', 'bbpress' ) );
|
374 |
|
375 |
+
// Reply exists
|
376 |
+
} else {
|
377 |
|
378 |
+
// Nonce check
|
379 |
+
check_admin_referer( 'bbp-edit-reply_' . $reply_id );
|
|
|
|
|
380 |
|
381 |
+
// Check users ability to create new reply
|
382 |
+
if ( !bbp_is_reply_anonymous( $reply_id ) ) {
|
383 |
|
384 |
+
// User cannot edit this reply
|
385 |
+
if ( !current_user_can( 'edit_reply', $reply_id ) ) {
|
386 |
+
bbp_add_error( 'bbp_edit_reply_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
|
387 |
}
|
|
|
388 |
|
389 |
+
// It is an anonymous post
|
390 |
+
} else {
|
391 |
+
|
392 |
+
// Filter anonymous data
|
393 |
+
$anonymous_data = bbp_filter_anonymous_post_data( array(), true );
|
394 |
}
|
395 |
+
}
|
396 |
|
397 |
+
// Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
|
398 |
+
if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_reply'] ) && wp_create_nonce( 'bbp-unfiltered-html-reply_' . $reply_id ) == $_POST['_bbp_unfiltered_html_reply'] ) {
|
399 |
+
remove_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
|
400 |
+
remove_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses' );
|
401 |
+
}
|
402 |
|
403 |
+
/** Reply Topic *******************************************************/
|
404 |
|
405 |
+
$topic_id = bbp_get_reply_topic_id( $reply_id );
|
406 |
|
407 |
+
/** Topic Forum *******************************************************/
|
408 |
|
409 |
+
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
|
|
410 |
|
411 |
+
// Forum exists
|
412 |
+
if ( !empty( $forum_id ) && ( $forum_id !== bbp_get_reply_forum_id( $reply_id ) ) ) {
|
|
|
413 |
|
414 |
+
// Forum is a category
|
415 |
+
if ( bbp_is_forum_category( $forum_id ) )
|
416 |
+
bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics or replies can be created in it.', 'bbpress' ) );
|
417 |
|
418 |
+
// Forum is closed and user cannot access
|
419 |
+
if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) )
|
420 |
+
bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics and replies.', 'bbpress' ) );
|
421 |
|
422 |
+
// Forum is private and user cannot access
|
423 |
+
if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) )
|
424 |
+
bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
|
|
|
425 |
|
426 |
+
// Forum is hidden and user cannot access
|
427 |
+
if ( bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) )
|
428 |
+
bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
|
429 |
+
}
|
430 |
|
431 |
+
/** Reply Title *******************************************************/
|
|
|
432 |
|
433 |
+
if ( !empty( $_POST['bbp_reply_title'] ) )
|
434 |
+
$reply_title = esc_attr( strip_tags( $_POST['bbp_reply_title'] ) );
|
435 |
|
436 |
+
// Filter and sanitize
|
437 |
+
$reply_title = apply_filters( 'bbp_edit_reply_pre_title', $reply_title, $reply_id );
|
438 |
|
439 |
+
/** Reply Content *****************************************************/
|
|
|
440 |
|
441 |
+
if ( !empty( $_POST['bbp_reply_content'] ) )
|
442 |
+
$reply_content = $_POST['bbp_reply_content'];
|
443 |
|
444 |
+
// Filter and sanitize
|
445 |
+
$reply_content = apply_filters( 'bbp_edit_reply_pre_content', $reply_content, $reply_id );
|
|
|
446 |
|
447 |
+
// No reply content
|
448 |
+
if ( empty( $reply_content ) )
|
449 |
+
bbp_add_error( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
|
450 |
|
451 |
+
/** Topic Tags ********************************************************/
|
|
|
452 |
|
453 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) )
|
454 |
+
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
455 |
|
456 |
+
/** Additional Actions (Before Save) **********************************/
|
457 |
|
458 |
+
do_action( 'bbp_edit_reply_pre_extras', $reply_id );
|
459 |
|
460 |
+
/** No Errors *********************************************************/
|
|
|
461 |
|
462 |
+
// Handle insertion into posts table
|
463 |
+
if ( !bbp_has_errors() ) {
|
|
|
|
|
|
|
|
|
464 |
|
465 |
+
// Add the content of the form to $post as an array
|
466 |
+
$reply_data = array(
|
467 |
+
'ID' => $reply_id,
|
468 |
+
'post_title' => $reply_title,
|
469 |
+
'post_content' => $reply_content
|
470 |
+
);
|
471 |
|
472 |
+
// Just in time manipulation of reply data before being edited
|
473 |
+
$reply_data = apply_filters( 'bbp_edit_reply_pre_insert', $reply_data );
|
474 |
|
475 |
+
// Insert reply
|
476 |
+
$reply_id = wp_update_post( $reply_data );
|
477 |
|
478 |
+
/** Topic Tags ************************************************/
|
|
|
479 |
|
480 |
+
// Just in time manipulation of reply terms before being edited
|
481 |
+
$terms = apply_filters( 'bbp_edit_reply_pre_set_terms', $terms, $topic_id, $reply_id );
|
482 |
|
483 |
+
// Insert terms
|
484 |
+
$terms = wp_set_post_terms( $topic_id, $terms, bbp_get_topic_tag_tax_id(), false );
|
485 |
+
|
486 |
+
// Term error
|
487 |
+
if ( is_wp_error( $terms ) ) {
|
488 |
+
bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
|
489 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
+
/** Revisions *****************************************************/
|
492 |
|
493 |
+
// Revision Reason
|
494 |
+
if ( !empty( $_POST['bbp_reply_edit_reason'] ) )
|
495 |
+
$reply_edit_reason = esc_attr( strip_tags( $_POST['bbp_reply_edit_reason'] ) );
|
496 |
|
497 |
+
// Update revision log
|
498 |
+
if ( !empty( $_POST['bbp_log_reply_edit'] ) && ( 1 == $_POST['bbp_log_reply_edit'] ) && ( $revision_id = wp_save_post_revision( $reply_id ) ) ) {
|
499 |
+
bbp_update_reply_revision_log( array(
|
500 |
+
'reply_id' => $reply_id,
|
501 |
+
'revision_id' => $revision_id,
|
502 |
+
'author_id' => bbp_get_current_user_id(),
|
503 |
+
'reason' => $reply_edit_reason
|
504 |
+
) );
|
505 |
+
}
|
506 |
|
507 |
+
/** No Errors *****************************************************/
|
508 |
|
509 |
+
if ( !empty( $reply_id ) && !is_wp_error( $reply_id ) ) {
|
510 |
|
511 |
+
// Update counts, etc...
|
512 |
+
do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply->post_author , true /* Is edit */ );
|
513 |
|
514 |
+
/** Additional Actions (After Save) ***************************/
|
|
|
515 |
|
516 |
+
do_action( 'bbp_edit_reply_post_extras', $reply_id );
|
|
|
517 |
|
518 |
+
/** Redirect **************************************************/
|
|
|
519 |
|
520 |
+
// Redirect to
|
521 |
+
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
522 |
|
523 |
+
// Get the reply URL
|
524 |
+
$reply_url = bbp_get_reply_url( $reply_id, $redirect_to );
|
525 |
|
526 |
+
// Allow to be filtered
|
527 |
+
$reply_url = apply_filters( 'bbp_edit_reply_redirect_to', $reply_url, $redirect_to );
|
528 |
|
529 |
+
/** Successful Edit *******************************************/
|
530 |
|
531 |
+
// Redirect back to new reply
|
532 |
+
wp_safe_redirect( $reply_url );
|
533 |
+
|
534 |
+
// For good measure
|
535 |
+
exit();
|
536 |
+
|
537 |
+
/** Errors ********************************************************/
|
538 |
+
|
539 |
+
} else {
|
540 |
+
$append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
|
541 |
+
bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
|
542 |
}
|
543 |
}
|
544 |
}
|
668 |
* @uses bbp_update_topic_last_active_time() To update the last active topic meta
|
669 |
* @uses bbp_update_topic_voice_count() To update the topic voice count
|
670 |
* @uses bbp_update_topic_reply_count() To update the topic reply count
|
671 |
+
* @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply
|
672 |
* count
|
673 |
* @uses bbp_is_forum() To check if the ancestor is a forum
|
674 |
* @uses bbp_update_forum_last_topic_id() To update the last topic id forum meta
|
679 |
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
680 |
*/
|
681 |
function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id = 0, $topic_id = 0, $refresh = true ) {
|
|
|
682 |
|
683 |
// Verify the reply ID
|
684 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
685 |
+
|
686 |
+
// Reply was passed
|
687 |
+
if ( !empty( $reply_id ) ) {
|
688 |
|
689 |
// Get the topic ID if none was passed
|
690 |
+
if ( empty( $topic_id ) ) {
|
691 |
$topic_id = bbp_get_reply_topic_id( $reply_id );
|
692 |
+
}
|
693 |
|
694 |
// Get the forum ID if none was passed
|
695 |
+
if ( empty( $forum_id ) ) {
|
696 |
$forum_id = bbp_get_reply_forum_id( $reply_id );
|
697 |
+
}
|
698 |
}
|
699 |
|
700 |
// Set the active_id based on topic_id/reply_id
|
732 |
// Counts
|
733 |
bbp_update_topic_voice_count ( $ancestor );
|
734 |
bbp_update_topic_reply_count ( $ancestor );
|
735 |
+
bbp_update_topic_reply_count_hidden( $ancestor );
|
736 |
|
737 |
// Forum meta relating to most recent topic
|
738 |
} elseif ( bbp_is_forum( $ancestor ) ) {
|
757 |
}
|
758 |
}
|
759 |
|
760 |
+
/** Reply Updaters ************************************************************/
|
761 |
+
|
762 |
+
/**
|
763 |
+
* Update the reply with its forum id it is in
|
764 |
+
*
|
765 |
+
* @since bbPress (r2855)
|
766 |
+
*
|
767 |
+
* @param int $reply_id Optional. Reply id to update
|
768 |
+
* @param int $forum_id Optional. Forum id
|
769 |
+
* @uses bbp_get_reply_id() To get the reply id
|
770 |
+
* @uses bbp_get_forum_id() To get the forum id
|
771 |
+
* @uses get_post_ancestors() To get the reply's forum
|
772 |
+
* @uses get_post_field() To get the post type of the post
|
773 |
+
* @uses update_post_meta() To update the reply forum id meta
|
774 |
+
* @uses apply_filters() Calls 'bbp_update_reply_forum_id' with the forum id
|
775 |
+
* and reply id
|
776 |
+
* @return bool Reply's forum id
|
777 |
+
*/
|
778 |
+
function bbp_update_reply_forum_id( $reply_id = 0, $forum_id = 0 ) {
|
779 |
+
|
780 |
+
// Validation
|
781 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
782 |
+
$forum_id = bbp_get_forum_id( $forum_id );
|
783 |
+
|
784 |
+
// If no forum_id was passed, walk up ancestors and look for forum type
|
785 |
+
if ( empty( $forum_id ) ) {
|
786 |
+
|
787 |
+
// Get ancestors
|
788 |
+
$ancestors = get_post_ancestors( $reply_id );
|
789 |
+
|
790 |
+
// Loop through ancestors
|
791 |
+
foreach ( $ancestors as $ancestor ) {
|
792 |
+
|
793 |
+
// Get first parent that is a forum
|
794 |
+
if ( get_post_field( 'post_type', $ancestor ) == bbp_get_forum_post_type() ) {
|
795 |
+
$forum_id = $ancestor;
|
796 |
+
|
797 |
+
// Found a forum, so exit the loop and continue
|
798 |
+
continue;
|
799 |
+
}
|
800 |
+
}
|
801 |
+
}
|
802 |
+
|
803 |
+
// Update the forum ID
|
804 |
+
bbp_update_forum_id( $reply_id, $forum_id );
|
805 |
+
|
806 |
+
return apply_filters( 'bbp_update_reply_forum_id', (int) $forum_id, $reply_id );
|
807 |
+
}
|
808 |
+
|
809 |
+
/**
|
810 |
+
* Update the reply with its topic id it is in
|
811 |
+
*
|
812 |
+
* @since bbPress (r2855)
|
813 |
+
*
|
814 |
+
* @param int $reply_id Optional. Reply id to update
|
815 |
+
* @param int $topic_id Optional. Topic id
|
816 |
+
* @uses bbp_get_reply_id() To get the reply id
|
817 |
+
* @uses bbp_get_topic_id() To get the topic id
|
818 |
+
* @uses get_post_ancestors() To get the reply's topic
|
819 |
+
* @uses get_post_field() To get the post type of the post
|
820 |
+
* @uses update_post_meta() To update the reply topic id meta
|
821 |
+
* @uses apply_filters() Calls 'bbp_update_reply_topic_id' with the topic id
|
822 |
+
* and reply id
|
823 |
+
* @return bool Reply's topic id
|
824 |
+
*/
|
825 |
+
function bbp_update_reply_topic_id( $reply_id = 0, $topic_id = 0 ) {
|
826 |
+
|
827 |
+
// Validation
|
828 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
829 |
+
$topic_id = bbp_get_topic_id( $topic_id );
|
830 |
+
|
831 |
+
// If no topic_id was passed, walk up ancestors and look for topic type
|
832 |
+
if ( empty( $topic_id ) ) {
|
833 |
+
|
834 |
+
// Get ancestors
|
835 |
+
$ancestors = get_post_ancestors( $reply_id );
|
836 |
+
|
837 |
+
// Loop through ancestors
|
838 |
+
foreach ( $ancestors as $ancestor ) {
|
839 |
+
|
840 |
+
// Get first parent that is a forum
|
841 |
+
if ( get_post_field( 'post_type', $ancestor ) == bbp_get_topic_post_type() ) {
|
842 |
+
$topic_id = $ancestor;
|
843 |
+
|
844 |
+
// Found a forum, so exit the loop and continue
|
845 |
+
continue;
|
846 |
+
}
|
847 |
+
}
|
848 |
+
}
|
849 |
+
|
850 |
+
// Update the topic ID
|
851 |
+
bbp_update_topic_id( $reply_id, $topic_id );
|
852 |
+
|
853 |
+
return apply_filters( 'bbp_update_reply_topic_id', (int) $topic_id, $reply_id );
|
854 |
+
}
|
855 |
+
|
856 |
/**
|
857 |
* Update the revision log of the reply
|
858 |
*
|
925 |
*/
|
926 |
function bbp_toggle_reply_handler() {
|
927 |
|
928 |
+
// Bail if not a GET action
|
929 |
+
if ( 'GET' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
930 |
+
return;
|
931 |
|
932 |
+
// Bail if required GET actions aren't passed
|
933 |
+
if ( empty( $_GET['reply_id'] ) || empty( $_GET['action'] ) )
|
934 |
+
return;
|
|
|
935 |
|
936 |
+
// Setup possible get actions
|
937 |
+
$possible_actions = array(
|
938 |
+
'bbp_toggle_reply_spam',
|
939 |
+
'bbp_toggle_reply_trash'
|
940 |
+
);
|
941 |
|
942 |
+
// Bail if actions aren't meant for this function
|
943 |
+
if ( !in_array( $_GET['action'], $possible_actions ) )
|
944 |
+
return;
|
945 |
+
|
946 |
+
$view_all = false; // Assume not viewing all
|
947 |
+
$action = $_GET['action']; // What action is taking place?
|
948 |
+
$reply_id = (int) $_GET['reply_id']; // What's the reply id?
|
949 |
+
$success = false; // Flag
|
950 |
+
$post_data = array( 'ID' => $reply_id ); // Prelim array
|
951 |
|
952 |
+
// Make sure reply exists
|
953 |
+
if ( !$reply = bbp_get_reply( $reply_id ) )
|
954 |
+
return;
|
955 |
+
|
956 |
+
// What is the user doing here?
|
957 |
+
if ( !current_user_can( 'edit_reply', $reply->ID ) || ( 'bbp_toggle_reply_trash' == $action && !current_user_can( 'delete_reply', $reply->ID ) ) ) {
|
958 |
+
bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have the permission to do that!', 'bbpress' ) );
|
959 |
+
return;
|
960 |
+
}
|
961 |
|
962 |
+
// What action are we trying to perform?
|
963 |
+
switch ( $action ) {
|
|
|
964 |
|
965 |
+
// Toggle spam
|
966 |
+
case 'bbp_toggle_reply_spam' :
|
967 |
+
check_ajax_referer( 'spam-reply_' . $reply_id );
|
968 |
|
969 |
+
$is_spam = bbp_is_reply_spam( $reply_id );
|
970 |
+
$success = $is_spam ? bbp_unspam_reply( $reply_id ) : bbp_spam_reply( $reply_id );
|
971 |
+
$failure = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam!', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam!', 'bbpress' );
|
972 |
+
$view_all = !$is_spam;
|
973 |
+
|
974 |
+
break;
|
975 |
+
|
976 |
+
// Toggle trash
|
977 |
+
case 'bbp_toggle_reply_trash' :
|
978 |
+
|
979 |
+
$sub_action = in_array( $_GET['sub_action'], array( 'trash', 'untrash', 'delete' ) ) ? $_GET['sub_action'] : false;
|
980 |
+
|
981 |
+
if ( empty( $sub_action ) )
|
982 |
break;
|
983 |
|
984 |
+
switch ( $sub_action ) {
|
985 |
+
case 'trash':
|
986 |
+
check_ajax_referer( 'trash-' . bbp_get_reply_post_type() . '_' . $reply_id );
|
987 |
|
988 |
+
$view_all = true;
|
989 |
+
$success = wp_trash_post( $reply_id );
|
990 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem trashing the reply!', 'bbpress' );
|
991 |
|
|
|
992 |
break;
|
993 |
|
994 |
+
case 'untrash':
|
995 |
+
check_ajax_referer( 'untrash-' . bbp_get_reply_post_type() . '_' . $reply_id );
|
|
|
996 |
|
997 |
+
$success = wp_untrash_post( $reply_id );
|
998 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem untrashing the reply!', 'bbpress' );
|
999 |
|
1000 |
+
break;
|
|
|
|
|
|
|
1001 |
|
1002 |
+
case 'delete':
|
1003 |
+
check_ajax_referer( 'delete-' . bbp_get_reply_post_type() . '_' . $reply_id );
|
1004 |
|
1005 |
+
$success = wp_delete_post( $reply_id );
|
1006 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem deleting the reply!', 'bbpress' );
|
1007 |
|
1008 |
+
break;
|
1009 |
+
}
|
1010 |
|
1011 |
+
break;
|
1012 |
+
}
|
1013 |
|
1014 |
+
// Do additional reply toggle actions
|
1015 |
+
do_action( 'bbp_toggle_reply_handler', $success, $post_data, $action );
|
1016 |
|
1017 |
+
// No errors
|
1018 |
+
if ( ( false != $success ) && !is_wp_error( $success ) ) {
|
1019 |
|
1020 |
+
// Redirect back to the reply
|
1021 |
+
$redirect = bbp_get_reply_url( $reply_id );
|
1022 |
|
1023 |
+
// Add view all if needed
|
1024 |
+
if ( !empty( $view_all ) )
|
1025 |
+
$redirect = bbp_add_view_all( $redirect, true );
|
1026 |
|
1027 |
+
wp_redirect( $redirect );
|
|
|
|
|
1028 |
|
1029 |
+
// For good measure
|
1030 |
+
exit();
|
1031 |
|
1032 |
+
// Handle errors
|
1033 |
+
} else {
|
1034 |
+
bbp_add_error( 'bbp_toggle_reply', $failure );
|
|
|
1035 |
}
|
1036 |
}
|
1037 |
|
1242 |
*
|
1243 |
* @global bbPress $bbp
|
1244 |
*
|
1245 |
+
* @uses bbp_is_single_topic()
|
1246 |
* @uses bbp_user_can_view_forum()
|
1247 |
* @uses bbp_get_topic_forum_id()
|
1248 |
* @uses bbp_show_load_topic()
|
1272 |
global $bbp;
|
1273 |
|
1274 |
// User cannot access forum this topic is in
|
1275 |
+
if ( bbp_is_single_topic() && !bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) )
|
1276 |
return;
|
1277 |
|
1278 |
// Adjust the title based on context
|
1279 |
+
if ( bbp_is_single_topic() && bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) )
|
1280 |
$title = apply_filters( 'wp_title_rss', get_wp_title_rss( ' » ' ) );
|
1281 |
elseif ( !bbp_show_lead_topic() )
|
1282 |
$title = ' » ' . __( 'All Posts', 'bbpress' );
|
1303 |
<link><?php self_link(); ?></link>
|
1304 |
<description><?php //?></description>
|
1305 |
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
|
1306 |
+
<generator>http://bbpress.org/?v=<?php echo $bbp->version; ?></generator>
|
1307 |
<language><?php echo get_option( 'rss_language' ); ?></language>
|
1308 |
|
1309 |
<?php do_action( 'bbp_feed_head' ); ?>
|
1310 |
|
1311 |
+
<?php if ( bbp_is_single_topic() ) : ?>
|
1312 |
<?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) : ?>
|
1313 |
<?php if ( bbp_show_lead_topic() ) : ?>
|
1314 |
|
bbp-includes/bbp-reply-template.php
CHANGED
@@ -45,7 +45,6 @@ function bbp_reply_post_type() {
|
|
45 |
* @since bbPress (r2553)
|
46 |
*
|
47 |
* @param mixed $args All the arguments supported by {@link WP_Query}
|
48 |
-
* @uses bbp_is_topic() To check if it's the topic page
|
49 |
* @uses bbp_show_lead_topic() Are we showing the topic as a lead?
|
50 |
* @uses bbp_get_topic_id() To get the topic id
|
51 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
@@ -69,9 +68,6 @@ function bbp_reply_post_type() {
|
|
69 |
function bbp_has_replies( $args = '' ) {
|
70 |
global $wp_rewrite, $bbp;
|
71 |
|
72 |
-
// Make sure we're back where we started
|
73 |
-
wp_reset_postdata();
|
74 |
-
|
75 |
// Default status
|
76 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id ) );
|
77 |
|
@@ -86,8 +82,9 @@ function bbp_has_replies( $args = '' ) {
|
|
86 |
);
|
87 |
|
88 |
// What are the default allowed statuses (based on user caps)
|
89 |
-
if ( bbp_get_view_all( 'edit_others_replies' ) )
|
90 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id, $bbp->spam_status_id, 'trash' ) );
|
|
|
91 |
}
|
92 |
|
93 |
// Default query args
|
@@ -136,21 +133,26 @@ function bbp_has_replies( $args = '' ) {
|
|
136 |
$bbp->reply_query->paged = $paged;
|
137 |
|
138 |
// Only add pagination if query returned results
|
139 |
-
if ( (int) $bbp->reply_query->found_posts && (int) $bbp->reply_query->posts_per_page ) {
|
140 |
|
141 |
// If pretty permalinks are enabled, make our pagination pretty
|
142 |
-
if ( $wp_rewrite->using_permalinks() )
|
143 |
-
|
144 |
// Page or single
|
145 |
-
if ( is_page() || is_single() )
|
146 |
-
$base =
|
147 |
|
148 |
// Topic
|
149 |
-
else
|
150 |
-
$base =
|
|
|
151 |
|
152 |
-
|
|
|
|
|
|
|
153 |
$base = add_query_arg( 'paged', '%#%' );
|
|
|
154 |
|
155 |
// Pagination settings with filter
|
156 |
$bbp_replies_pagination = apply_filters( 'bbp_replies_pagination', array(
|
@@ -169,9 +171,9 @@ function bbp_has_replies( $args = '' ) {
|
|
169 |
|
170 |
// Remove first page from pagination
|
171 |
if ( $wp_rewrite->using_permalinks() )
|
172 |
-
$bbp->reply_query->pagination_links = str_replace( '
|
173 |
else
|
174 |
-
$bbp->reply_query->pagination_links = str_replace( '&paged=1', '',
|
175 |
}
|
176 |
|
177 |
// Return object
|
@@ -189,7 +191,15 @@ function bbp_has_replies( $args = '' ) {
|
|
189 |
*/
|
190 |
function bbp_replies() {
|
191 |
global $bbp;
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
|
195 |
/**
|
@@ -239,14 +249,14 @@ function bbp_reply_id( $reply_id = 0 ) {
|
|
239 |
if ( !empty( $reply_id ) && is_numeric( $reply_id ) )
|
240 |
$bbp_reply_id = $reply_id;
|
241 |
|
242 |
-
// Currently viewing a reply
|
243 |
-
elseif ( ( bbp_is_reply() || bbp_is_reply_edit() ) && isset( $wp_query->post->ID ) )
|
244 |
-
$bbp_reply_id = $bbp->current_reply_id = $wp_query->post->ID;
|
245 |
-
|
246 |
// Currently inside a replies loop
|
247 |
elseif ( isset( $bbp->reply_query->post->ID ) )
|
248 |
$bbp_reply_id = $bbp->current_reply_id = $bbp->reply_query->post->ID;
|
249 |
|
|
|
|
|
|
|
|
|
250 |
// Fallback
|
251 |
else
|
252 |
$bbp_reply_id = 0;
|
@@ -361,10 +371,10 @@ function bbp_reply_url( $reply_id = 0 ) {
|
|
361 |
global $bbp, $wp_rewrite;
|
362 |
|
363 |
// Set needed variables
|
364 |
-
$reply_id = bbp_get_reply_id ( $reply_id
|
365 |
-
$topic_id = bbp_get_reply_topic_id ( $reply_id
|
366 |
-
$topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to
|
367 |
-
$reply_position = bbp_get_reply_position ( $reply_id, $topic_id
|
368 |
|
369 |
// Check if in query with pagination
|
370 |
$reply_page = ceil( $reply_position / get_option( '_bbp_replies_per_page', 15 ) );
|
@@ -384,7 +394,7 @@ function bbp_reply_url( $reply_id = 0 ) {
|
|
384 |
|
385 |
// Pretty permalinks
|
386 |
if ( $wp_rewrite->using_permalinks() ) {
|
387 |
-
$url = trailingslashit( $topic_url ) . trailingslashit(
|
388 |
|
389 |
// Yucky links
|
390 |
} else {
|
@@ -524,6 +534,12 @@ function bbp_reply_excerpt( $reply_id = 0, $length = 100 ) {
|
|
524 |
* @return string Content with the revisions appended
|
525 |
*/
|
526 |
function bbp_reply_content_append_revisions( $content = '', $reply_id = 0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
$reply_id = bbp_get_reply_id( $reply_id );
|
528 |
|
529 |
return apply_filters( 'bbp_reply_append_revisions', $content . bbp_get_reply_revision_log( $reply_id ), $content, $reply_id );
|
@@ -558,6 +574,7 @@ function bbp_reply_revision_log( $reply_id = 0 ) {
|
|
558 |
* @return string Revision log of the reply
|
559 |
*/
|
560 |
function bbp_get_reply_revision_log( $reply_id = 0 ) {
|
|
|
561 |
// Create necessary variables
|
562 |
$reply_id = bbp_get_reply_id( $reply_id );
|
563 |
$revision_log = bbp_get_reply_raw_revision_log( $reply_id );
|
@@ -909,8 +926,6 @@ function bbp_reply_author_link( $args = '' ) {
|
|
909 |
*
|
910 |
* @param mixed $args Optional. If an integer, it is used as reply id.
|
911 |
* @uses bbp_get_reply_id() To get the reply id
|
912 |
-
* @uses bbp_is_topic() To check if it's a topic page
|
913 |
-
* @uses bbp_is_reply() To check if it's a reply page
|
914 |
* @uses bbp_is_reply_anonymous() To check if the reply is by an
|
915 |
* anonymous user
|
916 |
* @uses bbp_get_reply_author() To get the reply author name
|
@@ -975,49 +990,49 @@ function bbp_reply_author_link( $args = '' ) {
|
|
975 |
return apply_filters( 'bbp_get_reply_author_link', $author_link, $args );
|
976 |
}
|
977 |
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
|
1022 |
/**
|
1023 |
* Output the topic title a reply belongs to
|
@@ -1281,9 +1296,9 @@ function bbp_reply_admin_links( $args = '' ) {
|
|
1281 |
if ( empty( $r['links'] ) ) {
|
1282 |
$r['links'] = array (
|
1283 |
'edit' => bbp_get_reply_edit_link ( $r ),
|
|
|
1284 |
'trash' => bbp_get_reply_trash_link( $r ),
|
1285 |
'spam' => bbp_get_reply_spam_link ( $r ),
|
1286 |
-
'split' => bbp_get_topic_split_link( $r )
|
1287 |
);
|
1288 |
}
|
1289 |
|
@@ -1355,7 +1370,7 @@ function bbp_reply_edit_link( $args = '' ) {
|
|
1355 |
$reply = bbp_get_reply( bbp_get_reply_id( (int) $id ) );
|
1356 |
|
1357 |
// Bypass check if user has caps
|
1358 |
-
if ( !
|
1359 |
|
1360 |
// User cannot edit or it is past the lock time
|
1361 |
if ( empty( $reply ) || !current_user_can( 'edit_reply', $reply->ID ) || bbp_past_edit_lock( $reply->post_date_gmt ) )
|
@@ -1470,16 +1485,19 @@ function bbp_reply_trash_link( $args = '' ) {
|
|
1470 |
$actions = array();
|
1471 |
$reply = bbp_get_reply( bbp_get_reply_id( (int) $id ) );
|
1472 |
|
1473 |
-
if ( empty( $reply ) || !current_user_can( 'delete_reply', $reply->ID ) )
|
1474 |
return;
|
|
|
1475 |
|
1476 |
-
if ( bbp_is_reply_trash( $reply->ID ) )
|
1477 |
-
$actions['untrash'] = '<a title="' . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '"
|
1478 |
-
elseif ( EMPTY_TRASH_DAYS )
|
1479 |
-
$actions['trash'] = '<a title="' . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash', 'reply_id' => $reply->ID ) ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '"
|
|
|
1480 |
|
1481 |
-
if ( bbp_is_reply_trash( $reply->ID ) || !EMPTY_TRASH_DAYS )
|
1482 |
$actions['delete'] = '<a title="' . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete', 'reply_id' => $reply->ID ) ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . esc_html( $delete_text ) . '</a>';
|
|
|
1483 |
|
1484 |
// Process the admin links
|
1485 |
$actions = implode( $sep, $actions );
|
45 |
* @since bbPress (r2553)
|
46 |
*
|
47 |
* @param mixed $args All the arguments supported by {@link WP_Query}
|
|
|
48 |
* @uses bbp_show_lead_topic() Are we showing the topic as a lead?
|
49 |
* @uses bbp_get_topic_id() To get the topic id
|
50 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
68 |
function bbp_has_replies( $args = '' ) {
|
69 |
global $wp_rewrite, $bbp;
|
70 |
|
|
|
|
|
|
|
71 |
// Default status
|
72 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id ) );
|
73 |
|
82 |
);
|
83 |
|
84 |
// What are the default allowed statuses (based on user caps)
|
85 |
+
if ( bbp_get_view_all( 'edit_others_replies' ) ) {
|
86 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id, $bbp->spam_status_id, 'trash' ) );
|
87 |
+
}
|
88 |
}
|
89 |
|
90 |
// Default query args
|
133 |
$bbp->reply_query->paged = $paged;
|
134 |
|
135 |
// Only add pagination if query returned results
|
136 |
+
if ( !bbp_is_query_name( 'bbp_widget' ) && (int) $bbp->reply_query->found_posts && (int) $bbp->reply_query->posts_per_page ) {
|
137 |
|
138 |
// If pretty permalinks are enabled, make our pagination pretty
|
139 |
+
if ( $wp_rewrite->using_permalinks() ) {
|
140 |
+
|
141 |
// Page or single
|
142 |
+
if ( is_page() || is_single() ) {
|
143 |
+
$base = get_permalink();
|
144 |
|
145 |
// Topic
|
146 |
+
} else {
|
147 |
+
$base = get_permalink( bbp_get_topic_id() );
|
148 |
+
}
|
149 |
|
150 |
+
$base = trailingslashit( $base ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
|
151 |
+
|
152 |
+
// Unpretty permalinks
|
153 |
+
} else {
|
154 |
$base = add_query_arg( 'paged', '%#%' );
|
155 |
+
}
|
156 |
|
157 |
// Pagination settings with filter
|
158 |
$bbp_replies_pagination = apply_filters( 'bbp_replies_pagination', array(
|
171 |
|
172 |
// Remove first page from pagination
|
173 |
if ( $wp_rewrite->using_permalinks() )
|
174 |
+
$bbp->reply_query->pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $bbp->reply_query->pagination_links );
|
175 |
else
|
176 |
+
$bbp->reply_query->pagination_links = str_replace( '&paged=1', '', $bbp->reply_query->pagination_links );
|
177 |
}
|
178 |
|
179 |
// Return object
|
191 |
*/
|
192 |
function bbp_replies() {
|
193 |
global $bbp;
|
194 |
+
|
195 |
+
// Put into variable to check against next
|
196 |
+
$have_posts = $bbp->reply_query->have_posts();
|
197 |
+
|
198 |
+
// Reset the post data when finished
|
199 |
+
if ( empty( $have_posts ) )
|
200 |
+
wp_reset_postdata();
|
201 |
+
|
202 |
+
return $have_posts;
|
203 |
}
|
204 |
|
205 |
/**
|
249 |
if ( !empty( $reply_id ) && is_numeric( $reply_id ) )
|
250 |
$bbp_reply_id = $reply_id;
|
251 |
|
|
|
|
|
|
|
|
|
252 |
// Currently inside a replies loop
|
253 |
elseif ( isset( $bbp->reply_query->post->ID ) )
|
254 |
$bbp_reply_id = $bbp->current_reply_id = $bbp->reply_query->post->ID;
|
255 |
|
256 |
+
// Currently viewing a reply
|
257 |
+
elseif ( ( bbp_is_single_reply() || bbp_is_reply_edit() ) && isset( $wp_query->post->ID ) )
|
258 |
+
$bbp_reply_id = $bbp->current_reply_id = $wp_query->post->ID;
|
259 |
+
|
260 |
// Fallback
|
261 |
else
|
262 |
$bbp_reply_id = 0;
|
371 |
global $bbp, $wp_rewrite;
|
372 |
|
373 |
// Set needed variables
|
374 |
+
$reply_id = bbp_get_reply_id ( $reply_id );
|
375 |
+
$topic_id = bbp_get_reply_topic_id ( $reply_id );
|
376 |
+
$topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
|
377 |
+
$reply_position = bbp_get_reply_position ( $reply_id, $topic_id );
|
378 |
|
379 |
// Check if in query with pagination
|
380 |
$reply_page = ceil( $reply_position / get_option( '_bbp_replies_per_page', 15 ) );
|
394 |
|
395 |
// Pretty permalinks
|
396 |
if ( $wp_rewrite->using_permalinks() ) {
|
397 |
+
$url = trailingslashit( $topic_url ) . trailingslashit( $wp_rewrite->pagination_base ) . trailingslashit( $reply_page ) . $reply_hash;
|
398 |
|
399 |
// Yucky links
|
400 |
} else {
|
534 |
* @return string Content with the revisions appended
|
535 |
*/
|
536 |
function bbp_reply_content_append_revisions( $content = '', $reply_id = 0 ) {
|
537 |
+
|
538 |
+
// Bail if in admin
|
539 |
+
if ( is_admin() )
|
540 |
+
return;
|
541 |
+
|
542 |
+
// Validate the ID
|
543 |
$reply_id = bbp_get_reply_id( $reply_id );
|
544 |
|
545 |
return apply_filters( 'bbp_reply_append_revisions', $content . bbp_get_reply_revision_log( $reply_id ), $content, $reply_id );
|
574 |
* @return string Revision log of the reply
|
575 |
*/
|
576 |
function bbp_get_reply_revision_log( $reply_id = 0 ) {
|
577 |
+
|
578 |
// Create necessary variables
|
579 |
$reply_id = bbp_get_reply_id( $reply_id );
|
580 |
$revision_log = bbp_get_reply_raw_revision_log( $reply_id );
|
926 |
*
|
927 |
* @param mixed $args Optional. If an integer, it is used as reply id.
|
928 |
* @uses bbp_get_reply_id() To get the reply id
|
|
|
|
|
929 |
* @uses bbp_is_reply_anonymous() To check if the reply is by an
|
930 |
* anonymous user
|
931 |
* @uses bbp_get_reply_author() To get the reply author name
|
990 |
return apply_filters( 'bbp_get_reply_author_link', $author_link, $args );
|
991 |
}
|
992 |
|
993 |
+
/**
|
994 |
+
* Output the author url of the reply
|
995 |
+
*
|
996 |
+
* @since bbPress (r2667)
|
997 |
+
*
|
998 |
+
* @param int $reply_id Optional. Reply id
|
999 |
+
* @uses bbp_get_reply_author_url() To get the reply author url
|
1000 |
+
*/
|
1001 |
+
function bbp_reply_author_url( $reply_id = 0 ) {
|
1002 |
+
echo bbp_get_reply_author_url( $reply_id );
|
1003 |
+
}
|
1004 |
+
/**
|
1005 |
+
* Return the author url of the reply
|
1006 |
+
*
|
1007 |
+
* @since bbPress (r22667)
|
1008 |
+
*
|
1009 |
+
* @param int $reply_id Optional. Reply id
|
1010 |
+
* @uses bbp_get_reply_id() To get the reply id
|
1011 |
+
* @uses bbp_is_reply_anonymous() To check if the reply
|
1012 |
+
* is by an anonymous
|
1013 |
+
* user
|
1014 |
+
* @uses bbp_get_reply_author_id() To get the reply
|
1015 |
+
* author id
|
1016 |
+
* @uses bbp_get_user_profile_url() To get the user
|
1017 |
+
* profile url
|
1018 |
+
* @uses get_post_meta() To get the anonymous poster's
|
1019 |
+
* website url
|
1020 |
+
* @uses apply_filters() Calls bbp_get_reply_author_url
|
1021 |
+
* with the author url & reply id
|
1022 |
+
* @return string Author URL of the reply
|
1023 |
+
*/
|
1024 |
+
function bbp_get_reply_author_url( $reply_id = 0 ) {
|
1025 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
1026 |
+
|
1027 |
+
// Check for anonymous user
|
1028 |
+
if ( !bbp_is_reply_anonymous( $reply_id ) )
|
1029 |
+
$author_url = bbp_get_user_profile_url( bbp_get_reply_author_id( $reply_id ) );
|
1030 |
+
else
|
1031 |
+
if ( !$author_url = get_post_meta( $reply_id, '_bbp_anonymous_website', true ) )
|
1032 |
+
$author_url = '';
|
1033 |
+
|
1034 |
+
return apply_filters( 'bbp_get_reply_author_url', $author_url, $reply_id );
|
1035 |
+
}
|
1036 |
|
1037 |
/**
|
1038 |
* Output the topic title a reply belongs to
|
1296 |
if ( empty( $r['links'] ) ) {
|
1297 |
$r['links'] = array (
|
1298 |
'edit' => bbp_get_reply_edit_link ( $r ),
|
1299 |
+
'split' => bbp_get_topic_split_link( $r ),
|
1300 |
'trash' => bbp_get_reply_trash_link( $r ),
|
1301 |
'spam' => bbp_get_reply_spam_link ( $r ),
|
|
|
1302 |
);
|
1303 |
}
|
1304 |
|
1370 |
$reply = bbp_get_reply( bbp_get_reply_id( (int) $id ) );
|
1371 |
|
1372 |
// Bypass check if user has caps
|
1373 |
+
if ( !current_user_can( 'edit_others_replies' ) ) {
|
1374 |
|
1375 |
// User cannot edit or it is past the lock time
|
1376 |
if ( empty( $reply ) || !current_user_can( 'edit_reply', $reply->ID ) || bbp_past_edit_lock( $reply->post_date_gmt ) )
|
1485 |
$actions = array();
|
1486 |
$reply = bbp_get_reply( bbp_get_reply_id( (int) $id ) );
|
1487 |
|
1488 |
+
if ( empty( $reply ) || !current_user_can( 'delete_reply', $reply->ID ) ) {
|
1489 |
return;
|
1490 |
+
}
|
1491 |
|
1492 |
+
if ( bbp_is_reply_trash( $reply->ID ) ) {
|
1493 |
+
$actions['untrash'] = '<a title="' . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '">' . esc_html( $restore_text ) . '</a>';
|
1494 |
+
} elseif ( EMPTY_TRASH_DAYS ) {
|
1495 |
+
$actions['trash'] = '<a title="' . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash', 'reply_id' => $reply->ID ) ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '">' . esc_html( $trash_text ) . '</a>';
|
1496 |
+
}
|
1497 |
|
1498 |
+
if ( bbp_is_reply_trash( $reply->ID ) || !EMPTY_TRASH_DAYS ) {
|
1499 |
$actions['delete'] = '<a title="' . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete', 'reply_id' => $reply->ID ) ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . esc_html( $delete_text ) . '</a>';
|
1500 |
+
}
|
1501 |
|
1502 |
// Process the admin links
|
1503 |
$actions = implode( $sep, $actions );
|
bbp-includes/bbp-topic-functions.php
CHANGED
@@ -10,6 +10,75 @@
|
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/** Post Form Handlers ********************************************************/
|
14 |
|
15 |
/**
|
@@ -46,232 +115,245 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
46 |
*/
|
47 |
function bbp_new_topic_handler() {
|
48 |
|
49 |
-
//
|
50 |
-
if ( 'POST'
|
51 |
-
|
52 |
|
53 |
-
|
54 |
-
|
|
|
55 |
|
56 |
-
|
57 |
-
$forum_id = $topic_author = $anonymous_data = 0;
|
58 |
-
$topic_title = $topic_content = '';
|
59 |
-
$terms = array( $bbp->topic_tag_id => array() );
|
60 |
|
61 |
-
|
|
|
62 |
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
|
66 |
-
|
67 |
-
$anonymous_data = bbp_filter_anonymous_post_data();
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
bbp_set_current_anonymous_user_data( $anonymous_data );
|
72 |
-
}
|
73 |
|
74 |
-
//
|
75 |
-
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
|
|
|
|
|
|
|
85 |
}
|
86 |
|
87 |
-
//
|
88 |
-
|
89 |
-
remove_filter( 'bbp_new_topic_pre_title', 'wp_filter_kses' );
|
90 |
-
remove_filter( 'bbp_new_topic_pre_content', 'wp_filter_kses' );
|
91 |
-
}
|
92 |
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
-
$topic_title = apply_filters( 'bbp_new_topic_pre_title', $topic_title );
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
$bbp->errors->add( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
|
104 |
|
105 |
-
|
|
|
106 |
|
107 |
-
|
108 |
-
|
|
|
109 |
|
110 |
-
|
111 |
-
$topic_content = apply_filters( 'bbp_new_topic_pre_content', $topic_content );
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
$bbp->errors->add( 'bbp_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
|
116 |
|
117 |
-
|
|
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
|
123 |
-
|
124 |
-
elseif ( is_numeric( $_POST['bbp_forum_id'] ) )
|
125 |
-
$forum_id = (int) $_POST['bbp_forum_id'];
|
126 |
|
127 |
-
|
128 |
-
|
|
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
$bbp->errors->add( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
}
|
146 |
|
147 |
-
|
|
|
|
|
148 |
|
149 |
-
|
150 |
-
|
|
|
|
|
151 |
|
152 |
-
|
153 |
|
154 |
-
|
155 |
-
|
156 |
|
157 |
-
|
158 |
|
159 |
-
|
|
|
160 |
|
161 |
-
|
162 |
-
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
163 |
|
164 |
-
|
165 |
-
if ( strstr( $terms, ',' ) )
|
166 |
-
$terms = explode( ',', $terms );
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
}
|
171 |
|
172 |
-
|
|
|
|
|
173 |
|
174 |
-
|
|
|
|
|
175 |
|
176 |
-
|
177 |
|
178 |
-
|
179 |
|
180 |
-
|
181 |
|
182 |
-
|
183 |
-
$topic_data = array(
|
184 |
-
'post_author' => $topic_author,
|
185 |
-
'post_title' => $topic_title,
|
186 |
-
'post_content' => $topic_content,
|
187 |
-
'post_parent' => $forum_id,
|
188 |
-
'tax_input' => $terms,
|
189 |
-
'post_status' => 'publish',
|
190 |
-
'post_type' => bbp_get_topic_post_type()
|
191 |
-
);
|
192 |
|
193 |
-
|
194 |
-
$topic_data = apply_filters( 'bbp_new_topic_pre_insert', $topic_data );
|
195 |
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
|
|
|
200 |
|
201 |
-
|
|
|
202 |
|
203 |
-
|
204 |
|
205 |
-
|
206 |
|
207 |
-
|
208 |
-
switch ( $_POST['bbp_stick_topic'] ) {
|
209 |
|
210 |
-
|
211 |
-
case 'stick' :
|
212 |
-
bbp_stick_topic( $topic_id );
|
213 |
-
break;
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
bbp_stick_topic( $topic_id, true );
|
218 |
-
break;
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
|
|
226 |
|
227 |
-
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
}
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
if ( $topic_data['post_status'] == $bbp->spam_status_id )
|
241 |
-
add_post_meta( $topic_id, '_bbp_spam_meta_status', 'publish' );
|
242 |
|
243 |
-
|
244 |
|
245 |
-
|
|
|
|
|
246 |
|
247 |
-
|
|
|
|
|
248 |
|
249 |
-
|
250 |
-
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
251 |
|
252 |
-
|
253 |
-
$topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
|
254 |
|
255 |
-
|
256 |
-
if ( bbp_get_view_all() || ( $topic_data['post_status'] == $bbp->trash_status_id ) )
|
257 |
-
$topic_url = bbp_add_view_all( $topic_url );
|
258 |
|
259 |
-
|
260 |
-
|
261 |
|
262 |
-
|
|
|
263 |
|
264 |
-
|
265 |
-
|
|
|
266 |
|
267 |
-
|
268 |
-
|
269 |
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
}
|
276 |
}
|
277 |
}
|
@@ -312,242 +394,251 @@ function bbp_new_topic_handler() {
|
|
312 |
*/
|
313 |
function bbp_edit_topic_handler() {
|
314 |
|
315 |
-
//
|
316 |
-
if (
|
317 |
-
|
318 |
-
|
319 |
-
// Define local variable(s)
|
320 |
-
$topic_id = $forum_id = $anonymous_data = 0;
|
321 |
-
$topic_title = $topic_content = $topic_edit_reason = '';
|
322 |
-
$terms = array( $bbp->topic_tag_id => array() );
|
323 |
|
324 |
-
|
|
|
|
|
325 |
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
329 |
|
330 |
-
|
331 |
-
elseif ( is_numeric( $_POST['bbp_topic_id'] ) )
|
332 |
-
$topic_id = (int) $_POST['bbp_topic_id'];
|
333 |
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
|
338 |
-
|
339 |
-
|
|
|
|
|
|
|
340 |
|
341 |
-
|
342 |
-
|
|
|
343 |
|
344 |
-
|
345 |
-
|
346 |
|
347 |
-
|
348 |
-
|
349 |
-
$bbp->errors->add( 'bbp_edit_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
|
350 |
-
}
|
351 |
|
352 |
-
|
353 |
-
|
354 |
|
355 |
-
|
356 |
-
|
|
|
357 |
}
|
358 |
-
}
|
359 |
|
360 |
-
//
|
361 |
-
|
362 |
-
|
363 |
-
|
|
|
364 |
}
|
|
|
365 |
|
366 |
-
|
|
|
|
|
|
|
|
|
367 |
|
368 |
-
|
369 |
-
if ( empty( $_POST['bbp_forum_id'] ) )
|
370 |
-
$bbp->errors->add( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
|
371 |
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
|
376 |
-
|
377 |
-
|
|
|
|
|
378 |
|
379 |
-
|
380 |
-
|
381 |
-
|
|
|
|
|
382 |
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
}
|
395 |
|
396 |
-
|
|
|
|
|
|
|
397 |
|
398 |
-
|
399 |
-
$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) );
|
400 |
|
401 |
-
|
402 |
-
$topic_title =
|
403 |
|
404 |
-
|
405 |
-
|
406 |
-
$bbp->errors->add( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
|
407 |
|
408 |
-
|
|
|
|
|
409 |
|
410 |
-
|
411 |
-
$topic_content = $_POST['bbp_topic_content'];
|
412 |
|
413 |
-
|
414 |
-
$topic_content =
|
415 |
|
416 |
-
|
417 |
-
|
418 |
-
$bbp->errors->add( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
|
419 |
|
420 |
-
|
|
|
|
|
421 |
|
422 |
-
|
423 |
-
if ( !empty( $_POST['bbp_topic_tags'] ) ) {
|
424 |
|
425 |
-
|
426 |
-
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
$terms = explode( ',', $terms );
|
431 |
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
|
436 |
-
|
|
|
|
|
437 |
|
438 |
-
|
439 |
|
440 |
-
|
441 |
|
442 |
-
|
443 |
|
444 |
-
|
445 |
|
446 |
-
|
447 |
|
448 |
-
|
449 |
-
switch ( $_POST['bbp_stick_topic'] ) {
|
450 |
|
451 |
-
|
452 |
-
|
453 |
-
bbp_stick_topic( $topic_id );
|
454 |
-
break;
|
455 |
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
467 |
}
|
|
|
468 |
|
469 |
-
|
470 |
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
|
480 |
-
|
481 |
-
|
482 |
|
483 |
-
|
484 |
-
|
485 |
|
486 |
-
|
487 |
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
|
502 |
-
|
503 |
|
504 |
-
|
505 |
|
506 |
-
|
507 |
-
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
|
515 |
-
|
516 |
|
517 |
-
|
518 |
|
519 |
-
|
520 |
|
521 |
-
|
522 |
-
|
523 |
|
524 |
-
|
525 |
-
|
526 |
|
527 |
-
|
528 |
-
|
529 |
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
|
534 |
-
|
535 |
-
|
536 |
|
537 |
-
|
538 |
|
539 |
-
|
540 |
-
|
541 |
|
542 |
-
|
543 |
-
|
544 |
|
545 |
-
|
546 |
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
}
|
551 |
}
|
552 |
}
|
553 |
}
|
@@ -579,7 +670,7 @@ function bbp_edit_topic_handler() {
|
|
579 |
* @uses bbp_update_topic_last_active_id() To update the topic last active id
|
580 |
* @uses bbp_update_topic_last_active_time() To update the last active topic meta
|
581 |
* @uses bbp_update_topic_reply_count() To update the topic reply count
|
582 |
-
* @uses
|
583 |
* @uses bbp_update_topic_voice_count() To update the topic voice count
|
584 |
* @uses bbp_update_topic_walker() To udpate the topic's ancestors
|
585 |
*/
|
@@ -650,7 +741,7 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = false
|
|
650 |
bbp_update_topic_last_active_id ( $topic_id, $topic_id );
|
651 |
bbp_update_topic_last_active_time ( $topic_id, $last_active );
|
652 |
bbp_update_topic_reply_count ( $topic_id, 0 );
|
653 |
-
|
654 |
bbp_update_topic_voice_count ( $topic_id );
|
655 |
|
656 |
// Walk up ancestors and do the dirty work
|
@@ -679,11 +770,15 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = false
|
|
679 |
function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id = 0, $reply_id = 0, $refresh = true ) {
|
680 |
|
681 |
// Validate topic_id
|
682 |
-
|
|
|
|
|
|
|
683 |
|
684 |
// Get the forum ID if none was passed
|
685 |
-
if ( empty( $forum_id ) )
|
686 |
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
|
|
687 |
|
688 |
// Set the active_id based on topic_id/reply_id
|
689 |
$active_id = empty( $reply_id ) ? $topic_id : $reply_id;
|
@@ -825,183 +920,192 @@ function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
|
|
825 |
*/
|
826 |
function bbp_merge_topic_handler() {
|
827 |
|
828 |
-
//
|
829 |
-
if ( 'POST'
|
830 |
-
|
831 |
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
$subscribers = $favoriters = $replies = array();
|
836 |
|
837 |
-
|
|
|
|
|
|
|
838 |
|
839 |
-
|
840 |
-
if ( empty( $_POST['bbp_topic_id'] ) )
|
841 |
-
$bbp->errors->add( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
|
842 |
-
else
|
843 |
-
$source_topic_id = (int) $_POST['bbp_topic_id'];
|
844 |
|
845 |
-
|
846 |
-
|
|
|
|
|
|
|
847 |
|
848 |
-
|
849 |
-
|
850 |
-
$bbp->errors->add( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
|
851 |
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
|
856 |
-
|
|
|
|
|
857 |
|
858 |
-
|
859 |
-
if ( empty( $_POST['bbp_destination_topic'] ) )
|
860 |
-
$bbp->errors->add( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
|
861 |
-
else
|
862 |
-
$destination_topic_id = (int) $_POST['bbp_destination_topic'];
|
863 |
|
864 |
-
|
865 |
-
|
866 |
-
|
|
|
|
|
867 |
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
|
872 |
-
|
|
|
|
|
873 |
|
874 |
-
|
875 |
|
876 |
-
|
877 |
-
do_action( 'bbp_merge_topic', $destination_topic->ID, $source_topic->ID );
|
878 |
|
879 |
-
|
|
|
880 |
|
881 |
-
|
882 |
-
if ( strtotime( $source_topic->post_date ) < strtotime( $destination_topic->post_date ) ) {
|
883 |
|
884 |
-
|
885 |
-
|
886 |
|
887 |
-
|
888 |
-
|
889 |
-
'post_date' => $destination_post_date,
|
890 |
-
'post_date_gmt' => get_gmt_from_date( $destination_post_date )
|
891 |
-
);
|
892 |
|
893 |
-
|
894 |
-
|
895 |
-
|
|
|
|
|
896 |
|
897 |
-
|
|
|
|
|
898 |
|
899 |
-
|
900 |
-
if ( $subscribers = bbp_get_topic_subscribers( $source_topic->ID ) ) {
|
901 |
|
902 |
-
|
903 |
-
|
904 |
|
905 |
-
|
906 |
-
|
907 |
-
bbp_add_user_subscription( $subscriber, $destination_topic->ID );
|
908 |
|
909 |
-
|
910 |
-
|
911 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
}
|
|
|
913 |
|
914 |
-
|
915 |
|
916 |
-
|
917 |
-
|
918 |
|
919 |
-
|
920 |
-
|
921 |
|
922 |
-
|
923 |
-
|
924 |
-
bbp_add_user_favorite( $favoriter, $destination_topic->ID );
|
925 |
|
926 |
-
|
927 |
-
|
928 |
-
|
|
|
|
|
|
|
929 |
}
|
|
|
930 |
|
931 |
-
|
932 |
|
933 |
-
|
934 |
-
|
935 |
|
936 |
-
|
937 |
-
|
938 |
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
|
947 |
-
|
948 |
|
949 |
-
|
950 |
-
|
951 |
|
952 |
-
|
953 |
-
|
954 |
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
|
963 |
-
|
964 |
-
|
965 |
|
966 |
-
|
967 |
|
968 |
-
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
|
981 |
-
|
982 |
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
}
|
990 |
}
|
|
|
991 |
|
992 |
-
|
993 |
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
|
999 |
-
|
1000 |
-
|
1001 |
|
1002 |
-
|
1003 |
-
|
1004 |
-
}
|
1005 |
}
|
1006 |
}
|
1007 |
|
@@ -1020,7 +1124,7 @@ function bbp_merge_topic_handler() {
|
|
1020 |
* @uses bbp_update_forum_reply_count() To update the forum reply counts
|
1021 |
* @uses bbp_update_topic_reply_count() To update the topic reply counts
|
1022 |
* @uses bbp_update_topic_voice_count() To update the topic voice counts
|
1023 |
-
* @uses
|
1024 |
* count
|
1025 |
* @uses do_action() Calls 'bbp_merge_topic_count' with the destination topic
|
1026 |
* id, source topic id & source topic forum id
|
@@ -1041,7 +1145,7 @@ function bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source
|
|
1041 |
bbp_update_topic_reply_count( $destination_topic_id );
|
1042 |
|
1043 |
// Topic Hidden Reply Counts
|
1044 |
-
|
1045 |
|
1046 |
// Topic Voice Counts
|
1047 |
bbp_update_topic_voice_count( $destination_topic_id );
|
@@ -1089,228 +1193,242 @@ function bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source
|
|
1089 |
*/
|
1090 |
function bbp_split_topic_handler() {
|
1091 |
|
1092 |
-
//
|
1093 |
-
if (
|
1094 |
-
|
|
|
|
|
|
|
|
|
1095 |
|
1096 |
-
|
1097 |
-
$from_reply_id = $destination_topic_id = 0;
|
1098 |
-
$destination_topic_title = '';
|
1099 |
-
$destination_topic = $from_reply = $source_topic = '';
|
1100 |
-
$split_option = false;
|
1101 |
|
1102 |
-
|
|
|
|
|
|
|
|
|
1103 |
|
1104 |
-
|
1105 |
-
$bbp->errors->add( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: Reply ID to split the topic from not found!', 'bbpress' ) );
|
1106 |
-
else
|
1107 |
-
$from_reply_id = (int) $_POST['bbp_reply_id'];
|
1108 |
|
1109 |
-
|
|
|
|
|
|
|
1110 |
|
1111 |
-
|
1112 |
-
if ( empty( $from_reply ) )
|
1113 |
-
$bbp->errors->add( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
|
1114 |
|
1115 |
-
|
|
|
|
|
1116 |
|
1117 |
-
|
1118 |
-
$source_topic = bbp_get_topic( $from_reply->post_parent );
|
1119 |
|
1120 |
-
|
1121 |
-
|
1122 |
-
$bbp->errors->add( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
|
1123 |
|
1124 |
-
|
1125 |
-
|
|
|
1126 |
|
1127 |
-
|
1128 |
-
|
1129 |
-
$bbp->errors->add( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
|
1130 |
|
1131 |
-
|
|
|
|
|
1132 |
|
1133 |
-
|
1134 |
-
$split_option = (string) trim( $_POST['bbp_topic_split_option'] );
|
1135 |
|
1136 |
-
|
1137 |
-
|
1138 |
-
$bbp->errors->add( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
|
1139 |
|
1140 |
-
|
1141 |
-
|
|
|
1142 |
|
1143 |
-
|
1144 |
-
|
1145 |
|
1146 |
-
|
1147 |
-
|
1148 |
|
1149 |
-
|
1150 |
-
|
1151 |
-
$bbp->errors->add( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found!', 'bbpress' ) );
|
1152 |
-
else
|
1153 |
-
$destination_topic_id = (int) $_POST['bbp_destination_topic'];
|
1154 |
|
1155 |
-
|
1156 |
-
|
|
|
|
|
|
|
1157 |
|
1158 |
-
|
1159 |
-
|
1160 |
-
$bbp->errors->add( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found!', 'bbpress' ) );
|
1161 |
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
|
1166 |
-
|
|
|
|
|
1167 |
|
1168 |
-
|
1169 |
-
case 'reply' :
|
1170 |
-
default :
|
1171 |
|
1172 |
-
|
1173 |
-
|
|
|
1174 |
|
1175 |
-
|
1176 |
-
|
1177 |
-
$destination_topic_title = esc_attr( strip_tags( $_POST['bbp_topic_split_destination_title'] ) );
|
1178 |
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
'post_name' => false,
|
1188 |
-
'post_type' => bbp_get_topic_post_type(),
|
1189 |
-
'post_parent' => $source_topic->post_parent,
|
1190 |
-
'guid' => ''
|
1191 |
-
);
|
1192 |
|
1193 |
-
|
1194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1195 |
|
1196 |
-
|
1197 |
-
|
|
|
1198 |
|
1199 |
-
|
1200 |
-
|
1201 |
-
$bbp->errors->add( 'bbp_split_topic_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
|
1202 |
|
1203 |
-
//
|
1204 |
-
|
1205 |
-
|
1206 |
}
|
1207 |
|
1208 |
-
|
1209 |
-
|
|
|
|
|
|
|
|
|
1210 |
}
|
|
|
1211 |
|
1212 |
-
|
1213 |
|
1214 |
-
|
1215 |
|
1216 |
-
|
1217 |
-
|
1218 |
|
1219 |
-
|
1220 |
|
1221 |
-
|
1222 |
-
|
1223 |
|
1224 |
-
|
1225 |
-
|
1226 |
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
|
|
1231 |
}
|
1232 |
}
|
|
|
1233 |
|
1234 |
-
|
1235 |
|
1236 |
-
|
1237 |
-
|
1238 |
|
1239 |
-
|
1240 |
-
|
1241 |
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
|
|
1246 |
}
|
1247 |
}
|
|
|
1248 |
|
1249 |
-
|
1250 |
|
1251 |
-
|
1252 |
-
|
1253 |
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
|
|
1258 |
}
|
|
|
1259 |
|
1260 |
-
|
1261 |
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
|
1266 |
-
|
1267 |
-
|
1268 |
|
1269 |
-
|
1270 |
-
|
1271 |
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
|
1281 |
-
|
1282 |
-
|
1283 |
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
|
1288 |
-
|
1289 |
-
|
1290 |
-
}
|
1291 |
}
|
|
|
1292 |
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
|
1303 |
-
|
1304 |
|
1305 |
-
|
1306 |
-
|
1307 |
|
1308 |
-
|
1309 |
-
|
1310 |
|
1311 |
-
|
1312 |
-
|
1313 |
-
}
|
1314 |
}
|
1315 |
}
|
1316 |
|
@@ -1329,7 +1447,7 @@ function bbp_split_topic_handler() {
|
|
1329 |
* @uses bbp_update_forum_reply_count() To update the forum reply counts
|
1330 |
* @uses bbp_update_topic_reply_count() To update the topic reply counts
|
1331 |
* @uses bbp_update_topic_voice_count() To update the topic voice counts
|
1332 |
-
* @uses
|
1333 |
* count
|
1334 |
* @uses do_action() Calls 'bbp_split_topic_count' with the from reply id,
|
1335 |
* source topic id & destination topic id
|
@@ -1347,8 +1465,8 @@ function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_t
|
|
1347 |
bbp_update_topic_reply_count( $destination_topic_id );
|
1348 |
|
1349 |
// Topic Hidden Reply Counts
|
1350 |
-
|
1351 |
-
|
1352 |
|
1353 |
// Topic Voice Counts
|
1354 |
bbp_update_topic_voice_count( $source_topic_id );
|
@@ -1377,154 +1495,167 @@ function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_t
|
|
1377 |
*/
|
1378 |
function bbp_manage_topic_tag_handler() {
|
1379 |
|
1380 |
-
//
|
1381 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
1382 |
|
1383 |
-
|
|
|
|
|
|
|
|
|
|
|
1384 |
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
$tag = get_term( $tag_id, $bbp->topic_tag_id );
|
1389 |
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
}
|
1395 |
|
1396 |
-
|
1397 |
-
|
|
|
|
|
|
|
1398 |
|
1399 |
-
|
1400 |
-
|
1401 |
|
1402 |
-
|
1403 |
-
|
1404 |
|
1405 |
-
|
1406 |
-
|
1407 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_update_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
|
1408 |
-
return;
|
1409 |
-
}
|
1410 |
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
|
|
|
|
1420 |
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
return;
|
1425 |
-
}
|
1426 |
|
1427 |
-
|
1428 |
-
|
|
|
|
|
|
|
1429 |
|
1430 |
-
|
1431 |
-
|
1432 |
|
1433 |
-
|
|
|
1434 |
|
1435 |
-
|
1436 |
-
case 'bbp-merge-topic-tag' :
|
1437 |
|
1438 |
-
|
1439 |
-
|
1440 |
|
1441 |
-
|
1442 |
-
|
1443 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_merge_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
|
1444 |
-
return;
|
1445 |
-
}
|
1446 |
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
|
|
|
|
1456 |
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
return;
|
1461 |
-
}
|
1462 |
|
1463 |
-
|
1464 |
-
|
|
|
|
|
|
|
1465 |
|
1466 |
-
|
1467 |
-
|
1468 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
|
1469 |
-
return;
|
1470 |
-
}
|
1471 |
|
1472 |
-
|
1473 |
-
|
|
|
|
|
|
|
1474 |
|
1475 |
-
|
1476 |
-
|
1477 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1478 |
-
return;
|
1479 |
-
}
|
1480 |
|
1481 |
-
|
1482 |
-
|
|
|
|
|
|
|
1483 |
|
1484 |
-
|
1485 |
-
|
1486 |
|
1487 |
-
|
|
|
1488 |
|
1489 |
-
|
1490 |
-
case 'bbp-delete-topic-tag' :
|
1491 |
|
1492 |
-
|
1493 |
-
|
1494 |
|
1495 |
-
|
1496 |
-
|
1497 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_delete_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to delete the topic tags.', 'bbpress' ) );
|
1498 |
-
return;
|
1499 |
-
}
|
1500 |
|
1501 |
-
|
1502 |
-
|
|
|
|
|
|
|
1503 |
|
1504 |
-
|
1505 |
-
|
1506 |
-
$bbp->errors->add( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1507 |
-
return;
|
1508 |
-
}
|
1509 |
|
1510 |
-
|
1511 |
-
|
|
|
|
|
|
|
1512 |
|
1513 |
-
|
1514 |
-
|
1515 |
|
1516 |
-
|
1517 |
-
|
1518 |
|
1519 |
-
|
|
|
1520 |
|
1521 |
-
|
1522 |
-
$redirect = ( !empty( $redirect ) && !is_wp_error( $redirect ) ) ? $redirect : home_url();
|
1523 |
-
wp_redirect( $redirect );
|
1524 |
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
|
|
|
|
|
|
1528 |
}
|
1529 |
|
1530 |
/** Stickies ******************************************************************/
|
@@ -1598,119 +1729,141 @@ function bbp_get_super_stickies() {
|
|
1598 |
*/
|
1599 |
function bbp_toggle_topic_handler() {
|
1600 |
|
1601 |
-
//
|
1602 |
-
if (
|
1603 |
-
|
1604 |
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
$post_data = array( 'ID' => $topic_id ); // Prelim array
|
1609 |
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
|
|
|
|
|
|
|
|
1613 |
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
return;
|
1618 |
-
}
|
1619 |
|
1620 |
-
|
1621 |
-
|
|
|
|
|
|
|
1622 |
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
|
|
|
|
1630 |
|
1631 |
-
|
|
|
1632 |
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
$failure = $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );
|
1641 |
|
1642 |
-
|
1643 |
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
|
|
1651 |
|
1652 |
-
|
1653 |
|
1654 |
-
|
1655 |
-
|
|
|
1656 |
|
1657 |
-
|
|
|
|
|
|
|
1658 |
|
1659 |
-
|
1660 |
-
break;
|
1661 |
|
1662 |
-
|
1663 |
-
|
1664 |
-
check_ajax_referer( 'trash-' . bbp_get_topic_post_type() . '_' . $topic_id );
|
1665 |
|
1666 |
-
|
1667 |
-
$failure = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
|
1668 |
|
1669 |
-
|
|
|
1670 |
|
1671 |
-
|
1672 |
-
|
|
|
1673 |
|
1674 |
-
|
1675 |
-
|
|
|
1676 |
|
1677 |
-
|
1678 |
|
1679 |
-
|
1680 |
-
|
1681 |
|
1682 |
-
|
1683 |
-
|
1684 |
|
1685 |
-
|
1686 |
-
}
|
1687 |
|
1688 |
-
|
1689 |
-
|
1690 |
|
1691 |
-
|
1692 |
-
|
1693 |
|
1694 |
-
|
1695 |
-
|
1696 |
|
1697 |
-
|
1698 |
-
|
1699 |
-
$redirect = bbp_get_forum_permalink( $success->post_parent );
|
1700 |
|
1701 |
-
|
1702 |
-
|
1703 |
-
$redirect = bbp_add_view_all( bbp_get_topic_permalink( $topic_id ) );
|
1704 |
|
1705 |
-
|
|
|
1706 |
|
1707 |
-
|
1708 |
-
|
|
|
1709 |
|
1710 |
-
//
|
1711 |
} else {
|
1712 |
-
|
|
|
|
|
|
|
1713 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1714 |
}
|
1715 |
}
|
1716 |
|
@@ -1886,11 +2039,11 @@ function bbp_update_topic_reply_count( $topic_id = 0, $reply_count = 0 ) {
|
|
1886 |
* @uses wpdb::prepare() To prepare our sql query
|
1887 |
* @uses wpdb::get_var() To execute our query and get the var back
|
1888 |
* @uses update_post_meta() To update the topic hidden reply count meta
|
1889 |
-
* @uses apply_filters() Calls '
|
1890 |
* hidden reply count and topic id
|
1891 |
* @return int Topic hidden reply count
|
1892 |
*/
|
1893 |
-
function
|
1894 |
global $wpdb, $bbp;
|
1895 |
|
1896 |
// If it's a reply, then get the parent (topic id)
|
@@ -1903,9 +2056,9 @@ function bbp_update_topic_hidden_reply_count( $topic_id = 0, $reply_count = 0 )
|
|
1903 |
if ( empty( $reply_count ) )
|
1904 |
$reply_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array( $bbp->trash_status_id, $bbp->spam_status_id ) ) . "') AND post_type = '%s';", $topic_id, bbp_get_reply_post_type() ) );
|
1905 |
|
1906 |
-
update_post_meta( $topic_id, '
|
1907 |
|
1908 |
-
return apply_filters( '
|
1909 |
}
|
1910 |
|
1911 |
/**
|
@@ -2514,9 +2667,12 @@ function bbp_untrash_topic( $topic_id = 0 ) {
|
|
2514 |
do_action( 'bbp_untrash_topic', $topic_id );
|
2515 |
|
2516 |
// Loop through and restore pre trashed replies to this topic
|
2517 |
-
|
2518 |
-
|
|
|
|
|
2519 |
wp_untrash_post( $reply );
|
|
|
2520 |
}
|
2521 |
}
|
2522 |
|
@@ -2579,7 +2735,7 @@ function bbp_untrashed_topic( $topic_id = 0 ) {
|
|
2579 |
*
|
2580 |
* @global bbPress $bbp
|
2581 |
*
|
2582 |
-
* @uses
|
2583 |
* @uses bbp_user_can_view_forum()
|
2584 |
* @uses bbp_get_topic_forum_id()
|
2585 |
* @uses bbp_show_load_topic()
|
@@ -2605,8 +2761,8 @@ function bbp_untrashed_topic( $topic_id = 0 ) {
|
|
2605 |
function bbp_display_topics_feed_rss2( $topics_query = array() ) {
|
2606 |
global $bbp;
|
2607 |
|
2608 |
-
// User cannot access
|
2609 |
-
if (
|
2610 |
return;
|
2611 |
|
2612 |
// Display the feed
|
@@ -2630,7 +2786,7 @@ function bbp_display_topics_feed_rss2( $topics_query = array() ) {
|
|
2630 |
<link><?php self_link(); ?></link>
|
2631 |
<description><?php //?></description>
|
2632 |
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
|
2633 |
-
<generator>http://bbpress.org/?v=<?php echo
|
2634 |
<language><?php echo get_option( 'rss_language' ); ?></language>
|
2635 |
|
2636 |
<?php do_action( 'bbp_feed_head' ); ?>
|
10 |
// Exit if accessed directly
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
+
/** Insert ********************************************************************/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* A wrapper for wp_insert_post() that also includes the necessary meta values
|
17 |
+
* for the topic to function properly.
|
18 |
+
*
|
19 |
+
* @since bbPress (r3349)
|
20 |
+
*
|
21 |
+
* @uses wp_parse_args()
|
22 |
+
* @uses bbp_get_topic_post_type()
|
23 |
+
* @uses wp_insert_post()
|
24 |
+
* @uses update_post_meta()
|
25 |
+
*
|
26 |
+
* @param array $topic_data Forum post data
|
27 |
+
* @param arrap $topic_meta Forum meta data
|
28 |
+
*/
|
29 |
+
function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
|
30 |
+
|
31 |
+
// Forum
|
32 |
+
$default_topic = array(
|
33 |
+
'post_parent' => 0, // forum ID
|
34 |
+
'post_status' => 'publish',
|
35 |
+
'post_type' => bbp_get_topic_post_type(),
|
36 |
+
'post_author' => 0,
|
37 |
+
'post_password' => '',
|
38 |
+
'post_content' => '',
|
39 |
+
'post_title' => '',
|
40 |
+
'menu_order' => 0,
|
41 |
+
);
|
42 |
+
|
43 |
+
// Parse args
|
44 |
+
$topic_data = wp_parse_args( $topic_data, $default_topic );
|
45 |
+
|
46 |
+
// Insert topic
|
47 |
+
$topic_id = wp_insert_post( $topic_data );
|
48 |
+
|
49 |
+
// Bail if no topic was added
|
50 |
+
if ( empty( $topic_id ) )
|
51 |
+
return false;
|
52 |
+
|
53 |
+
// Forum meta
|
54 |
+
$default_meta = array(
|
55 |
+
'author_ip' => bbp_current_author_ip(),
|
56 |
+
'forum_id' => 0,
|
57 |
+
'topic_id' => $topic_id,
|
58 |
+
'voice_count' => 1,
|
59 |
+
'reply_count' => 0,
|
60 |
+
'reply_count_hidden' => 0,
|
61 |
+
'last_reply_id' => 0,
|
62 |
+
'last_active_id' => $topic_id,
|
63 |
+
'last_active_time' => get_post_field( 'post_date', $topic_id, 'db' ),
|
64 |
+
);
|
65 |
+
|
66 |
+
// Parse args
|
67 |
+
$topic_meta = wp_parse_args( $topic_meta, $default_meta );
|
68 |
+
|
69 |
+
// Insert topic meta
|
70 |
+
foreach ( $topic_meta as $meta_key => $meta_value )
|
71 |
+
update_post_meta( $topic_id, '_bbp_' . $meta_key, $meta_value );
|
72 |
+
|
73 |
+
// Update the forum
|
74 |
+
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
75 |
+
if ( !empty( $forum_id ) )
|
76 |
+
bbp_update_forum( $forum_id );
|
77 |
+
|
78 |
+
// Return new topic ID
|
79 |
+
return $topic_id;
|
80 |
+
}
|
81 |
+
|
82 |
/** Post Form Handlers ********************************************************/
|
83 |
|
84 |
/**
|
115 |
*/
|
116 |
function bbp_new_topic_handler() {
|
117 |
|
118 |
+
// Bail if not a POST action
|
119 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
120 |
+
return;
|
121 |
|
122 |
+
// Bail if action is not bbp-new-topic
|
123 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-new-topic' !== $_POST['action'] ) )
|
124 |
+
return;
|
125 |
|
126 |
+
global $bbp;
|
|
|
|
|
|
|
127 |
|
128 |
+
// Nonce check
|
129 |
+
check_admin_referer( 'bbp-new-topic' );
|
130 |
|
131 |
+
// Define local variable(s)
|
132 |
+
$view_all = false;
|
133 |
+
$forum_id = $topic_author = $anonymous_data = 0;
|
134 |
+
$topic_title = $topic_content = '';
|
135 |
+
$terms = array( bbp_get_topic_tag_tax_id() => array() );
|
136 |
|
137 |
+
/** Topic Author ******************************************************/
|
|
|
138 |
|
139 |
+
// User is anonymous
|
140 |
+
if ( bbp_is_anonymous() ) {
|
|
|
|
|
141 |
|
142 |
+
// Filter anonymous data
|
143 |
+
$anonymous_data = bbp_filter_anonymous_post_data();
|
144 |
|
145 |
+
// Anonymous data checks out, so set cookies, etc...
|
146 |
+
if ( !empty( $anonymous_data ) && is_array( $anonymous_data ) ) {
|
147 |
+
bbp_set_current_anonymous_user_data( $anonymous_data );
|
148 |
+
}
|
149 |
|
150 |
+
// User is logged in
|
151 |
+
} else {
|
152 |
|
153 |
+
// User cannot create topics
|
154 |
+
if ( !current_user_can( 'publish_topics' ) ) {
|
155 |
+
bbp_add_error( 'bbp_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );
|
156 |
}
|
157 |
|
158 |
+
// Topic author is current user
|
159 |
+
$topic_author = bbp_get_current_user_id();
|
|
|
|
|
|
|
160 |
|
161 |
+
}
|
162 |
|
163 |
+
// Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
|
164 |
+
if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && wp_create_nonce( 'bbp-unfiltered-html-topic_new' ) == $_POST['_bbp_unfiltered_html_topic'] ) {
|
165 |
+
remove_filter( 'bbp_new_topic_pre_title', 'wp_filter_kses' );
|
166 |
+
remove_filter( 'bbp_new_topic_pre_content', 'wp_filter_kses' );
|
167 |
+
}
|
168 |
|
169 |
+
/** Topic Title *******************************************************/
|
|
|
170 |
|
171 |
+
if ( !empty( $_POST['bbp_topic_title'] ) )
|
172 |
+
$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) );
|
|
|
173 |
|
174 |
+
// Filter and sanitize
|
175 |
+
$topic_title = apply_filters( 'bbp_new_topic_pre_title', $topic_title );
|
176 |
|
177 |
+
// No topic title
|
178 |
+
if ( empty( $topic_title ) )
|
179 |
+
bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
|
180 |
|
181 |
+
/** Topic Content *****************************************************/
|
|
|
182 |
|
183 |
+
if ( !empty( $_POST['bbp_topic_content'] ) )
|
184 |
+
$topic_content = $_POST['bbp_topic_content'];
|
|
|
185 |
|
186 |
+
// Filter and sanitize
|
187 |
+
$topic_content = apply_filters( 'bbp_new_topic_pre_content', $topic_content );
|
188 |
|
189 |
+
// No topic content
|
190 |
+
if ( empty( $topic_content ) )
|
191 |
+
bbp_add_error( 'bbp_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
|
192 |
|
193 |
+
/** Topic Forum *******************************************************/
|
|
|
|
|
194 |
|
195 |
+
// Forum id was not passed
|
196 |
+
if ( empty( $_POST['bbp_forum_id'] ) )
|
197 |
+
bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
|
198 |
|
199 |
+
// Forum id was passed
|
200 |
+
elseif ( is_numeric( $_POST['bbp_forum_id'] ) )
|
201 |
+
$forum_id = (int) $_POST['bbp_forum_id'];
|
202 |
|
203 |
+
// Forum exists
|
204 |
+
if ( !empty( $forum_id ) ) {
|
|
|
205 |
|
206 |
+
// Forum is a category
|
207 |
+
if ( bbp_is_forum_category( $forum_id ) )
|
208 |
+
bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
|
209 |
|
210 |
+
// Forum is closed and user cannot access
|
211 |
+
if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) )
|
212 |
+
bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
|
|
|
213 |
|
214 |
+
// Forum is private and user cannot access
|
215 |
+
if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) )
|
216 |
+
bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
|
217 |
|
218 |
+
// Forum is hidden and user cannot access
|
219 |
+
if ( bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) )
|
220 |
+
bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
|
221 |
+
}
|
222 |
|
223 |
+
/** Topic Flooding ****************************************************/
|
224 |
|
225 |
+
if ( !bbp_check_for_flood( $anonymous_data, $topic_author ) )
|
226 |
+
bbp_add_error( 'bbp_topic_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
|
227 |
|
228 |
+
/** Topic Duplicate ***************************************************/
|
229 |
|
230 |
+
if ( !bbp_check_for_duplicate( array( 'post_type' => bbp_get_topic_post_type(), 'post_author' => $topic_author, 'post_content' => $topic_content, 'anonymous_data' => $anonymous_data ) ) )
|
231 |
+
bbp_add_error( 'bbp_topic_duplicate', __( '<strong>ERROR</strong>: Duplicate topic detected; it looks as though you’ve already said that!', 'bbpress' ) );
|
232 |
|
233 |
+
/** Topic Tags ********************************************************/
|
|
|
234 |
|
235 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) ) {
|
|
|
|
|
236 |
|
237 |
+
// Escape tag input
|
238 |
+
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
|
|
239 |
|
240 |
+
// Explode by comma
|
241 |
+
if ( strstr( $terms, ',' ) )
|
242 |
+
$terms = explode( ',', $terms );
|
243 |
|
244 |
+
// Add topic tag ID as main key
|
245 |
+
$terms = array( bbp_get_topic_tag_tax_id() => $terms );
|
246 |
+
}
|
247 |
|
248 |
+
/** Additional Actions (Before Save) **********************************/
|
249 |
|
250 |
+
do_action( 'bbp_new_topic_pre_extras' );
|
251 |
|
252 |
+
/** No Errors *********************************************************/
|
253 |
|
254 |
+
if ( !bbp_has_errors() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
|
256 |
+
/** Create new topic **********************************************/
|
|
|
257 |
|
258 |
+
// Add the content of the form to $post as an array
|
259 |
+
$topic_data = array(
|
260 |
+
'post_author' => $topic_author,
|
261 |
+
'post_title' => $topic_title,
|
262 |
+
'post_content' => $topic_content,
|
263 |
+
'post_parent' => $forum_id,
|
264 |
+
'tax_input' => $terms,
|
265 |
+
'post_status' => 'publish',
|
266 |
+
'post_type' => bbp_get_topic_post_type()
|
267 |
+
);
|
268 |
|
269 |
+
// Just in time manipulation of topic data before being created
|
270 |
+
$topic_data = apply_filters( 'bbp_new_topic_pre_insert', $topic_data );
|
271 |
|
272 |
+
// Insert topic
|
273 |
+
$topic_id = wp_insert_post( $topic_data );
|
274 |
|
275 |
+
/** No Errors *****************************************************/
|
276 |
|
277 |
+
if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
|
278 |
|
279 |
+
/** Stickies **************************************************/
|
|
|
280 |
|
281 |
+
if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
|
|
|
|
|
|
|
282 |
|
283 |
+
// What's the haps?
|
284 |
+
switch ( $_POST['bbp_stick_topic'] ) {
|
|
|
|
|
285 |
|
286 |
+
// Sticky in this forum
|
287 |
+
case 'stick' :
|
288 |
+
bbp_stick_topic( $topic_id );
|
289 |
+
break;
|
290 |
+
|
291 |
+
// Super sticky in all forums
|
292 |
+
case 'super' :
|
293 |
+
bbp_stick_topic( $topic_id, true );
|
294 |
+
break;
|
295 |
+
|
296 |
+
// We can avoid this as it is a new topic
|
297 |
+
case 'unstick' :
|
298 |
+
default :
|
299 |
+
break;
|
300 |
}
|
301 |
+
}
|
302 |
|
303 |
+
/** Trash Check ***********************************************/
|
304 |
|
305 |
+
// If the forum is trash, or the topic_status is switched to
|
306 |
+
// trash, trash it properly
|
307 |
+
if ( ( get_post_field( 'post_status', $forum_id ) == $bbp->trash_status_id ) || ( $topic_data['post_status'] == $bbp->trash_status_id ) ) {
|
308 |
|
309 |
+
// Trash the reply
|
310 |
+
wp_trash_post( $topic_id );
|
|
|
311 |
|
312 |
+
// Force view=all
|
313 |
+
$view_all = true;
|
314 |
+
}
|
|
|
|
|
315 |
|
316 |
+
/** Spam Check ************************************************/
|
317 |
|
318 |
+
// If reply or topic are spam, officially spam this reply
|
319 |
+
if ( $topic_data['post_status'] == $bbp->spam_status_id ) {
|
320 |
+
add_post_meta( $topic_id, '_bbp_spam_meta_status', 'publish' );
|
321 |
|
322 |
+
// Force view=all
|
323 |
+
$view_all = true;
|
324 |
+
}
|
325 |
|
326 |
+
/** Update counts, etc... *************************************/
|
|
|
327 |
|
328 |
+
do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );
|
|
|
329 |
|
330 |
+
/** Redirect **************************************************/
|
|
|
|
|
331 |
|
332 |
+
// Redirect to
|
333 |
+
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
334 |
|
335 |
+
// Get the topic URL
|
336 |
+
$topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
|
337 |
|
338 |
+
// Add view all?
|
339 |
+
if ( bbp_get_view_all() || ( current_user_can( 'moderate' ) && !empty( $view_all ) ) )
|
340 |
+
$topic_url = bbp_add_view_all( $topic_url );
|
341 |
|
342 |
+
// Allow to be filtered
|
343 |
+
$topic_url = apply_filters( 'bbp_new_topic_redirect_to', $topic_url, $redirect_to );
|
344 |
|
345 |
+
/** Successful Save *******************************************/
|
346 |
+
|
347 |
+
// Redirect back to new topic
|
348 |
+
wp_safe_redirect( $topic_url );
|
349 |
+
|
350 |
+
// For good measure
|
351 |
+
exit();
|
352 |
+
|
353 |
+
// Errors
|
354 |
+
} else {
|
355 |
+
$append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : '';
|
356 |
+
bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your topic:' . $append_error, 'bbpress' ) );
|
357 |
}
|
358 |
}
|
359 |
}
|
394 |
*/
|
395 |
function bbp_edit_topic_handler() {
|
396 |
|
397 |
+
// Bail if not a POST action
|
398 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
399 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
400 |
|
401 |
+
// Bail if action is not bbp-edit-topic
|
402 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-edit-topic' !== $_POST['action'] ) )
|
403 |
+
return;
|
404 |
|
405 |
+
// Define local variable(s)
|
406 |
+
$topic = $topic_id = $forum_id = $anonymous_data = 0;
|
407 |
+
$topic_title = $topic_content = $topic_edit_reason = '';
|
408 |
+
$terms = array( bbp_get_topic_tag_tax_id() => array() );
|
409 |
|
410 |
+
/** Topic *************************************************************/
|
|
|
|
|
411 |
|
412 |
+
// Topic id was not passed
|
413 |
+
if ( empty( $_POST['bbp_topic_id'] ) ) {
|
414 |
+
bbp_add_error( 'bbp_edit_topic_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
|
415 |
|
416 |
+
// Topic id was passed
|
417 |
+
} elseif ( is_numeric( $_POST['bbp_topic_id'] ) ) {
|
418 |
+
$topic_id = (int) $_POST['bbp_topic_id'];
|
419 |
+
$topic = bbp_get_topic( $topic_id );
|
420 |
+
}
|
421 |
|
422 |
+
// Topic does not exist
|
423 |
+
if ( empty( $topic ) ) {
|
424 |
+
bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>ERROR</strong>: The topic you want to edit was not found.', 'bbpress' ) );
|
425 |
|
426 |
+
// Topic exists
|
427 |
+
} else {
|
428 |
|
429 |
+
// Nonce check
|
430 |
+
check_admin_referer( 'bbp-edit-topic_' . $topic_id );
|
|
|
|
|
431 |
|
432 |
+
// Check users ability to create new topic
|
433 |
+
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
|
434 |
|
435 |
+
// User cannot edit this topic
|
436 |
+
if ( !current_user_can( 'edit_topic', $topic_id ) ) {
|
437 |
+
bbp_add_error( 'bbp_edit_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
|
438 |
}
|
|
|
439 |
|
440 |
+
// It is an anonymous post
|
441 |
+
} else {
|
442 |
+
|
443 |
+
// Filter anonymous data
|
444 |
+
$anonymous_data = bbp_filter_anonymous_post_data( array(), true );
|
445 |
}
|
446 |
+
}
|
447 |
|
448 |
+
// Remove wp_filter_kses filters from title and content for capable users and if the nonce is verified
|
449 |
+
if ( current_user_can( 'unfiltered_html' ) && !empty( $_POST['_bbp_unfiltered_html_topic'] ) && ( wp_create_nonce( 'bbp-unfiltered-html-topic_' . $topic_id ) == $_POST['_bbp_unfiltered_html_topic'] ) ) {
|
450 |
+
remove_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
|
451 |
+
remove_filter( 'bbp_edit_topic_pre_content', 'wp_filter_kses' );
|
452 |
+
}
|
453 |
|
454 |
+
/** Topic Forum *******************************************************/
|
|
|
|
|
455 |
|
456 |
+
// Forum id was not passed
|
457 |
+
if ( empty( $_POST['bbp_forum_id'] ) ) {
|
458 |
+
bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
|
459 |
|
460 |
+
// Forum id was passed
|
461 |
+
} elseif ( is_numeric( $_POST['bbp_forum_id'] ) ) {
|
462 |
+
$forum_id = (int) $_POST['bbp_forum_id'];
|
463 |
+
}
|
464 |
|
465 |
+
// Current forum this topic is in
|
466 |
+
$current_forum_id = bbp_get_topic_forum_id( $topic_id );
|
467 |
+
|
468 |
+
// Forum exists
|
469 |
+
if ( !empty( $forum_id ) && ( $forum_id !== $current_forum_id ) ) {
|
470 |
|
471 |
+
// Forum is a category
|
472 |
+
if ( bbp_is_forum_category( $forum_id ) )
|
473 |
+
bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
|
474 |
|
475 |
+
// Forum is closed and user cannot access
|
476 |
+
if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) )
|
477 |
+
bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
|
478 |
|
479 |
+
// Forum is private and user cannot access
|
480 |
+
if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) )
|
481 |
+
bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
|
|
|
482 |
|
483 |
+
// Forum is hidden and user cannot access
|
484 |
+
if ( bbp_is_forum_hidden( $forum_id ) && !current_user_can( 'read_hidden_forums' ) )
|
485 |
+
bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
|
486 |
+
}
|
487 |
|
488 |
+
/** Topic Title *******************************************************/
|
|
|
489 |
|
490 |
+
if ( !empty( $_POST['bbp_topic_title'] ) )
|
491 |
+
$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) );
|
492 |
|
493 |
+
// Filter and sanitize
|
494 |
+
$topic_title = apply_filters( 'bbp_edit_topic_pre_title', $topic_title, $topic_id );
|
|
|
495 |
|
496 |
+
// No topic title
|
497 |
+
if ( empty( $topic_title ) )
|
498 |
+
bbp_add_error( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
|
499 |
|
500 |
+
/** Topic Content *****************************************************/
|
|
|
501 |
|
502 |
+
if ( !empty( $_POST['bbp_topic_content'] ) )
|
503 |
+
$topic_content = $_POST['bbp_topic_content'];
|
504 |
|
505 |
+
// Filter and sanitize
|
506 |
+
$topic_content = apply_filters( 'bbp_edit_topic_pre_content', $topic_content, $topic_id );
|
|
|
507 |
|
508 |
+
// No topic content
|
509 |
+
if ( empty( $topic_content ) )
|
510 |
+
bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
|
511 |
|
512 |
+
/** Topic Tags ********************************************************/
|
|
|
513 |
|
514 |
+
// Tags
|
515 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) ) {
|
516 |
|
517 |
+
// Escape tag input
|
518 |
+
$terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) );
|
|
|
519 |
|
520 |
+
// Explode by comma
|
521 |
+
if ( strstr( $terms, ',' ) )
|
522 |
+
$terms = explode( ',', $terms );
|
523 |
|
524 |
+
// Add topic tag ID as main key
|
525 |
+
$terms = array( bbp_get_topic_tag_tax_id() => $terms );
|
526 |
+
}
|
527 |
|
528 |
+
/** Additional Actions (Before Save) **********************************/
|
529 |
|
530 |
+
do_action( 'bbp_edit_topic_pre_extras', $topic_id );
|
531 |
|
532 |
+
/** No Errors *********************************************************/
|
533 |
|
534 |
+
if ( !bbp_has_errors() ) {
|
535 |
|
536 |
+
/** Stickies ******************************************************/
|
537 |
|
538 |
+
if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) {
|
|
|
539 |
|
540 |
+
// What's the dilly?
|
541 |
+
switch ( $_POST['bbp_stick_topic'] ) {
|
|
|
|
|
542 |
|
543 |
+
// Sticky in forum
|
544 |
+
case 'stick' :
|
545 |
+
bbp_stick_topic( $topic_id );
|
546 |
+
break;
|
547 |
|
548 |
+
// Sticky in all forums
|
549 |
+
case 'super' :
|
550 |
+
bbp_stick_topic( $topic_id, true );
|
551 |
+
break;
|
552 |
+
|
553 |
+
// Normal
|
554 |
+
case 'unstick' :
|
555 |
+
default :
|
556 |
+
bbp_unstick_topic( $topic_id );
|
557 |
+
break;
|
558 |
}
|
559 |
+
}
|
560 |
|
561 |
+
/** Update the topic **********************************************/
|
562 |
|
563 |
+
// Add the content of the form to $post as an array
|
564 |
+
$topic_data = array(
|
565 |
+
'ID' => $topic_id,
|
566 |
+
'post_title' => $topic_title,
|
567 |
+
'post_content' => $topic_content,
|
568 |
+
'post_parent' => $forum_id,
|
569 |
+
'tax_input' => $terms,
|
570 |
+
);
|
571 |
|
572 |
+
// Just in time manipulation of topic data before being edited
|
573 |
+
$topic_data = apply_filters( 'bbp_edit_topic_pre_insert', $topic_data );
|
574 |
|
575 |
+
// Insert topic
|
576 |
+
$topic_id = wp_update_post( $topic_data );
|
577 |
|
578 |
+
/** Revisions *****************************************************/
|
579 |
|
580 |
+
// Revision Reason
|
581 |
+
if ( !empty( $_POST['bbp_topic_edit_reason'] ) )
|
582 |
+
$topic_edit_reason = esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) );
|
583 |
|
584 |
+
// Update revision log
|
585 |
+
if ( !empty( $_POST['bbp_log_topic_edit'] ) && ( 1 == $_POST['bbp_log_topic_edit'] ) && ( $revision_id = wp_save_post_revision( $topic_id ) ) ) {
|
586 |
+
bbp_update_topic_revision_log( array(
|
587 |
+
'topic_id' => $topic_id,
|
588 |
+
'revision_id' => $revision_id,
|
589 |
+
'author_id' => bbp_get_current_user_id(),
|
590 |
+
'reason' => $topic_edit_reason
|
591 |
+
) );
|
592 |
+
}
|
593 |
|
594 |
+
/** No Errors *****************************************************/
|
595 |
|
596 |
+
if ( !empty( $topic_id ) && !is_wp_error( $topic_id ) ) {
|
597 |
|
598 |
+
// Update counts, etc...
|
599 |
+
do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic->post_author , true /* Is edit */ );
|
600 |
|
601 |
+
// If the new forum id is not equal to the old forum id, run the
|
602 |
+
// bbp_move_topic action and pass the topic's forum id as the
|
603 |
+
// first arg and topic id as the second to update counts.
|
604 |
+
if ( $forum_id != $topic->post_parent )
|
605 |
+
bbp_move_topic_handler( $topic_id, $topic->post_parent, $forum_id );
|
606 |
|
607 |
+
/** Additional Actions (After Save) ***************************/
|
608 |
|
609 |
+
do_action( 'bbp_edit_topic_post_extras', $topic_id );
|
610 |
|
611 |
+
/** Redirect **************************************************/
|
612 |
|
613 |
+
// Redirect to
|
614 |
+
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
615 |
|
616 |
+
// View all?
|
617 |
+
$view_all = bbp_get_view_all();
|
618 |
|
619 |
+
// Get the topic URL
|
620 |
+
$topic_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
|
621 |
|
622 |
+
// Add view all?
|
623 |
+
if ( !empty( $view_all ) )
|
624 |
+
$topic_url = bbp_add_view_all( $topic_url );
|
625 |
|
626 |
+
// Allow to be filtered
|
627 |
+
$topic_url = apply_filters( 'bbp_edit_topic_redirect_to', $topic_url, $view_all, $redirect_to );
|
628 |
|
629 |
+
/** Successful Edit *******************************************/
|
630 |
|
631 |
+
// Redirect back to new topic
|
632 |
+
wp_safe_redirect( $topic_url );
|
633 |
|
634 |
+
// For good measure
|
635 |
+
exit();
|
636 |
|
637 |
+
/** Errors ********************************************************/
|
638 |
|
639 |
+
} else {
|
640 |
+
$append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : '';
|
641 |
+
bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
|
|
|
642 |
}
|
643 |
}
|
644 |
}
|
670 |
* @uses bbp_update_topic_last_active_id() To update the topic last active id
|
671 |
* @uses bbp_update_topic_last_active_time() To update the last active topic meta
|
672 |
* @uses bbp_update_topic_reply_count() To update the topic reply count
|
673 |
+
* @uses bbp_update_topic_reply_count_hidden() To udpate the topic hidden reply count
|
674 |
* @uses bbp_update_topic_voice_count() To update the topic voice count
|
675 |
* @uses bbp_update_topic_walker() To udpate the topic's ancestors
|
676 |
*/
|
741 |
bbp_update_topic_last_active_id ( $topic_id, $topic_id );
|
742 |
bbp_update_topic_last_active_time ( $topic_id, $last_active );
|
743 |
bbp_update_topic_reply_count ( $topic_id, 0 );
|
744 |
+
bbp_update_topic_reply_count_hidden ( $topic_id, 0 );
|
745 |
bbp_update_topic_voice_count ( $topic_id );
|
746 |
|
747 |
// Walk up ancestors and do the dirty work
|
770 |
function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id = 0, $reply_id = 0, $refresh = true ) {
|
771 |
|
772 |
// Validate topic_id
|
773 |
+
$topic_id = bbp_get_topic_id( $topic_id );
|
774 |
+
|
775 |
+
// Topic was passed
|
776 |
+
if ( !empty( $topic_id ) ) {
|
777 |
|
778 |
// Get the forum ID if none was passed
|
779 |
+
if ( empty( $forum_id ) ) {
|
780 |
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
781 |
+
}
|
782 |
|
783 |
// Set the active_id based on topic_id/reply_id
|
784 |
$active_id = empty( $reply_id ) ? $topic_id : $reply_id;
|
920 |
*/
|
921 |
function bbp_merge_topic_handler() {
|
922 |
|
923 |
+
// Bail if not a POST action
|
924 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
925 |
+
return;
|
926 |
|
927 |
+
// Bail if action is not bbp-merge-topic
|
928 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-merge-topic' !== $_POST['action'] ) )
|
929 |
+
return;
|
|
|
930 |
|
931 |
+
// Define local variable(s)
|
932 |
+
$source_topic_id = $destination_topic_id = 0;
|
933 |
+
$source_topic = $destination_topic = 0;
|
934 |
+
$subscribers = $favoriters = $replies = array();
|
935 |
|
936 |
+
/** Source Topic ******************************************************/
|
|
|
|
|
|
|
|
|
937 |
|
938 |
+
// Topic id
|
939 |
+
if ( empty( $_POST['bbp_topic_id'] ) )
|
940 |
+
bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
|
941 |
+
else
|
942 |
+
$source_topic_id = (int) $_POST['bbp_topic_id'];
|
943 |
|
944 |
+
// Nonce check
|
945 |
+
check_admin_referer( 'bbp-merge-topic_' . $source_topic_id );
|
|
|
946 |
|
947 |
+
// Source topic not found
|
948 |
+
if ( !$source_topic = bbp_get_topic( $source_topic_id ) )
|
949 |
+
bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
|
950 |
|
951 |
+
// Cannot edit source topic
|
952 |
+
if ( !current_user_can( 'edit_topic', $source_topic->ID ) )
|
953 |
+
bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
|
954 |
|
955 |
+
/** Destination Topic *************************************************/
|
|
|
|
|
|
|
|
|
956 |
|
957 |
+
// Topic id
|
958 |
+
if ( empty( $_POST['bbp_destination_topic'] ) )
|
959 |
+
bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
|
960 |
+
else
|
961 |
+
$destination_topic_id = (int) $_POST['bbp_destination_topic'];
|
962 |
|
963 |
+
// Destination topic not found
|
964 |
+
if ( !$destination_topic = bbp_get_topic( $destination_topic_id ) )
|
965 |
+
bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
|
966 |
|
967 |
+
// Cannot edit destination topic
|
968 |
+
if ( !current_user_can( 'edit_topic', $destination_topic->ID ) )
|
969 |
+
bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic.', 'bbpress' ) );
|
970 |
|
971 |
+
/** No Errors *********************************************************/
|
972 |
|
973 |
+
if ( !bbp_has_errors() ) {
|
|
|
974 |
|
975 |
+
// Update counts, etc...
|
976 |
+
do_action( 'bbp_merge_topic', $destination_topic->ID, $source_topic->ID );
|
977 |
|
978 |
+
/** Date Check ****************************************************/
|
|
|
979 |
|
980 |
+
// Check if the destination topic is older than the source topic
|
981 |
+
if ( strtotime( $source_topic->post_date ) < strtotime( $destination_topic->post_date ) ) {
|
982 |
|
983 |
+
// Set destination topic post_date to 1 second before source topic
|
984 |
+
$destination_post_date = date( 'Y-m-d H:i:s', strtotime( $source_topic->post_date ) - 1 );
|
|
|
|
|
|
|
985 |
|
986 |
+
$postarr = array(
|
987 |
+
'ID' => $destination_topic_id,
|
988 |
+
'post_date' => $destination_post_date,
|
989 |
+
'post_date_gmt' => get_gmt_from_date( $destination_post_date )
|
990 |
+
);
|
991 |
|
992 |
+
// Update destination topic
|
993 |
+
wp_update_post( $postarr );
|
994 |
+
}
|
995 |
|
996 |
+
/** Subscriptions *************************************************/
|
|
|
997 |
|
998 |
+
// Get subscribers from source topic
|
999 |
+
$subscribers = bbp_get_topic_subscribers( $source_topic->ID );
|
1000 |
|
1001 |
+
// Remove the topic from everybody's subscriptions
|
1002 |
+
if ( !empty( $subscribers ) ) {
|
|
|
1003 |
|
1004 |
+
// Loop through each user
|
1005 |
+
foreach ( (array) $subscribers as $subscriber ) {
|
1006 |
+
|
1007 |
+
// Shift the subscriber if told to
|
1008 |
+
if ( !empty( $_POST['bbp_topic_subscribers'] ) && ( 1 == $_POST['bbp_topic_subscribers'] ) && bbp_is_subscriptions_active() )
|
1009 |
+
bbp_add_user_subscription( $subscriber, $destination_topic->ID );
|
1010 |
+
|
1011 |
+
// Remove old subscription
|
1012 |
+
bbp_remove_user_subscription( $subscriber, $source_topic->ID );
|
1013 |
}
|
1014 |
+
}
|
1015 |
|
1016 |
+
/** Favorites *****************************************************/
|
1017 |
|
1018 |
+
// Get favoriters from source topic
|
1019 |
+
$favoriters = bbp_get_topic_favoriters( $source_topic->ID );
|
1020 |
|
1021 |
+
// Remove the topic from everybody's favorites
|
1022 |
+
if ( !empty( $favoriters ) ) {
|
1023 |
|
1024 |
+
// Loop through each user
|
1025 |
+
foreach ( (array) $favoriters as $favoriter ) {
|
|
|
1026 |
|
1027 |
+
// Shift the favoriter if told to
|
1028 |
+
if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1 == $_POST['bbp_topic_favoriters'] )
|
1029 |
+
bbp_add_user_favorite( $favoriter, $destination_topic->ID );
|
1030 |
+
|
1031 |
+
// Remove old favorite
|
1032 |
+
bbp_remove_user_favorite( $favoriter, $source_topic->ID );
|
1033 |
}
|
1034 |
+
}
|
1035 |
|
1036 |
+
/** Tags **********************************************************/
|
1037 |
|
1038 |
+
// Get the source topic tags
|
1039 |
+
$source_topic_tags = wp_get_post_terms( $source_topic->ID, bbp_get_topic_tag_tax_id(), array( 'fields' => 'names' ) );
|
1040 |
|
1041 |
+
// Tags to possibly merge
|
1042 |
+
if ( !empty( $source_topic_tags ) && !is_wp_error( $source_topic_tags ) ) {
|
1043 |
|
1044 |
+
// Shift the tags if told to
|
1045 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1 == $_POST['bbp_topic_tags'] ) )
|
1046 |
+
wp_set_post_terms( $destination_topic->ID, $source_topic_tags, bbp_get_topic_tag_tax_id(), true );
|
1047 |
|
1048 |
+
// Delete the tags from the source topic
|
1049 |
+
wp_delete_object_term_relationships( $source_topic->ID, bbp_get_topic_tag_tax_id() );
|
1050 |
+
}
|
1051 |
|
1052 |
+
/** Source Topic **************************************************/
|
1053 |
|
1054 |
+
// Status
|
1055 |
+
bbp_open_topic( $source_topic->ID );
|
1056 |
|
1057 |
+
// Sticky
|
1058 |
+
bbp_unstick_topic( $source_topic->ID );
|
1059 |
|
1060 |
+
// Get the replies of the source topic
|
1061 |
+
$replies = (array) get_posts( array(
|
1062 |
+
'post_parent' => $source_topic->ID,
|
1063 |
+
'post_type' => bbp_get_reply_post_type(),
|
1064 |
+
'posts_per_page' => -1,
|
1065 |
+
'order' => 'ASC'
|
1066 |
+
) );
|
1067 |
|
1068 |
+
// Prepend the source topic to its replies array for processing
|
1069 |
+
array_unshift( $replies, $source_topic );
|
1070 |
|
1071 |
+
if ( !empty( $replies ) ) {
|
1072 |
|
1073 |
+
/** Merge Replies *************************************************/
|
1074 |
|
1075 |
+
// Change the post_parent of each reply to the destination topic id
|
1076 |
+
foreach ( $replies as $reply ) {
|
1077 |
+
$postarr = array(
|
1078 |
+
'ID' => $reply->ID,
|
1079 |
+
'post_title' => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
|
1080 |
+
'post_name' => false,
|
1081 |
+
'post_type' => bbp_get_reply_post_type(),
|
1082 |
+
'post_parent' => $destination_topic->ID,
|
1083 |
+
'guid' => ''
|
1084 |
+
);
|
1085 |
|
1086 |
+
wp_update_post( $postarr );
|
1087 |
|
1088 |
+
// Adjust reply meta values
|
1089 |
+
bbp_update_reply_topic_id( $reply->ID, $destination_topic->ID );
|
1090 |
+
bbp_update_reply_forum_id( $reply->ID, bbp_get_topic_forum_id( $destination_topic->ID ) );
|
1091 |
|
1092 |
+
// Do additional actions per merged reply
|
1093 |
+
do_action( 'bbp_merged_topic_reply', $reply->ID, $destination_topic->ID );
|
|
|
1094 |
}
|
1095 |
+
}
|
1096 |
|
1097 |
+
/** Successful Merge *******************************************/
|
1098 |
|
1099 |
+
// Send the post parent of the source topic as it has been shifted
|
1100 |
+
// (possibly to a new forum) so we need to update the counts of the
|
1101 |
+
// old forum as well as the new one
|
1102 |
+
do_action( 'bbp_merged_topic', $destination_topic->ID, $source_topic->ID, $source_topic->post_parent );
|
1103 |
|
1104 |
+
// Redirect back to new topic
|
1105 |
+
wp_redirect( bbp_get_topic_permalink( $destination_topic->ID ) );
|
1106 |
|
1107 |
+
// For good measure
|
1108 |
+
exit();
|
|
|
1109 |
}
|
1110 |
}
|
1111 |
|
1124 |
* @uses bbp_update_forum_reply_count() To update the forum reply counts
|
1125 |
* @uses bbp_update_topic_reply_count() To update the topic reply counts
|
1126 |
* @uses bbp_update_topic_voice_count() To update the topic voice counts
|
1127 |
+
* @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply
|
1128 |
* count
|
1129 |
* @uses do_action() Calls 'bbp_merge_topic_count' with the destination topic
|
1130 |
* id, source topic id & source topic forum id
|
1145 |
bbp_update_topic_reply_count( $destination_topic_id );
|
1146 |
|
1147 |
// Topic Hidden Reply Counts
|
1148 |
+
bbp_update_topic_reply_count_hidden( $destination_topic_id );
|
1149 |
|
1150 |
// Topic Voice Counts
|
1151 |
bbp_update_topic_voice_count( $destination_topic_id );
|
1193 |
*/
|
1194 |
function bbp_split_topic_handler() {
|
1195 |
|
1196 |
+
// Bail if not a POST action
|
1197 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
1198 |
+
return;
|
1199 |
+
|
1200 |
+
// Bail if action is not 'bbp-split-topic'
|
1201 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-split-topic' !== $_POST['action'] ) )
|
1202 |
+
return;
|
1203 |
|
1204 |
+
global $wpdb, $bbp;
|
|
|
|
|
|
|
|
|
1205 |
|
1206 |
+
// Prevent debug notices
|
1207 |
+
$from_reply_id = $destination_topic_id = 0;
|
1208 |
+
$destination_topic_title = '';
|
1209 |
+
$destination_topic = $from_reply = $source_topic = '';
|
1210 |
+
$split_option = false;
|
1211 |
|
1212 |
+
/** Split Reply *******************************************************/
|
|
|
|
|
|
|
1213 |
|
1214 |
+
if ( empty( $_POST['bbp_reply_id'] ) )
|
1215 |
+
bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: Reply ID to split the topic from not found!', 'bbpress' ) );
|
1216 |
+
else
|
1217 |
+
$from_reply_id = (int) $_POST['bbp_reply_id'];
|
1218 |
|
1219 |
+
$from_reply = bbp_get_reply( $from_reply_id );
|
|
|
|
|
1220 |
|
1221 |
+
// Reply exists
|
1222 |
+
if ( empty( $from_reply ) )
|
1223 |
+
bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
|
1224 |
|
1225 |
+
/** Topic to Split ****************************************************/
|
|
|
1226 |
|
1227 |
+
// Get the topic being split
|
1228 |
+
$source_topic = bbp_get_topic( $from_reply->post_parent );
|
|
|
1229 |
|
1230 |
+
// No topic
|
1231 |
+
if ( empty( $source_topic ) )
|
1232 |
+
bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
|
1233 |
|
1234 |
+
// Nonce check
|
1235 |
+
check_admin_referer( 'bbp-split-topic_' . $source_topic->ID );
|
|
|
1236 |
|
1237 |
+
// Use cannot edit topic
|
1238 |
+
if ( !current_user_can( 'edit_topic', $source_topic->ID ) )
|
1239 |
+
bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
|
1240 |
|
1241 |
+
/** How to Split ******************************************************/
|
|
|
1242 |
|
1243 |
+
if ( !empty( $_POST['bbp_topic_split_option'] ) )
|
1244 |
+
$split_option = (string) trim( $_POST['bbp_topic_split_option'] );
|
|
|
1245 |
|
1246 |
+
// Invalid split option
|
1247 |
+
if ( empty( $split_option ) || !in_array( $split_option, array( 'existing', 'reply' ) ) ) {
|
1248 |
+
bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
|
1249 |
|
1250 |
+
// Valid Split Option
|
1251 |
+
} else {
|
1252 |
|
1253 |
+
// What kind of split
|
1254 |
+
switch ( $split_option ) {
|
1255 |
|
1256 |
+
// Into an existing topic
|
1257 |
+
case 'existing' :
|
|
|
|
|
|
|
1258 |
|
1259 |
+
// Get destination topic id
|
1260 |
+
if ( empty( $_POST['bbp_destination_topic'] ) )
|
1261 |
+
bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found!', 'bbpress' ) );
|
1262 |
+
else
|
1263 |
+
$destination_topic_id = (int) $_POST['bbp_destination_topic'];
|
1264 |
|
1265 |
+
// Get the destination topic
|
1266 |
+
$destination_topic = bbp_get_topic( $destination_topic_id );
|
|
|
1267 |
|
1268 |
+
// No destination topic
|
1269 |
+
if ( empty( $destination_topic ) )
|
1270 |
+
bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found!', 'bbpress' ) );
|
1271 |
|
1272 |
+
// User cannot edit the destination topic
|
1273 |
+
if ( !current_user_can( 'edit_topic', $destination_topic->ID ) )
|
1274 |
+
bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic!', 'bbpress' ) );
|
1275 |
|
1276 |
+
break;
|
|
|
|
|
1277 |
|
1278 |
+
// Split at reply into a new topic
|
1279 |
+
case 'reply' :
|
1280 |
+
default :
|
1281 |
|
1282 |
+
// User needs to be able to publish topics
|
1283 |
+
if ( current_user_can( 'publish_topics' ) ) {
|
|
|
1284 |
|
1285 |
+
// Use the new title that was passed
|
1286 |
+
if ( !empty( $_POST['bbp_topic_split_destination_title'] ) ) {
|
1287 |
+
$destination_topic_title = esc_attr( strip_tags( $_POST['bbp_topic_split_destination_title'] ) );
|
1288 |
|
1289 |
+
// Use the source topic title
|
1290 |
+
} else {
|
1291 |
+
$destination_topic_title = $source_topic->post_title;
|
1292 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1293 |
|
1294 |
+
// Setup the updated topic parameters
|
1295 |
+
$postarr = array(
|
1296 |
+
'ID' => $from_reply->ID,
|
1297 |
+
'post_title' => $destination_topic_title,
|
1298 |
+
'post_name' => false,
|
1299 |
+
'post_type' => bbp_get_topic_post_type(),
|
1300 |
+
'post_parent' => $source_topic->post_parent,
|
1301 |
+
'guid' => ''
|
1302 |
+
);
|
1303 |
|
1304 |
+
// Update the topic
|
1305 |
+
$destination_topic_id = wp_update_post( $postarr );
|
1306 |
+
$destination_topic = bbp_get_topic( $destination_topic_id );
|
1307 |
|
1308 |
+
// Make sure the new topic knows its a topic
|
1309 |
+
bbp_update_topic_topic_id( $from_reply->ID );
|
|
|
1310 |
|
1311 |
+
// Shouldn't happen
|
1312 |
+
if ( false == $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
|
1313 |
+
bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
|
1314 |
}
|
1315 |
|
1316 |
+
// User cannot publish posts
|
1317 |
+
} else {
|
1318 |
+
bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
break;
|
1322 |
}
|
1323 |
+
}
|
1324 |
|
1325 |
+
/** No Errors - Do the Spit *******************************************/
|
1326 |
|
1327 |
+
if ( !bbp_has_errors() ) {
|
1328 |
|
1329 |
+
// Update counts, etc...
|
1330 |
+
do_action( 'bbp_pre_split_topic', $from_reply->ID, $source_topic->ID, $destination_topic->ID );
|
1331 |
|
1332 |
+
/** Subscriptions *************************************************/
|
1333 |
|
1334 |
+
// Copy the subscribers
|
1335 |
+
if ( !empty( $_POST['bbp_topic_subscribers'] ) && 1 == $_POST['bbp_topic_subscribers'] && bbp_is_subscriptions_active() ) {
|
1336 |
|
1337 |
+
// Get the subscribers
|
1338 |
+
$subscribers = bbp_get_topic_subscribers( $source_topic->ID );
|
1339 |
|
1340 |
+
if ( !empty( $subscribers ) ) {
|
1341 |
+
|
1342 |
+
// Add subscribers to new topic
|
1343 |
+
foreach ( (array) $subscribers as $subscriber ) {
|
1344 |
+
bbp_add_user_subscription( $subscriber, $destination_topic->ID );
|
1345 |
}
|
1346 |
}
|
1347 |
+
}
|
1348 |
|
1349 |
+
/** Favorites *****************************************************/
|
1350 |
|
1351 |
+
// Copy the favoriters if told to
|
1352 |
+
if ( !empty( $_POST['bbp_topic_favoriters'] ) && 1 == $_POST['bbp_topic_favoriters'] ) {
|
1353 |
|
1354 |
+
// Get the favoriters
|
1355 |
+
$favoriters = bbp_get_topic_favoriters( $source_topic->ID );
|
1356 |
|
1357 |
+
if ( !empty( $favoriters ) ) {
|
1358 |
+
|
1359 |
+
// Add the favoriters to new topic
|
1360 |
+
foreach ( (array) $favoriters as $favoriter ) {
|
1361 |
+
bbp_add_user_favorite( $favoriter, $destination_topic->ID );
|
1362 |
}
|
1363 |
}
|
1364 |
+
}
|
1365 |
|
1366 |
+
/** Tags **********************************************************/
|
1367 |
|
1368 |
+
// Copy the tags if told to
|
1369 |
+
if ( !empty( $_POST['bbp_topic_tags'] ) && ( 1 == $_POST['bbp_topic_tags'] ) ) {
|
1370 |
|
1371 |
+
// Get the source topic tags
|
1372 |
+
$source_topic_tags = wp_get_post_terms( $source_topic->ID, bbp_get_topic_tag_tax_id(), array( 'fields' => 'names' ) );
|
1373 |
+
|
1374 |
+
if ( !empty( $source_topic_tags ) ) {
|
1375 |
+
wp_set_post_terms( $destination_topic->ID, $source_topic_tags, bbp_get_topic_tag_tax_id(), true );
|
1376 |
}
|
1377 |
+
}
|
1378 |
|
1379 |
+
/** Split Replies *************************************************/
|
1380 |
|
1381 |
+
// get_posts() is not used because it doesn't allow us to use '>='
|
1382 |
+
// comparision without a filter.
|
1383 |
+
$replies = (array) $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->posts} WHERE {$wpdb->posts}.post_date >= %s AND {$wpdb->posts}.post_parent = %d AND {$wpdb->posts}.post_type = %s ORDER BY {$wpdb->posts}.post_date ASC", $from_reply->post_date, $source_topic->ID, bbp_get_reply_post_type() ) );
|
1384 |
|
1385 |
+
// Make sure there are replies to loop through
|
1386 |
+
if ( !empty( $replies ) && !is_wp_error( $replies ) ) {
|
1387 |
|
1388 |
+
// Change the post_parent of each reply to the destination topic id
|
1389 |
+
foreach ( $replies as $reply ) {
|
1390 |
|
1391 |
+
// New reply data
|
1392 |
+
$postarr = array(
|
1393 |
+
'ID' => $reply->ID,
|
1394 |
+
'post_title' => sprintf( __( 'Reply To: %s', 'bbpress' ), $destination_topic->post_title ),
|
1395 |
+
'post_name' => false, // will be automatically generated
|
1396 |
+
'post_parent' => $destination_topic->ID,
|
1397 |
+
'guid' => ''
|
1398 |
+
);
|
1399 |
|
1400 |
+
// Update the reply
|
1401 |
+
wp_update_post( $postarr );
|
1402 |
|
1403 |
+
// Adjust reply meta values
|
1404 |
+
bbp_update_reply_topic_id( $reply->ID, $destination_topic->ID );
|
1405 |
+
bbp_update_reply_forum_id( $reply->ID, bbp_get_topic_forum_id( $destination_topic->ID ) );
|
1406 |
|
1407 |
+
// Do additional actions per split reply
|
1408 |
+
do_action( 'bbp_split_topic_reply', $reply->ID, $destination_topic->ID );
|
|
|
1409 |
}
|
1410 |
+
}
|
1411 |
|
1412 |
+
// It is a new topic and we need to set some default metas to make
|
1413 |
+
// the topic display in bbp_has_topics() list
|
1414 |
+
if ( 'reply' == $split_option ) {
|
1415 |
+
$last_reply_id = ( empty( $reply ) || empty( $reply->ID ) ) ? 0 : $reply->ID;
|
1416 |
+
$freshness = ( empty( $reply ) || empty( $reply->post_date ) ) ? '' : $reply->post_date;
|
1417 |
|
1418 |
+
bbp_update_topic_last_reply_id ( $destination_topic->ID, $last_reply_id );
|
1419 |
+
bbp_update_topic_last_active_time( $destination_topic->ID, $freshness );
|
1420 |
+
}
|
1421 |
|
1422 |
+
/** Successful Split **********************************************/
|
1423 |
|
1424 |
+
// Update counts, etc...
|
1425 |
+
do_action( 'bbp_post_split_topic', $from_reply->ID, $source_topic->ID, $destination_topic->ID );
|
1426 |
|
1427 |
+
// Redirect back to the topic
|
1428 |
+
wp_redirect( bbp_get_topic_permalink( $destination_topic->ID ) );
|
1429 |
|
1430 |
+
// For good measure
|
1431 |
+
exit();
|
|
|
1432 |
}
|
1433 |
}
|
1434 |
|
1447 |
* @uses bbp_update_forum_reply_count() To update the forum reply counts
|
1448 |
* @uses bbp_update_topic_reply_count() To update the topic reply counts
|
1449 |
* @uses bbp_update_topic_voice_count() To update the topic voice counts
|
1450 |
+
* @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply
|
1451 |
* count
|
1452 |
* @uses do_action() Calls 'bbp_split_topic_count' with the from reply id,
|
1453 |
* source topic id & destination topic id
|
1465 |
bbp_update_topic_reply_count( $destination_topic_id );
|
1466 |
|
1467 |
// Topic Hidden Reply Counts
|
1468 |
+
bbp_update_topic_reply_count_hidden( $source_topic_id );
|
1469 |
+
bbp_update_topic_reply_count_hidden( $destination_topic_id );
|
1470 |
|
1471 |
// Topic Voice Counts
|
1472 |
bbp_update_topic_voice_count( $source_topic_id );
|
1495 |
*/
|
1496 |
function bbp_manage_topic_tag_handler() {
|
1497 |
|
1498 |
+
// Bail if not a POST action
|
1499 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
1500 |
+
return;
|
1501 |
+
|
1502 |
+
// Bail if required POST actions aren't passed
|
1503 |
+
if ( empty( $_POST['tag-id'] ) || empty( $_POST['action'] ) )
|
1504 |
+
return;
|
1505 |
|
1506 |
+
// Setup possible get actions
|
1507 |
+
$possible_actions = array(
|
1508 |
+
'bbp-update-topic-tag',
|
1509 |
+
'bbp-merge-topic-tag',
|
1510 |
+
'bbp-delete-topic-tag'
|
1511 |
+
);
|
1512 |
|
1513 |
+
// Bail if actions aren't meant for this function
|
1514 |
+
if ( !in_array( $_POST['action'], $possible_actions ) )
|
1515 |
+
return;
|
|
|
1516 |
|
1517 |
+
// Setup vars
|
1518 |
+
$action = $_POST['action'];
|
1519 |
+
$tag_id = (int) $_POST['tag-id'];
|
1520 |
+
$tag = get_term( $tag_id, bbp_get_topic_tag_tax_id() );
|
|
|
1521 |
|
1522 |
+
// Tag does not exist
|
1523 |
+
if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
|
1524 |
+
bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1525 |
+
return;
|
1526 |
+
}
|
1527 |
|
1528 |
+
// What action are we trying to perform?
|
1529 |
+
switch ( $action ) {
|
1530 |
|
1531 |
+
// Update tag
|
1532 |
+
case 'bbp-update-topic-tag' :
|
1533 |
|
1534 |
+
// Nonce check
|
1535 |
+
check_admin_referer( 'update-tag_' . $tag_id );
|
|
|
|
|
|
|
1536 |
|
1537 |
+
// Can user edit topic tags?
|
1538 |
+
if ( !current_user_can( 'edit_topic_tags' ) ) {
|
1539 |
+
bbp_add_error( 'bbp_manage_topic_tag_update_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
|
1540 |
+
return;
|
1541 |
+
}
|
1542 |
|
1543 |
+
// No tag name was provided
|
1544 |
+
if ( empty( $_POST['tag-name'] ) || !$name = $_POST['tag-name'] ) {
|
1545 |
+
bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
|
1546 |
+
return;
|
1547 |
+
}
|
1548 |
|
1549 |
+
// Attempt to update the tag
|
1550 |
+
$slug = !empty( $_POST['tag-slug'] ) ? $_POST['tag-slug'] : '';
|
1551 |
+
$tag = wp_update_term( $tag_id, bbp_get_topic_tag_tax_id(), array( 'name' => $name, 'slug' => $slug ) );
|
|
|
|
|
1552 |
|
1553 |
+
// Cannot update tag
|
1554 |
+
if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
|
1555 |
+
bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1556 |
+
return;
|
1557 |
+
}
|
1558 |
|
1559 |
+
// Redirect
|
1560 |
+
$redirect = get_term_link( $tag_id, bbp_get_topic_tag_tax_id() );
|
1561 |
|
1562 |
+
// Update counts, etc...
|
1563 |
+
do_action( 'bbp_update_topic_tag', $tag_id, $tag, $name, $slug );
|
1564 |
|
1565 |
+
break;
|
|
|
1566 |
|
1567 |
+
// Merge two tags
|
1568 |
+
case 'bbp-merge-topic-tag' :
|
1569 |
|
1570 |
+
// Nonce check
|
1571 |
+
check_admin_referer( 'merge-tag_' . $tag_id );
|
|
|
|
|
|
|
1572 |
|
1573 |
+
// Can user edit topic tags?
|
1574 |
+
if ( !current_user_can( 'edit_topic_tags' ) ) {
|
1575 |
+
bbp_add_error( 'bbp_manage_topic_tag_merge_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
|
1576 |
+
return;
|
1577 |
+
}
|
1578 |
|
1579 |
+
// No tag name was provided
|
1580 |
+
if ( empty( $_POST['tag-name'] ) || !$name = $_POST['tag-name'] ) {
|
1581 |
+
bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
|
1582 |
+
return;
|
1583 |
+
}
|
1584 |
|
1585 |
+
// If term does not exist, create it
|
1586 |
+
if ( !$tag = term_exists( $name, bbp_get_topic_tag_tax_id() ) )
|
1587 |
+
$tag = wp_insert_term( $name, bbp_get_topic_tag_tax_id() );
|
|
|
|
|
1588 |
|
1589 |
+
// Problem inserting the new term
|
1590 |
+
if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
|
1591 |
+
bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1592 |
+
return;
|
1593 |
+
}
|
1594 |
|
1595 |
+
// Merging in to...
|
1596 |
+
$to_tag = $tag['term_id'];
|
|
|
|
|
|
|
1597 |
|
1598 |
+
// Attempting to merge a tag into itself
|
1599 |
+
if ( $tag_id == $to_tag ) {
|
1600 |
+
bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
|
1601 |
+
return;
|
1602 |
+
}
|
1603 |
|
1604 |
+
// Delete the old term
|
1605 |
+
$tag = wp_delete_term( $tag_id, bbp_get_topic_tag_tax_id(), array( 'default' => $to_tag, 'force_default' => true ) );
|
|
|
|
|
|
|
1606 |
|
1607 |
+
// Error merging the terms
|
1608 |
+
if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
|
1609 |
+
bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1610 |
+
return;
|
1611 |
+
}
|
1612 |
|
1613 |
+
// Redirect
|
1614 |
+
$redirect = get_term_link( (int) $to_tag, bbp_get_topic_tag_tax_id() );
|
1615 |
|
1616 |
+
// Update counts, etc...
|
1617 |
+
do_action( 'bbp_merge_topic_tag', $tag_id, $to_tag, $tag );
|
1618 |
|
1619 |
+
break;
|
|
|
1620 |
|
1621 |
+
// Delete tag
|
1622 |
+
case 'bbp-delete-topic-tag' :
|
1623 |
|
1624 |
+
// Nonce check
|
1625 |
+
check_admin_referer( 'delete-tag_' . $tag_id );
|
|
|
|
|
|
|
1626 |
|
1627 |
+
// Can user delete topic tags?
|
1628 |
+
if ( !current_user_can( 'delete_topic_tags' ) ) {
|
1629 |
+
bbp_add_error( 'bbp_manage_topic_tag_delete_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to delete the topic tags.', 'bbpress' ) );
|
1630 |
+
return;
|
1631 |
+
}
|
1632 |
|
1633 |
+
// Attempt to delete term
|
1634 |
+
$tag = wp_delete_term( $tag_id, bbp_get_topic_tag_tax_id() );
|
|
|
|
|
|
|
1635 |
|
1636 |
+
// Error deleting term
|
1637 |
+
if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
|
1638 |
+
bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
|
1639 |
+
return;
|
1640 |
+
}
|
1641 |
|
1642 |
+
// We don't have any other place to go other than home! Or we may die because of the 404 disease
|
1643 |
+
$redirect = home_url();
|
1644 |
|
1645 |
+
// Update counts, etc...
|
1646 |
+
do_action( 'bbp_delete_topic_tag', $tag_id, $tag );
|
1647 |
|
1648 |
+
break;
|
1649 |
+
}
|
1650 |
|
1651 |
+
/** Successful Moderation *********************************************/
|
|
|
|
|
1652 |
|
1653 |
+
// Redirect back
|
1654 |
+
$redirect = ( !empty( $redirect ) && !is_wp_error( $redirect ) ) ? $redirect : home_url();
|
1655 |
+
wp_safe_redirect( $redirect );
|
1656 |
+
|
1657 |
+
// For good measure
|
1658 |
+
exit();
|
1659 |
}
|
1660 |
|
1661 |
/** Stickies ******************************************************************/
|
1729 |
*/
|
1730 |
function bbp_toggle_topic_handler() {
|
1731 |
|
1732 |
+
// Bail if not a GET action
|
1733 |
+
if ( 'GET' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
1734 |
+
return;
|
1735 |
|
1736 |
+
// Bail if required GET actions aren't passed
|
1737 |
+
if ( empty( $_GET['topic_id'] ) || empty( $_GET['action'] ) )
|
1738 |
+
return;
|
|
|
1739 |
|
1740 |
+
// Setup possible get actions
|
1741 |
+
$possible_actions = array(
|
1742 |
+
'bbp_toggle_topic_close',
|
1743 |
+
'bbp_toggle_topic_stick',
|
1744 |
+
'bbp_toggle_topic_spam',
|
1745 |
+
'bbp_toggle_topic_trash'
|
1746 |
+
);
|
1747 |
|
1748 |
+
// Bail if actions aren't meant for this function
|
1749 |
+
if ( !in_array( $_GET['action'], $possible_actions ) )
|
1750 |
+
return;
|
|
|
|
|
1751 |
|
1752 |
+
$view_all = false; // Assume not viewing all
|
1753 |
+
$action = $_GET['action']; // What action is taking place?
|
1754 |
+
$topic_id = (int) $_GET['topic_id']; // What's the topic id?
|
1755 |
+
$success = false; // Flag
|
1756 |
+
$post_data = array( 'ID' => $topic_id ); // Prelim array
|
1757 |
|
1758 |
+
// Make sure topic exists
|
1759 |
+
if ( !$topic = bbp_get_topic( $topic_id ) )
|
1760 |
+
return;
|
1761 |
|
1762 |
+
// What is the user doing here?
|
1763 |
+
if ( !current_user_can( 'edit_topic', $topic->ID ) || ( 'bbp_toggle_topic_trash' == $action && !current_user_can( 'delete_topic', $topic->ID ) ) ) {
|
1764 |
+
bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR:</strong> You do not have the permission to do that.', 'bbpress' ) );
|
1765 |
+
return;
|
1766 |
+
}
|
1767 |
|
1768 |
+
// What action are we trying to perform?
|
1769 |
+
switch ( $action ) {
|
1770 |
|
1771 |
+
// Toggle open/close
|
1772 |
+
case 'bbp_toggle_topic_close' :
|
1773 |
+
check_ajax_referer( 'close-topic_' . $topic_id );
|
1774 |
|
1775 |
+
$is_open = bbp_is_topic_open( $topic_id );
|
1776 |
+
$success = $is_open ? bbp_close_topic( $topic_id ) : bbp_open_topic( $topic_id );
|
1777 |
+
$failure = $is_open ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );
|
|
|
1778 |
|
1779 |
+
break;
|
1780 |
|
1781 |
+
// Toggle sticky/super-sticky/unstick
|
1782 |
+
case 'bbp_toggle_topic_stick' :
|
1783 |
+
check_ajax_referer( 'stick-topic_' . $topic_id );
|
1784 |
|
1785 |
+
$is_sticky = bbp_is_topic_sticky( $topic_id );
|
1786 |
+
$is_super = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && 1 == (int) $_GET['super'] ) ? true : false;
|
1787 |
+
$success = $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );
|
1788 |
+
$failure = $is_sticky ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );
|
1789 |
|
1790 |
+
break;
|
1791 |
|
1792 |
+
// Toggle spam
|
1793 |
+
case 'bbp_toggle_topic_spam' :
|
1794 |
+
check_ajax_referer( 'spam-topic_' . $topic_id );
|
1795 |
|
1796 |
+
$is_spam = bbp_is_topic_spam( $topic_id );
|
1797 |
+
$success = $is_spam ? bbp_unspam_topic( $topic_id ) : bbp_spam_topic( $topic_id );
|
1798 |
+
$failure = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.', 'bbpress' );
|
1799 |
+
$view_all = !$is_spam;
|
1800 |
|
1801 |
+
break;
|
|
|
1802 |
|
1803 |
+
// Toggle trash
|
1804 |
+
case 'bbp_toggle_topic_trash' :
|
|
|
1805 |
|
1806 |
+
$sub_action = in_array( $_GET['sub_action'], array( 'trash', 'untrash', 'delete' ) ) ? $_GET['sub_action'] : false;
|
|
|
1807 |
|
1808 |
+
if ( empty( $sub_action ) )
|
1809 |
+
break;
|
1810 |
|
1811 |
+
switch ( $sub_action ) {
|
1812 |
+
case 'trash':
|
1813 |
+
check_ajax_referer( 'trash-' . bbp_get_topic_post_type() . '_' . $topic_id );
|
1814 |
|
1815 |
+
$view_all = true;
|
1816 |
+
$success = wp_trash_post( $topic_id );
|
1817 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
|
1818 |
|
1819 |
+
break;
|
1820 |
|
1821 |
+
case 'untrash':
|
1822 |
+
check_ajax_referer( 'untrash-' . bbp_get_topic_post_type() . '_' . $topic_id );
|
1823 |
|
1824 |
+
$success = wp_untrash_post( $topic_id );
|
1825 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' );
|
1826 |
|
1827 |
+
break;
|
|
|
1828 |
|
1829 |
+
case 'delete':
|
1830 |
+
check_ajax_referer( 'delete-' . bbp_get_topic_post_type() . '_' . $topic_id );
|
1831 |
|
1832 |
+
$success = wp_delete_post( $topic_id );
|
1833 |
+
$failure = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' );
|
1834 |
|
1835 |
+
break;
|
1836 |
+
}
|
1837 |
|
1838 |
+
break;
|
1839 |
+
}
|
|
|
1840 |
|
1841 |
+
// Do additional topic toggle actions
|
1842 |
+
do_action( 'bbp_toggle_topic_handler', $success, $post_data, $action );
|
|
|
1843 |
|
1844 |
+
// No errors
|
1845 |
+
if ( false != $success && !is_wp_error( $success ) ) {
|
1846 |
|
1847 |
+
// Redirect back to the topic's forum
|
1848 |
+
if ( isset( $sub_action ) && ( 'delete' == $sub_action ) ) {
|
1849 |
+
$redirect = bbp_get_forum_permalink( $success->post_parent );
|
1850 |
|
1851 |
+
// Redirect back to the topic
|
1852 |
} else {
|
1853 |
+
|
1854 |
+
// Get the redirect detination
|
1855 |
+
$permalink = bbp_get_topic_permalink( $topic_id );
|
1856 |
+
$redirect = bbp_add_view_all( $permalink, $view_all );
|
1857 |
}
|
1858 |
+
|
1859 |
+
wp_redirect( $redirect );
|
1860 |
+
|
1861 |
+
// For good measure
|
1862 |
+
exit();
|
1863 |
+
|
1864 |
+
// Handle errors
|
1865 |
+
} else {
|
1866 |
+
bbp_add_error( 'bbp_toggle_topic', $failure );
|
1867 |
}
|
1868 |
}
|
1869 |
|
2039 |
* @uses wpdb::prepare() To prepare our sql query
|
2040 |
* @uses wpdb::get_var() To execute our query and get the var back
|
2041 |
* @uses update_post_meta() To update the topic hidden reply count meta
|
2042 |
+
* @uses apply_filters() Calls 'bbp_update_topic_reply_count_hidden' with the
|
2043 |
* hidden reply count and topic id
|
2044 |
* @return int Topic hidden reply count
|
2045 |
*/
|
2046 |
+
function bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = 0 ) {
|
2047 |
global $wpdb, $bbp;
|
2048 |
|
2049 |
// If it's a reply, then get the parent (topic id)
|
2056 |
if ( empty( $reply_count ) )
|
2057 |
$reply_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array( $bbp->trash_status_id, $bbp->spam_status_id ) ) . "') AND post_type = '%s';", $topic_id, bbp_get_reply_post_type() ) );
|
2058 |
|
2059 |
+
update_post_meta( $topic_id, '_bbp_reply_count_hidden', (int) $reply_count );
|
2060 |
|
2061 |
+
return apply_filters( 'bbp_update_topic_reply_count_hidden', (int) $reply_count, $topic_id );
|
2062 |
}
|
2063 |
|
2064 |
/**
|
2667 |
do_action( 'bbp_untrash_topic', $topic_id );
|
2668 |
|
2669 |
// Loop through and restore pre trashed replies to this topic
|
2670 |
+
$pre_trashed_replies = get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
|
2671 |
+
|
2672 |
+
if ( !empty( $pre_trashed_replies ) ) {
|
2673 |
+
foreach ( $pre_trashed_replies as $reply ) {
|
2674 |
wp_untrash_post( $reply );
|
2675 |
+
}
|
2676 |
}
|
2677 |
}
|
2678 |
|
2735 |
*
|
2736 |
* @global bbPress $bbp
|
2737 |
*
|
2738 |
+
* @uses bbp_is_single_topic()
|
2739 |
* @uses bbp_user_can_view_forum()
|
2740 |
* @uses bbp_get_topic_forum_id()
|
2741 |
* @uses bbp_show_load_topic()
|
2761 |
function bbp_display_topics_feed_rss2( $topics_query = array() ) {
|
2762 |
global $bbp;
|
2763 |
|
2764 |
+
// User cannot access this forum
|
2765 |
+
if ( bbp_is_single_forum() && !bbp_user_can_view_forum( array( 'forum_id' => bbp_get_forum_id() ) ) )
|
2766 |
return;
|
2767 |
|
2768 |
// Display the feed
|
2786 |
<link><?php self_link(); ?></link>
|
2787 |
<description><?php //?></description>
|
2788 |
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s O', '', false ); ?></pubDate>
|
2789 |
+
<generator>http://bbpress.org/?v=<?php echo $bbp->version; ?></generator>
|
2790 |
<language><?php echo get_option( 'rss_language' ); ?></language>
|
2791 |
|
2792 |
<?php do_action( 'bbp_feed_head' ); ?>
|
bbp-includes/bbp-topic-template.php
CHANGED
@@ -49,7 +49,7 @@ function bbp_topic_post_type() {
|
|
49 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
50 |
* @uses WP_Query To make query and get the topics
|
51 |
* @uses is_page() To check if it's a page
|
52 |
-
* @uses
|
53 |
* @uses bbp_get_forum_id() To get the forum id
|
54 |
* @uses bbp_get_paged() To get the current page value
|
55 |
* @uses bbp_get_super_stickies() To get the super stickies
|
@@ -68,13 +68,6 @@ function bbp_topic_post_type() {
|
|
68 |
function bbp_has_topics( $args = '' ) {
|
69 |
global $wp_rewrite, $wp_query, $bbp, $wpdb;
|
70 |
|
71 |
-
// Make sure we're back where we started
|
72 |
-
if ( !is_tax( $bbp->topic_tag_id ) )
|
73 |
-
wp_reset_postdata();
|
74 |
-
|
75 |
-
// Are we in a forum and looking to do a forum only query?
|
76 |
-
$in_forum = (bool) ( bbp_is_forum() && !bbp_is_forum_archive() && !bbp_is_query_name( 'bbp_widget' ) );
|
77 |
-
|
78 |
// What are the default allowed statuses (based on user caps)
|
79 |
if ( !bbp_is_query_name( 'bbp_widget' ) && bbp_get_view_all() )
|
80 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id, $bbp->spam_status_id, 'trash' ) );
|
@@ -88,7 +81,7 @@ function bbp_has_topics( $args = '' ) {
|
|
88 |
'post_type' => bbp_get_topic_post_type(),
|
89 |
|
90 |
// Forum ID
|
91 |
-
'post_parent' => (
|
92 |
|
93 |
// Make sure topic has some last activity time
|
94 |
'meta_key' => '_bbp_last_active_time',
|
@@ -109,7 +102,7 @@ function bbp_has_topics( $args = '' ) {
|
|
109 |
's' => !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : '',
|
110 |
|
111 |
// Ignore sticky topics?
|
112 |
-
'show_stickies' => (
|
113 |
|
114 |
// Maximum number of pages to show
|
115 |
'max_num_pages' => false,
|
@@ -128,7 +121,7 @@ function bbp_has_topics( $args = '' ) {
|
|
128 |
extract( $bbp_t );
|
129 |
|
130 |
// If we're viewing a tax/term, use the existing query; if not, run our own
|
131 |
-
if (
|
132 |
$bbp->topic_query = $wp_query;
|
133 |
else
|
134 |
$bbp->topic_query = new WP_Query( $bbp_t );
|
@@ -230,7 +223,7 @@ function bbp_has_topics( $args = '' ) {
|
|
230 |
$bbp->topic_query->paged = $paged;
|
231 |
|
232 |
// Only add pagination if query returned results
|
233 |
-
if ( ( (int) $bbp->topic_query->post_count || (int) $bbp->topic_query->found_posts ) && (int) $bbp->topic_query->posts_per_page ) {
|
234 |
|
235 |
// Limit the number of topics shown based on maximum allowed pages
|
236 |
if ( ( !empty( $max_num_pages ) ) && $bbp->topic_query->found_posts > $bbp->topic_query->max_num_pages * $bbp->topic_query->post_count )
|
@@ -241,23 +234,30 @@ function bbp_has_topics( $args = '' ) {
|
|
241 |
|
242 |
// Profile page
|
243 |
if ( bbp_is_single_user() )
|
244 |
-
$base =
|
245 |
|
246 |
// View
|
247 |
elseif ( bbp_is_single_view() )
|
248 |
-
$base =
|
249 |
|
250 |
-
// Topic
|
251 |
-
elseif (
|
252 |
-
$base =
|
253 |
|
254 |
// Page or single post
|
255 |
elseif ( is_page() || is_single() )
|
256 |
-
$base =
|
|
|
|
|
|
|
|
|
257 |
|
258 |
// Default
|
259 |
else
|
260 |
-
$base =
|
|
|
|
|
|
|
261 |
|
262 |
// Unpretty pagination
|
263 |
} else {
|
@@ -279,7 +279,7 @@ function bbp_has_topics( $args = '' ) {
|
|
279 |
$bbp->topic_query->pagination_links = paginate_links ( $bbp_topic_pagination );
|
280 |
|
281 |
// Remove first page from pagination
|
282 |
-
$bbp->topic_query->pagination_links = str_replace(
|
283 |
}
|
284 |
|
285 |
// Return object
|
@@ -296,7 +296,15 @@ function bbp_has_topics( $args = '' ) {
|
|
296 |
*/
|
297 |
function bbp_topics() {
|
298 |
global $bbp;
|
299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
}
|
301 |
|
302 |
/**
|
@@ -329,9 +337,9 @@ function bbp_topic_id( $topic_id = 0) {
|
|
329 |
*
|
330 |
* @param $topic_id Optional. Used to check emptiness
|
331 |
* @uses bbPress::topic_query::post::ID To get the topic id
|
332 |
-
* @uses
|
333 |
* @uses bbp_is_topic_edit() To check if it's a topic edit page
|
334 |
-
* @uses
|
335 |
* @uses bbp_is_reply_edit() To check if it's a reply edit page
|
336 |
* @uses bbp_get_reply_topic_edit() To get the reply topic id
|
337 |
* @uses get_post_field() To get the post's post type
|
@@ -353,11 +361,11 @@ function bbp_topic_id( $topic_id = 0) {
|
|
353 |
$bbp_topic_id = $bbp->topic_query->post->ID;
|
354 |
|
355 |
// Currently viewing a topic
|
356 |
-
elseif ( (
|
357 |
$bbp_topic_id = $bbp->current_topic_id = $wp_query->post->ID;
|
358 |
|
359 |
// Currently viewing a topic
|
360 |
-
elseif (
|
361 |
$bbp_topic_id = $bbp->current_topic_id = bbp_get_reply_topic_id();
|
362 |
|
363 |
// Fallback
|
@@ -432,7 +440,7 @@ function bbp_topic_permalink( $topic_id = 0 ) {
|
|
432 |
* shortcodes and other fun things.
|
433 |
* @uses bbp_get_topic_id() To get the topic id
|
434 |
* @uses get_permalink() To get the topic permalink
|
435 |
-
* @uses
|
436 |
* @uses apply_filters() Calls 'bbp_get_topic_permalink' with the link
|
437 |
* and topic id
|
438 |
* @return string Permanent link to topic
|
@@ -442,7 +450,7 @@ function bbp_topic_permalink( $topic_id = 0 ) {
|
|
442 |
|
443 |
// Use the redirect address
|
444 |
if ( !empty( $redirect_to ) )
|
445 |
-
$topic_permalink =
|
446 |
|
447 |
// Use the topic permalink
|
448 |
else
|
@@ -658,7 +666,7 @@ function bbp_topic_pagination( $args = '' ) {
|
|
658 |
|
659 |
// If pretty permalinks are enabled, make our pagination pretty
|
660 |
if ( $wp_rewrite->using_permalinks() )
|
661 |
-
$base =
|
662 |
else
|
663 |
$base = add_query_arg( 'paged', '%#%' );
|
664 |
|
@@ -686,7 +694,7 @@ function bbp_topic_pagination( $args = '' ) {
|
|
686 |
|
687 |
// Remove first page from pagination
|
688 |
if ( $wp_rewrite->using_permalinks() )
|
689 |
-
$pagination_links = str_replace( '
|
690 |
else
|
691 |
$pagination_links = str_replace( '&paged=1', '', $pagination_links );
|
692 |
|
@@ -710,6 +718,12 @@ function bbp_topic_pagination( $args = '' ) {
|
|
710 |
* @return string Content with the revisions appended
|
711 |
*/
|
712 |
function bbp_topic_content_append_revisions( $content = '', $topic_id = 0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
$topic_id = bbp_get_topic_id( $topic_id );
|
714 |
|
715 |
return apply_filters( 'bbp_topic_append_revisions', $content . bbp_get_topic_revision_log( $topic_id ), $content, $topic_id );
|
@@ -1172,7 +1186,6 @@ function bbp_topic_author_link( $args = '' ) {
|
|
1172 |
* @param mixed|int $args If it is an integer, it is used as topic id.
|
1173 |
* Optional.
|
1174 |
* @uses bbp_get_topic_id() To get the topic id
|
1175 |
-
* @uses bbp_is_topic() To check if it's the topic page
|
1176 |
* @uses bbp_get_topic_author_display_name() To get the topic author
|
1177 |
* @uses bbp_is_topic_anonymous() To check if the topic is by an
|
1178 |
* anonymous user
|
@@ -1234,49 +1247,49 @@ function bbp_topic_author_link( $args = '' ) {
|
|
1234 |
return apply_filters( 'bbp_get_topic_author_link', $author_link, $args );
|
1235 |
}
|
1236 |
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
|
1281 |
/**
|
1282 |
* Output the title of the forum a topic belongs to
|
@@ -1603,7 +1616,7 @@ function bbp_topic_replies_link( $topic_id = 0 ) {
|
|
1603 |
* @uses bbp_get_topic_reply_count() To get the topic reply count
|
1604 |
* @uses bbp_get_topic_permalink() To get the topic permalink
|
1605 |
* @uses remove_query_arg() To remove args from the url
|
1606 |
-
* @uses
|
1607 |
* reply count
|
1608 |
* @uses current_user_can() To check if the current user can edit others
|
1609 |
* replies
|
@@ -1627,7 +1640,7 @@ function bbp_topic_replies_link( $topic_id = 0 ) {
|
|
1627 |
$retval .= $replies;
|
1628 |
|
1629 |
// This forum has hidden topics
|
1630 |
-
if ( current_user_can( 'edit_others_replies' ) && ( $deleted =
|
1631 |
|
1632 |
// Extra text
|
1633 |
$extra = sprintf( __( ' (+ %d hidden)', 'bbpress' ), $deleted );
|
@@ -1711,10 +1724,10 @@ function bbp_topic_post_count( $topic_id = 0 ) {
|
|
1711 |
* @since bbPress (r2740)
|
1712 |
*
|
1713 |
* @param int $topic_id Optional. Topic id
|
1714 |
-
* @uses
|
1715 |
*/
|
1716 |
-
function
|
1717 |
-
echo
|
1718 |
}
|
1719 |
/**
|
1720 |
* Return total hidden reply count of a topic (hidden includes trashed
|
@@ -1725,15 +1738,15 @@ function bbp_topic_hidden_reply_count( $topic_id = 0 ) {
|
|
1725 |
* @param int $topic_id Optional. Topic id
|
1726 |
* @uses bbp_get_topic_id() To get the topic id
|
1727 |
* @uses get_post_meta() To get the hidden reply count
|
1728 |
-
* @uses apply_filters() Calls '
|
1729 |
* the hidden reply count and topic id
|
1730 |
* @return int Topic hidden reply count
|
1731 |
*/
|
1732 |
-
function
|
1733 |
$topic_id = bbp_get_topic_id( $topic_id );
|
1734 |
-
$replies = get_post_meta( $topic_id, '
|
1735 |
|
1736 |
-
return apply_filters( '
|
1737 |
}
|
1738 |
|
1739 |
/**
|
@@ -1789,7 +1802,6 @@ function bbp_topic_tag_list( $topic_id = 0, $args = '' ) {
|
|
1789 |
* @return string Tag list of the topic
|
1790 |
*/
|
1791 |
function bbp_get_topic_tag_list( $topic_id = 0, $args = '' ) {
|
1792 |
-
global $bbp;
|
1793 |
|
1794 |
$defaults = array(
|
1795 |
'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . ' ',
|
@@ -1802,7 +1814,7 @@ function bbp_topic_tag_list( $topic_id = 0, $args = '' ) {
|
|
1802 |
|
1803 |
$topic_id = bbp_get_topic_id( $topic_id );
|
1804 |
|
1805 |
-
return get_the_term_list( $topic_id,
|
1806 |
}
|
1807 |
|
1808 |
/**
|
@@ -1865,7 +1877,6 @@ function bbp_topic_admin_links( $args = '' ) {
|
|
1865 |
* - after: After the links
|
1866 |
* - sep: Links separator
|
1867 |
* - links: Topic admin links array
|
1868 |
-
* @uses bbp_is_topic() To check if it is a topic page
|
1869 |
* @uses current_user_can() To check if the current user can edit/delete
|
1870 |
* the topic
|
1871 |
* @uses bbp_get_topic_edit_link() To get the topic edit link
|
@@ -1882,7 +1893,7 @@ function bbp_topic_admin_links( $args = '' ) {
|
|
1882 |
function bbp_get_topic_admin_links( $args = '' ) {
|
1883 |
global $bbp;
|
1884 |
|
1885 |
-
if ( !
|
1886 |
return;
|
1887 |
|
1888 |
$defaults = array (
|
@@ -1901,10 +1912,10 @@ function bbp_topic_admin_links( $args = '' ) {
|
|
1901 |
if ( empty( $r['links'] ) ) {
|
1902 |
$r['links'] = array(
|
1903 |
'edit' => bbp_get_topic_edit_link ( $r ),
|
1904 |
-
'trash' => bbp_get_topic_trash_link( $r ),
|
1905 |
'close' => bbp_get_topic_close_link( $r ),
|
1906 |
'stick' => bbp_get_topic_stick_link( $r ),
|
1907 |
'merge' => bbp_get_topic_merge_link( $r ),
|
|
|
1908 |
'spam' => bbp_get_topic_spam_link ( $r ),
|
1909 |
);
|
1910 |
}
|
@@ -1980,7 +1991,7 @@ function bbp_topic_edit_link( $args = '' ) {
|
|
1980 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $id ) );
|
1981 |
|
1982 |
// Bypass check if user has caps
|
1983 |
-
if ( !
|
1984 |
|
1985 |
// User cannot edit or it is past the lock time
|
1986 |
if ( empty( $topic ) || !current_user_can( 'edit_topic', $topic->ID ) || bbp_past_edit_lock( $topic->post_date_gmt ) )
|
@@ -2094,16 +2105,19 @@ function bbp_topic_trash_link( $args = '' ) {
|
|
2094 |
$actions = array();
|
2095 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $id ) );
|
2096 |
|
2097 |
-
if ( empty( $topic ) || !current_user_can( 'delete_topic', $topic->ID ) )
|
2098 |
return;
|
|
|
2099 |
|
2100 |
-
if ( bbp_is_topic_trash( $topic->ID ) )
|
2101 |
-
$actions['untrash'] = '<a title="' . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '"
|
2102 |
-
elseif ( EMPTY_TRASH_DAYS )
|
2103 |
-
$actions['trash'] = '<a title="' . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '"
|
|
|
2104 |
|
2105 |
-
if ( bbp_is_topic_trash( $topic->ID ) || !EMPTY_TRASH_DAYS )
|
2106 |
$actions['delete'] = '<a title="' . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . esc_html( $delete_text ) . '</a>';
|
|
|
2107 |
|
2108 |
// Process the admin links
|
2109 |
$actions = implode( $sep, $actions );
|
@@ -2384,7 +2398,7 @@ function bbp_forum_pagination_count() {
|
|
2384 |
function bbp_get_forum_pagination_count() {
|
2385 |
global $bbp;
|
2386 |
|
2387 |
-
if (
|
2388 |
return false;
|
2389 |
|
2390 |
// Set pagination values
|
@@ -2428,7 +2442,7 @@ function bbp_forum_pagination_links() {
|
|
2428 |
function bbp_get_forum_pagination_links() {
|
2429 |
global $bbp;
|
2430 |
|
2431 |
-
if (
|
2432 |
return false;
|
2433 |
|
2434 |
return apply_filters( 'bbp_get_forum_pagination_links', $bbp->topic_query->pagination_links );
|
@@ -2439,7 +2453,7 @@ function bbp_forum_pagination_links() {
|
|
2439 |
*
|
2440 |
* @since bbPress (r2744)
|
2441 |
*
|
2442 |
-
* @uses
|
2443 |
* @uses bbp_get_topic_status() To get the topic status
|
2444 |
* @uses bbp_get_topic_id() To get the topic id
|
2445 |
* @uses apply_filters() Calls 'bbp_topic_notices' with the notice text, topic
|
@@ -2450,7 +2464,7 @@ function bbp_topic_notices() {
|
|
2450 |
global $bbp;
|
2451 |
|
2452 |
// Bail if not viewing a topic
|
2453 |
-
if ( !
|
2454 |
return;
|
2455 |
|
2456 |
// Get the topic_status
|
@@ -2479,7 +2493,7 @@ function bbp_topic_notices() {
|
|
2479 |
if ( !$notice_text = apply_filters( 'bbp_topic_notices', $notice_text, $topic_status, bbp_get_topic_id() ) )
|
2480 |
return;
|
2481 |
|
2482 |
-
|
2483 |
}
|
2484 |
|
2485 |
/**
|
@@ -2650,6 +2664,30 @@ function bbp_single_topic_description( $args = '' ) {
|
|
2650 |
|
2651 |
/** Topic Tags ****************************************************************/
|
2652 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2653 |
/**
|
2654 |
* Output the id of the current tag
|
2655 |
*
|
@@ -2657,8 +2695,8 @@ function bbp_single_topic_description( $args = '' ) {
|
|
2657 |
*
|
2658 |
* @uses bbp_get_topic_tag_id()
|
2659 |
*/
|
2660 |
-
function bbp_topic_tag_id() {
|
2661 |
-
echo bbp_get_topic_tag_id();
|
2662 |
}
|
2663 |
/**
|
2664 |
* Return the id of the current tag
|
@@ -2671,10 +2709,11 @@ function bbp_topic_tag_id() {
|
|
2671 |
*
|
2672 |
* @return string Term Name
|
2673 |
*/
|
2674 |
-
function bbp_get_topic_tag_id() {
|
2675 |
|
2676 |
// Get the term
|
2677 |
-
$
|
|
|
2678 |
|
2679 |
// Add before and after if description exists
|
2680 |
if ( !empty( $term->term_id ) )
|
@@ -2684,7 +2723,7 @@ function bbp_topic_tag_id() {
|
|
2684 |
else
|
2685 |
$retval = '';
|
2686 |
|
2687 |
-
return apply_filters( 'bbp_get_topic_tag_id', $retval );
|
2688 |
}
|
2689 |
|
2690 |
/**
|
@@ -2694,8 +2733,8 @@ function bbp_topic_tag_id() {
|
|
2694 |
*
|
2695 |
* @uses bbp_get_topic_tag_name()
|
2696 |
*/
|
2697 |
-
function bbp_topic_tag_name() {
|
2698 |
-
echo bbp_get_topic_tag_name();
|
2699 |
}
|
2700 |
/**
|
2701 |
* Return the name of the current tag
|
@@ -2708,10 +2747,11 @@ function bbp_topic_tag_name() {
|
|
2708 |
*
|
2709 |
* @return string Term Name
|
2710 |
*/
|
2711 |
-
function bbp_get_topic_tag_name() {
|
2712 |
|
2713 |
// Get the term
|
2714 |
-
$
|
|
|
2715 |
|
2716 |
// Add before and after if description exists
|
2717 |
if ( !empty( $term->name ) )
|
@@ -2731,8 +2771,8 @@ function bbp_topic_tag_name() {
|
|
2731 |
*
|
2732 |
* @uses bbp_get_topic_tag_slug()
|
2733 |
*/
|
2734 |
-
function bbp_topic_tag_slug() {
|
2735 |
-
echo bbp_get_topic_tag_slug();
|
2736 |
}
|
2737 |
/**
|
2738 |
* Return the slug of the current tag
|
@@ -2745,10 +2785,11 @@ function bbp_topic_tag_slug() {
|
|
2745 |
*
|
2746 |
* @return string Term Name
|
2747 |
*/
|
2748 |
-
function bbp_get_topic_tag_slug() {
|
2749 |
|
2750 |
// Get the term
|
2751 |
-
$
|
|
|
2752 |
|
2753 |
// Add before and after if description exists
|
2754 |
if ( !empty( $term->slug ) )
|
@@ -2761,6 +2802,92 @@ function bbp_topic_tag_slug() {
|
|
2761 |
return apply_filters( 'bbp_get_topic_tag_slug', $retval );
|
2762 |
}
|
2763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2764 |
/**
|
2765 |
* Output the description of the current tag
|
2766 |
*
|
@@ -2787,13 +2914,15 @@ function bbp_topic_tag_description( $args = array() ) {
|
|
2787 |
|
2788 |
$defaults = array(
|
2789 |
'before' => '<div class="bbp-topic-tag-description"><p>',
|
2790 |
-
'after' => '</p></div>'
|
|
|
2791 |
);
|
2792 |
$r = wp_parse_args( $args, $defaults );
|
2793 |
extract( $r );
|
2794 |
|
2795 |
// Get the term
|
2796 |
-
$
|
|
|
2797 |
|
2798 |
// Add before and after if description exists
|
2799 |
if ( !empty( $term->description ) )
|
@@ -2919,7 +3048,7 @@ function bbp_form_topic_tags() {
|
|
2919 |
$topic_id = bbp_get_reply_topic_id( $post->ID );
|
2920 |
|
2921 |
// Topic exists and has tags
|
2922 |
-
if ( !empty( $topic_id ) && ( $terms = get_the_terms( $topic_id,
|
2923 |
|
2924 |
// Loop through them
|
2925 |
foreach( $terms as $term ) {
|
@@ -3021,7 +3150,7 @@ function bbp_form_topic_subscribed() {
|
|
3021 |
}
|
3022 |
|
3023 |
// Get current status
|
3024 |
-
} elseif (
|
3025 |
$topic_subscribed = bbp_is_user_subscribed( bbp_get_current_user_id() );
|
3026 |
|
3027 |
// No data
|
49 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
50 |
* @uses WP_Query To make query and get the topics
|
51 |
* @uses is_page() To check if it's a page
|
52 |
+
* @uses bbp_is_single_forum() To check if it's a forum
|
53 |
* @uses bbp_get_forum_id() To get the forum id
|
54 |
* @uses bbp_get_paged() To get the current page value
|
55 |
* @uses bbp_get_super_stickies() To get the super stickies
|
68 |
function bbp_has_topics( $args = '' ) {
|
69 |
global $wp_rewrite, $wp_query, $bbp, $wpdb;
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
// What are the default allowed statuses (based on user caps)
|
72 |
if ( !bbp_is_query_name( 'bbp_widget' ) && bbp_get_view_all() )
|
73 |
$default_status = join( ',', array( 'publish', $bbp->closed_status_id, $bbp->spam_status_id, 'trash' ) );
|
81 |
'post_type' => bbp_get_topic_post_type(),
|
82 |
|
83 |
// Forum ID
|
84 |
+
'post_parent' => bbp_is_single_forum() ? bbp_get_forum_id() : 'any',
|
85 |
|
86 |
// Make sure topic has some last activity time
|
87 |
'meta_key' => '_bbp_last_active_time',
|
102 |
's' => !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : '',
|
103 |
|
104 |
// Ignore sticky topics?
|
105 |
+
'show_stickies' => bbp_is_single_forum(),
|
106 |
|
107 |
// Maximum number of pages to show
|
108 |
'max_num_pages' => false,
|
121 |
extract( $bbp_t );
|
122 |
|
123 |
// If we're viewing a tax/term, use the existing query; if not, run our own
|
124 |
+
if ( bbp_is_topic_tag() && !bbp_is_query_name( 'bbp_widget' ) )
|
125 |
$bbp->topic_query = $wp_query;
|
126 |
else
|
127 |
$bbp->topic_query = new WP_Query( $bbp_t );
|
223 |
$bbp->topic_query->paged = $paged;
|
224 |
|
225 |
// Only add pagination if query returned results
|
226 |
+
if ( !bbp_is_query_name( 'bbp_widget' ) && ( (int) $bbp->topic_query->post_count || (int) $bbp->topic_query->found_posts ) && (int) $bbp->topic_query->posts_per_page ) {
|
227 |
|
228 |
// Limit the number of topics shown based on maximum allowed pages
|
229 |
if ( ( !empty( $max_num_pages ) ) && $bbp->topic_query->found_posts > $bbp->topic_query->max_num_pages * $bbp->topic_query->post_count )
|
234 |
|
235 |
// Profile page
|
236 |
if ( bbp_is_single_user() )
|
237 |
+
$base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
|
238 |
|
239 |
// View
|
240 |
elseif ( bbp_is_single_view() )
|
241 |
+
$base = bbp_get_view_url();
|
242 |
|
243 |
+
// Topic tag
|
244 |
+
elseif ( bbp_is_topic_tag() )
|
245 |
+
$base = bbp_get_topic_tag_link();
|
246 |
|
247 |
// Page or single post
|
248 |
elseif ( is_page() || is_single() )
|
249 |
+
$base = get_permalink();
|
250 |
+
|
251 |
+
// Topic archive
|
252 |
+
elseif ( bbp_is_topic_archive() )
|
253 |
+
$base = home_url( $bbp->topic_archive_slug );
|
254 |
|
255 |
// Default
|
256 |
else
|
257 |
+
$base = get_permalink( $post_parent );
|
258 |
+
|
259 |
+
// Use pagination base
|
260 |
+
$base = trailingslashit( $base ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
|
261 |
|
262 |
// Unpretty pagination
|
263 |
} else {
|
279 |
$bbp->topic_query->pagination_links = paginate_links ( $bbp_topic_pagination );
|
280 |
|
281 |
// Remove first page from pagination
|
282 |
+
$bbp->topic_query->pagination_links = str_replace( $wp_rewrite->pagination_base . "/1/'", "'", $bbp->topic_query->pagination_links );
|
283 |
}
|
284 |
|
285 |
// Return object
|
296 |
*/
|
297 |
function bbp_topics() {
|
298 |
global $bbp;
|
299 |
+
|
300 |
+
// Put into variable to check against next
|
301 |
+
$have_posts = $bbp->topic_query->have_posts();
|
302 |
+
|
303 |
+
// Reset the post data when finished
|
304 |
+
if ( empty( $have_posts ) )
|
305 |
+
wp_reset_postdata();
|
306 |
+
|
307 |
+
return $have_posts;
|
308 |
}
|
309 |
|
310 |
/**
|
337 |
*
|
338 |
* @param $topic_id Optional. Used to check emptiness
|
339 |
* @uses bbPress::topic_query::post::ID To get the topic id
|
340 |
+
* @uses bbp_is_single_topic() To check if it's a topic page
|
341 |
* @uses bbp_is_topic_edit() To check if it's a topic edit page
|
342 |
+
* @uses bbp_is_single_reply() To check if it it's a reply page
|
343 |
* @uses bbp_is_reply_edit() To check if it's a reply edit page
|
344 |
* @uses bbp_get_reply_topic_edit() To get the reply topic id
|
345 |
* @uses get_post_field() To get the post's post type
|
361 |
$bbp_topic_id = $bbp->topic_query->post->ID;
|
362 |
|
363 |
// Currently viewing a topic
|
364 |
+
elseif ( ( bbp_is_single_topic() || bbp_is_topic_edit() ) && isset( $wp_query->post->ID ) )
|
365 |
$bbp_topic_id = $bbp->current_topic_id = $wp_query->post->ID;
|
366 |
|
367 |
// Currently viewing a topic
|
368 |
+
elseif ( bbp_is_single_reply() )
|
369 |
$bbp_topic_id = $bbp->current_topic_id = bbp_get_reply_topic_id();
|
370 |
|
371 |
// Fallback
|
440 |
* shortcodes and other fun things.
|
441 |
* @uses bbp_get_topic_id() To get the topic id
|
442 |
* @uses get_permalink() To get the topic permalink
|
443 |
+
* @uses esc_url_raw() To clean the redirect_to url
|
444 |
* @uses apply_filters() Calls 'bbp_get_topic_permalink' with the link
|
445 |
* and topic id
|
446 |
* @return string Permanent link to topic
|
450 |
|
451 |
// Use the redirect address
|
452 |
if ( !empty( $redirect_to ) )
|
453 |
+
$topic_permalink = esc_url_raw( $redirect_to );
|
454 |
|
455 |
// Use the topic permalink
|
456 |
else
|
666 |
|
667 |
// If pretty permalinks are enabled, make our pagination pretty
|
668 |
if ( $wp_rewrite->using_permalinks() )
|
669 |
+
$base = trailingslashit( get_permalink( $topic_id ) ) . user_trailingslashit( $wp_rewrite->pagination_base . '/%#%/' );
|
670 |
else
|
671 |
$base = add_query_arg( 'paged', '%#%' );
|
672 |
|
694 |
|
695 |
// Remove first page from pagination
|
696 |
if ( $wp_rewrite->using_permalinks() )
|
697 |
+
$pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $pagination_links );
|
698 |
else
|
699 |
$pagination_links = str_replace( '&paged=1', '', $pagination_links );
|
700 |
|
718 |
* @return string Content with the revisions appended
|
719 |
*/
|
720 |
function bbp_topic_content_append_revisions( $content = '', $topic_id = 0 ) {
|
721 |
+
|
722 |
+
// Bail if in admin
|
723 |
+
if ( is_admin() )
|
724 |
+
return;
|
725 |
+
|
726 |
+
// Validate the ID
|
727 |
$topic_id = bbp_get_topic_id( $topic_id );
|
728 |
|
729 |
return apply_filters( 'bbp_topic_append_revisions', $content . bbp_get_topic_revision_log( $topic_id ), $content, $topic_id );
|
1186 |
* @param mixed|int $args If it is an integer, it is used as topic id.
|
1187 |
* Optional.
|
1188 |
* @uses bbp_get_topic_id() To get the topic id
|
|
|
1189 |
* @uses bbp_get_topic_author_display_name() To get the topic author
|
1190 |
* @uses bbp_is_topic_anonymous() To check if the topic is by an
|
1191 |
* anonymous user
|
1247 |
return apply_filters( 'bbp_get_topic_author_link', $author_link, $args );
|
1248 |
}
|
1249 |
|
1250 |
+
/**
|
1251 |
+
* Output the author url of the topic
|
1252 |
+
*
|
1253 |
+
* @since bbPress (r2590)
|
1254 |
+
*
|
1255 |
+
* @param int $topic_id Optional. Topic id
|
1256 |
+
* @uses bbp_get_topic_author_url() To get the topic author url
|
1257 |
+
*/
|
1258 |
+
function bbp_topic_author_url( $topic_id = 0 ) {
|
1259 |
+
echo bbp_get_topic_author_url( $topic_id );
|
1260 |
+
}
|
1261 |
|
1262 |
+
/**
|
1263 |
+
* Return the author url of the topic
|
1264 |
+
*
|
1265 |
+
* @since bbPress (r2590)
|
1266 |
+
*
|
1267 |
+
* @param int $topic_id Optional. Topic id
|
1268 |
+
* @uses bbp_get_topic_id() To get the topic id
|
1269 |
+
* @uses bbp_is_topic_anonymous() To check if the topic
|
1270 |
+
* is by an anonymous
|
1271 |
+
* user or not
|
1272 |
+
* @uses bbp_get_topic_author_id() To get topic author
|
1273 |
+
* id
|
1274 |
+
* @uses bbp_get_user_profile_url() To get profile url
|
1275 |
+
* @uses get_post_meta() To get anonmous user's website
|
1276 |
+
* @uses apply_filters() Calls
|
1277 |
+
* 'bbp_get_topic_author_url'
|
1278 |
+
* with the link & topic id
|
1279 |
+
* @return string Author URL of topic
|
1280 |
+
*/
|
1281 |
+
function bbp_get_topic_author_url( $topic_id = 0 ) {
|
1282 |
+
$topic_id = bbp_get_topic_id( $topic_id );
|
1283 |
+
|
1284 |
+
// Check for anonymous user
|
1285 |
+
if ( !bbp_is_topic_anonymous( $topic_id ) )
|
1286 |
+
$author_url = bbp_get_user_profile_url( bbp_get_topic_author_id( $topic_id ) );
|
1287 |
+
else
|
1288 |
+
if ( !$author_url = get_post_meta( $topic_id, '_bbp_anonymous_website', true ) )
|
1289 |
+
$author_url = '';
|
1290 |
+
|
1291 |
+
return apply_filters( 'bbp_get_topic_author_url', $author_url, $topic_id );
|
1292 |
+
}
|
1293 |
|
1294 |
/**
|
1295 |
* Output the title of the forum a topic belongs to
|
1616 |
* @uses bbp_get_topic_reply_count() To get the topic reply count
|
1617 |
* @uses bbp_get_topic_permalink() To get the topic permalink
|
1618 |
* @uses remove_query_arg() To remove args from the url
|
1619 |
+
* @uses bbp_get_topic_reply_count_hidden() To get the topic hidden
|
1620 |
* reply count
|
1621 |
* @uses current_user_can() To check if the current user can edit others
|
1622 |
* replies
|
1640 |
$retval .= $replies;
|
1641 |
|
1642 |
// This forum has hidden topics
|
1643 |
+
if ( current_user_can( 'edit_others_replies' ) && ( $deleted = bbp_get_topic_reply_count_hidden( $topic_id ) ) ) {
|
1644 |
|
1645 |
// Extra text
|
1646 |
$extra = sprintf( __( ' (+ %d hidden)', 'bbpress' ), $deleted );
|
1724 |
* @since bbPress (r2740)
|
1725 |
*
|
1726 |
* @param int $topic_id Optional. Topic id
|
1727 |
+
* @uses bbp_get_topic_reply_count_hidden() To get the topic hidden reply count
|
1728 |
*/
|
1729 |
+
function bbp_topic_reply_count_hidden( $topic_id = 0 ) {
|
1730 |
+
echo bbp_get_topic_reply_count_hidden( $topic_id );
|
1731 |
}
|
1732 |
/**
|
1733 |
* Return total hidden reply count of a topic (hidden includes trashed
|
1738 |
* @param int $topic_id Optional. Topic id
|
1739 |
* @uses bbp_get_topic_id() To get the topic id
|
1740 |
* @uses get_post_meta() To get the hidden reply count
|
1741 |
+
* @uses apply_filters() Calls 'bbp_get_topic_reply_count_hidden' with
|
1742 |
* the hidden reply count and topic id
|
1743 |
* @return int Topic hidden reply count
|
1744 |
*/
|
1745 |
+
function bbp_get_topic_reply_count_hidden( $topic_id = 0 ) {
|
1746 |
$topic_id = bbp_get_topic_id( $topic_id );
|
1747 |
+
$replies = get_post_meta( $topic_id, '_bbp_reply_count_hidden', true );
|
1748 |
|
1749 |
+
return apply_filters( 'bbp_get_topic_reply_count_hidden', (int) $replies, $topic_id );
|
1750 |
}
|
1751 |
|
1752 |
/**
|
1802 |
* @return string Tag list of the topic
|
1803 |
*/
|
1804 |
function bbp_get_topic_tag_list( $topic_id = 0, $args = '' ) {
|
|
|
1805 |
|
1806 |
$defaults = array(
|
1807 |
'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . ' ',
|
1814 |
|
1815 |
$topic_id = bbp_get_topic_id( $topic_id );
|
1816 |
|
1817 |
+
return get_the_term_list( $topic_id, bbp_get_topic_tag_tax_id(), $before, $sep, $after );
|
1818 |
}
|
1819 |
|
1820 |
/**
|
1877 |
* - after: After the links
|
1878 |
* - sep: Links separator
|
1879 |
* - links: Topic admin links array
|
|
|
1880 |
* @uses current_user_can() To check if the current user can edit/delete
|
1881 |
* the topic
|
1882 |
* @uses bbp_get_topic_edit_link() To get the topic edit link
|
1893 |
function bbp_get_topic_admin_links( $args = '' ) {
|
1894 |
global $bbp;
|
1895 |
|
1896 |
+
if ( !bbp_is_single_topic() )
|
1897 |
return;
|
1898 |
|
1899 |
$defaults = array (
|
1912 |
if ( empty( $r['links'] ) ) {
|
1913 |
$r['links'] = array(
|
1914 |
'edit' => bbp_get_topic_edit_link ( $r ),
|
|
|
1915 |
'close' => bbp_get_topic_close_link( $r ),
|
1916 |
'stick' => bbp_get_topic_stick_link( $r ),
|
1917 |
'merge' => bbp_get_topic_merge_link( $r ),
|
1918 |
+
'trash' => bbp_get_topic_trash_link( $r ),
|
1919 |
'spam' => bbp_get_topic_spam_link ( $r ),
|
1920 |
);
|
1921 |
}
|
1991 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $id ) );
|
1992 |
|
1993 |
// Bypass check if user has caps
|
1994 |
+
if ( !current_user_can( 'edit_others_topics' ) ) {
|
1995 |
|
1996 |
// User cannot edit or it is past the lock time
|
1997 |
if ( empty( $topic ) || !current_user_can( 'edit_topic', $topic->ID ) || bbp_past_edit_lock( $topic->post_date_gmt ) )
|
2105 |
$actions = array();
|
2106 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $id ) );
|
2107 |
|
2108 |
+
if ( empty( $topic ) || !current_user_can( 'delete_topic', $topic->ID ) ) {
|
2109 |
return;
|
2110 |
+
}
|
2111 |
|
2112 |
+
if ( bbp_is_topic_trash( $topic->ID ) ) {
|
2113 |
+
$actions['untrash'] = '<a title="' . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . esc_html( $restore_text ) . '</a>';
|
2114 |
+
} elseif ( EMPTY_TRASH_DAYS ) {
|
2115 |
+
$actions['trash'] = '<a title="' . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . esc_html( $trash_text ) . '</a>';
|
2116 |
+
}
|
2117 |
|
2118 |
+
if ( bbp_is_topic_trash( $topic->ID ) || !EMPTY_TRASH_DAYS ) {
|
2119 |
$actions['delete'] = '<a title="' . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . esc_html( $delete_text ) . '</a>';
|
2120 |
+
}
|
2121 |
|
2122 |
// Process the admin links
|
2123 |
$actions = implode( $sep, $actions );
|
2398 |
function bbp_get_forum_pagination_count() {
|
2399 |
global $bbp;
|
2400 |
|
2401 |
+
if ( empty( $bbp->topic_query ) )
|
2402 |
return false;
|
2403 |
|
2404 |
// Set pagination values
|
2442 |
function bbp_get_forum_pagination_links() {
|
2443 |
global $bbp;
|
2444 |
|
2445 |
+
if ( empty( $bbp->topic_query ) )
|
2446 |
return false;
|
2447 |
|
2448 |
return apply_filters( 'bbp_get_forum_pagination_links', $bbp->topic_query->pagination_links );
|
2453 |
*
|
2454 |
* @since bbPress (r2744)
|
2455 |
*
|
2456 |
+
* @uses bbp_is_single_topic() To check if it's a topic page
|
2457 |
* @uses bbp_get_topic_status() To get the topic status
|
2458 |
* @uses bbp_get_topic_id() To get the topic id
|
2459 |
* @uses apply_filters() Calls 'bbp_topic_notices' with the notice text, topic
|
2464 |
global $bbp;
|
2465 |
|
2466 |
// Bail if not viewing a topic
|
2467 |
+
if ( !bbp_is_single_topic() )
|
2468 |
return;
|
2469 |
|
2470 |
// Get the topic_status
|
2493 |
if ( !$notice_text = apply_filters( 'bbp_topic_notices', $notice_text, $topic_status, bbp_get_topic_id() ) )
|
2494 |
return;
|
2495 |
|
2496 |
+
bbp_add_error( 'topic_notice', $notice_text, 'message' );
|
2497 |
}
|
2498 |
|
2499 |
/**
|
2664 |
|
2665 |
/** Topic Tags ****************************************************************/
|
2666 |
|
2667 |
+
/**
|
2668 |
+
* Output the unique id of the topic tag taxonomy
|
2669 |
+
*
|
2670 |
+
* @since bbPress (r3348)
|
2671 |
+
*
|
2672 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
2673 |
+
*/
|
2674 |
+
function bbp_topic_tag_tax_id() {
|
2675 |
+
echo bbp_get_topic_tag_tax_id();
|
2676 |
+
}
|
2677 |
+
/**
|
2678 |
+
* Return the unique id of the topic tag taxonomy
|
2679 |
+
*
|
2680 |
+
* @since bbPress (r3348)
|
2681 |
+
*
|
2682 |
+
* @uses apply_filters() Calls 'bbp_get_topic_tag_tax_id' with the topic tax id
|
2683 |
+
* @return string The unique topic tag taxonomy
|
2684 |
+
*/
|
2685 |
+
function bbp_get_topic_tag_tax_id() {
|
2686 |
+
global $bbp;
|
2687 |
+
|
2688 |
+
return apply_filters( 'bbp_get_topic_tag_tax_id', $bbp->topic_tag_tax_id );
|
2689 |
+
}
|
2690 |
+
|
2691 |
/**
|
2692 |
* Output the id of the current tag
|
2693 |
*
|
2695 |
*
|
2696 |
* @uses bbp_get_topic_tag_id()
|
2697 |
*/
|
2698 |
+
function bbp_topic_tag_id( $tag = '' ) {
|
2699 |
+
echo bbp_get_topic_tag_id( $tag );
|
2700 |
}
|
2701 |
/**
|
2702 |
* Return the id of the current tag
|
2709 |
*
|
2710 |
* @return string Term Name
|
2711 |
*/
|
2712 |
+
function bbp_get_topic_tag_id( $tag = '' ) {
|
2713 |
|
2714 |
// Get the term
|
2715 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2716 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2717 |
|
2718 |
// Add before and after if description exists
|
2719 |
if ( !empty( $term->term_id ) )
|
2723 |
else
|
2724 |
$retval = '';
|
2725 |
|
2726 |
+
return apply_filters( 'bbp_get_topic_tag_id', (int) $retval );
|
2727 |
}
|
2728 |
|
2729 |
/**
|
2733 |
*
|
2734 |
* @uses bbp_get_topic_tag_name()
|
2735 |
*/
|
2736 |
+
function bbp_topic_tag_name( $tag = '' ) {
|
2737 |
+
echo bbp_get_topic_tag_name( $tag );
|
2738 |
}
|
2739 |
/**
|
2740 |
* Return the name of the current tag
|
2747 |
*
|
2748 |
* @return string Term Name
|
2749 |
*/
|
2750 |
+
function bbp_get_topic_tag_name( $tag = '' ) {
|
2751 |
|
2752 |
// Get the term
|
2753 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2754 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2755 |
|
2756 |
// Add before and after if description exists
|
2757 |
if ( !empty( $term->name ) )
|
2771 |
*
|
2772 |
* @uses bbp_get_topic_tag_slug()
|
2773 |
*/
|
2774 |
+
function bbp_topic_tag_slug( $tag = '' ) {
|
2775 |
+
echo bbp_get_topic_tag_slug( $tag );
|
2776 |
}
|
2777 |
/**
|
2778 |
* Return the slug of the current tag
|
2785 |
*
|
2786 |
* @return string Term Name
|
2787 |
*/
|
2788 |
+
function bbp_get_topic_tag_slug( $tag = '' ) {
|
2789 |
|
2790 |
// Get the term
|
2791 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2792 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2793 |
|
2794 |
// Add before and after if description exists
|
2795 |
if ( !empty( $term->slug ) )
|
2802 |
return apply_filters( 'bbp_get_topic_tag_slug', $retval );
|
2803 |
}
|
2804 |
|
2805 |
+
/**
|
2806 |
+
* Output the link of the current tag
|
2807 |
+
*
|
2808 |
+
* @since bbPress (r3348)
|
2809 |
+
*
|
2810 |
+
* @uses bbp_get_topic_tag_link()
|
2811 |
+
*/
|
2812 |
+
function bbp_topic_tag_link( $tag = '' ) {
|
2813 |
+
echo bbp_get_topic_tag_link( $tag );
|
2814 |
+
}
|
2815 |
+
/**
|
2816 |
+
* Return the link of the current tag
|
2817 |
+
*
|
2818 |
+
* @since bbPress (r3348)
|
2819 |
+
*
|
2820 |
+
* @uses get_term_by()
|
2821 |
+
* @uses get_query_var()
|
2822 |
+
* @uses apply_filters()
|
2823 |
+
*
|
2824 |
+
* @return string Term Name
|
2825 |
+
*/
|
2826 |
+
function bbp_get_topic_tag_link( $tag = '' ) {
|
2827 |
+
|
2828 |
+
// Get the term
|
2829 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2830 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2831 |
+
|
2832 |
+
// Add before and after if description exists
|
2833 |
+
if ( !empty( $term->term_id ) )
|
2834 |
+
$retval = get_term_link( $term, bbp_get_topic_tag_tax_id() );
|
2835 |
+
|
2836 |
+
// No link
|
2837 |
+
else
|
2838 |
+
$retval = '';
|
2839 |
+
|
2840 |
+
return apply_filters( 'bbp_get_topic_tag_link', $retval );
|
2841 |
+
}
|
2842 |
+
|
2843 |
+
/**
|
2844 |
+
* Output the link of the current tag
|
2845 |
+
*
|
2846 |
+
* @since bbPress (r3348)
|
2847 |
+
*
|
2848 |
+
* @uses bbp_get_topic_tag_edit_link()
|
2849 |
+
*/
|
2850 |
+
function bbp_topic_tag_edit_link( $tag = '' ) {
|
2851 |
+
echo bbp_get_topic_tag_edit_link( $tag );
|
2852 |
+
}
|
2853 |
+
/**
|
2854 |
+
* Return the link of the current tag
|
2855 |
+
*
|
2856 |
+
* @since bbPress (r3348)
|
2857 |
+
*
|
2858 |
+
* @uses get_term_by()
|
2859 |
+
* @uses get_query_var()
|
2860 |
+
* @uses apply_filters()
|
2861 |
+
*
|
2862 |
+
* @return string Term Name
|
2863 |
+
*/
|
2864 |
+
function bbp_get_topic_tag_edit_link( $tag = '' ) {
|
2865 |
+
global $wp_query;
|
2866 |
+
|
2867 |
+
// Get the term
|
2868 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2869 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2870 |
+
|
2871 |
+
// Add before and after if description exists
|
2872 |
+
if ( !empty( $term->term_id ) ) {
|
2873 |
+
|
2874 |
+
// Pretty
|
2875 |
+
if ( $wp_rewrite->using_permalinks() ) {
|
2876 |
+
$retval = user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . 'edit' );
|
2877 |
+
|
2878 |
+
// Ugly
|
2879 |
+
} else {
|
2880 |
+
$retval = add_query_arg( array( 'paged' => '%#%' ), bbp_get_topic_tag_link() );
|
2881 |
+
}
|
2882 |
+
|
2883 |
+
// No link
|
2884 |
+
} else {
|
2885 |
+
$retval = '';
|
2886 |
+
}
|
2887 |
+
|
2888 |
+
return apply_filters( 'bbp_get_topic_tag_edit_link', $retval );
|
2889 |
+
}
|
2890 |
+
|
2891 |
/**
|
2892 |
* Output the description of the current tag
|
2893 |
*
|
2914 |
|
2915 |
$defaults = array(
|
2916 |
'before' => '<div class="bbp-topic-tag-description"><p>',
|
2917 |
+
'after' => '</p></div>',
|
2918 |
+
'tag' => ''
|
2919 |
);
|
2920 |
$r = wp_parse_args( $args, $defaults );
|
2921 |
extract( $r );
|
2922 |
|
2923 |
// Get the term
|
2924 |
+
$tag = !empty( $tag ) ? $tag : get_query_var( 'term' );
|
2925 |
+
$term = get_term_by( 'slug', $tag, bbp_get_topic_tag_tax_id() );
|
2926 |
|
2927 |
// Add before and after if description exists
|
2928 |
if ( !empty( $term->description ) )
|
3048 |
$topic_id = bbp_get_reply_topic_id( $post->ID );
|
3049 |
|
3050 |
// Topic exists and has tags
|
3051 |
+
if ( !empty( $topic_id ) && ( $terms = get_the_terms( $topic_id, bbp_get_topic_tag_tax_id() ) ) ) {
|
3052 |
|
3053 |
// Loop through them
|
3054 |
foreach( $terms as $term ) {
|
3150 |
}
|
3151 |
|
3152 |
// Get current status
|
3153 |
+
} elseif ( bbp_is_single_topic() ) {
|
3154 |
$topic_subscribed = bbp_is_user_subscribed( bbp_get_current_user_id() );
|
3155 |
|
3156 |
// No data
|
bbp-includes/bbp-user-functions.php
CHANGED
@@ -352,55 +352,81 @@ function bbp_remove_user_favorite( $user_id, $topic_id ) {
|
|
352 |
*/
|
353 |
function bbp_favorites_handler() {
|
354 |
|
355 |
-
|
356 |
-
|
357 |
|
358 |
-
|
|
|
|
|
359 |
|
360 |
-
|
361 |
-
|
|
|
362 |
|
363 |
-
|
364 |
-
|
|
|
|
|
|
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
|
370 |
-
|
371 |
-
|
372 |
-
$bbp->errors->add( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found! Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
|
373 |
|
374 |
-
|
375 |
-
|
376 |
|
377 |
-
|
378 |
-
|
|
|
379 |
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
$success = bbp_add_user_favorite( $user_id, $topic_id );
|
384 |
|
385 |
-
|
386 |
-
|
387 |
|
388 |
-
|
389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
|
391 |
-
|
392 |
-
$redirect = bbp_is_favorites( false ) ? bbp_get_favorites_permalink( $user_id ) : bbp_get_topic_permalink( $topic_id );
|
393 |
-
wp_redirect( $redirect );
|
394 |
|
395 |
-
|
396 |
-
|
397 |
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
}
|
405 |
}
|
406 |
}
|
@@ -621,54 +647,77 @@ function bbp_subscriptions_handler() {
|
|
621 |
if ( !bbp_is_subscriptions_active() )
|
622 |
return false;
|
623 |
|
624 |
-
//
|
625 |
-
if ( 'GET'
|
|
|
626 |
|
627 |
-
|
|
|
|
|
628 |
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
631 |
|
632 |
-
|
633 |
-
|
|
|
|
|
|
|
|
|
634 |
|
635 |
-
|
636 |
-
|
637 |
-
$bbp->errors->add( 'bbp_subscription_permissions', __( '<strong>ERROR</strong>: You don\'t have the permission to edit favorites of that user!', 'bbpress' ) );
|
638 |
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
|
643 |
-
|
|
|
|
|
644 |
|
645 |
-
|
646 |
-
$success = false;
|
647 |
|
648 |
-
|
649 |
-
|
650 |
-
elseif ( !$is_subscription && 'bbp_subscribe' == $action )
|
651 |
-
$success = bbp_add_user_subscription( $user_id, $topic_id );
|
652 |
|
653 |
-
|
654 |
-
|
|
|
|
|
|
|
655 |
|
656 |
-
|
657 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
|
659 |
-
|
660 |
-
$redirect = bbp_is_subscriptions( false ) ? bbp_get_subscriptions_permalink( $user_id ) : bbp_get_topic_permalink( $topic_id );
|
661 |
-
wp_redirect( $redirect );
|
662 |
|
663 |
-
|
664 |
-
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
}
|
673 |
}
|
674 |
}
|
@@ -707,83 +756,88 @@ function bbp_subscriptions_handler() {
|
|
707 |
*/
|
708 |
function bbp_edit_user_handler() {
|
709 |
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
// Execute confirmed email change. See send_confirmation_on_profile_email().
|
715 |
-
if ( is_multisite() && bbp_is_user_home() && isset( $_GET['newuseremail'] ) && $bbp->displayed_user->ID ) {
|
716 |
|
717 |
-
|
|
|
|
|
718 |
|
719 |
-
|
720 |
-
$user->ID = $bbp->displayed_user->ID;
|
721 |
-
$user->user_email = esc_html( trim( $new_email['newemail'] ) );
|
722 |
|
723 |
-
|
724 |
-
|
725 |
|
726 |
-
|
727 |
-
delete_option( $bbp->displayed_user->ID . '_new_email' );
|
728 |
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
|
733 |
-
|
|
|
734 |
|
|
|
735 |
delete_option( $bbp->displayed_user->ID . '_new_email' );
|
|
|
736 |
wp_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $bbp->displayed_user->ID ) ) );
|
737 |
exit;
|
738 |
-
|
739 |
}
|
740 |
|
741 |
-
|
742 |
|
743 |
-
|
744 |
-
|
|
|
745 |
|
746 |
-
|
747 |
-
do_action( 'personal_options_update', $bbp->displayed_user->ID );
|
748 |
-
else
|
749 |
-
do_action( 'edit_user_profile_update', $bbp->displayed_user->ID );
|
750 |
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
}
|
|
|
771 |
|
772 |
-
|
773 |
|
774 |
-
|
775 |
-
|
776 |
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
|
781 |
-
|
782 |
-
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
}
|
787 |
}
|
788 |
}
|
789 |
|
@@ -841,4 +895,87 @@ function bbp_get_total_users() {
|
|
841 |
return apply_filters( 'bbp_get_total_users', (int) $bbp_total_users );
|
842 |
}
|
843 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
?>
|
352 |
*/
|
353 |
function bbp_favorites_handler() {
|
354 |
|
355 |
+
if ( !bbp_is_favorites_active() )
|
356 |
+
return false;
|
357 |
|
358 |
+
// Bail if not a GET action
|
359 |
+
if ( 'GET' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
360 |
+
return;
|
361 |
|
362 |
+
// Bail if required GET actions aren't passed
|
363 |
+
if ( empty( $_GET['topic_id'] ) || empty( $_GET['action'] ) )
|
364 |
+
return;
|
365 |
|
366 |
+
// Setup possible get actions
|
367 |
+
$possible_actions = array(
|
368 |
+
'bbp_favorite_add',
|
369 |
+
'bbp_favorite_remove',
|
370 |
+
);
|
371 |
|
372 |
+
// Bail if actions aren't meant for this function
|
373 |
+
if ( !in_array( $_GET['action'], $possible_actions ) )
|
374 |
+
return;
|
375 |
|
376 |
+
// What action is taking place?
|
377 |
+
$action = $_GET['action'];
|
|
|
378 |
|
379 |
+
// Get user_id
|
380 |
+
$user_id = bbp_get_user_id( 0, true, true );
|
381 |
|
382 |
+
// Check current user's ability to edit the user
|
383 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
384 |
+
bbp_add_error( 'bbp_favorite_permissions', __( '<strong>ERROR</strong>: You don\'t have the permission to edit favorites of that user!', 'bbpress' ) );
|
385 |
|
386 |
+
// Load favorite info
|
387 |
+
if ( !$topic_id = intval( $_GET['topic_id'] ) )
|
388 |
+
bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found! Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
|
|
|
389 |
|
390 |
+
$is_favorite = bbp_is_user_favorite( $user_id, $topic_id );
|
391 |
+
$success = false;
|
392 |
|
393 |
+
// Handle insertion into posts table
|
394 |
+
if ( !empty( $topic_id ) && !empty( $user_id ) && ( !bbp_has_errors() ) ) {
|
395 |
+
|
396 |
+
if ( $is_favorite && 'bbp_favorite_remove' == $action ) {
|
397 |
+
$success = bbp_remove_user_favorite( $user_id, $topic_id );
|
398 |
+
} elseif ( !$is_favorite && 'bbp_favorite_add' == $action ) {
|
399 |
+
$success = bbp_add_user_favorite( $user_id, $topic_id );
|
400 |
+
}
|
401 |
+
|
402 |
+
// Do additional favorites actions
|
403 |
+
do_action( 'bbp_favorites_handler', $success, $user_id, $topic_id, $action );
|
404 |
+
|
405 |
+
// Check for missing reply_id or error
|
406 |
+
if ( true == $success ) {
|
407 |
+
|
408 |
+
// Redirect back to new reply
|
409 |
+
if ( bbp_is_favorites() ) {
|
410 |
+
$redirect = bbp_get_favorites_permalink( $user_id );
|
411 |
+
} elseif ( bbp_is_single_user() ) {
|
412 |
+
$redirect = bbp_get_user_profile_url();
|
413 |
+
} elseif ( is_singular( bbp_get_topic_post_type() ) ) {
|
414 |
+
$redirect = bbp_get_topic_permalink( $topic_id );
|
415 |
+
} elseif ( is_single() || is_page() ) {
|
416 |
+
$redirect = get_permalink();
|
417 |
+
}
|
418 |
|
419 |
+
wp_redirect( $redirect );
|
|
|
|
|
420 |
|
421 |
+
// For good measure
|
422 |
+
exit();
|
423 |
|
424 |
+
// Handle errors
|
425 |
+
} else {
|
426 |
+
if ( $is_favorite && 'bbp_favorite_remove' == $action ) {
|
427 |
+
bbp_add_error( 'bbp_favorite_remove', __( '<strong>ERROR</strong>: There was a problem removing that topic from favorites!', 'bbpress' ) );
|
428 |
+
} elseif ( !$is_favorite && 'bbp_favorite_add' == $action ) {
|
429 |
+
bbp_add_error( 'bbp_favorite_add', __( '<strong>ERROR</strong>: There was a problem favoriting that topic!', 'bbpress' ) );
|
430 |
}
|
431 |
}
|
432 |
}
|
647 |
if ( !bbp_is_subscriptions_active() )
|
648 |
return false;
|
649 |
|
650 |
+
// Bail if not a GET action
|
651 |
+
if ( 'GET' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
652 |
+
return;
|
653 |
|
654 |
+
// Bail if required GET actions aren't passed
|
655 |
+
if ( empty( $_GET['topic_id'] ) || empty( $_GET['action'] ) )
|
656 |
+
return;
|
657 |
|
658 |
+
// Setup possible get actions
|
659 |
+
$possible_actions = array(
|
660 |
+
'bbp_subscribe',
|
661 |
+
'bbp_unsubscribe',
|
662 |
+
);
|
663 |
|
664 |
+
// Bail if actions aren't meant for this function
|
665 |
+
if ( !in_array( $_GET['action'], $possible_actions ) )
|
666 |
+
return;
|
667 |
+
|
668 |
+
// What action is taking place?
|
669 |
+
$action = $_GET['action'];
|
670 |
|
671 |
+
// Get user_id
|
672 |
+
$user_id = bbp_get_user_id( 0, true, true );
|
|
|
673 |
|
674 |
+
// Check current user's ability to edit the user
|
675 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
676 |
+
bbp_add_error( 'bbp_subscription_permissions', __( '<strong>ERROR</strong>: You don\'t have the permission to edit favorites of that user!', 'bbpress' ) );
|
677 |
|
678 |
+
// Load subscription info
|
679 |
+
if ( !$topic_id = intval( $_GET['topic_id'] ) )
|
680 |
+
bbp_add_error( 'bbp_subscription_topic_id', __( '<strong>ERROR</strong>: No topic was found! Which topic are you subscribing/unsubscribing to?', 'bbpress' ) );
|
681 |
|
682 |
+
if ( !bbp_has_errors() ) {
|
|
|
683 |
|
684 |
+
$is_subscription = bbp_is_user_subscribed( $user_id, $topic_id );
|
685 |
+
$success = false;
|
|
|
|
|
686 |
|
687 |
+
if ( $is_subscription && 'bbp_unsubscribe' == $action ) {
|
688 |
+
$success = bbp_remove_user_subscription( $user_id, $topic_id );
|
689 |
+
} elseif ( !$is_subscription && 'bbp_subscribe' == $action ) {
|
690 |
+
$success = bbp_add_user_subscription( $user_id, $topic_id );
|
691 |
+
}
|
692 |
|
693 |
+
// Do additional subscriptions actions
|
694 |
+
do_action( 'bbp_subscriptions_handler', $success, $user_id, $topic_id, $action );
|
695 |
+
|
696 |
+
// Check for missing reply_id or error
|
697 |
+
if ( true == $success ) {
|
698 |
+
|
699 |
+
// Redirect back to new reply
|
700 |
+
if ( bbp_is_subscriptions() ) {
|
701 |
+
$redirect = bbp_get_subscriptions_permalink( $user_id );
|
702 |
+
} elseif( bbp_is_single_user() ) {
|
703 |
+
$redirect = bbp_get_user_profile_url();
|
704 |
+
} elseif ( is_singular( bbp_get_topic_post_type() ) ) {
|
705 |
+
$redirect = bbp_get_topic_permalink( $topic_id );
|
706 |
+
} elseif ( is_single() || is_page() ) {
|
707 |
+
$redirect = get_permalink();
|
708 |
+
}
|
709 |
|
710 |
+
wp_redirect( $redirect );
|
|
|
|
|
711 |
|
712 |
+
// For good measure
|
713 |
+
exit();
|
714 |
|
715 |
+
// Handle errors
|
716 |
+
} else {
|
717 |
+
if ( $is_subscription && 'bbp_unsubscribe' == $action ) {
|
718 |
+
bbp_add_error( 'bbp_unsubscribe', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that topic!', 'bbpress' ) );
|
719 |
+
} elseif ( !$is_subscription && 'bbp_subscribe' == $action ) {
|
720 |
+
bbp_add_error( 'bbp_subscribe', __( '<strong>ERROR</strong>: There was a problem subscribing to that topic!', 'bbpress' ) );
|
721 |
}
|
722 |
}
|
723 |
}
|
756 |
*/
|
757 |
function bbp_edit_user_handler() {
|
758 |
|
759 |
+
// Bail if not a POST action
|
760 |
+
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
|
761 |
+
return;
|
|
|
|
|
|
|
762 |
|
763 |
+
// Bail if action is not 'bbp-update-user'
|
764 |
+
if ( empty( $_POST['action'] ) || ( 'bbp-update-user' !== $_POST['action'] ) )
|
765 |
+
return;
|
766 |
|
767 |
+
global $bbp, $wpdb;
|
|
|
|
|
768 |
|
769 |
+
// Execute confirmed email change. See send_confirmation_on_profile_email().
|
770 |
+
if ( is_multisite() && bbp_is_user_home() && isset( $_GET['newuseremail'] ) && $bbp->displayed_user->ID ) {
|
771 |
|
772 |
+
$new_email = get_option( $bbp->displayed_user->ID . '_new_email' );
|
|
|
773 |
|
774 |
+
if ( $new_email['hash'] == $_GET['newuseremail'] ) {
|
775 |
+
$user->ID = $bbp->displayed_user->ID;
|
776 |
+
$user->user_email = esc_html( trim( $new_email['newemail'] ) );
|
777 |
|
778 |
+
if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $bbp->displayed_user->user_login ) ) )
|
779 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, $bbp->displayed_user->user_login ) );
|
780 |
|
781 |
+
wp_update_user( get_object_vars( $user ) );
|
782 |
delete_option( $bbp->displayed_user->ID . '_new_email' );
|
783 |
+
|
784 |
wp_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $bbp->displayed_user->ID ) ) );
|
785 |
exit;
|
|
|
786 |
}
|
787 |
|
788 |
+
} elseif ( is_multisite() && bbp_is_user_home() && !empty( $_GET['dismiss'] ) && $bbp->displayed_user->ID . '_new_email' == $_GET['dismiss'] ) {
|
789 |
|
790 |
+
delete_option( $bbp->displayed_user->ID . '_new_email' );
|
791 |
+
wp_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $bbp->displayed_user->ID ) ) );
|
792 |
+
exit;
|
793 |
|
794 |
+
}
|
|
|
|
|
|
|
795 |
|
796 |
+
check_admin_referer( 'update-user_' . $bbp->displayed_user->ID );
|
797 |
+
|
798 |
+
if ( !current_user_can( 'edit_user', $bbp->displayed_user->ID ) )
|
799 |
+
wp_die( __( 'What are you doing here? You do not have the permission to edit this user.', 'bbpress' ) );
|
800 |
+
|
801 |
+
if ( bbp_is_user_home() )
|
802 |
+
do_action( 'personal_options_update', $bbp->displayed_user->ID );
|
803 |
+
else
|
804 |
+
do_action( 'edit_user_profile_update', $bbp->displayed_user->ID );
|
805 |
+
|
806 |
+
if ( !is_multisite() ) {
|
807 |
+
$bbp->errors = edit_user( $bbp->displayed_user->ID ); // Handles the trouble for us ;)
|
808 |
+
} else {
|
809 |
+
$user = get_userdata( $bbp->displayed_user->ID );
|
810 |
+
|
811 |
+
// Update the email address in signups, if present.
|
812 |
+
if ( $user->user_login && isset( $_POST['email'] ) && is_email( $_POST['email'] ) && $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $user->user_login ) ) )
|
813 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $_POST['email'], $user_login ) );
|
814 |
+
|
815 |
+
// WPMU must delete the user from the current blog if WP added him after editing.
|
816 |
+
$delete_role = false;
|
817 |
+
$blog_prefix = $wpdb->get_blog_prefix();
|
818 |
+
|
819 |
+
if ( $bbp->displayed_user->ID != $bbp->displayed_user->ID ) {
|
820 |
+
$cap = $wpdb->get_var( "SELECT meta_value FROM {$wpdb->usermeta} WHERE user_id = '{$bbp->displayed_user->ID}' AND meta_key = '{$blog_prefix}capabilities' AND meta_value = 'a:0:{}'" );
|
821 |
+
if ( !is_network_admin() && null == $cap && $_POST['role'] == '' ) {
|
822 |
+
$_POST['role'] = 'contributor';
|
823 |
+
$delete_role = true;
|
824 |
}
|
825 |
+
}
|
826 |
|
827 |
+
$bbp->errors = edit_user( $bbp->displayed_user->ID );
|
828 |
|
829 |
+
if ( $delete_role ) // stops users being added to current blog when they are edited
|
830 |
+
delete_user_meta( $bbp->displayed_user->ID, $blog_prefix . 'capabilities' );
|
831 |
|
832 |
+
if ( is_multisite() && is_network_admin() & !bbp_is_user_home() && current_user_can( 'manage_network_options' ) && !isset( $super_admins ) && empty( $_POST['super_admin'] ) == is_super_admin( $bbp->displayed_user->ID ) )
|
833 |
+
empty( $_POST['super_admin'] ) ? revoke_super_admin( $bbp->displayed_user->ID ) : grant_super_admin( $bbp->displayed_user->ID );
|
834 |
+
}
|
835 |
|
836 |
+
if ( !bbp_has_errors() ) {
|
837 |
+
$redirect = add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $bbp->displayed_user->ID ) );
|
838 |
|
839 |
+
wp_redirect( $redirect );
|
840 |
+
exit;
|
|
|
841 |
}
|
842 |
}
|
843 |
|
895 |
return apply_filters( 'bbp_get_total_users', (int) $bbp_total_users );
|
896 |
}
|
897 |
|
898 |
+
/** User Status ***************************************************************/
|
899 |
+
|
900 |
+
/**
|
901 |
+
* Checks if the user has been marked as a spammer.
|
902 |
+
*
|
903 |
+
* @since bbPress (r3355)
|
904 |
+
*
|
905 |
+
* @param int $user_id int The ID for the user.
|
906 |
+
* @return bool True if spammer, False if not.
|
907 |
+
*/
|
908 |
+
function bbp_is_user_spammer( $user_id = 0 ) {
|
909 |
+
|
910 |
+
// Default to current user
|
911 |
+
if ( empty( $user_id ) && is_user_logged_in() )
|
912 |
+
$user_id = bbp_get_current_user_id();
|
913 |
+
|
914 |
+
// No user to check
|
915 |
+
if ( empty( $user_id ) )
|
916 |
+
return false;
|
917 |
+
|
918 |
+
// Assume user is not spam
|
919 |
+
$is_spammer = false;
|
920 |
+
|
921 |
+
// Get user data
|
922 |
+
$user = get_userdata( $user_id );
|
923 |
+
|
924 |
+
// No user found
|
925 |
+
if ( empty( $user ) ) {
|
926 |
+
$is_spammer = false;
|
927 |
+
|
928 |
+
// User found
|
929 |
+
} else {
|
930 |
+
|
931 |
+
// Check if spam
|
932 |
+
if ( !empty( $user->spam ) )
|
933 |
+
$is_spammer = true;
|
934 |
+
|
935 |
+
if ( 'spam' == $user->user_status )
|
936 |
+
$is_spammer = true;
|
937 |
+
}
|
938 |
+
|
939 |
+
return apply_filters( 'bp_core_is_user_spammer', (bool) $is_spammer );
|
940 |
+
}
|
941 |
+
|
942 |
+
/**
|
943 |
+
* Checks if the user has been marked as deleted.
|
944 |
+
*
|
945 |
+
* @since bbPress (r3355)
|
946 |
+
*
|
947 |
+
* @param int $user_id int The ID for the user.
|
948 |
+
* @return bool True if deleted, False if not.
|
949 |
+
*/
|
950 |
+
function bbp_is_user_deleted( $user_id = 0 ) {
|
951 |
+
|
952 |
+
// No user to check
|
953 |
+
if ( empty( $user_id ) )
|
954 |
+
return false;
|
955 |
+
|
956 |
+
// Assume user is not deleted
|
957 |
+
$is_deleted = false;
|
958 |
+
|
959 |
+
// Get user data
|
960 |
+
$user = get_userdata( $user_id );
|
961 |
+
|
962 |
+
// No user found
|
963 |
+
if ( empty( $user ) ) {
|
964 |
+
$is_deleted = true;
|
965 |
+
|
966 |
+
// User found
|
967 |
+
} else {
|
968 |
+
|
969 |
+
// Check if deleted
|
970 |
+
if ( !empty( $user->deleted ) )
|
971 |
+
$is_deleted = true;
|
972 |
+
|
973 |
+
if ( 'deleted' == $user->user_status )
|
974 |
+
$is_deleted = true;
|
975 |
+
|
976 |
+
}
|
977 |
+
|
978 |
+
return apply_filters( 'bp_core_is_user_deleted', (bool) $is_deleted );
|
979 |
+
}
|
980 |
+
|
981 |
?>
|
bbp-includes/bbp-user-template.php
CHANGED
@@ -257,6 +257,11 @@ function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) {
|
|
257 |
if ( !$user_id = bbp_get_user_id( $user_id ) )
|
258 |
return false;
|
259 |
|
|
|
|
|
|
|
|
|
|
|
260 |
// Pretty permalinks
|
261 |
if ( $wp_rewrite->using_permalinks() ) {
|
262 |
$url = $wp_rewrite->root . $bbp->user_slug . '/%' . $bbp->user_id . '%';
|
@@ -568,7 +573,13 @@ function bbp_user_favorites_link( $add = array(), $rem = array(), $user_id = 0 )
|
|
568 |
}
|
569 |
|
570 |
// Create the link based where the user is and if the topic is already the user's favorite
|
571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
$url = esc_url( wp_nonce_url( add_query_arg( $favs, $permalink ), 'toggle-favorite_' . $topic_id ) );
|
573 |
$is_fav = $is_fav ? 'is-favorite' : '';
|
574 |
$html = '<span id="favorite-toggle"><span id="favorite-' . $topic_id . '" class="' . $is_fav . '">' . $pre . '<a href="' . $url . '" class="dim:favorite-toggle:favorite-' . $topic_id . ':is-favorite">' . $mid . '</a>' . $post . '</span></span>';
|
@@ -678,7 +689,13 @@ function bbp_user_subscribe_link( $args = '' ) {
|
|
678 |
}
|
679 |
|
680 |
// Create the link based where the user is and if the user is subscribed already
|
681 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
$url = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-subscription_' . $topic_id ) );
|
683 |
$is_subscribed = $is_subscribed ? 'is-subscribed' : '';
|
684 |
$html = '<span id="subscription-toggle">' . $before . '<span id="subscribe-' . $topic_id . '" class="' . $is_subscribed . '"><a href="' . $url . '" class="dim:subscription-toggle:subscribe-' . $topic_id . ':is-subscribed">' . $text . '</a></span>' . $after . '</span>';
|
@@ -840,11 +857,11 @@ function bbp_login_notices() {
|
|
840 |
|
841 |
// loggedout was passed
|
842 |
if ( !empty( $_GET['loggedout'] ) && ( true == $_GET['loggedout'] ) ) {
|
843 |
-
|
844 |
|
845 |
// registration is disabled
|
846 |
} elseif ( !empty( $_GET['registration'] ) && ( 'disabled' == $_GET['registration'] ) ) {
|
847 |
-
|
848 |
|
849 |
// Prompt user to check their email
|
850 |
} elseif ( !empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ) ) ) {
|
@@ -853,17 +870,17 @@ function bbp_login_notices() {
|
|
853 |
|
854 |
// Email needs confirmation
|
855 |
case 'confirm' :
|
856 |
-
|
857 |
break;
|
858 |
|
859 |
// User requested a new password
|
860 |
case 'newpass' :
|
861 |
-
|
862 |
break;
|
863 |
|
864 |
// User is newly registered
|
865 |
case 'registered' :
|
866 |
-
|
867 |
break;
|
868 |
}
|
869 |
}
|
@@ -1052,6 +1069,26 @@ function bbp_author_link( $args = '' ) {
|
|
1052 |
|
1053 |
/** Capabilities **************************************************************/
|
1054 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1055 |
function bbp_user_can_view_forum( $args = '' ) {
|
1056 |
|
1057 |
$defaults = array(
|
@@ -1086,6 +1123,74 @@ function bbp_user_can_view_forum( $args = '' ) {
|
|
1086 |
return apply_filters( 'bbp_user_can_view_forum', $retval, $forum_id, $user_id );
|
1087 |
}
|
1088 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
/** Forms *********************************************************************/
|
1090 |
|
1091 |
/**
|
@@ -1158,63 +1263,52 @@ function bbp_current_user_can_access_create_topic_form() {
|
|
1158 |
// Users need to earn access
|
1159 |
$retval = false;
|
1160 |
|
1161 |
-
// Looking at a single forum
|
1162 |
-
if (
|
1163 |
-
|
1164 |
-
// Forum is open
|
1165 |
-
if ( bbp_is_forum_open() ) {
|
1166 |
-
|
1167 |
-
// What is the visibility of this forum
|
1168 |
-
switch ( bbp_get_forum_visibility() ) {
|
1169 |
-
|
1170 |
-
// Public
|
1171 |
-
case 'publish' :
|
1172 |
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
// Anonymous posting is allowed
|
1178 |
-
if ( bbp_allow_anonymous() && !is_user_logged_in() )
|
1179 |
-
$retval = true;
|
1180 |
-
|
1181 |
-
break;
|
1182 |
-
|
1183 |
-
// Private forums
|
1184 |
-
case 'private' :
|
1185 |
-
if ( current_user_can( 'read_private_forums' ) )
|
1186 |
-
$retval = true;
|
1187 |
-
|
1188 |
-
break;
|
1189 |
-
|
1190 |
-
// Hidden forums
|
1191 |
-
case 'hidden' :
|
1192 |
-
if ( current_user_can( 'read_hidden_forums' ) )
|
1193 |
-
$retval = true;
|
1194 |
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
|
1199 |
-
|
1200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1201 |
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
|
1206 |
-
//
|
1207 |
-
|
1208 |
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
$retval = true;
|
1213 |
|
|
|
|
|
|
|
1214 |
}
|
1215 |
|
1216 |
// Allow access to be filtered
|
1217 |
-
return apply_filters( 'bbp_current_user_can_access_create_topic_form', $retval );
|
1218 |
}
|
1219 |
|
1220 |
?>
|
257 |
if ( !$user_id = bbp_get_user_id( $user_id ) )
|
258 |
return false;
|
259 |
|
260 |
+
// Allow early overriding of the profile URL to cut down on processing
|
261 |
+
$early_profile_url = apply_filters( 'bbp_pre_get_user_profile_url', (int) $user_id );
|
262 |
+
if ( is_string( $early_profile_url ) )
|
263 |
+
return $early_profile_url;
|
264 |
+
|
265 |
// Pretty permalinks
|
266 |
if ( $wp_rewrite->using_permalinks() ) {
|
267 |
$url = $wp_rewrite->root . $bbp->user_slug . '/%' . $bbp->user_id . '%';
|
573 |
}
|
574 |
|
575 |
// Create the link based where the user is and if the topic is already the user's favorite
|
576 |
+
if ( bbp_is_favorites() )
|
577 |
+
$permalink = bbp_get_favorites_permalink( $user_id );
|
578 |
+
elseif ( is_singular( bbp_get_topic_post_type() ) )
|
579 |
+
$permalink = bbp_get_topic_permalink( $topic_id );
|
580 |
+
elseif ( bbp_is_query_name( 'bbp_single_topic' ) )
|
581 |
+
$permalink = get_permalink();
|
582 |
+
|
583 |
$url = esc_url( wp_nonce_url( add_query_arg( $favs, $permalink ), 'toggle-favorite_' . $topic_id ) );
|
584 |
$is_fav = $is_fav ? 'is-favorite' : '';
|
585 |
$html = '<span id="favorite-toggle"><span id="favorite-' . $topic_id . '" class="' . $is_fav . '">' . $pre . '<a href="' . $url . '" class="dim:favorite-toggle:favorite-' . $topic_id . ':is-favorite">' . $mid . '</a>' . $post . '</span></span>';
|
689 |
}
|
690 |
|
691 |
// Create the link based where the user is and if the user is subscribed already
|
692 |
+
if ( bbp_is_subscriptions() )
|
693 |
+
$permalink = bbp_get_subscriptions_permalink( $user_id );
|
694 |
+
elseif ( is_singular( bbp_get_topic_post_type() ) )
|
695 |
+
$permalink = bbp_get_topic_permalink( $topic_id );
|
696 |
+
elseif ( bbp_is_query_name( 'bbp_single_topic' ) )
|
697 |
+
$permalink = get_permalink();
|
698 |
+
|
699 |
$url = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-subscription_' . $topic_id ) );
|
700 |
$is_subscribed = $is_subscribed ? 'is-subscribed' : '';
|
701 |
$html = '<span id="subscription-toggle">' . $before . '<span id="subscribe-' . $topic_id . '" class="' . $is_subscribed . '"><a href="' . $url . '" class="dim:subscription-toggle:subscribe-' . $topic_id . ':is-subscribed">' . $text . '</a></span>' . $after . '</span>';
|
857 |
|
858 |
// loggedout was passed
|
859 |
if ( !empty( $_GET['loggedout'] ) && ( true == $_GET['loggedout'] ) ) {
|
860 |
+
bbp_add_error( 'loggedout', __( 'You are now logged out.', 'bbpress' ), 'message' );
|
861 |
|
862 |
// registration is disabled
|
863 |
} elseif ( !empty( $_GET['registration'] ) && ( 'disabled' == $_GET['registration'] ) ) {
|
864 |
+
bbp_add_error( 'registerdisabled', __( 'New user registration is currently not allowed.', 'bbpress' ) );
|
865 |
|
866 |
// Prompt user to check their email
|
867 |
} elseif ( !empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ) ) ) {
|
870 |
|
871 |
// Email needs confirmation
|
872 |
case 'confirm' :
|
873 |
+
bbp_add_error( 'confirm', __( 'Check your e-mail for the confirmation link.', 'bbpress' ), 'message' );
|
874 |
break;
|
875 |
|
876 |
// User requested a new password
|
877 |
case 'newpass' :
|
878 |
+
bbp_add_error( 'newpass', __( 'Check your e-mail for your new password.', 'bbpress' ), 'message' );
|
879 |
break;
|
880 |
|
881 |
// User is newly registered
|
882 |
case 'registered' :
|
883 |
+
bbp_add_error( 'registered', __( 'Registration complete. Please check your e-mail.', 'bbpress' ), 'message' );
|
884 |
break;
|
885 |
}
|
886 |
}
|
1069 |
|
1070 |
/** Capabilities **************************************************************/
|
1071 |
|
1072 |
+
/**
|
1073 |
+
* Check if the user can access a specific forum
|
1074 |
+
*
|
1075 |
+
* @since bbPress (r3127)
|
1076 |
+
*
|
1077 |
+
* @uses bbp_get_current_user_id()
|
1078 |
+
* @uses bbp_get_forum_id()
|
1079 |
+
* @uses bbp_allow_anonymous()
|
1080 |
+
* @uses wp_parse_args()
|
1081 |
+
* @uses bbp_get_user_id()
|
1082 |
+
* @uses current_user_can()
|
1083 |
+
* @uses is_super_admin()
|
1084 |
+
* @uses bbp_is_forum_public()
|
1085 |
+
* @uses bbp_is_forum_private()
|
1086 |
+
* @uses bbp_is_forum_hidden()
|
1087 |
+
* @uses current_user_can()
|
1088 |
+
* @uses apply_filters()
|
1089 |
+
*
|
1090 |
+
* @return bool
|
1091 |
+
*/
|
1092 |
function bbp_user_can_view_forum( $args = '' ) {
|
1093 |
|
1094 |
$defaults = array(
|
1123 |
return apply_filters( 'bbp_user_can_view_forum', $retval, $forum_id, $user_id );
|
1124 |
}
|
1125 |
|
1126 |
+
/**
|
1127 |
+
* Check if the current user can publish topics
|
1128 |
+
*
|
1129 |
+
* @since bbPress (r3127)
|
1130 |
+
*
|
1131 |
+
* @uses is_super_admin()
|
1132 |
+
* @uses is_user_logged_in()
|
1133 |
+
* @uses bbp_allow_anonymous()
|
1134 |
+
* @uses current_user_can()
|
1135 |
+
* @uses apply_filters()
|
1136 |
+
*
|
1137 |
+
* @return bool
|
1138 |
+
*/
|
1139 |
+
function bbp_current_user_can_publish_topics() {
|
1140 |
+
|
1141 |
+
// Users need to earn access
|
1142 |
+
$retval = false;
|
1143 |
+
|
1144 |
+
// Always allow super admins
|
1145 |
+
if ( is_super_admin() )
|
1146 |
+
$retval = true;
|
1147 |
+
|
1148 |
+
// Do not allow anonymous if not enabled
|
1149 |
+
elseif ( !is_user_logged_in() && bbp_allow_anonymous() )
|
1150 |
+
$retval = true;
|
1151 |
+
|
1152 |
+
// User is logged in
|
1153 |
+
elseif ( !bbp_is_user_spammer() && !bbp_is_user_deleted() && current_user_can( 'publish_topics' ) )
|
1154 |
+
$retval = true;
|
1155 |
+
|
1156 |
+
// Allow access to be filtered
|
1157 |
+
return apply_filters( 'bbp_current_user_can_publish_topics', (bool) $retval );
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
/**
|
1161 |
+
* Check if the current user can publish replies
|
1162 |
+
*
|
1163 |
+
* @since bbPress (r3127)
|
1164 |
+
*
|
1165 |
+
* @uses is_super_admin()
|
1166 |
+
* @uses is_user_logged_in()
|
1167 |
+
* @uses bbp_allow_anonymous()
|
1168 |
+
* @uses current_user_can()
|
1169 |
+
* @uses apply_filters()
|
1170 |
+
*
|
1171 |
+
* @return bool
|
1172 |
+
*/
|
1173 |
+
function bbp_current_user_can_publish_replies() {
|
1174 |
+
|
1175 |
+
// Users need to earn access
|
1176 |
+
$retval = false;
|
1177 |
+
|
1178 |
+
// Always allow super admins
|
1179 |
+
if ( is_super_admin() )
|
1180 |
+
$retval = true;
|
1181 |
+
|
1182 |
+
// Do not allow anonymous if not enabled
|
1183 |
+
elseif ( !is_user_logged_in() && bbp_allow_anonymous() )
|
1184 |
+
$retval = true;
|
1185 |
+
|
1186 |
+
// User is logged in
|
1187 |
+
elseif ( !bbp_is_user_spammer() && !bbp_is_user_deleted() && current_user_can( 'publish_replies' ) )
|
1188 |
+
$retval = true;
|
1189 |
+
|
1190 |
+
// Allow access to be filtered
|
1191 |
+
return apply_filters( 'bbp_current_user_can_publish_replies', (bool) $retval );
|
1192 |
+
}
|
1193 |
+
|
1194 |
/** Forms *********************************************************************/
|
1195 |
|
1196 |
/**
|
1263 |
// Users need to earn access
|
1264 |
$retval = false;
|
1265 |
|
1266 |
+
// Looking at a single forum & forum is open
|
1267 |
+
if ( ( bbp_is_single_forum() || is_page() || is_single() ) && bbp_is_forum_open() ) {
|
1268 |
+
$retval = bbp_current_user_can_publish_topics();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1269 |
|
1270 |
+
// User can edit this topic
|
1271 |
+
} elseif ( bbp_is_topic_edit() ) {
|
1272 |
+
$retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
|
1273 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1274 |
|
1275 |
+
// Allow access to be filtered
|
1276 |
+
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
1277 |
+
}
|
1278 |
|
1279 |
+
/**
|
1280 |
+
* Performs a series of checks to ensure the current user can create replies.
|
1281 |
+
*
|
1282 |
+
* @since bbPress (r3127)
|
1283 |
+
*
|
1284 |
+
* @uses bbp_is_topic_edit()
|
1285 |
+
* @uses current_user_can()
|
1286 |
+
* @uses bbp_get_topic_id()
|
1287 |
+
* @uses bbp_allow_anonymous()
|
1288 |
+
* @uses is_user_logged_in()
|
1289 |
+
*
|
1290 |
+
* @return bool
|
1291 |
+
*/
|
1292 |
+
function bbp_current_user_can_access_create_reply_form() {
|
1293 |
|
1294 |
+
// Always allow super admins
|
1295 |
+
if ( is_super_admin() )
|
1296 |
+
return true;
|
1297 |
|
1298 |
+
// Users need to earn access
|
1299 |
+
$retval = false;
|
1300 |
|
1301 |
+
// Looking at a single topic, topic is open, and forum is open
|
1302 |
+
if ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() ) {
|
1303 |
+
$retval = bbp_current_user_can_publish_replies();
|
|
|
1304 |
|
1305 |
+
// User can edit this topic
|
1306 |
+
} elseif ( bbp_is_reply_edit() ) {
|
1307 |
+
$retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
|
1308 |
}
|
1309 |
|
1310 |
// Allow access to be filtered
|
1311 |
+
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
1312 |
}
|
1313 |
|
1314 |
?>
|
bbp-languages/bbpress.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the bbPress package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: bbPress 2.0-
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
|
7 |
-
"POT-Creation-Date: 2011-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,1009 +12,1059 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#:
|
16 |
-
|
17 |
-
#: bbp-includes/bbp-general-template.php:1153 bbp-admin/bbp-admin.php:171
|
18 |
-
msgid "Forums"
|
19 |
msgstr ""
|
20 |
|
21 |
-
#:
|
22 |
-
|
23 |
-
#: bbp-admin/bbp-metaboxes.php:364 bbp-admin/bbp-metaboxes.php:367
|
24 |
-
#: bbp-admin/bbp-forums.php:390 bbp-admin/bbp-replies.php:521
|
25 |
-
#: bbp-admin/bbp-topics.php:594
|
26 |
-
msgid "Forum"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: bbpress.php:
|
30 |
-
msgid "
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: bbpress.php:
|
34 |
-
msgid "
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: bbpress.php:
|
38 |
-
#: bbp-
|
39 |
-
#: bbp-includes/bbp-
|
40 |
-
|
41 |
-
msgid "Edit"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: bbpress.php:
|
45 |
-
|
|
|
|
|
|
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: bbpress.php:
|
49 |
-
|
|
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: bbpress.php:
|
53 |
-
|
|
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: bbpress.php:
|
57 |
-
msgid "No
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: bbpress.php:
|
61 |
-
msgid "
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: bbpress.php:
|
65 |
-
msgid "
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: bbpress.php:
|
69 |
-
msgid "
|
70 |
msgstr ""
|
71 |
|
72 |
-
#:
|
73 |
-
|
74 |
-
#: bbp-includes/bbp-core-compatibility.php:469
|
75 |
-
#: bbp-includes/bbp-forum-template.php:1696 bbp-admin/bbp-forums.php:391
|
76 |
-
#: bbp-admin/bbp-topics.php:593
|
77 |
-
msgid "Topics"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#:
|
81 |
-
|
82 |
-
#: bbp-admin/bbp-metaboxes.php:69 bbp-admin/bbp-metaboxes.php:403
|
83 |
-
#: bbp-admin/bbp-replies.php:522
|
84 |
-
msgid "Topic"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: bbpress.php:
|
88 |
-
msgid "
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: bbpress.php:
|
92 |
-
msgid "
|
|
|
|
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: bbpress.php:
|
96 |
-
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: bbpress.php:
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: bbpress.php:
|
104 |
-
|
|
|
|
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: bbpress.php:
|
108 |
-
msgid "
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: bbpress.php:
|
112 |
-
msgid "
|
113 |
msgstr ""
|
114 |
|
115 |
-
#:
|
116 |
-
msgid "
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: bbpress.php:
|
120 |
-
msgid "
|
121 |
msgstr ""
|
122 |
|
123 |
-
#:
|
124 |
-
#: bbp-themes/bbp-twentyten/
|
125 |
-
|
126 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:28
|
127 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:47
|
128 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17
|
129 |
-
#: bbp-includes/bbp-core-compatibility.php:501
|
130 |
-
#: bbp-includes/bbp-forum-template.php:1760 bbp-admin/bbp-forums.php:392
|
131 |
-
#: bbp-admin/bbp-topics.php:595
|
132 |
-
msgid "Replies"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#:
|
136 |
-
|
|
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: bbpress.php:
|
140 |
-
|
|
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: bbpress.php:
|
144 |
-
|
|
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: bbpress.php:
|
148 |
-
msgid "
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: bbpress.php:
|
152 |
-
msgid "
|
|
|
|
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: bbpress.php:
|
156 |
-
|
|
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: bbpress.php:
|
160 |
-
msgid "
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: bbpress.php:
|
164 |
-
msgid "
|
|
|
|
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: bbpress.php:
|
168 |
-
msgid "
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: bbpress.php:
|
172 |
-
msgid "
|
|
|
|
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: bbpress.php:
|
176 |
-
|
177 |
-
msgid "Closed"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: bbpress.php:
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
msgstr[1] ""
|
186 |
-
|
187 |
-
#: bbpress.php:669
|
188 |
-
msgctxt "post"
|
189 |
-
msgid "Spam"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: bbpress.php:
|
193 |
-
|
194 |
-
msgid "Spam <span class=\"count\">(%s)</span>"
|
195 |
-
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
196 |
-
msgstr[0] ""
|
197 |
-
msgstr[1] ""
|
198 |
-
|
199 |
-
#: bbpress.php:680
|
200 |
-
msgctxt "post"
|
201 |
-
msgid "Orphan"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: bbpress.php:
|
205 |
-
|
206 |
-
msgid "Orphan <span class=\"count\">(%s)</span>"
|
207 |
-
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
208 |
-
msgstr[0] ""
|
209 |
-
msgstr[1] ""
|
210 |
-
|
211 |
-
#: bbpress.php:691
|
212 |
-
msgctxt "post"
|
213 |
-
msgid "Hidden"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: bbpress.php:
|
217 |
-
|
218 |
-
|
219 |
-
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
220 |
-
msgstr[0] ""
|
221 |
-
msgstr[1] ""
|
222 |
|
223 |
-
#:
|
224 |
-
|
|
|
225 |
msgstr ""
|
226 |
|
227 |
-
#:
|
228 |
-
msgid "
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: bbpress.php:
|
232 |
-
msgid "
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: bbpress.php:
|
236 |
-
|
|
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: bbpress.php:
|
240 |
-
|
|
|
|
|
|
|
|
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: bbpress.php:
|
244 |
-
|
|
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: bbpress.php:
|
248 |
-
|
|
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: bbpress.php:
|
252 |
-
msgid "
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: bbpress.php:
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: bbpress.php:
|
260 |
-
msgid "
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: bbp-themes/bbp-twentyten/
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: bbp-themes/bbp-twentyten/
|
268 |
-
msgid "
|
|
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: bbp-themes/bbp-twentyten/
|
272 |
-
msgid "
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: bbp-themes/bbp-twentyten/
|
276 |
-
msgid "
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: bbp-themes/bbp-twentyten/
|
280 |
-
msgid "
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: bbp-themes/bbp-twentyten/
|
284 |
-
|
|
|
|
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: bbp-themes/bbp-twentyten/
|
288 |
-
|
289 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:38
|
290 |
-
#: bbp-admin/bbp-replies.php:523 bbp-admin/bbp-topics.php:597
|
291 |
-
msgid "Author"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: bbp-themes/bbp-twentyten/
|
295 |
-
|
296 |
-
msgid "Posted on %1$s at %2$s"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
300 |
-
|
301 |
-
|
302 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17
|
303 |
-
msgid "Posts"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
307 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
308 |
-
#: bbp-
|
309 |
-
|
|
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
313 |
-
msgid "
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
317 |
-
|
318 |
-
msgid "Oh bother! No topics were found here!"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:
|
322 |
-
msgid "
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:
|
326 |
-
msgid "
|
|
|
|
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
330 |
-
msgid "
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
334 |
-
|
335 |
-
|
336 |
-
"capabilities still allow you to do so."
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
344 |
-
|
|
|
|
|
|
|
|
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
348 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
349 |
-
|
350 |
-
|
351 |
-
"and attributes:"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
355 |
-
msgid "
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
359 |
-
msgid "
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
363 |
-
|
364 |
-
msgid "Notify the author of follow-up replies via email"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
368 |
-
|
369 |
-
msgid "Notify me of follow-up replies via email"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
373 |
-
|
374 |
-
msgid "Revision"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
378 |
-
|
379 |
-
msgid "Keep a log of this edit:"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
383 |
-
|
384 |
-
msgid "Optional reason for editing:"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
388 |
-
|
389 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-split.php:90
|
390 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-merge.php:86
|
391 |
-
msgid "Submit"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
395 |
-
|
396 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:115
|
397 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-split.php:103
|
398 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-merge.php:99
|
399 |
-
msgid "Sorry!"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:
|
403 |
-
msgid "
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:
|
407 |
-
msgid "
|
|
|
|
|
|
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:
|
411 |
-
msgid "
|
|
|
|
|
|
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
415 |
-
msgid "
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
419 |
-
msgid ""
|
420 |
-
"This topic is marked as closed to new replies, however your posting "
|
421 |
-
"capabilities still allow you to do so."
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
425 |
-
msgid "
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
429 |
-
msgid "
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
433 |
-
msgid "
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
437 |
-
|
|
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
441 |
-
msgid "
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
445 |
-
msgid "
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
449 |
-
msgid "
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
453 |
-
|
|
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
457 |
-
|
|
|
|
|
|
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
461 |
-
|
|
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
465 |
-
|
|
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
469 |
-
|
|
|
|
|
|
|
|
|
|
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
473 |
-
|
|
|
|
|
|
|
|
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
477 |
-
msgid "
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
481 |
-
msgid "
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
485 |
-
msgid "
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
489 |
-
msgid "
|
|
|
|
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
493 |
-
|
|
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
497 |
-
|
498 |
-
msgid "Voices"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
502 |
-
msgid "
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
506 |
-
|
|
|
|
|
|
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
510 |
-
msgid "
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
514 |
-
msgid "
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
518 |
-
msgid "
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
522 |
-
|
|
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
526 |
-
|
|
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
530 |
-
|
531 |
-
|
532 |
-
"working."
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
536 |
-
|
|
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
540 |
-
|
|
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
544 |
-
|
|
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
548 |
-
|
549 |
-
#: bbp-includes/bbp-topic-template.php:2208
|
550 |
-
msgid "Merge"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic
|
554 |
-
msgid "
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
558 |
-
msgid "
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
562 |
-
msgid ""
|
563 |
-
"Are you sure you want to merge the \"%s\" tag into the tag you specified?"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
567 |
-
|
568 |
-
#: bbp-includes/bbp-reply-template.php:1440
|
569 |
-
#: bbp-includes/bbp-topic-template.php:2012
|
570 |
-
msgid "Delete"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
574 |
-
msgid "
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
578 |
-
|
|
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
582 |
-
msgid "
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
586 |
-
msgid ""
|
587 |
-
"Are you sure you want to delete the \"%s\" tag? This is permanent and cannot "
|
588 |
-
"be undone."
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
592 |
-
msgid "
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
596 |
-
msgid "
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
600 |
-
msgid "
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
msgid "Username"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
617 |
-
|
618 |
-
|
|
|
|
|
|
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
622 |
-
|
623 |
-
msgid "Keep me signed in"
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
627 |
-
|
628 |
-
#: bbp-admin/bbp-metaboxes.php:427 bbp-admin/bbp-metaboxes.php:430
|
629 |
-
msgid "Name"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
633 |
-
msgid "
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
637 |
-
msgid "
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
641 |
-
msgid "
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
645 |
-
msgid "
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
649 |
-
|
650 |
-
msgid "Contact Info"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
654 |
-
#: bbp-
|
655 |
-
|
|
|
|
|
|
|
|
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
659 |
-
|
660 |
-
|
|
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
664 |
-
|
665 |
-
msgid "About the user"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
669 |
-
msgid "
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
673 |
-
msgid ""
|
674 |
-
"Share a little biographical information to fill out your profile. This may "
|
675 |
-
"be shown publicly."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
679 |
-
|
680 |
-
msgid "Account"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-
|
684 |
-
msgid "
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: bbp-themes/bbp-twentyten/bbpress/
|
688 |
-
|
|
|
|
|
|
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: bbp-themes/bbp-twentyten/
|
692 |
msgid ""
|
693 |
-
"
|
694 |
-
"\">Cancel</a>"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: bbp-themes/bbp-twentyten/
|
698 |
-
msgid "
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: bbp-themes/bbp-twentyten/
|
702 |
-
msgid ""
|
703 |
-
"If you would like to change the password type a new one. Otherwise leave "
|
704 |
-
"this blank."
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: bbp-themes/bbp-twentyten/
|
708 |
-
|
|
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: bbp-themes/bbp-twentyten/
|
712 |
-
msgid ""
|
713 |
-
"Hint: The password should be at least seven characters long. To make it "
|
714 |
-
"stronger, use upper and lower case letters, numbers and symbols like ! \" ? "
|
715 |
-
"$ % ^ & )."
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: bbp-themes/bbp-twentyten/
|
719 |
-
msgid "
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: bbp-themes/bbp-twentyten/
|
723 |
-
msgid "
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: bbp-themes/bbp-twentyten/
|
727 |
-
msgid "
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: bbp-themes/bbp-twentyten/
|
731 |
-
|
732 |
-
msgid "Save Changes"
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: bbp-themes/bbp-twentyten/
|
736 |
-
|
|
|
|
|
|
|
|
|
|
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: bbp-themes/bbp-twentyten/
|
740 |
-
msgid "
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: bbp-themes/bbp-twentyten/
|
744 |
-
msgid "
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: bbp-themes/bbp-twentyten/
|
748 |
-
msgid ""
|
749 |
-
"When you split a topic, you are slicing it in half starting with the reply "
|
750 |
-
"you just selected. Choose to use that reply as a new topic with a new title, "
|
751 |
-
"or merge those replies into an existing topic."
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: bbp-themes/bbp-twentyten/
|
755 |
-
msgid ""
|
756 |
-
"If you use the existing topic option, replies within both topics will be "
|
757 |
-
"merged chronologically. The order of the merged replies is based on the time "
|
758 |
-
"and date they were posted."
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: bbp-themes/bbp-twentyten/
|
762 |
-
|
|
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: bbp-themes/bbp-twentyten/
|
766 |
-
|
|
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: bbp-themes/bbp-twentyten/
|
770 |
-
|
|
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: bbp-themes/bbp-twentyten/
|
774 |
-
|
|
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: bbp-themes/bbp-twentyten/
|
778 |
-
msgid "
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: bbp-
|
782 |
-
#: bbp-
|
783 |
-
|
|
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: bbp-
|
787 |
-
|
|
|
|
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: bbp-
|
791 |
-
|
|
|
|
|
|
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: bbp-
|
795 |
-
|
|
|
|
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: bbp-
|
799 |
-
#: bbp-
|
800 |
-
|
|
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: bbp-
|
804 |
-
#: bbp-
|
805 |
-
|
|
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: bbp-
|
809 |
-
#: bbp-
|
810 |
-
|
|
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: bbp-
|
814 |
-
|
|
|
|
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: bbp-
|
818 |
-
|
819 |
-
"
|
820 |
-
"the lead topic, and this one will change into a reply."
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: bbp-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: bbp-
|
830 |
-
|
831 |
-
|
832 |
-
"the merged replies is based on the time and date they were posted. If the "
|
833 |
-
"destination topic was created after this one, it's post date will be updated "
|
834 |
-
"to second earlier than this one."
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: bbp-
|
838 |
-
msgid "
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: bbp-
|
842 |
-
msgid "
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: bbp-
|
846 |
-
msgid "
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: bbp-
|
850 |
-
msgid "
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: bbp-
|
854 |
-
msgid "
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: bbp-
|
858 |
-
msgid "
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: bbp-
|
862 |
-
msgid "
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: bbp-
|
866 |
-
|
867 |
-
msgid "Creator"
|
868 |
msgstr ""
|
869 |
|
870 |
-
#: bbp-
|
871 |
-
msgid "
|
872 |
msgstr ""
|
873 |
|
874 |
-
#: bbp-
|
875 |
-
|
876 |
-
msgid "Private"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: bbp-
|
880 |
-
msgid "
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: bbp-
|
884 |
-
msgid "
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: bbp-
|
888 |
-
msgid "
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: bbp-
|
892 |
-
msgid "
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: bbp-
|
896 |
-
msgid "
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: bbp-
|
900 |
-
msgid "
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: bbp-
|
904 |
-
msgid "You
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: bbp-
|
908 |
-
msgid "This user
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: bbp-
|
912 |
-
msgid "
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: bbp-
|
916 |
-
msgid "
|
917 |
msgstr ""
|
918 |
|
919 |
-
#: bbp-
|
920 |
-
msgid ""
|
921 |
-
"We use your email address to email you a secure password and verify your "
|
922 |
-
"account."
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: bbp-
|
926 |
-
msgid "
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: bbp-
|
930 |
-
msgid "
|
931 |
msgstr ""
|
932 |
|
933 |
-
#: bbp-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
msgid ""
|
935 |
-
"
|
|
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: bbp-
|
939 |
-
|
940 |
-
#: bbp-includes/bbp-general-template.php:1400
|
941 |
-
msgid "Topic Tag: %s"
|
942 |
msgstr ""
|
943 |
|
944 |
-
#: bbp-
|
945 |
-
msgid "
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: bbp-
|
949 |
-
msgid "
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: bbp-
|
953 |
-
msgid "
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: bbp-
|
957 |
-
msgid "
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: bbp-
|
961 |
-
|
962 |
-
msgid "×"
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: bbp-
|
966 |
-
|
967 |
-
msgid "Add this topic to your favorites"
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: bbp-
|
971 |
-
|
972 |
-
msgid "Subscribe"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: bbp-
|
976 |
-
|
977 |
-
msgid "Unsubscribe"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: bbp-includes/bbp-
|
981 |
-
msgid "
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: bbp-includes/bbp-
|
985 |
-
msgid "
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: bbp-includes/bbp-
|
989 |
-
msgid ""
|
990 |
-
|
991 |
-
|
|
|
|
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: bbp-includes/bbp-
|
995 |
-
|
996 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: bbp-includes/bbp-
|
1000 |
-
#: bbp-includes/bbp-
|
1001 |
-
msgid "Spammed: %s
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: bbp-includes/bbp-
|
1005 |
-
#: bbp-includes/bbp-
|
1006 |
msgid "Trashed: %s"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: bbp-includes/bbp-
|
1010 |
msgid "<strong>ERROR</strong>: Invalid author name submitted!"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: bbp-includes/bbp-
|
1014 |
msgid "<strong>ERROR</strong>: Invalid email address submitted!"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: bbp-includes/bbp-
|
1018 |
msgid ""
|
1019 |
"%1$s wrote:\n"
|
1020 |
"\n"
|
@@ -1026,2411 +1076,2449 @@ msgid ""
|
|
1026 |
"topic and login to unsubscribe."
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: bbp-includes/bbp-
|
1030 |
-
|
1031 |
-
#: bbp-includes/bbp-user-template.php:1019
|
1032 |
-
msgid "View %s's profile"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: bbp-includes/bbp-
|
1036 |
-
|
1037 |
-
|
1038 |
-
msgid "Visit %s's website"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: bbp-includes/bbp-
|
1042 |
-
#: bbp-includes/bbp-topic-
|
1043 |
-
|
1044 |
-
msgid "Trash"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: bbp-includes/bbp-
|
1048 |
-
#: bbp-includes/bbp-topic-
|
1049 |
-
|
1050 |
-
msgid "Restore"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: bbp-includes/bbp-
|
1054 |
-
#: bbp-includes/bbp-topic-
|
1055 |
-
#: bbp-
|
1056 |
-
msgid "
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#: bbp-includes/bbp-
|
1060 |
-
|
1061 |
-
|
|
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: bbp-includes/bbp-
|
1065 |
-
#: bbp-includes/bbp-topic-
|
1066 |
-
|
1067 |
-
msgid "Move this item to the Trash"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: bbp-includes/bbp-
|
1071 |
-
#: bbp-includes/bbp-topic-
|
1072 |
-
msgid "
|
|
|
|
|
1073 |
msgstr ""
|
1074 |
|
1075 |
-
#: bbp-includes/bbp-
|
1076 |
-
#: bbp-includes/bbp-topic-
|
1077 |
-
|
1078 |
-
|
|
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: bbp-includes/bbp-
|
1082 |
-
#: bbp-includes/bbp-
|
1083 |
-
msgid "
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: bbp-includes/bbp-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: bbp-includes/bbp-
|
1093 |
-
#: bbp-includes/bbp-topic-
|
1094 |
-
msgid "
|
1095 |
msgstr ""
|
1096 |
|
1097 |
-
#: bbp-includes/bbp-
|
1098 |
-
msgid "
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: bbp-includes/bbp-
|
1102 |
-
msgid "
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: bbp-includes/bbp-
|
1106 |
-
msgid "
|
|
|
|
|
1107 |
msgstr ""
|
1108 |
|
1109 |
-
#: bbp-includes/bbp-
|
1110 |
-
msgid "
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: bbp-includes/bbp-
|
1114 |
-
|
|
|
|
|
|
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: bbp-includes/bbp-
|
1118 |
-
msgid "
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: bbp-includes/bbp-
|
1122 |
-
msgid "
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: bbp-includes/bbp-
|
1126 |
-
msgid "
|
|
|
|
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: bbp-includes/bbp-
|
1130 |
-
msgid "
|
1131 |
msgstr ""
|
1132 |
|
1133 |
-
#: bbp-includes/bbp-
|
1134 |
-
msgid "
|
1135 |
msgstr ""
|
1136 |
|
1137 |
-
#: bbp-includes/bbp-
|
1138 |
-
msgid "The
|
1139 |
msgstr ""
|
1140 |
|
1141 |
-
#: bbp-includes/bbp-
|
1142 |
-
msgid "
|
1143 |
msgstr ""
|
1144 |
|
1145 |
-
#: bbp-includes/bbp-
|
1146 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1147 |
msgstr ""
|
1148 |
|
1149 |
-
#: bbp-includes/bbp-
|
1150 |
-
|
1151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1152 |
msgid "Title:"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1156 |
msgid "A list of views."
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1160 |
msgid "bbPress View List"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1164 |
msgid "A list of forums."
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1168 |
msgid "bbPress Forum List"
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1172 |
-
msgid "Parent
|
1173 |
msgstr ""
|
1174 |
|
1175 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1176 |
msgid ""
|
1177 |
"Forum ID number. \"0\" to show only root forums, \"-1\" to display all "
|
1178 |
"forums."
|
1179 |
msgstr ""
|
1180 |
|
1181 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1182 |
msgid "A list of recent topics, sorted by popularity or freshness."
|
1183 |
msgstr ""
|
1184 |
|
1185 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1186 |
msgid "bbPress Topics List"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1190 |
msgid "Maximum topics to show:"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1194 |
msgid "Show post date:"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1198 |
msgid "Popularity check:"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1202 |
msgid ""
|
1203 |
"Number of topics back to check reply count to determine popularity. A number "
|
1204 |
"less than the maximum number of topics to show disables the check."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1208 |
msgid "A list of bbPress recent replies."
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#: bbp-includes/bbp-core-widgets.php:
|
1212 |
msgid "Maximum replies to show:"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: bbp-includes/bbp-core-
|
1216 |
-
msgid "
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: bbp-includes/bbp-
|
1220 |
-
msgid "
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: bbp-includes/bbp-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
msgstr
|
1228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1229 |
|
1230 |
-
#: bbp-includes/bbp-
|
1231 |
-
|
1232 |
-
|
|
|
|
|
|
|
|
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: bbp-includes/bbp-topic-template.php:
|
1236 |
msgid "Tagged:"
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: bbp-includes/bbp-topic-template.php:
|
1240 |
msgid "Close"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: bbp-includes/bbp-topic-template.php:
|
1244 |
-
#: bbp-admin/bbp-
|
1245 |
msgid "Open"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: bbp-includes/bbp-topic-template.php:
|
1249 |
msgid "Stick"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: bbp-includes/bbp-topic-template.php:
|
1253 |
msgid "Unstick"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#: bbp-includes/bbp-topic-template.php:
|
1257 |
msgid "to front"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: bbp-includes/bbp-topic-template.php:
|
1261 |
msgid "Viewing topic %1$s (of %2$s total)"
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#: bbp-includes/bbp-topic-template.php:
|
1265 |
msgid "Viewing %1$s topics"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
-
#: bbp-includes/bbp-topic-template.php:
|
1269 |
msgid "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: bbp-includes/bbp-topic-template.php:
|
1273 |
msgid "Viewing %1$s topic"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: bbp-includes/bbp-topic-template.php:
|
1277 |
msgid "This topic is marked as spam."
|
1278 |
msgstr ""
|
1279 |
|
1280 |
-
#: bbp-includes/bbp-topic-template.php:
|
1281 |
msgid "This topic is in the trash."
|
1282 |
msgstr ""
|
1283 |
|
1284 |
-
#: bbp-includes/bbp-topic-template.php:
|
1285 |
msgid "Normal"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: bbp-includes/bbp-topic-template.php:
|
1289 |
msgid "Sticky"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: bbp-includes/bbp-topic-template.php:
|
1293 |
msgid "Super Sticky"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
-
#: bbp-includes/bbp-topic-template.php:
|
1297 |
msgid "%s voice"
|
1298 |
msgid_plural "%s voices"
|
1299 |
msgstr[0] ""
|
1300 |
msgstr[1] ""
|
1301 |
|
1302 |
-
#: bbp-includes/bbp-topic-template.php:
|
1303 |
msgid ""
|
1304 |
"This topic has %1$s, contains %2$s, and was last updated by %3$s %4$s ago."
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: bbp-includes/bbp-topic-template.php:
|
1308 |
msgid "This topic has %1$s, contains %2$s."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#: bbp-includes/bbp-
|
1312 |
-
msgid "No topics available"
|
1313 |
-
msgstr ""
|
1314 |
-
|
1315 |
-
#: bbp-includes/bbp-general-template.php:743
|
1316 |
-
msgid "No forums available"
|
1317 |
-
msgstr ""
|
1318 |
-
|
1319 |
-
#: bbp-includes/bbp-general-template.php:748
|
1320 |
-
msgid "None available"
|
1321 |
-
msgstr ""
|
1322 |
-
|
1323 |
-
#: bbp-includes/bbp-general-template.php:820
|
1324 |
-
#: bbp-includes/bbp-general-template.php:837
|
1325 |
-
#: bbp-includes/bbp-topic-functions.php:949
|
1326 |
-
#: bbp-includes/bbp-topic-functions.php:1250
|
1327 |
-
#: bbp-admin/importers/bbpress.php:961
|
1328 |
-
msgid "Reply To: %s"
|
1329 |
-
msgstr ""
|
1330 |
-
|
1331 |
-
#: bbp-includes/bbp-general-template.php:1320
|
1332 |
-
msgid "Log Out"
|
1333 |
-
msgstr ""
|
1334 |
-
|
1335 |
-
#: bbp-includes/bbp-general-template.php:1363
|
1336 |
-
msgid "Your Profile"
|
1337 |
-
msgstr ""
|
1338 |
-
|
1339 |
-
#: bbp-includes/bbp-general-template.php:1366
|
1340 |
-
msgid "%s's Profile"
|
1341 |
-
msgstr ""
|
1342 |
-
|
1343 |
-
#: bbp-includes/bbp-general-template.php:1373
|
1344 |
-
msgid "Edit Your Profile"
|
1345 |
-
msgstr ""
|
1346 |
-
|
1347 |
-
#: bbp-includes/bbp-general-template.php:1376
|
1348 |
-
msgid "Edit %s's Profile"
|
1349 |
-
msgstr ""
|
1350 |
-
|
1351 |
-
#: bbp-includes/bbp-general-template.php:1382
|
1352 |
-
msgid "Forum: %s"
|
1353 |
-
msgstr ""
|
1354 |
-
|
1355 |
-
#: bbp-includes/bbp-general-template.php:1387
|
1356 |
-
msgid "Topic: %s"
|
1357 |
-
msgstr ""
|
1358 |
-
|
1359 |
-
#: bbp-includes/bbp-general-template.php:1406
|
1360 |
-
msgid "View: %s"
|
1361 |
-
msgstr ""
|
1362 |
-
|
1363 |
-
#: bbp-includes/bbp-reply-functions.php:171
|
1364 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1368 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
1369 |
msgstr ""
|
1370 |
|
1371 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1372 |
-
#: bbp-includes/bbp-topic-functions.php:121
|
1373 |
-
#: bbp-includes/bbp-topic-functions.php:336
|
1374 |
-
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
1375 |
-
msgstr ""
|
1376 |
-
|
1377 |
-
#: bbp-includes/bbp-reply-functions.php:209
|
1378 |
msgid "<strong>ERROR</strong>: Your reply needs a title."
|
1379 |
msgstr ""
|
1380 |
|
1381 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1382 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1383 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
1384 |
msgstr ""
|
1385 |
|
1386 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1387 |
-
#: bbp-includes/bbp-topic-functions.php:150
|
1388 |
-
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
1389 |
-
msgstr ""
|
1390 |
-
|
1391 |
-
#: bbp-includes/bbp-reply-functions.php:231
|
1392 |
msgid ""
|
1393 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
1394 |
"you’ve already said that!"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1398 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1399 |
msgid ""
|
1400 |
-
"<strong>ERROR</strong>: There was
|
1401 |
msgstr ""
|
1402 |
|
1403 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1404 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
1405 |
msgstr ""
|
1406 |
|
1407 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1408 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
1409 |
msgstr ""
|
1410 |
|
1411 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1412 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
1413 |
msgstr ""
|
1414 |
|
1415 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1416 |
msgid ""
|
1417 |
"<strong>ERROR</strong>: This forum is a category. No topics or replies can "
|
1418 |
"be created in it."
|
1419 |
msgstr ""
|
1420 |
|
1421 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1422 |
msgid ""
|
1423 |
"<strong>ERROR</strong>: This forum has been closed to new topics and replies."
|
1424 |
msgstr ""
|
1425 |
|
1426 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1427 |
msgid ""
|
1428 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
1429 |
"capability to read or create new replies in it."
|
1430 |
msgstr ""
|
1431 |
|
1432 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1433 |
msgid ""
|
1434 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
1435 |
"capability to read or create new replies in it."
|
1436 |
msgstr ""
|
1437 |
|
1438 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1439 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
|
1440 |
msgstr ""
|
1441 |
|
1442 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1443 |
msgid ""
|
1444 |
"<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
|
1445 |
msgstr ""
|
1446 |
|
1447 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1448 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
|
1449 |
msgstr ""
|
1450 |
|
1451 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1452 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
|
1453 |
msgstr ""
|
1454 |
|
1455 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1456 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
|
1457 |
msgstr ""
|
1458 |
|
1459 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1460 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1464 |
msgid "All Posts"
|
1465 |
msgstr ""
|
1466 |
|
1467 |
-
#: bbp-includes/bbp-reply-functions.php:
|
1468 |
msgid "All Replies"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
-
#: bbp-
|
1472 |
-
|
1473 |
-
|
|
|
|
|
|
|
|
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: bbp-
|
1477 |
-
msgid "
|
|
|
|
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: bbp-
|
1481 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: bbp-
|
1485 |
-
msgid "
|
|
|
|
|
|
|
|
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: bbp-
|
1489 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: bbp-
|
1493 |
-
msgid "
|
|
|
|
|
|
|
|
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: bbp-
|
1497 |
-
msgid "
|
|
|
|
|
|
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: bbp-
|
1501 |
-
|
|
|
|
|
|
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: bbp-
|
1505 |
-
|
|
|
|
|
|
|
1506 |
msgstr ""
|
1507 |
|
1508 |
-
#: bbp-
|
1509 |
-
|
|
|
|
|
|
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#: bbp-
|
1513 |
-
msgid "
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: bbp-
|
1517 |
-
|
|
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: bbp-
|
1521 |
-
msgid "
|
|
|
|
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: bbp-
|
1525 |
-
msgid "
|
|
|
|
|
|
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: bbp-
|
1529 |
-
msgid "
|
|
|
|
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: bbp-
|
1533 |
-
#: bbp-includes/bbp-user-functions.php:637
|
1534 |
msgid ""
|
1535 |
-
"
|
1536 |
-
"
|
|
|
1537 |
msgstr ""
|
1538 |
|
1539 |
-
#: bbp-
|
1540 |
msgid ""
|
1541 |
-
"
|
1542 |
-
"
|
|
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: bbp-
|
1546 |
msgid ""
|
1547 |
-
"
|
1548 |
-
"favorites!"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
-
#: bbp-
|
1552 |
-
msgid "
|
|
|
|
|
1553 |
msgstr ""
|
1554 |
|
1555 |
-
#: bbp-
|
1556 |
msgid ""
|
1557 |
-
"
|
1558 |
-
"
|
1559 |
msgstr ""
|
1560 |
|
1561 |
-
#: bbp-
|
1562 |
msgid ""
|
1563 |
-
"
|
|
|
1564 |
msgstr ""
|
1565 |
|
1566 |
-
#: bbp-
|
1567 |
-
msgid "
|
1568 |
msgstr ""
|
1569 |
|
1570 |
-
#: bbp-
|
1571 |
msgid ""
|
1572 |
-
"
|
|
|
1573 |
msgstr ""
|
1574 |
|
1575 |
-
#: bbp-
|
1576 |
msgid ""
|
1577 |
-
"
|
1578 |
-
|
1579 |
-
|
1580 |
-
#: bbp-includes/bbp-topic-functions.php:103
|
1581 |
-
#: bbp-includes/bbp-topic-functions.php:372
|
1582 |
-
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
1583 |
msgstr ""
|
1584 |
|
1585 |
-
#: bbp-
|
1586 |
-
|
1587 |
-
|
|
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: bbp-
|
1591 |
msgid ""
|
1592 |
-
"
|
1593 |
-
"
|
|
|
|
|
|
|
1594 |
msgstr ""
|
1595 |
|
1596 |
-
#: bbp-
|
1597 |
-
|
1598 |
-
|
|
|
1599 |
msgstr ""
|
1600 |
|
1601 |
-
#: bbp-
|
1602 |
-
#: bbp-includes/bbp-topic-functions.php:355
|
1603 |
msgid ""
|
1604 |
-
"
|
1605 |
-
"
|
|
|
1606 |
msgstr ""
|
1607 |
|
1608 |
-
#: bbp-
|
1609 |
-
#: bbp-includes/bbp-topic-functions.php:359
|
1610 |
msgid ""
|
1611 |
-
"
|
1612 |
-
"
|
|
|
1613 |
msgstr ""
|
1614 |
|
1615 |
-
#: bbp-
|
1616 |
msgid ""
|
1617 |
-
"
|
1618 |
-
"
|
|
|
|
|
1619 |
msgstr ""
|
1620 |
|
1621 |
-
#: bbp-
|
1622 |
-
|
1623 |
-
|
|
|
1624 |
msgstr ""
|
1625 |
|
1626 |
-
#: bbp-
|
1627 |
-
msgid "<strong>
|
1628 |
msgstr ""
|
1629 |
|
1630 |
-
#: bbp-
|
1631 |
-
msgid "
|
|
|
|
|
1632 |
msgstr ""
|
1633 |
|
1634 |
-
#: bbp-
|
1635 |
msgid ""
|
1636 |
-
"<strong>
|
1637 |
-
"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
-
#: bbp-
|
1641 |
-
msgid "
|
1642 |
msgstr ""
|
1643 |
|
1644 |
-
#: bbp-
|
1645 |
-
|
1646 |
-
msgid ""
|
1647 |
-
"<strong>ERROR</strong>: You do not have the permissions to edit the source "
|
1648 |
-
"topic."
|
1649 |
msgstr ""
|
1650 |
|
1651 |
-
#: bbp-
|
1652 |
-
msgid "
|
1653 |
msgstr ""
|
1654 |
|
1655 |
-
#: bbp-
|
1656 |
-
msgid "
|
1657 |
msgstr ""
|
1658 |
|
1659 |
-
#: bbp-
|
1660 |
-
msgid ""
|
1661 |
-
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
1662 |
-
"destination topic."
|
1663 |
msgstr ""
|
1664 |
|
1665 |
-
#: bbp-
|
1666 |
-
msgid "
|
1667 |
msgstr ""
|
1668 |
|
1669 |
-
#: bbp-
|
1670 |
-
msgid "
|
1671 |
msgstr ""
|
1672 |
|
1673 |
-
#: bbp-
|
1674 |
-
msgid "
|
1675 |
msgstr ""
|
1676 |
|
1677 |
-
#: bbp-
|
1678 |
-
msgid "
|
1679 |
msgstr ""
|
1680 |
|
1681 |
-
#: bbp-
|
1682 |
-
msgid "
|
1683 |
msgstr ""
|
1684 |
|
1685 |
-
#: bbp-
|
1686 |
-
msgid "
|
1687 |
msgstr ""
|
1688 |
|
1689 |
-
#: bbp-
|
1690 |
-
msgid ""
|
1691 |
-
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
1692 |
-
"destination topic!"
|
1693 |
msgstr ""
|
1694 |
|
1695 |
-
#: bbp-
|
1696 |
-
msgid ""
|
1697 |
-
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
1698 |
-
"topic. Please try again."
|
1699 |
msgstr ""
|
1700 |
|
1701 |
-
#: bbp-
|
1702 |
-
msgid ""
|
1703 |
-
"<strong>ERROR</strong>: You do not have the permissions to create new "
|
1704 |
-
"topics. The reply could not be converted into a topic."
|
1705 |
msgstr ""
|
1706 |
|
1707 |
-
#: bbp-
|
1708 |
-
msgid ""
|
1709 |
-
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1710 |
-
"getting the tag: %s"
|
1711 |
msgstr ""
|
1712 |
|
1713 |
-
#: bbp-
|
1714 |
-
|
1715 |
-
msgid ""
|
1716 |
-
"<strong>ERROR</strong>: You do not have the permissions to edit the topic "
|
1717 |
-
"tags."
|
1718 |
msgstr ""
|
1719 |
|
1720 |
-
#: bbp-
|
1721 |
-
|
1722 |
-
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
1723 |
msgstr ""
|
1724 |
|
1725 |
-
#: bbp-
|
1726 |
-
|
1727 |
-
|
1728 |
-
"updating the tag: %s"
|
1729 |
msgstr ""
|
1730 |
|
1731 |
-
#: bbp-
|
1732 |
-
#: bbp-
|
1733 |
-
msgid ""
|
1734 |
-
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1735 |
-
"merging the tags: %s"
|
1736 |
msgstr ""
|
1737 |
|
1738 |
-
#: bbp-
|
1739 |
-
msgid ""
|
1740 |
-
"<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
1741 |
msgstr ""
|
1742 |
|
1743 |
-
#: bbp-
|
1744 |
-
|
1745 |
-
"<
|
1746 |
-
"tags."
|
1747 |
msgstr ""
|
1748 |
|
1749 |
-
#: bbp-
|
1750 |
-
msgid ""
|
1751 |
-
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1752 |
-
"deleting the tag: %s"
|
1753 |
msgstr ""
|
1754 |
|
1755 |
-
#: bbp-
|
1756 |
-
msgid "
|
1757 |
msgstr ""
|
1758 |
|
1759 |
-
#: bbp-
|
1760 |
-
msgid "
|
1761 |
msgstr ""
|
1762 |
|
1763 |
-
#: bbp-
|
1764 |
-
msgid "
|
1765 |
msgstr ""
|
1766 |
|
1767 |
-
#: bbp-
|
1768 |
-
msgid "
|
1769 |
msgstr ""
|
1770 |
|
1771 |
-
#: bbp-
|
1772 |
-
msgid "
|
1773 |
msgstr ""
|
1774 |
|
1775 |
-
#: bbp-
|
1776 |
-
msgid ""
|
1777 |
-
"<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
1778 |
msgstr ""
|
1779 |
|
1780 |
-
#: bbp-
|
1781 |
-
msgid "
|
1782 |
msgstr ""
|
1783 |
|
1784 |
-
#: bbp-
|
1785 |
-
msgid "
|
1786 |
msgstr ""
|
1787 |
|
1788 |
-
#: bbp-
|
1789 |
-
msgid "
|
1790 |
msgstr ""
|
1791 |
|
1792 |
-
#: bbp-
|
1793 |
-
msgid "
|
1794 |
msgstr ""
|
1795 |
|
1796 |
-
#: bbp-
|
1797 |
-
msgid "
|
1798 |
msgstr ""
|
1799 |
|
1800 |
-
#: bbp-
|
1801 |
-
msgid "
|
1802 |
msgstr ""
|
1803 |
|
1804 |
-
#: bbp-
|
1805 |
-
msgid "
|
1806 |
-
msgid_plural "%s topics"
|
1807 |
-
msgstr[0] ""
|
1808 |
-
msgstr[1] ""
|
1809 |
-
|
1810 |
-
#: bbp-includes/bbp-forum-template.php:1618
|
1811 |
-
msgid ""
|
1812 |
-
"This forum contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: bbp-
|
1816 |
-
msgid "
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: bbp-admin/bbp-
|
1820 |
-
|
|
|
1821 |
msgstr ""
|
1822 |
|
1823 |
-
#: bbp-admin/bbp-
|
1824 |
-
|
|
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: bbp-admin/bbp-
|
1828 |
-
msgid "
|
1829 |
-
|
1830 |
-
msgstr[0] ""
|
1831 |
-
msgstr[1] ""
|
1832 |
-
|
1833 |
-
#: bbp-admin/bbp-metaboxes.php:152
|
1834 |
-
msgid "Hidden Topic"
|
1835 |
-
msgid_plural "Hidden Topics"
|
1836 |
-
msgstr[0] ""
|
1837 |
-
msgstr[1] ""
|
1838 |
-
|
1839 |
-
#: bbp-admin/bbp-metaboxes.php:171
|
1840 |
-
msgid "Hidden Reply"
|
1841 |
-
msgid_plural "Hidden Replies"
|
1842 |
-
msgstr[0] ""
|
1843 |
-
msgstr[1] ""
|
1844 |
-
|
1845 |
-
#: bbp-admin/bbp-metaboxes.php:190
|
1846 |
-
msgid "Empty Topic Tag"
|
1847 |
-
msgid_plural "Empty Topic Tags"
|
1848 |
-
msgstr[0] ""
|
1849 |
-
msgstr[1] ""
|
1850 |
|
1851 |
-
|
1852 |
-
|
|
|
1853 |
msgstr ""
|
1854 |
|
1855 |
-
#: bbp-admin/bbp-
|
1856 |
-
msgid "
|
1857 |
msgstr ""
|
1858 |
|
1859 |
-
#: bbp-admin/bbp-
|
1860 |
-
msgid "
|
1861 |
msgstr ""
|
1862 |
|
1863 |
-
#: bbp-admin/bbp-
|
1864 |
-
msgid "
|
1865 |
msgstr ""
|
1866 |
|
1867 |
-
#: bbp-admin/bbp-
|
1868 |
-
msgid "
|
|
|
|
|
1869 |
msgstr ""
|
1870 |
|
1871 |
-
|
1872 |
-
|
|
|
|
|
1873 |
msgstr ""
|
1874 |
|
1875 |
-
#: bbp-admin/bbp-
|
1876 |
-
msgid "
|
1877 |
msgstr ""
|
1878 |
|
1879 |
-
#: bbp-admin/bbp-
|
1880 |
-
msgid "
|
1881 |
msgstr ""
|
1882 |
|
1883 |
-
#: bbp-admin/bbp-
|
1884 |
-
msgid "
|
1885 |
msgstr ""
|
1886 |
|
1887 |
-
#: bbp-admin/bbp-
|
1888 |
-
msgid "
|
1889 |
msgstr ""
|
1890 |
|
1891 |
-
#: bbp-admin/bbp-
|
1892 |
-
msgid "
|
1893 |
msgstr ""
|
1894 |
|
1895 |
-
#: bbp-admin/bbp-
|
1896 |
-
msgid "
|
1897 |
msgstr ""
|
1898 |
|
1899 |
-
#: bbp-admin/bbp-
|
1900 |
-
msgid "
|
1901 |
msgstr ""
|
1902 |
|
1903 |
-
#: bbp-admin/bbp-
|
1904 |
-
msgid "
|
1905 |
msgstr ""
|
1906 |
|
1907 |
-
#: bbp-admin/bbp-
|
1908 |
-
msgid "
|
1909 |
msgstr ""
|
1910 |
|
1911 |
-
#: bbp-admin/bbp-
|
1912 |
-
|
1913 |
-
msgid "(No Forum)"
|
1914 |
msgstr ""
|
1915 |
|
1916 |
-
#: bbp-admin/bbp-
|
1917 |
-
msgid "
|
1918 |
msgstr ""
|
1919 |
|
1920 |
-
#: bbp-admin/bbp-
|
1921 |
-
|
|
|
|
|
|
|
|
|
|
|
1922 |
msgstr ""
|
1923 |
|
1924 |
-
#: bbp-admin/bbp-
|
1925 |
-
|
|
|
|
|
|
|
|
|
1926 |
msgstr ""
|
1927 |
|
1928 |
-
#: bbp-admin/bbp-
|
1929 |
-
msgid "
|
1930 |
msgstr ""
|
1931 |
|
1932 |
-
#: bbp-admin/bbp-
|
1933 |
-
msgid "
|
|
|
1934 |
msgstr ""
|
1935 |
|
1936 |
-
#: bbp-admin/bbp-
|
1937 |
-
msgid "
|
1938 |
msgstr ""
|
1939 |
|
1940 |
-
#: bbp-admin/bbp-
|
1941 |
-
msgid "
|
1942 |
msgstr ""
|
1943 |
|
1944 |
-
#: bbp-admin/bbp-
|
1945 |
-
msgid "
|
1946 |
msgstr ""
|
1947 |
|
1948 |
-
#: bbp-admin/bbp-
|
1949 |
-
msgid "
|
1950 |
msgstr ""
|
1951 |
|
1952 |
-
#: bbp-admin/bbp-
|
1953 |
-
msgid "
|
1954 |
msgstr ""
|
1955 |
|
1956 |
-
#: bbp-admin/bbp-
|
1957 |
-
msgid "
|
1958 |
msgstr ""
|
1959 |
|
1960 |
-
#: bbp-admin/bbp-
|
1961 |
-
msgid "
|
1962 |
msgstr ""
|
1963 |
|
1964 |
-
#: bbp-admin/bbp-
|
1965 |
-
msgid "
|
1966 |
msgstr ""
|
1967 |
|
1968 |
-
#: bbp-admin/bbp-
|
1969 |
-
msgid "
|
1970 |
msgstr ""
|
1971 |
|
1972 |
-
#: bbp-admin/bbp-
|
1973 |
-
msgid "
|
1974 |
msgstr ""
|
1975 |
|
1976 |
-
#: bbp-admin/bbp-
|
1977 |
-
msgid "
|
1978 |
msgstr ""
|
1979 |
|
1980 |
-
#: bbp-admin/bbp-
|
1981 |
-
msgid "
|
1982 |
msgstr ""
|
1983 |
|
1984 |
-
#: bbp-admin/bbp-
|
1985 |
-
msgid "
|
1986 |
msgstr ""
|
1987 |
|
1988 |
-
#: bbp-admin/bbp-
|
1989 |
-
msgid "
|
1990 |
msgstr ""
|
1991 |
|
1992 |
-
#: bbp-admin/bbp-
|
1993 |
-
msgid "
|
1994 |
msgstr ""
|
1995 |
|
1996 |
-
#: bbp-admin/bbp-
|
1997 |
-
msgid "
|
1998 |
msgstr ""
|
1999 |
|
2000 |
-
#: bbp-admin/bbp-
|
2001 |
-
msgid "
|
|
|
2002 |
msgstr ""
|
2003 |
|
2004 |
-
#: bbp-admin/bbp-
|
2005 |
-
msgid "
|
2006 |
msgstr ""
|
2007 |
|
2008 |
-
#: bbp-admin/bbp-admin.php:
|
2009 |
-
|
|
|
2010 |
msgstr ""
|
2011 |
|
2012 |
-
#: bbp-admin/bbp-
|
2013 |
-
msgid "
|
2014 |
msgstr ""
|
2015 |
|
2016 |
-
#: bbp-admin/bbp-
|
2017 |
msgid ""
|
2018 |
-
"
|
2019 |
-
"
|
2020 |
msgstr ""
|
2021 |
|
2022 |
-
#: bbp-admin/bbp-
|
2023 |
-
msgid "
|
|
|
|
|
2024 |
msgstr ""
|
2025 |
|
2026 |
-
#: bbp-admin/bbp-
|
2027 |
-
msgid "
|
2028 |
msgstr ""
|
2029 |
|
2030 |
-
#: bbp-admin/bbp-
|
2031 |
-
msgid "
|
2032 |
msgstr ""
|
2033 |
|
2034 |
-
#: bbp-admin/
|
2035 |
-
msgid "bbPress
|
2036 |
msgstr ""
|
2037 |
|
2038 |
-
#: bbp-admin/
|
2039 |
-
msgid "
|
2040 |
msgstr ""
|
2041 |
|
2042 |
-
#: bbp-admin/
|
2043 |
msgid ""
|
2044 |
-
"
|
2045 |
-
"
|
|
|
2046 |
msgstr ""
|
2047 |
|
2048 |
-
#: bbp-admin/
|
2049 |
-
msgid "
|
|
|
|
|
|
|
2050 |
msgstr ""
|
2051 |
|
2052 |
-
#: bbp-admin/
|
2053 |
-
msgid "
|
|
|
|
|
2054 |
msgstr ""
|
2055 |
|
2056 |
-
#: bbp-admin/
|
2057 |
msgid ""
|
2058 |
-
"
|
2059 |
-
"
|
2060 |
msgstr ""
|
2061 |
|
2062 |
-
#: bbp-admin/
|
2063 |
msgid ""
|
2064 |
-
"
|
2065 |
-
"
|
|
|
2066 |
msgstr ""
|
2067 |
|
2068 |
-
#: bbp-admin/
|
2069 |
-
msgid "
|
|
|
|
|
|
|
|
|
2070 |
msgstr ""
|
2071 |
|
2072 |
-
#: bbp-admin/
|
2073 |
msgid ""
|
2074 |
-
"
|
2075 |
-
"
|
2076 |
-
"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
-
#: bbp-admin/
|
2080 |
msgid ""
|
2081 |
-
"
|
2082 |
-
"
|
2083 |
-
"and your forums will be lost in limbo forever. This is serious business. No, "
|
2084 |
-
"we're not kidding."
|
2085 |
msgstr ""
|
2086 |
|
2087 |
-
#: bbp-admin/
|
2088 |
-
msgid "
|
2089 |
msgstr ""
|
2090 |
|
2091 |
-
#: bbp-admin/
|
2092 |
-
msgid ""
|
2093 |
-
"Disable all plugins (except bbPress) on both your WordPress and bbPress "
|
2094 |
-
"standalone installations."
|
2095 |
msgstr ""
|
2096 |
|
2097 |
-
#: bbp-admin/
|
2098 |
-
msgid "
|
2099 |
msgstr ""
|
2100 |
|
2101 |
-
#: bbp-admin/
|
2102 |
-
msgid "
|
2103 |
msgstr ""
|
2104 |
|
2105 |
-
#: bbp-admin/
|
2106 |
-
msgid ""
|
2107 |
-
"If you have the <a href=\"%s\">Subscribe to Topic</a> plugin active, please "
|
2108 |
-
"deactivate it. This script will migrate user subscriptions from that plugin."
|
2109 |
msgstr ""
|
2110 |
|
2111 |
-
#: bbp-admin/
|
2112 |
-
msgid ""
|
2113 |
-
"If you are using the alpha version of bbPress 1.1 subscriptions will be "
|
2114 |
-
"ported automatically."
|
2115 |
msgstr ""
|
2116 |
|
2117 |
-
#: bbp-admin/
|
2118 |
-
msgid ""
|
2119 |
-
"If you are importing an existing BuddyPress Forums installation, we should "
|
2120 |
-
"have found your previous configuration file."
|
2121 |
msgstr ""
|
2122 |
|
2123 |
-
#: bbp-admin/
|
2124 |
-
msgid ""
|
2125 |
-
"This converter can be a drag on large forums with lots of existing topics "
|
2126 |
-
"and replies. If possible, do this import in a safe place (like a local "
|
2127 |
-
"installation.)"
|
2128 |
msgstr ""
|
2129 |
|
2130 |
-
#: bbp-admin/
|
2131 |
-
msgid "
|
2132 |
msgstr ""
|
2133 |
|
2134 |
-
#: bbp-admin/
|
2135 |
-
msgid ""
|
2136 |
-
"Enter the path to your bbPress standalone install, where you'd find your "
|
2137 |
-
"<code>bb-config.php</code>:"
|
2138 |
msgstr ""
|
2139 |
|
2140 |
-
#: bbp-admin/
|
2141 |
-
msgid "
|
2142 |
msgstr ""
|
2143 |
|
2144 |
-
#: bbp-admin/
|
2145 |
-
msgid "
|
2146 |
msgstr ""
|
2147 |
|
2148 |
-
#: bbp-admin/
|
2149 |
-
msgid ""
|
2150 |
-
"Please enter the path to your bbPress configuration file - <code>bb-config."
|
2151 |
-
"php</code>."
|
2152 |
msgstr ""
|
2153 |
|
2154 |
-
#: bbp-admin/
|
2155 |
-
msgid "
|
2156 |
msgstr ""
|
2157 |
|
2158 |
-
#: bbp-admin/
|
2159 |
-
msgid ""
|
2160 |
-
"bbPress configuration file <code>bb-config.php</code> doesn't exist in the "
|
2161 |
-
"path specified! Please check the path and try again."
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: bbp-admin/
|
2165 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
2166 |
msgstr ""
|
2167 |
|
2168 |
-
#: bbp-admin/
|
2169 |
msgid ""
|
2170 |
-
"<strong>
|
2171 |
-
"
|
2172 |
-
"and posts</label>."
|
2173 |
msgstr ""
|
2174 |
|
2175 |
-
#: bbp-admin/
|
2176 |
msgid ""
|
2177 |
-
"
|
2178 |
-
"
|
|
|
|
|
|
|
|
|
|
|
2179 |
msgstr ""
|
2180 |
|
2181 |
-
#: bbp-admin/
|
2182 |
-
msgid "
|
|
|
|
|
2183 |
msgstr ""
|
2184 |
|
2185 |
-
#: bbp-admin/
|
2186 |
msgid ""
|
2187 |
-
"
|
2188 |
-
"
|
2189 |
msgstr ""
|
2190 |
|
2191 |
-
#: bbp-admin/
|
2192 |
msgid ""
|
2193 |
-
"
|
2194 |
-
"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
-
#: bbp-admin/
|
2198 |
-
msgid "
|
|
|
|
|
2199 |
msgstr ""
|
2200 |
|
2201 |
-
#: bbp-admin/
|
2202 |
msgid ""
|
2203 |
-
"
|
2204 |
-
"
|
2205 |
-
msgstr ""
|
2206 |
-
|
2207 |
-
#: bbp-admin/importers/bbpress.php:608
|
2208 |
-
msgid "Proceed to importing forums, topics and posts section."
|
2209 |
msgstr ""
|
2210 |
|
2211 |
-
#: bbp-admin/
|
2212 |
msgid ""
|
2213 |
-
"
|
2214 |
-
"
|
2215 |
msgstr ""
|
2216 |
|
2217 |
-
#: bbp-admin/
|
2218 |
msgid ""
|
2219 |
-
"
|
2220 |
-
"
|
2221 |
-
"
|
2222 |
msgstr ""
|
2223 |
|
2224 |
-
#: bbp-admin/
|
2225 |
msgid ""
|
2226 |
-
"
|
2227 |
-
"the
|
2228 |
-
|
2229 |
-
|
2230 |
-
#: bbp-admin/importers/bbpress.php:622
|
2231 |
-
msgid "Migrate Users"
|
2232 |
-
msgstr ""
|
2233 |
-
|
2234 |
-
#: bbp-admin/importers/bbpress.php:625
|
2235 |
-
msgid "Import Forums, Topics & Posts"
|
2236 |
-
msgstr ""
|
2237 |
-
|
2238 |
-
#: bbp-admin/importers/bbpress.php:629
|
2239 |
-
msgid "Start!"
|
2240 |
-
msgstr ""
|
2241 |
-
|
2242 |
-
#: bbp-admin/importers/bbpress.php:665
|
2243 |
-
msgid "Importing Users"
|
2244 |
-
msgstr ""
|
2245 |
-
|
2246 |
-
#: bbp-admin/importers/bbpress.php:666
|
2247 |
-
msgid "We’re in the process of migrating your users..."
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: bbp-admin/
|
2251 |
-
msgid ""
|
2252 |
-
"Renamed the <code>%1$s</code> and <code>%2$s</code> tables to <code>%3$s</"
|
2253 |
-
"code> and <code>%4$s</code> respectively."
|
2254 |
msgstr ""
|
2255 |
|
2256 |
-
#: bbp-admin/
|
2257 |
msgid ""
|
2258 |
-
"
|
2259 |
-
"
|
2260 |
-
"yourself."
|
2261 |
-
msgstr ""
|
2262 |
-
|
2263 |
-
#: bbp-admin/importers/bbpress.php:693
|
2264 |
-
msgid "Created the <code>%s</code> table and copied the users from bbPress."
|
2265 |
msgstr ""
|
2266 |
|
2267 |
-
#: bbp-admin/
|
2268 |
msgid ""
|
2269 |
-
"
|
2270 |
-
"
|
|
|
2271 |
msgstr ""
|
2272 |
|
2273 |
-
#: bbp-admin/
|
2274 |
msgid ""
|
2275 |
-
"
|
2276 |
-
"
|
|
|
|
|
2277 |
msgstr ""
|
2278 |
|
2279 |
-
#: bbp-admin/
|
2280 |
msgid ""
|
2281 |
-
"
|
2282 |
-
"to your
|
2283 |
-
"go to importing forums, topics and replies section. Note that old logins "
|
2284 |
-
"won't work, you would have to edit your database (you can still try logging "
|
2285 |
-
"in as the bbPress keymaster)."
|
2286 |
msgstr ""
|
2287 |
|
2288 |
-
#: bbp-admin/
|
2289 |
msgid ""
|
2290 |
-
"
|
2291 |
-
"
|
2292 |
-
"and rest all WordPress roles are %1$s. Now, you can only login into your "
|
2293 |
-
"WordPress blog by the bbPress credentials. For the time being, you have been "
|
2294 |
-
"logged in as the first available administrator (Username: %2$s, User ID: %3"
|
2295 |
-
"$s)."
|
2296 |
msgstr ""
|
2297 |
|
2298 |
-
#: bbp-admin/
|
2299 |
msgid ""
|
2300 |
-
"
|
2301 |
-
"
|
2302 |
-
msgstr ""
|
2303 |
-
|
2304 |
-
#: bbp-admin/importers/bbpress.php:798
|
2305 |
-
msgid "Import by forums, topics and posts »"
|
2306 |
msgstr ""
|
2307 |
|
2308 |
-
#: bbp-admin/
|
2309 |
-
msgid "
|
2310 |
msgstr ""
|
2311 |
|
2312 |
-
#: bbp-admin/
|
2313 |
msgid ""
|
2314 |
-
"
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
msgstr ""
|
2320 |
-
|
2321 |
-
#: bbp-admin/importers/bbpress.php:839
|
2322 |
-
msgid "Total number of forums: %s"
|
2323 |
msgstr ""
|
2324 |
|
2325 |
-
#: bbp-admin/
|
2326 |
-
msgid "
|
|
|
|
|
2327 |
msgstr ""
|
2328 |
|
2329 |
-
#: bbp-admin/
|
2330 |
-
msgid "
|
2331 |
msgstr ""
|
2332 |
|
2333 |
-
#: bbp-admin/
|
2334 |
-
msgid "
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: bbp-admin/
|
2338 |
-
msgid "
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
|
2342 |
-
|
2343 |
-
"
|
2344 |
-
"new board."
|
2345 |
msgstr ""
|
2346 |
|
2347 |
-
#: bbp-admin/
|
2348 |
-
msgid "
|
2349 |
msgstr ""
|
2350 |
|
2351 |
-
#: bbp-admin/
|
2352 |
-
msgid ""
|
2353 |
-
"Added topic #%1$s (<a href=\"%2$s\">%3$s</a>) as topic #<a href=\"%4$s\">%5"
|
2354 |
-
"$s</a> with %6$s replies."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: bbp-admin/
|
2358 |
-
msgid "
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: bbp-admin/
|
2362 |
msgid ""
|
2363 |
-
"
|
2364 |
-
"
|
2365 |
-
"the counts in sync! Yes, we’re bad at Math."
|
2366 |
-
msgstr ""
|
2367 |
-
|
2368 |
-
#: bbp-admin/importers/bbpress.php:1060
|
2369 |
-
msgid "After that it's all done. <a href=\"%s\">Have fun!</a> :)"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
-
#: bbp-admin/
|
2373 |
-
msgid "
|
2374 |
msgstr ""
|
2375 |
|
2376 |
-
#: bbp-admin/
|
2377 |
-
msgid "
|
2378 |
msgstr ""
|
2379 |
|
2380 |
-
#: bbp-admin/bbp-
|
2381 |
-
msgid "
|
2382 |
-
|
|
|
|
|
2383 |
|
2384 |
-
#: bbp-admin/bbp-
|
2385 |
-
msgid "
|
2386 |
-
|
|
|
|
|
2387 |
|
2388 |
-
#: bbp-admin/bbp-
|
2389 |
-
msgid "
|
2390 |
msgstr ""
|
2391 |
|
2392 |
-
#: bbp-admin/bbp-
|
2393 |
-
msgid "
|
2394 |
-
|
|
|
|
|
2395 |
|
2396 |
-
#: bbp-admin/bbp-
|
2397 |
-
msgid "
|
2398 |
-
|
|
|
|
|
2399 |
|
2400 |
-
#: bbp-admin/bbp-
|
2401 |
-
msgid "
|
2402 |
-
|
|
|
|
|
2403 |
|
2404 |
-
#: bbp-admin/bbp-
|
2405 |
-
msgid "
|
2406 |
-
|
|
|
|
|
2407 |
|
2408 |
-
#: bbp-admin/bbp-
|
2409 |
-
|
2410 |
-
msgid "per page"
|
2411 |
msgstr ""
|
2412 |
|
2413 |
-
#: bbp-admin/bbp-
|
2414 |
-
msgid "
|
2415 |
msgstr ""
|
2416 |
|
2417 |
-
#: bbp-admin/bbp-
|
2418 |
-
msgid ""
|
2419 |
-
"Include custom root slugs to prefix your forums and topics with. These can "
|
2420 |
-
"be partnered with WordPress pages to allow more flexibility."
|
2421 |
msgstr ""
|
2422 |
|
2423 |
-
#: bbp-admin/bbp-
|
2424 |
-
msgid ""
|
2425 |
-
"You can enter custom slugs for your single forums, topics, replies, and tags "
|
2426 |
-
"URLs here. If you change these, existing permalinks will also change."
|
2427 |
msgstr ""
|
2428 |
|
2429 |
-
#: bbp-admin/bbp-
|
2430 |
-
msgid "
|
2431 |
msgstr ""
|
2432 |
|
2433 |
-
#: bbp-admin/bbp-
|
2434 |
-
msgid "
|
2435 |
msgstr ""
|
2436 |
|
2437 |
-
#: bbp-admin/bbp-
|
2438 |
-
msgid "
|
2439 |
msgstr ""
|
2440 |
|
2441 |
-
#: bbp-admin/bbp-
|
2442 |
-
msgid "
|
2443 |
msgstr ""
|
2444 |
|
2445 |
-
#: bbp-admin/bbp-
|
2446 |
-
msgid ""
|
2447 |
-
"You can choose to lock a post after a certain number of minutes. \"Locking "
|
2448 |
-
"post editing\" will prevent the author from editing some amount of time "
|
2449 |
-
"after saving a post."
|
2450 |
msgstr ""
|
2451 |
|
2452 |
-
#: bbp-admin/bbp-
|
2453 |
-
msgid ""
|
2454 |
-
"\"Throttle time\" is the amount of time required between posts from a single "
|
2455 |
-
"author. The higher the throttle time, the longer a user will need to wait "
|
2456 |
-
"between posting to the forum."
|
2457 |
msgstr ""
|
2458 |
|
2459 |
-
#: bbp-admin/bbp-
|
2460 |
-
msgid ""
|
2461 |
-
"You may choose to allow favorites, which are a way for users to save and "
|
2462 |
-
"later return to topics they favor. This is enabled by default."
|
2463 |
msgstr ""
|
2464 |
|
2465 |
-
#: bbp-admin/bbp-
|
2466 |
-
msgid ""
|
2467 |
-
"You may choose to allow subscriptions, which allows users to subscribe for "
|
2468 |
-
"notifications to topics that interest them. This is enabled by default."
|
2469 |
msgstr ""
|
2470 |
|
2471 |
-
#: bbp-admin/bbp-
|
2472 |
-
msgid ""
|
2473 |
-
"You may choose to allow \"Anonymous Posting\", which will allow guest users "
|
2474 |
-
"who do not have accounts on your site to both create topics as well as "
|
2475 |
-
"replies."
|
2476 |
msgstr ""
|
2477 |
|
2478 |
-
#: bbp-admin/bbp-
|
2479 |
-
msgid ""
|
2480 |
-
"Per Page settings allow you to control the number of topics and replies will "
|
2481 |
-
"appear on each of those pages. This is comparable to the WordPress \"Reading "
|
2482 |
-
"Settings\" page, where you can set the number of posts that should show on "
|
2483 |
-
"blog pages and in feeds."
|
2484 |
msgstr ""
|
2485 |
|
2486 |
-
#: bbp-admin/bbp-
|
2487 |
-
msgid ""
|
2488 |
-
"The Forums section allows you to control the permalink structure for your "
|
2489 |
-
"forums. Each \"base\" is what will be displayed after your main URL and "
|
2490 |
-
"right before your permalink slug."
|
2491 |
msgstr ""
|
2492 |
|
2493 |
-
#: bbp-admin/bbp-
|
2494 |
-
msgid ""
|
2495 |
-
"You must click the Save Changes button at the bottom of the screen for new "
|
2496 |
-
"settings to take effect."
|
2497 |
msgstr ""
|
2498 |
|
2499 |
-
#: bbp-admin/bbp-
|
2500 |
-
|
2501 |
-
#: bbp-admin/bbp-replies.php:174 bbp-admin/bbp-topics.php:134
|
2502 |
-
#: bbp-admin/bbp-topics.php:178
|
2503 |
-
msgid "<strong>For more information:</strong>"
|
2504 |
msgstr ""
|
2505 |
|
2506 |
-
#: bbp-admin/bbp-
|
2507 |
-
|
2508 |
-
#: bbp-admin/bbp-replies.php:177 bbp-admin/bbp-topics.php:137
|
2509 |
-
#: bbp-admin/bbp-topics.php:181
|
2510 |
-
msgid "<a href=\"http://bbpress.org/documentation/\">bbPress Documentation</a>"
|
2511 |
msgstr ""
|
2512 |
|
2513 |
-
#: bbp-admin/
|
2514 |
-
|
2515 |
-
#: bbp-admin/bbp-replies.php:178 bbp-admin/bbp-topics.php:138
|
2516 |
-
#: bbp-admin/bbp-topics.php:182
|
2517 |
-
msgid "<a href=\"http://bbpress.org/forums/\">bbPress Support Forums</a>"
|
2518 |
msgstr ""
|
2519 |
|
2520 |
-
#: bbp-admin/
|
2521 |
-
msgid ""
|
2522 |
-
"The forum title field and the big forum editing area are fixed in place, but "
|
2523 |
-
"you can reposition all the other boxes using drag and drop, and can minimize "
|
2524 |
-
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
2525 |
-
"tab to unhide more boxes (like Slug) or to choose a 1- or 2-column layout "
|
2526 |
-
"for this screen."
|
2527 |
msgstr ""
|
2528 |
|
2529 |
-
#: bbp-admin/
|
2530 |
msgid ""
|
2531 |
-
"
|
2532 |
-
"
|
2533 |
msgstr ""
|
2534 |
|
2535 |
-
#: bbp-admin/
|
2536 |
-
msgid ""
|
2537 |
-
"<strong>Post editor</strong> - Enter the description for your forum. There "
|
2538 |
-
"are two modes of editing: Visual and HTML. Choose the mode by clicking on "
|
2539 |
-
"the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last "
|
2540 |
-
"icon in the row to get a second row of controls. The screen icon just before "
|
2541 |
-
"that allows you to expand the edit box to full screen. The HTML mode allows "
|
2542 |
-
"you to enter raw HTML along with your forum text. You can insert media files "
|
2543 |
-
"by clicking the icons above the post editor and following the directions."
|
2544 |
msgstr ""
|
2545 |
|
2546 |
-
#: bbp-admin/
|
2547 |
-
msgid ""
|
2548 |
-
"<strong>Forum Attributes</strong> - Select the various attributes that your "
|
2549 |
-
"forum should have:"
|
2550 |
msgstr ""
|
2551 |
|
2552 |
-
#: bbp-admin/
|
2553 |
msgid ""
|
2554 |
-
"
|
2555 |
-
"
|
2556 |
msgstr ""
|
2557 |
|
2558 |
-
#: bbp-admin/
|
2559 |
msgid ""
|
2560 |
-
"
|
2561 |
-
"
|
2562 |
msgstr ""
|
2563 |
|
2564 |
-
#: bbp-admin/
|
2565 |
-
msgid ""
|
2566 |
-
"Visibility can be set to either Public (by default, seen by everyone), "
|
2567 |
-
"Private (seen only by chosen users), and Hidden (hidden from all users)."
|
2568 |
msgstr ""
|
2569 |
|
2570 |
-
#: bbp-admin/
|
2571 |
msgid ""
|
2572 |
-
"
|
2573 |
-
"
|
|
|
2574 |
msgstr ""
|
2575 |
|
2576 |
-
#: bbp-admin/
|
2577 |
msgid ""
|
2578 |
-
"
|
2579 |
-
"
|
|
|
|
|
2580 |
msgstr ""
|
2581 |
|
2582 |
-
#: bbp-admin/
|
2583 |
-
msgid ""
|
2584 |
-
"<strong>Publish</strong> - The Publish box will allow you to Preview your "
|
2585 |
-
"forum before it is published, Publish your forum to your site, or Move to "
|
2586 |
-
"Trash will move your forum to the trash."
|
2587 |
msgstr ""
|
2588 |
|
2589 |
-
#: bbp-admin/
|
2590 |
msgid ""
|
2591 |
-
"
|
2592 |
-
"
|
2593 |
-
"revision. Revisions can also be restored to the current version."
|
2594 |
msgstr ""
|
2595 |
|
2596 |
-
#: bbp-admin/
|
2597 |
-
msgid "
|
2598 |
msgstr ""
|
2599 |
|
2600 |
-
#: bbp-admin/
|
2601 |
-
|
2602 |
-
msgid "You can customize the display of this screen in a number of ways:"
|
2603 |
msgstr ""
|
2604 |
|
2605 |
-
#: bbp-admin/
|
2606 |
msgid ""
|
2607 |
-
"
|
2608 |
-
"
|
2609 |
msgstr ""
|
2610 |
|
2611 |
-
#: bbp-admin/
|
2612 |
msgid ""
|
2613 |
-
"
|
2614 |
-
"
|
2615 |
-
"is to show all forums."
|
2616 |
msgstr ""
|
2617 |
|
2618 |
-
#: bbp-admin/
|
2619 |
msgid ""
|
2620 |
-
"
|
2621 |
-
"
|
2622 |
-
"making your selection. You also can refine the list by clicking on the forum "
|
2623 |
-
"creator in the forums list."
|
2624 |
msgstr ""
|
2625 |
|
2626 |
-
#: bbp-admin/
|
2627 |
msgid ""
|
2628 |
-
"
|
2629 |
-
"
|
|
|
2630 |
msgstr ""
|
2631 |
|
2632 |
-
#: bbp-admin/
|
2633 |
-
msgid ""
|
2634 |
-
"Edit takes you to the editing screen for that forum. You can also reach that "
|
2635 |
-
"screen by clicking on the forum title."
|
2636 |
msgstr ""
|
2637 |
|
2638 |
-
#: bbp-admin/
|
2639 |
msgid ""
|
2640 |
-
"
|
2641 |
-
"
|
2642 |
msgstr ""
|
2643 |
|
2644 |
-
#: bbp-admin/
|
2645 |
-
msgid "
|
2646 |
msgstr ""
|
2647 |
|
2648 |
-
#: bbp-admin/
|
2649 |
-
msgid ""
|
2650 |
-
"You can also edit multiple forums at once. Select the forums you want to "
|
2651 |
-
"edit using the checkboxes, select Edit from the Bulk Actions menu and click "
|
2652 |
-
"Apply. You will be able to change the metadata for all selected forums at "
|
2653 |
-
"once. To remove a forum from the grouping, just click the x next to its name "
|
2654 |
-
"in the Bulk Edit area that appears."
|
2655 |
msgstr ""
|
2656 |
|
2657 |
-
#: bbp-admin/
|
2658 |
msgid ""
|
2659 |
-
"
|
2660 |
-
"
|
2661 |
-
msgstr ""
|
2662 |
-
|
2663 |
-
#: bbp-admin/bbp-forums.php:195
|
2664 |
-
msgid "Forum Attributes"
|
2665 |
-
msgstr ""
|
2666 |
-
|
2667 |
-
#: bbp-admin/bbp-forums.php:394 bbp-admin/bbp-replies.php:524
|
2668 |
-
#: bbp-admin/bbp-topics.php:598
|
2669 |
-
msgid "Created"
|
2670 |
-
msgstr ""
|
2671 |
-
|
2672 |
-
#: bbp-admin/bbp-forums.php:429 bbp-admin/bbp-replies.php:633
|
2673 |
-
#: bbp-admin/bbp-topics.php:679
|
2674 |
-
msgid "%1$s <br /> %2$s"
|
2675 |
-
msgstr ""
|
2676 |
-
|
2677 |
-
#: bbp-admin/bbp-forums.php:438 bbp-admin/bbp-topics.php:689
|
2678 |
-
msgid "%s ago"
|
2679 |
-
msgstr ""
|
2680 |
-
|
2681 |
-
#: bbp-admin/bbp-forums.php:505
|
2682 |
-
msgid "Forum updated. <a href=\"%s\">View forum</a>"
|
2683 |
-
msgstr ""
|
2684 |
-
|
2685 |
-
#: bbp-admin/bbp-forums.php:508 bbp-admin/bbp-replies.php:822
|
2686 |
-
#: bbp-admin/bbp-topics.php:900
|
2687 |
-
msgid "Custom field updated."
|
2688 |
-
msgstr ""
|
2689 |
-
|
2690 |
-
#: bbp-admin/bbp-forums.php:511 bbp-admin/bbp-replies.php:825
|
2691 |
-
#: bbp-admin/bbp-topics.php:903
|
2692 |
-
msgid "Custom field deleted."
|
2693 |
-
msgstr ""
|
2694 |
-
|
2695 |
-
#: bbp-admin/bbp-forums.php:514
|
2696 |
-
msgid "Forum updated."
|
2697 |
-
msgstr ""
|
2698 |
-
|
2699 |
-
#: bbp-admin/bbp-forums.php:519
|
2700 |
-
msgid "Forum restored to revision from %s"
|
2701 |
-
msgstr ""
|
2702 |
-
|
2703 |
-
#: bbp-admin/bbp-forums.php:523
|
2704 |
-
msgid "Forum created. <a href=\"%s\">View forum</a>"
|
2705 |
-
msgstr ""
|
2706 |
-
|
2707 |
-
#: bbp-admin/bbp-forums.php:526
|
2708 |
-
msgid "Forum saved."
|
2709 |
msgstr ""
|
2710 |
|
2711 |
-
#: bbp-admin/bbp-
|
2712 |
-
msgid "
|
2713 |
msgstr ""
|
2714 |
|
2715 |
-
#: bbp-admin/
|
2716 |
msgid ""
|
2717 |
-
"
|
2718 |
-
"
|
2719 |
msgstr ""
|
2720 |
|
2721 |
-
#: bbp-admin/
|
2722 |
-
|
2723 |
-
msgid "M j, Y @ G:i"
|
2724 |
msgstr ""
|
2725 |
|
2726 |
-
#: bbp-admin/
|
2727 |
-
msgid "
|
|
|
|
|
|
|
2728 |
msgstr ""
|
2729 |
|
2730 |
-
#: bbp-admin/
|
2731 |
msgid ""
|
2732 |
-
"
|
2733 |
-
"
|
2734 |
-
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
2735 |
-
"tab to unhide more boxes (Reply Attributes, Slug) or to choose a 1- or 2-"
|
2736 |
-
"column layout for this screen."
|
2737 |
msgstr ""
|
2738 |
|
2739 |
-
#: bbp-admin/
|
2740 |
-
msgid ""
|
2741 |
-
"<strong>Title</strong> - Enter a title for your reply. After you enter a "
|
2742 |
-
"title, you will see the permalink below, which you can edit."
|
2743 |
msgstr ""
|
2744 |
|
2745 |
-
#: bbp-admin/
|
2746 |
msgid ""
|
2747 |
-
"<strong>
|
2748 |
-
"
|
2749 |
-
"appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon "
|
2750 |
-
"in the row to get a second row of controls. The screen icon just before that "
|
2751 |
-
"allows you to expand the edit box to full screen. The HTML mode allows you "
|
2752 |
-
"to enter raw HTML along with your forum text. You can insert media files by "
|
2753 |
-
"clicking the icons above the post editor and following the directions."
|
2754 |
msgstr ""
|
2755 |
|
2756 |
-
#: bbp-admin/
|
2757 |
msgid ""
|
2758 |
-
"
|
2759 |
-
"
|
2760 |
-
"reply belongs to."
|
2761 |
msgstr ""
|
2762 |
|
2763 |
-
#: bbp-admin/
|
2764 |
-
msgid ""
|
2765 |
-
"<strong>Publish</strong> - The Publish box will allow you to save your reply "
|
2766 |
-
"as Draft or Pending Review. You may Preview your reply before it is "
|
2767 |
-
"published as well. The Visibility will determine whether the reply is "
|
2768 |
-
"Public, Password protected (requiring a password on the site to view) or "
|
2769 |
-
"Private (only the author will have access to it). Replies may be published "
|
2770 |
-
"immediately by clicking the dropdown, or at a specific date and time by "
|
2771 |
-
"clicking the Edit link."
|
2772 |
msgstr ""
|
2773 |
|
2774 |
-
#: bbp-admin/
|
2775 |
msgid ""
|
2776 |
-
"
|
2777 |
-
"
|
2778 |
-
"revision. Revisions can also be restored to the current version."
|
2779 |
msgstr ""
|
2780 |
|
2781 |
-
#: bbp-admin/
|
2782 |
-
msgid "
|
2783 |
msgstr ""
|
2784 |
|
2785 |
-
#: bbp-admin/
|
2786 |
msgid ""
|
2787 |
-
"You
|
2788 |
-
"
|
2789 |
-
"Options tab."
|
2790 |
msgstr ""
|
2791 |
|
2792 |
-
#: bbp-admin/
|
2793 |
msgid ""
|
2794 |
-
"
|
2795 |
-
"
|
2796 |
-
"
|
2797 |
msgstr ""
|
2798 |
|
2799 |
-
#: bbp-admin/
|
2800 |
msgid ""
|
2801 |
-
"
|
2802 |
-
"
|
2803 |
msgstr ""
|
2804 |
|
2805 |
-
#: bbp-admin/
|
2806 |
-
msgid ""
|
2807 |
-
"You can refine the list to show only replies from a specific month by using "
|
2808 |
-
"the dropdown menus above the replies list. Click the Filter button after "
|
2809 |
-
"making your selection."
|
2810 |
msgstr ""
|
2811 |
|
2812 |
-
#: bbp-admin/
|
2813 |
-
msgid ""
|
2814 |
-
"You can also show only replies from a specific parent forum by using the "
|
2815 |
-
"parent forum dropdown above the replies list and selecting the parent forum. "
|
2816 |
-
"Click the Filter button after making your selection."
|
2817 |
msgstr ""
|
2818 |
|
2819 |
-
#: bbp-admin/
|
2820 |
-
msgid ""
|
2821 |
-
"Hovering over a row in the replies list will display action links that allow "
|
2822 |
-
"you to manage your reply. You can perform the following actions:"
|
2823 |
msgstr ""
|
2824 |
|
2825 |
-
#: bbp-admin/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2826 |
msgid ""
|
2827 |
-
"
|
2828 |
-
"
|
2829 |
msgstr ""
|
2830 |
|
2831 |
-
#: bbp-admin/
|
2832 |
msgid ""
|
2833 |
-
"
|
2834 |
-
"
|
|
|
2835 |
msgstr ""
|
2836 |
|
2837 |
-
#: bbp-admin/
|
2838 |
-
msgid "
|
2839 |
msgstr ""
|
2840 |
|
2841 |
-
#: bbp-admin/bbp-
|
2842 |
msgid ""
|
2843 |
-
"
|
2844 |
-
"
|
2845 |
msgstr ""
|
2846 |
|
2847 |
-
#: bbp-admin/
|
2848 |
msgid ""
|
2849 |
-
"
|
2850 |
-
"
|
2851 |
-
"Apply. You will be able to change the metadata for all selected replies at "
|
2852 |
-
"once. To remove a reply from the grouping, just click the x next to its name "
|
2853 |
-
"in the Bulk Edit area that appears."
|
2854 |
msgstr ""
|
2855 |
|
2856 |
-
#: bbp-admin/
|
2857 |
msgid ""
|
2858 |
-
"
|
2859 |
-
"
|
|
|
|
|
|
|
2860 |
msgstr ""
|
2861 |
|
2862 |
-
#: bbp-admin/
|
2863 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
2864 |
msgstr ""
|
2865 |
|
2866 |
-
#: bbp-admin/
|
2867 |
-
msgid "
|
|
|
|
|
2868 |
msgstr ""
|
2869 |
|
2870 |
-
#: bbp-admin/
|
2871 |
-
msgid "
|
2872 |
msgstr ""
|
2873 |
|
2874 |
-
#: bbp-admin/
|
2875 |
-
msgid "
|
2876 |
msgstr ""
|
2877 |
|
2878 |
-
#: bbp-admin/
|
2879 |
-
msgid "
|
|
|
2880 |
msgstr ""
|
2881 |
|
2882 |
-
#: bbp-admin/
|
2883 |
-
msgid "
|
2884 |
msgstr ""
|
2885 |
|
2886 |
-
#: bbp-admin/
|
2887 |
-
msgid "
|
2888 |
msgstr ""
|
2889 |
|
2890 |
-
#: bbp-admin/
|
2891 |
-
msgid "
|
2892 |
msgstr ""
|
2893 |
|
2894 |
-
#: bbp-admin/
|
2895 |
-
msgid "
|
2896 |
msgstr ""
|
2897 |
|
2898 |
-
#: bbp-admin/
|
2899 |
-
|
2900 |
-
#: bbp-admin/bbp-topics.php:739
|
2901 |
-
msgid "View"
|
2902 |
msgstr ""
|
2903 |
|
2904 |
-
#: bbp-admin/
|
2905 |
-
msgid "
|
2906 |
msgstr ""
|
2907 |
|
2908 |
-
#: bbp-admin/
|
2909 |
-
msgid "
|
|
|
|
|
2910 |
msgstr ""
|
2911 |
|
2912 |
-
#: bbp-admin/
|
2913 |
-
msgid "
|
2914 |
msgstr ""
|
2915 |
|
2916 |
-
#: bbp-admin/
|
2917 |
-
msgid "
|
|
|
|
|
2918 |
msgstr ""
|
2919 |
|
2920 |
-
#: bbp-admin/
|
2921 |
-
msgid "
|
2922 |
msgstr ""
|
2923 |
|
2924 |
-
#: bbp-admin/
|
2925 |
-
msgid "
|
|
|
|
|
|
|
2926 |
msgstr ""
|
2927 |
|
2928 |
-
#: bbp-admin/
|
2929 |
-
msgid "
|
2930 |
msgstr ""
|
2931 |
|
2932 |
-
#: bbp-admin/
|
2933 |
-
msgid "
|
2934 |
msgstr ""
|
2935 |
|
2936 |
-
#: bbp-admin/
|
2937 |
-
msgid "
|
2938 |
msgstr ""
|
2939 |
|
2940 |
-
#: bbp-admin/bbp-
|
2941 |
-
msgid "
|
2942 |
msgstr ""
|
2943 |
|
2944 |
-
#: bbp-admin/bbp-
|
2945 |
-
msgid "
|
|
|
|
|
|
|
2946 |
msgstr ""
|
2947 |
|
2948 |
-
#: bbp-admin/bbp-
|
2949 |
-
msgid "
|
2950 |
msgstr ""
|
2951 |
|
2952 |
-
#: bbp-admin/bbp-
|
2953 |
-
msgid "
|
2954 |
msgstr ""
|
2955 |
|
2956 |
-
#: bbp-admin/bbp-
|
2957 |
-
msgid ""
|
2958 |
-
"Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
2959 |
-
"\">Preview topic</a>"
|
2960 |
msgstr ""
|
2961 |
|
2962 |
-
#: bbp-admin/bbp-
|
2963 |
-
msgid "
|
2964 |
msgstr ""
|
2965 |
|
2966 |
-
#: bbp-admin/bbp-
|
2967 |
-
msgid "
|
2968 |
msgstr ""
|
2969 |
|
2970 |
-
#: bbp-admin/bbp-
|
2971 |
-
msgid "
|
2972 |
msgstr ""
|
2973 |
|
2974 |
-
#: bbp-admin/bbp-
|
2975 |
-
msgid "
|
2976 |
msgstr ""
|
2977 |
|
2978 |
-
#: bbp-admin/bbp-
|
2979 |
-
msgid "
|
2980 |
msgstr ""
|
2981 |
|
2982 |
-
#: bbp-admin/bbp-
|
2983 |
-
msgid "
|
2984 |
msgstr ""
|
2985 |
|
2986 |
-
#: bbp-admin/bbp-
|
2987 |
-
msgid "
|
2988 |
msgstr ""
|
2989 |
|
2990 |
-
#: bbp-admin/bbp-
|
2991 |
-
msgid "
|
2992 |
msgstr ""
|
2993 |
|
2994 |
-
#: bbp-admin/bbp-
|
2995 |
-
msgid "
|
2996 |
msgstr ""
|
2997 |
|
2998 |
-
#: bbp-admin/bbp-
|
2999 |
-
msgid "
|
3000 |
msgstr ""
|
3001 |
|
3002 |
-
#: bbp-admin/bbp-
|
3003 |
-
msgid "
|
3004 |
msgstr ""
|
3005 |
|
3006 |
-
#: bbp-admin/bbp-
|
3007 |
-
|
3008 |
-
#: bbp-admin/bbp-functions.php:303 bbp-admin/bbp-functions.php:335
|
3009 |
-
#: bbp-admin/bbp-functions.php:381 bbp-admin/bbp-functions.php:460
|
3010 |
-
#: bbp-admin/bbp-functions.php:542 bbp-admin/bbp-functions.php:674
|
3011 |
-
#: bbp-admin/bbp-functions.php:733 bbp-admin/bbp-functions.php:790
|
3012 |
-
msgid "Failed!"
|
3013 |
msgstr ""
|
3014 |
|
3015 |
-
#: bbp-admin/bbp-
|
3016 |
-
|
3017 |
-
#: bbp-admin/bbp-functions.php:317 bbp-admin/bbp-functions.php:363
|
3018 |
-
#: bbp-admin/bbp-functions.php:715 bbp-admin/bbp-functions.php:773
|
3019 |
-
#: bbp-admin/bbp-functions.php:870
|
3020 |
-
msgid "Complete!"
|
3021 |
msgstr ""
|
3022 |
|
3023 |
-
#: bbp-admin/bbp-
|
3024 |
-
msgid "
|
3025 |
msgstr ""
|
3026 |
|
3027 |
-
#: bbp-admin/bbp-
|
3028 |
msgid ""
|
3029 |
-
"
|
|
|
3030 |
msgstr ""
|
3031 |
|
3032 |
-
#: bbp-admin/bbp-
|
3033 |
-
msgid "
|
3034 |
msgstr ""
|
3035 |
|
3036 |
-
#: bbp-admin/bbp-
|
3037 |
-
msgid "
|
3038 |
msgstr ""
|
3039 |
|
3040 |
-
#: bbp-admin/bbp-
|
3041 |
-
msgid "
|
3042 |
msgstr ""
|
3043 |
|
3044 |
-
#: bbp-admin/bbp-
|
3045 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
3046 |
msgstr ""
|
3047 |
|
3048 |
-
#: bbp-admin/bbp-
|
3049 |
-
msgid "
|
|
|
|
|
3050 |
msgstr ""
|
3051 |
|
3052 |
-
#: bbp-admin/bbp-
|
3053 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3054 |
msgstr ""
|
3055 |
|
3056 |
-
#: bbp-admin/bbp-
|
3057 |
-
msgid "
|
|
|
|
|
|
|
3058 |
msgstr ""
|
3059 |
|
3060 |
-
#: bbp-admin/bbp-
|
3061 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3062 |
msgstr ""
|
3063 |
|
3064 |
-
#: bbp-admin/bbp-
|
3065 |
-
msgid "
|
|
|
|
|
|
|
3066 |
msgstr ""
|
3067 |
|
3068 |
-
#: bbp-admin/bbp-
|
3069 |
-
msgid "
|
3070 |
msgstr ""
|
3071 |
|
3072 |
-
#: bbp-admin/bbp-
|
3073 |
-
msgid "
|
|
|
|
|
|
|
3074 |
msgstr ""
|
3075 |
|
3076 |
-
#: bbp-admin/bbp-
|
3077 |
msgid ""
|
3078 |
-
"
|
3079 |
-
"
|
3080 |
-
"
|
3081 |
msgstr ""
|
3082 |
|
3083 |
-
#: bbp-admin/bbp-
|
3084 |
-
msgid "
|
|
|
|
|
3085 |
msgstr ""
|
3086 |
|
3087 |
-
#: bbp-admin/bbp-
|
3088 |
-
msgid "
|
|
|
|
|
|
|
3089 |
msgstr ""
|
3090 |
|
3091 |
-
#: bbp-admin/bbp-
|
3092 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3093 |
msgstr ""
|
3094 |
|
3095 |
-
#: bbp-admin/bbp-
|
3096 |
-
msgid "
|
|
|
|
|
3097 |
msgstr ""
|
3098 |
|
3099 |
-
#: bbp-admin/bbp-
|
3100 |
msgid ""
|
3101 |
-
"
|
3102 |
-
"you can
|
3103 |
-
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
3104 |
-
"tab to unhide more boxes (Topic Tags, Topic Attributes, or Slug) or to "
|
3105 |
-
"choose a 1- or 2-column layout for this screen."
|
3106 |
msgstr ""
|
3107 |
|
3108 |
-
#: bbp-admin/bbp-
|
3109 |
-
msgid ""
|
3110 |
-
"<strong>Title</strong> - Enter a title for your topic. After you enter a "
|
3111 |
-
"title, you will see the permalink below, which you can edit."
|
3112 |
msgstr ""
|
3113 |
|
3114 |
-
#: bbp-admin/bbp-
|
3115 |
msgid ""
|
3116 |
-
"
|
3117 |
-
"
|
3118 |
-
"appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon "
|
3119 |
-
"in the row to get a second row of controls. The screen icon just before that "
|
3120 |
-
"allows you to expand the edit box to full screen. The HTML mode allows you "
|
3121 |
-
"to enter raw HTML along with your forum text. You can insert media files by "
|
3122 |
-
"clicking the icons above the post editor and following the directions."
|
3123 |
msgstr ""
|
3124 |
|
3125 |
-
#: bbp-admin/bbp-
|
3126 |
msgid ""
|
3127 |
-
"
|
3128 |
-
"
|
3129 |
-
"
|
3130 |
-
"
|
|
|
3131 |
msgstr ""
|
3132 |
|
3133 |
-
#: bbp-admin/bbp-
|
3134 |
msgid ""
|
3135 |
-
"
|
3136 |
-
"
|
3137 |
-
"published as well. The Visibility will determine whether the topic is "
|
3138 |
-
"Public, Password protected (requiring a password on the site to view) or "
|
3139 |
-
"Private (only the author will have access to it). Topics may be published "
|
3140 |
-
"immediately by clicking the dropdown, or at a specific date and time by "
|
3141 |
-
"clicking the Edit link."
|
3142 |
msgstr ""
|
3143 |
|
3144 |
-
#: bbp-admin/bbp-
|
3145 |
-
msgid ""
|
3146 |
-
"<strong>Topic Tags</strong> - You can assign keywords to your topics using "
|
3147 |
-
"Topic Tags. Unlike categories, tags have no hierarchy, meaning there is no "
|
3148 |
-
"relationship from one tag to another. Topics can be added and modified "
|
3149 |
-
"further from the Topic Tags screen."
|
3150 |
msgstr ""
|
3151 |
|
3152 |
-
#: bbp-admin/bbp-
|
3153 |
-
msgid ""
|
3154 |
-
"<strong>Revisions</strong> - Revisions show past versions of the saved "
|
3155 |
-
"topic. Each revision can be compared to the current version, or another "
|
3156 |
-
"revision. Revisions can also be restored to the current version."
|
3157 |
msgstr ""
|
3158 |
|
3159 |
-
#: bbp-admin/bbp-
|
3160 |
-
msgid "
|
3161 |
msgstr ""
|
3162 |
|
3163 |
-
#: bbp-admin/bbp-
|
3164 |
-
msgid ""
|
3165 |
-
"You can hide/display columns based on your needs and decide how many topics "
|
3166 |
-
"to list per screen using the Screen Options tab."
|
3167 |
msgstr ""
|
3168 |
|
3169 |
-
#: bbp-admin/bbp-
|
3170 |
-
msgid ""
|
3171 |
-
"You can filter the list of topics by topics status using the text links in "
|
3172 |
-
"the upper left to show All, Published, Pending Review, Draft, or Trashed "
|
3173 |
-
"topics. The default view is to show all topics."
|
3174 |
msgstr ""
|
3175 |
|
3176 |
-
#: bbp-admin/bbp-
|
3177 |
-
msgid ""
|
3178 |
-
"You can view topics in a simple title list or with an excerpt. Choose the "
|
3179 |
-
"view you prefer by clicking on the icons at the top of the list on the right."
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: bbp-admin/bbp-
|
3183 |
-
msgid ""
|
3184 |
-
"You can refine the list to show only topics from a specific month by using "
|
3185 |
-
"the dropdown menus above the topics list. Click the Filter button after "
|
3186 |
-
"making your selection."
|
3187 |
msgstr ""
|
3188 |
|
3189 |
-
#: bbp-admin/bbp-
|
3190 |
-
msgid ""
|
3191 |
-
"You can also show only topics from a specific parent forum by using the "
|
3192 |
-
"parent forum dropdown above the topics list and selecting the parent forum. "
|
3193 |
-
"Click the Filter button after making your selection."
|
3194 |
msgstr ""
|
3195 |
|
3196 |
-
#: bbp-admin/bbp-
|
3197 |
-
msgid ""
|
3198 |
-
"You can refine the list by clicking on the topic creator in the topics list."
|
3199 |
msgstr ""
|
3200 |
|
3201 |
-
#: bbp-admin/bbp-
|
3202 |
-
msgid ""
|
3203 |
-
"Hovering over a row in the topics list will display action links that allow "
|
3204 |
-
"you to manage your topic. You can perform the following actions:"
|
3205 |
msgstr ""
|
3206 |
|
3207 |
-
#: bbp-admin/bbp-
|
3208 |
-
msgid ""
|
3209 |
-
"Edit takes you to the editing screen for that topic. You can also reach that "
|
3210 |
-
"screen by clicking on the topic title."
|
3211 |
msgstr ""
|
3212 |
|
3213 |
-
#: bbp-admin/bbp-
|
3214 |
-
msgid ""
|
3215 |
-
"Trash removes your topic from this list and places it in the trash, from "
|
3216 |
-
"which you can permanently delete it."
|
3217 |
msgstr ""
|
3218 |
|
3219 |
-
#: bbp-admin/bbp-
|
3220 |
-
msgid "
|
3221 |
msgstr ""
|
3222 |
|
3223 |
-
|
3224 |
-
|
3225 |
-
"
|
3226 |
-
"viewable to users, but replies will not be allowed."
|
3227 |
msgstr ""
|
3228 |
|
3229 |
-
#: bbp-admin/bbp-
|
3230 |
-
msgid ""
|
3231 |
-
"Stick (to front) will pin the topic to the front page of the forum that "
|
3232 |
-
"it’s in. New topics will begin beneath the list of \"stuck\" topics, "
|
3233 |
-
"which will always sit at the top of the list."
|
3234 |
msgstr ""
|
3235 |
|
3236 |
-
#: bbp-admin/bbp-
|
3237 |
-
msgid ""
|
3238 |
-
"Spam will mark the topic as spam, closing the post to new replies and "
|
3239 |
-
"removing it from the public view."
|
3240 |
msgstr ""
|
3241 |
|
3242 |
-
#: bbp-admin/bbp-
|
3243 |
-
msgid ""
|
3244 |
-
"You can also edit multiple topics at once. Select the topics you want to "
|
3245 |
-
"edit using the checkboxes, select Edit from the Bulk Actions menu and click "
|
3246 |
-
"Apply. You will be able to change the metadata for all selected topics at "
|
3247 |
-
"once. To remove a topic from the grouping, just click the x next to its name "
|
3248 |
-
"in the Bulk Edit area that appears."
|
3249 |
msgstr ""
|
3250 |
|
3251 |
-
#: bbp-admin/bbp-
|
3252 |
msgid ""
|
3253 |
-
"
|
3254 |
-
"
|
3255 |
msgstr ""
|
3256 |
|
3257 |
-
#: bbp-admin/bbp-
|
3258 |
-
msgid ""
|
3259 |
-
"You can change the display of this screen using the Screen Options tab to "
|
3260 |
-
"set how many items are displayed per screen (20 by default) and to display/"
|
3261 |
-
"hide columns in the table (Description, Slug, and Topics)."
|
3262 |
msgstr ""
|
3263 |
|
3264 |
-
#:
|
3265 |
-
msgid ""
|
3266 |
-
"You can assign keywords to your topics using Topic Tags. Unlike categories, "
|
3267 |
-
"tags have no hierarchy, meaning there is no relationship from one tag to "
|
3268 |
-
"another."
|
3269 |
msgstr ""
|
3270 |
|
3271 |
-
#:
|
3272 |
-
msgid ""
|
3273 |
-
"Normally, tags are ad-hoc keywords that identify important information in "
|
3274 |
-
"your topic (names, subjects, etc) that may or may not recur in other topics. "
|
3275 |
-
"If you think of your forum like a book, the tags are like the terms in the "
|
3276 |
-
"index."
|
3277 |
msgstr ""
|
3278 |
|
3279 |
-
#:
|
3280 |
-
msgid ""
|
3281 |
-
"When editing a topic tag on this screen, you will fill in the following "
|
3282 |
-
"fields:"
|
3283 |
msgstr ""
|
3284 |
|
3285 |
-
#:
|
3286 |
-
msgid "
|
3287 |
msgstr ""
|
3288 |
|
3289 |
-
#:
|
3290 |
-
msgid ""
|
3291 |
-
"<strong>Slug</strong> - The Slug is the URL-friendly version of the name. It "
|
3292 |
-
"is usually all lowercase and contains only letters, numbers, and hyphens."
|
3293 |
msgstr ""
|
3294 |
|
3295 |
-
#:
|
3296 |
-
msgid ""
|
3297 |
-
"<strong>Description</strong> - The description is not prominent by default; "
|
3298 |
-
"however, some forum themes may display it."
|
3299 |
msgstr ""
|
3300 |
|
3301 |
-
#:
|
3302 |
-
msgid "
|
3303 |
msgstr ""
|
3304 |
|
3305 |
-
#:
|
3306 |
-
msgid "
|
3307 |
msgstr ""
|
3308 |
|
3309 |
-
#:
|
3310 |
-
msgid "
|
3311 |
msgstr ""
|
3312 |
|
3313 |
-
#:
|
3314 |
-
msgid "Topic
|
3315 |
msgstr ""
|
3316 |
|
3317 |
-
#:
|
3318 |
-
msgid "
|
3319 |
msgstr ""
|
3320 |
|
3321 |
-
#:
|
3322 |
-
msgid "
|
3323 |
msgstr ""
|
3324 |
|
3325 |
-
#:
|
3326 |
-
msgid "
|
3327 |
msgstr ""
|
3328 |
|
3329 |
-
#:
|
3330 |
-
msgid "
|
3331 |
msgstr ""
|
3332 |
|
3333 |
-
#:
|
3334 |
-
msgid "
|
3335 |
msgstr ""
|
3336 |
|
3337 |
-
#:
|
3338 |
-
msgid "
|
3339 |
msgstr ""
|
3340 |
|
3341 |
-
#:
|
3342 |
-
msgid "
|
3343 |
msgstr ""
|
3344 |
|
3345 |
-
#:
|
3346 |
-
msgid "
|
3347 |
msgstr ""
|
3348 |
|
3349 |
-
#:
|
3350 |
-
msgid "
|
3351 |
msgstr ""
|
3352 |
|
3353 |
-
#:
|
3354 |
-
msgid "
|
3355 |
msgstr ""
|
3356 |
|
3357 |
-
#:
|
3358 |
-
msgid "
|
3359 |
msgstr ""
|
3360 |
|
3361 |
-
#:
|
3362 |
-
msgid "
|
3363 |
msgstr ""
|
3364 |
|
3365 |
-
#:
|
3366 |
-
msgid "
|
3367 |
msgstr ""
|
3368 |
|
3369 |
-
#:
|
3370 |
-
msgid "
|
3371 |
msgstr ""
|
3372 |
|
3373 |
-
#:
|
3374 |
-
|
|
|
3375 |
msgstr ""
|
3376 |
|
3377 |
-
#:
|
3378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3379 |
msgstr ""
|
3380 |
|
3381 |
-
#:
|
3382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3383 |
msgstr ""
|
3384 |
|
3385 |
-
#:
|
3386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3387 |
msgstr ""
|
3388 |
|
3389 |
-
#:
|
3390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3391 |
msgstr ""
|
3392 |
|
3393 |
-
#:
|
3394 |
-
msgid "
|
3395 |
msgstr ""
|
3396 |
|
3397 |
-
#:
|
3398 |
-
msgid "
|
3399 |
msgstr ""
|
3400 |
|
3401 |
-
#:
|
3402 |
-
msgid "
|
3403 |
msgstr ""
|
3404 |
|
3405 |
-
#:
|
3406 |
-
msgid "
|
3407 |
msgstr ""
|
3408 |
|
3409 |
-
#:
|
3410 |
-
msgid "
|
3411 |
msgstr ""
|
3412 |
|
3413 |
-
#:
|
3414 |
-
msgid "
|
3415 |
msgstr ""
|
3416 |
|
3417 |
-
#:
|
3418 |
-
msgid ""
|
3419 |
-
"Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
3420 |
-
"\">Preview topic</a>"
|
3421 |
msgstr ""
|
3422 |
|
3423 |
-
#:
|
3424 |
-
msgid "
|
3425 |
msgstr ""
|
3426 |
|
3427 |
#. Plugin Name of the plugin/theme
|
3428 |
msgid "bbPress"
|
3429 |
msgstr ""
|
3430 |
|
3431 |
-
#. #-#-#-#-# plugin.pot (bbPress 2.0-
|
3432 |
#. Plugin URI of the plugin/theme
|
3433 |
-
#. #-#-#-#-# plugin.pot (bbPress 2.0-
|
3434 |
#. Author URI of the plugin/theme
|
3435 |
msgid "http://bbpress.org"
|
3436 |
msgstr ""
|
2 |
# This file is distributed under the same license as the bbPress package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: bbPress 2.0-rc-2\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
|
7 |
+
"POT-Creation-Date: 2011-08-08 03:00:38+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-protected.php:13
|
16 |
+
msgid "Protected"
|
|
|
|
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-favorites.php:16
|
20 |
+
msgid "Favorite Forum Topics"
|
|
|
|
|
|
|
|
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-favorites.php:27
|
24 |
+
msgid "You currently have no favorite topics."
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-favorites.php:27
|
28 |
+
msgid "This user has no favorite topics."
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-login.php:14
|
32 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-login.php:35
|
33 |
+
#: bbp-includes/bbp-core-widgets.php:80 bbp-includes/bbp-core-widgets.php:101
|
34 |
+
msgid "Log In"
|
|
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-login.php:17
|
38 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:23
|
39 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:99
|
40 |
+
#: bbp-includes/bbp-core-widgets.php:83
|
41 |
+
msgid "Username"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-login.php:22
|
45 |
+
#: bbp-includes/bbp-core-widgets.php:88
|
46 |
+
msgid "Password"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-login.php:28
|
50 |
+
#: bbp-includes/bbp-core-widgets.php:94
|
51 |
+
msgid "Keep me signed in"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: bbp-themes/bbp-twentyten/bbpress/feedback-no-topics.php:13
|
55 |
+
msgid "Oh bother! No topics were found here!"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:14
|
59 |
+
msgid "Profile: %s"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:18
|
63 |
+
msgid "Edit Profile of User %s"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:18
|
67 |
+
msgid "(Edit)"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:31
|
71 |
+
msgid "About %s"
|
|
|
|
|
|
|
|
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:14
|
75 |
+
msgid "Create an Account"
|
|
|
|
|
|
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:17
|
79 |
+
msgid "Your username must be unique, and cannot be changed later."
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:18
|
83 |
+
msgid ""
|
84 |
+
"We use your email address to email you a secure password and verify your "
|
85 |
+
"account."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:28
|
89 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:105
|
90 |
+
#: bbp-admin/bbp-metaboxes.php:471 bbp-admin/bbp-metaboxes.php:474
|
91 |
+
msgid "Email"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-register.php:36
|
95 |
+
msgid "Register"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:14
|
99 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:19
|
100 |
+
#: bbp-admin/bbp-metaboxes.php:464 bbp-admin/bbp-metaboxes.php:467
|
101 |
+
msgid "Name"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:24
|
105 |
+
msgid "First Name"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:29
|
109 |
+
msgid "Last Name"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:34
|
113 |
+
msgid "Nickname"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:39
|
117 |
+
msgid "Display name publicly as"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:49
|
121 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:52
|
122 |
+
msgid "Contact Info"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:57
|
126 |
+
#: bbp-admin/bbp-metaboxes.php:478 bbp-admin/bbp-metaboxes.php:481
|
127 |
+
msgid "Website"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:74
|
131 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:77
|
132 |
+
msgid "About Yourself"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:74
|
136 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:77
|
137 |
+
msgid "About the user"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:82
|
141 |
+
msgid "Biographical Info"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:84
|
145 |
+
msgid ""
|
146 |
+
"Share a little biographical information to fill out your profile. This may "
|
147 |
+
"be shown publicly."
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:91
|
151 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:94
|
152 |
+
msgid "Account"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:101
|
156 |
+
msgid "Usernames cannot be changed."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:117
|
160 |
+
msgid ""
|
161 |
+
"There is a pending email address change to <code>%1$s</code>. <a href=\"%2$s"
|
162 |
+
"\">Cancel</a>"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:126
|
166 |
+
msgid "New Password"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:129
|
170 |
+
msgid ""
|
171 |
+
"If you would like to change the password type a new one. Otherwise leave "
|
172 |
+
"this blank."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:132
|
176 |
+
msgid "Type your new password again."
|
|
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:135
|
180 |
+
msgid ""
|
181 |
+
"Hint: The password should be at least seven characters long. To make it "
|
182 |
+
"stronger, use upper and lower case letters, numbers and symbols like ! \" ? "
|
183 |
+
"$ % ^ & )."
|
|
|
|
|
|
|
|
|
|
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:142
|
187 |
+
msgid "Role:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:153
|
191 |
+
msgid "Super Admin"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:156
|
195 |
+
msgid "Grant this user super admin privileges for the Network."
|
196 |
+
msgstr ""
|
|
|
|
|
|
|
197 |
|
198 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:169
|
199 |
+
#: bbp-admin/bbp-settings.php:436
|
200 |
+
msgid "Save Changes"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:174
|
204 |
+
msgid "Update Profile"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-edit.php:174
|
208 |
+
msgid "Update User"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:15
|
212 |
+
#: bbp-admin/bbp-forums.php:391
|
213 |
+
msgid "Creator"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:18
|
217 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17
|
218 |
+
#: bbp-admin/bbp-metaboxes.php:67 bbp-admin/bbp-metaboxes.php:430
|
219 |
+
#: bbp-admin/bbp-metaboxes.php:433 bbp-admin/bbp-replies.php:525
|
220 |
+
#: bbpress.php:602
|
221 |
+
msgid "Topic"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:43
|
225 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:64
|
226 |
+
msgid "%1$s at %2$s"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php:13
|
230 |
+
#: bbp-admin/bbp-metaboxes.php:281
|
231 |
+
msgid "Private"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php:16
|
235 |
+
msgid "You do not have permission to view this forum."
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:18
|
239 |
+
msgid "Manage Tag: \"%s\""
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:22
|
243 |
+
msgid "Rename"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:25
|
247 |
+
msgid "Leave the slug empty to have one automatically generated."
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:29
|
251 |
+
msgid ""
|
252 |
+
"Changing the slug affects its permalink. Any links to the old slug will stop "
|
253 |
+
"working."
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:35
|
257 |
+
msgid "Name:"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:40
|
261 |
+
msgid "Slug:"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:45
|
265 |
+
msgid "Update"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:59
|
269 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:73
|
270 |
+
#: bbp-includes/bbp-topic-template.php:2299
|
271 |
+
msgid "Merge"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:62
|
275 |
+
msgid "Merging tags together cannot be undone."
|
|
|
|
|
|
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:68
|
279 |
+
msgid "Existing tag:"
|
|
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:74
|
283 |
+
msgid ""
|
284 |
+
"Are you sure you want to merge the \"%s\" tag into the tag you specified?"
|
|
|
|
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:89
|
288 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:102
|
289 |
+
#: bbp-includes/bbp-reply-template.php:1479
|
290 |
+
#: bbp-includes/bbp-topic-template.php:2100
|
291 |
+
msgid "Delete"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:92
|
295 |
+
msgid "This does not delete your topics. Only the tag itself is deleted."
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:95
|
299 |
+
msgid "Deleting a tag cannot be undone."
|
|
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:96
|
303 |
+
msgid "Any links to this tag will no longer function."
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:103
|
307 |
+
msgid ""
|
308 |
+
"Are you sure you want to delete the \"%s\" tag? This is permanent and cannot "
|
309 |
+
"be undone."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: bbp-themes/bbp-twentyten/bbpress/feedback-logged-in.php:13
|
313 |
+
msgid "You are already logged in."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:18
|
317 |
+
#: bbp-admin/bbp-topics.php:594
|
318 |
+
msgid "Voices"
|
|
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:19
|
322 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
323 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:30
|
324 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:49
|
325 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:50
|
326 |
+
#: bbp-themes/bbp-twentyten/single-reply.php:32
|
327 |
+
#: bbp-includes/bbp-forum-template.php:1841
|
328 |
+
#: bbp-includes/bbp-core-compatibility.php:834 bbp-admin/bbp-topics.php:593
|
329 |
+
#: bbp-admin/bbp-forums.php:390 bbp-admin/bbp-admin.php:217
|
330 |
+
#: bbp-admin/bbp-admin.php:230 bbpress.php:657 bbpress.php:658
|
331 |
+
msgid "Replies"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:19
|
335 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
336 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:22
|
337 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:45
|
338 |
+
#: bbp-admin/bbp-settings.php:552
|
339 |
+
msgid "Posts"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:20
|
343 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:21
|
344 |
+
#: bbp-admin/bbp-topics.php:597 bbp-admin/bbp-forums.php:393
|
345 |
+
msgid "Freshness"
|
|
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:21
|
349 |
+
msgid "Remove"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:42
|
353 |
+
msgid "Started by: %1$s"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:46
|
357 |
+
msgid "in: <a href=\"%1$s\">%2$s</a>"
|
|
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-lost-pass.php:14
|
361 |
+
msgid "Lost Password"
|
|
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-lost-pass.php:18
|
365 |
+
msgid "Username or Email"
|
|
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-user-lost-pass.php:27
|
369 |
+
msgid "Reset my password"
|
|
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-subscriptions.php:20
|
373 |
+
msgid "Subscribed Forum Topics"
|
|
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-subscriptions.php:31
|
377 |
+
msgid "You are not currently subscribed to any topics."
|
|
|
|
|
|
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-subscriptions.php:31
|
381 |
+
msgid "This user is not currently subscribed to any topics."
|
|
|
|
|
|
|
|
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:22
|
385 |
+
msgid "Split topic \"%s\""
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:27
|
389 |
+
msgid ""
|
390 |
+
"When you split a topic, you are slicing it in half starting with the reply "
|
391 |
+
"you just selected. Choose to use that reply as a new topic with a new title, "
|
392 |
+
"or merge those replies into an existing topic."
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:31
|
396 |
+
msgid ""
|
397 |
+
"If you use the existing topic option, replies within both topics will be "
|
398 |
+
"merged chronologically. The order of the merged replies is based on the time "
|
399 |
+
"and date they were posted."
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:35
|
403 |
+
msgid "Split Method"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:39
|
407 |
+
msgid "New topic in <strong>%s</strong> titled:"
|
|
|
|
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:40
|
411 |
+
msgid "Split: %s"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:47
|
415 |
+
msgid "Use an existing topic in this forum:"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:56
|
419 |
+
msgid "No other topics found!"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:67
|
423 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:63
|
424 |
+
msgid "Topic Extras"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:74
|
428 |
+
msgid "Copy subscribers to the new topic"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:79
|
432 |
+
msgid "Copy favoriters to the new topic"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:82
|
436 |
+
msgid "Copy topic tags to the new topic"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:88
|
440 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:84
|
441 |
+
msgid "<strong>WARNING:</strong> This process cannot be undone."
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:92
|
445 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:151
|
446 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:88
|
447 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:115
|
448 |
+
msgid "Submit"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:105
|
452 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:101
|
453 |
+
msgid "You do not have the permissions to edit this topic!"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-split.php:105
|
457 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:101
|
458 |
+
msgid "You cannot edit this topic."
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:18
|
462 |
+
#: bbp-admin/bbp-topics.php:592 bbp-admin/bbp-forums.php:388
|
463 |
+
#: bbp-admin/bbp-metaboxes.php:50 bbp-admin/bbp-metaboxes.php:254
|
464 |
+
#: bbp-admin/bbp-metaboxes.php:362 bbp-admin/bbp-metaboxes.php:365
|
465 |
+
#: bbp-admin/bbp-metaboxes.php:405 bbp-admin/bbp-metaboxes.php:408
|
466 |
+
#: bbp-admin/bbp-replies.php:524 bbpress.php:545
|
467 |
+
msgid "Forum"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:19
|
471 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:45
|
472 |
+
#: bbp-includes/bbp-forum-template.php:1777 bbp-admin/bbp-topics.php:591
|
473 |
+
#: bbp-admin/bbp-forums.php:389 bbp-admin/bbp-admin.php:213
|
474 |
+
#: bbp-admin/bbp-admin.php:226 bbpress.php:600 bbpress.php:601
|
475 |
+
msgid "Topics"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:36
|
479 |
+
msgid "Now Editing “%s”"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:38
|
483 |
+
msgid "Create New Topic in “%s”"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:38 bbpress.php:605
|
487 |
+
msgid "Create New Topic"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:46
|
491 |
+
msgid ""
|
492 |
+
"This forum is marked as closed to new topics, however your posting "
|
493 |
+
"capabilities still allow you to do so."
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:54
|
497 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:37
|
498 |
+
msgid "Your account has the ability to post unrestricted HTML content."
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:71
|
502 |
+
msgid "Topic Title (Maximum Length: %d):"
|
|
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:76
|
506 |
+
msgid "Topic Description:"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:83
|
510 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:62
|
511 |
+
msgid ""
|
512 |
+
"You may use these <abbr title=\"HyperText Markup Language\">HTML</abbr> tags "
|
513 |
+
"and attributes:"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:90
|
517 |
+
msgid "Topic Tags:"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:97 bbpress.php:614
|
521 |
+
msgid "Forum:"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:107
|
525 |
+
msgid "Topic Type:"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:122
|
529 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:81
|
530 |
+
msgid "Notify the author of follow-up replies via email"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:126
|
534 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:85
|
535 |
+
msgid "Notify me of follow-up replies via email"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:136
|
539 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:96
|
540 |
+
msgid "Revision"
|
|
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:139
|
544 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:99
|
545 |
+
msgid "Keep a log of this edit:"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:143
|
549 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:103
|
550 |
+
msgid "Optional reason for editing:"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:165
|
554 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:137
|
555 |
+
msgid "The forum ‘%s’ is closed to new topics and replies."
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:173
|
559 |
+
msgid "You cannot create new topics at this time."
|
|
|
|
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:173
|
563 |
+
msgid "You must be logged in to create new topics."
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-topics-created.php:16
|
567 |
+
msgid "Forum Topics Created"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-topics-created.php:27
|
571 |
+
msgid "You have not created any topics."
|
|
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: bbp-themes/bbp-twentyten/bbpress/user-topics-created.php:27
|
575 |
+
msgid "This user has not created any topics."
|
|
|
|
|
|
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: bbp-themes/bbp-twentyten/bbpress/feedback-no-forums.php:13
|
579 |
+
msgid "Oh bother! No forums were found here!"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:15
|
583 |
+
#: bbp-admin/bbp-topics.php:293 bbp-admin/bbp-replies.php:272
|
584 |
+
msgid "Author Information"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:15
|
588 |
+
msgid "Your information:"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:17
|
592 |
+
msgid "Name (required):"
|
|
|
|
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:22
|
596 |
+
msgid "Mail (will not be published) (required):"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-anonymous.php:27
|
600 |
+
msgid "Website:"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:22
|
604 |
+
msgid "Merge topic \"%s\""
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:27
|
608 |
+
msgid ""
|
609 |
+
"Select the topic to merge this one into. The destination topic will remain "
|
610 |
+
"the lead topic, and this one will change into a reply."
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:28
|
614 |
+
msgid ""
|
615 |
+
"To keep this topic as the lead, go to the other topic and use the merge tool "
|
616 |
+
"from there instead."
|
|
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:32
|
620 |
+
msgid ""
|
621 |
+
"All replies within both topics will be merged chronologically. The order of "
|
622 |
+
"the merged replies is based on the time and date they were posted. If the "
|
623 |
+
"destination topic was created after this one, it's post date will be updated "
|
624 |
+
"to second earlier than this one."
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:36
|
628 |
+
msgid "Destination"
|
|
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:40
|
632 |
+
msgid "Merge with this topic:"
|
|
|
|
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:49
|
636 |
+
msgid "No topics were found to which the topic could be merged to!"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:55
|
640 |
+
msgid "There are no other topics in this forum to merge with."
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:70
|
644 |
+
msgid "Merge topic subscribers"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:75
|
648 |
+
msgid "Merge topic favoriters"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php:78
|
652 |
+
msgid "Merge topic tags"
|
|
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:24
|
656 |
+
#: bbp-includes/bbp-common-template.php:1090
|
657 |
+
#: bbp-includes/bbp-common-template.php:1107
|
658 |
+
#: bbp-includes/bbp-topic-functions.php:1079
|
659 |
+
#: bbp-includes/bbp-topic-functions.php:1394
|
660 |
+
#: bbp-admin/importers/bbpress.php:1002
|
661 |
+
msgid "Reply To: %s"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:29
|
665 |
+
msgid ""
|
666 |
+
"This topic is marked as closed to new replies, however your posting "
|
667 |
+
"capabilities still allow you to do so."
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:55
|
671 |
+
msgid "Reply:"
|
|
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:69
|
675 |
+
msgid "Tags:"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:129
|
679 |
+
msgid "The topic ‘%s’ is closed to new replies."
|
|
|
|
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:145
|
683 |
+
msgid "You cannot reply to this topic."
|
|
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:145
|
687 |
+
msgid "You must be logged in to reply to this topic."
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:17
|
691 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:40
|
692 |
+
#: bbp-themes/bbp-twentyten/single-reply.php:31 bbp-admin/bbp-topics.php:595
|
693 |
+
#: bbp-admin/bbp-replies.php:526
|
694 |
+
msgid "Author"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: bbp-themes/bbp-twentyten/page-topic-tags.php:25
|
698 |
msgid ""
|
699 |
+
"<p>This is a collection of tags that are currently popular on our forums.</p>"
|
|
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:29
|
703 |
+
msgid "<p>Here are the statistics and popular topics of our forums.</p>"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:35
|
707 |
+
msgid "Registered Users"
|
|
|
|
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:40
|
711 |
+
#: bbp-admin/bbp-admin.php:161 bbpress.php:543 bbpress.php:544
|
712 |
+
msgid "Forums"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:55 bbpress.php:799
|
716 |
+
msgid "Topic Tags"
|
|
|
|
|
|
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:62
|
720 |
+
msgid "Empty Topic Tags"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:71
|
724 |
+
msgid "Hidden Topics"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:82
|
728 |
+
msgid "Hidden Replies"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:101
|
732 |
+
msgid "Popular Topics"
|
|
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php:20
|
736 |
+
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag.php:20
|
737 |
+
#: bbp-includes/bbp-common-template.php:1494
|
738 |
+
#: bbp-includes/bbp-common-template.php:1591
|
739 |
+
#: bbp-includes/bbp-common-template.php:1803
|
740 |
+
#: bbp-includes/bbp-core-compatibility.php:891
|
741 |
+
msgid "Topic Tag: %s"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: bbp-themes/bbp-twentyten/functions.php:153
|
745 |
+
msgid "favorites"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: bbp-themes/bbp-twentyten/functions.php:154
|
749 |
+
msgid "?"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: bbp-themes/bbp-twentyten/functions.php:155
|
753 |
+
msgid "This topic is one of your %favLinkYes% [%favDel%]"
|
|
|
|
|
|
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: bbp-themes/bbp-twentyten/functions.php:156
|
757 |
+
msgid "%favAdd% (%favLinkNo%)"
|
|
|
|
|
|
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: bbp-themes/bbp-twentyten/functions.php:157
|
761 |
+
#: bbp-includes/bbp-user-template.php:554
|
762 |
+
msgid "×"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: bbp-themes/bbp-twentyten/functions.php:158
|
766 |
+
#: bbp-includes/bbp-user-template.php:546
|
767 |
+
msgid "Add this topic to your favorites"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: bbp-themes/bbp-twentyten/functions.php:167
|
771 |
+
#: bbp-includes/bbp-user-template.php:659
|
772 |
+
msgid "Subscribe"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: bbp-themes/bbp-twentyten/functions.php:168
|
776 |
+
#: bbp-includes/bbp-user-template.php:660
|
777 |
+
msgid "Unsubscribe"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: bbp-themes/bbp-twentyten/single-reply.php:52
|
781 |
+
msgid "Posted on %1$s at %2$s"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: bbp-includes/bbp-reply-template.php:959
|
785 |
+
#: bbp-includes/bbp-user-template.php:1036
|
786 |
+
#: bbp-includes/bbp-topic-template.php:1217
|
787 |
+
msgid "View %s's profile"
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: bbp-includes/bbp-reply-template.php:959
|
791 |
+
#: bbp-includes/bbp-user-template.php:1036
|
792 |
+
#: bbp-includes/bbp-topic-template.php:1217
|
793 |
+
msgid "Visit %s's website"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: bbp-includes/bbp-reply-template.php:1364
|
797 |
+
#: bbp-includes/bbp-common-template.php:1498
|
798 |
+
#: bbp-includes/bbp-topic-template.php:1985 bbpress.php:549 bbpress.php:606
|
799 |
+
#: bbpress.php:663
|
800 |
+
msgid "Edit"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: bbp-includes/bbp-reply-template.php:1477
|
804 |
+
#: bbp-includes/bbp-topic-template.php:2098 bbp-admin/bbp-topics.php:773
|
805 |
+
#: bbp-admin/bbp-replies.php:697
|
806 |
+
msgid "Trash"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: bbp-includes/bbp-reply-template.php:1478
|
810 |
+
#: bbp-includes/bbp-topic-template.php:2099 bbp-admin/bbp-topics.php:771
|
811 |
+
#: bbp-admin/bbp-replies.php:695
|
812 |
+
msgid "Restore"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: bbp-includes/bbp-reply-template.php:1493
|
816 |
+
#: bbp-includes/bbp-topic-template.php:2113 bbp-admin/bbp-topics.php:771
|
817 |
+
#: bbp-admin/bbp-replies.php:695
|
818 |
+
msgid "Restore this item from the Trash"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: bbp-includes/bbp-reply-template.php:1495
|
822 |
+
#: bbp-includes/bbp-topic-template.php:2115 bbp-admin/bbp-topics.php:773
|
823 |
+
#: bbp-admin/bbp-replies.php:697
|
824 |
+
msgid "Move this item to the Trash"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: bbp-includes/bbp-reply-template.php:1499
|
828 |
+
#: bbp-includes/bbp-topic-template.php:2119 bbp-admin/bbp-topics.php:777
|
829 |
+
#: bbp-admin/bbp-replies.php:701
|
830 |
+
msgid "Delete this item permanently"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: bbp-includes/bbp-reply-template.php:1499
|
834 |
+
#: bbp-includes/bbp-topic-template.php:2119
|
835 |
+
msgid "Are you sure you want to delete that permanently?"
|
|
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: bbp-includes/bbp-reply-template.php:1549
|
839 |
+
#: bbp-includes/bbp-topic-template.php:2356 bbp-admin/bbp-topics.php:763
|
840 |
+
#: bbp-admin/bbp-replies.php:687
|
841 |
+
msgid "Spam"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: bbp-includes/bbp-reply-template.php:1550
|
845 |
+
#: bbp-includes/bbp-topic-template.php:2357
|
846 |
+
msgid "Unspam"
|
|
|
|
|
|
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: bbp-includes/bbp-reply-template.php:1614
|
850 |
+
msgid "Split"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: bbp-includes/bbp-reply-template.php:1615
|
854 |
+
msgid "Split the topic from this reply"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: bbp-includes/bbp-reply-template.php:1701
|
858 |
+
msgid "Viewing reply %1$s (of %2$s total)"
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: bbp-includes/bbp-reply-template.php:1703
|
862 |
+
msgid "Viewing %1$s replies"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: bbp-includes/bbp-reply-template.php:1705
|
866 |
+
msgid "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: bbp-includes/bbp-reply-template.php:1707
|
870 |
+
msgid "Viewing %1$s reply"
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: bbp-includes/bbp-reply-template.php:1714
|
874 |
+
msgid "Viewing post %1$s (of %2$s total)"
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: bbp-includes/bbp-reply-template.php:1716
|
878 |
+
msgid "Viewing %1$s posts"
|
|
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: bbp-includes/bbp-reply-template.php:1718
|
882 |
+
msgid "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: bbp-includes/bbp-reply-template.php:1720
|
886 |
+
msgid "Viewing %1$s post"
|
|
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: bbp-includes/bbp-user-template.php:151
|
890 |
+
msgid "Anonymous"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: bbp-includes/bbp-user-template.php:413
|
894 |
+
msgid "Admin"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: bbp-includes/bbp-user-template.php:547
|
898 |
+
msgid " (%?%)"
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: bbp-includes/bbp-user-template.php:553
|
902 |
+
msgid "This topic is one of your %favorites% ["
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: bbp-includes/bbp-user-template.php:555
|
906 |
+
msgid "]"
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: bbp-includes/bbp-user-template.php:722
|
910 |
+
msgid "User updated."
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: bbp-includes/bbp-user-template.php:746
|
914 |
+
msgid "You have super admin privileges."
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: bbp-includes/bbp-user-template.php:746
|
918 |
+
msgid "This user has super admin privileges."
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: bbp-includes/bbp-user-template.php:811
|
922 |
+
msgid "— No role for this site —"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: bbp-includes/bbp-user-template.php:860
|
926 |
+
msgid "You are now logged out."
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: bbp-includes/bbp-user-template.php:864
|
930 |
+
msgid "New user registration is currently not allowed."
|
|
|
|
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: bbp-includes/bbp-user-template.php:873
|
934 |
+
msgid "Check your e-mail for the confirmation link."
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: bbp-includes/bbp-user-template.php:878
|
938 |
+
msgid "Check your e-mail for your new password."
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: bbp-includes/bbp-user-template.php:883
|
942 |
+
msgid "Registration complete. Please check your e-mail."
|
943 |
+
msgstr ""
|
944 |
+
|
945 |
+
#: bbp-includes/bbp-extend-akismet.php:259
|
946 |
+
msgid "%1$s reported this %2$s as spam"
|
947 |
+
msgstr ""
|
948 |
+
|
949 |
+
#: bbp-includes/bbp-extend-akismet.php:266
|
950 |
+
msgid "%1$s reported this %2$s as not spam"
|
951 |
+
msgstr ""
|
952 |
+
|
953 |
+
#: bbp-includes/bbp-extend-akismet.php:410
|
954 |
+
msgid "Akismet caught this post as spam"
|
955 |
+
msgstr ""
|
956 |
+
|
957 |
+
#: bbp-includes/bbp-extend-akismet.php:414
|
958 |
+
#: bbp-includes/bbp-extend-akismet.php:428
|
959 |
+
msgid "Post status was changed to %s"
|
960 |
+
msgstr ""
|
961 |
+
|
962 |
+
#: bbp-includes/bbp-extend-akismet.php:421
|
963 |
+
msgid "Akismet cleared this post"
|
964 |
+
msgstr ""
|
965 |
+
|
966 |
+
#: bbp-includes/bbp-extend-akismet.php:435
|
967 |
msgid ""
|
968 |
+
"Akismet was unable to check this post (response: %s), will automatically "
|
969 |
+
"retry again later."
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: bbp-includes/bbp-common-template.php:1008
|
973 |
+
msgid "No topics available"
|
|
|
|
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: bbp-includes/bbp-common-template.php:1013
|
977 |
+
msgid "No forums available"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: bbp-includes/bbp-common-template.php:1018
|
981 |
+
msgid "None available"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: bbp-includes/bbp-common-template.php:1438
|
985 |
+
msgid "Home"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: bbp-includes/bbp-common-template.php:1512
|
989 |
+
msgid "‹"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: bbp-includes/bbp-common-template.php:1512
|
993 |
+
msgid "›"
|
|
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: bbp-includes/bbp-common-template.php:1737
|
997 |
+
msgid "Log Out"
|
|
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: bbp-includes/bbp-common-template.php:1790
|
1001 |
+
msgid "Forum: %s"
|
|
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: bbp-includes/bbp-common-template.php:1794
|
1005 |
+
msgid "Topic: %s"
|
|
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: bbp-includes/bbp-common-template.php:1812
|
1009 |
+
msgid "Your Profile"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: bbp-includes/bbp-common-template.php:1817
|
1013 |
+
msgid "%s's Profile"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: bbp-includes/bbp-common-template.php:1825
|
1017 |
+
msgid "Edit Your Profile"
|
1018 |
+
msgstr ""
|
1019 |
+
|
1020 |
+
#: bbp-includes/bbp-common-template.php:1830
|
1021 |
+
msgid "Edit %s's Profile"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: bbp-includes/bbp-common-template.php:1837
|
1025 |
+
msgid "View: %s"
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: bbp-includes/bbp-extend-buddypress.php:180
|
1029 |
+
msgid "New topic created"
|
1030 |
+
msgstr ""
|
1031 |
+
|
1032 |
+
#: bbp-includes/bbp-extend-buddypress.php:183
|
1033 |
+
msgid "New reply created"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: bbp-includes/bbp-extend-buddypress.php:410
|
1037 |
+
msgid "%1$s started the topic %2$s in the forum %3$s"
|
1038 |
+
msgstr ""
|
1039 |
+
|
1040 |
+
#: bbp-includes/bbp-extend-buddypress.php:494
|
1041 |
+
msgid "%1$s replied to the topic %2$s in the forum %3$s"
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: bbp-includes/bbp-common-functions.php:451
|
1045 |
+
#: bbp-includes/bbp-common-functions.php:483
|
1046 |
+
msgid "Private: %s"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
+
#: bbp-includes/bbp-common-functions.php:452
|
1050 |
+
#: bbp-includes/bbp-common-functions.php:484
|
1051 |
+
msgid "Spammed: %s"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: bbp-includes/bbp-common-functions.php:453
|
1055 |
+
#: bbp-includes/bbp-common-functions.php:485
|
1056 |
msgid "Trashed: %s"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: bbp-includes/bbp-common-functions.php:686
|
1060 |
msgid "<strong>ERROR</strong>: Invalid author name submitted!"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: bbp-includes/bbp-common-functions.php:689
|
1064 |
msgid "<strong>ERROR</strong>: Invalid email address submitted!"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: bbp-includes/bbp-common-functions.php:869
|
1068 |
msgid ""
|
1069 |
"%1$s wrote:\n"
|
1070 |
"\n"
|
1076 |
"topic and login to unsubscribe."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: bbp-includes/bbp-core-caps.php:31
|
1080 |
+
msgid "Forum Moderator"
|
|
|
|
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: bbp-includes/bbp-topic-functions.php:155
|
1084 |
+
msgid ""
|
1085 |
+
"<strong>ERROR</strong>: You do not have permission to create new topics."
|
|
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: bbp-includes/bbp-topic-functions.php:179
|
1089 |
+
#: bbp-includes/bbp-topic-functions.php:498
|
1090 |
+
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
|
|
1091 |
msgstr ""
|
1092 |
|
1093 |
+
#: bbp-includes/bbp-topic-functions.php:191
|
1094 |
+
#: bbp-includes/bbp-topic-functions.php:510
|
1095 |
+
msgid "<strong>ERROR</strong>: Your topic cannot be empty."
|
|
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: bbp-includes/bbp-topic-functions.php:197
|
1099 |
+
#: bbp-includes/bbp-topic-functions.php:458
|
1100 |
+
#: bbp-includes/bbp-reply-functions.php:164
|
1101 |
+
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: bbp-includes/bbp-topic-functions.php:208
|
1105 |
+
msgid ""
|
1106 |
+
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
1107 |
+
"in this forum."
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: bbp-includes/bbp-topic-functions.php:212
|
1111 |
+
#: bbp-includes/bbp-topic-functions.php:477
|
1112 |
+
msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
|
|
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: bbp-includes/bbp-topic-functions.php:216
|
1116 |
+
#: bbp-includes/bbp-topic-functions.php:481
|
1117 |
+
msgid ""
|
1118 |
+
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
1119 |
+
"capability to read or create new topics in it."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: bbp-includes/bbp-topic-functions.php:220
|
1123 |
+
#: bbp-includes/bbp-topic-functions.php:485
|
1124 |
+
msgid ""
|
1125 |
+
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
1126 |
+
"capability to read or create new topics in it."
|
1127 |
msgstr ""
|
1128 |
|
1129 |
+
#: bbp-includes/bbp-topic-functions.php:226
|
1130 |
+
#: bbp-includes/bbp-reply-functions.php:201
|
1131 |
+
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: bbp-includes/bbp-topic-functions.php:231
|
1135 |
+
msgid ""
|
1136 |
+
"<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
|
1137 |
+
"you’ve already said that!"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: bbp-includes/bbp-topic-functions.php:414
|
1141 |
+
#: bbp-includes/bbp-topic-functions.php:940
|
1142 |
+
msgid "<strong>ERROR</strong>: Topic ID not found."
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: bbp-includes/bbp-topic-functions.php:424
|
1146 |
+
msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
|
1147 |
msgstr ""
|
1148 |
|
1149 |
+
#: bbp-includes/bbp-topic-functions.php:437
|
1150 |
+
msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: bbp-includes/bbp-topic-functions.php:473
|
1154 |
+
msgid ""
|
1155 |
+
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
1156 |
+
"in it."
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: bbp-includes/bbp-topic-functions.php:949
|
1160 |
+
msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: bbp-includes/bbp-topic-functions.php:953
|
1164 |
+
#: bbp-includes/bbp-topic-functions.php:1239
|
1165 |
+
msgid ""
|
1166 |
+
"<strong>ERROR</strong>: You do not have the permissions to edit the source "
|
1167 |
+
"topic."
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: bbp-includes/bbp-topic-functions.php:959
|
1171 |
+
msgid "<strong>ERROR</strong>: Destination topic ID not found."
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: bbp-includes/bbp-topic-functions.php:965
|
1175 |
+
msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: bbp-includes/bbp-topic-functions.php:969
|
1179 |
+
msgid ""
|
1180 |
+
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
1181 |
+
"destination topic."
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: bbp-includes/bbp-topic-functions.php:1215
|
1185 |
+
msgid "<strong>ERROR</strong>: Reply ID to split the topic from not found!"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: bbp-includes/bbp-topic-functions.php:1223
|
1189 |
+
msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: bbp-includes/bbp-topic-functions.php:1232
|
1193 |
+
msgid "<strong>ERROR</strong>: The topic you want to split was not found."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: bbp-includes/bbp-topic-functions.php:1248
|
1197 |
+
msgid "<strong>ERROR</strong>: You need to choose a valid split option."
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: bbp-includes/bbp-topic-functions.php:1261
|
1201 |
+
msgid "<strong>ERROR</strong>: Destination topic ID not found!"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: bbp-includes/bbp-topic-functions.php:1270
|
1205 |
+
msgid "<strong>ERROR</strong>: The topic you want to split to was not found!"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: bbp-includes/bbp-topic-functions.php:1274
|
1209 |
+
msgid ""
|
1210 |
+
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
1211 |
+
"destination topic!"
|
1212 |
+
msgstr ""
|
1213 |
+
|
1214 |
+
#: bbp-includes/bbp-topic-functions.php:1313
|
1215 |
+
msgid ""
|
1216 |
+
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
1217 |
+
"topic. Please try again."
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: bbp-includes/bbp-topic-functions.php:1318
|
1221 |
+
msgid ""
|
1222 |
+
"<strong>ERROR</strong>: You do not have the permissions to create new "
|
1223 |
+
"topics. The reply could not be converted into a topic."
|
1224 |
+
msgstr ""
|
1225 |
+
|
1226 |
+
#: bbp-includes/bbp-topic-functions.php:1524
|
1227 |
+
msgid ""
|
1228 |
+
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1229 |
+
"getting the tag: %s"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: bbp-includes/bbp-topic-functions.php:1539
|
1233 |
+
#: bbp-includes/bbp-topic-functions.php:1575
|
1234 |
+
msgid ""
|
1235 |
+
"<strong>ERROR</strong>: You do not have the permissions to edit the topic "
|
1236 |
+
"tags."
|
1237 |
+
msgstr ""
|
1238 |
+
|
1239 |
+
#: bbp-includes/bbp-topic-functions.php:1545
|
1240 |
+
#: bbp-includes/bbp-topic-functions.php:1581
|
1241 |
+
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: bbp-includes/bbp-topic-functions.php:1555
|
1245 |
+
msgid ""
|
1246 |
+
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1247 |
+
"updating the tag: %s"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: bbp-includes/bbp-topic-functions.php:1591
|
1251 |
+
#: bbp-includes/bbp-topic-functions.php:1609
|
1252 |
+
msgid ""
|
1253 |
+
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1254 |
+
"merging the tags: %s"
|
1255 |
+
msgstr ""
|
1256 |
+
|
1257 |
+
#: bbp-includes/bbp-topic-functions.php:1600
|
1258 |
+
msgid ""
|
1259 |
+
"<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
1260 |
+
msgstr ""
|
1261 |
+
|
1262 |
+
#: bbp-includes/bbp-topic-functions.php:1629
|
1263 |
+
msgid ""
|
1264 |
+
"<strong>ERROR</strong>: You do not have the permissions to delete the topic "
|
1265 |
+
"tags."
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: bbp-includes/bbp-topic-functions.php:1638
|
1269 |
+
msgid ""
|
1270 |
+
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
1271 |
+
"deleting the tag: %s"
|
1272 |
+
msgstr ""
|
1273 |
+
|
1274 |
+
#: bbp-includes/bbp-topic-functions.php:1764
|
1275 |
+
msgid "<strong>ERROR:</strong> You do not have the permission to do that."
|
1276 |
+
msgstr ""
|
1277 |
+
|
1278 |
+
#: bbp-includes/bbp-topic-functions.php:1777
|
1279 |
+
msgid "<strong>ERROR</strong>: There was a problem closing the topic."
|
1280 |
+
msgstr ""
|
1281 |
+
|
1282 |
+
#: bbp-includes/bbp-topic-functions.php:1777
|
1283 |
+
msgid "<strong>ERROR</strong>: There was a problem opening the topic."
|
1284 |
+
msgstr ""
|
1285 |
+
|
1286 |
+
#: bbp-includes/bbp-topic-functions.php:1788
|
1287 |
+
msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
|
1288 |
+
msgstr ""
|
1289 |
+
|
1290 |
+
#: bbp-includes/bbp-topic-functions.php:1788
|
1291 |
+
msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
|
1292 |
+
msgstr ""
|
1293 |
+
|
1294 |
+
#: bbp-includes/bbp-topic-functions.php:1798
|
1295 |
+
msgid ""
|
1296 |
+
"<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
1297 |
+
msgstr ""
|
1298 |
+
|
1299 |
+
#: bbp-includes/bbp-topic-functions.php:1798
|
1300 |
+
msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
|
1301 |
+
msgstr ""
|
1302 |
+
|
1303 |
+
#: bbp-includes/bbp-topic-functions.php:1817
|
1304 |
+
msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
|
1305 |
+
msgstr ""
|
1306 |
+
|
1307 |
+
#: bbp-includes/bbp-topic-functions.php:1825
|
1308 |
+
msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
|
1309 |
+
msgstr ""
|
1310 |
+
|
1311 |
+
#: bbp-includes/bbp-topic-functions.php:1833
|
1312 |
+
msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
|
1313 |
+
msgstr ""
|
1314 |
+
|
1315 |
+
#: bbp-includes/bbp-topic-functions.php:2784 bbpress.php:603
|
1316 |
+
msgid "All Topics"
|
1317 |
+
msgstr ""
|
1318 |
+
|
1319 |
+
#: bbp-includes/bbp-topic-functions.php:2809
|
1320 |
+
#: bbp-includes/bbp-reply-functions.php:1324
|
1321 |
+
msgid "Replies: %s"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: bbp-includes/bbp-forum-template.php:512 bbp-admin/bbp-forums.php:438
|
1325 |
+
msgid "No Topics"
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: bbp-includes/bbp-forum-template.php:1084
|
1329 |
+
msgid "%s topic"
|
1330 |
+
msgid_plural "%s topics"
|
1331 |
+
msgstr[0] ""
|
1332 |
+
msgstr[1] ""
|
1333 |
+
|
1334 |
+
#: bbp-includes/bbp-forum-template.php:1097
|
1335 |
+
#: bbp-includes/bbp-topic-template.php:1646
|
1336 |
+
msgid " (+ %d hidden)"
|
1337 |
+
msgstr ""
|
1338 |
+
|
1339 |
+
#: bbp-includes/bbp-forum-template.php:1678
|
1340 |
+
#: bbp-includes/bbp-topic-template.php:1633
|
1341 |
+
msgid "%s reply"
|
1342 |
+
msgid_plural "%s replies"
|
1343 |
+
msgstr[0] ""
|
1344 |
+
msgstr[1] ""
|
1345 |
+
|
1346 |
+
#: bbp-includes/bbp-forum-template.php:1688
|
1347 |
+
msgid ""
|
1348 |
+
"This category contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
1349 |
+
msgstr ""
|
1350 |
+
|
1351 |
+
#: bbp-includes/bbp-forum-template.php:1692
|
1352 |
+
msgid ""
|
1353 |
+
"This forum contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: bbp-includes/bbp-forum-template.php:1699
|
1357 |
+
msgid "This category contains %1$s and %2$s."
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: bbp-includes/bbp-forum-template.php:1703
|
1361 |
+
msgid "This forum contains %1$s and %2$s."
|
1362 |
+
msgstr ""
|
1363 |
+
|
1364 |
+
#: bbp-includes/bbp-core-widgets.php:50
|
1365 |
+
msgid "The login widget."
|
1366 |
+
msgstr ""
|
1367 |
+
|
1368 |
+
#: bbp-includes/bbp-core-widgets.php:53
|
1369 |
+
msgid "bbPress Login Widget"
|
1370 |
+
msgstr ""
|
1371 |
+
|
1372 |
+
#: bbp-includes/bbp-core-widgets.php:151 bbp-includes/bbp-core-widgets.php:267
|
1373 |
+
#: bbp-includes/bbp-core-widgets.php:404 bbp-includes/bbp-core-widgets.php:602
|
1374 |
+
#: bbp-includes/bbp-core-widgets.php:761
|
1375 |
msgid "Title:"
|
1376 |
msgstr ""
|
1377 |
|
1378 |
+
#: bbp-includes/bbp-core-widgets.php:194
|
1379 |
msgid "A list of views."
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: bbp-includes/bbp-core-widgets.php:197
|
1383 |
msgid "bbPress View List"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: bbp-includes/bbp-core-widgets.php:311
|
1387 |
msgid "A list of forums."
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: bbp-includes/bbp-core-widgets.php:314
|
1391 |
msgid "bbPress Forum List"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: bbp-includes/bbp-core-widgets.php:410 bbpress.php:557
|
1395 |
+
msgid "Parent Forum:"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: bbp-includes/bbp-core-widgets.php:416
|
1399 |
msgid ""
|
1400 |
"Forum ID number. \"0\" to show only root forums, \"-1\" to display all "
|
1401 |
"forums."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: bbp-includes/bbp-core-widgets.php:458
|
1405 |
msgid "A list of recent topics, sorted by popularity or freshness."
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: bbp-includes/bbp-core-widgets.php:461
|
1409 |
msgid "bbPress Topics List"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
+
#: bbp-includes/bbp-core-widgets.php:603
|
1413 |
msgid "Maximum topics to show:"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
+
#: bbp-includes/bbp-core-widgets.php:604 bbp-includes/bbp-core-widgets.php:763
|
1417 |
msgid "Show post date:"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#: bbp-includes/bbp-core-widgets.php:606
|
1421 |
msgid "Popularity check:"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
+
#: bbp-includes/bbp-core-widgets.php:607
|
1425 |
msgid ""
|
1426 |
"Number of topics back to check reply count to determine popularity. A number "
|
1427 |
"less than the maximum number of topics to show disables the check."
|
1428 |
msgstr ""
|
1429 |
|
1430 |
+
#: bbp-includes/bbp-core-widgets.php:649
|
1431 |
msgid "A list of bbPress recent replies."
|
1432 |
msgstr ""
|
1433 |
|
1434 |
+
#: bbp-includes/bbp-core-widgets.php:762
|
1435 |
msgid "Maximum replies to show:"
|
1436 |
msgstr ""
|
1437 |
|
1438 |
+
#: bbp-includes/bbp-core-compatibility.php:236
|
1439 |
+
msgid "Hands off, partner!"
|
1440 |
msgstr ""
|
1441 |
|
1442 |
+
#: bbp-includes/bbp-core-compatibility.php:881
|
1443 |
+
msgid "Edit Topic Tag: %s"
|
1444 |
msgstr ""
|
1445 |
|
1446 |
+
#: bbp-includes/bbp-core-compatibility.php:1217
|
1447 |
+
msgid ""
|
1448 |
+
"Conditional query tags do not work before the query is run. Before then, "
|
1449 |
+
"they always return false."
|
1450 |
+
msgstr ""
|
1451 |
+
|
1452 |
+
#: bbp-includes/bbp-core-compatibility.php:1452
|
1453 |
+
msgid "You do not have the permission to edit this user."
|
1454 |
+
msgstr ""
|
1455 |
+
|
1456 |
+
#: bbp-includes/bbp-user-functions.php:384
|
1457 |
+
#: bbp-includes/bbp-user-functions.php:676
|
1458 |
+
msgid ""
|
1459 |
+
"<strong>ERROR</strong>: You don't have the permission to edit favorites of "
|
1460 |
+
"that user!"
|
1461 |
+
msgstr ""
|
1462 |
+
|
1463 |
+
#: bbp-includes/bbp-user-functions.php:388
|
1464 |
+
msgid ""
|
1465 |
+
"<strong>ERROR</strong>: No topic was found! Which topic are you marking/"
|
1466 |
+
"unmarking as favorite?"
|
1467 |
+
msgstr ""
|
1468 |
+
|
1469 |
+
#: bbp-includes/bbp-user-functions.php:427
|
1470 |
+
msgid ""
|
1471 |
+
"<strong>ERROR</strong>: There was a problem removing that topic from "
|
1472 |
+
"favorites!"
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: bbp-includes/bbp-user-functions.php:429
|
1476 |
+
msgid "<strong>ERROR</strong>: There was a problem favoriting that topic!"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: bbp-includes/bbp-user-functions.php:680
|
1480 |
+
msgid ""
|
1481 |
+
"<strong>ERROR</strong>: No topic was found! Which topic are you subscribing/"
|
1482 |
+
"unsubscribing to?"
|
1483 |
+
msgstr ""
|
1484 |
+
|
1485 |
+
#: bbp-includes/bbp-user-functions.php:718
|
1486 |
+
msgid ""
|
1487 |
+
"<strong>ERROR</strong>: There was a problem unsubscribing from that topic!"
|
1488 |
+
msgstr ""
|
1489 |
+
|
1490 |
+
#: bbp-includes/bbp-user-functions.php:720
|
1491 |
+
msgid "<strong>ERROR</strong>: There was a problem subscribing to that topic!"
|
1492 |
+
msgstr ""
|
1493 |
|
1494 |
+
#: bbp-includes/bbp-user-functions.php:799
|
1495 |
+
msgid ""
|
1496 |
+
"What are you doing here? You do not have the permission to edit this user."
|
1497 |
+
msgstr ""
|
1498 |
+
|
1499 |
+
#: bbp-includes/bbp-topic-template.php:1591 bbp-admin/bbp-topics.php:684
|
1500 |
+
msgid "No Replies"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
+
#: bbp-includes/bbp-topic-template.php:1807
|
1504 |
msgid "Tagged:"
|
1505 |
msgstr ""
|
1506 |
|
1507 |
+
#: bbp-includes/bbp-topic-template.php:2169 bbp-admin/bbp-topics.php:740
|
1508 |
msgid "Close"
|
1509 |
msgstr ""
|
1510 |
|
1511 |
+
#: bbp-includes/bbp-topic-template.php:2170 bbp-admin/bbp-topics.php:742
|
1512 |
+
#: bbp-admin/bbp-metaboxes.php:267
|
1513 |
msgid "Open"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: bbp-includes/bbp-topic-template.php:2230 bbp-admin/bbp-topics.php:754
|
1517 |
msgid "Stick"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: bbp-includes/bbp-topic-template.php:2231 bbp-admin/bbp-topics.php:751
|
1521 |
msgid "Unstick"
|
1522 |
msgstr ""
|
1523 |
|
1524 |
+
#: bbp-includes/bbp-topic-template.php:2232 bbp-admin/bbp-topics.php:754
|
1525 |
msgid "to front"
|
1526 |
msgstr ""
|
1527 |
|
1528 |
+
#: bbp-includes/bbp-topic-template.php:2412
|
1529 |
msgid "Viewing topic %1$s (of %2$s total)"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
+
#: bbp-includes/bbp-topic-template.php:2414
|
1533 |
msgid "Viewing %1$s topics"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
+
#: bbp-includes/bbp-topic-template.php:2416
|
1537 |
msgid "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: bbp-includes/bbp-topic-template.php:2418
|
1541 |
msgid "Viewing %1$s topic"
|
1542 |
msgstr ""
|
1543 |
|
1544 |
+
#: bbp-includes/bbp-topic-template.php:2478
|
1545 |
msgid "This topic is marked as spam."
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: bbp-includes/bbp-topic-template.php:2483
|
1549 |
msgid "This topic is in the trash."
|
1550 |
msgstr ""
|
1551 |
|
1552 |
+
#: bbp-includes/bbp-topic-template.php:2519
|
1553 |
msgid "Normal"
|
1554 |
msgstr ""
|
1555 |
|
1556 |
+
#: bbp-includes/bbp-topic-template.php:2520
|
1557 |
msgid "Sticky"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
+
#: bbp-includes/bbp-topic-template.php:2521
|
1561 |
msgid "Super Sticky"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
+
#: bbp-includes/bbp-topic-template.php:2643
|
1565 |
msgid "%s voice"
|
1566 |
msgid_plural "%s voices"
|
1567 |
msgstr[0] ""
|
1568 |
msgstr[1] ""
|
1569 |
|
1570 |
+
#: bbp-includes/bbp-topic-template.php:2648
|
1571 |
msgid ""
|
1572 |
"This topic has %1$s, contains %2$s, and was last updated by %3$s %4$s ago."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
+
#: bbp-includes/bbp-topic-template.php:2652
|
1576 |
msgid "This topic has %1$s, contains %2$s."
|
1577 |
msgstr ""
|
1578 |
|
1579 |
+
#: bbp-includes/bbp-reply-functions.php:146
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1580 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
1581 |
msgstr ""
|
1582 |
|
1583 |
+
#: bbp-includes/bbp-reply-functions.php:158
|
1584 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
1585 |
msgstr ""
|
1586 |
|
1587 |
+
#: bbp-includes/bbp-reply-functions.php:184
|
|
|
|
|
|
|
|
|
|
|
|
|
1588 |
msgid "<strong>ERROR</strong>: Your reply needs a title."
|
1589 |
msgstr ""
|
1590 |
|
1591 |
+
#: bbp-includes/bbp-reply-functions.php:196
|
1592 |
+
#: bbp-includes/bbp-reply-functions.php:449
|
1593 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
1594 |
msgstr ""
|
1595 |
|
1596 |
+
#: bbp-includes/bbp-reply-functions.php:206
|
|
|
|
|
|
|
|
|
|
|
1597 |
msgid ""
|
1598 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
1599 |
"you’ve already said that!"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
+
#: bbp-includes/bbp-reply-functions.php:255
|
1603 |
+
#: bbp-includes/bbp-reply-functions.php:488
|
1604 |
msgid ""
|
1605 |
+
"<strong>ERROR</strong>: There was a problem adding the tags to the topic."
|
1606 |
msgstr ""
|
1607 |
|
1608 |
+
#: bbp-includes/bbp-reply-functions.php:363
|
1609 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
1610 |
msgstr ""
|
1611 |
|
1612 |
+
#: bbp-includes/bbp-reply-functions.php:373
|
1613 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
1614 |
msgstr ""
|
1615 |
|
1616 |
+
#: bbp-includes/bbp-reply-functions.php:386
|
1617 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
1618 |
msgstr ""
|
1619 |
|
1620 |
+
#: bbp-includes/bbp-reply-functions.php:416
|
1621 |
msgid ""
|
1622 |
"<strong>ERROR</strong>: This forum is a category. No topics or replies can "
|
1623 |
"be created in it."
|
1624 |
msgstr ""
|
1625 |
|
1626 |
+
#: bbp-includes/bbp-reply-functions.php:420
|
1627 |
msgid ""
|
1628 |
"<strong>ERROR</strong>: This forum has been closed to new topics and replies."
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: bbp-includes/bbp-reply-functions.php:424
|
1632 |
msgid ""
|
1633 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
1634 |
"capability to read or create new replies in it."
|
1635 |
msgstr ""
|
1636 |
|
1637 |
+
#: bbp-includes/bbp-reply-functions.php:428
|
1638 |
msgid ""
|
1639 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
1640 |
"capability to read or create new replies in it."
|
1641 |
msgstr ""
|
1642 |
|
1643 |
+
#: bbp-includes/bbp-reply-functions.php:958
|
1644 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
|
1645 |
msgstr ""
|
1646 |
|
1647 |
+
#: bbp-includes/bbp-reply-functions.php:971
|
1648 |
msgid ""
|
1649 |
"<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: bbp-includes/bbp-reply-functions.php:971
|
1653 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: bbp-includes/bbp-reply-functions.php:990
|
1657 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
+
#: bbp-includes/bbp-reply-functions.php:998
|
1661 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: bbp-includes/bbp-reply-functions.php:1006
|
1665 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: bbp-includes/bbp-reply-functions.php:1282
|
1669 |
msgid "All Posts"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: bbp-includes/bbp-reply-functions.php:1284 bbpress.php:660
|
1673 |
msgid "All Replies"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: bbp-admin/bbp-topics.php:116
|
1677 |
+
msgid ""
|
1678 |
+
"The topic title field and the big topic editing area are fixed in place, but "
|
1679 |
+
"you can reposition all the other boxes using drag and drop, and can minimize "
|
1680 |
+
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
1681 |
+
"tab to unhide more boxes (Topic Tags, Topic Attributes, or Slug) or to "
|
1682 |
+
"choose a 1- or 2-column layout for this screen."
|
1683 |
msgstr ""
|
1684 |
|
1685 |
+
#: bbp-admin/bbp-topics.php:117
|
1686 |
+
msgid ""
|
1687 |
+
"<strong>Title</strong> - Enter a title for your topic. After you enter a "
|
1688 |
+
"title, you will see the permalink below, which you can edit."
|
1689 |
msgstr ""
|
1690 |
|
1691 |
+
#: bbp-admin/bbp-topics.php:118
|
1692 |
+
msgid ""
|
1693 |
+
"<strong>Post editor</strong> - Enter the text for your topic. There are two "
|
1694 |
+
"modes of editing: Visual and HTML. Choose the mode by clicking on the "
|
1695 |
+
"appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon "
|
1696 |
+
"in the row to get a second row of controls. The screen icon just before that "
|
1697 |
+
"allows you to expand the edit box to full screen. The HTML mode allows you "
|
1698 |
+
"to enter raw HTML along with your forum text. You can insert media files by "
|
1699 |
+
"clicking the icons above the post editor and following the directions."
|
1700 |
msgstr ""
|
1701 |
|
1702 |
+
#: bbp-admin/bbp-topics.php:119
|
1703 |
+
msgid ""
|
1704 |
+
"<strong>Topic Attributes</strong> - Select the attributes that your topic "
|
1705 |
+
"should have. The Forum dropdown determines the parent forum that the topic "
|
1706 |
+
"belongs to. Select the forum or category from the dropdown, or leave the "
|
1707 |
+
"default (No Forum) to post the topic without an assigned forum."
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: bbp-admin/bbp-topics.php:120
|
1711 |
+
msgid ""
|
1712 |
+
"<strong>Publish</strong> - The Publish box will allow you to save your topic "
|
1713 |
+
"as Draft or Pending Review. You may Preview your topic before it is "
|
1714 |
+
"published as well. The Visibility will determine whether the topic is "
|
1715 |
+
"Public, Password protected (requiring a password on the site to view) or "
|
1716 |
+
"Private (only the author will have access to it). Topics may be published "
|
1717 |
+
"immediately by clicking the dropdown, or at a specific date and time by "
|
1718 |
+
"clicking the Edit link."
|
1719 |
msgstr ""
|
1720 |
|
1721 |
+
#: bbp-admin/bbp-topics.php:121
|
1722 |
+
msgid ""
|
1723 |
+
"<strong>Topic Tags</strong> - You can assign keywords to your topics using "
|
1724 |
+
"Topic Tags. Unlike categories, tags have no hierarchy, meaning there is no "
|
1725 |
+
"relationship from one tag to another. Topics can be added and modified "
|
1726 |
+
"further from the Topic Tags screen."
|
1727 |
msgstr ""
|
1728 |
|
1729 |
+
#: bbp-admin/bbp-topics.php:122
|
1730 |
+
msgid ""
|
1731 |
+
"<strong>Revisions</strong> - Revisions show past versions of the saved "
|
1732 |
+
"topic. Each revision can be compared to the current version, or another "
|
1733 |
+
"revision. Revisions can also be restored to the current version."
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: bbp-admin/bbp-topics.php:123 bbp-admin/bbp-topics.php:167
|
1737 |
+
#: bbp-admin/bbp-settings.php:465 bbp-admin/bbp-forums.php:119
|
1738 |
+
#: bbp-admin/bbp-forums.php:157 bbp-admin/bbp-replies.php:122
|
1739 |
+
#: bbp-admin/bbp-replies.php:163
|
1740 |
+
msgid "<strong>For more information:</strong>"
|
1741 |
msgstr ""
|
1742 |
|
1743 |
+
#: bbp-admin/bbp-topics.php:126 bbp-admin/bbp-topics.php:170
|
1744 |
+
#: bbp-admin/bbp-settings.php:468 bbp-admin/bbp-forums.php:122
|
1745 |
+
#: bbp-admin/bbp-forums.php:160 bbp-admin/bbp-replies.php:125
|
1746 |
+
#: bbp-admin/bbp-replies.php:166
|
1747 |
+
msgid "<a href=\"http://bbpress.org/documentation/\">bbPress Documentation</a>"
|
1748 |
msgstr ""
|
1749 |
|
1750 |
+
#: bbp-admin/bbp-topics.php:127 bbp-admin/bbp-topics.php:171
|
1751 |
+
#: bbp-admin/bbp-settings.php:469 bbp-admin/bbp-forums.php:123
|
1752 |
+
#: bbp-admin/bbp-forums.php:161 bbp-admin/bbp-replies.php:126
|
1753 |
+
#: bbp-admin/bbp-replies.php:167
|
1754 |
+
msgid "<a href=\"http://bbpress.org/forums/\">bbPress Support Forums</a>"
|
1755 |
msgstr ""
|
1756 |
|
1757 |
+
#: bbp-admin/bbp-topics.php:142
|
1758 |
+
msgid "This screen displays the topics created on your site."
|
1759 |
msgstr ""
|
1760 |
|
1761 |
+
#: bbp-admin/bbp-topics.php:143 bbp-admin/bbp-forums.php:139
|
1762 |
+
#: bbp-admin/bbp-replies.php:142
|
1763 |
+
msgid "You can customize the display of this screen in a number of ways:"
|
1764 |
msgstr ""
|
1765 |
|
1766 |
+
#: bbp-admin/bbp-topics.php:146
|
1767 |
+
msgid ""
|
1768 |
+
"You can hide/display columns based on your needs and decide how many topics "
|
1769 |
+
"to list per screen using the Screen Options tab."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
+
#: bbp-admin/bbp-topics.php:147
|
1773 |
+
msgid ""
|
1774 |
+
"You can filter the list of topics by topics status using the text links in "
|
1775 |
+
"the upper left to show All, Published, Pending Review, Draft, or Trashed "
|
1776 |
+
"topics. The default view is to show all topics."
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: bbp-admin/bbp-topics.php:148
|
1780 |
+
msgid ""
|
1781 |
+
"You can view topics in a simple title list or with an excerpt. Choose the "
|
1782 |
+
"view you prefer by clicking on the icons at the top of the list on the right."
|
1783 |
msgstr ""
|
1784 |
|
1785 |
+
#: bbp-admin/bbp-topics.php:149
|
|
|
1786 |
msgid ""
|
1787 |
+
"You can refine the list to show only topics from a specific month by using "
|
1788 |
+
"the dropdown menus above the topics list. Click the Filter button after "
|
1789 |
+
"making your selection."
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: bbp-admin/bbp-topics.php:150
|
1793 |
msgid ""
|
1794 |
+
"You can also show only topics from a specific parent forum by using the "
|
1795 |
+
"parent forum dropdown above the topics list and selecting the parent forum. "
|
1796 |
+
"Click the Filter button after making your selection."
|
1797 |
msgstr ""
|
1798 |
|
1799 |
+
#: bbp-admin/bbp-topics.php:151
|
1800 |
msgid ""
|
1801 |
+
"You can refine the list by clicking on the topic creator in the topics list."
|
|
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: bbp-admin/bbp-topics.php:154
|
1805 |
+
msgid ""
|
1806 |
+
"Hovering over a row in the topics list will display action links that allow "
|
1807 |
+
"you to manage your topic. You can perform the following actions:"
|
1808 |
msgstr ""
|
1809 |
|
1810 |
+
#: bbp-admin/bbp-topics.php:157
|
1811 |
msgid ""
|
1812 |
+
"Edit takes you to the editing screen for that topic. You can also reach that "
|
1813 |
+
"screen by clicking on the topic title."
|
1814 |
msgstr ""
|
1815 |
|
1816 |
+
#: bbp-admin/bbp-topics.php:158
|
1817 |
msgid ""
|
1818 |
+
"Trash removes your topic from this list and places it in the trash, from "
|
1819 |
+
"which you can permanently delete it."
|
1820 |
msgstr ""
|
1821 |
|
1822 |
+
#: bbp-admin/bbp-topics.php:159
|
1823 |
+
msgid "View will take you to your live topic to view the topic."
|
1824 |
msgstr ""
|
1825 |
|
1826 |
+
#: bbp-admin/bbp-topics.php:160
|
1827 |
msgid ""
|
1828 |
+
"Close will close your topic, disabling new replies within it. It will remain "
|
1829 |
+
"viewable to users, but replies will not be allowed."
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: bbp-admin/bbp-topics.php:161
|
1833 |
msgid ""
|
1834 |
+
"Stick (to front) will pin the topic to the front page of the forum that "
|
1835 |
+
"it’s in. New topics will begin beneath the list of \"stuck\" topics, "
|
1836 |
+
"which will always sit at the top of the list."
|
|
|
|
|
|
|
1837 |
msgstr ""
|
1838 |
|
1839 |
+
#: bbp-admin/bbp-topics.php:162
|
1840 |
+
msgid ""
|
1841 |
+
"Spam will mark the topic as spam, closing the post to new replies and "
|
1842 |
+
"removing it from the public view."
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: bbp-admin/bbp-topics.php:165
|
1846 |
msgid ""
|
1847 |
+
"You can also edit multiple topics at once. Select the topics you want to "
|
1848 |
+
"edit using the checkboxes, select Edit from the Bulk Actions menu and click "
|
1849 |
+
"Apply. You will be able to change the metadata for all selected topics at "
|
1850 |
+
"once. To remove a topic from the grouping, just click the x next to its name "
|
1851 |
+
"in the Bulk Edit area that appears."
|
1852 |
msgstr ""
|
1853 |
|
1854 |
+
#: bbp-admin/bbp-topics.php:166
|
1855 |
+
msgid ""
|
1856 |
+
"The Bulk Actions menu may also be used to delete multiple topics at once. "
|
1857 |
+
"Select Delete from the dropdown after making your selection."
|
1858 |
msgstr ""
|
1859 |
|
1860 |
+
#: bbp-admin/bbp-topics.php:186
|
|
|
1861 |
msgid ""
|
1862 |
+
"You can change the display of this screen using the Screen Options tab to "
|
1863 |
+
"set how many items are displayed per screen (20 by default) and to display/"
|
1864 |
+
"hide columns in the table (Description, Slug, and Topics)."
|
1865 |
msgstr ""
|
1866 |
|
1867 |
+
#: bbp-admin/bbp-topics.php:187
|
|
|
1868 |
msgid ""
|
1869 |
+
"You can assign keywords to your topics using Topic Tags. Unlike categories, "
|
1870 |
+
"tags have no hierarchy, meaning there is no relationship from one tag to "
|
1871 |
+
"another."
|
1872 |
msgstr ""
|
1873 |
|
1874 |
+
#: bbp-admin/bbp-topics.php:188
|
1875 |
msgid ""
|
1876 |
+
"Normally, tags are ad-hoc keywords that identify important information in "
|
1877 |
+
"your topic (names, subjects, etc) that may or may not recur in other topics. "
|
1878 |
+
"If you think of your forum like a book, the tags are like the terms in the "
|
1879 |
+
"index."
|
1880 |
msgstr ""
|
1881 |
|
1882 |
+
#: bbp-admin/bbp-topics.php:189
|
1883 |
+
msgid ""
|
1884 |
+
"When editing a topic tag on this screen, you will fill in the following "
|
1885 |
+
"fields:"
|
1886 |
msgstr ""
|
1887 |
|
1888 |
+
#: bbp-admin/bbp-topics.php:192
|
1889 |
+
msgid "<strong>Name</strong> - The name is how it appears on your site."
|
1890 |
msgstr ""
|
1891 |
|
1892 |
+
#: bbp-admin/bbp-topics.php:193
|
1893 |
+
msgid ""
|
1894 |
+
"<strong>Slug</strong> - The Slug is the URL-friendly version of the name. It "
|
1895 |
+
"is usually all lowercase and contains only letters, numbers, and hyphens."
|
1896 |
msgstr ""
|
1897 |
|
1898 |
+
#: bbp-admin/bbp-topics.php:194
|
1899 |
msgid ""
|
1900 |
+
"<strong>Description</strong> - The description is not prominent by default; "
|
1901 |
+
"however, some forum themes may display it."
|
1902 |
msgstr ""
|
1903 |
|
1904 |
+
#: bbp-admin/bbp-topics.php:218
|
1905 |
+
msgid "Topic Attributes"
|
1906 |
msgstr ""
|
1907 |
|
1908 |
+
#: bbp-admin/bbp-topics.php:454
|
1909 |
+
msgid "The topic was not found!"
|
|
|
|
|
|
|
1910 |
msgstr ""
|
1911 |
|
1912 |
+
#: bbp-admin/bbp-topics.php:457 bbp-admin/bbp-replies.php:428
|
1913 |
+
msgid "You do not have the permission to do that!"
|
1914 |
msgstr ""
|
1915 |
|
1916 |
+
#: bbp-admin/bbp-topics.php:537
|
1917 |
+
msgid "There was a problem opening the topic \"%1$s\"."
|
1918 |
msgstr ""
|
1919 |
|
1920 |
+
#: bbp-admin/bbp-topics.php:537
|
1921 |
+
msgid "Topic \"%1$s\" successfully opened."
|
|
|
|
|
1922 |
msgstr ""
|
1923 |
|
1924 |
+
#: bbp-admin/bbp-topics.php:541
|
1925 |
+
msgid "There was a problem closing the topic \"%1$s\"."
|
1926 |
msgstr ""
|
1927 |
|
1928 |
+
#: bbp-admin/bbp-topics.php:541
|
1929 |
+
msgid "Topic \"%1$s\" successfully closed."
|
1930 |
msgstr ""
|
1931 |
|
1932 |
+
#: bbp-admin/bbp-topics.php:545
|
1933 |
+
msgid "There was a problem sticking the topic \"%1$s\" to front."
|
1934 |
msgstr ""
|
1935 |
|
1936 |
+
#: bbp-admin/bbp-topics.php:545
|
1937 |
+
msgid "Topic \"%1$s\" successfully sticked to front."
|
1938 |
msgstr ""
|
1939 |
|
1940 |
+
#: bbp-admin/bbp-topics.php:549
|
1941 |
+
msgid "There was a problem sticking the topic \"%1$s\"."
|
1942 |
msgstr ""
|
1943 |
|
1944 |
+
#: bbp-admin/bbp-topics.php:549
|
1945 |
+
msgid "Topic \"%1$s\" successfully sticked."
|
1946 |
msgstr ""
|
1947 |
|
1948 |
+
#: bbp-admin/bbp-topics.php:553
|
1949 |
+
msgid "There was a problem unsticking the topic \"%1$s\"."
|
|
|
|
|
1950 |
msgstr ""
|
1951 |
|
1952 |
+
#: bbp-admin/bbp-topics.php:553
|
1953 |
+
msgid "Topic \"%1$s\" successfully unsticked."
|
|
|
|
|
1954 |
msgstr ""
|
1955 |
|
1956 |
+
#: bbp-admin/bbp-topics.php:557
|
1957 |
+
msgid "There was a problem marking the topic \"%1$s\" as spam."
|
|
|
|
|
1958 |
msgstr ""
|
1959 |
|
1960 |
+
#: bbp-admin/bbp-topics.php:557
|
1961 |
+
msgid "Topic \"%1$s\" successfully marked as spam."
|
|
|
|
|
1962 |
msgstr ""
|
1963 |
|
1964 |
+
#: bbp-admin/bbp-topics.php:561
|
1965 |
+
msgid "There was a problem unmarking the topic \"%1$s\" as spam."
|
|
|
|
|
|
|
1966 |
msgstr ""
|
1967 |
|
1968 |
+
#: bbp-admin/bbp-topics.php:561
|
1969 |
+
msgid "Topic \"%1$s\" successfully unmarked as spam."
|
|
|
1970 |
msgstr ""
|
1971 |
|
1972 |
+
#: bbp-admin/bbp-topics.php:596 bbp-admin/bbp-forums.php:392
|
1973 |
+
#: bbp-admin/bbp-replies.php:527
|
1974 |
+
msgid "Created"
|
|
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: bbp-admin/bbp-topics.php:644 bbp-admin/bbp-replies.php:601
|
1978 |
+
#: bbp-admin/bbp-replies.php:615
|
1979 |
+
msgid "No Forum"
|
|
|
|
|
1980 |
msgstr ""
|
1981 |
|
1982 |
+
#: bbp-admin/bbp-topics.php:650 bbp-admin/bbp-metaboxes.php:359
|
1983 |
+
msgid "(No Forum)"
|
|
|
1984 |
msgstr ""
|
1985 |
|
1986 |
+
#: bbp-admin/bbp-topics.php:672 bbp-admin/bbp-forums.php:427
|
1987 |
+
#: bbp-admin/bbp-replies.php:629
|
1988 |
+
msgid "%1$s <br /> %2$s"
|
|
|
1989 |
msgstr ""
|
1990 |
|
1991 |
+
#: bbp-admin/bbp-topics.php:682 bbp-admin/bbp-forums.php:436
|
1992 |
+
msgid "%s ago"
|
|
|
|
|
1993 |
msgstr ""
|
1994 |
|
1995 |
+
#: bbp-admin/bbp-topics.php:730 bbp-admin/bbp-replies.php:674
|
1996 |
+
msgid "View “%s”"
|
1997 |
msgstr ""
|
1998 |
|
1999 |
+
#: bbp-admin/bbp-topics.php:730 bbp-admin/bbp-replies.php:674
|
2000 |
+
msgid "View"
|
2001 |
msgstr ""
|
2002 |
|
2003 |
+
#: bbp-admin/bbp-topics.php:740
|
2004 |
+
msgid "Close this topic"
|
2005 |
msgstr ""
|
2006 |
|
2007 |
+
#: bbp-admin/bbp-topics.php:742
|
2008 |
+
msgid "Open this topic"
|
2009 |
msgstr ""
|
2010 |
|
2011 |
+
#: bbp-admin/bbp-topics.php:751
|
2012 |
+
msgid "Unstick this topic"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
+
#: bbp-admin/bbp-topics.php:754
|
2016 |
+
msgid "Stick this topic to its forum"
|
|
|
2017 |
msgstr ""
|
2018 |
|
2019 |
+
#: bbp-admin/bbp-topics.php:754
|
2020 |
+
msgid "Stick this topic to front"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
+
#: bbp-admin/bbp-topics.php:761
|
2024 |
+
msgid "Mark the topic as not spam"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: bbp-admin/bbp-topics.php:761 bbp-admin/bbp-replies.php:685
|
2028 |
+
msgid "Not spam"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
+
#: bbp-admin/bbp-topics.php:763
|
2032 |
+
msgid "Mark this topic as spam"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
+
#: bbp-admin/bbp-topics.php:777 bbp-admin/bbp-replies.php:701
|
2036 |
+
msgid "Delete Permanently"
|
2037 |
msgstr ""
|
2038 |
|
2039 |
+
#: bbp-admin/bbp-topics.php:812 bbp-admin/bbp-replies.php:736
|
2040 |
+
msgid "Empty Spam"
|
2041 |
msgstr ""
|
2042 |
|
2043 |
+
#: bbp-admin/bbp-topics.php:822 bbp-admin/bbp-replies.php:746
|
2044 |
+
msgid "In all forums"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2045 |
msgstr ""
|
2046 |
|
2047 |
+
#: bbp-admin/bbp-topics.php:899
|
2048 |
+
msgid "Topic updated. <a href=\"%s\">View topic</a>"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: bbp-admin/bbp-topics.php:902 bbp-admin/bbp-forums.php:506
|
2052 |
+
#: bbp-admin/bbp-replies.php:826
|
2053 |
+
msgid "Custom field updated."
|
2054 |
msgstr ""
|
2055 |
|
2056 |
+
#: bbp-admin/bbp-topics.php:905 bbp-admin/bbp-forums.php:509
|
2057 |
+
#: bbp-admin/bbp-replies.php:829
|
2058 |
+
msgid "Custom field deleted."
|
2059 |
msgstr ""
|
2060 |
|
2061 |
+
#: bbp-admin/bbp-topics.php:908
|
2062 |
+
msgid "Topic updated."
|
2063 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2064 |
|
2065 |
+
#. translators: %s: date and time of the revision
|
2066 |
+
#: bbp-admin/bbp-topics.php:913
|
2067 |
+
msgid "Topic restored to revision from %s"
|
2068 |
msgstr ""
|
2069 |
|
2070 |
+
#: bbp-admin/bbp-topics.php:917
|
2071 |
+
msgid "Topic created. <a href=\"%s\">View topic</a>"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
+
#: bbp-admin/bbp-topics.php:920
|
2075 |
+
msgid "Topic saved."
|
2076 |
msgstr ""
|
2077 |
|
2078 |
+
#: bbp-admin/bbp-topics.php:923
|
2079 |
+
msgid "Topic submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
2080 |
msgstr ""
|
2081 |
|
2082 |
+
#: bbp-admin/bbp-topics.php:926
|
2083 |
+
msgid ""
|
2084 |
+
"Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
2085 |
+
"\">Preview topic</a>"
|
2086 |
msgstr ""
|
2087 |
|
2088 |
+
#. translators: Publish box date format, see http:php.net/date
|
2089 |
+
#: bbp-admin/bbp-topics.php:928 bbp-admin/bbp-forums.php:532
|
2090 |
+
#: bbp-admin/bbp-replies.php:852
|
2091 |
+
msgid "M j, Y @ G:i"
|
2092 |
msgstr ""
|
2093 |
|
2094 |
+
#: bbp-admin/bbp-topics.php:933
|
2095 |
+
msgid "Topic draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
2096 |
msgstr ""
|
2097 |
|
2098 |
+
#: bbp-admin/bbp-functions.php:152
|
2099 |
+
msgid "Count topics in each forum"
|
2100 |
msgstr ""
|
2101 |
|
2102 |
+
#: bbp-admin/bbp-functions.php:153
|
2103 |
+
msgid "Count replies in each forum"
|
2104 |
msgstr ""
|
2105 |
|
2106 |
+
#: bbp-admin/bbp-functions.php:154
|
2107 |
+
msgid "Count replies in each topic"
|
2108 |
msgstr ""
|
2109 |
|
2110 |
+
#: bbp-admin/bbp-functions.php:155
|
2111 |
+
msgid "Count voices in each topic"
|
2112 |
msgstr ""
|
2113 |
|
2114 |
+
#: bbp-admin/bbp-functions.php:156
|
2115 |
+
msgid "Count spammed & trashed replies in each topic"
|
2116 |
msgstr ""
|
2117 |
|
2118 |
+
#: bbp-admin/bbp-functions.php:157
|
2119 |
+
msgid "Count replies for each user"
|
2120 |
msgstr ""
|
2121 |
|
2122 |
+
#: bbp-admin/bbp-functions.php:158
|
2123 |
+
msgid "Remove trashed topics from user favorites"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
+
#: bbp-admin/bbp-functions.php:159
|
2127 |
+
msgid "Remove trashed topics from user subscriptions"
|
2128 |
msgstr ""
|
2129 |
|
2130 |
+
#: bbp-admin/bbp-functions.php:163
|
2131 |
+
msgid "Recalculate last activity in each topic and forum"
|
|
|
2132 |
msgstr ""
|
2133 |
|
2134 |
+
#: bbp-admin/bbp-functions.php:183
|
2135 |
+
msgid "Counting the number of replies in each topic… %s"
|
2136 |
msgstr ""
|
2137 |
|
2138 |
+
#: bbp-admin/bbp-functions.php:184 bbp-admin/bbp-functions.php:228
|
2139 |
+
#: bbp-admin/bbp-functions.php:271 bbp-admin/bbp-functions.php:301
|
2140 |
+
#: bbp-admin/bbp-functions.php:335 bbp-admin/bbp-functions.php:367
|
2141 |
+
#: bbp-admin/bbp-functions.php:413 bbp-admin/bbp-functions.php:492
|
2142 |
+
#: bbp-admin/bbp-functions.php:574 bbp-admin/bbp-functions.php:706
|
2143 |
+
#: bbp-admin/bbp-functions.php:765 bbp-admin/bbp-functions.php:822
|
2144 |
+
msgid "Failed!"
|
2145 |
msgstr ""
|
2146 |
|
2147 |
+
#: bbp-admin/bbp-functions.php:210 bbp-admin/bbp-functions.php:254
|
2148 |
+
#: bbp-admin/bbp-functions.php:281 bbp-admin/bbp-functions.php:315
|
2149 |
+
#: bbp-admin/bbp-functions.php:349 bbp-admin/bbp-functions.php:395
|
2150 |
+
#: bbp-admin/bbp-functions.php:747 bbp-admin/bbp-functions.php:805
|
2151 |
+
#: bbp-admin/bbp-functions.php:902
|
2152 |
+
msgid "Complete!"
|
2153 |
msgstr ""
|
2154 |
|
2155 |
+
#: bbp-admin/bbp-functions.php:227
|
2156 |
+
msgid "Counting the number of voices in each topic… %s"
|
2157 |
msgstr ""
|
2158 |
|
2159 |
+
#: bbp-admin/bbp-functions.php:270
|
2160 |
+
msgid ""
|
2161 |
+
"Counting the number of spammed and trashed replies in each topic… %s"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: bbp-admin/bbp-functions.php:300
|
2165 |
+
msgid "Counting the number of topics in each forum… %s"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: bbp-admin/bbp-functions.php:334
|
2169 |
+
msgid "Counting the number of replies in each forum… %s"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: bbp-admin/bbp-functions.php:366
|
2173 |
+
msgid "Counting the number of topics to which each user has replied… %s"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: bbp-admin/bbp-functions.php:412
|
2177 |
+
msgid "Counting the number of topic tags in each topic… %s"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
+
#: bbp-admin/bbp-functions.php:491
|
2181 |
+
msgid "Counting the number of topics in each topic tag… %s"
|
2182 |
msgstr ""
|
2183 |
|
2184 |
+
#: bbp-admin/bbp-functions.php:573
|
2185 |
+
msgid "Deleting topic tags with no topics… %s"
|
2186 |
msgstr ""
|
2187 |
|
2188 |
+
#: bbp-admin/bbp-functions.php:705
|
2189 |
+
msgid "Removing trashed topics from user favorites… %s"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
+
#: bbp-admin/bbp-functions.php:731 bbp-admin/bbp-functions.php:789
|
2193 |
+
msgid "Nothing to remove!"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
+
#: bbp-admin/bbp-functions.php:764
|
2197 |
+
msgid "Removing trashed topics from user subscriptions… %s"
|
2198 |
msgstr ""
|
2199 |
|
2200 |
+
#: bbp-admin/bbp-functions.php:821
|
2201 |
+
msgid "Recomputing latest post in every topic and forum… %s"
|
2202 |
msgstr ""
|
2203 |
|
2204 |
+
#: bbp-admin/bbp-settings.php:23
|
2205 |
+
msgid "Main settings for the bbPress plugin"
|
2206 |
msgstr ""
|
2207 |
|
2208 |
+
#: bbp-admin/bbp-settings.php:39
|
2209 |
+
msgid "minutes"
|
2210 |
msgstr ""
|
2211 |
|
2212 |
+
#: bbp-admin/bbp-settings.php:55
|
2213 |
+
msgid "seconds"
|
2214 |
msgstr ""
|
2215 |
|
2216 |
+
#: bbp-admin/bbp-settings.php:71
|
2217 |
+
msgid "Allow users to mark topics as favorites?"
|
2218 |
msgstr ""
|
2219 |
|
2220 |
+
#: bbp-admin/bbp-settings.php:87
|
2221 |
+
msgid "Allow users to subscribe to topics"
|
2222 |
msgstr ""
|
2223 |
|
2224 |
+
#: bbp-admin/bbp-settings.php:103
|
2225 |
+
msgid "Allow guest users without accounts to create topics and replies"
|
2226 |
msgstr ""
|
2227 |
|
2228 |
+
#: bbp-admin/bbp-settings.php:119
|
2229 |
+
msgid ""
|
2230 |
+
"Allow all users of your multisite installation to create topics and replies"
|
2231 |
msgstr ""
|
2232 |
|
2233 |
+
#: bbp-admin/bbp-settings.php:134
|
2234 |
+
msgid "Per page settings for the bbPress plugin"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
+
#: bbp-admin/bbp-settings.php:150 bbp-admin/bbp-settings.php:166
|
2238 |
+
#: bbp-admin/bbp-settings.php:197 bbp-admin/bbp-settings.php:213
|
2239 |
+
msgid "per page"
|
2240 |
msgstr ""
|
2241 |
|
2242 |
+
#: bbp-admin/bbp-settings.php:181
|
2243 |
+
msgid "Per RSS page settings for the bbPress plugin"
|
2244 |
msgstr ""
|
2245 |
|
2246 |
+
#: bbp-admin/bbp-settings.php:231
|
2247 |
msgid ""
|
2248 |
+
"Include custom root slugs to prefix your forums and topics with. These can "
|
2249 |
+
"be partnered with WordPress pages to allow more flexibility."
|
2250 |
msgstr ""
|
2251 |
|
2252 |
+
#: bbp-admin/bbp-settings.php:283
|
2253 |
+
msgid ""
|
2254 |
+
"You can enter custom slugs for your single forums, topics, replies, and tags "
|
2255 |
+
"URLs here. If you change these, existing permalinks will also change."
|
2256 |
msgstr ""
|
2257 |
|
2258 |
+
#: bbp-admin/bbp-settings.php:299
|
2259 |
+
msgid "Incude the Forum Base slug in your single forum item links"
|
2260 |
msgstr ""
|
2261 |
|
2262 |
+
#: bbp-admin/bbp-settings.php:427
|
2263 |
+
msgid "bbPress Settings"
|
2264 |
msgstr ""
|
2265 |
|
2266 |
+
#: bbp-admin/bbp-settings.php:451
|
2267 |
+
msgid "This screen provides access to basic bbPress settings."
|
2268 |
msgstr ""
|
2269 |
|
2270 |
+
#: bbp-admin/bbp-settings.php:452
|
2271 |
+
msgid "In the Main Settings you have a number of options:"
|
2272 |
msgstr ""
|
2273 |
|
2274 |
+
#: bbp-admin/bbp-settings.php:455
|
2275 |
msgid ""
|
2276 |
+
"You can choose to lock a post after a certain number of minutes. \"Locking "
|
2277 |
+
"post editing\" will prevent the author from editing some amount of time "
|
2278 |
+
"after saving a post."
|
2279 |
msgstr ""
|
2280 |
|
2281 |
+
#: bbp-admin/bbp-settings.php:456
|
2282 |
+
msgid ""
|
2283 |
+
"\"Throttle time\" is the amount of time required between posts from a single "
|
2284 |
+
"author. The higher the throttle time, the longer a user will need to wait "
|
2285 |
+
"between posting to the forum."
|
2286 |
msgstr ""
|
2287 |
|
2288 |
+
#: bbp-admin/bbp-settings.php:457
|
2289 |
+
msgid ""
|
2290 |
+
"You may choose to allow favorites, which are a way for users to save and "
|
2291 |
+
"later return to topics they favor. This is enabled by default."
|
2292 |
msgstr ""
|
2293 |
|
2294 |
+
#: bbp-admin/bbp-settings.php:458
|
2295 |
msgid ""
|
2296 |
+
"You may choose to allow subscriptions, which allows users to subscribe for "
|
2297 |
+
"notifications to topics that interest them. This is enabled by default."
|
2298 |
msgstr ""
|
2299 |
|
2300 |
+
#: bbp-admin/bbp-settings.php:459
|
2301 |
msgid ""
|
2302 |
+
"You may choose to allow \"Anonymous Posting\", which will allow guest users "
|
2303 |
+
"who do not have accounts on your site to both create topics as well as "
|
2304 |
+
"replies."
|
2305 |
msgstr ""
|
2306 |
|
2307 |
+
#: bbp-admin/bbp-settings.php:462
|
2308 |
+
msgid ""
|
2309 |
+
"Per Page settings allow you to control the number of topics and replies will "
|
2310 |
+
"appear on each of those pages. This is comparable to the WordPress \"Reading "
|
2311 |
+
"Settings\" page, where you can set the number of posts that should show on "
|
2312 |
+
"blog pages and in feeds."
|
2313 |
msgstr ""
|
2314 |
|
2315 |
+
#: bbp-admin/bbp-settings.php:463
|
2316 |
msgid ""
|
2317 |
+
"The Forums section allows you to control the permalink structure for your "
|
2318 |
+
"forums. Each \"base\" is what will be displayed after your main URL and "
|
2319 |
+
"right before your permalink slug."
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: bbp-admin/bbp-settings.php:464
|
2323 |
msgid ""
|
2324 |
+
"You must click the Save Changes button at the bottom of the screen for new "
|
2325 |
+
"settings to take effect."
|
|
|
|
|
2326 |
msgstr ""
|
2327 |
|
2328 |
+
#: bbp-admin/bbp-settings.php:553
|
2329 |
+
msgid "Pages"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
+
#: bbp-admin/bbp-settings.php:554
|
2333 |
+
msgid "Revisions"
|
|
|
|
|
2334 |
msgstr ""
|
2335 |
|
2336 |
+
#: bbp-admin/bbp-settings.php:555
|
2337 |
+
msgid "Attachments"
|
2338 |
msgstr ""
|
2339 |
|
2340 |
+
#: bbp-admin/bbp-settings.php:556
|
2341 |
+
msgid "Menus"
|
2342 |
msgstr ""
|
2343 |
|
2344 |
+
#: bbp-admin/bbp-settings.php:559
|
2345 |
+
msgid "Tag base"
|
|
|
|
|
2346 |
msgstr ""
|
2347 |
|
2348 |
+
#: bbp-admin/bbp-settings.php:562
|
2349 |
+
msgid "Category base"
|
|
|
|
|
2350 |
msgstr ""
|
2351 |
|
2352 |
+
#: bbp-admin/bbp-settings.php:567 bbp-admin/bbp-admin.php:239
|
2353 |
+
msgid "Forums base"
|
|
|
|
|
2354 |
msgstr ""
|
2355 |
|
2356 |
+
#: bbp-admin/bbp-settings.php:570 bbp-admin/bbp-admin.php:243
|
2357 |
+
msgid "Topics base"
|
|
|
|
|
|
|
2358 |
msgstr ""
|
2359 |
|
2360 |
+
#: bbp-admin/bbp-settings.php:573 bbp-admin/bbp-admin.php:256
|
2361 |
+
msgid "Forum slug"
|
2362 |
msgstr ""
|
2363 |
|
2364 |
+
#: bbp-admin/bbp-settings.php:576 bbp-admin/bbp-admin.php:260
|
2365 |
+
msgid "Topic slug"
|
|
|
|
|
2366 |
msgstr ""
|
2367 |
|
2368 |
+
#: bbp-admin/bbp-settings.php:579 bbp-admin/bbp-admin.php:268
|
2369 |
+
msgid "Reply slug"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
+
#: bbp-admin/bbp-settings.php:582 bbp-admin/bbp-admin.php:274
|
2373 |
+
msgid "User base"
|
2374 |
msgstr ""
|
2375 |
|
2376 |
+
#: bbp-admin/bbp-settings.php:585 bbp-admin/bbp-admin.php:278
|
2377 |
+
msgid "View base"
|
|
|
|
|
2378 |
msgstr ""
|
2379 |
|
2380 |
+
#: bbp-admin/bbp-settings.php:588 bbp-admin/bbp-admin.php:264
|
2381 |
+
msgid "Topic tag slug"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: bbp-admin/bbp-settings.php:600
|
2385 |
+
msgid "Possible \"%s\" conflict"
|
|
|
|
|
2386 |
msgstr ""
|
2387 |
|
2388 |
+
#: bbp-admin/bbp-forums.php:104
|
2389 |
+
msgid ""
|
2390 |
+
"The forum title field and the big forum editing area are fixed in place, but "
|
2391 |
+
"you can reposition all the other boxes using drag and drop, and can minimize "
|
2392 |
+
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
2393 |
+
"tab to unhide more boxes (like Slug) or to choose a 1- or 2-column layout "
|
2394 |
+
"for this screen."
|
2395 |
msgstr ""
|
2396 |
|
2397 |
+
#: bbp-admin/bbp-forums.php:105
|
2398 |
msgid ""
|
2399 |
+
"<strong>Title</strong> - Enter a title for your forum. After you enter a "
|
2400 |
+
"title, you will see the permalink appear below it, which is fully editable."
|
|
|
2401 |
msgstr ""
|
2402 |
|
2403 |
+
#: bbp-admin/bbp-forums.php:106
|
2404 |
msgid ""
|
2405 |
+
"<strong>Post editor</strong> - Enter the description for your forum. There "
|
2406 |
+
"are two modes of editing: Visual and HTML. Choose the mode by clicking on "
|
2407 |
+
"the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last "
|
2408 |
+
"icon in the row to get a second row of controls. The screen icon just before "
|
2409 |
+
"that allows you to expand the edit box to full screen. The HTML mode allows "
|
2410 |
+
"you to enter raw HTML along with your forum text. You can insert media files "
|
2411 |
+
"by clicking the icons above the post editor and following the directions."
|
2412 |
msgstr ""
|
2413 |
|
2414 |
+
#: bbp-admin/bbp-forums.php:107
|
2415 |
+
msgid ""
|
2416 |
+
"<strong>Forum Attributes</strong> - Select the various attributes that your "
|
2417 |
+
"forum should have:"
|
2418 |
msgstr ""
|
2419 |
|
2420 |
+
#: bbp-admin/bbp-forums.php:110
|
2421 |
msgid ""
|
2422 |
+
"Forum Type determines whether it is a Forum (by default) or a Category, "
|
2423 |
+
"which means no new topics (only other forums) can be created within it."
|
2424 |
msgstr ""
|
2425 |
|
2426 |
+
#: bbp-admin/bbp-forums.php:111
|
2427 |
msgid ""
|
2428 |
+
"Forum Status controls whether it is open (and thus can be posted to) or "
|
2429 |
+
"closed (thus not able to be posted to)."
|
2430 |
msgstr ""
|
2431 |
|
2432 |
+
#: bbp-admin/bbp-forums.php:112
|
2433 |
+
msgid ""
|
2434 |
+
"Visibility can be set to either Public (by default, seen by everyone), "
|
2435 |
+
"Private (seen only by chosen users), and Hidden (hidden from all users)."
|
2436 |
msgstr ""
|
2437 |
|
2438 |
+
#: bbp-admin/bbp-forums.php:113
|
2439 |
msgid ""
|
2440 |
+
"Parent turns the forum into a child forum of the selected forum/category in "
|
2441 |
+
"the dropdown."
|
|
|
|
|
|
|
|
|
2442 |
msgstr ""
|
2443 |
|
2444 |
+
#: bbp-admin/bbp-forums.php:114
|
2445 |
msgid ""
|
2446 |
+
"Order determines the order that forums in the given hierarchy are displayed "
|
2447 |
+
"(lower numbers first, higher numbers last)."
|
2448 |
msgstr ""
|
2449 |
|
2450 |
+
#: bbp-admin/bbp-forums.php:117
|
2451 |
msgid ""
|
2452 |
+
"<strong>Publish</strong> - The Publish box will allow you to Preview your "
|
2453 |
+
"forum before it is published, Publish your forum to your site, or Move to "
|
2454 |
+
"Trash will move your forum to the trash."
|
2455 |
msgstr ""
|
2456 |
|
2457 |
+
#: bbp-admin/bbp-forums.php:118
|
2458 |
msgid ""
|
2459 |
+
"<strong>Revisions</strong> - Revisions show past versions of the saved "
|
2460 |
+
"forum. Each revision can be compared to the current version, or another "
|
2461 |
+
"revision. Revisions can also be restored to the current version."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2462 |
msgstr ""
|
2463 |
|
2464 |
+
#: bbp-admin/bbp-forums.php:138
|
2465 |
+
msgid "This screen displays the forums available on your site."
|
|
|
|
|
2466 |
msgstr ""
|
2467 |
|
2468 |
+
#: bbp-admin/bbp-forums.php:142
|
2469 |
msgid ""
|
2470 |
+
"You can hide/display columns based on your needs and decide how many forums "
|
2471 |
+
"to list per screen using the Screen Options tab."
|
|
|
|
|
|
|
|
|
|
|
2472 |
msgstr ""
|
2473 |
|
2474 |
+
#: bbp-admin/bbp-forums.php:143
|
2475 |
msgid ""
|
2476 |
+
"You can filter the list of forums by forum status using the text links in "
|
2477 |
+
"the upper left to show All, Published, or Trashed forums. The default view "
|
2478 |
+
"is to show all forums."
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: bbp-admin/bbp-forums.php:144
|
2482 |
msgid ""
|
2483 |
+
"You can refine the list to show only forums from a specific month by using "
|
2484 |
+
"the dropdown menus above the forums list. Click the Filter button after "
|
2485 |
+
"making your selection. You also can refine the list by clicking on the forum "
|
2486 |
+
"creator in the forums list."
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: bbp-admin/bbp-forums.php:147
|
2490 |
msgid ""
|
2491 |
+
"Hovering over a row in the forums list will display action links that allow "
|
2492 |
+
"you to manage your forum. You can perform the following actions:"
|
|
|
|
|
|
|
2493 |
msgstr ""
|
2494 |
|
2495 |
+
#: bbp-admin/bbp-forums.php:150
|
2496 |
msgid ""
|
2497 |
+
"Edit takes you to the editing screen for that forum. You can also reach that "
|
2498 |
+
"screen by clicking on the forum title."
|
|
|
|
|
|
|
|
|
2499 |
msgstr ""
|
2500 |
|
2501 |
+
#: bbp-admin/bbp-forums.php:151
|
2502 |
msgid ""
|
2503 |
+
"Trash removes your forum from this list and places it in the trash, from "
|
2504 |
+
"which you can permanently delete it."
|
|
|
|
|
|
|
|
|
2505 |
msgstr ""
|
2506 |
|
2507 |
+
#: bbp-admin/bbp-forums.php:152
|
2508 |
+
msgid "View will take you to your live forum to view the forum."
|
2509 |
msgstr ""
|
2510 |
|
2511 |
+
#: bbp-admin/bbp-forums.php:155
|
2512 |
msgid ""
|
2513 |
+
"You can also edit multiple forums at once. Select the forums you want to "
|
2514 |
+
"edit using the checkboxes, select Edit from the Bulk Actions menu and click "
|
2515 |
+
"Apply. You will be able to change the metadata for all selected forums at "
|
2516 |
+
"once. To remove a forum from the grouping, just click the x next to its name "
|
2517 |
+
"in the Bulk Edit area that appears."
|
|
|
|
|
|
|
|
|
2518 |
msgstr ""
|
2519 |
|
2520 |
+
#: bbp-admin/bbp-forums.php:156
|
2521 |
+
msgid ""
|
2522 |
+
"The Bulk Actions menu may also be used to delete multiple forums at once. "
|
2523 |
+
"Select Delete from the dropdown after making your selection."
|
2524 |
msgstr ""
|
2525 |
|
2526 |
+
#: bbp-admin/bbp-forums.php:184
|
2527 |
+
msgid "Forum Attributes"
|
2528 |
msgstr ""
|
2529 |
|
2530 |
+
#: bbp-admin/bbp-forums.php:503
|
2531 |
+
msgid "Forum updated. <a href=\"%s\">View forum</a>"
|
2532 |
msgstr ""
|
2533 |
|
2534 |
+
#: bbp-admin/bbp-forums.php:512
|
2535 |
+
msgid "Forum updated."
|
2536 |
msgstr ""
|
2537 |
|
2538 |
+
#. translators: %s: date and time of the revision
|
2539 |
+
#: bbp-admin/bbp-forums.php:517
|
2540 |
+
msgid "Forum restored to revision from %s"
|
|
|
2541 |
msgstr ""
|
2542 |
|
2543 |
+
#: bbp-admin/bbp-forums.php:521
|
2544 |
+
msgid "Forum created. <a href=\"%s\">View forum</a>"
|
2545 |
msgstr ""
|
2546 |
|
2547 |
+
#: bbp-admin/bbp-forums.php:524
|
2548 |
+
msgid "Forum saved."
|
|
|
|
|
2549 |
msgstr ""
|
2550 |
|
2551 |
+
#: bbp-admin/bbp-forums.php:527
|
2552 |
+
msgid "Forum submitted. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
2553 |
msgstr ""
|
2554 |
|
2555 |
+
#: bbp-admin/bbp-forums.php:530
|
2556 |
msgid ""
|
2557 |
+
"Forum scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
2558 |
+
"\">Preview forum</a>"
|
|
|
|
|
|
|
|
|
|
|
2559 |
msgstr ""
|
2560 |
|
2561 |
+
#: bbp-admin/bbp-forums.php:537
|
2562 |
+
msgid "Forum draft updated. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
2563 |
msgstr ""
|
2564 |
|
2565 |
+
#: bbp-admin/bbp-metaboxes.php:42
|
2566 |
+
msgid "Content"
|
2567 |
msgstr ""
|
2568 |
|
2569 |
+
#: bbp-admin/bbp-metaboxes.php:84 bbpress.php:659
|
2570 |
+
msgid "Reply"
|
2571 |
+
msgid_plural "Replies"
|
2572 |
+
msgstr[0] ""
|
2573 |
+
msgstr[1] ""
|
2574 |
|
2575 |
+
#: bbp-admin/bbp-metaboxes.php:101 bbpress.php:800
|
2576 |
+
msgid "Topic Tag"
|
2577 |
+
msgid_plural "Topic Tags"
|
2578 |
+
msgstr[0] ""
|
2579 |
+
msgstr[1] ""
|
2580 |
|
2581 |
+
#: bbp-admin/bbp-metaboxes.php:123
|
2582 |
+
msgid "Discussion"
|
2583 |
msgstr ""
|
2584 |
|
2585 |
+
#: bbp-admin/bbp-metaboxes.php:131
|
2586 |
+
msgid "User"
|
2587 |
+
msgid_plural "Users"
|
2588 |
+
msgstr[0] ""
|
2589 |
+
msgstr[1] ""
|
2590 |
|
2591 |
+
#: bbp-admin/bbp-metaboxes.php:150
|
2592 |
+
msgid "Hidden Topic"
|
2593 |
+
msgid_plural "Hidden Topics"
|
2594 |
+
msgstr[0] ""
|
2595 |
+
msgstr[1] ""
|
2596 |
|
2597 |
+
#: bbp-admin/bbp-metaboxes.php:169
|
2598 |
+
msgid "Hidden Reply"
|
2599 |
+
msgid_plural "Hidden Replies"
|
2600 |
+
msgstr[0] ""
|
2601 |
+
msgstr[1] ""
|
2602 |
|
2603 |
+
#: bbp-admin/bbp-metaboxes.php:188
|
2604 |
+
msgid "Empty Topic Tag"
|
2605 |
+
msgid_plural "Empty Topic Tags"
|
2606 |
+
msgstr[0] ""
|
2607 |
+
msgstr[1] ""
|
2608 |
|
2609 |
+
#: bbp-admin/bbp-metaboxes.php:214
|
2610 |
+
msgid "Theme <strong>natively supports</strong> bbPress"
|
|
|
2611 |
msgstr ""
|
2612 |
|
2613 |
+
#: bbp-admin/bbp-metaboxes.php:216
|
2614 |
+
msgid "Theme <strong>does not</strong> natively support bbPress"
|
2615 |
msgstr ""
|
2616 |
|
2617 |
+
#: bbp-admin/bbp-metaboxes.php:221
|
2618 |
+
msgid "You are using <span class=\"b\">bbPress %s</span>."
|
|
|
|
|
2619 |
msgstr ""
|
2620 |
|
2621 |
+
#: bbp-admin/bbp-metaboxes.php:255
|
2622 |
+
msgid "Category"
|
|
|
|
|
2623 |
msgstr ""
|
2624 |
|
2625 |
+
#: bbp-admin/bbp-metaboxes.php:268
|
2626 |
+
msgid "Closed"
|
2627 |
msgstr ""
|
2628 |
|
2629 |
+
#: bbp-admin/bbp-metaboxes.php:280
|
2630 |
+
msgid "Public"
|
2631 |
msgstr ""
|
2632 |
|
2633 |
+
#: bbp-admin/bbp-metaboxes.php:282
|
2634 |
+
msgid "Hidden"
|
2635 |
msgstr ""
|
2636 |
|
2637 |
+
#: bbp-admin/bbp-metaboxes.php:294 bbp-admin/bbp-metaboxes.php:295
|
2638 |
+
msgid "Type:"
|
2639 |
msgstr ""
|
2640 |
|
2641 |
+
#: bbp-admin/bbp-metaboxes.php:300 bbp-admin/bbp-metaboxes.php:301
|
2642 |
+
msgid "Status:"
|
|
|
|
|
|
|
2643 |
msgstr ""
|
2644 |
|
2645 |
+
#: bbp-admin/bbp-metaboxes.php:306 bbp-admin/bbp-metaboxes.php:307
|
2646 |
+
msgid "Visibility:"
|
|
|
|
|
|
|
2647 |
msgstr ""
|
2648 |
|
2649 |
+
#: bbp-admin/bbp-metaboxes.php:314
|
2650 |
+
msgid "Parent:"
|
|
|
|
|
2651 |
msgstr ""
|
2652 |
|
2653 |
+
#: bbp-admin/bbp-metaboxes.php:315
|
2654 |
+
msgid "Forum Parent"
|
|
|
|
|
2655 |
msgstr ""
|
2656 |
|
2657 |
+
#: bbp-admin/bbp-metaboxes.php:321
|
2658 |
+
msgid "(No Parent)"
|
|
|
|
|
|
|
2659 |
msgstr ""
|
2660 |
|
2661 |
+
#: bbp-admin/bbp-metaboxes.php:330
|
2662 |
+
msgid "Order:"
|
|
|
|
|
|
|
|
|
2663 |
msgstr ""
|
2664 |
|
2665 |
+
#: bbp-admin/bbp-metaboxes.php:331
|
2666 |
+
msgid "Forum Order"
|
|
|
|
|
|
|
2667 |
msgstr ""
|
2668 |
|
2669 |
+
#: bbp-admin/bbp-metaboxes.php:402
|
2670 |
+
msgid "(Use Forum of Topic)"
|
|
|
|
|
2671 |
msgstr ""
|
2672 |
|
2673 |
+
#: bbp-admin/bbp-metaboxes.php:423
|
2674 |
+
msgid "(No Topic)"
|
|
|
|
|
|
|
2675 |
msgstr ""
|
2676 |
|
2677 |
+
#: bbp-admin/bbp-metaboxes.php:487 bbp-admin/bbp-metaboxes.php:490
|
2678 |
+
msgid "IP Address"
|
|
|
|
|
|
|
2679 |
msgstr ""
|
2680 |
|
2681 |
+
#: bbp-admin/importers/bbpress.php:350
|
2682 |
+
msgid "bbPress Standalone Importer"
|
|
|
|
|
|
|
2683 |
msgstr ""
|
2684 |
|
2685 |
+
#: bbp-admin/importers/bbpress.php:363
|
2686 |
+
msgid "Try Again"
|
|
|
|
|
|
|
|
|
|
|
2687 |
msgstr ""
|
2688 |
|
2689 |
+
#: bbp-admin/importers/bbpress.php:447
|
2690 |
msgid ""
|
2691 |
+
"It looks like you attempted to convert your bbPress standalone previously "
|
2692 |
+
"and got interrupted."
|
2693 |
msgstr ""
|
2694 |
|
2695 |
+
#: bbp-admin/importers/bbpress.php:450
|
2696 |
+
msgid "Cancel & start a new import"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2697 |
msgstr ""
|
2698 |
|
2699 |
+
#: bbp-admin/importers/bbpress.php:451
|
2700 |
+
msgid "Continue previous import"
|
|
|
|
|
2701 |
msgstr ""
|
2702 |
|
2703 |
+
#: bbp-admin/importers/bbpress.php:459
|
2704 |
msgid ""
|
2705 |
+
"Existing bbPress standalone installation found. See configuration section "
|
2706 |
+
"for details."
|
2707 |
msgstr ""
|
2708 |
|
2709 |
+
#: bbp-admin/importers/bbpress.php:466
|
2710 |
msgid ""
|
2711 |
+
"This importer allows you to convert your bbPress Standalone into the bbPress "
|
2712 |
+
"Plugin."
|
2713 |
msgstr ""
|
2714 |
|
2715 |
+
#: bbp-admin/importers/bbpress.php:468
|
2716 |
+
msgid "Instructions"
|
|
|
|
|
2717 |
msgstr ""
|
2718 |
|
2719 |
+
#: bbp-admin/importers/bbpress.php:470
|
2720 |
msgid ""
|
2721 |
+
"Create a <a href=\"%s\">backup</a> of your database and files. If the import "
|
2722 |
+
"process is interrupted for any reason, restore from that backup and re-run "
|
2723 |
+
"the import."
|
2724 |
msgstr ""
|
2725 |
|
2726 |
+
#: bbp-admin/importers/bbpress.php:471
|
2727 |
msgid ""
|
2728 |
+
"Seriously... Go back everything up, and don't come back until that's done. "
|
2729 |
+
"If things go awry, it's possible this importer will not be able to complete "
|
2730 |
+
"and your forums will be lost in limbo forever. This is serious business. No, "
|
2731 |
+
"we're not kidding."
|
2732 |
msgstr ""
|
2733 |
|
2734 |
+
#: bbp-admin/importers/bbpress.php:472
|
2735 |
+
msgid "To reduce memory overhead and avoid possible conflicts please:"
|
|
|
|
|
|
|
2736 |
msgstr ""
|
2737 |
|
2738 |
+
#: bbp-admin/importers/bbpress.php:475
|
2739 |
msgid ""
|
2740 |
+
"Disable all plugins (except bbPress) on both your WordPress and bbPress "
|
2741 |
+
"standalone installations."
|
|
|
2742 |
msgstr ""
|
2743 |
|
2744 |
+
#: bbp-admin/importers/bbpress.php:478
|
2745 |
+
msgid "Switch to a default WordPress theme."
|
2746 |
msgstr ""
|
2747 |
|
2748 |
+
#: bbp-admin/importers/bbpress.php:482
|
2749 |
+
msgid "Notes on compatibility:"
|
|
|
2750 |
msgstr ""
|
2751 |
|
2752 |
+
#: bbp-admin/importers/bbpress.php:485
|
2753 |
msgid ""
|
2754 |
+
"If you are using the alpha version of bbPress 1.1, subscriptions will be "
|
2755 |
+
"ported automatically."
|
2756 |
msgstr ""
|
2757 |
|
2758 |
+
#: bbp-admin/importers/bbpress.php:488
|
2759 |
msgid ""
|
2760 |
+
"If you have the <a href=\"%s\">Subscribe to Topic</a> plugin active, then "
|
2761 |
+
"this script will migrate user subscriptions from that plugin."
|
|
|
2762 |
msgstr ""
|
2763 |
|
2764 |
+
#: bbp-admin/importers/bbpress.php:491
|
2765 |
msgid ""
|
2766 |
+
"If you are importing an existing BuddyPress Forums installation, we should "
|
2767 |
+
"have found your previous configuration file."
|
|
|
|
|
2768 |
msgstr ""
|
2769 |
|
2770 |
+
#: bbp-admin/importers/bbpress.php:495
|
2771 |
msgid ""
|
2772 |
+
"This converter can be a drag on large forums with lots of existing topics "
|
2773 |
+
"and replies. If possible, do this import in a safe place (like a local "
|
2774 |
+
"installation.)"
|
2775 |
msgstr ""
|
2776 |
|
2777 |
+
#: bbp-admin/importers/bbpress.php:498
|
2778 |
+
msgid "Configuration"
|
|
|
|
|
2779 |
msgstr ""
|
2780 |
|
2781 |
+
#: bbp-admin/importers/bbpress.php:499
|
2782 |
msgid ""
|
2783 |
+
"Enter the full path to your bbPress configuration file i.e. <code>bb-config."
|
2784 |
+
"php</code>:"
|
2785 |
msgstr ""
|
2786 |
|
2787 |
+
#: bbp-admin/importers/bbpress.php:503
|
2788 |
+
msgid "bbPress Standalone Path:"
|
2789 |
msgstr ""
|
2790 |
|
2791 |
+
#: bbp-admin/importers/bbpress.php:510
|
2792 |
+
msgid "Proceed"
|
|
|
|
|
|
|
|
|
|
|
2793 |
msgstr ""
|
2794 |
|
2795 |
+
#: bbp-admin/importers/bbpress.php:556
|
2796 |
msgid ""
|
2797 |
+
"Please enter the path to your bbPress configuration file - <code>bb-config."
|
2798 |
+
"php</code>."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2799 |
msgstr ""
|
2800 |
|
2801 |
+
#: bbp-admin/importers/bbpress.php:557 bbp-admin/importers/bbpress.php:575
|
2802 |
+
msgid "Go Back"
|
2803 |
msgstr ""
|
2804 |
|
2805 |
+
#: bbp-admin/importers/bbpress.php:574
|
2806 |
msgid ""
|
2807 |
+
"bbPress configuration file <code>bb-config.php</code> doesn't exist in the "
|
2808 |
+
"path specified! Please check the path and try again."
|
2809 |
msgstr ""
|
2810 |
|
2811 |
+
#: bbp-admin/importers/bbpress.php:608
|
2812 |
+
msgid "Configuration Options"
|
|
|
2813 |
msgstr ""
|
2814 |
|
2815 |
+
#: bbp-admin/importers/bbpress.php:614
|
2816 |
+
msgid ""
|
2817 |
+
"<strong>Auto-detected</strong>: Your WordPress and bbPress user tables are "
|
2818 |
+
"integrated. Proceed to <label for=\"step_board\">importing forums, topics "
|
2819 |
+
"and posts</label>."
|
2820 |
msgstr ""
|
2821 |
|
2822 |
+
#: bbp-admin/importers/bbpress.php:621
|
2823 |
msgid ""
|
2824 |
+
"Your WordPress blog is <strong>new</strong> and you don't have the fear of "
|
2825 |
+
"losing WordPress users:"
|
|
|
|
|
|
|
2826 |
msgstr ""
|
2827 |
|
2828 |
+
#: bbp-admin/importers/bbpress.php:622
|
2829 |
+
msgid "Go to migrating users section."
|
|
|
|
|
2830 |
msgstr ""
|
2831 |
|
2832 |
+
#: bbp-admin/importers/bbpress.php:623
|
2833 |
msgid ""
|
2834 |
+
"<strong>Note</strong>: The WordPress %1$s and %2$s tables will be renamed "
|
2835 |
+
"(not deleted) so that you can restore them if something goes wrong."
|
|
|
|
|
|
|
|
|
|
|
2836 |
msgstr ""
|
2837 |
|
2838 |
+
#: bbp-admin/importers/bbpress.php:624
|
2839 |
msgid ""
|
2840 |
+
"Please ensure there are no tables named %1$s and %2$s to avoid renaming "
|
2841 |
+
"conflicts."
|
|
|
2842 |
msgstr ""
|
2843 |
|
2844 |
+
#: bbp-admin/importers/bbpress.php:625
|
2845 |
+
msgid "Also, your WordPress and bbPress installs must be in the same database."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2846 |
msgstr ""
|
2847 |
|
2848 |
+
#: bbp-admin/importers/bbpress.php:629
|
2849 |
msgid ""
|
2850 |
+
"You're done with user migration or have the user tables <strong>integrated</"
|
2851 |
+
"strong>:"
|
|
|
2852 |
msgstr ""
|
2853 |
|
2854 |
+
#: bbp-admin/importers/bbpress.php:630
|
2855 |
+
msgid "Proceed to importing forums, topics and posts section."
|
2856 |
msgstr ""
|
2857 |
|
2858 |
+
#: bbp-admin/importers/bbpress.php:634
|
2859 |
msgid ""
|
2860 |
+
"You have a well <strong>established</strong> WordPress user base, the user "
|
2861 |
+
"tables are not integrated and you can't lose your users:"
|
|
|
2862 |
msgstr ""
|
2863 |
|
2864 |
+
#: bbp-admin/importers/bbpress.php:635
|
2865 |
msgid ""
|
2866 |
+
"This is currently not yet supported, and will likely not be in the future "
|
2867 |
+
"also as it is highly complex to merge two user sets (which might even "
|
2868 |
+
"conflict)."
|
2869 |
msgstr ""
|
2870 |
|
2871 |
+
#: bbp-admin/importers/bbpress.php:636
|
2872 |
msgid ""
|
2873 |
+
"Patches are always <a href=\"%s\" title=\"The last revision containing the "
|
2874 |
+
"custom user migration code\">welcome</a>. :)"
|
2875 |
msgstr ""
|
2876 |
|
2877 |
+
#: bbp-admin/importers/bbpress.php:644
|
2878 |
+
msgid "Migrate Users"
|
|
|
|
|
|
|
2879 |
msgstr ""
|
2880 |
|
2881 |
+
#: bbp-admin/importers/bbpress.php:647
|
2882 |
+
msgid "Import Forums, Topics & Posts"
|
|
|
|
|
|
|
2883 |
msgstr ""
|
2884 |
|
2885 |
+
#: bbp-admin/importers/bbpress.php:651
|
2886 |
+
msgid "Start!"
|
|
|
|
|
2887 |
msgstr ""
|
2888 |
|
2889 |
+
#: bbp-admin/importers/bbpress.php:687
|
2890 |
+
msgid "Importing Users"
|
2891 |
+
msgstr ""
|
2892 |
+
|
2893 |
+
#: bbp-admin/importers/bbpress.php:688
|
2894 |
+
msgid "We’re in the process of migrating your users..."
|
2895 |
+
msgstr ""
|
2896 |
+
|
2897 |
+
#: bbp-admin/importers/bbpress.php:698
|
2898 |
msgid ""
|
2899 |
+
"Renamed the <code>%1$s</code> and <code>%2$s</code> tables to <code>%3$s</"
|
2900 |
+
"code> and <code>%4$s</code> respectively."
|
2901 |
msgstr ""
|
2902 |
|
2903 |
+
#: bbp-admin/importers/bbpress.php:700
|
2904 |
msgid ""
|
2905 |
+
"There was a problem dropping the <code>%1$s</code> and <code>%2$s</code> "
|
2906 |
+
"tables. Please check and re-run the script or rename or drop the tables "
|
2907 |
+
"yourself."
|
2908 |
msgstr ""
|
2909 |
|
2910 |
+
#: bbp-admin/importers/bbpress.php:716
|
2911 |
+
msgid "Created the <code>%s</code> table and copied the users from bbPress."
|
2912 |
msgstr ""
|
2913 |
|
2914 |
+
#: bbp-admin/importers/bbpress.php:718 bbp-admin/importers/bbpress.php:735
|
2915 |
msgid ""
|
2916 |
+
"There was a problem duplicating the table <code>%1$s</code> to <code>%2$s</"
|
2917 |
+
"code>. Please check and re-run the script or duplicate the table yourself."
|
2918 |
msgstr ""
|
2919 |
|
2920 |
+
#: bbp-admin/importers/bbpress.php:733
|
2921 |
msgid ""
|
2922 |
+
"Created the <code>%s</code> table and copied the user information from "
|
2923 |
+
"bbPress."
|
|
|
|
|
|
|
2924 |
msgstr ""
|
2925 |
|
2926 |
+
#: bbp-admin/importers/bbpress.php:808
|
2927 |
msgid ""
|
2928 |
+
"There was a problem in getting an administrator of the blog. Now, please go "
|
2929 |
+
"to your blog, set a user as administrator, login as that user and directly "
|
2930 |
+
"go to importing forums, topics and replies section. Note that old logins "
|
2931 |
+
"won't work, you would have to edit your database (you can still try logging "
|
2932 |
+
"in as the bbPress keymaster)."
|
2933 |
msgstr ""
|
2934 |
|
2935 |
+
#: bbp-admin/importers/bbpress.php:831
|
2936 |
+
msgid ""
|
2937 |
+
"User roles have been successfully mapped based. The bbPress keymaster is "
|
2938 |
+
"WordPress administrator, bbPress administrator and moderators are moderators "
|
2939 |
+
"and rest all WordPress roles are %1$s. Now, you can only login into your "
|
2940 |
+
"WordPress blog by the bbPress credentials. For the time being, you have been "
|
2941 |
+
"logged in as the first available administrator (Username: %2$s, User ID: %3"
|
2942 |
+
"$s)."
|
2943 |
msgstr ""
|
2944 |
|
2945 |
+
#: bbp-admin/importers/bbpress.php:836
|
2946 |
+
msgid ""
|
2947 |
+
"Your users have all been imported, but wait – there’s more! Now "
|
2948 |
+
"we need to import your forums, topics and posts!"
|
2949 |
msgstr ""
|
2950 |
|
2951 |
+
#: bbp-admin/importers/bbpress.php:839
|
2952 |
+
msgid "Import forums, topics and posts »"
|
2953 |
msgstr ""
|
2954 |
|
2955 |
+
#: bbp-admin/importers/bbpress.php:867
|
2956 |
+
msgid "Importing Forums, Topics And Posts"
|
2957 |
msgstr ""
|
2958 |
|
2959 |
+
#: bbp-admin/importers/bbpress.php:868
|
2960 |
+
msgid ""
|
2961 |
+
"We’re importing your bbPress standalone forums, topics and replies..."
|
2962 |
msgstr ""
|
2963 |
|
2964 |
+
#: bbp-admin/importers/bbpress.php:875 bbpress.php:555
|
2965 |
+
msgid "No forums found"
|
2966 |
msgstr ""
|
2967 |
|
2968 |
+
#: bbp-admin/importers/bbpress.php:879
|
2969 |
+
msgid "Total number of forums: %s"
|
2970 |
msgstr ""
|
2971 |
|
2972 |
+
#: bbp-admin/importers/bbpress.php:885
|
2973 |
+
msgid "Processing forum #%1$s (<a href=\"%2$s\">%3$s</a>)"
|
2974 |
msgstr ""
|
2975 |
|
2976 |
+
#: bbp-admin/importers/bbpress.php:905
|
2977 |
+
msgid "Added the forum as forum #<a href=\"%1$s\">%2$s</a>"
|
2978 |
msgstr ""
|
2979 |
|
2980 |
+
#: bbp-admin/importers/bbpress.php:907
|
2981 |
+
msgid "There was a problem in adding the forum."
|
|
|
|
|
2982 |
msgstr ""
|
2983 |
|
2984 |
+
#: bbp-admin/importers/bbpress.php:928
|
2985 |
+
msgid "The forum is a category and has no topics."
|
2986 |
msgstr ""
|
2987 |
|
2988 |
+
#: bbp-admin/importers/bbpress.php:933
|
2989 |
+
msgid ""
|
2990 |
+
"The forum is a category but has topics, so it has been set as closed on the "
|
2991 |
+
"new board."
|
2992 |
msgstr ""
|
2993 |
|
2994 |
+
#: bbp-admin/importers/bbpress.php:940
|
2995 |
+
msgid "Total number of topics in the forum: %s"
|
2996 |
msgstr ""
|
2997 |
|
2998 |
+
#: bbp-admin/importers/bbpress.php:1080
|
2999 |
+
msgid ""
|
3000 |
+
"Added topic #%1$s (<a href=\"%2$s\">%3$s</a>) as topic #<a href=\"%4$s\">%5"
|
3001 |
+
"$s</a> with %6$s replies."
|
3002 |
msgstr ""
|
3003 |
|
3004 |
+
#: bbp-admin/importers/bbpress.php:1082
|
3005 |
+
msgid "There was a problem in adding topic #1$s (<a href=\"%2$s\">%3$s</a>)."
|
3006 |
msgstr ""
|
3007 |
|
3008 |
+
#: bbp-admin/importers/bbpress.php:1101
|
3009 |
+
msgid ""
|
3010 |
+
"Your forums, topics and posts have all been imported, but wait – "
|
3011 |
+
"there’s more! Now we need to do a <a href=\"%s\">recount</a> to get "
|
3012 |
+
"the counts in sync! Yes, we’re bad at Math."
|
3013 |
msgstr ""
|
3014 |
|
3015 |
+
#: bbp-admin/importers/bbpress.php:1103
|
3016 |
+
msgid "After that it's all done. <a href=\"%s\">Have fun!</a> :)"
|
3017 |
msgstr ""
|
3018 |
|
3019 |
+
#: bbp-admin/importers/bbpress.php:1114
|
3020 |
+
msgid "bbPress Standalone"
|
3021 |
msgstr ""
|
3022 |
|
3023 |
+
#: bbp-admin/importers/bbpress.php:1114
|
3024 |
+
msgid "Import your bbPress standalone board."
|
3025 |
msgstr ""
|
3026 |
|
3027 |
+
#: bbp-admin/bbp-tools.php:53
|
3028 |
+
msgid "bbPress Recount"
|
3029 |
msgstr ""
|
3030 |
|
3031 |
+
#: bbp-admin/bbp-tools.php:57
|
3032 |
+
msgid ""
|
3033 |
+
"bbPress keeps a running count of things like replies to each topic and "
|
3034 |
+
"topics in each forum. In rare occasions these counts can fall out of sync. "
|
3035 |
+
"Using this form you can have bbPress manually recount these items."
|
3036 |
msgstr ""
|
3037 |
|
3038 |
+
#: bbp-admin/bbp-tools.php:58
|
3039 |
+
msgid "You can also use this form to clean out stale items like empty tags."
|
3040 |
msgstr ""
|
3041 |
|
3042 |
+
#: bbp-admin/bbp-tools.php:64
|
3043 |
+
msgid "Things to recount:"
|
3044 |
msgstr ""
|
3045 |
|
3046 |
+
#: bbp-admin/bbp-tools.php:67 bbp-admin/bbp-admin.php:158
|
3047 |
+
msgid "Recount"
|
|
|
|
|
3048 |
msgstr ""
|
3049 |
|
3050 |
+
#: bbp-admin/bbp-tools.php:78
|
3051 |
+
msgid "There are no recount tools available."
|
3052 |
msgstr ""
|
3053 |
|
3054 |
+
#: bbp-admin/bbp-tools.php:89
|
3055 |
+
msgid "Recount Items"
|
3056 |
msgstr ""
|
3057 |
|
3058 |
+
#: bbp-admin/bbp-admin.php:179
|
3059 |
+
msgid "Main Settings"
|
3060 |
msgstr ""
|
3061 |
|
3062 |
+
#: bbp-admin/bbp-admin.php:182
|
3063 |
+
msgid "Lock post editing after"
|
3064 |
msgstr ""
|
3065 |
|
3066 |
+
#: bbp-admin/bbp-admin.php:186
|
3067 |
+
msgid "Throttle time"
|
3068 |
msgstr ""
|
3069 |
|
3070 |
+
#: bbp-admin/bbp-admin.php:190
|
3071 |
+
msgid "Allow Favorites"
|
3072 |
msgstr ""
|
3073 |
|
3074 |
+
#: bbp-admin/bbp-admin.php:194
|
3075 |
+
msgid "Allow Subscriptions"
|
3076 |
msgstr ""
|
3077 |
|
3078 |
+
#: bbp-admin/bbp-admin.php:198
|
3079 |
+
msgid "Allow Anonymous Posting"
|
3080 |
msgstr ""
|
3081 |
|
3082 |
+
#: bbp-admin/bbp-admin.php:203
|
3083 |
+
msgid "Allow Global Access"
|
3084 |
msgstr ""
|
3085 |
|
3086 |
+
#: bbp-admin/bbp-admin.php:210
|
3087 |
+
msgid "Per Page"
|
3088 |
msgstr ""
|
3089 |
|
3090 |
+
#: bbp-admin/bbp-admin.php:223
|
3091 |
+
msgid "Per RSS Page"
|
3092 |
msgstr ""
|
3093 |
|
3094 |
+
#: bbp-admin/bbp-admin.php:236
|
3095 |
+
msgid "Archive Slugs"
|
|
|
|
|
|
|
|
|
|
|
3096 |
msgstr ""
|
3097 |
|
3098 |
+
#: bbp-admin/bbp-admin.php:249
|
3099 |
+
msgid "Single Slugs"
|
|
|
|
|
|
|
|
|
3100 |
msgstr ""
|
3101 |
|
3102 |
+
#: bbp-admin/bbp-admin.php:252
|
3103 |
+
msgid "Forum Prefix"
|
3104 |
msgstr ""
|
3105 |
|
3106 |
+
#: bbp-admin/bbp-admin.php:348
|
3107 |
msgid ""
|
3108 |
+
"Your active theme does not include bbPress template files. Your forums are "
|
3109 |
+
"using the default styling included with bbPress."
|
3110 |
msgstr ""
|
3111 |
|
3112 |
+
#: bbp-admin/bbp-admin.php:367
|
3113 |
+
msgid "Settings"
|
3114 |
msgstr ""
|
3115 |
|
3116 |
+
#: bbp-admin/bbp-admin.php:393
|
3117 |
+
msgid "Right Now in Forums"
|
3118 |
msgstr ""
|
3119 |
|
3120 |
+
#: bbp-admin/bbp-admin.php:637
|
3121 |
+
msgid "Green"
|
3122 |
msgstr ""
|
3123 |
|
3124 |
+
#: bbp-admin/bbp-replies.php:116
|
3125 |
+
msgid ""
|
3126 |
+
"The reply title field and the big reply editing area are fixed in place, but "
|
3127 |
+
"you can reposition all the other boxes using drag and drop, and can minimize "
|
3128 |
+
"or expand them by clicking the title bar of the box. Use the Screen Options "
|
3129 |
+
"tab to unhide more boxes (Reply Attributes, Slug) or to choose a 1- or 2-"
|
3130 |
+
"column layout for this screen."
|
3131 |
msgstr ""
|
3132 |
|
3133 |
+
#: bbp-admin/bbp-replies.php:117
|
3134 |
+
msgid ""
|
3135 |
+
"<strong>Title</strong> - Enter a title for your reply. After you enter a "
|
3136 |
+
"title, you will see the permalink below, which you can edit."
|
3137 |
msgstr ""
|
3138 |
|
3139 |
+
#: bbp-admin/bbp-replies.php:118
|
3140 |
+
msgid ""
|
3141 |
+
"<strong>Post editor</strong> - Enter the text for your reply. There are two "
|
3142 |
+
"modes of editing: Visual and HTML. Choose the mode by clicking on the "
|
3143 |
+
"appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon "
|
3144 |
+
"in the row to get a second row of controls. The screen icon just before that "
|
3145 |
+
"allows you to expand the edit box to full screen. The HTML mode allows you "
|
3146 |
+
"to enter raw HTML along with your forum text. You can insert media files by "
|
3147 |
+
"clicking the icons above the post editor and following the directions."
|
3148 |
msgstr ""
|
3149 |
|
3150 |
+
#: bbp-admin/bbp-replies.php:119
|
3151 |
+
msgid ""
|
3152 |
+
"<strong>Reply Attributes</strong> - Select the attributes that your reply "
|
3153 |
+
"should have. The Parent Topic dropdown determines the parent topic that the "
|
3154 |
+
"reply belongs to."
|
3155 |
msgstr ""
|
3156 |
|
3157 |
+
#: bbp-admin/bbp-replies.php:120
|
3158 |
+
msgid ""
|
3159 |
+
"<strong>Publish</strong> - The Publish box will allow you to save your reply "
|
3160 |
+
"as Draft or Pending Review. You may Preview your reply before it is "
|
3161 |
+
"published as well. The Visibility will determine whether the reply is "
|
3162 |
+
"Public, Password protected (requiring a password on the site to view) or "
|
3163 |
+
"Private (only the author will have access to it). Replies may be published "
|
3164 |
+
"immediately by clicking the dropdown, or at a specific date and time by "
|
3165 |
+
"clicking the Edit link."
|
3166 |
msgstr ""
|
3167 |
|
3168 |
+
#: bbp-admin/bbp-replies.php:121
|
3169 |
+
msgid ""
|
3170 |
+
"<strong>Revisions</strong> - Revisions show past versions of the saved "
|
3171 |
+
"reply. Each revision can be compared to the current version, or another "
|
3172 |
+
"revision. Revisions can also be restored to the current version."
|
3173 |
msgstr ""
|
3174 |
|
3175 |
+
#: bbp-admin/bbp-replies.php:141
|
3176 |
+
msgid "This screen displays the replies created on your site."
|
3177 |
msgstr ""
|
3178 |
|
3179 |
+
#: bbp-admin/bbp-replies.php:145
|
3180 |
+
msgid ""
|
3181 |
+
"You can hide/display columns based on your needs (Forum, Topic, Author, and "
|
3182 |
+
"Created) and decide how many replies to list per screen using the Screen "
|
3183 |
+
"Options tab."
|
3184 |
msgstr ""
|
3185 |
|
3186 |
+
#: bbp-admin/bbp-replies.php:146
|
3187 |
msgid ""
|
3188 |
+
"You can filter the list of replies by reply status using the text links in "
|
3189 |
+
"the upper left to show All, Published, Pending Review, Draft, or Trashed "
|
3190 |
+
"topics. The default view is to show all replies."
|
3191 |
msgstr ""
|
3192 |
|
3193 |
+
#: bbp-admin/bbp-replies.php:147
|
3194 |
+
msgid ""
|
3195 |
+
"You can view replies in a simple title list or with an excerpt. Choose the "
|
3196 |
+
"view you prefer by clicking on the icons at the top of the list on the right."
|
3197 |
msgstr ""
|
3198 |
|
3199 |
+
#: bbp-admin/bbp-replies.php:148
|
3200 |
+
msgid ""
|
3201 |
+
"You can refine the list to show only replies from a specific month by using "
|
3202 |
+
"the dropdown menus above the replies list. Click the Filter button after "
|
3203 |
+
"making your selection."
|
3204 |
msgstr ""
|
3205 |
|
3206 |
+
#: bbp-admin/bbp-replies.php:149
|
3207 |
+
msgid ""
|
3208 |
+
"You can also show only replies from a specific parent forum by using the "
|
3209 |
+
"parent forum dropdown above the replies list and selecting the parent forum. "
|
3210 |
+
"Click the Filter button after making your selection."
|
3211 |
+
msgstr ""
|
3212 |
+
|
3213 |
+
#: bbp-admin/bbp-replies.php:152
|
3214 |
+
msgid ""
|
3215 |
+
"Hovering over a row in the replies list will display action links that allow "
|
3216 |
+
"you to manage your reply. You can perform the following actions:"
|
3217 |
msgstr ""
|
3218 |
|
3219 |
+
#: bbp-admin/bbp-replies.php:155
|
3220 |
+
msgid ""
|
3221 |
+
"Edit takes you to the editing screen for that reply. You can also reach that "
|
3222 |
+
"screen by clicking on the reply title."
|
3223 |
msgstr ""
|
3224 |
|
3225 |
+
#: bbp-admin/bbp-replies.php:156
|
3226 |
msgid ""
|
3227 |
+
"Trash removes your reply from this list and places it in the trash, from "
|
3228 |
+
"which you can permanently delete it."
|
|
|
|
|
|
|
3229 |
msgstr ""
|
3230 |
|
3231 |
+
#: bbp-admin/bbp-replies.php:157
|
3232 |
+
msgid "View will take you to your live reply to view the reply."
|
|
|
|
|
3233 |
msgstr ""
|
3234 |
|
3235 |
+
#: bbp-admin/bbp-replies.php:158
|
3236 |
msgid ""
|
3237 |
+
"Spam will mark the topic as spam, preventing further replies to it and "
|
3238 |
+
"removing it from the site’s public view."
|
|
|
|
|
|
|
|
|
|
|
3239 |
msgstr ""
|
3240 |
|
3241 |
+
#: bbp-admin/bbp-replies.php:161
|
3242 |
msgid ""
|
3243 |
+
"You can also edit multiple replies at once. Select the replies you want to "
|
3244 |
+
"edit using the checkboxes, select Edit from the Bulk Actions menu and click "
|
3245 |
+
"Apply. You will be able to change the metadata for all selected replies at "
|
3246 |
+
"once. To remove a reply from the grouping, just click the x next to its name "
|
3247 |
+
"in the Bulk Edit area that appears."
|
3248 |
msgstr ""
|
3249 |
|
3250 |
+
#: bbp-admin/bbp-replies.php:162
|
3251 |
msgid ""
|
3252 |
+
"The Bulk Actions menu may also be used to delete multiple replies at once. "
|
3253 |
+
"Select Delete from the dropdown after making your selection."
|
|
|
|
|
|
|
|
|
|
|
3254 |
msgstr ""
|
3255 |
|
3256 |
+
#: bbp-admin/bbp-replies.php:190
|
3257 |
+
msgid "Reply Attributes"
|
|
|
|
|
|
|
|
|
3258 |
msgstr ""
|
3259 |
|
3260 |
+
#: bbp-admin/bbp-replies.php:425
|
3261 |
+
msgid "The reply was not found!"
|
|
|
|
|
|
|
3262 |
msgstr ""
|
3263 |
|
3264 |
+
#: bbp-admin/bbp-replies.php:489
|
3265 |
+
msgid "There was a problem marking the reply \"%1$s\" as spam."
|
3266 |
msgstr ""
|
3267 |
|
3268 |
+
#: bbp-admin/bbp-replies.php:489
|
3269 |
+
msgid "Reply \"%1$s\" successfully marked as spam."
|
|
|
|
|
3270 |
msgstr ""
|
3271 |
|
3272 |
+
#: bbp-admin/bbp-replies.php:493
|
3273 |
+
msgid "There was a problem unmarking the reply \"%1$s\" as spam."
|
|
|
|
|
|
|
3274 |
msgstr ""
|
3275 |
|
3276 |
+
#: bbp-admin/bbp-replies.php:493
|
3277 |
+
msgid "Reply \"%1$s\" successfully unmarked as spam."
|
|
|
|
|
3278 |
msgstr ""
|
3279 |
|
3280 |
+
#: bbp-admin/bbp-replies.php:523
|
3281 |
+
msgid "Title"
|
|
|
|
|
|
|
3282 |
msgstr ""
|
3283 |
|
3284 |
+
#: bbp-admin/bbp-replies.php:577 bbp-admin/bbp-replies.php:584
|
3285 |
+
msgid "No Topic"
|
|
|
|
|
|
|
3286 |
msgstr ""
|
3287 |
|
3288 |
+
#: bbp-admin/bbp-replies.php:606
|
3289 |
+
msgid "(Mismatch)"
|
|
|
3290 |
msgstr ""
|
3291 |
|
3292 |
+
#: bbp-admin/bbp-replies.php:685
|
3293 |
+
msgid "Mark the reply as not spam"
|
|
|
|
|
3294 |
msgstr ""
|
3295 |
|
3296 |
+
#: bbp-admin/bbp-replies.php:687
|
3297 |
+
msgid "Mark this reply as spam"
|
|
|
|
|
3298 |
msgstr ""
|
3299 |
|
3300 |
+
#: bbp-admin/bbp-replies.php:823
|
3301 |
+
msgid "Reply updated. <a href=\"%s\">View topic</a>"
|
|
|
|
|
3302 |
msgstr ""
|
3303 |
|
3304 |
+
#: bbp-admin/bbp-replies.php:832
|
3305 |
+
msgid "Reply updated."
|
3306 |
msgstr ""
|
3307 |
|
3308 |
+
#. translators: %s: date and time of the revision
|
3309 |
+
#: bbp-admin/bbp-replies.php:837
|
3310 |
+
msgid "Reply restored to revision from %s"
|
|
|
3311 |
msgstr ""
|
3312 |
|
3313 |
+
#: bbp-admin/bbp-replies.php:841
|
3314 |
+
msgid "Reply created. <a href=\"%s\">View topic</a>"
|
|
|
|
|
|
|
3315 |
msgstr ""
|
3316 |
|
3317 |
+
#: bbp-admin/bbp-replies.php:844
|
3318 |
+
msgid "Reply saved."
|
|
|
|
|
3319 |
msgstr ""
|
3320 |
|
3321 |
+
#: bbp-admin/bbp-replies.php:847
|
3322 |
+
msgid "Reply submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
|
|
|
|
|
|
|
|
|
|
3323 |
msgstr ""
|
3324 |
|
3325 |
+
#: bbp-admin/bbp-replies.php:850
|
3326 |
msgid ""
|
3327 |
+
"Reply scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
3328 |
+
"\">Preview topic</a>"
|
3329 |
msgstr ""
|
3330 |
|
3331 |
+
#: bbp-admin/bbp-replies.php:857
|
3332 |
+
msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
|
|
|
|
|
|
3333 |
msgstr ""
|
3334 |
|
3335 |
+
#: bbpress.php:546
|
3336 |
+
msgid "All Forums"
|
|
|
|
|
|
|
3337 |
msgstr ""
|
3338 |
|
3339 |
+
#: bbpress.php:547 bbpress.php:551
|
3340 |
+
msgid "New Forum"
|
|
|
|
|
|
|
|
|
3341 |
msgstr ""
|
3342 |
|
3343 |
+
#: bbpress.php:548
|
3344 |
+
msgid "Create New Forum"
|
|
|
|
|
3345 |
msgstr ""
|
3346 |
|
3347 |
+
#: bbpress.php:550
|
3348 |
+
msgid "Edit Forum"
|
3349 |
msgstr ""
|
3350 |
|
3351 |
+
#: bbpress.php:552 bbpress.php:553
|
3352 |
+
msgid "View Forum"
|
|
|
|
|
3353 |
msgstr ""
|
3354 |
|
3355 |
+
#: bbpress.php:554
|
3356 |
+
msgid "Search Forums"
|
|
|
|
|
3357 |
msgstr ""
|
3358 |
|
3359 |
+
#: bbpress.php:556
|
3360 |
+
msgid "No forums found in Trash"
|
3361 |
msgstr ""
|
3362 |
|
3363 |
+
#: bbpress.php:578
|
3364 |
+
msgid "bbPress Forums"
|
3365 |
msgstr ""
|
3366 |
|
3367 |
+
#: bbpress.php:604 bbpress.php:608
|
3368 |
+
msgid "New Topic"
|
3369 |
msgstr ""
|
3370 |
|
3371 |
+
#: bbpress.php:607
|
3372 |
+
msgid "Edit Topic"
|
3373 |
msgstr ""
|
3374 |
|
3375 |
+
#: bbpress.php:609 bbpress.php:610
|
3376 |
+
msgid "View Topic"
|
3377 |
msgstr ""
|
3378 |
|
3379 |
+
#: bbpress.php:611
|
3380 |
+
msgid "Search Topics"
|
3381 |
msgstr ""
|
3382 |
|
3383 |
+
#: bbpress.php:612
|
3384 |
+
msgid "No topics found"
|
3385 |
msgstr ""
|
3386 |
|
3387 |
+
#: bbpress.php:613
|
3388 |
+
msgid "No topics found in Trash"
|
3389 |
msgstr ""
|
3390 |
|
3391 |
+
#: bbpress.php:635
|
3392 |
+
msgid "bbPress Topics"
|
3393 |
msgstr ""
|
3394 |
|
3395 |
+
#: bbpress.php:661 bbpress.php:665
|
3396 |
+
msgid "New Reply"
|
3397 |
msgstr ""
|
3398 |
|
3399 |
+
#: bbpress.php:662
|
3400 |
+
msgid "Create New Reply"
|
3401 |
msgstr ""
|
3402 |
|
3403 |
+
#: bbpress.php:664
|
3404 |
+
msgid "Edit Reply"
|
3405 |
msgstr ""
|
3406 |
|
3407 |
+
#: bbpress.php:666 bbpress.php:667
|
3408 |
+
msgid "View Reply"
|
3409 |
msgstr ""
|
3410 |
|
3411 |
+
#: bbpress.php:668
|
3412 |
+
msgid "Search Replies"
|
3413 |
msgstr ""
|
3414 |
|
3415 |
+
#: bbpress.php:669
|
3416 |
+
msgid "No replies found"
|
3417 |
msgstr ""
|
3418 |
|
3419 |
+
#: bbpress.php:670
|
3420 |
+
msgid "No replies found in Trash"
|
3421 |
msgstr ""
|
3422 |
|
3423 |
+
#: bbpress.php:671
|
3424 |
+
msgid "Topic:"
|
3425 |
msgstr ""
|
3426 |
|
3427 |
+
#: bbpress.php:692
|
3428 |
+
msgid "bbPress Replies"
|
3429 |
msgstr ""
|
3430 |
|
3431 |
+
#: bbpress.php:726
|
3432 |
+
msgctxt "post"
|
3433 |
+
msgid "Closed"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
+
#: bbpress.php:727
|
3437 |
+
msgctxt "bbpress"
|
3438 |
+
msgid "Closed <span class=\"count\">(%s)</span>"
|
3439 |
+
msgid_plural "Closed <span class=\"count\">(%s)</span>"
|
3440 |
+
msgstr[0] ""
|
3441 |
+
msgstr[1] ""
|
3442 |
+
|
3443 |
+
#: bbpress.php:735
|
3444 |
+
msgctxt "post"
|
3445 |
+
msgid "Spam"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
+
#: bbpress.php:736
|
3449 |
+
msgctxt "bbpress"
|
3450 |
+
msgid "Spam <span class=\"count\">(%s)</span>"
|
3451 |
+
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
3452 |
+
msgstr[0] ""
|
3453 |
+
msgstr[1] ""
|
3454 |
+
|
3455 |
+
#: bbpress.php:746
|
3456 |
+
msgctxt "post"
|
3457 |
+
msgid "Orphan"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
+
#: bbpress.php:747
|
3461 |
+
msgctxt "bbpress"
|
3462 |
+
msgid "Orphan <span class=\"count\">(%s)</span>"
|
3463 |
+
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
3464 |
+
msgstr[0] ""
|
3465 |
+
msgstr[1] ""
|
3466 |
+
|
3467 |
+
#: bbpress.php:757
|
3468 |
+
msgctxt "post"
|
3469 |
+
msgid "Hidden"
|
3470 |
msgstr ""
|
3471 |
|
3472 |
+
#: bbpress.php:758
|
3473 |
+
msgctxt "bbpress"
|
3474 |
+
msgid "Hidden <span class=\"count\">(%s)</span>"
|
3475 |
+
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
3476 |
+
msgstr[0] ""
|
3477 |
+
msgstr[1] ""
|
3478 |
+
|
3479 |
+
#: bbpress.php:801
|
3480 |
+
msgid "Search Tags"
|
3481 |
msgstr ""
|
3482 |
|
3483 |
+
#: bbpress.php:802
|
3484 |
+
msgid "Popular Tags"
|
3485 |
msgstr ""
|
3486 |
|
3487 |
+
#: bbpress.php:803
|
3488 |
+
msgid "All Tags"
|
3489 |
msgstr ""
|
3490 |
|
3491 |
+
#: bbpress.php:804
|
3492 |
+
msgid "Edit Tag"
|
3493 |
msgstr ""
|
3494 |
|
3495 |
+
#: bbpress.php:805
|
3496 |
+
msgid "Update Tag"
|
3497 |
msgstr ""
|
3498 |
|
3499 |
+
#: bbpress.php:806
|
3500 |
+
msgid "Add New Tag"
|
3501 |
msgstr ""
|
3502 |
|
3503 |
+
#: bbpress.php:807
|
3504 |
+
msgid "New Tag Name"
|
3505 |
msgstr ""
|
3506 |
|
3507 |
+
#: bbpress.php:808
|
3508 |
+
msgid "View Topic Tag"
|
|
|
|
|
3509 |
msgstr ""
|
3510 |
|
3511 |
+
#: bbpress.php:855
|
3512 |
+
msgid "Topics with no replies"
|
3513 |
msgstr ""
|
3514 |
|
3515 |
#. Plugin Name of the plugin/theme
|
3516 |
msgid "bbPress"
|
3517 |
msgstr ""
|
3518 |
|
3519 |
+
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-2) #-#-#-#-#
|
3520 |
#. Plugin URI of the plugin/theme
|
3521 |
+
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-2) #-#-#-#-#
|
3522 |
#. Author URI of the plugin/theme
|
3523 |
msgid "http://bbpress.org"
|
3524 |
msgstr ""
|
bbp-themes/bbp-twentyten/bbpress/content-single-topic.php
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
native
|
2 |
<?php
|
3 |
|
4 |
/**
|
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
bbp-themes/bbp-twentyten/bbpress/content-single-user-edit.php
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
native
|
2 |
<?php
|
3 |
|
4 |
/**
|
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
bbp-themes/bbp-twentyten/bbpress/content-single-view.php
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
native
|
2 |
<?php
|
3 |
|
4 |
/**
|
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
bbp-themes/bbp-twentyten/bbpress/feedback-no-access.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
|
10 |
?>
|
11 |
|
12 |
-
<div id="forum-private" class="bbp-forum-
|
13 |
<h1 class="entry-title"><?php _e( 'Private', 'bbpress' ); ?></h1>
|
14 |
<div class="entry-content">
|
15 |
<div class="bbp-template-notice info">
|
9 |
|
10 |
?>
|
11 |
|
12 |
+
<div id="forum-private" class="bbp-forum-content">
|
13 |
<h1 class="entry-title"><?php _e( 'Private', 'bbpress' ); ?></h1>
|
14 |
<div class="entry-content">
|
15 |
<div class="bbp-template-notice info">
|
bbp-themes/bbp-twentyten/bbpress/form-anonymous.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?>
|
13 |
|
14 |
<fieldset class="bbp-form">
|
15 |
-
<legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author
|
16 |
<p>
|
17 |
<label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br />
|
18 |
<input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_name" />
|
12 |
<?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?>
|
13 |
|
14 |
<fieldset class="bbp-form">
|
15 |
+
<legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author Information', 'bbpress' ) : _e( 'Your information:', 'bbpress' ); ?></legend>
|
16 |
<p>
|
17 |
<label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br />
|
18 |
<input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_name" />
|
bbp-themes/bbp-twentyten/bbpress/form-protected.php
CHANGED
@@ -7,9 +7,6 @@
|
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
10 |
-
// Make sure we're back where we started
|
11 |
-
wp_reset_postdata();
|
12 |
-
|
13 |
?>
|
14 |
|
15 |
<fieldset class="bbp-form" id="bbp-protected">
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
10 |
?>
|
11 |
|
12 |
<fieldset class="bbp-form" id="bbp-protected">
|
bbp-themes/bbp-twentyten/bbpress/form-reply.php
CHANGED
@@ -7,9 +7,6 @@
|
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
10 |
-
// Make sure we're back where we started
|
11 |
-
wp_reset_postdata();
|
12 |
-
|
13 |
?>
|
14 |
|
15 |
<?php if ( bbp_is_reply_edit() ) : ?>
|
@@ -18,130 +15,134 @@ wp_reset_postdata();
|
|
18 |
|
19 |
<?php endif; ?>
|
20 |
|
21 |
-
<?php if (
|
22 |
|
23 |
-
|
24 |
|
25 |
-
<
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
<fieldset class="bbp-form">
|
29 |
-
<legend><?php printf( __( 'Reply to: “%s”', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
|
30 |
|
31 |
-
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
<p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
|
35 |
-
</div>
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
<p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
|
43 |
-
</div>
|
44 |
|
45 |
-
|
|
|
|
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
54 |
|
55 |
-
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
|
59 |
-
<p>
|
60 |
-
<label
|
61 |
-
<
|
62 |
</p>
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
|
71 |
-
|
72 |
|
73 |
<p>
|
74 |
-
<label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
|
75 |
-
<input id="bbp_topic_tags" type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" />
|
76 |
-
</p>
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
<
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
|
100 |
-
|
101 |
-
<legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
|
102 |
-
<div>
|
103 |
-
<input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
|
104 |
-
<label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
|
105 |
-
</div>
|
106 |
|
107 |
-
|
108 |
-
<label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
|
109 |
-
<input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
|
110 |
-
</div>
|
111 |
-
</fieldset>
|
112 |
|
113 |
-
|
114 |
|
115 |
-
|
|
|
|
|
|
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
</div>
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
-
|
|
|
128 |
</div>
|
|
|
129 |
|
130 |
-
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
</div>
|
136 |
</div>
|
137 |
-
|
138 |
-
<?php endif; ?>
|
139 |
|
140 |
<?php else : ?>
|
141 |
|
142 |
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
|
143 |
<div class="bbp-template-notice">
|
144 |
-
<p><?php _e( '
|
145 |
</div>
|
146 |
</div>
|
147 |
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
10 |
?>
|
11 |
|
12 |
<?php if ( bbp_is_reply_edit() ) : ?>
|
15 |
|
16 |
<?php endif; ?>
|
17 |
|
18 |
+
<?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
|
19 |
|
20 |
+
<div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form">
|
21 |
|
22 |
+
<form id="new-post" name="new-post" method="post" action="">
|
23 |
+
<fieldset class="bbp-form">
|
24 |
+
<legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
|
25 |
|
26 |
+
<?php if ( !bbp_is_topic_open() && !bbp_is_reply_edit() ) : ?>
|
|
|
|
|
27 |
|
28 |
+
<div class="bbp-template-notice">
|
29 |
+
<p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
|
30 |
+
</div>
|
31 |
|
32 |
+
<?php endif; ?>
|
|
|
|
|
33 |
|
34 |
+
<?php if ( current_user_can( 'unfiltered_html' ) ) : ?>
|
35 |
|
36 |
+
<div class="bbp-template-notice">
|
37 |
+
<p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
|
38 |
+
</div>
|
39 |
|
40 |
+
<?php endif; ?>
|
|
|
|
|
41 |
|
42 |
+
<?php do_action( 'bbp_template_notices' ); ?>
|
43 |
+
|
44 |
+
<div>
|
45 |
|
46 |
+
<div class="avatar">
|
47 |
|
48 |
+
<?php bbp_is_reply_edit() ? bbp_reply_author_avatar( bbp_get_reply_id(), 120 ) : bbp_current_user_avatar( 120 ); ?>
|
49 |
|
50 |
+
</div>
|
51 |
|
52 |
+
<?php bbp_get_template_part( 'bbpress/form', 'anonymous' ); ?>
|
53 |
|
54 |
+
<p>
|
55 |
+
<label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br />
|
56 |
+
<textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" cols="51" rows="6"><?php bbp_form_reply_content(); ?></textarea>
|
57 |
+
</p>
|
58 |
|
59 |
+
<?php if ( !current_user_can( 'unfiltered_html' ) ) : ?>
|
60 |
|
61 |
+
<p class="form-allowed-tags">
|
62 |
+
<label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
|
63 |
+
<code><?php bbp_allowed_tags(); ?></code>
|
64 |
</p>
|
65 |
|
66 |
+
<?php endif; ?>
|
67 |
|
68 |
+
<p>
|
69 |
+
<label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
|
70 |
+
<input id="bbp_topic_tags" type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" />
|
71 |
+
</p>
|
72 |
|
73 |
+
<?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) : ?>
|
74 |
|
75 |
<p>
|
|
|
|
|
|
|
76 |
|
77 |
+
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" />
|
78 |
|
79 |
+
<?php if ( bbp_is_reply_edit() && $post->post_author != bbp_get_current_user_id() ) : ?>
|
80 |
|
81 |
+
<label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
|
82 |
|
83 |
+
<?php else : ?>
|
84 |
|
85 |
+
<label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
|
86 |
|
87 |
+
<?php endif; ?>
|
88 |
|
89 |
+
</p>
|
90 |
|
91 |
+
<?php endif; ?>
|
92 |
|
93 |
+
<?php if ( bbp_is_reply_edit() ) : ?>
|
94 |
|
95 |
+
<fieldset class="bbp-form">
|
96 |
+
<legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
|
97 |
+
<div>
|
98 |
+
<input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
|
99 |
+
<label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
|
100 |
+
</div>
|
101 |
|
102 |
+
<div>
|
103 |
+
<label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
|
104 |
+
<input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
|
105 |
+
</div>
|
106 |
+
</fieldset>
|
107 |
|
108 |
+
<?php else : ?>
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
+
<?php bbp_topic_admin_links(); ?>
|
|
|
|
|
|
|
|
|
111 |
|
112 |
+
<?php endif; ?>
|
113 |
|
114 |
+
<div class="bbp-submit-wrapper">
|
115 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
|
119 |
+
<?php bbp_reply_form_fields(); ?>
|
120 |
|
121 |
+
</fieldset>
|
122 |
+
</form>
|
123 |
+
</div>
|
|
|
124 |
|
125 |
+
<?php elseif ( bbp_is_topic_closed() ) : ?>
|
126 |
|
127 |
+
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
|
128 |
+
<div class="bbp-template-notice">
|
129 |
+
<p><?php printf( __( 'The topic ‘%s’ is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></p>
|
130 |
</div>
|
131 |
+
</div>
|
132 |
|
133 |
+
<?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?>
|
134 |
|
135 |
+
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
|
136 |
+
<div class="bbp-template-notice">
|
137 |
+
<p><?php printf( __( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p>
|
|
|
138 |
</div>
|
139 |
+
</div>
|
|
|
140 |
|
141 |
<?php else : ?>
|
142 |
|
143 |
<div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
|
144 |
<div class="bbp-template-notice">
|
145 |
+
<p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>
|
146 |
</div>
|
147 |
</div>
|
148 |
|
bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
|
34 |
<div>
|
35 |
<label for="tag-name"><?php _e( 'Name:', 'bbpress' ); ?></label>
|
36 |
-
<input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr(
|
37 |
</div>
|
38 |
|
39 |
<div>
|
@@ -44,7 +44,7 @@
|
|
44 |
<div class="bbp-submit-wrapper">
|
45 |
<input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Update', 'bbpress' ); ?>" /><br />
|
46 |
|
47 |
-
<input type="hidden" name="tag-id" value="<?php
|
48 |
<input type="hidden" name="action" value="bbp-update-topic-tag" />
|
49 |
|
50 |
<?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?>
|
33 |
|
34 |
<div>
|
35 |
<label for="tag-name"><?php _e( 'Name:', 'bbpress' ); ?></label>
|
36 |
+
<input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( bbp_get_topic_tag_name() ); ?>" />
|
37 |
</div>
|
38 |
|
39 |
<div>
|
44 |
<div class="bbp-submit-wrapper">
|
45 |
<input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Update', 'bbpress' ); ?>" /><br />
|
46 |
|
47 |
+
<input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
|
48 |
<input type="hidden" name="action" value="bbp-update-topic-tag" />
|
49 |
|
50 |
<?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?>
|
bbp-themes/bbp-twentyten/bbpress/form-topic.php
CHANGED
@@ -7,12 +7,9 @@
|
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
10 |
-
// Make sure we're back where we started
|
11 |
-
wp_reset_postdata();
|
12 |
-
|
13 |
?>
|
14 |
|
15 |
-
<?php if ( !
|
16 |
|
17 |
<?php bbp_breadcrumb(); ?>
|
18 |
|
@@ -36,9 +33,9 @@ wp_reset_postdata();
|
|
36 |
|
37 |
<?php
|
38 |
if ( bbp_is_topic_edit() )
|
39 |
-
printf( __( '
|
40 |
else
|
41 |
-
|
42 |
?>
|
43 |
|
44 |
</legend>
|
@@ -94,7 +91,7 @@ wp_reset_postdata();
|
|
94 |
<input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" />
|
95 |
</p>
|
96 |
|
97 |
-
<?php if ( !
|
98 |
|
99 |
<p>
|
100 |
<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
|
@@ -165,7 +162,7 @@ wp_reset_postdata();
|
|
165 |
|
166 |
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
|
167 |
<div class="bbp-template-notice">
|
168 |
-
<p><?php
|
169 |
</div>
|
170 |
</div>
|
171 |
|
7 |
* @subpackage Theme
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
10 |
?>
|
11 |
|
12 |
+
<?php if ( !bbp_is_single_forum() ) : ?>
|
13 |
|
14 |
<?php bbp_breadcrumb(); ?>
|
15 |
|
33 |
|
34 |
<?php
|
35 |
if ( bbp_is_topic_edit() )
|
36 |
+
printf( __( 'Now Editing “%s”', 'bbpress' ), bbp_get_topic_title() );
|
37 |
else
|
38 |
+
bbp_is_single_forum() ? printf( __( 'Create New Topic in “%s”', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Topic', 'bbpress' );
|
39 |
?>
|
40 |
|
41 |
</legend>
|
91 |
<input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" />
|
92 |
</p>
|
93 |
|
94 |
+
<?php if ( !bbp_is_single_forum() ) : ?>
|
95 |
|
96 |
<p>
|
97 |
<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
|
162 |
|
163 |
<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
|
164 |
<div class="bbp-template-notice">
|
165 |
+
<p><?php printf( __( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
|
166 |
</div>
|
167 |
</div>
|
168 |
|
bbp-themes/bbp-twentyten/bbpress/form-user-edit.php
CHANGED
@@ -102,7 +102,7 @@
|
|
102 |
</div>
|
103 |
|
104 |
<div>
|
105 |
-
<label for="email"><?php _e( '
|
106 |
|
107 |
<input type="text" name="email" id="email" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_email' ) ); ?>" class="regular-text" />
|
108 |
|
102 |
</div>
|
103 |
|
104 |
<div>
|
105 |
+
<label for="email"><?php _e( 'Email', 'bbpress' ); ?></label>
|
106 |
|
107 |
<input type="text" name="email" id="email" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_email' ) ); ?>" class="regular-text" />
|
108 |
|
bbp-themes/bbp-twentyten/bbpress/form-user-login.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
13 |
<fieldset class="bbp-form">
|
14 |
-
<legend><?php _e( '
|
15 |
|
16 |
<div class="bbp-username">
|
17 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
|
@@ -32,7 +32,7 @@
|
|
32 |
|
33 |
<?php do_action( 'login_form' ); ?>
|
34 |
|
35 |
-
<input type="submit" name="user-submit" value="<?php _e( '
|
36 |
|
37 |
<?php bbp_user_login_fields(); ?>
|
38 |
|
11 |
|
12 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
13 |
<fieldset class="bbp-form">
|
14 |
+
<legend><?php _e( 'Log In', 'bbpress' ); ?></legend>
|
15 |
|
16 |
<div class="bbp-username">
|
17 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label>
|
32 |
|
33 |
<?php do_action( 'login_form' ); ?>
|
34 |
|
35 |
+
<input type="submit" name="user-submit" value="<?php _e( 'Log In', 'bbpress' ); ?>" tabindex="<?php bbp_tab_index(); ?>" class="user-submit" />
|
36 |
|
37 |
<?php bbp_user_login_fields(); ?>
|
38 |
|
bbp-themes/bbp-twentyten/bbpress/form-user-register.php
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
</div>
|
26 |
|
27 |
<div class="bbp-email">
|
28 |
-
<label for="user_email"><?php _e( 'Email
|
29 |
<input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" tabindex="<?php bbp_tab_index(); ?>" />
|
30 |
</div>
|
31 |
|
25 |
</div>
|
26 |
|
27 |
<div class="bbp-email">
|
28 |
+
<label for="user_email"><?php _e( 'Email', 'bbpress' ); ?>: </label>
|
29 |
<input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" tabindex="<?php bbp_tab_index(); ?>" />
|
30 |
</div>
|
31 |
|
bbp-themes/bbp-twentyten/bbpress/loop-topics.php
CHANGED
@@ -41,7 +41,7 @@
|
|
41 |
|
42 |
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
|
43 |
|
44 |
-
<?php if ( !
|
45 |
|
46 |
<span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
|
47 |
|
41 |
|
42 |
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
|
43 |
|
44 |
+
<?php if ( !bbp_is_single_forum() || ( bbp_get_topic_forum_id() != bbp_get_forum_id() ) ) : ?>
|
45 |
|
46 |
<span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
|
47 |
|
bbp-themes/bbp-twentyten/bbpress/user-posts.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* User blog posts
|
5 |
-
*
|
6 |
-
* @package bbPress
|
7 |
-
* @subpackage Theme
|
8 |
-
*/
|
9 |
-
|
10 |
-
?>
|
11 |
-
|
12 |
-
<div id="bbp-author-blog-posts" class="bbp-author-blog-posts">
|
13 |
-
<hr />
|
14 |
-
<h2 class="entry-title"><?php _e( 'Blog Posts', 'bbpress' ); ?></h2>
|
15 |
-
|
16 |
-
<div class="entry-content">
|
17 |
-
|
18 |
-
<?php rewind_posts(); ?>
|
19 |
-
|
20 |
-
<?php bbp_get_template_part( 'bbpress/loop', 'author' ); ?>
|
21 |
-
|
22 |
-
</div>
|
23 |
-
</div><!-- #bbp-author-blog-posts -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bbp-themes/bbp-twentyten/css/bbpress-rtl.css
CHANGED
@@ -128,7 +128,7 @@ span.bbp-author-ip {
|
|
128 |
}
|
129 |
#content .bbp-topic-author,
|
130 |
#content .bbp-reply-author {
|
131 |
-
padding: 20px 0 20px 20px
|
132 |
width: 90px;
|
133 |
text-align: center;
|
134 |
vertical-align: top;
|
@@ -522,7 +522,7 @@ div.bbp-template-notice a {
|
|
522 |
.bbp-topics-front tr.super-sticky td,
|
523 |
.bbp-topics tr.super-sticky td,
|
524 |
.bbp-topics tr.sticky td,
|
525 |
-
.bbp-forum-
|
526 |
background-color: #ffffe0 !important;
|
527 |
font-size: 1.1em;
|
528 |
}
|
@@ -619,4 +619,17 @@ div.bbp-template-notice a {
|
|
619 |
|
620 |
fieldset div.avatar {
|
621 |
float: left;
|
622 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
#content .bbp-topic-author,
|
130 |
#content .bbp-reply-author {
|
131 |
+
padding: 20px 0 20px 20px;
|
132 |
width: 90px;
|
133 |
text-align: center;
|
134 |
vertical-align: top;
|
522 |
.bbp-topics-front tr.super-sticky td,
|
523 |
.bbp-topics tr.super-sticky td,
|
524 |
.bbp-topics tr.sticky td,
|
525 |
+
.bbp-forum-content tr.sticky td {
|
526 |
background-color: #ffffe0 !important;
|
527 |
font-size: 1.1em;
|
528 |
}
|
619 |
|
620 |
fieldset div.avatar {
|
621 |
float: left;
|
622 |
+
}
|
623 |
+
|
624 |
+
/* =BuddyPress Activity Streams
|
625 |
+
-------------------------------------------------------------- */
|
626 |
+
|
627 |
+
.activity-list li.bbp_topic_create .activity-content .activity-inner,
|
628 |
+
.activity-list li.bbp_relsy_create .activity-content .activity-inner {
|
629 |
+
border-left: none;
|
630 |
+
margin-left: 0;
|
631 |
+
padding-left: 0;
|
632 |
+
border-right: 2px solid #EAEAEA;
|
633 |
+
margin-right: 5px;
|
634 |
+
padding-right: 10px;
|
635 |
+
}
|
bbp-themes/bbp-twentyten/css/bbpress.css
CHANGED
@@ -29,6 +29,7 @@
|
|
29 |
#main table.bbp-forums,
|
30 |
#main table.bbp-replies {
|
31 |
clear: left;
|
|
|
32 |
}
|
33 |
|
34 |
/* =Breadcrumb and Tags
|
@@ -92,6 +93,7 @@ table.bbp-topic th span, table.bbp-replies th span {
|
|
92 |
#content th.bbp-topic-author,
|
93 |
#content th.bbp-reply-author {
|
94 |
text-align: center;
|
|
|
95 |
}
|
96 |
#content th.bbp-topic-content,
|
97 |
#content th.bbp-reply-content {
|
@@ -117,6 +119,10 @@ span.bbp-author-ip {
|
|
117 |
color: #aaa;
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
120 |
#content .bbp-forum-topic-count,
|
121 |
#content .bbp-forum-reply-count,
|
122 |
#content .bbp-topic-reply-count,
|
@@ -128,15 +134,18 @@ span.bbp-author-ip {
|
|
128 |
}
|
129 |
#content td.bbp-topic-author,
|
130 |
#content td.bbp-reply-author {
|
131 |
-
padding: 20px
|
132 |
-
width: 90px;
|
133 |
text-align: center;
|
134 |
vertical-align: top;
|
135 |
}
|
|
|
|
|
|
|
|
|
136 |
.bbp-topic-freshness,
|
137 |
.bbp-forum-freshness {
|
138 |
text-align: center;
|
139 |
-
width:
|
140 |
}
|
141 |
|
142 |
#content tbody .bbp-topic-content,
|
@@ -523,7 +532,7 @@ div.bbp-template-notice a {
|
|
523 |
.bbp-topics-front tr.super-sticky td,
|
524 |
.bbp-topics tr.super-sticky td,
|
525 |
.bbp-topics tr.sticky td,
|
526 |
-
.bbp-forum-
|
527 |
background-color: #ffffe0 !important;
|
528 |
font-size: 1.1em;
|
529 |
}
|
@@ -620,4 +629,14 @@ div.bbp-template-notice a {
|
|
620 |
|
621 |
fieldset div.avatar {
|
622 |
float: right;
|
623 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
#main table.bbp-forums,
|
30 |
#main table.bbp-replies {
|
31 |
clear: left;
|
32 |
+
table-layout: fixed;
|
33 |
}
|
34 |
|
35 |
/* =Breadcrumb and Tags
|
93 |
#content th.bbp-topic-author,
|
94 |
#content th.bbp-reply-author {
|
95 |
text-align: center;
|
96 |
+
width: 120px;
|
97 |
}
|
98 |
#content th.bbp-topic-content,
|
99 |
#content th.bbp-reply-content {
|
119 |
color: #aaa;
|
120 |
}
|
121 |
|
122 |
+
#content .bbp-forum-info {
|
123 |
+
width: 55%;
|
124 |
+
text-align: left;
|
125 |
+
}
|
126 |
#content .bbp-forum-topic-count,
|
127 |
#content .bbp-forum-reply-count,
|
128 |
#content .bbp-topic-reply-count,
|
134 |
}
|
135 |
#content td.bbp-topic-author,
|
136 |
#content td.bbp-reply-author {
|
137 |
+
padding: 20px;
|
|
|
138 |
text-align: center;
|
139 |
vertical-align: top;
|
140 |
}
|
141 |
+
.bbp-topic-title {
|
142 |
+
width: 55%;
|
143 |
+
text-align: left;
|
144 |
+
}
|
145 |
.bbp-topic-freshness,
|
146 |
.bbp-forum-freshness {
|
147 |
text-align: center;
|
148 |
+
width: 25%;
|
149 |
}
|
150 |
|
151 |
#content tbody .bbp-topic-content,
|
532 |
.bbp-topics-front tr.super-sticky td,
|
533 |
.bbp-topics tr.super-sticky td,
|
534 |
.bbp-topics tr.sticky td,
|
535 |
+
.bbp-forum-content tr.sticky td {
|
536 |
background-color: #ffffe0 !important;
|
537 |
font-size: 1.1em;
|
538 |
}
|
629 |
|
630 |
fieldset div.avatar {
|
631 |
float: right;
|
632 |
+
}
|
633 |
+
|
634 |
+
/* =BuddyPress Activity Streams
|
635 |
+
-------------------------------------------------------------- */
|
636 |
+
|
637 |
+
.activity-list li.bbp_topic_create .activity-content .activity-inner,
|
638 |
+
.activity-list li.bbp_reply_create .activity-content .activity-inner {
|
639 |
+
border-left: 2px solid #EAEAEA;
|
640 |
+
margin-left: 5px;
|
641 |
+
padding-left: 10px;
|
642 |
+
}
|
bbp-themes/bbp-twentyten/functions.php
CHANGED
@@ -30,118 +30,33 @@ if ( !function_exists( 'bbp_twentyten_enqueue_styles' ) ) :
|
|
30 |
*
|
31 |
* @since bbPress (r2652)
|
32 |
*
|
33 |
-
* @uses is_admin() To check if it's the admin section
|
34 |
* @uses wp_enqueue_style() To enqueue the styles
|
35 |
*/
|
36 |
function bbp_twentyten_enqueue_styles () {
|
37 |
-
|
38 |
-
|
39 |
|
40 |
// Right to left
|
41 |
if ( is_rtl() ) {
|
42 |
|
43 |
// TwentyTen
|
44 |
-
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '',
|
45 |
-
wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten',
|
46 |
|
47 |
// bbPress specific
|
48 |
-
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress-rtl.css', 'twentyten-rtl',
|
49 |
|
50 |
// Left to right
|
51 |
} else {
|
52 |
|
53 |
// TwentyTen
|
54 |
-
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '',
|
55 |
|
56 |
// bbPress specific
|
57 |
-
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten',
|
58 |
-
}
|
59 |
-
}
|
60 |
-
add_action( 'init', 'bbp_twentyten_enqueue_styles' );
|
61 |
-
endif;
|
62 |
-
|
63 |
-
if ( !function_exists( 'bbp_twentyten_dim_favorite' ) ) :
|
64 |
-
/**
|
65 |
-
* Add or remove a topic from a user's favorites
|
66 |
-
*
|
67 |
-
* @since bbPress (r2652)
|
68 |
-
*
|
69 |
-
* @uses bbp_get_current_user_id() To get the current user id
|
70 |
-
* @uses current_user_can() To check if the current user can edit the user
|
71 |
-
* @uses bbp_get_topic() To get the topic
|
72 |
-
* @uses check_ajax_referer() To verify the nonce & check the referer
|
73 |
-
* @uses bbp_is_user_favorite() To check if the topic is user's favorite
|
74 |
-
* @uses bbp_remove_user_favorite() To remove the topic from user's favorites
|
75 |
-
* @uses bbp_add_user_favorite() To add the topic from user's favorites
|
76 |
-
*/
|
77 |
-
function bbp_twentyten_dim_favorite () {
|
78 |
-
$user_id = bbp_get_current_user_id();
|
79 |
-
$id = intval( $_POST['id'] );
|
80 |
-
|
81 |
-
if ( !current_user_can( 'edit_user', $user_id ) )
|
82 |
-
die( '-1' );
|
83 |
-
|
84 |
-
if ( !$topic = bbp_get_topic( $id ) )
|
85 |
-
die( '0' );
|
86 |
-
|
87 |
-
check_ajax_referer( "toggle-favorite_$topic->ID" );
|
88 |
-
|
89 |
-
if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {
|
90 |
-
if ( bbp_remove_user_favorite( $user_id, $topic->ID ) )
|
91 |
-
die( '1' );
|
92 |
-
} else {
|
93 |
-
if ( bbp_add_user_favorite( $user_id, $topic->ID ) )
|
94 |
-
die( '1' );
|
95 |
}
|
96 |
-
|
97 |
-
die( '0' );
|
98 |
}
|
99 |
-
add_action( '
|
100 |
-
endif;
|
101 |
-
|
102 |
-
if ( !function_exists( 'bbp_twentyten_dim_subscription' ) ) :
|
103 |
-
/**
|
104 |
-
* Subscribe/Unsubscribe a user from a topic
|
105 |
-
*
|
106 |
-
* @since bbPress (r2668)
|
107 |
-
*
|
108 |
-
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
109 |
-
* @uses bbp_get_current_user_id() To get the current user id
|
110 |
-
* @uses current_user_can() To check if the current user can edit the user
|
111 |
-
* @uses bbp_get_topic() To get the topic
|
112 |
-
* @uses check_ajax_referer() To verify the nonce & check the referer
|
113 |
-
* @uses bbp_is_user_subscribed() To check if the topic is in user's
|
114 |
-
* subscriptions
|
115 |
-
* @uses bbp_remove_user_subscriptions() To remove the topic from user's
|
116 |
-
* subscriptions
|
117 |
-
* @uses bbp_add_user_subscriptions() To add the topic from user's subscriptions
|
118 |
-
*/
|
119 |
-
function bbp_twentyten_dim_subscription () {
|
120 |
-
if ( !bbp_is_subscriptions_active() )
|
121 |
-
return;
|
122 |
-
|
123 |
-
$user_id = bbp_get_current_user_id();
|
124 |
-
$id = intval( $_POST['id'] );
|
125 |
-
|
126 |
-
if ( !current_user_can( 'edit_user', $user_id ) )
|
127 |
-
die( '-1' );
|
128 |
-
|
129 |
-
if ( !$topic = bbp_get_topic( $id ) )
|
130 |
-
die( '0' );
|
131 |
-
|
132 |
-
check_ajax_referer( "toggle-subscription_$topic->ID" );
|
133 |
-
|
134 |
-
if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
|
135 |
-
if ( bbp_remove_user_subscription( $user_id, $topic->ID ) )
|
136 |
-
die( '1' );
|
137 |
-
} else {
|
138 |
-
if ( bbp_add_user_subscription( $user_id, $topic->ID ) )
|
139 |
-
die( '1' );
|
140 |
-
}
|
141 |
-
|
142 |
-
die( '0' );
|
143 |
-
}
|
144 |
-
add_action( 'wp_ajax_dim-subscription', 'bbp_twentyten_dim_subscription' );
|
145 |
endif;
|
146 |
|
147 |
if ( !function_exists( 'bbp_twentyten_enqueue_scripts' ) ) :
|
@@ -150,19 +65,22 @@ if ( !function_exists( 'bbp_twentyten_enqueue_scripts' ) ) :
|
|
150 |
*
|
151 |
* @since bbPress (r2652)
|
152 |
*
|
153 |
-
* @uses
|
154 |
* @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
|
155 |
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
156 |
* @uses wp_enqueue_script() To enqueue the scripts
|
157 |
*/
|
158 |
function bbp_twentyten_enqueue_scripts () {
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
161 |
|
162 |
if ( bbp_is_single_user_edit() )
|
163 |
wp_enqueue_script( 'user-profile' );
|
164 |
}
|
165 |
-
add_action( '
|
166 |
endif;
|
167 |
|
168 |
if ( !function_exists( 'bbp_twentyten_scripts' ) ) :
|
@@ -171,12 +89,12 @@ if ( !function_exists( 'bbp_twentyten_scripts' ) ) :
|
|
171 |
*
|
172 |
* @since bbPress (r2652)
|
173 |
*
|
174 |
-
* @uses
|
175 |
* @uses admin_url() To get the admin url
|
176 |
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
177 |
*/
|
178 |
function bbp_twentyten_scripts () {
|
179 |
-
if (
|
180 |
|
181 |
<script type='text/javascript'>
|
182 |
/* <![CDATA[ */
|
@@ -195,7 +113,7 @@ function bbp_twentyten_scripts () {
|
|
195 |
<?php
|
196 |
endif;
|
197 |
}
|
198 |
-
add_filter( '
|
199 |
endif;
|
200 |
|
201 |
if ( !function_exists( 'bbp_twentyten_topic_script_localization' ) ) :
|
@@ -206,7 +124,7 @@ if ( !function_exists( 'bbp_twentyten_topic_script_localization' ) ) :
|
|
206 |
*
|
207 |
* @since bbPress (r2652)
|
208 |
*
|
209 |
-
* @uses
|
210 |
* @uses bbp_get_current_user_id() To get the current user id
|
211 |
* @uses bbp_get_topic_id() To get the topic id
|
212 |
* @uses bbp_get_favorites_permalink() To get the favorites permalink
|
@@ -217,7 +135,7 @@ if ( !function_exists( 'bbp_twentyten_topic_script_localization' ) ) :
|
|
217 |
* @uses wp_localize_script() To localize the script
|
218 |
*/
|
219 |
function bbp_twentyten_topic_script_localization () {
|
220 |
-
if ( !
|
221 |
return;
|
222 |
|
223 |
$user_id = bbp_get_current_user_id();
|
@@ -225,20 +143,28 @@ function bbp_twentyten_topic_script_localization () {
|
|
225 |
$localizations = array(
|
226 |
'currentUserId' => $user_id,
|
227 |
'topicId' => bbp_get_topic_id(),
|
228 |
-
'favoritesLink' => bbp_get_favorites_permalink( $user_id ),
|
229 |
-
'isFav' => (int) bbp_is_user_favorite( $user_id ),
|
230 |
-
'favLinkYes' => __( 'favorites', 'bbpress' ),
|
231 |
-
'favLinkNo' => __( '?', 'bbpress' ),
|
232 |
-
'favYes' => __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' ),
|
233 |
-
'favNo' => __( '%favAdd% (%favLinkNo%)', 'bbpress' ),
|
234 |
-
'favDel' => __( '×', 'bbpress' ),
|
235 |
-
'favAdd' => __( 'Add this topic to your favorites', 'bbpress' )
|
236 |
);
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
if ( bbp_is_subscriptions_active() ) {
|
239 |
$localizations['subsActive'] = 1;
|
240 |
$localizations['isSubscribed'] = (int) bbp_is_user_subscribed( $user_id );
|
241 |
-
$localizations['subsSub'] = __( 'Subscribe',
|
242 |
$localizations['subsUns'] = __( 'Unsubscribe', 'bbpress' );
|
243 |
$localizations['subsLink'] = bbp_get_topic_permalink();
|
244 |
} else {
|
@@ -247,7 +173,91 @@ function bbp_twentyten_topic_script_localization () {
|
|
247 |
|
248 |
wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );
|
249 |
}
|
250 |
-
add_filter( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
endif;
|
252 |
|
253 |
?>
|
30 |
*
|
31 |
* @since bbPress (r2652)
|
32 |
*
|
|
|
33 |
* @uses wp_enqueue_style() To enqueue the styles
|
34 |
*/
|
35 |
function bbp_twentyten_enqueue_styles () {
|
36 |
+
|
37 |
+
$version = '20110807b';
|
38 |
|
39 |
// Right to left
|
40 |
if ( is_rtl() ) {
|
41 |
|
42 |
// TwentyTen
|
43 |
+
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $version, 'screen' );
|
44 |
+
wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten', $version, 'screen' );
|
45 |
|
46 |
// bbPress specific
|
47 |
+
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress-rtl.css', 'twentyten-rtl', $version, 'screen' );
|
48 |
|
49 |
// Left to right
|
50 |
} else {
|
51 |
|
52 |
// TwentyTen
|
53 |
+
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $version, 'screen' );
|
54 |
|
55 |
// bbPress specific
|
56 |
+
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten', $version, 'screen' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
|
|
|
|
58 |
}
|
59 |
+
add_action( 'bbp_enqueue_scripts', 'bbp_twentyten_enqueue_styles' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
endif;
|
61 |
|
62 |
if ( !function_exists( 'bbp_twentyten_enqueue_scripts' ) ) :
|
65 |
*
|
66 |
* @since bbPress (r2652)
|
67 |
*
|
68 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
69 |
* @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
|
70 |
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
71 |
* @uses wp_enqueue_script() To enqueue the scripts
|
72 |
*/
|
73 |
function bbp_twentyten_enqueue_scripts () {
|
74 |
+
|
75 |
+
$version = '20110807b';
|
76 |
+
|
77 |
+
if ( bbp_is_single_topic() )
|
78 |
+
wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), $version );
|
79 |
|
80 |
if ( bbp_is_single_user_edit() )
|
81 |
wp_enqueue_script( 'user-profile' );
|
82 |
}
|
83 |
+
add_action( 'bbp_enqueue_scripts', 'bbp_twentyten_enqueue_scripts' );
|
84 |
endif;
|
85 |
|
86 |
if ( !function_exists( 'bbp_twentyten_scripts' ) ) :
|
89 |
*
|
90 |
* @since bbPress (r2652)
|
91 |
*
|
92 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
93 |
* @uses admin_url() To get the admin url
|
94 |
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
95 |
*/
|
96 |
function bbp_twentyten_scripts () {
|
97 |
+
if ( bbp_is_single_topic() ) : ?>
|
98 |
|
99 |
<script type='text/javascript'>
|
100 |
/* <![CDATA[ */
|
113 |
<?php
|
114 |
endif;
|
115 |
}
|
116 |
+
add_filter( 'bbp_head', 'bbp_twentyten_scripts', -1 );
|
117 |
endif;
|
118 |
|
119 |
if ( !function_exists( 'bbp_twentyten_topic_script_localization' ) ) :
|
124 |
*
|
125 |
* @since bbPress (r2652)
|
126 |
*
|
127 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
128 |
* @uses bbp_get_current_user_id() To get the current user id
|
129 |
* @uses bbp_get_topic_id() To get the topic id
|
130 |
* @uses bbp_get_favorites_permalink() To get the favorites permalink
|
135 |
* @uses wp_localize_script() To localize the script
|
136 |
*/
|
137 |
function bbp_twentyten_topic_script_localization () {
|
138 |
+
if ( !bbp_is_single_topic() )
|
139 |
return;
|
140 |
|
141 |
$user_id = bbp_get_current_user_id();
|
143 |
$localizations = array(
|
144 |
'currentUserId' => $user_id,
|
145 |
'topicId' => bbp_get_topic_id(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
);
|
147 |
|
148 |
+
// Favorites
|
149 |
+
if ( bbp_is_favorites_active() ) {
|
150 |
+
$localizations['favoritesActive'] = 1;
|
151 |
+
$localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id );
|
152 |
+
$localizations['isFav'] = (int) bbp_is_user_favorite( $user_id );
|
153 |
+
$localizations['favLinkYes'] = __( 'favorites', 'bbpress' );
|
154 |
+
$localizations['favLinkNo'] = __( '?', 'bbpress' );
|
155 |
+
$localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' );
|
156 |
+
$localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' );
|
157 |
+
$localizations['favDel'] = __( '×', 'bbpress' );
|
158 |
+
$localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' );
|
159 |
+
} else {
|
160 |
+
$localizations['favoritesActive'] = 0;
|
161 |
+
}
|
162 |
+
|
163 |
+
// Subscriptions
|
164 |
if ( bbp_is_subscriptions_active() ) {
|
165 |
$localizations['subsActive'] = 1;
|
166 |
$localizations['isSubscribed'] = (int) bbp_is_user_subscribed( $user_id );
|
167 |
+
$localizations['subsSub'] = __( 'Subscribe', 'bbpress' );
|
168 |
$localizations['subsUns'] = __( 'Unsubscribe', 'bbpress' );
|
169 |
$localizations['subsLink'] = bbp_get_topic_permalink();
|
170 |
} else {
|
173 |
|
174 |
wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );
|
175 |
}
|
176 |
+
add_filter( 'bbp_enqueue_scripts', 'bbp_twentyten_topic_script_localization' );
|
177 |
+
endif;
|
178 |
+
|
179 |
+
if ( !function_exists( 'bbp_twentyten_dim_favorite' ) ) :
|
180 |
+
/**
|
181 |
+
* Add or remove a topic from a user's favorites
|
182 |
+
*
|
183 |
+
* @since bbPress (r2652)
|
184 |
+
*
|
185 |
+
* @uses bbp_get_current_user_id() To get the current user id
|
186 |
+
* @uses current_user_can() To check if the current user can edit the user
|
187 |
+
* @uses bbp_get_topic() To get the topic
|
188 |
+
* @uses check_ajax_referer() To verify the nonce & check the referer
|
189 |
+
* @uses bbp_is_user_favorite() To check if the topic is user's favorite
|
190 |
+
* @uses bbp_remove_user_favorite() To remove the topic from user's favorites
|
191 |
+
* @uses bbp_add_user_favorite() To add the topic from user's favorites
|
192 |
+
*/
|
193 |
+
function bbp_twentyten_dim_favorite () {
|
194 |
+
$user_id = bbp_get_current_user_id();
|
195 |
+
$id = intval( $_POST['id'] );
|
196 |
+
|
197 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
198 |
+
die( '-1' );
|
199 |
+
|
200 |
+
if ( !$topic = bbp_get_topic( $id ) )
|
201 |
+
die( '0' );
|
202 |
+
|
203 |
+
check_ajax_referer( "toggle-favorite_$topic->ID" );
|
204 |
+
|
205 |
+
if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {
|
206 |
+
if ( bbp_remove_user_favorite( $user_id, $topic->ID ) )
|
207 |
+
die( '1' );
|
208 |
+
} else {
|
209 |
+
if ( bbp_add_user_favorite( $user_id, $topic->ID ) )
|
210 |
+
die( '1' );
|
211 |
+
}
|
212 |
+
|
213 |
+
die( '0' );
|
214 |
+
}
|
215 |
+
add_action( 'wp_ajax_dim-favorite', 'bbp_twentyten_dim_favorite' );
|
216 |
+
endif;
|
217 |
+
|
218 |
+
if ( !function_exists( 'bbp_twentyten_dim_subscription' ) ) :
|
219 |
+
/**
|
220 |
+
* Subscribe/Unsubscribe a user from a topic
|
221 |
+
*
|
222 |
+
* @since bbPress (r2668)
|
223 |
+
*
|
224 |
+
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
225 |
+
* @uses bbp_get_current_user_id() To get the current user id
|
226 |
+
* @uses current_user_can() To check if the current user can edit the user
|
227 |
+
* @uses bbp_get_topic() To get the topic
|
228 |
+
* @uses check_ajax_referer() To verify the nonce & check the referer
|
229 |
+
* @uses bbp_is_user_subscribed() To check if the topic is in user's
|
230 |
+
* subscriptions
|
231 |
+
* @uses bbp_remove_user_subscriptions() To remove the topic from user's
|
232 |
+
* subscriptions
|
233 |
+
* @uses bbp_add_user_subscriptions() To add the topic from user's subscriptions
|
234 |
+
*/
|
235 |
+
function bbp_twentyten_dim_subscription () {
|
236 |
+
if ( !bbp_is_subscriptions_active() )
|
237 |
+
return;
|
238 |
+
|
239 |
+
$user_id = bbp_get_current_user_id();
|
240 |
+
$id = intval( $_POST['id'] );
|
241 |
+
|
242 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
243 |
+
die( '-1' );
|
244 |
+
|
245 |
+
if ( !$topic = bbp_get_topic( $id ) )
|
246 |
+
die( '0' );
|
247 |
+
|
248 |
+
check_ajax_referer( "toggle-subscription_$topic->ID" );
|
249 |
+
|
250 |
+
if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
|
251 |
+
if ( bbp_remove_user_subscription( $user_id, $topic->ID ) )
|
252 |
+
die( '1' );
|
253 |
+
} else {
|
254 |
+
if ( bbp_add_user_subscription( $user_id, $topic->ID ) )
|
255 |
+
die( '1' );
|
256 |
+
}
|
257 |
+
|
258 |
+
die( '0' );
|
259 |
+
}
|
260 |
+
add_action( 'wp_ajax_dim-subscription', 'bbp_twentyten_dim_subscription' );
|
261 |
endif;
|
262 |
|
263 |
?>
|
bbp-themes/bbp-twentyten/js/topic.js
CHANGED
@@ -5,6 +5,7 @@ bbpTopicJS = jQuery.extend( {
|
|
5 |
|
6 |
// Favorites
|
7 |
favoritesLink: '',
|
|
|
8 |
isFav: 0,
|
9 |
favLinkYes: 'favorites',
|
10 |
favLinkNo: '?',
|
@@ -22,22 +23,27 @@ bbpTopicJS = jQuery.extend( {
|
|
22 |
}, bbpTopicJS );
|
23 |
|
24 |
// Topic Global
|
25 |
-
bbpTopicJS.
|
26 |
-
bbpTopicJS.
|
27 |
-
bbpTopicJS.
|
|
|
28 |
|
29 |
// Run it
|
30 |
-
jQuery( function(
|
|
|
31 |
/** Favorites *************************************************************/
|
32 |
-
var favoritesToggle = $( '#favorite-toggle' )
|
33 |
-
.addClass( 'list:favorite' )
|
34 |
-
.wpList( { alt: '', dimAfter: favLinkSetup } );
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
function favLinkSetup() {
|
40 |
-
bbpTopicJS.isFav = favoritesToggleSpan.is('.is-favorite');
|
41 |
var aLink = "<a href='" + bbpTopicJS.favoritesLink + "'>";
|
42 |
var aDim = "<a href='" + favoritesToggleSpan.find( 'a[class^="dim:"]' ).attr( 'href' ) + "' class='dim:favorite-toggle:" + favoritesToggleSpan.attr( 'id' ) + ":is-favorite'>";
|
43 |
if ( bbpTopicJS.isFav ) {
|
@@ -54,6 +60,16 @@ jQuery( function($) {
|
|
54 |
}
|
55 |
|
56 |
/** Subscriptions *********************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
function subsLinkSetup() {
|
58 |
bbpTopicJS.isSubscribed = subscriptionToggleSpan.is( '.is-subscribed' );
|
59 |
var aLink = "<a href='" + bbpTopicJS.subsLink + "'>";
|
@@ -68,13 +84,4 @@ jQuery( function($) {
|
|
68 |
subscriptionToggleSpan.html( html );
|
69 |
subscriptionToggle.get(0).wpList.process( subscriptionToggle );
|
70 |
}
|
71 |
-
|
72 |
-
if ( bbpTopicJS.subsActive == 1 ) {
|
73 |
-
var subscriptionToggle = $( '#subscription-toggle' )
|
74 |
-
.addClass( 'list:subscription' )
|
75 |
-
.wpList( { alt: '', dimAfter: subsLinkSetup } );
|
76 |
-
|
77 |
-
var subscriptionToggleSpan = subscriptionToggle.children( 'span' )
|
78 |
-
[bbpTopicJS.isSubscribed ? 'addClass' : 'removeClass' ]( 'is-subscribed' );
|
79 |
-
}
|
80 |
} );
|
5 |
|
6 |
// Favorites
|
7 |
favoritesLink: '',
|
8 |
+
favoritesActive: 0,
|
9 |
isFav: 0,
|
10 |
favLinkYes: 'favorites',
|
11 |
favLinkNo: '?',
|
23 |
}, bbpTopicJS );
|
24 |
|
25 |
// Topic Global
|
26 |
+
bbpTopicJS.favoritesActive = parseInt( bbpTopicJS.favoritesActive );
|
27 |
+
bbpTopicJS.isFav = parseInt( bbpTopicJS.isFav );
|
28 |
+
bbpTopicJS.subsActive = parseInt( bbpTopicJS.subsActive );
|
29 |
+
bbpTopicJS.isSubscribed = parseInt( bbpTopicJS.isSubscribed );
|
30 |
|
31 |
// Run it
|
32 |
+
jQuery(document).ready( function() {
|
33 |
+
|
34 |
/** Favorites *************************************************************/
|
|
|
|
|
|
|
35 |
|
36 |
+
if ( 1 == bbpTopicJS.favoritesActive ) {
|
37 |
+
var favoritesToggle = jQuery( '#favorite-toggle' )
|
38 |
+
.addClass( 'list:favorite' )
|
39 |
+
.wpList( { alt: '', dimAfter: favLinkSetup } );
|
40 |
+
|
41 |
+
var favoritesToggleSpan = favoritesToggle.children( 'span' )
|
42 |
+
[bbpTopicJS.isFav ? 'addClass' : 'removeClass' ]( 'is-favorite' );
|
43 |
+
}
|
44 |
|
45 |
function favLinkSetup() {
|
46 |
+
bbpTopicJS.isFav = favoritesToggleSpan.is( '.is-favorite' );
|
47 |
var aLink = "<a href='" + bbpTopicJS.favoritesLink + "'>";
|
48 |
var aDim = "<a href='" + favoritesToggleSpan.find( 'a[class^="dim:"]' ).attr( 'href' ) + "' class='dim:favorite-toggle:" + favoritesToggleSpan.attr( 'id' ) + ":is-favorite'>";
|
49 |
if ( bbpTopicJS.isFav ) {
|
60 |
}
|
61 |
|
62 |
/** Subscriptions *********************************************************/
|
63 |
+
|
64 |
+
if ( 1 == bbpTopicJS.subsActive ) {
|
65 |
+
var subscriptionToggle = jQuery( '#subscription-toggle' )
|
66 |
+
.addClass( 'list:subscription' )
|
67 |
+
.wpList( { alt: '', dimAfter: subsLinkSetup } );
|
68 |
+
|
69 |
+
var subscriptionToggleSpan = subscriptionToggle.children( 'span' )
|
70 |
+
[bbpTopicJS.isSubscribed ? 'addClass' : 'removeClass' ]( 'is-subscribed' );
|
71 |
+
}
|
72 |
+
|
73 |
function subsLinkSetup() {
|
74 |
bbpTopicJS.isSubscribed = subscriptionToggleSpan.is( '.is-subscribed' );
|
75 |
var aLink = "<a href='" + bbpTopicJS.subsLink + "'>";
|
84 |
subscriptionToggleSpan.html( html );
|
85 |
subscriptionToggle.get(0).wpList.process( subscriptionToggle );
|
86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
} );
|
bbp-themes/bbp-twentyten/page-create-topic.php
CHANGED
@@ -24,8 +24,6 @@
|
|
24 |
|
25 |
<?php the_content(); ?>
|
26 |
|
27 |
-
<?php bbp_breadcrumb(); ?>
|
28 |
-
|
29 |
<?php bbp_get_template_part( 'bbpress/form', 'topic' ); ?>
|
30 |
|
31 |
</div>
|
24 |
|
25 |
<?php the_content(); ?>
|
26 |
|
|
|
|
|
27 |
<?php bbp_get_template_part( 'bbpress/form', 'topic' ); ?>
|
28 |
|
29 |
</div>
|
bbp-themes/bbp-twentyten/page-forum-statistics.php
CHANGED
@@ -66,23 +66,23 @@ extract( bbp_get_statistics(), EXTR_SKIP );
|
|
66 |
|
67 |
<?php endif; ?>
|
68 |
|
69 |
-
<?php if ( !empty( $
|
70 |
|
71 |
<dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
|
72 |
<dd>
|
73 |
<strong>
|
74 |
-
<abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $
|
75 |
</strong>
|
76 |
</dd>
|
77 |
|
78 |
<?php endif; ?>
|
79 |
|
80 |
-
<?php if ( !empty( $
|
81 |
|
82 |
<dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
|
83 |
<dd>
|
84 |
<strong>
|
85 |
-
<abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $
|
86 |
</strong>
|
87 |
</dd>
|
88 |
|
66 |
|
67 |
<?php endif; ?>
|
68 |
|
69 |
+
<?php if ( !empty( $topic_count_hidden ) ) : ?>
|
70 |
|
71 |
<dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
|
72 |
<dd>
|
73 |
<strong>
|
74 |
+
<abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $topic_count_hidden; ?></abbr>
|
75 |
</strong>
|
76 |
</dd>
|
77 |
|
78 |
<?php endif; ?>
|
79 |
|
80 |
+
<?php if ( !empty( $reply_count_hidden ) ) : ?>
|
81 |
|
82 |
<dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
|
83 |
<dd>
|
84 |
<strong>
|
85 |
+
<abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $reply_count_hidden; ?></abbr>
|
86 |
</strong>
|
87 |
</dd>
|
88 |
|
bbp-themes/bbp-twentyten/page-topic-tags.php
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
|
29 |
<div id="bbp-topic-hot-tags">
|
30 |
|
31 |
-
<?php wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' =>
|
32 |
|
33 |
</div>
|
34 |
|
28 |
|
29 |
<div id="bbp-topic-hot-tags">
|
30 |
|
31 |
+
<?php wp_tag_cloud( array( 'smallest' => 9, 'largest' => 38, 'number' => 80, 'taxonomy' => bbp_get_topic_tag_tax_id() ) ); ?>
|
32 |
|
33 |
</div>
|
34 |
|
bbp-themes/bbp-twentyten/single-forum.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
|
21 |
<?php if ( bbp_user_can_view_forum() ) : ?>
|
22 |
|
23 |
-
<div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-
|
24 |
<h1 class="entry-title"><?php bbp_forum_title(); ?></h1>
|
25 |
<div class="entry-content">
|
26 |
|
20 |
|
21 |
<?php if ( bbp_user_can_view_forum() ) : ?>
|
22 |
|
23 |
+
<div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-content">
|
24 |
<h1 class="entry-title"><?php bbp_forum_title(); ?></h1>
|
25 |
<div class="entry-content">
|
26 |
|
bbp-themes/bbp-twentyten/single-reply-edit.php
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
native
|
2 |
<?php
|
3 |
|
4 |
/**
|
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
bbp-themes/bbp-twentyten/single-topic-merge.php
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
native
|
2 |
<?php
|
3 |
|
4 |
/**
|
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Topic Tag Edit
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Theme
|
8 |
+
*/
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<?php get_header(); ?>
|
13 |
+
|
14 |
+
<div id="container">
|
15 |
+
<div id="content" role="main">
|
16 |
+
|
17 |
+
<?php do_action( 'bbp_template_notices' ); ?>
|
18 |
+
|
19 |
+
<div id="topic-tag" class="bbp-topic-tag">
|
20 |
+
<h1 class="entry-title"><?php printf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1>
|
21 |
+
|
22 |
+
<div class="entry-content">
|
23 |
+
|
24 |
+
<?php bbp_breadcrumb(); ?>
|
25 |
+
|
26 |
+
<?php bbp_topic_tag_description(); ?>
|
27 |
+
|
28 |
+
<?php do_action( 'bbp_template_before_topic_tag_edit' ); ?>
|
29 |
+
|
30 |
+
<?php bbp_get_template_part( 'bbpress/form', 'topic-tag' ); ?>
|
31 |
+
|
32 |
+
<?php do_action( 'bbp_template_after_topic_tag_edit' ); ?>
|
33 |
+
|
34 |
+
</div>
|
35 |
+
</div><!-- #topic-tag -->
|
36 |
+
</div><!-- #content -->
|
37 |
+
</div><!-- #container -->
|
38 |
+
|
39 |
+
<?php get_sidebar(); ?>
|
40 |
+
<?php get_footer(); ?>
|
bbp-themes/bbp-twentyten/taxonomy-topic-tag.php
CHANGED
@@ -35,8 +35,6 @@
|
|
35 |
|
36 |
<?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
|
37 |
|
38 |
-
<?php bbp_get_template_part( 'bbpress/form', 'topic-tag' ); ?>
|
39 |
-
|
40 |
<?php else : ?>
|
41 |
|
42 |
<?php bbp_get_template_part( 'bbpress/feedback', 'no-topics' ); ?>
|
35 |
|
36 |
<?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
|
37 |
|
|
|
|
|
38 |
<?php else : ?>
|
39 |
|
40 |
<?php bbp_get_template_part( 'bbpress/feedback', 'no-topics' ); ?>
|
bbpress.php
CHANGED
@@ -15,23 +15,12 @@
|
|
15 |
* Description: bbPress is forum software with a twist from the creators of WordPress.
|
16 |
* Author: The bbPress Community
|
17 |
* Author URI: http://bbpress.org
|
18 |
-
* Version: 2.0-
|
19 |
*/
|
20 |
|
21 |
// Exit if accessed directly
|
22 |
if ( !defined( 'ABSPATH' ) ) exit;
|
23 |
|
24 |
-
/**
|
25 |
-
* bbPress version
|
26 |
-
*
|
27 |
-
* Set the version early so other plugins have an inexpensive way to check if
|
28 |
-
* bbPress is already loaded.
|
29 |
-
*
|
30 |
-
* Note: Checking for defined( 'BBP_VERSION' ) in your code does NOT
|
31 |
-
* guarantee bbPress is initialized and listening.
|
32 |
-
*/
|
33 |
-
define( 'BBP_VERSION', '2.0-beta-3b' );
|
34 |
-
|
35 |
if ( !class_exists( 'bbPress' ) ) :
|
36 |
/**
|
37 |
* Main bbPress Class
|
@@ -39,236 +28,247 @@ if ( !class_exists( 'bbPress' ) ) :
|
|
39 |
* Tap tap tap... Is this thing on?
|
40 |
*
|
41 |
* @since bbPress (r2464)
|
42 |
-
* @todo Use BP_Component class
|
43 |
*/
|
44 |
class bbPress {
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
/** Post types ************************************************************/
|
47 |
|
48 |
/**
|
49 |
-
* @
|
50 |
*/
|
51 |
-
|
52 |
|
53 |
/**
|
54 |
-
* @
|
55 |
*/
|
56 |
-
|
57 |
|
58 |
/**
|
59 |
-
* @
|
60 |
*/
|
61 |
-
|
62 |
|
63 |
/** Taxonomies ************************************************************/
|
64 |
|
65 |
/**
|
66 |
-
* @
|
67 |
*/
|
68 |
-
|
69 |
|
70 |
/** Permastructs **********************************************************/
|
71 |
-
|
72 |
/**
|
73 |
-
* @
|
74 |
*/
|
75 |
-
|
76 |
-
|
77 |
/**
|
78 |
-
* @
|
79 |
*/
|
80 |
-
|
81 |
-
|
82 |
/**
|
83 |
-
* @
|
84 |
*/
|
85 |
-
|
86 |
-
|
87 |
/** Post statuses *********************************************************/
|
88 |
|
89 |
/**
|
90 |
-
* @
|
91 |
*/
|
92 |
-
|
93 |
|
94 |
/**
|
95 |
-
* @
|
96 |
*/
|
97 |
-
|
98 |
|
99 |
/**
|
100 |
-
* @
|
101 |
*/
|
102 |
-
|
103 |
|
104 |
/**
|
105 |
-
* @
|
106 |
*/
|
107 |
-
|
108 |
|
109 |
/**
|
110 |
-
* @
|
111 |
*/
|
112 |
-
|
113 |
|
114 |
/** Slugs *****************************************************************/
|
115 |
|
116 |
/**
|
117 |
-
* @
|
118 |
*/
|
119 |
-
|
120 |
|
121 |
/**
|
122 |
-
* @
|
123 |
*/
|
124 |
-
|
125 |
|
126 |
/**
|
127 |
-
* @
|
128 |
*/
|
129 |
-
|
130 |
|
131 |
/**
|
132 |
-
* @
|
133 |
*/
|
134 |
-
|
135 |
|
136 |
/**
|
137 |
-
* @
|
138 |
*/
|
139 |
-
|
140 |
|
141 |
/**
|
142 |
-
* @
|
143 |
*/
|
144 |
-
|
145 |
|
146 |
/**
|
147 |
-
* @
|
148 |
*/
|
149 |
-
|
150 |
|
151 |
/**
|
152 |
-
* @
|
153 |
*/
|
154 |
-
|
155 |
|
156 |
/** Paths *****************************************************************/
|
157 |
|
158 |
/**
|
159 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
160 |
*/
|
161 |
-
|
162 |
|
163 |
/**
|
164 |
-
* @
|
165 |
*/
|
166 |
-
|
167 |
|
168 |
/**
|
169 |
-
* @
|
170 |
*/
|
171 |
-
|
172 |
|
173 |
/** URLs ******************************************************************/
|
174 |
|
175 |
/**
|
176 |
-
* @
|
177 |
*/
|
178 |
-
|
179 |
|
180 |
/**
|
181 |
-
* @
|
182 |
*/
|
183 |
-
|
184 |
|
185 |
/** Current ID's **********************************************************/
|
186 |
|
187 |
/**
|
188 |
-
* @
|
189 |
*/
|
190 |
-
|
191 |
|
192 |
/**
|
193 |
-
* @
|
194 |
*/
|
195 |
-
|
196 |
|
197 |
/**
|
198 |
-
* @
|
199 |
*/
|
200 |
-
|
201 |
|
202 |
/** Users *****************************************************************/
|
203 |
|
204 |
/**
|
205 |
-
* @
|
206 |
*/
|
207 |
-
|
208 |
|
209 |
/**
|
210 |
-
* @
|
211 |
*/
|
212 |
-
|
213 |
|
214 |
/** Queries ***************************************************************/
|
215 |
|
216 |
/**
|
217 |
-
* @
|
218 |
*/
|
219 |
-
|
220 |
|
221 |
/**
|
222 |
-
* @
|
223 |
*/
|
224 |
-
|
225 |
|
226 |
/**
|
227 |
-
* @
|
228 |
*/
|
229 |
-
|
230 |
|
231 |
/** Arrays ****************************************************************/
|
232 |
|
233 |
/**
|
234 |
-
* @
|
235 |
*/
|
236 |
-
|
237 |
|
238 |
/** Errors ****************************************************************/
|
239 |
|
240 |
/**
|
241 |
-
* @
|
242 |
*/
|
243 |
-
|
244 |
|
245 |
/** Views *****************************************************************/
|
246 |
|
247 |
/**
|
248 |
-
* @
|
249 |
*/
|
250 |
-
|
251 |
|
252 |
/** Forms *****************************************************************/
|
253 |
|
254 |
/**
|
255 |
-
* @
|
256 |
*/
|
257 |
-
|
258 |
|
259 |
/** Theme Compat **********************************************************/
|
260 |
|
261 |
/**
|
262 |
-
* @
|
263 |
*/
|
264 |
-
|
|
|
|
|
265 |
|
266 |
-
/** Plugins ***************************************************************/
|
267 |
-
|
268 |
/**
|
269 |
-
* @
|
270 |
*/
|
271 |
-
|
272 |
|
273 |
/** Functions *************************************************************/
|
274 |
|
@@ -279,7 +279,7 @@ class bbPress {
|
|
279 |
*
|
280 |
* @uses bbPress::__construct() Setup the globals needed
|
281 |
*/
|
282 |
-
function bbPress() {
|
283 |
$this->__construct();
|
284 |
}
|
285 |
|
@@ -288,14 +288,14 @@ class bbPress {
|
|
288 |
*
|
289 |
* @since bbPress (r2464)
|
290 |
*
|
291 |
-
* @uses bbPress::
|
292 |
-
* @uses bbPress::
|
293 |
-
* @uses bbPress::
|
294 |
-
*/
|
295 |
-
function __construct() {
|
296 |
-
$this->
|
297 |
-
$this->
|
298 |
-
$this->
|
299 |
}
|
300 |
|
301 |
/**
|
@@ -308,17 +308,18 @@ class bbPress {
|
|
308 |
* @uses plugin_dir_url() To generate bbPress plugin url
|
309 |
* @uses apply_filters() Calls various filters
|
310 |
*/
|
311 |
-
function
|
312 |
|
313 |
/** Paths *************************************************************/
|
314 |
|
315 |
// bbPress root directory
|
316 |
$this->file = __FILE__;
|
|
|
317 |
$this->plugin_dir = plugin_dir_path( $this->file );
|
318 |
$this->plugin_url = plugin_dir_url ( $this->file );
|
319 |
|
320 |
// Themes
|
321 |
-
$this->themes_dir =
|
322 |
$this->themes_url = $this->plugin_url . 'bbp-themes';
|
323 |
|
324 |
// Languages
|
@@ -327,10 +328,10 @@ class bbPress {
|
|
327 |
/** Identifiers *******************************************************/
|
328 |
|
329 |
// Post type identifiers
|
330 |
-
$this->forum_post_type = apply_filters( 'bbp_forum_post_type',
|
331 |
-
$this->topic_post_type = apply_filters( 'bbp_topic_post_type',
|
332 |
-
$this->reply_post_type = apply_filters( 'bbp_reply_post_type',
|
333 |
-
$this->
|
334 |
|
335 |
// Status identifiers
|
336 |
$this->spam_status_id = apply_filters( 'bbp_spam_post_status', 'spam' );
|
@@ -340,10 +341,10 @@ class bbPress {
|
|
340 |
$this->trash_status_id = 'trash';
|
341 |
|
342 |
// Other identifiers
|
343 |
-
$this->user_id = apply_filters( '
|
344 |
-
$this->view_id = apply_filters( '
|
345 |
-
$this->edit_id = apply_filters( '
|
346 |
-
|
347 |
/** Slugs *************************************************************/
|
348 |
|
349 |
// Root forum slug
|
@@ -366,16 +367,22 @@ class bbPress {
|
|
366 |
$this->user_slug = apply_filters( 'bbp_user_slug', $prefix . get_option( '_bbp_user_slug', 'user' ) );
|
367 |
$this->view_slug = apply_filters( 'bbp_view_slug', $prefix . get_option( '_bbp_view_slug', 'view' ) );
|
368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
/** Misc **************************************************************/
|
370 |
|
371 |
// Errors
|
372 |
-
$this->errors
|
373 |
|
374 |
// Views
|
375 |
-
$this->views
|
376 |
|
377 |
// Tab Index
|
378 |
-
$this->tab_index
|
379 |
|
380 |
/** Cache *************************************************************/
|
381 |
|
@@ -391,50 +398,45 @@ class bbPress {
|
|
391 |
*
|
392 |
* @uses is_admin() If in WordPress admin, load additional file
|
393 |
*/
|
394 |
-
function
|
395 |
-
|
396 |
-
/** Individual files **************************************************/
|
397 |
|
398 |
-
|
399 |
-
'hooks', // All filters and actions
|
400 |
-
'options', // Configuration Options
|
401 |
-
'caps', // Roles and capabilities
|
402 |
-
'classes', // Common classes
|
403 |
-
'widgets', // Sidebar widgets
|
404 |
-
'shortcodes', // Shortcodes for use with pages and posts
|
405 |
-
'compatibility', // Theme compatibility for existing themes
|
406 |
-
'akismet' // Spam prevention for topics and replies
|
407 |
-
);
|
408 |
|
409 |
-
//
|
410 |
-
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
/** Components ********************************************************/
|
414 |
|
415 |
-
$
|
416 |
-
|
417 |
-
'forum', // Forums contain subforums, topics, and replies
|
418 |
-
'topic', // Topics contain replies
|
419 |
-
'reply', // Replies are individual responses to topics
|
420 |
-
'user' // Individual user profile view/edit pages
|
421 |
-
);
|
422 |
|
423 |
-
$
|
424 |
-
|
425 |
-
|
426 |
-
);
|
|
|
427 |
|
428 |
-
//
|
429 |
-
|
430 |
-
|
431 |
-
|
|
|
432 |
|
433 |
/** Admin *************************************************************/
|
434 |
|
435 |
// Quick admin check and load if needed
|
436 |
if ( is_admin() )
|
437 |
-
require( $this->plugin_dir . '
|
438 |
}
|
439 |
|
440 |
/**
|
@@ -447,43 +449,31 @@ class bbPress {
|
|
447 |
* @uses register_deactivation_hook() To register the deactivation hook
|
448 |
* @uses add_action() To add various actions
|
449 |
*/
|
450 |
-
function
|
451 |
|
452 |
// Register bbPress activation/deactivation sequences
|
453 |
-
register_activation_hook ( $this->file,
|
454 |
-
register_deactivation_hook( $this->file,
|
455 |
-
|
456 |
-
//
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
// Register the views
|
469 |
-
add_action( 'bbp_register_views', array( $this, 'register_views' ), 10 );
|
470 |
-
|
471 |
-
// Register the theme directory
|
472 |
-
add_action( 'bbp_register_theme_directory', array( $this, 'register_theme_directory' ), 10 );
|
473 |
-
|
474 |
-
// Load textdomain
|
475 |
-
add_action( 'bbp_load_textdomain', array( $this, 'register_textdomain' ), 10 );
|
476 |
-
|
477 |
-
// Add the %bbp_user% rewrite tag
|
478 |
-
add_action( 'bbp_add_rewrite_tags', array( $this, 'add_rewrite_tags' ), 10 );
|
479 |
|
480 |
-
//
|
481 |
-
|
|
|
482 |
}
|
483 |
|
484 |
/**
|
485 |
-
* Register Textdomain
|
486 |
-
*
|
487 |
* Load the translation file for current language. Checks the languages
|
488 |
* folder inside the bbPress plugin first, and then the default WordPress
|
489 |
* languages folder.
|
@@ -499,7 +489,7 @@ class bbPress {
|
|
499 |
* @uses load_textdomain() To load the textdomain
|
500 |
* @return bool True on success, false on failure
|
501 |
*/
|
502 |
-
function
|
503 |
|
504 |
// Allow locale to be filtered
|
505 |
$locale = apply_filters( 'bbpress_locale', get_locale() );
|
@@ -531,24 +521,22 @@ class bbPress {
|
|
531 |
* @uses register_theme_directory() To register the theme directory
|
532 |
* @return bool True on success, false on failure
|
533 |
*/
|
534 |
-
function register_theme_directory() {
|
535 |
return register_theme_directory( $this->themes_dir );
|
536 |
}
|
537 |
|
538 |
/**
|
539 |
* Setup the post types for forums, topics and replies
|
540 |
*
|
541 |
-
* @todo messages
|
542 |
-
*
|
543 |
* @since bbPress (r2597)
|
544 |
*
|
545 |
* @uses register_post_type() To register the post types
|
546 |
* @uses apply_filters() Calls various filters to modify the arguments
|
547 |
* sent to register_post_type()
|
548 |
*/
|
549 |
-
function register_post_types() {
|
550 |
|
551 |
-
/**
|
552 |
|
553 |
// Forum labels
|
554 |
$forum['labels'] = array(
|
@@ -605,7 +593,7 @@ class bbPress {
|
|
605 |
// Register Forum content type
|
606 |
register_post_type( $this->forum_post_type, $bbp_cpt['forum'] );
|
607 |
|
608 |
-
/**
|
609 |
|
610 |
// Topic labels
|
611 |
$topic['labels'] = array(
|
@@ -662,7 +650,7 @@ class bbPress {
|
|
662 |
// Register Topic content type
|
663 |
register_post_type( $this->topic_post_type, $bbp_cpt['topic'] );
|
664 |
|
665 |
-
/**
|
666 |
|
667 |
// Reply labels
|
668 |
$reply['labels'] = array(
|
@@ -730,7 +718,7 @@ class bbPress {
|
|
730 |
* @uses current_user_can() To check if the current user is capable &
|
731 |
* modify $wp_post_statuses accordingly
|
732 |
*/
|
733 |
-
function register_post_statuses() {
|
734 |
global $wp_post_statuses;
|
735 |
|
736 |
// Closed
|
@@ -784,7 +772,7 @@ class bbPress {
|
|
784 |
* doesn't allow any hack for the trashed topics to be viewed.
|
785 |
*/
|
786 |
if ( !empty( $wp_post_statuses['trash'] ) ) {
|
787 |
-
|
788 |
// User can view trash so set internal to false
|
789 |
if ( current_user_can( 'view_trash' ) ) {
|
790 |
$wp_post_statuses['trash']->internal = false;
|
@@ -804,19 +792,20 @@ class bbPress {
|
|
804 |
*
|
805 |
* @uses register_taxonomy() To register the taxonomy
|
806 |
*/
|
807 |
-
function register_taxonomies() {
|
808 |
|
809 |
// Topic tag labels
|
810 |
$topic_tag['labels'] = array(
|
811 |
-
'name' => __( 'Topic Tags',
|
812 |
-
'singular_name' => __( 'Topic Tag',
|
813 |
-
'search_items' => __( 'Search Tags',
|
814 |
-
'popular_items' => __( 'Popular Tags',
|
815 |
-
'all_items' => __( 'All Tags',
|
816 |
-
'edit_item' => __( 'Edit Tag',
|
817 |
-
'update_item' => __( 'Update Tag',
|
818 |
-
'add_new_item' => __( 'Add New Tag',
|
819 |
-
'new_item_name' => __( 'New Tag Name',
|
|
|
820 |
);
|
821 |
|
822 |
// Topic tag rewrite
|
@@ -840,8 +829,8 @@ class bbPress {
|
|
840 |
|
841 |
// Register the topic tag taxonomy
|
842 |
register_taxonomy(
|
843 |
-
$this->
|
844 |
-
$this->topic_post_type,
|
845 |
$bbp_tt
|
846 |
);
|
847 |
}
|
@@ -853,7 +842,7 @@ class bbPress {
|
|
853 |
*
|
854 |
* @uses bbp_register_view() To register the views
|
855 |
*/
|
856 |
-
function register_views() {
|
857 |
|
858 |
// Topics with no replies
|
859 |
$no_replies = apply_filters( 'bbp_register_view_no_replies', array(
|
@@ -878,8 +867,8 @@ class bbPress {
|
|
878 |
*
|
879 |
* @uses wp_get_current_user()
|
880 |
*/
|
881 |
-
function setup_current_user() {
|
882 |
-
$this->current_user = wp_get_current_user();
|
883 |
}
|
884 |
|
885 |
/**
|
@@ -889,16 +878,25 @@ class bbPress {
|
|
889 |
*
|
890 |
* @uses add_rewrite_tag() To add the rewrite tags
|
891 |
*/
|
892 |
-
function add_rewrite_tags() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
|
894 |
// User Profile tag
|
895 |
-
add_rewrite_tag(
|
896 |
|
897 |
// View Page tag
|
898 |
-
add_rewrite_tag(
|
899 |
|
900 |
// Edit Page tag
|
901 |
-
add_rewrite_tag(
|
902 |
}
|
903 |
|
904 |
/**
|
@@ -909,29 +907,22 @@ class bbPress {
|
|
909 |
* @param WP_Rewrite $wp_rewrite bbPress-sepecific rules are appended in
|
910 |
* $wp_rewrite->rules
|
911 |
*/
|
912 |
-
function generate_rewrite_rules( $wp_rewrite ) {
|
913 |
|
914 |
// New rules to merge with existing
|
915 |
$bbp_rules = array(
|
916 |
|
917 |
// Edit Topic/Reply
|
918 |
-
$this->topic_slug
|
919 |
-
$this->reply_slug
|
920 |
|
921 |
-
//
|
922 |
-
|
923 |
|
924 |
// Profile Page
|
925 |
-
$this->user_slug
|
926 |
-
$this->user_slug
|
927 |
-
$this->user_slug
|
928 |
-
|
929 |
-
// @todo - favorites feeds
|
930 |
-
//$this->user_slug . '/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?' . $this->user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&feed=' . $wp_rewrite->preg_index( 2 ),
|
931 |
-
//$this->user_slug . '/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?' . $this->user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&feed=' . $wp_rewrite->preg_index( 2 ),
|
932 |
-
|
933 |
-
// @todo - view feeds
|
934 |
-
//$this->view_slug . '/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?' . $this->view_id . '=' . $wp_rewrite->preg_index( 1 ) . '&feed=' . $wp_rewrite->preg_index( 2 ),
|
935 |
|
936 |
// View Page
|
937 |
$this->view_slug . '/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?' . $this->view_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
|
@@ -947,7 +938,7 @@ class bbPress {
|
|
947 |
}
|
948 |
|
949 |
// "And now here's something we hope you'll really like!"
|
950 |
-
$bbp = new bbPress();
|
951 |
|
952 |
endif; // class_exists check
|
953 |
|
15 |
* Description: bbPress is forum software with a twist from the creators of WordPress.
|
16 |
* Author: The bbPress Community
|
17 |
* Author URI: http://bbpress.org
|
18 |
+
* Version: 2.0-rc-2
|
19 |
*/
|
20 |
|
21 |
// Exit if accessed directly
|
22 |
if ( !defined( 'ABSPATH' ) ) exit;
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
if ( !class_exists( 'bbPress' ) ) :
|
25 |
/**
|
26 |
* Main bbPress Class
|
28 |
* Tap tap tap... Is this thing on?
|
29 |
*
|
30 |
* @since bbPress (r2464)
|
|
|
31 |
*/
|
32 |
class bbPress {
|
33 |
|
34 |
+
/** Version ***************************************************************/
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @public string bbPress version
|
38 |
+
*/
|
39 |
+
public $version = '2.0-rc-2';
|
40 |
+
|
41 |
/** Post types ************************************************************/
|
42 |
|
43 |
/**
|
44 |
+
* @public string Forum post type id
|
45 |
*/
|
46 |
+
public $forum_post_type = '';
|
47 |
|
48 |
/**
|
49 |
+
* @public string Topic post type id
|
50 |
*/
|
51 |
+
public $topic_post_type = '';
|
52 |
|
53 |
/**
|
54 |
+
* @ string Reply post type id
|
55 |
*/
|
56 |
+
public $reply_post_type = '';
|
57 |
|
58 |
/** Taxonomies ************************************************************/
|
59 |
|
60 |
/**
|
61 |
+
* @public string Topic tag id
|
62 |
*/
|
63 |
+
public $topic_tag_tax_id = '';
|
64 |
|
65 |
/** Permastructs **********************************************************/
|
66 |
+
|
67 |
/**
|
68 |
+
* @public string User struct
|
69 |
*/
|
70 |
+
public $user_id = '';
|
71 |
+
|
72 |
/**
|
73 |
+
* @public string View struct
|
74 |
*/
|
75 |
+
public $view_id = '';
|
76 |
+
|
77 |
/**
|
78 |
+
* @public string Edit struct
|
79 |
*/
|
80 |
+
public $edit_id = '';
|
81 |
+
|
82 |
/** Post statuses *********************************************************/
|
83 |
|
84 |
/**
|
85 |
+
* @public string Closed post status id. Used by topics.
|
86 |
*/
|
87 |
+
public $closed_status_id = '';
|
88 |
|
89 |
/**
|
90 |
+
* @public string Spam post status id. Used by topics and replies.
|
91 |
*/
|
92 |
+
public $spam_status_id = '';
|
93 |
|
94 |
/**
|
95 |
+
* @public string Trash post status id. Used by topics and replies.
|
96 |
*/
|
97 |
+
public $trash_status_id = '';
|
98 |
|
99 |
/**
|
100 |
+
* @public string Orphan post status id. Used by topics and replies.
|
101 |
*/
|
102 |
+
public $orphan_status_id = '';
|
103 |
|
104 |
/**
|
105 |
+
* @public string Hidden post status id. Used by forums.
|
106 |
*/
|
107 |
+
public $hidden_status_id = '';
|
108 |
|
109 |
/** Slugs *****************************************************************/
|
110 |
|
111 |
/**
|
112 |
+
* @public string Root slug
|
113 |
*/
|
114 |
+
public $root_slug = '';
|
115 |
|
116 |
/**
|
117 |
+
* @public string Forum slug
|
118 |
*/
|
119 |
+
public $forum_slug = '';
|
120 |
|
121 |
/**
|
122 |
+
* @public string Topic slug
|
123 |
*/
|
124 |
+
public $topic_slug = '';
|
125 |
|
126 |
/**
|
127 |
+
* @public string Topic archive slug
|
128 |
*/
|
129 |
+
public $topic_archive_slug = '';
|
130 |
|
131 |
/**
|
132 |
+
* @public string Reply slug
|
133 |
*/
|
134 |
+
public $reply_slug = '';
|
135 |
|
136 |
/**
|
137 |
+
* @public string Topic tag slug
|
138 |
*/
|
139 |
+
public $topic_tag_slug = '';
|
140 |
|
141 |
/**
|
142 |
+
* @public string User slug
|
143 |
*/
|
144 |
+
public $user_slug = '';
|
145 |
|
146 |
/**
|
147 |
+
* @public string View slug
|
148 |
*/
|
149 |
+
public $view_slug = '';
|
150 |
|
151 |
/** Paths *****************************************************************/
|
152 |
|
153 |
/**
|
154 |
+
* @public string Basename of the bbPress plugin directory
|
155 |
+
*/
|
156 |
+
public $basename = '';
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @public string Absolute path to the bbPress plugin directory
|
160 |
*/
|
161 |
+
public $plugin_dir = '';
|
162 |
|
163 |
/**
|
164 |
+
* @public string Absolute path to the bbPress themes directory
|
165 |
*/
|
166 |
+
public $themes_dir = '';
|
167 |
|
168 |
/**
|
169 |
+
* @public string Absolute path to the bbPress language directory
|
170 |
*/
|
171 |
+
public $lang_dir = '';
|
172 |
|
173 |
/** URLs ******************************************************************/
|
174 |
|
175 |
/**
|
176 |
+
* @public string URL to the bbPress plugin directory
|
177 |
*/
|
178 |
+
public $plugin_url = '';
|
179 |
|
180 |
/**
|
181 |
+
* @public string URL to the bbPress themes directory
|
182 |
*/
|
183 |
+
public $themes_url = '';
|
184 |
|
185 |
/** Current ID's **********************************************************/
|
186 |
|
187 |
/**
|
188 |
+
* @public string Current forum id
|
189 |
*/
|
190 |
+
public $current_forum_id = 0;
|
191 |
|
192 |
/**
|
193 |
+
* @public string Current topic id
|
194 |
*/
|
195 |
+
public $current_topic_id = 0;
|
196 |
|
197 |
/**
|
198 |
+
* @public string Current reply id
|
199 |
*/
|
200 |
+
public $current_reply_id = 0;
|
201 |
|
202 |
/** Users *****************************************************************/
|
203 |
|
204 |
/**
|
205 |
+
* @public object Current user
|
206 |
*/
|
207 |
+
public $current_user = array();
|
208 |
|
209 |
/**
|
210 |
+
* @public object Displayed user
|
211 |
*/
|
212 |
+
public $displayed_user = array();
|
213 |
|
214 |
/** Queries ***************************************************************/
|
215 |
|
216 |
/**
|
217 |
+
* @public WP_Query For forums
|
218 |
*/
|
219 |
+
public $forum_query;
|
220 |
|
221 |
/**
|
222 |
+
* @public WP_Query For topics
|
223 |
*/
|
224 |
+
public $topic_query;
|
225 |
|
226 |
/**
|
227 |
+
* @public WP_Query For replies
|
228 |
*/
|
229 |
+
public $reply_query;
|
230 |
|
231 |
/** Arrays ****************************************************************/
|
232 |
|
233 |
/**
|
234 |
+
* @public array Sub Forums
|
235 |
*/
|
236 |
+
public $sub_forums = array();
|
237 |
|
238 |
/** Errors ****************************************************************/
|
239 |
|
240 |
/**
|
241 |
+
* @public WP_Error Used to log and display errors
|
242 |
*/
|
243 |
+
public $errors = array();
|
244 |
|
245 |
/** Views *****************************************************************/
|
246 |
|
247 |
/**
|
248 |
+
* @public array An array of registered bbPress views
|
249 |
*/
|
250 |
+
public $views = array();
|
251 |
|
252 |
/** Forms *****************************************************************/
|
253 |
|
254 |
/**
|
255 |
+
* @public int The current tab index for form building
|
256 |
*/
|
257 |
+
public $tab_index = 0;
|
258 |
|
259 |
/** Theme Compat **********************************************************/
|
260 |
|
261 |
/**
|
262 |
+
* @public string Theme to use for theme compatibility
|
263 |
*/
|
264 |
+
public $theme_compat = '';
|
265 |
+
|
266 |
+
/** Extensions ************************************************************/
|
267 |
|
|
|
|
|
268 |
/**
|
269 |
+
* @public mixed bbPress add-ons should append globals to this
|
270 |
*/
|
271 |
+
public $extend = false;
|
272 |
|
273 |
/** Functions *************************************************************/
|
274 |
|
279 |
*
|
280 |
* @uses bbPress::__construct() Setup the globals needed
|
281 |
*/
|
282 |
+
public function bbPress() {
|
283 |
$this->__construct();
|
284 |
}
|
285 |
|
288 |
*
|
289 |
* @since bbPress (r2464)
|
290 |
*
|
291 |
+
* @uses bbPress::setup_globals() Setup the globals needed
|
292 |
+
* @uses bbPress::includes() Include the required files
|
293 |
+
* @uses bbPress::setup_actions() Setup the hooks and actions
|
294 |
+
*/
|
295 |
+
public function __construct() {
|
296 |
+
$this->setup_globals();
|
297 |
+
$this->includes();
|
298 |
+
$this->setup_actions();
|
299 |
}
|
300 |
|
301 |
/**
|
308 |
* @uses plugin_dir_url() To generate bbPress plugin url
|
309 |
* @uses apply_filters() Calls various filters
|
310 |
*/
|
311 |
+
private function setup_globals() {
|
312 |
|
313 |
/** Paths *************************************************************/
|
314 |
|
315 |
// bbPress root directory
|
316 |
$this->file = __FILE__;
|
317 |
+
$this->basename = plugin_basename( $this->file );
|
318 |
$this->plugin_dir = plugin_dir_path( $this->file );
|
319 |
$this->plugin_url = plugin_dir_url ( $this->file );
|
320 |
|
321 |
// Themes
|
322 |
+
$this->themes_dir = $this->plugin_dir . 'bbp-themes';
|
323 |
$this->themes_url = $this->plugin_url . 'bbp-themes';
|
324 |
|
325 |
// Languages
|
328 |
/** Identifiers *******************************************************/
|
329 |
|
330 |
// Post type identifiers
|
331 |
+
$this->forum_post_type = apply_filters( 'bbp_forum_post_type', 'forum' );
|
332 |
+
$this->topic_post_type = apply_filters( 'bbp_topic_post_type', 'topic' );
|
333 |
+
$this->reply_post_type = apply_filters( 'bbp_reply_post_type', 'reply' );
|
334 |
+
$this->topic_tag_tax_id = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' );
|
335 |
|
336 |
// Status identifiers
|
337 |
$this->spam_status_id = apply_filters( 'bbp_spam_post_status', 'spam' );
|
341 |
$this->trash_status_id = 'trash';
|
342 |
|
343 |
// Other identifiers
|
344 |
+
$this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
|
345 |
+
$this->view_id = apply_filters( 'bbp_view_id', 'bbp_view' );
|
346 |
+
$this->edit_id = apply_filters( 'bbp_edit_id', 'edit' );
|
347 |
+
|
348 |
/** Slugs *************************************************************/
|
349 |
|
350 |
// Root forum slug
|
367 |
$this->user_slug = apply_filters( 'bbp_user_slug', $prefix . get_option( '_bbp_user_slug', 'user' ) );
|
368 |
$this->view_slug = apply_filters( 'bbp_view_slug', $prefix . get_option( '_bbp_view_slug', 'view' ) );
|
369 |
|
370 |
+
/** Queries ***********************************************************/
|
371 |
+
|
372 |
+
$this->forum_query = new stdClass;
|
373 |
+
$this->topic_query = new stdClass;
|
374 |
+
$this->reply_query = new stdClass;
|
375 |
+
|
376 |
/** Misc **************************************************************/
|
377 |
|
378 |
// Errors
|
379 |
+
$this->errors = new WP_Error();
|
380 |
|
381 |
// Views
|
382 |
+
$this->views = array();
|
383 |
|
384 |
// Tab Index
|
385 |
+
$this->tab_index = apply_filters( 'bbp_default_tab_index', 100 );
|
386 |
|
387 |
/** Cache *************************************************************/
|
388 |
|
398 |
*
|
399 |
* @uses is_admin() If in WordPress admin, load additional file
|
400 |
*/
|
401 |
+
private function includes() {
|
|
|
|
|
402 |
|
403 |
+
/** Core **************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
|
405 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-hooks.php' ); // All filters and actions
|
406 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-options.php' ); // Configuration Options
|
407 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-caps.php' ); // Roles and capabilities
|
408 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-classes.php' ); // Common classes
|
409 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-widgets.php' ); // Sidebar widgets
|
410 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-shortcodes.php' ); // Shortcodes for use with pages and posts
|
411 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-core-compatibility.php' ); // Theme compatibility for existing themes
|
412 |
+
|
413 |
+
/** Extensions ********************************************************/
|
414 |
+
|
415 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-extend-akismet.php' ); // Spam prevention for topics and replies
|
416 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-extend-buddypress.php' ); // Social network integration
|
417 |
|
418 |
/** Components ********************************************************/
|
419 |
|
420 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-common-functions.php' ); // Common functions
|
421 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-common-template.php' ); // Common template tags
|
|
|
|
|
|
|
|
|
|
|
422 |
|
423 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-forum-functions.php' ); // Forum functions
|
424 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-forum-template.php' ); // Forum template tags
|
425 |
+
|
426 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-topic-functions.php' ); // Topic functions
|
427 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-topic-template.php' ); // Topic template tags
|
428 |
|
429 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-reply-functions.php' ); // Reply functions
|
430 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-reply-template.php' ); // Reply template tags
|
431 |
+
|
432 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-user-functions.php' ); // User functions
|
433 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-user-template.php' ); // User template tags
|
434 |
|
435 |
/** Admin *************************************************************/
|
436 |
|
437 |
// Quick admin check and load if needed
|
438 |
if ( is_admin() )
|
439 |
+
require( $this->plugin_dir . 'bbp-admin/bbp-admin.php' );
|
440 |
}
|
441 |
|
442 |
/**
|
449 |
* @uses register_deactivation_hook() To register the deactivation hook
|
450 |
* @uses add_action() To add various actions
|
451 |
*/
|
452 |
+
private function setup_actions() {
|
453 |
|
454 |
// Register bbPress activation/deactivation sequences
|
455 |
+
register_activation_hook ( $this->file, 'bbp_activation' );
|
456 |
+
register_deactivation_hook( $this->file, 'bbp_deactivation' );
|
457 |
+
|
458 |
+
// Array of bbPress core actions
|
459 |
+
$actions = array(
|
460 |
+
'setup_current_user', // Setup currently logged in user
|
461 |
+
'register_post_types', // Register post types (forum|topic|reply)
|
462 |
+
'register_post_statuses', // Register post statuses (closed|spam|orphan|hidden)
|
463 |
+
'register_taxonomies', // Register taxonomies (topic-tag)
|
464 |
+
'register_views', // Register the views (no-replies)
|
465 |
+
'register_theme_directory', // Register the theme directory (bbp-themes)
|
466 |
+
'load_textdomain', // Load textdomain (bbpress)
|
467 |
+
'add_rewrite_tags', // Add rewrite tags (view|user|edit)
|
468 |
+
'generate_rewrite_rules' // Generate rewrite rules (view|edit)
|
469 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
|
471 |
+
// Add the actions
|
472 |
+
foreach( $actions as $class_action )
|
473 |
+
add_action( 'bbp_' . $class_action, array( $this, $class_action ), 5 );
|
474 |
}
|
475 |
|
476 |
/**
|
|
|
|
|
477 |
* Load the translation file for current language. Checks the languages
|
478 |
* folder inside the bbPress plugin first, and then the default WordPress
|
479 |
* languages folder.
|
489 |
* @uses load_textdomain() To load the textdomain
|
490 |
* @return bool True on success, false on failure
|
491 |
*/
|
492 |
+
public function load_textdomain() {
|
493 |
|
494 |
// Allow locale to be filtered
|
495 |
$locale = apply_filters( 'bbpress_locale', get_locale() );
|
521 |
* @uses register_theme_directory() To register the theme directory
|
522 |
* @return bool True on success, false on failure
|
523 |
*/
|
524 |
+
public function register_theme_directory() {
|
525 |
return register_theme_directory( $this->themes_dir );
|
526 |
}
|
527 |
|
528 |
/**
|
529 |
* Setup the post types for forums, topics and replies
|
530 |
*
|
|
|
|
|
531 |
* @since bbPress (r2597)
|
532 |
*
|
533 |
* @uses register_post_type() To register the post types
|
534 |
* @uses apply_filters() Calls various filters to modify the arguments
|
535 |
* sent to register_post_type()
|
536 |
*/
|
537 |
+
public function register_post_types() {
|
538 |
|
539 |
+
/** Forums ************************************************************/
|
540 |
|
541 |
// Forum labels
|
542 |
$forum['labels'] = array(
|
593 |
// Register Forum content type
|
594 |
register_post_type( $this->forum_post_type, $bbp_cpt['forum'] );
|
595 |
|
596 |
+
/** Topics ************************************************************/
|
597 |
|
598 |
// Topic labels
|
599 |
$topic['labels'] = array(
|
650 |
// Register Topic content type
|
651 |
register_post_type( $this->topic_post_type, $bbp_cpt['topic'] );
|
652 |
|
653 |
+
/** Replies ***********************************************************/
|
654 |
|
655 |
// Reply labels
|
656 |
$reply['labels'] = array(
|
718 |
* @uses current_user_can() To check if the current user is capable &
|
719 |
* modify $wp_post_statuses accordingly
|
720 |
*/
|
721 |
+
public function register_post_statuses() {
|
722 |
global $wp_post_statuses;
|
723 |
|
724 |
// Closed
|
772 |
* doesn't allow any hack for the trashed topics to be viewed.
|
773 |
*/
|
774 |
if ( !empty( $wp_post_statuses['trash'] ) ) {
|
775 |
+
|
776 |
// User can view trash so set internal to false
|
777 |
if ( current_user_can( 'view_trash' ) ) {
|
778 |
$wp_post_statuses['trash']->internal = false;
|
792 |
*
|
793 |
* @uses register_taxonomy() To register the taxonomy
|
794 |
*/
|
795 |
+
public function register_taxonomies() {
|
796 |
|
797 |
// Topic tag labels
|
798 |
$topic_tag['labels'] = array(
|
799 |
+
'name' => __( 'Topic Tags', 'bbpress' ),
|
800 |
+
'singular_name' => __( 'Topic Tag', 'bbpress' ),
|
801 |
+
'search_items' => __( 'Search Tags', 'bbpress' ),
|
802 |
+
'popular_items' => __( 'Popular Tags', 'bbpress' ),
|
803 |
+
'all_items' => __( 'All Tags', 'bbpress' ),
|
804 |
+
'edit_item' => __( 'Edit Tag', 'bbpress' ),
|
805 |
+
'update_item' => __( 'Update Tag', 'bbpress' ),
|
806 |
+
'add_new_item' => __( 'Add New Tag', 'bbpress' ),
|
807 |
+
'new_item_name' => __( 'New Tag Name', 'bbpress' ),
|
808 |
+
'view_item' => __( 'View Topic Tag', 'bbpress' )
|
809 |
);
|
810 |
|
811 |
// Topic tag rewrite
|
829 |
|
830 |
// Register the topic tag taxonomy
|
831 |
register_taxonomy(
|
832 |
+
$this->topic_tag_tax_id, // The topic tag id
|
833 |
+
$this->topic_post_type, // The topic post type
|
834 |
$bbp_tt
|
835 |
);
|
836 |
}
|
842 |
*
|
843 |
* @uses bbp_register_view() To register the views
|
844 |
*/
|
845 |
+
public function register_views() {
|
846 |
|
847 |
// Topics with no replies
|
848 |
$no_replies = apply_filters( 'bbp_register_view_no_replies', array(
|
867 |
*
|
868 |
* @uses wp_get_current_user()
|
869 |
*/
|
870 |
+
public function setup_current_user() {
|
871 |
+
$this->current_user = &wp_get_current_user();
|
872 |
}
|
873 |
|
874 |
/**
|
878 |
*
|
879 |
* @uses add_rewrite_tag() To add the rewrite tags
|
880 |
*/
|
881 |
+
public function add_rewrite_tags() {
|
882 |
+
|
883 |
+
// Pad attributes
|
884 |
+
$pad = 2;
|
885 |
+
$wrapper = '%';
|
886 |
+
|
887 |
+
// Setup the tags
|
888 |
+
$bbp_user = str_pad( $this->user_id, strlen( $this->user_id ) + $pad, $wrapper, STR_PAD_BOTH );
|
889 |
+
$bbp_view = str_pad( $this->view_id, strlen( $this->view_id ) + $pad, $wrapper, STR_PAD_BOTH );
|
890 |
+
$bbp_edit = str_pad( $this->edit_id, strlen( $this->edit_id ) + $pad, $wrapper, STR_PAD_BOTH );
|
891 |
|
892 |
// User Profile tag
|
893 |
+
add_rewrite_tag( $bbp_user, '([^/]+)' );
|
894 |
|
895 |
// View Page tag
|
896 |
+
add_rewrite_tag( $bbp_view, '([^/]+)' );
|
897 |
|
898 |
// Edit Page tag
|
899 |
+
add_rewrite_tag( $bbp_edit, '([1]{1,})' );
|
900 |
}
|
901 |
|
902 |
/**
|
907 |
* @param WP_Rewrite $wp_rewrite bbPress-sepecific rules are appended in
|
908 |
* $wp_rewrite->rules
|
909 |
*/
|
910 |
+
public function generate_rewrite_rules( $wp_rewrite ) {
|
911 |
|
912 |
// New rules to merge with existing
|
913 |
$bbp_rules = array(
|
914 |
|
915 |
// Edit Topic/Reply
|
916 |
+
$this->topic_slug . '/([^/]+)/edit/?$' => 'index.php?' . $this->topic_post_type . '=' . $wp_rewrite->preg_index( 1 ) . '&edit=1',
|
917 |
+
$this->reply_slug . '/([^/]+)/edit/?$' => 'index.php?' . $this->reply_post_type . '=' . $wp_rewrite->preg_index( 1 ) . '&edit=1',
|
918 |
|
919 |
+
// Edit Topic Tag
|
920 |
+
$this->topic_tag_slug . '/([^/]+)/edit/?$' => 'index.php?' . $this->topic_tag_tax_id . '=' . $wp_rewrite->preg_index( 1 ) . '&edit=1',
|
921 |
|
922 |
// Profile Page
|
923 |
+
$this->user_slug . '/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?' . $this->user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
|
924 |
+
$this->user_slug . '/([^/]+)/?$' => 'index.php?' . $this->user_id . '=' . $wp_rewrite->preg_index( 1 ),
|
925 |
+
$this->user_slug . '/([^/]+)/edit/?$' => 'index.php?' . $this->user_id . '=' . $wp_rewrite->preg_index( 1 ) . '&edit=1',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
|
927 |
// View Page
|
928 |
$this->view_slug . '/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?' . $this->view_id . '=' . $wp_rewrite->preg_index( 1 ) . '&paged=' . $wp_rewrite->preg_index( 2 ),
|
938 |
}
|
939 |
|
940 |
// "And now here's something we hope you'll really like!"
|
941 |
+
$GLOBALS['bbp'] = new bbPress();
|
942 |
|
943 |
endif; // class_exists check
|
944 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== bbPress ===
|
2 |
-
Contributors: matt, johnjamesjacoby
|
3 |
Tags: bbpress, forums, discussion, post type, theme
|
4 |
-
Requires at least: 3.
|
5 |
Tested up to: 3.2
|
6 |
-
Stable tag: 2.0-
|
7 |
|
8 |
bbPress is forum software with a twist from the creators of WordPress
|
9 |
|
@@ -24,6 +24,18 @@ We're keeping things as small and light as possible while still allowing for gre
|
|
24 |
|
25 |
== Changelog ==
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
= 2.0-beta-3b =
|
28 |
* Fix regression in forum index theme compatibility template
|
29 |
* Audit usage of get strings for moderator level and above users
|
1 |
=== bbPress ===
|
2 |
+
Contributors: matt, johnjamesjacoby
|
3 |
Tags: bbpress, forums, discussion, post type, theme
|
4 |
+
Requires at least: 3.2
|
5 |
Tested up to: 3.2
|
6 |
+
Stable tag: 2.0-rc-2
|
7 |
|
8 |
bbPress is forum software with a twist from the creators of WordPress
|
9 |
|
24 |
|
25 |
== Changelog ==
|
26 |
|
27 |
+
= 2.0-rc-2 =
|
28 |
+
* BuddyPress integration
|
29 |
+
* Multisite integration
|
30 |
+
* Fixed a bushel of bugs
|
31 |
+
* Fixed tag pagination again
|
32 |
+
* Fixed ajax priority loading
|
33 |
+
|
34 |
+
= 2.0-rc-1 =
|
35 |
+
* Fixed tag pagination
|
36 |
+
* Broke tag pagination
|
37 |
+
* Squashed a bunch of bugs
|
38 |
+
|
39 |
= 2.0-beta-3b =
|
40 |
* Fix regression in forum index theme compatibility template
|
41 |
* Audit usage of get strings for moderator level and above users
|