Version Description
- Fixed Genesis incompatibilities
- Fixed BuddyPress activity stream issues
- Fixed Subscription email sending issues
- Fixed Theme Compat display issues for some themes
- Improved Theme Compat class
- More future proofing internal API's
Download this release
Release Info
| Developer | johnjamesjacoby |
| Plugin | |
| Version | 2.0-rc-5 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0-rc-4 to 2.0-rc-5
- bbp-admin/bbp-forums.php +10 -6
- bbp-admin/bbp-functions.php +16 -16
- bbp-admin/bbp-metaboxes.php +3 -3
- bbp-admin/bbp-replies.php +12 -9
- bbp-admin/bbp-settings.php +64 -40
- bbp-admin/bbp-topics.php +9 -7
- bbp-admin/bbp-users.php +3 -0
- bbp-admin/importers/bbpress.php +4 -4
- bbp-includes/bbp-common-functions.php +185 -59
- bbp-includes/bbp-common-template.php +5 -6
- bbp-includes/bbp-core-caps.php +10 -12
- bbp-includes/bbp-core-compatibility.php +139 -57
- bbp-includes/bbp-core-hooks.php +19 -10
- bbp-includes/bbp-core-shortcodes.php +3 -11
- bbp-includes/bbp-core-widgets.php +3 -5
- bbp-includes/bbp-extend-akismet.php +75 -38
- bbp-includes/bbp-extend-buddypress.php +19 -4
- bbp-includes/bbp-extend-genesis.php +172 -0
- bbp-includes/bbp-forum-functions.php +87 -51
- bbp-includes/bbp-forum-template.php +13 -19
- bbp-includes/bbp-reply-functions.php +34 -27
- bbp-includes/bbp-reply-template.php +32 -23
- bbp-includes/bbp-topic-functions.php +147 -48
- bbp-includes/bbp-topic-template.php +41 -35
- bbp-includes/bbp-user-functions.php +68 -5
- bbp-includes/bbp-user-template.php +12 -10
- bbp-languages/bbpress.pot +372 -368
- bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-reply.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-topic-split.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/form-topic.php +2 -2
- bbp-themes/bbp-twentyten/bbpress/form-user-edit.php +12 -12
- bbp-themes/bbp-twentyten/bbpress/form-user-register.php +1 -1
- bbp-themes/bbp-twentyten/bbpress/loop-single-reply.php +1 -1
- bbp-themes/bbp-twentyten/css/bbpress.css +1 -0
- bbp-themes/bbp-twentyten/functions.php +324 -235
- bbpress.php +26 -11
- readme.txt +9 -1
bbp-admin/bbp-forums.php
CHANGED
|
@@ -241,14 +241,15 @@ class BBP_Forums_Admin {
|
|
| 241 |
|
| 242 |
// Category?
|
| 243 |
if ( !empty( $_POST['bbp_forum_type'] ) && in_array( $_POST['bbp_forum_type'], array( 'forum', 'category' ) ) ) {
|
| 244 |
-
if ( 'category' == $_POST['bbp_forum_type'] && !bbp_is_forum_category( $forum_id ) )
|
| 245 |
bbp_categorize_forum( $forum_id );
|
| 246 |
-
elseif ( 'forum' == $_POST['bbp_forum_type'] && bbp_is_forum_category( $forum_id ) )
|
| 247 |
bbp_normalize_forum( $forum_id );
|
|
|
|
| 248 |
}
|
| 249 |
|
| 250 |
// Visibility
|
| 251 |
-
if ( !empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array(
|
| 252 |
|
| 253 |
// Get forums current visibility
|
| 254 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
|
@@ -260,17 +261,17 @@ class BBP_Forums_Admin {
|
|
| 260 |
switch ( $_POST['bbp_forum_visibility'] ) {
|
| 261 |
|
| 262 |
// Hidden
|
| 263 |
-
case
|
| 264 |
bbp_hide_forum( $forum_id, $visibility );
|
| 265 |
break;
|
| 266 |
|
| 267 |
// Private
|
| 268 |
-
case
|
| 269 |
bbp_privatize_forum( $forum_id, $visibility );
|
| 270 |
break;
|
| 271 |
|
| 272 |
// Publish (default)
|
| 273 |
-
case
|
| 274 |
default :
|
| 275 |
bbp_publicize_forum( $forum_id, $visibility );
|
| 276 |
break;
|
|
@@ -552,6 +553,9 @@ endif; // class_exists check
|
|
| 552 |
function bbp_admin_forums() {
|
| 553 |
global $bbp;
|
| 554 |
|
|
|
|
|
|
|
|
|
|
| 555 |
$bbp->admin->forums = new BBP_Forums_Admin();
|
| 556 |
}
|
| 557 |
|
| 241 |
|
| 242 |
// Category?
|
| 243 |
if ( !empty( $_POST['bbp_forum_type'] ) && in_array( $_POST['bbp_forum_type'], array( 'forum', 'category' ) ) ) {
|
| 244 |
+
if ( 'category' == $_POST['bbp_forum_type'] && !bbp_is_forum_category( $forum_id ) ) {
|
| 245 |
bbp_categorize_forum( $forum_id );
|
| 246 |
+
} elseif ( 'forum' == $_POST['bbp_forum_type'] && bbp_is_forum_category( $forum_id ) ) {
|
| 247 |
bbp_normalize_forum( $forum_id );
|
| 248 |
+
}
|
| 249 |
}
|
| 250 |
|
| 251 |
// Visibility
|
| 252 |
+
if ( !empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() ) ) ) {
|
| 253 |
|
| 254 |
// Get forums current visibility
|
| 255 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 261 |
switch ( $_POST['bbp_forum_visibility'] ) {
|
| 262 |
|
| 263 |
// Hidden
|
| 264 |
+
case bbp_get_hidden_status_id() :
|
| 265 |
bbp_hide_forum( $forum_id, $visibility );
|
| 266 |
break;
|
| 267 |
|
| 268 |
// Private
|
| 269 |
+
case bbp_get_private_status_id() :
|
| 270 |
bbp_privatize_forum( $forum_id, $visibility );
|
| 271 |
break;
|
| 272 |
|
| 273 |
// Publish (default)
|
| 274 |
+
case bbp_get_public_status_id() :
|
| 275 |
default :
|
| 276 |
bbp_publicize_forum( $forum_id, $visibility );
|
| 277 |
break;
|
| 553 |
function bbp_admin_forums() {
|
| 554 |
global $bbp;
|
| 555 |
|
| 556 |
+
// Bail if bbPress is not loaded
|
| 557 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 558 |
+
|
| 559 |
$bbp->admin->forums = new BBP_Forums_Admin();
|
| 560 |
}
|
| 561 |
|
bbp-admin/bbp-functions.php
CHANGED
|
@@ -195,8 +195,8 @@ function bbp_recount_topic_replies() {
|
|
| 195 |
// Post types and status
|
| 196 |
$tpt = bbp_get_topic_post_type();
|
| 197 |
$rpt = bbp_get_reply_post_type();
|
| 198 |
-
$pps =
|
| 199 |
-
$cps =
|
| 200 |
|
| 201 |
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
| 202 |
SELECT `topics`.`ID` AS `post_id`, '_bbp_reply_count' AS `meta_key`, COUNT(`replies`.`ID`) As `meta_value`
|
|
@@ -239,8 +239,8 @@ function bbp_recount_topic_voices() {
|
|
| 239 |
// Post types and status
|
| 240 |
$tpt = bbp_get_topic_post_type();
|
| 241 |
$rpt = bbp_get_reply_post_type();
|
| 242 |
-
$pps =
|
| 243 |
-
$cps =
|
| 244 |
|
| 245 |
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
| 246 |
SELECT `postmeta`.`meta_value`, '_bbp_voice_count', COUNT(DISTINCT `post_author`) as `meta_value`
|
|
@@ -279,7 +279,7 @@ function bbp_recount_topic_hidden_replies() {
|
|
| 279 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
| 280 |
return array( 1, sprintf( $statement, $result ) );
|
| 281 |
|
| 282 |
-
$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(
|
| 283 |
if ( is_wp_error( $wpdb->query( $sql ) ) )
|
| 284 |
return array( 2, sprintf( $statement, $result ) );
|
| 285 |
|
|
@@ -366,12 +366,12 @@ function bbp_recount_forum_replies() {
|
|
| 366 |
* @return array An array of the status code and the message
|
| 367 |
*/
|
| 368 |
function bbp_recount_user_topics_replied() {
|
| 369 |
-
global $wpdb;
|
| 370 |
|
| 371 |
$statement = __( 'Counting the number of topics to which each user has replied… %s', 'bbpress' );
|
| 372 |
$result = __( 'Failed!', 'bbpress' );
|
| 373 |
|
| 374 |
-
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$wpdb->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` = '
|
| 375 |
$insert_rows = $wpdb->get_results( $sql_select );
|
| 376 |
|
| 377 |
if ( is_wp_error( $insert_rows ) )
|
|
@@ -705,7 +705,7 @@ function bbp_recount_tag_delete_empty() {
|
|
| 705 |
* @return array An array of the status code and the message
|
| 706 |
*/
|
| 707 |
function bbp_recount_clean_favorites() {
|
| 708 |
-
global $wpdb;
|
| 709 |
|
| 710 |
$statement = __( 'Removing trashed topics from user favorites… %s', 'bbpress' );
|
| 711 |
$result = __( 'Failed!', 'bbpress' );
|
|
@@ -714,7 +714,7 @@ function bbp_recount_clean_favorites() {
|
|
| 714 |
if ( is_wp_error( $users ) )
|
| 715 |
return array( 1, sprintf( $statement, $result ) );
|
| 716 |
|
| 717 |
-
$topics = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '
|
| 718 |
|
| 719 |
if ( is_wp_error( $topics ) )
|
| 720 |
return array( 2, sprintf( $statement, $result ) );
|
|
@@ -764,7 +764,7 @@ function bbp_recount_clean_favorites() {
|
|
| 764 |
* @return array An array of the status code and the message
|
| 765 |
*/
|
| 766 |
function bbp_recount_clean_subscriptions() {
|
| 767 |
-
global $wpdb;
|
| 768 |
|
| 769 |
$statement = __( 'Removing trashed topics from user subscriptions… %s', 'bbpress' );
|
| 770 |
$result = __( 'Failed!', 'bbpress' );
|
|
@@ -773,7 +773,7 @@ function bbp_recount_clean_subscriptions() {
|
|
| 773 |
if ( is_wp_error( $users ) )
|
| 774 |
return array( 1, sprintf( $statement, $result ) );
|
| 775 |
|
| 776 |
-
$topics = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '
|
| 777 |
if ( is_wp_error( $topics ) )
|
| 778 |
return array( 2, sprintf( $statement, $result ) );
|
| 779 |
|
|
@@ -821,7 +821,7 @@ function bbp_recount_clean_subscriptions() {
|
|
| 821 |
* @return array An array of the status code and the message
|
| 822 |
*/
|
| 823 |
function bbp_recount_rewalk() {
|
| 824 |
-
global $wpdb;
|
| 825 |
|
| 826 |
$statement = __( 'Recomputing latest post in every topic and forum… %s', 'bbpress' );
|
| 827 |
$result = __( 'Failed!', 'bbpress' );
|
|
@@ -834,7 +834,7 @@ function bbp_recount_rewalk() {
|
|
| 834 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 835 |
( SELECT `topic`.`ID`, '_bbp_last_reply_id', MAX( `reply`.`ID` )
|
| 836 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 837 |
-
WHERE `reply`.`post_status` IN ( '
|
| 838 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 839 |
return array( 2, sprintf( $statement, $result ) );
|
| 840 |
|
|
@@ -850,7 +850,7 @@ function bbp_recount_rewalk() {
|
|
| 850 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 851 |
( SELECT `forum`.`ID`, '_bbp_last_topic_id', `topic`.`ID`
|
| 852 |
FROM `$wpdb->posts` AS `forum` INNER JOIN `$wpdb->posts` AS `topic` ON `forum`.`ID` = `topic`.`post_parent`
|
| 853 |
-
WHERE `topic`.`post_status` IN ( '
|
| 854 |
GROUP BY `forum`.`ID` );" ) ) )
|
| 855 |
return array( 4, sprintf( $statement, $result ) );
|
| 856 |
|
|
@@ -866,7 +866,7 @@ function bbp_recount_rewalk() {
|
|
| 866 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 867 |
( SELECT `topic`.`ID`, '_bbp_last_active_id', MAX( `reply`.`ID` )
|
| 868 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 869 |
-
WHERE `reply`.`post_status` IN ( '
|
| 870 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 871 |
return array( 6, sprintf( $statement, $result ) );
|
| 872 |
|
|
@@ -882,7 +882,7 @@ function bbp_recount_rewalk() {
|
|
| 882 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 883 |
( SELECT `topic`.`ID`, '_bbp_last_active_time', MAX( `reply`.`post_date` )
|
| 884 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 885 |
-
WHERE `reply`.`post_status` IN ( '
|
| 886 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 887 |
return array( 8, sprintf( $statement, $result ) );
|
| 888 |
|
| 195 |
// Post types and status
|
| 196 |
$tpt = bbp_get_topic_post_type();
|
| 197 |
$rpt = bbp_get_reply_post_type();
|
| 198 |
+
$pps = bbp_get_public_status_id();
|
| 199 |
+
$cps = bbp_get_closed_status_id();
|
| 200 |
|
| 201 |
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
| 202 |
SELECT `topics`.`ID` AS `post_id`, '_bbp_reply_count' AS `meta_key`, COUNT(`replies`.`ID`) As `meta_value`
|
| 239 |
// Post types and status
|
| 240 |
$tpt = bbp_get_topic_post_type();
|
| 241 |
$rpt = bbp_get_reply_post_type();
|
| 242 |
+
$pps = bbp_get_public_status_id();
|
| 243 |
+
$cps = bbp_get_closed_status_id();
|
| 244 |
|
| 245 |
$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
| 246 |
SELECT `postmeta`.`meta_value`, '_bbp_voice_count', COUNT(DISTINCT `post_author`) as `meta_value`
|
| 279 |
if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
|
| 280 |
return array( 1, sprintf( $statement, $result ) );
|
| 281 |
|
| 282 |
+
$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( bbp_get_trash_status_id(), bbp_get_spam_status_id() ) ) . "') GROUP BY `post_parent`);";
|
| 283 |
if ( is_wp_error( $wpdb->query( $sql ) ) )
|
| 284 |
return array( 2, sprintf( $statement, $result ) );
|
| 285 |
|
| 366 |
* @return array An array of the status code and the message
|
| 367 |
*/
|
| 368 |
function bbp_recount_user_topics_replied() {
|
| 369 |
+
global $wpdb, $bbp;
|
| 370 |
|
| 371 |
$statement = __( 'Counting the number of topics to which each user has replied… %s', 'bbpress' );
|
| 372 |
$result = __( 'Failed!', 'bbpress' );
|
| 373 |
|
| 374 |
+
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$wpdb->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`;";
|
| 375 |
$insert_rows = $wpdb->get_results( $sql_select );
|
| 376 |
|
| 377 |
if ( is_wp_error( $insert_rows ) )
|
| 705 |
* @return array An array of the status code and the message
|
| 706 |
*/
|
| 707 |
function bbp_recount_clean_favorites() {
|
| 708 |
+
global $wpdb, $bbp;
|
| 709 |
|
| 710 |
$statement = __( 'Removing trashed topics from user favorites… %s', 'bbpress' );
|
| 711 |
$result = __( 'Failed!', 'bbpress' );
|
| 714 |
if ( is_wp_error( $users ) )
|
| 715 |
return array( 1, sprintf( $statement, $result ) );
|
| 716 |
|
| 717 |
+
$topics = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "';" );
|
| 718 |
|
| 719 |
if ( is_wp_error( $topics ) )
|
| 720 |
return array( 2, sprintf( $statement, $result ) );
|
| 764 |
* @return array An array of the status code and the message
|
| 765 |
*/
|
| 766 |
function bbp_recount_clean_subscriptions() {
|
| 767 |
+
global $wpdb, $bbp;
|
| 768 |
|
| 769 |
$statement = __( 'Removing trashed topics from user subscriptions… %s', 'bbpress' );
|
| 770 |
$result = __( 'Failed!', 'bbpress' );
|
| 773 |
if ( is_wp_error( $users ) )
|
| 774 |
return array( 1, sprintf( $statement, $result ) );
|
| 775 |
|
| 776 |
+
$topics = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "';" );
|
| 777 |
if ( is_wp_error( $topics ) )
|
| 778 |
return array( 2, sprintf( $statement, $result ) );
|
| 779 |
|
| 821 |
* @return array An array of the status code and the message
|
| 822 |
*/
|
| 823 |
function bbp_recount_rewalk() {
|
| 824 |
+
global $wpdb, $bbp;
|
| 825 |
|
| 826 |
$statement = __( 'Recomputing latest post in every topic and forum… %s', 'bbpress' );
|
| 827 |
$result = __( 'Failed!', 'bbpress' );
|
| 834 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 835 |
( SELECT `topic`.`ID`, '_bbp_last_reply_id', MAX( `reply`.`ID` )
|
| 836 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 837 |
+
WHERE `reply`.`post_status` IN ( '" . bbp_get_public_status_id() . "' ) AND `topic`.`post_type` = 'topic' AND `reply`.`post_type` = 'reply'
|
| 838 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 839 |
return array( 2, sprintf( $statement, $result ) );
|
| 840 |
|
| 850 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 851 |
( SELECT `forum`.`ID`, '_bbp_last_topic_id', `topic`.`ID`
|
| 852 |
FROM `$wpdb->posts` AS `forum` INNER JOIN `$wpdb->posts` AS `topic` ON `forum`.`ID` = `topic`.`post_parent`
|
| 853 |
+
WHERE `topic`.`post_status` IN ( '" . bbp_get_public_status_id() . "' ) AND `forum`.`post_type` = 'forum' AND `topic`.`post_type` = 'topic'
|
| 854 |
GROUP BY `forum`.`ID` );" ) ) )
|
| 855 |
return array( 4, sprintf( $statement, $result ) );
|
| 856 |
|
| 866 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 867 |
( SELECT `topic`.`ID`, '_bbp_last_active_id', MAX( `reply`.`ID` )
|
| 868 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 869 |
+
WHERE `reply`.`post_status` IN ( '" . bbp_get_public_status_id() . "' ) AND `topic`.`post_type` = 'topic' AND `reply`.`post_type` = 'reply'
|
| 870 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 871 |
return array( 6, sprintf( $statement, $result ) );
|
| 872 |
|
| 882 |
if ( is_wp_error( $wpdb->query( "INSERT INTO `$wpdb->postmeta` (`post_id`, `meta_key`, `meta_value`)
|
| 883 |
( SELECT `topic`.`ID`, '_bbp_last_active_time', MAX( `reply`.`post_date` )
|
| 884 |
FROM `$wpdb->posts` AS `topic` INNER JOIN `$wpdb->posts` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
| 885 |
+
WHERE `reply`.`post_status` IN ( '" . bbp_get_public_status_id() . "' ) AND `topic`.`post_type` = 'topic' AND `reply`.`post_type` = 'reply'
|
| 886 |
GROUP BY `topic`.`ID` );" ) ) )
|
| 887 |
return array( 8, sprintf( $statement, $result ) );
|
| 888 |
|
bbp-admin/bbp-metaboxes.php
CHANGED
|
@@ -277,9 +277,9 @@ function bbp_forum_metabox() {
|
|
| 277 |
/** Visibility ************************************************************/
|
| 278 |
|
| 279 |
$forum['visibility'] = array(
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
);
|
| 284 |
$visibility_output = '<select name="bbp_forum_visibility" id="bbp_forum_visibility_select">' . "\n";
|
| 285 |
|
| 277 |
/** Visibility ************************************************************/
|
| 278 |
|
| 279 |
$forum['visibility'] = array(
|
| 280 |
+
bbp_get_public_status_id() => __( 'Public', 'bbpress' ),
|
| 281 |
+
bbp_get_private_status_id() => __( 'Private', 'bbpress' ),
|
| 282 |
+
bbp_get_hidden_status_id() => __( 'Hidden', 'bbpress' )
|
| 283 |
);
|
| 284 |
$visibility_output = '<select name="bbp_forum_visibility" id="bbp_forum_visibility_select">' . "\n";
|
| 285 |
|
bbp-admin/bbp-replies.php
CHANGED
|
@@ -665,7 +665,6 @@ class BBP_Replies_Admin {
|
|
| 665 |
* @return array $actions Actions
|
| 666 |
*/
|
| 667 |
function replies_row_actions( $actions, $reply ) {
|
| 668 |
-
global $bbp;
|
| 669 |
|
| 670 |
if ( bbp_get_reply_post_type() == $reply->post_type ) {
|
| 671 |
unset( $actions['inline hide-if-no-js'] );
|
|
@@ -674,32 +673,33 @@ class BBP_Replies_Admin {
|
|
| 674 |
$actions['view'] = '<a href="' . bbp_get_reply_url( $reply->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
|
| 675 |
|
| 676 |
// User cannot view replies in trash
|
| 677 |
-
if ( (
|
| 678 |
unset( $actions['view'] );
|
| 679 |
|
| 680 |
// Only show the actions if the user is capable of viewing them
|
| 681 |
if ( current_user_can( 'moderate', $reply->ID ) ) {
|
| 682 |
-
if ( in_array( $reply->post_status, array(
|
| 683 |
$spam_uri = esc_url( wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ) );
|
| 684 |
-
if ( bbp_is_reply_spam( $reply->ID ) )
|
| 685 |
$actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . __( 'Not spam', 'bbpress' ) . '</a>';
|
| 686 |
-
else
|
| 687 |
$actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark this reply as spam', 'bbpress' ) . '">' . __( 'Spam', 'bbpress' ) . '</a>';
|
|
|
|
| 688 |
}
|
| 689 |
}
|
| 690 |
|
| 691 |
// Trash
|
| 692 |
if ( current_user_can( 'delete_reply', $reply->ID ) ) {
|
| 693 |
-
if (
|
| 694 |
$post_type_object = get_post_type_object( bbp_get_reply_post_type() );
|
| 695 |
$actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
|
| 696 |
} elseif ( EMPTY_TRASH_DAYS ) {
|
| 697 |
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
|
| 698 |
}
|
| 699 |
|
| 700 |
-
if (
|
| 701 |
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
|
| 702 |
-
} elseif (
|
| 703 |
unset( $actions['trash'] );
|
| 704 |
}
|
| 705 |
}
|
|
@@ -731,7 +731,7 @@ class BBP_Replies_Admin {
|
|
| 731 |
return;
|
| 732 |
|
| 733 |
// Add Empty Spam button
|
| 734 |
-
if ( !empty( $_GET['post_status'] ) && (
|
| 735 |
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
| 736 |
$title = esc_attr__( 'Empty Spam', 'bbpress' );
|
| 737 |
submit_button( $title, 'button-secondary apply', 'delete_all', false );
|
|
@@ -872,6 +872,9 @@ endif; // class_exists check
|
|
| 872 |
function bbp_admin_replies() {
|
| 873 |
global $bbp;
|
| 874 |
|
|
|
|
|
|
|
|
|
|
| 875 |
$bbp->admin->replies = new BBP_Replies_Admin();
|
| 876 |
}
|
| 877 |
|
| 665 |
* @return array $actions Actions
|
| 666 |
*/
|
| 667 |
function replies_row_actions( $actions, $reply ) {
|
|
|
|
| 668 |
|
| 669 |
if ( bbp_get_reply_post_type() == $reply->post_type ) {
|
| 670 |
unset( $actions['inline hide-if-no-js'] );
|
| 673 |
$actions['view'] = '<a href="' . bbp_get_reply_url( $reply->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
|
| 674 |
|
| 675 |
// User cannot view replies in trash
|
| 676 |
+
if ( ( bbp_get_trash_status_id() == $reply->post_status ) && !current_user_can( 'view_trash' ) )
|
| 677 |
unset( $actions['view'] );
|
| 678 |
|
| 679 |
// Only show the actions if the user is capable of viewing them
|
| 680 |
if ( current_user_can( 'moderate', $reply->ID ) ) {
|
| 681 |
+
if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_spam_status_id() ) ) ) {
|
| 682 |
$spam_uri = esc_url( wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ) );
|
| 683 |
+
if ( bbp_is_reply_spam( $reply->ID ) ) {
|
| 684 |
$actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . __( 'Not spam', 'bbpress' ) . '</a>';
|
| 685 |
+
} else {
|
| 686 |
$actions['spam'] = '<a href="' . $spam_uri . '" title="' . esc_attr__( 'Mark this reply as spam', 'bbpress' ) . '">' . __( 'Spam', 'bbpress' ) . '</a>';
|
| 687 |
+
}
|
| 688 |
}
|
| 689 |
}
|
| 690 |
|
| 691 |
// Trash
|
| 692 |
if ( current_user_can( 'delete_reply', $reply->ID ) ) {
|
| 693 |
+
if ( bbp_get_trash_status_id() == $reply->post_status ) {
|
| 694 |
$post_type_object = get_post_type_object( bbp_get_reply_post_type() );
|
| 695 |
$actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
|
| 696 |
} elseif ( EMPTY_TRASH_DAYS ) {
|
| 697 |
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
|
| 698 |
}
|
| 699 |
|
| 700 |
+
if ( bbp_get_trash_status_id() == $reply->post_status || !EMPTY_TRASH_DAYS ) {
|
| 701 |
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $reply->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
|
| 702 |
+
} elseif ( bbp_get_spam_status_id() == $reply->post_status ) {
|
| 703 |
unset( $actions['trash'] );
|
| 704 |
}
|
| 705 |
}
|
| 731 |
return;
|
| 732 |
|
| 733 |
// Add Empty Spam button
|
| 734 |
+
if ( !empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() == $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
|
| 735 |
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
| 736 |
$title = esc_attr__( 'Empty Spam', 'bbpress' );
|
| 737 |
submit_button( $title, 'button-secondary apply', 'delete_all', false );
|
| 872 |
function bbp_admin_replies() {
|
| 873 |
global $bbp;
|
| 874 |
|
| 875 |
+
// Bail if bbPress is not loaded
|
| 876 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 877 |
+
|
| 878 |
$bbp->admin->replies = new BBP_Replies_Admin();
|
| 879 |
}
|
| 880 |
|
bbp-admin/bbp-settings.php
CHANGED
|
@@ -309,7 +309,7 @@ function bbp_admin_setting_callback_include_root() {
|
|
| 309 |
?>
|
| 310 |
|
| 311 |
<input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( get_option( '_bbp_include_root', true ) ); ?> />
|
| 312 |
-
<label for="_bbp_include_root"><?php _e( '
|
| 313 |
|
| 314 |
<?php
|
| 315 |
}
|
|
@@ -553,56 +553,80 @@ function bbp_form_option( $option, $default = '' , $slug = false ) {
|
|
| 553 |
*/
|
| 554 |
function bbp_form_slug_conflict_check( $slug, $default ) {
|
| 555 |
|
|
|
|
|
|
|
|
|
|
| 556 |
// Get the form value
|
| 557 |
$this_slug = bbp_get_form_option( $slug, $default, true );
|
| 558 |
-
|
| 559 |
-
// Slugs to check
|
| 560 |
-
$core_slugs = apply_filters( 'bbp_slug_conflict_check', array(
|
| 561 |
-
|
| 562 |
-
/** WordPress Core ****************************************************/
|
| 563 |
-
|
| 564 |
-
// Core Post Types
|
| 565 |
-
'post_base' => array( 'name' => __( 'Posts' ), 'default' => 'post' ),
|
| 566 |
-
'page_base' => array( 'name' => __( 'Pages' ), 'default' => 'page' ),
|
| 567 |
-
'revision_base' => array( 'name' => __( 'Revisions' ), 'default' => 'revision' ),
|
| 568 |
-
'attachment_base' => array( 'name' => __( 'Attachments' ), 'default' => 'attachment' ),
|
| 569 |
-
'nav_menu_base' => array( 'name' => __( 'Menus' ), 'default' => 'nav_menu_item' ),
|
| 570 |
-
|
| 571 |
-
// Post Tags
|
| 572 |
-
'tag_base' => array( 'name' => __( 'Tag base' ), 'default' => 'tag' ),
|
| 573 |
-
|
| 574 |
-
// Post Categories
|
| 575 |
-
'category_base' => array( 'name' => __( 'Category base' ), 'default' => 'category' ),
|
| 576 |
-
|
| 577 |
-
/** bbPress Core ******************************************************/
|
| 578 |
|
| 579 |
-
|
| 580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 581 |
|
| 582 |
-
|
| 583 |
-
|
| 584 |
|
| 585 |
-
|
| 586 |
-
|
| 587 |
|
| 588 |
-
|
| 589 |
-
'_bbp_topic_slug' => array( 'name' => __( 'Topic slug', 'bbpress' ), 'default' => 'topic' ),
|
| 590 |
|
| 591 |
-
|
| 592 |
-
|
| 593 |
|
| 594 |
-
|
| 595 |
-
|
| 596 |
|
| 597 |
-
|
| 598 |
-
|
| 599 |
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
|
| 604 |
// Loop through slugs to check
|
| 605 |
-
foreach( $
|
| 606 |
|
| 607 |
// Get the slug
|
| 608 |
$slug_check = bbp_get_form_option( $key, $value['default'], true );
|
|
@@ -610,7 +634,7 @@ function bbp_form_slug_conflict_check( $slug, $default ) {
|
|
| 610 |
// Compare
|
| 611 |
if ( ( $slug != $key ) && ( $slug_check == $this_slug ) ) : ?>
|
| 612 |
|
| 613 |
-
<span class="attention"><?php printf( __( 'Possible
|
| 614 |
|
| 615 |
<?php endif;
|
| 616 |
}
|
| 309 |
?>
|
| 310 |
|
| 311 |
<input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( get_option( '_bbp_include_root', true ) ); ?> />
|
| 312 |
+
<label for="_bbp_include_root"><?php _e( 'Prefix your forum area with the Forum Base slug (Recommended)', 'bbpress' ); ?></label>
|
| 313 |
|
| 314 |
<?php
|
| 315 |
}
|
| 553 |
*/
|
| 554 |
function bbp_form_slug_conflict_check( $slug, $default ) {
|
| 555 |
|
| 556 |
+
// Only set the slugs once ver page load
|
| 557 |
+
static $the_core_slugs;
|
| 558 |
+
|
| 559 |
// Get the form value
|
| 560 |
$this_slug = bbp_get_form_option( $slug, $default, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
|
| 562 |
+
if ( empty( $the_core_slugs ) ) {
|
| 563 |
+
|
| 564 |
+
// Slugs to check
|
| 565 |
+
$core_slugs = apply_filters( 'bbp_slug_conflict_check', array(
|
| 566 |
+
|
| 567 |
+
/** WordPress Core ****************************************************/
|
| 568 |
+
|
| 569 |
+
// Core Post Types
|
| 570 |
+
'post_base' => array( 'name' => __( 'Posts' ), 'default' => 'post', 'context' => 'WordPress' ),
|
| 571 |
+
'page_base' => array( 'name' => __( 'Pages' ), 'default' => 'page', 'context' => 'WordPress' ),
|
| 572 |
+
'revision_base' => array( 'name' => __( 'Revisions' ), 'default' => 'revision', 'context' => 'WordPress' ),
|
| 573 |
+
'attachment_base' => array( 'name' => __( 'Attachments' ), 'default' => 'attachment', 'context' => 'WordPress' ),
|
| 574 |
+
'nav_menu_base' => array( 'name' => __( 'Menus' ), 'default' => 'nav_menu_item', 'context' => 'WordPress' ),
|
| 575 |
|
| 576 |
+
// Post Tags
|
| 577 |
+
'tag_base' => array( 'name' => __( 'Tag base' ), 'default' => 'tag', 'context' => 'WordPress' ),
|
| 578 |
|
| 579 |
+
// Post Categories
|
| 580 |
+
'category_base' => array( 'name' => __( 'Category base' ), 'default' => 'category', 'context' => 'WordPress' ),
|
| 581 |
|
| 582 |
+
/** bbPress Core ******************************************************/
|
|
|
|
| 583 |
|
| 584 |
+
// Forum archive slug
|
| 585 |
+
'_bbp_root_slug' => array( 'name' => __( 'Forums base', 'bbpress' ), 'default' => 'forums', 'context' => 'bbPress' ),
|
| 586 |
|
| 587 |
+
// Topic archive slug
|
| 588 |
+
'_bbp_topic_archive_slug' => array( 'name' => __( 'Topics base', 'bbpress' ), 'default' => 'topics', 'context' => 'bbPress' ),
|
| 589 |
|
| 590 |
+
// Forum slug
|
| 591 |
+
'_bbp_forum_slug' => array( 'name' => __( 'Forum slug', 'bbpress' ), 'default' => 'forum', 'context' => 'bbPress' ),
|
| 592 |
|
| 593 |
+
// Topic slug
|
| 594 |
+
'_bbp_topic_slug' => array( 'name' => __( 'Topic slug', 'bbpress' ), 'default' => 'topic', 'context' => 'bbPress' ),
|
| 595 |
+
|
| 596 |
+
// Reply slug
|
| 597 |
+
'_bbp_reply_slug' => array( 'name' => __( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ),
|
| 598 |
+
|
| 599 |
+
// User profile slug
|
| 600 |
+
'_bbp_user_slug' => array( 'name' => __( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ),
|
| 601 |
+
|
| 602 |
+
// View slug
|
| 603 |
+
'_bbp_view_slug' => array( 'name' => __( 'View base', 'bbpress' ), 'default' => 'view', 'context' => 'bbPress' ),
|
| 604 |
+
|
| 605 |
+
// Topic tag slug
|
| 606 |
+
'_bbp_topic_tag_slug' => array( 'name' => __( 'Topic tag slug', 'bbpress' ), 'default' => 'topic-tag', 'context' => 'bbPress' ),
|
| 607 |
+
) );
|
| 608 |
+
|
| 609 |
+
/** BuddyPress Core *******************************************************/
|
| 610 |
+
|
| 611 |
+
if ( defined( 'BP_VERSION' ) ) {
|
| 612 |
+
global $bp;
|
| 613 |
+
|
| 614 |
+
// Loop through root slugs and check for conflict
|
| 615 |
+
if ( !empty( $bp->pages ) ) {
|
| 616 |
+
foreach ( $bp->pages as $page => $page_data ) {
|
| 617 |
+
$page_base = $page . '_base';
|
| 618 |
+
$page_title = sprintf( __( '%s page', 'bbpress' ), $page_data->title );
|
| 619 |
+
$core_slugs[$page_base] = array( 'name' => $page_title, 'default' => $page_data->slug, 'context' => 'BuddyPress' );
|
| 620 |
+
}
|
| 621 |
+
}
|
| 622 |
+
}
|
| 623 |
+
|
| 624 |
+
// Set the static
|
| 625 |
+
$the_core_slugs = apply_filters( 'bbp_slug_conflict', $core_slugs );
|
| 626 |
+
}
|
| 627 |
|
| 628 |
// Loop through slugs to check
|
| 629 |
+
foreach( $the_core_slugs as $key => $value ) {
|
| 630 |
|
| 631 |
// Get the slug
|
| 632 |
$slug_check = bbp_get_form_option( $key, $value['default'], true );
|
| 634 |
// Compare
|
| 635 |
if ( ( $slug != $key ) && ( $slug_check == $this_slug ) ) : ?>
|
| 636 |
|
| 637 |
+
<span class="attention"><?php printf( __( 'Possible %1$s conflict: <strong>%2$s</strong>', 'bbpress' ), $value['context'], $value['name'] ); ?></span>
|
| 638 |
|
| 639 |
<?php endif;
|
| 640 |
}
|
bbp-admin/bbp-topics.php
CHANGED
|
@@ -720,13 +720,12 @@ class BBP_Topics_Admin {
|
|
| 720 |
* @return array $actions Actions
|
| 721 |
*/
|
| 722 |
function topics_row_actions( $actions, $topic ) {
|
| 723 |
-
global $bbp;
|
| 724 |
|
| 725 |
if ( $topic->post_type == $this->post_type ) {
|
| 726 |
unset( $actions['inline hide-if-no-js'] );
|
| 727 |
|
| 728 |
// Show view link if it's not set, the topic is trashed and the user can view trashed topics
|
| 729 |
-
if ( empty( $actions['view'] ) &&
|
| 730 |
$actions['view'] = '<a href="' . bbp_get_topic_permalink( $topic->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
|
| 731 |
|
| 732 |
// Only show the actions if the user is capable of viewing them :)
|
|
@@ -734,7 +733,7 @@ class BBP_Topics_Admin {
|
|
| 734 |
|
| 735 |
// Close
|
| 736 |
// Show the 'close' and 'open' link on published and closed posts only
|
| 737 |
-
if ( in_array( $topic->post_status, array(
|
| 738 |
$close_uri = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ) );
|
| 739 |
if ( bbp_is_topic_open( $topic->ID ) )
|
| 740 |
$actions['closed'] = '<a href="' . $close_uri . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . __( 'Close', 'bbpress' ) . '</a>';
|
|
@@ -766,16 +765,16 @@ class BBP_Topics_Admin {
|
|
| 766 |
|
| 767 |
// Do not show trash links for spam topics, or spam links for trashed topics
|
| 768 |
if ( current_user_can( 'delete_topic', $topic->ID ) ) {
|
| 769 |
-
if (
|
| 770 |
$post_type_object = get_post_type_object( bbp_get_topic_post_type() );
|
| 771 |
$actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
|
| 772 |
} elseif ( EMPTY_TRASH_DAYS ) {
|
| 773 |
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
|
| 774 |
}
|
| 775 |
|
| 776 |
-
if (
|
| 777 |
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
|
| 778 |
-
} elseif (
|
| 779 |
unset( $actions['trash'] );
|
| 780 |
}
|
| 781 |
}
|
|
@@ -807,7 +806,7 @@ class BBP_Topics_Admin {
|
|
| 807 |
return;
|
| 808 |
|
| 809 |
// Add Empty Spam button
|
| 810 |
-
if ( !empty( $_GET['post_status'] ) && (
|
| 811 |
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
| 812 |
$title = esc_attr__( 'Empty Spam', 'bbpress' );
|
| 813 |
submit_button( $title, 'button-secondary apply', 'delete_all', false );
|
|
@@ -948,6 +947,9 @@ endif; // class_exists check
|
|
| 948 |
function bbp_admin_topics() {
|
| 949 |
global $bbp;
|
| 950 |
|
|
|
|
|
|
|
|
|
|
| 951 |
$bbp->admin->topics = new BBP_Topics_Admin();
|
| 952 |
}
|
| 953 |
|
| 720 |
* @return array $actions Actions
|
| 721 |
*/
|
| 722 |
function topics_row_actions( $actions, $topic ) {
|
|
|
|
| 723 |
|
| 724 |
if ( $topic->post_type == $this->post_type ) {
|
| 725 |
unset( $actions['inline hide-if-no-js'] );
|
| 726 |
|
| 727 |
// Show view link if it's not set, the topic is trashed and the user can view trashed topics
|
| 728 |
+
if ( empty( $actions['view'] ) && ( bbp_get_trash_status_id() == $topic->post_status ) && current_user_can( 'view_trash' ) )
|
| 729 |
$actions['view'] = '<a href="' . bbp_get_topic_permalink( $topic->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . __( 'View', 'bbpress' ) . '</a>';
|
| 730 |
|
| 731 |
// Only show the actions if the user is capable of viewing them :)
|
| 733 |
|
| 734 |
// Close
|
| 735 |
// Show the 'close' and 'open' link on published and closed posts only
|
| 736 |
+
if ( in_array( $topic->post_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) {
|
| 737 |
$close_uri = esc_url( wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID ) );
|
| 738 |
if ( bbp_is_topic_open( $topic->ID ) )
|
| 739 |
$actions['closed'] = '<a href="' . $close_uri . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . __( 'Close', 'bbpress' ) . '</a>';
|
| 765 |
|
| 766 |
// Do not show trash links for spam topics, or spam links for trashed topics
|
| 767 |
if ( current_user_can( 'delete_topic', $topic->ID ) ) {
|
| 768 |
+
if ( bbp_get_trash_status_id() == $topic->post_status ) {
|
| 769 |
$post_type_object = get_post_type_object( bbp_get_topic_post_type() );
|
| 770 |
$actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash', 'bbpress' ) ) . "' href='" . wp_nonce_url( add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) . "'>" . __( 'Restore', 'bbpress' ) . "</a>";
|
| 771 |
} elseif ( EMPTY_TRASH_DAYS ) {
|
| 772 |
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID ) ) . "'>" . __( 'Trash', 'bbpress' ) . "</a>";
|
| 773 |
}
|
| 774 |
|
| 775 |
+
if ( bbp_get_trash_status_id() == $topic->post_status || !EMPTY_TRASH_DAYS ) {
|
| 776 |
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently', 'bbpress' ) ) . "' href='" . add_query_arg( array( '_wp_http_referer' => add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), admin_url( 'edit.php' ) ) ), get_delete_post_link( $topic->ID, '', true ) ) . "'>" . __( 'Delete Permanently', 'bbpress' ) . "</a>";
|
| 777 |
+
} elseif ( bbp_get_spam_status_id() == $topic->post_status ) {
|
| 778 |
unset( $actions['trash'] );
|
| 779 |
}
|
| 780 |
}
|
| 806 |
return;
|
| 807 |
|
| 808 |
// Add Empty Spam button
|
| 809 |
+
if ( !empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() == $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
|
| 810 |
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
| 811 |
$title = esc_attr__( 'Empty Spam', 'bbpress' );
|
| 812 |
submit_button( $title, 'button-secondary apply', 'delete_all', false );
|
| 947 |
function bbp_admin_topics() {
|
| 948 |
global $bbp;
|
| 949 |
|
| 950 |
+
// Bail if bbPress is not loaded
|
| 951 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 952 |
+
|
| 953 |
$bbp->admin->topics = new BBP_Topics_Admin();
|
| 954 |
}
|
| 955 |
|
bbp-admin/bbp-users.php
CHANGED
|
@@ -110,6 +110,9 @@ endif; // class exists
|
|
| 110 |
function bbp_users_admin() {
|
| 111 |
global $bbp;
|
| 112 |
|
|
|
|
|
|
|
|
|
|
| 113 |
$bbp->admin->users = new BBP_Users_Admin();
|
| 114 |
}
|
| 115 |
|
| 110 |
function bbp_users_admin() {
|
| 111 |
global $bbp;
|
| 112 |
|
| 113 |
+
// Bail if bbPress is not loaded
|
| 114 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 115 |
+
|
| 116 |
$bbp->admin->users = new BBP_Users_Admin();
|
| 117 |
}
|
| 118 |
|
bbp-admin/importers/bbpress.php
CHANGED
|
@@ -879,7 +879,7 @@ class bbPress_Importer {
|
|
| 879 |
echo "<li>" . sprintf( __( 'Total number of forums: %s', 'bbpress' ), count( $forums ) ) . "</li>\n";
|
| 880 |
|
| 881 |
$forum_map = array();
|
| 882 |
-
$post_statuses = array(
|
| 883 |
|
| 884 |
foreach ( (array) $forums as $forum ) {
|
| 885 |
echo "<li>" . sprintf( __( 'Processing forum #%1$s (<a href="%2$s">%3$s</a>)', 'bbpress' ), $forum->forum_id, get_forum_link( $forum->forum_id ), esc_html( $forum->forum_name ) ) . "\n<ul>\n";
|
|
@@ -890,7 +890,7 @@ class bbPress_Importer {
|
|
| 890 |
'post_content' => $forum->forum_desc,
|
| 891 |
'post_title' => $forum->forum_name,
|
| 892 |
'post_excerpt' => '',
|
| 893 |
-
'post_status' =>
|
| 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,
|
|
@@ -943,7 +943,7 @@ class bbPress_Importer {
|
|
| 943 |
$first_post = bb_get_first_post( $topic->topic_id );
|
| 944 |
|
| 945 |
// If the topic is public, check if it's open and set the status accordingly
|
| 946 |
-
$topic_status = $topic->topic_status == 0 ? ( $topic->topic_open == 0 ?
|
| 947 |
|
| 948 |
$inserted_topic = wp_insert_post( array(
|
| 949 |
'post_parent' => $inserted_forum,
|
|
@@ -1037,7 +1037,7 @@ class bbPress_Importer {
|
|
| 1037 |
}
|
| 1038 |
|
| 1039 |
// Only add favorites and subscriptions if the topic is public
|
| 1040 |
-
if ( in_array( $topic_status, array(
|
| 1041 |
|
| 1042 |
// Favorites
|
| 1043 |
foreach ( (array) $this->bb_get_topic_favoriters( $topic->topic_id ) as $favoriter )
|
| 879 |
echo "<li>" . sprintf( __( 'Total number of forums: %s', 'bbpress' ), count( $forums ) ) . "</li>\n";
|
| 880 |
|
| 881 |
$forum_map = array();
|
| 882 |
+
$post_statuses = array( bbp_get_public_status_id(), bbp_get_trash_status_id(), bbp_get_spam_status_id() );
|
| 883 |
|
| 884 |
foreach ( (array) $forums as $forum ) {
|
| 885 |
echo "<li>" . sprintf( __( 'Processing forum #%1$s (<a href="%2$s">%3$s</a>)', 'bbpress' ), $forum->forum_id, get_forum_link( $forum->forum_id ), esc_html( $forum->forum_name ) ) . "\n<ul>\n";
|
| 890 |
'post_content' => $forum->forum_desc,
|
| 891 |
'post_title' => $forum->forum_name,
|
| 892 |
'post_excerpt' => '',
|
| 893 |
+
'post_status' => bbp_get_public_status_id(),
|
| 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,
|
| 943 |
$first_post = bb_get_first_post( $topic->topic_id );
|
| 944 |
|
| 945 |
// If the topic is public, check if it's open and set the status accordingly
|
| 946 |
+
$topic_status = $topic->topic_status == 0 ? ( $topic->topic_open == 0 ? bbp_get_closed_status_id() : $post_statuses[$topic->topic_status] ) : $post_statuses[$topic->topic_status];
|
| 947 |
|
| 948 |
$inserted_topic = wp_insert_post( array(
|
| 949 |
'post_parent' => $inserted_forum,
|
| 1037 |
}
|
| 1038 |
|
| 1039 |
// Only add favorites and subscriptions if the topic is public
|
| 1040 |
+
if ( in_array( $topic_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) {
|
| 1041 |
|
| 1042 |
// Favorites
|
| 1043 |
foreach ( (array) $this->bb_get_topic_favoriters( $topic->topic_id ) as $favoriter )
|
bbp-includes/bbp-common-functions.php
CHANGED
|
@@ -439,7 +439,6 @@ function bbp_past_edit_lock( $post_date_gmt ) {
|
|
| 439 |
* @return object Walked forum tree
|
| 440 |
*/
|
| 441 |
function bbp_get_statistics( $args = '' ) {
|
| 442 |
-
global $bbp;
|
| 443 |
|
| 444 |
$defaults = array (
|
| 445 |
'count_users' => true,
|
|
@@ -469,24 +468,30 @@ function bbp_get_statistics( $args = '' ) {
|
|
| 469 |
$forum_count = $forum_count->publish;
|
| 470 |
}
|
| 471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
// Topics
|
| 473 |
if ( !empty( $count_topics ) ) {
|
| 474 |
|
| 475 |
$all_topics = wp_count_posts( bbp_get_topic_post_type() );
|
| 476 |
|
| 477 |
// Published (publish + closed)
|
| 478 |
-
$topic_count = $all_topics->publish + $all_topics->{$
|
| 479 |
|
| 480 |
if ( current_user_can( 'read_private_topics' ) || current_user_can( 'edit_others_topics' ) || current_user_can( 'view_trash' ) ) {
|
| 481 |
|
| 482 |
// Private
|
| 483 |
-
$topics['private'] = ( !empty( $count_private_topics ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->private
|
| 484 |
|
| 485 |
// Spam
|
| 486 |
-
$topics['spammed'] = ( !empty( $count_spammed_topics ) && current_user_can( 'edit_others_topics' ) ) ? (int) $all_topics->{$
|
| 487 |
|
| 488 |
// Trash
|
| 489 |
-
$topics['trashed'] = ( !empty( $count_trashed_topics ) && current_user_can( 'view_trash' ) ) ? (int) $all_topics->{$
|
| 490 |
|
| 491 |
// Total hidden (private + spam + trash)
|
| 492 |
$topic_count_hidden = $topics['private'] + $topics['spammed'] + $topics['trashed'];
|
|
@@ -512,13 +517,13 @@ function bbp_get_statistics( $args = '' ) {
|
|
| 512 |
if ( current_user_can( 'read_private_replies' ) || current_user_can( 'edit_others_replies' ) || current_user_can( 'view_trash' ) ) {
|
| 513 |
|
| 514 |
// Private
|
| 515 |
-
$replies['private'] = ( !empty( $count_private_replies ) && current_user_can( 'read_private_replies' ) ) ? (int) $all_replies->private
|
| 516 |
|
| 517 |
// Spam
|
| 518 |
-
$replies['spammed'] = ( !empty( $count_spammed_replies ) && current_user_can( 'edit_others_replies' ) ) ? (int) $all_replies->{$
|
| 519 |
|
| 520 |
// Trash
|
| 521 |
-
$replies['trashed'] = ( !empty( $count_trashed_replies ) && current_user_can( 'view_trash' ) ) ? (int) $all_replies->{$
|
| 522 |
|
| 523 |
// Total hidden (private + spam + trash)
|
| 524 |
$reply_count_hidden = $replies['private'] + $replies['spammed'] + $replies['trashed'];
|
|
@@ -713,7 +718,6 @@ function bbp_get_view_query_args( $view ) {
|
|
| 713 |
* @return bool|array False on errors, values in an array on success
|
| 714 |
*/
|
| 715 |
function bbp_filter_anonymous_post_data( $args = '', $is_edit = false ) {
|
| 716 |
-
global $bbp;
|
| 717 |
|
| 718 |
// Assign variables
|
| 719 |
$defaults = array (
|
|
@@ -768,7 +772,7 @@ function bbp_check_for_duplicate( $post_data ) {
|
|
| 768 |
if ( current_user_can( 'throttle' ) )
|
| 769 |
return true;
|
| 770 |
|
| 771 |
-
global $
|
| 772 |
|
| 773 |
extract( $post_data, EXTR_SKIP );
|
| 774 |
|
|
@@ -791,10 +795,11 @@ function bbp_check_for_duplicate( $post_data ) {
|
|
| 791 |
|
| 792 |
// Simple duplicate check
|
| 793 |
// Expected slashed ($post_type, $post_parent, $post_author, $post_content, $anonymous_data)
|
| 794 |
-
$
|
| 795 |
-
$dupe
|
| 796 |
-
$dupe
|
| 797 |
-
$dupe
|
|
|
|
| 798 |
|
| 799 |
if ( $wpdb->get_var( $dupe ) ) {
|
| 800 |
do_action( 'bbp_check_for_duplicate_trigger', $post_data );
|
|
@@ -854,7 +859,6 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
|
|
| 854 |
*
|
| 855 |
* @since bbPress (r3446)
|
| 856 |
*
|
| 857 |
-
* @global bbPress $bbp
|
| 858 |
* @param array $anonymous_data Anonymous user data
|
| 859 |
* @param int $author_id Topic or reply author ID
|
| 860 |
* @param string $title The title of the content
|
|
@@ -959,8 +963,13 @@ function bbp_check_for_blacklist( $anonymous_data = false, $author_id = 0, $titl
|
|
| 959 |
*
|
| 960 |
* @param int $reply_id ID of the newly made reply
|
| 961 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
|
|
|
| 962 |
* @uses bbp_get_reply() To get the reply
|
|
|
|
|
|
|
|
|
|
| 963 |
* @uses bbp_get_topic() To get the reply's topic
|
|
|
|
| 964 |
* @uses get_the_author_meta() To get the author's display name
|
| 965 |
* @uses do_action() Calls 'bbp_pre_notify_subscribers' with the reply id and
|
| 966 |
* topic id
|
|
@@ -974,55 +983,81 @@ function bbp_check_for_blacklist( $anonymous_data = false, $author_id = 0, $titl
|
|
| 974 |
* @return bool True on success, false on failure
|
| 975 |
*/
|
| 976 |
function bbp_notify_subscribers( $reply_id = 0 ) {
|
| 977 |
-
global $
|
| 978 |
|
|
|
|
| 979 |
if ( !bbp_is_subscriptions_active() )
|
| 980 |
return false;
|
| 981 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 982 |
if ( empty( $reply_id ) )
|
| 983 |
return false;
|
| 984 |
|
| 985 |
-
|
|
|
|
|
|
|
| 986 |
return false;
|
| 987 |
|
| 988 |
-
|
|
|
|
| 989 |
return false;
|
| 990 |
|
| 991 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 992 |
return false;
|
| 993 |
|
| 994 |
-
|
|
|
|
|
|
|
| 995 |
return false;
|
| 996 |
|
| 997 |
-
|
|
|
|
|
|
|
| 998 |
|
| 999 |
-
|
| 1000 |
-
|
|
|
|
|
|
|
|
|
|
| 1001 |
return false;
|
| 1002 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1003 |
// Loop through users
|
| 1004 |
foreach ( (array) $user_ids as $user_id ) {
|
| 1005 |
|
| 1006 |
// Don't send notifications to the person who made the post
|
| 1007 |
-
if ( $user_id == $reply->post_author )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1008 |
continue;
|
| 1009 |
|
| 1010 |
-
// For plugins
|
| 1011 |
-
|
|
|
|
| 1012 |
continue;
|
| 1013 |
|
| 1014 |
// Get user data of this user
|
| 1015 |
$user = get_userdata( $user_id );
|
| 1016 |
|
| 1017 |
// Send notification email
|
| 1018 |
-
wp_mail(
|
| 1019 |
-
$user->user_email,
|
| 1020 |
-
apply_filters( 'bbp_subscription_mail_title', '[' . get_option( 'blogname' ) . '] ' . $topic->post_title, $reply->ID, $topic->ID ),
|
| 1021 |
-
sprintf( $message, $poster_name, strip_tags( $reply->post_content ), bbp_get_reply_url( $reply->ID ) )
|
| 1022 |
-
);
|
| 1023 |
}
|
| 1024 |
|
| 1025 |
-
do_action( 'bbp_post_notify_subscribers', $
|
| 1026 |
|
| 1027 |
return true;
|
| 1028 |
}
|
|
@@ -1126,11 +1161,11 @@ function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1126 |
|
| 1127 |
// The ID of the cached query
|
| 1128 |
$cache_id = 'bbp_parent_' . $parent_id . '_type_' . $post_type . '_child_last_id';
|
| 1129 |
-
$post_status = array(
|
| 1130 |
|
| 1131 |
// Add closed status if topic post type
|
| 1132 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1133 |
-
$post_status[] =
|
| 1134 |
|
| 1135 |
// Join post statuses together
|
| 1136 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
|
@@ -1160,7 +1195,7 @@ function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1160 |
* @return int The number of children
|
| 1161 |
*/
|
| 1162 |
function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
| 1163 |
-
global $wpdb
|
| 1164 |
|
| 1165 |
// Bail if nothing passed
|
| 1166 |
if ( empty( $parent_id ) )
|
|
@@ -1168,11 +1203,11 @@ function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1168 |
|
| 1169 |
// The ID of the cached query
|
| 1170 |
$cache_id = 'bbp_parent_' . $parent_id . '_type_' . $post_type . '_child_count';
|
| 1171 |
-
$post_status = array(
|
| 1172 |
|
| 1173 |
// Add closed status if topic post type
|
| 1174 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1175 |
-
$post_status[] =
|
| 1176 |
|
| 1177 |
// Join post statuses together
|
| 1178 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
|
@@ -1202,7 +1237,7 @@ function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1202 |
* @return array The array of children
|
| 1203 |
*/
|
| 1204 |
function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
| 1205 |
-
global $wpdb
|
| 1206 |
|
| 1207 |
// Bail if nothing passed
|
| 1208 |
if ( empty( $parent_id ) )
|
|
@@ -1210,11 +1245,11 @@ function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1210 |
|
| 1211 |
// The ID of the cached query
|
| 1212 |
$cache_id = 'bbp_parent_public_' . $parent_id . '_type_' . $post_type . '_child_ids';
|
| 1213 |
-
$post_status = array(
|
| 1214 |
|
| 1215 |
// Add closed status if topic post type
|
| 1216 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1217 |
-
$post_status[] =
|
| 1218 |
|
| 1219 |
// Join post statuses together
|
| 1220 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
|
@@ -1243,7 +1278,7 @@ function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1243 |
* @return array The array of children
|
| 1244 |
*/
|
| 1245 |
function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
| 1246 |
-
global $wpdb
|
| 1247 |
|
| 1248 |
// Bail if nothing passed
|
| 1249 |
if ( empty( $parent_id ) )
|
|
@@ -1251,28 +1286,28 @@ function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1251 |
|
| 1252 |
// The ID of the cached query
|
| 1253 |
$cache_id = 'bbp_parent_all_' . $parent_id . '_type_' . $post_type . '_child_ids';
|
| 1254 |
-
$post_status = array(
|
| 1255 |
|
| 1256 |
// Extra post statuses based on post type
|
| 1257 |
switch ( $post_type ) {
|
| 1258 |
|
| 1259 |
// Forum
|
| 1260 |
case bbp_get_forum_post_type() :
|
| 1261 |
-
$post_status[] =
|
| 1262 |
-
$post_status[] =
|
| 1263 |
break;
|
| 1264 |
|
| 1265 |
// Topic
|
| 1266 |
case bbp_get_topic_post_type() :
|
| 1267 |
-
$post_status[] =
|
| 1268 |
-
$post_status[] =
|
| 1269 |
-
$post_status[] =
|
| 1270 |
break;
|
| 1271 |
|
| 1272 |
// Reply
|
| 1273 |
case bbp_get_reply_post_type() :
|
| 1274 |
-
$post_status[] =
|
| 1275 |
-
$post_status[] =
|
| 1276 |
break;
|
| 1277 |
}
|
| 1278 |
|
|
@@ -1299,12 +1334,11 @@ function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
| 1299 |
* @since bbPress (r3171)
|
| 1300 |
*
|
| 1301 |
* @global WP_Query $wp_query
|
| 1302 |
-
* @global bbPress $bbp
|
| 1303 |
* @param array $query_vars
|
| 1304 |
* @return array
|
| 1305 |
*/
|
| 1306 |
function bbp_request_feed_trap( $query_vars ) {
|
| 1307 |
-
global $wp_query
|
| 1308 |
|
| 1309 |
// Looking at a feed
|
| 1310 |
if ( isset( $query_vars['feed'] ) ) {
|
|
@@ -1318,6 +1352,9 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
| 1318 |
// Forum
|
| 1319 |
case bbp_get_forum_post_type() :
|
| 1320 |
|
|
|
|
|
|
|
|
|
|
| 1321 |
// Single forum
|
| 1322 |
if ( isset( $query_vars[bbp_get_forum_post_type()] ) ) {
|
| 1323 |
|
|
@@ -1336,11 +1373,7 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
| 1336 |
'key' => '_bbp_forum_id',
|
| 1337 |
'value' => $forum_id,
|
| 1338 |
'compare' => '='
|
| 1339 |
-
) );
|
| 1340 |
-
|
| 1341 |
-
// No restrictions on forum ID
|
| 1342 |
-
} else {
|
| 1343 |
-
$meta_query = array();
|
| 1344 |
}
|
| 1345 |
|
| 1346 |
// Only forum replies
|
|
@@ -1351,7 +1384,7 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
| 1351 |
'author' => 0,
|
| 1352 |
'post_type' => bbp_get_reply_post_type(),
|
| 1353 |
'post_parent' => 'any',
|
| 1354 |
-
'post_status' => join( ',', array(
|
| 1355 |
'posts_per_page' => get_option( '_bbp_replies_per_rss_page', 25 ),
|
| 1356 |
'order' => 'DESC',
|
| 1357 |
'meta_query' => $meta_query
|
|
@@ -1368,7 +1401,7 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
| 1368 |
'author' => 0,
|
| 1369 |
'post_type' => bbp_get_topic_post_type(),
|
| 1370 |
'post_parent' => 'any',
|
| 1371 |
-
'post_status' => join( ',', array(
|
| 1372 |
'posts_per_page' => get_option( '_bbp_topics_per_rss_page', 25 ),
|
| 1373 |
'order' => 'DESC',
|
| 1374 |
'meta_query' => $meta_query
|
|
@@ -1385,7 +1418,7 @@ function bbp_request_feed_trap( $query_vars ) {
|
|
| 1385 |
'author' => 0,
|
| 1386 |
'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
|
| 1387 |
'post_parent' => 'any',
|
| 1388 |
-
'post_status' => join( ',', array(
|
| 1389 |
'posts_per_page' => get_option( '_bbp_replies_per_rss_page', 25 ),
|
| 1390 |
'order' => 'DESC',
|
| 1391 |
'meta_query' => $meta_query
|
|
@@ -1502,4 +1535,97 @@ function bbp_has_errors() {
|
|
| 1502 |
return $has_errors;
|
| 1503 |
}
|
| 1504 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1505 |
?>
|
| 439 |
* @return object Walked forum tree
|
| 440 |
*/
|
| 441 |
function bbp_get_statistics( $args = '' ) {
|
|
|
|
| 442 |
|
| 443 |
$defaults = array (
|
| 444 |
'count_users' => true,
|
| 468 |
$forum_count = $forum_count->publish;
|
| 469 |
}
|
| 470 |
|
| 471 |
+
// Post statuses
|
| 472 |
+
$private = bbp_get_private_status_id();
|
| 473 |
+
$spam = bbp_get_spam_status_id();
|
| 474 |
+
$trash = bbp_get_trash_status_id();
|
| 475 |
+
$closed = bbp_get_closed_status_id();
|
| 476 |
+
|
| 477 |
// Topics
|
| 478 |
if ( !empty( $count_topics ) ) {
|
| 479 |
|
| 480 |
$all_topics = wp_count_posts( bbp_get_topic_post_type() );
|
| 481 |
|
| 482 |
// Published (publish + closed)
|
| 483 |
+
$topic_count = $all_topics->publish + $all_topics->{$closed};
|
| 484 |
|
| 485 |
if ( current_user_can( 'read_private_topics' ) || current_user_can( 'edit_others_topics' ) || current_user_can( 'view_trash' ) ) {
|
| 486 |
|
| 487 |
// Private
|
| 488 |
+
$topics['private'] = ( !empty( $count_private_topics ) && current_user_can( 'read_private_topics' ) ) ? (int) $all_topics->{$private} : 0;
|
| 489 |
|
| 490 |
// Spam
|
| 491 |
+
$topics['spammed'] = ( !empty( $count_spammed_topics ) && current_user_can( 'edit_others_topics' ) ) ? (int) $all_topics->{$spam} : 0;
|
| 492 |
|
| 493 |
// Trash
|
| 494 |
+
$topics['trashed'] = ( !empty( $count_trashed_topics ) && current_user_can( 'view_trash' ) ) ? (int) $all_topics->{$trash} : 0;
|
| 495 |
|
| 496 |
// Total hidden (private + spam + trash)
|
| 497 |
$topic_count_hidden = $topics['private'] + $topics['spammed'] + $topics['trashed'];
|
| 517 |
if ( current_user_can( 'read_private_replies' ) || current_user_can( 'edit_others_replies' ) || current_user_can( 'view_trash' ) ) {
|
| 518 |
|
| 519 |
// Private
|
| 520 |
+
$replies['private'] = ( !empty( $count_private_replies ) && current_user_can( 'read_private_replies' ) ) ? (int) $all_replies->{$private} : 0;
|
| 521 |
|
| 522 |
// Spam
|
| 523 |
+
$replies['spammed'] = ( !empty( $count_spammed_replies ) && current_user_can( 'edit_others_replies' ) ) ? (int) $all_replies->{$spam} : 0;
|
| 524 |
|
| 525 |
// Trash
|
| 526 |
+
$replies['trashed'] = ( !empty( $count_trashed_replies ) && current_user_can( 'view_trash' ) ) ? (int) $all_replies->{$trash} : 0;
|
| 527 |
|
| 528 |
// Total hidden (private + spam + trash)
|
| 529 |
$reply_count_hidden = $replies['private'] + $replies['spammed'] + $replies['trashed'];
|
| 718 |
* @return bool|array False on errors, values in an array on success
|
| 719 |
*/
|
| 720 |
function bbp_filter_anonymous_post_data( $args = '', $is_edit = false ) {
|
|
|
|
| 721 |
|
| 722 |
// Assign variables
|
| 723 |
$defaults = array (
|
| 772 |
if ( current_user_can( 'throttle' ) )
|
| 773 |
return true;
|
| 774 |
|
| 775 |
+
global $wpdb;
|
| 776 |
|
| 777 |
extract( $post_data, EXTR_SKIP );
|
| 778 |
|
| 795 |
|
| 796 |
// Simple duplicate check
|
| 797 |
// Expected slashed ($post_type, $post_parent, $post_author, $post_content, $anonymous_data)
|
| 798 |
+
$status = bbp_get_trash_status_id();
|
| 799 |
+
$dupe = "SELECT ID FROM {$wpdb->posts} {$join} WHERE post_type = '{$post_type}' AND post_status != '{$status}' AND post_author = {$post_author} AND post_content = '{$post_content}' {$where}";
|
| 800 |
+
$dupe .= !empty( $post_parent ) ? " AND post_parent = '{$post_parent}'" : '';
|
| 801 |
+
$dupe .= " LIMIT 1";
|
| 802 |
+
$dupe = apply_filters( 'bbp_check_for_duplicate_query', $dupe, $post_data );
|
| 803 |
|
| 804 |
if ( $wpdb->get_var( $dupe ) ) {
|
| 805 |
do_action( 'bbp_check_for_duplicate_trigger', $post_data );
|
| 859 |
*
|
| 860 |
* @since bbPress (r3446)
|
| 861 |
*
|
|
|
|
| 862 |
* @param array $anonymous_data Anonymous user data
|
| 863 |
* @param int $author_id Topic or reply author ID
|
| 864 |
* @param string $title The title of the content
|
| 963 |
*
|
| 964 |
* @param int $reply_id ID of the newly made reply
|
| 965 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
| 966 |
+
* @uses bbp_get_reply_id() To validate the reply ID
|
| 967 |
* @uses bbp_get_reply() To get the reply
|
| 968 |
+
* @uses bbp_get_reply_topic_id() To get the topic ID of the reply
|
| 969 |
+
* @uses bbp_is_reply_published() To make sure the reply is published
|
| 970 |
+
* @uses bbp_get_topic_id() To validate the topic ID
|
| 971 |
* @uses bbp_get_topic() To get the reply's topic
|
| 972 |
+
* @uses bbp_is_topic_published() To make sure the topic is published
|
| 973 |
* @uses get_the_author_meta() To get the author's display name
|
| 974 |
* @uses do_action() Calls 'bbp_pre_notify_subscribers' with the reply id and
|
| 975 |
* topic id
|
| 983 |
* @return bool True on success, false on failure
|
| 984 |
*/
|
| 985 |
function bbp_notify_subscribers( $reply_id = 0 ) {
|
| 986 |
+
global $wpdb;
|
| 987 |
|
| 988 |
+
// Bail if subscriptions are turned off
|
| 989 |
if ( !bbp_is_subscriptions_active() )
|
| 990 |
return false;
|
| 991 |
|
| 992 |
+
/** Reply *****************************************************************/
|
| 993 |
+
|
| 994 |
+
// Validate reply ID and bail if empty
|
| 995 |
+
$reply_id = bbp_get_reply_id( $reply_id );
|
| 996 |
if ( empty( $reply_id ) )
|
| 997 |
return false;
|
| 998 |
|
| 999 |
+
// Get the reply and bail if empty
|
| 1000 |
+
$reply = bbp_get_reply( $reply_id );
|
| 1001 |
+
if ( empty( $reply ) )
|
| 1002 |
return false;
|
| 1003 |
|
| 1004 |
+
// Bail if reply is not published
|
| 1005 |
+
if ( !bbp_is_reply_published( $reply_id ) )
|
| 1006 |
return false;
|
| 1007 |
|
| 1008 |
+
/** Topic *****************************************************************/
|
| 1009 |
+
|
| 1010 |
+
// Get topic ID and bail if empty
|
| 1011 |
+
$topic_id = bbp_get_reply_topic_id( $reply_id );
|
| 1012 |
+
if ( empty( $topic_id ) )
|
| 1013 |
return false;
|
| 1014 |
|
| 1015 |
+
// Get the topic and bail if empty
|
| 1016 |
+
$topic = bbp_get_topic( $topic_id );
|
| 1017 |
+
if ( empty( $topic ) )
|
| 1018 |
return false;
|
| 1019 |
|
| 1020 |
+
// Bail if reply is not published
|
| 1021 |
+
if ( !bbp_is_topic_published( $reply_id ) )
|
| 1022 |
+
return false;
|
| 1023 |
|
| 1024 |
+
/** User ******************************************************************/
|
| 1025 |
+
|
| 1026 |
+
// Get subscribers and bail if empty
|
| 1027 |
+
$user_ids = bbp_get_topic_subscribers( $topic_id, true );
|
| 1028 |
+
if ( empty( $user_ids ) )
|
| 1029 |
return false;
|
| 1030 |
|
| 1031 |
+
/** Mail ******************************************************************/
|
| 1032 |
+
|
| 1033 |
+
do_action( 'bbp_pre_notify_subscribers', $reply_id, $topic_id, $user_ids );
|
| 1034 |
+
|
| 1035 |
// Loop through users
|
| 1036 |
foreach ( (array) $user_ids as $user_id ) {
|
| 1037 |
|
| 1038 |
// Don't send notifications to the person who made the post
|
| 1039 |
+
if ( (int) $user_id == (int) $reply->post_author )
|
| 1040 |
+
continue;
|
| 1041 |
+
|
| 1042 |
+
// For plugins to filter messages per reply/topic/user
|
| 1043 |
+
$message = __( "%1\$s wrote:\n\n%2\$s\n\nPost Link: %3\$s\n\nYou are recieving this email because you subscribed to it. Login and visit the topic to unsubscribe from these emails.", 'bbpress' );
|
| 1044 |
+
$message = apply_filters( 'bbp_subscription_mail_message', sprintf( $message, $poster_name, strip_tags( $reply->post_content ), bbp_get_reply_url( $reply_id ) ), $reply_id, $topic_id, $user_id );
|
| 1045 |
+
if ( empty( $message ) )
|
| 1046 |
continue;
|
| 1047 |
|
| 1048 |
+
// For plugins to filter titles per reply/topic/user
|
| 1049 |
+
$subject = apply_filters( 'bbp_subscription_mail_title', '[' . get_option( 'blogname' ) . '] ' . $topic->post_title, $reply_id, $topic_id, $user_id );
|
| 1050 |
+
if ( empty( $subject ) )
|
| 1051 |
continue;
|
| 1052 |
|
| 1053 |
// Get user data of this user
|
| 1054 |
$user = get_userdata( $user_id );
|
| 1055 |
|
| 1056 |
// Send notification email
|
| 1057 |
+
wp_mail( $user->user_email, $subject, $message );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1058 |
}
|
| 1059 |
|
| 1060 |
+
do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids );
|
| 1061 |
|
| 1062 |
return true;
|
| 1063 |
}
|
| 1161 |
|
| 1162 |
// The ID of the cached query
|
| 1163 |
$cache_id = 'bbp_parent_' . $parent_id . '_type_' . $post_type . '_child_last_id';
|
| 1164 |
+
$post_status = array( bbp_get_public_status_id() );
|
| 1165 |
|
| 1166 |
// Add closed status if topic post type
|
| 1167 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1168 |
+
$post_status[] = bbp_get_closed_status_id();
|
| 1169 |
|
| 1170 |
// Join post statuses together
|
| 1171 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
| 1195 |
* @return int The number of children
|
| 1196 |
*/
|
| 1197 |
function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
| 1198 |
+
global $wpdb;
|
| 1199 |
|
| 1200 |
// Bail if nothing passed
|
| 1201 |
if ( empty( $parent_id ) )
|
| 1203 |
|
| 1204 |
// The ID of the cached query
|
| 1205 |
$cache_id = 'bbp_parent_' . $parent_id . '_type_' . $post_type . '_child_count';
|
| 1206 |
+
$post_status = array( bbp_get_public_status_id() );
|
| 1207 |
|
| 1208 |
// Add closed status if topic post type
|
| 1209 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1210 |
+
$post_status[] = bbp_get_closed_status_id();
|
| 1211 |
|
| 1212 |
// Join post statuses together
|
| 1213 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
| 1237 |
* @return array The array of children
|
| 1238 |
*/
|
| 1239 |
function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
| 1240 |
+
global $wpdb;
|
| 1241 |
|
| 1242 |
// Bail if nothing passed
|
| 1243 |
if ( empty( $parent_id ) )
|
| 1245 |
|
| 1246 |
// The ID of the cached query
|
| 1247 |
$cache_id = 'bbp_parent_public_' . $parent_id . '_type_' . $post_type . '_child_ids';
|
| 1248 |
+
$post_status = array( bbp_get_public_status_id() );
|
| 1249 |
|
| 1250 |
// Add closed status if topic post type
|
| 1251 |
if ( $post_type == bbp_get_topic_post_type() )
|
| 1252 |
+
$post_status[] = bbp_get_closed_status_id();
|
| 1253 |
|
| 1254 |
// Join post statuses together
|
| 1255 |
$post_status = "'" . join( "', '", $post_status ) . "'";
|
| 1278 |
* @return array The array of children
|
| 1279 |
*/
|
| 1280 |
function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
| 1281 |
+
global $wpdb;
|
| 1282 |
|
| 1283 |
// Bail if nothing passed
|
| 1284 |
if ( empty( $parent_id ) )
|
| 1286 |
|
| 1287 |
// The ID of the cached query
|
| 1288 |
$cache_id = 'bbp_parent_all_' . $parent_id . '_type_' . $post_type . '_child_ids';
|
| 1289 |
+
$post_status = array( bbp_get_public_status_id() );
|
| 1290 |
|
| 1291 |
// Extra post statuses based on post type
|
| 1292 |
switch ( $post_type ) {
|
| 1293 |
|
| 1294 |
// Forum
|
| 1295 |
case bbp_get_forum_post_type() :
|
| 1296 |
+
$post_status[] = bbp_get_private_status_id();
|
| 1297 |
+
$post_status[] = bbp_get_hidden_status_id();
|
| 1298 |
break;
|
| 1299 |
|
| 1300 |
// Topic
|
| 1301 |
case bbp_get_topic_post_type() :
|
| 1302 |
+
$post_status[] = bbp_get_closed_status_id();
|
| 1303 |
+
$post_status[] = bbp_get_trash_status_id();
|
| 1304 |
+
$post_status[] = bbp_get_spam_status_id();
|
| 1305 |
break;
|
| 1306 |
|
| 1307 |
// Reply
|
| 1308 |
case bbp_get_reply_post_type() :
|
| 1309 |
+
$post_status[] = bbp_get_trash_status_id();
|
| 1310 |
+
$post_status[] = bbp_get_spam_status_id();
|
| 1311 |
break;
|
| 1312 |
}
|
| 1313 |
|
| 1334 |
* @since bbPress (r3171)
|
| 1335 |
*
|
| 1336 |
* @global WP_Query $wp_query
|
|
|
|
| 1337 |
* @param array $query_vars
|
| 1338 |
* @return array
|
| 1339 |
*/
|
| 1340 |
function bbp_request_feed_trap( $query_vars ) {
|
| 1341 |
+
global $wp_query;
|
| 1342 |
|
| 1343 |
// Looking at a feed
|
| 1344 |
if ( isset( $query_vars['feed'] ) ) {
|
| 1352 |
// Forum
|
| 1353 |
case bbp_get_forum_post_type() :
|
| 1354 |
|
| 1355 |
+
// Declare local variable(s)
|
| 1356 |
+
$meta_query = array();
|
| 1357 |
+
|
| 1358 |
// Single forum
|
| 1359 |
if ( isset( $query_vars[bbp_get_forum_post_type()] ) ) {
|
| 1360 |
|
| 1373 |
'key' => '_bbp_forum_id',
|
| 1374 |
'value' => $forum_id,
|
| 1375 |
'compare' => '='
|
| 1376 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1377 |
}
|
| 1378 |
|
| 1379 |
// Only forum replies
|
| 1384 |
'author' => 0,
|
| 1385 |
'post_type' => bbp_get_reply_post_type(),
|
| 1386 |
'post_parent' => 'any',
|
| 1387 |
+
'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
|
| 1388 |
'posts_per_page' => get_option( '_bbp_replies_per_rss_page', 25 ),
|
| 1389 |
'order' => 'DESC',
|
| 1390 |
'meta_query' => $meta_query
|
| 1401 |
'author' => 0,
|
| 1402 |
'post_type' => bbp_get_topic_post_type(),
|
| 1403 |
'post_parent' => 'any',
|
| 1404 |
+
'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
|
| 1405 |
'posts_per_page' => get_option( '_bbp_topics_per_rss_page', 25 ),
|
| 1406 |
'order' => 'DESC',
|
| 1407 |
'meta_query' => $meta_query
|
| 1418 |
'author' => 0,
|
| 1419 |
'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
|
| 1420 |
'post_parent' => 'any',
|
| 1421 |
+
'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
|
| 1422 |
'posts_per_page' => get_option( '_bbp_replies_per_rss_page', 25 ),
|
| 1423 |
'order' => 'DESC',
|
| 1424 |
'meta_query' => $meta_query
|
| 1535 |
return $has_errors;
|
| 1536 |
}
|
| 1537 |
|
| 1538 |
+
/** Post Statuses *************************************************************/
|
| 1539 |
+
|
| 1540 |
+
/**
|
| 1541 |
+
* Return the public post status ID
|
| 1542 |
+
*
|
| 1543 |
+
* @since bbPress (r3504)
|
| 1544 |
+
*
|
| 1545 |
+
* @global bbPress $bbp
|
| 1546 |
+
* @return string
|
| 1547 |
+
*/
|
| 1548 |
+
function bbp_get_public_status_id() {
|
| 1549 |
+
global $bbp;
|
| 1550 |
+
return $bbp->public_status_id;
|
| 1551 |
+
}
|
| 1552 |
+
|
| 1553 |
+
/**
|
| 1554 |
+
* Return the private post status ID
|
| 1555 |
+
*
|
| 1556 |
+
* @since bbPress (r3504)
|
| 1557 |
+
*
|
| 1558 |
+
* @global bbPress $bbp
|
| 1559 |
+
* @return string
|
| 1560 |
+
*/
|
| 1561 |
+
function bbp_get_private_status_id() {
|
| 1562 |
+
global $bbp;
|
| 1563 |
+
return $bbp->private_status_id;
|
| 1564 |
+
}
|
| 1565 |
+
|
| 1566 |
+
/**
|
| 1567 |
+
* Return the hidden post status ID
|
| 1568 |
+
*
|
| 1569 |
+
* @since bbPress (r3504)
|
| 1570 |
+
*
|
| 1571 |
+
* @global bbPress $bbp
|
| 1572 |
+
* @return string
|
| 1573 |
+
*/
|
| 1574 |
+
function bbp_get_hidden_status_id() {
|
| 1575 |
+
global $bbp;
|
| 1576 |
+
return $bbp->hidden_status_id;
|
| 1577 |
+
}
|
| 1578 |
+
|
| 1579 |
+
/**
|
| 1580 |
+
* Return the closed post status ID
|
| 1581 |
+
*
|
| 1582 |
+
* @since bbPress (r3504)
|
| 1583 |
+
*
|
| 1584 |
+
* @global bbPress $bbp
|
| 1585 |
+
* @return string
|
| 1586 |
+
*/
|
| 1587 |
+
function bbp_get_closed_status_id() {
|
| 1588 |
+
global $bbp;
|
| 1589 |
+
return $bbp->closed_status_id;
|
| 1590 |
+
}
|
| 1591 |
+
|
| 1592 |
+
/**
|
| 1593 |
+
* Return the spam post status ID
|
| 1594 |
+
*
|
| 1595 |
+
* @since bbPress (r3504)
|
| 1596 |
+
*
|
| 1597 |
+
* @global bbPress $bbp
|
| 1598 |
+
* @return string
|
| 1599 |
+
*/
|
| 1600 |
+
function bbp_get_spam_status_id() {
|
| 1601 |
+
global $bbp;
|
| 1602 |
+
return $bbp->spam_status_id;
|
| 1603 |
+
}
|
| 1604 |
+
|
| 1605 |
+
/**
|
| 1606 |
+
* Return the trash post status ID
|
| 1607 |
+
*
|
| 1608 |
+
* @since bbPress (r3504)
|
| 1609 |
+
*
|
| 1610 |
+
* @global bbPress $bbp
|
| 1611 |
+
* @return string
|
| 1612 |
+
*/
|
| 1613 |
+
function bbp_get_trash_status_id() {
|
| 1614 |
+
global $bbp;
|
| 1615 |
+
return $bbp->trash_status_id;
|
| 1616 |
+
}
|
| 1617 |
+
|
| 1618 |
+
/**
|
| 1619 |
+
* Return the orphan post status ID
|
| 1620 |
+
*
|
| 1621 |
+
* @since bbPress (r3504)
|
| 1622 |
+
*
|
| 1623 |
+
* @global bbPress $bbp
|
| 1624 |
+
* @return string
|
| 1625 |
+
*/
|
| 1626 |
+
function bbp_get_orphan_status_id() {
|
| 1627 |
+
global $bbp;
|
| 1628 |
+
return $bbp->orphan_status_id;
|
| 1629 |
+
}
|
| 1630 |
+
|
| 1631 |
?>
|
bbp-includes/bbp-common-template.php
CHANGED
|
@@ -252,13 +252,13 @@ function bbp_is_topic_split() {
|
|
| 252 |
* @return bool True if it's a topic tag, false if not
|
| 253 |
*/
|
| 254 |
function bbp_is_topic_tag() {
|
| 255 |
-
global $bbp;
|
| 256 |
|
| 257 |
// Return false if editing a topic tag
|
| 258 |
if ( bbp_is_topic_tag_edit() )
|
| 259 |
return false;
|
| 260 |
|
| 261 |
-
if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) )
|
| 262 |
return true;
|
| 263 |
|
| 264 |
return false;
|
|
@@ -918,7 +918,6 @@ function bbp_dropdown( $args = '' ) {
|
|
| 918 |
* @return string The dropdown
|
| 919 |
*/
|
| 920 |
function bbp_get_dropdown( $args = '' ) {
|
| 921 |
-
global $bbp;
|
| 922 |
|
| 923 |
/** Arguments *********************************************************/
|
| 924 |
|
|
@@ -961,18 +960,18 @@ function bbp_dropdown( $args = '' ) {
|
|
| 961 |
/** Post Status *******************************************************/
|
| 962 |
|
| 963 |
// Public
|
| 964 |
-
$post_stati[] =
|
| 965 |
|
| 966 |
// Forums
|
| 967 |
if ( bbp_get_forum_post_type() == $post_type ) {
|
| 968 |
|
| 969 |
// Private forums
|
| 970 |
if ( current_user_can( 'read_private_forums' ) )
|
| 971 |
-
$post_stati[] =
|
| 972 |
|
| 973 |
// Hidden forums
|
| 974 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 975 |
-
$post_stati[] =
|
| 976 |
}
|
| 977 |
|
| 978 |
// Setup the post statuses
|
| 252 |
* @return bool True if it's a topic tag, false if not
|
| 253 |
*/
|
| 254 |
function bbp_is_topic_tag() {
|
| 255 |
+
global $bbp, $wp_query;
|
| 256 |
|
| 257 |
// Return false if editing a topic tag
|
| 258 |
if ( bbp_is_topic_tag_edit() )
|
| 259 |
return false;
|
| 260 |
|
| 261 |
+
if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty( $bbp->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) )
|
| 262 |
return true;
|
| 263 |
|
| 264 |
return false;
|
| 918 |
* @return string The dropdown
|
| 919 |
*/
|
| 920 |
function bbp_get_dropdown( $args = '' ) {
|
|
|
|
| 921 |
|
| 922 |
/** Arguments *********************************************************/
|
| 923 |
|
| 960 |
/** Post Status *******************************************************/
|
| 961 |
|
| 962 |
// Public
|
| 963 |
+
$post_stati[] = bbp_get_public_status_id();
|
| 964 |
|
| 965 |
// Forums
|
| 966 |
if ( bbp_get_forum_post_type() == $post_type ) {
|
| 967 |
|
| 968 |
// Private forums
|
| 969 |
if ( current_user_can( 'read_private_forums' ) )
|
| 970 |
+
$post_stati[] = bbp_get_private_status_id();
|
| 971 |
|
| 972 |
// Hidden forums
|
| 973 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 974 |
+
$post_stati[] = bbp_get_hidden_status_id();
|
| 975 |
}
|
| 976 |
|
| 977 |
// Setup the post statuses
|
bbp-includes/bbp-core-caps.php
CHANGED
|
@@ -164,7 +164,7 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
| 164 |
$caps = array();
|
| 165 |
$post_type = get_post_type_object( $post->post_type );
|
| 166 |
|
| 167 |
-
if (
|
| 168 |
$caps[] = 'read';
|
| 169 |
elseif ( (int) $user_id == (int) $post->post_author )
|
| 170 |
$caps[] = 'read';
|
|
@@ -180,7 +180,7 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
| 180 |
case 'edit_replies' :
|
| 181 |
|
| 182 |
// Add do_not_allow cap if user is spam or deleted
|
| 183 |
-
if (
|
| 184 |
$caps = array( 'do_not_allow' );
|
| 185 |
|
| 186 |
break;
|
|
@@ -194,7 +194,7 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
| 194 |
$post_type = get_post_type_object( $post->post_type );
|
| 195 |
|
| 196 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 197 |
-
if (
|
| 198 |
$caps[] = 'do_not_allow';
|
| 199 |
|
| 200 |
// Map to edit_posts
|
|
@@ -216,7 +216,7 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
| 216 |
$post_type = get_post_type_object( $post->post_type );
|
| 217 |
|
| 218 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 219 |
-
if (
|
| 220 |
$caps[] = 'do_not_allow';
|
| 221 |
|
| 222 |
// Map to delete_posts
|
|
@@ -238,7 +238,7 @@ function bbp_map_meta_caps( $caps, $cap, $user_id, $args ) {
|
|
| 238 |
$post_type = get_post_type_object( $post->post_type );
|
| 239 |
|
| 240 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 241 |
-
if (
|
| 242 |
$caps[] = 'do_not_allow';
|
| 243 |
|
| 244 |
// Map to delete_others_posts
|
|
@@ -478,8 +478,7 @@ function bbp_get_caps_for_role( $role = '' ) {
|
|
| 478 |
*
|
| 479 |
* @uses is_multisite()
|
| 480 |
* @uses bbp_allow_global_access()
|
| 481 |
-
* @uses
|
| 482 |
-
* @uses bbp_is_user_spammer()
|
| 483 |
* @uses is_user_logged_in()
|
| 484 |
* @uses current_user_can()
|
| 485 |
* @uses WP_User::set_role()
|
|
@@ -492,8 +491,8 @@ function bbp_global_access_auto_role() {
|
|
| 492 |
if ( !is_multisite() || !bbp_allow_global_access() )
|
| 493 |
return;
|
| 494 |
|
| 495 |
-
// Bail if user is
|
| 496 |
-
if (
|
| 497 |
return;
|
| 498 |
|
| 499 |
// Bail if user is not logged in
|
|
@@ -561,8 +560,7 @@ function bbp_get_moderator_role() {
|
|
| 561 |
*
|
| 562 |
* @uses is_multisite()
|
| 563 |
* @uses bbp_allow_global_access()
|
| 564 |
-
* @uses
|
| 565 |
-
* @uses bbp_is_user_spammer()
|
| 566 |
* @uses is_user_logged_in()
|
| 567 |
* @uses current_user_can()
|
| 568 |
* @uses get_option()
|
|
@@ -578,7 +576,7 @@ function bbp_global_access_role_mask() {
|
|
| 578 |
return;
|
| 579 |
|
| 580 |
// Bail if user is marked as spam or is deleted
|
| 581 |
-
if (
|
| 582 |
return;
|
| 583 |
|
| 584 |
// Normal user is logged in but has no caps
|
| 164 |
$caps = array();
|
| 165 |
$post_type = get_post_type_object( $post->post_type );
|
| 166 |
|
| 167 |
+
if ( bbp_get_public_status_id() == $post->post_status )
|
| 168 |
$caps[] = 'read';
|
| 169 |
elseif ( (int) $user_id == (int) $post->post_author )
|
| 170 |
$caps[] = 'read';
|
| 180 |
case 'edit_replies' :
|
| 181 |
|
| 182 |
// Add do_not_allow cap if user is spam or deleted
|
| 183 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 184 |
$caps = array( 'do_not_allow' );
|
| 185 |
|
| 186 |
break;
|
| 194 |
$post_type = get_post_type_object( $post->post_type );
|
| 195 |
|
| 196 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 197 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 198 |
$caps[] = 'do_not_allow';
|
| 199 |
|
| 200 |
// Map to edit_posts
|
| 216 |
$post_type = get_post_type_object( $post->post_type );
|
| 217 |
|
| 218 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 219 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 220 |
$caps[] = 'do_not_allow';
|
| 221 |
|
| 222 |
// Map to delete_posts
|
| 238 |
$post_type = get_post_type_object( $post->post_type );
|
| 239 |
|
| 240 |
// Add 'do_not_allow' cap if user is spam or deleted
|
| 241 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 242 |
$caps[] = 'do_not_allow';
|
| 243 |
|
| 244 |
// Map to delete_others_posts
|
| 478 |
*
|
| 479 |
* @uses is_multisite()
|
| 480 |
* @uses bbp_allow_global_access()
|
| 481 |
+
* @uses bbp_is_user_inactive()
|
|
|
|
| 482 |
* @uses is_user_logged_in()
|
| 483 |
* @uses current_user_can()
|
| 484 |
* @uses WP_User::set_role()
|
| 491 |
if ( !is_multisite() || !bbp_allow_global_access() )
|
| 492 |
return;
|
| 493 |
|
| 494 |
+
// Bail if user is not active
|
| 495 |
+
if ( bbp_is_user_inactive() )
|
| 496 |
return;
|
| 497 |
|
| 498 |
// Bail if user is not logged in
|
| 560 |
*
|
| 561 |
* @uses is_multisite()
|
| 562 |
* @uses bbp_allow_global_access()
|
| 563 |
+
* @uses bbp_is_user_inactive()
|
|
|
|
| 564 |
* @uses is_user_logged_in()
|
| 565 |
* @uses current_user_can()
|
| 566 |
* @uses get_option()
|
| 576 |
return;
|
| 577 |
|
| 578 |
// Bail if user is marked as spam or is deleted
|
| 579 |
+
if ( bbp_is_user_inactive() )
|
| 580 |
return;
|
| 581 |
|
| 582 |
// Normal user is logged in but has no caps
|
bbp-includes/bbp-core-compatibility.php
CHANGED
|
@@ -22,25 +22,62 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
| 22 |
* Don't try anything you're about to witness here, at home. Ever.
|
| 23 |
*/
|
| 24 |
|
|
|
|
|
|
|
| 25 |
/**
|
| 26 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
*
|
| 28 |
* @since bbPress (r3311)
|
| 29 |
*
|
| 30 |
* @global bbPress $bbp
|
| 31 |
-
* @param
|
| 32 |
* @uses current_theme_supports()
|
| 33 |
*/
|
| 34 |
-
function bbp_setup_theme_compat( $theme =
|
| 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
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
// Set the theme compat globals for help with loading template parts
|
|
@@ -63,10 +100,8 @@ function bbp_theme_compat_enqueue_css() {
|
|
| 63 |
// Check if current theme supports bbPress
|
| 64 |
if ( !current_theme_supports( 'bbpress' ) ) {
|
| 65 |
|
| 66 |
-
/** Default CSS ***************************************************/
|
| 67 |
-
|
| 68 |
// Version of CSS
|
| 69 |
-
$version =
|
| 70 |
|
| 71 |
// Right to left
|
| 72 |
if ( is_rtl() ) {
|
|
@@ -110,6 +145,42 @@ function bbp_get_template_part( $slug, $name = null ) {
|
|
| 110 |
|
| 111 |
}
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
/**
|
| 114 |
* Gets the bbPress compatable theme used in the event the currently active
|
| 115 |
* WordPress theme does not explicitly support bbPress. This can be filtered,
|
|
@@ -125,7 +196,7 @@ function bbp_get_template_part( $slug, $name = null ) {
|
|
| 125 |
function bbp_get_theme_compat_dir() {
|
| 126 |
global $bbp;
|
| 127 |
|
| 128 |
-
return apply_filters( 'bbp_get_theme_compat_dir', $bbp->theme_compat->theme
|
| 129 |
}
|
| 130 |
|
| 131 |
/**
|
|
@@ -143,7 +214,7 @@ function bbp_get_theme_compat_dir() {
|
|
| 143 |
function bbp_get_theme_compat_url() {
|
| 144 |
global $bbp;
|
| 145 |
|
| 146 |
-
return apply_filters( 'bbp_get_theme_compat_url', $bbp->theme_compat->theme
|
| 147 |
}
|
| 148 |
|
| 149 |
/**
|
|
@@ -239,35 +310,39 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
| 239 |
// Default for current post
|
| 240 |
if ( isset( $wp_query->post ) ) {
|
| 241 |
$defaults = array(
|
| 242 |
-
'ID'
|
| 243 |
-
'post_title'
|
| 244 |
-
'post_author'
|
| 245 |
-
'post_date'
|
| 246 |
-
'post_content'
|
| 247 |
-
'post_type'
|
| 248 |
-
'post_status'
|
| 249 |
-
'
|
| 250 |
-
'
|
| 251 |
-
'
|
| 252 |
-
'
|
| 253 |
-
'
|
|
|
|
|
|
|
| 254 |
);
|
| 255 |
|
| 256 |
// Empty defaults
|
| 257 |
} else {
|
| 258 |
$defaults = array(
|
| 259 |
-
'ID'
|
| 260 |
-
'post_title'
|
| 261 |
-
'post_author'
|
| 262 |
-
'post_date'
|
| 263 |
-
'post_content'
|
| 264 |
-
'post_type'
|
| 265 |
-
'post_status'
|
| 266 |
-
'
|
| 267 |
-
'
|
| 268 |
-
'
|
| 269 |
-
'
|
| 270 |
-
'
|
|
|
|
|
|
|
| 271 |
);
|
| 272 |
}
|
| 273 |
$dummy = wp_parse_args( $args, $defaults );
|
|
@@ -278,13 +353,15 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
| 278 |
unset( $post );
|
| 279 |
|
| 280 |
// Setup the dummy post object
|
| 281 |
-
$wp_query->post->ID
|
| 282 |
-
$wp_query->post->post_title
|
| 283 |
-
$wp_query->post->post_author
|
| 284 |
-
$wp_query->post->post_date
|
| 285 |
-
$wp_query->post->post_content
|
| 286 |
-
$wp_query->post->post_type
|
| 287 |
-
$wp_query->post->post_status
|
|
|
|
|
|
|
| 288 |
|
| 289 |
// Set the $post global
|
| 290 |
$post = $wp_query->post;
|
|
@@ -299,6 +376,7 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
| 299 |
$wp_query->is_single = $dummy['is_single'];
|
| 300 |
$wp_query->is_archive = $dummy['is_archive'];
|
| 301 |
$wp_query->is_tax = $dummy['is_tax'];
|
|
|
|
| 302 |
|
| 303 |
// If we are resetting a post, we are in theme compat
|
| 304 |
bbp_set_theme_compat_active();
|
|
@@ -721,9 +799,6 @@ function bbp_get_theme_compat_templates() {
|
|
| 721 |
*
|
| 722 |
* @since bbPress (r3032)
|
| 723 |
*
|
| 724 |
-
* @global bbPress $bbp
|
| 725 |
-
* @global WP_Query $post
|
| 726 |
-
*
|
| 727 |
* @param string $template
|
| 728 |
*
|
| 729 |
* @uses current_theme_supports() To check if theme supports bbPress
|
|
@@ -746,7 +821,6 @@ function bbp_get_theme_compat_templates() {
|
|
| 746 |
* @return string The path to the template file that is being used
|
| 747 |
*/
|
| 748 |
function bbp_template_include_theme_supports( $template = '' ) {
|
| 749 |
-
global $bbp;
|
| 750 |
|
| 751 |
// Current theme supports bbPress
|
| 752 |
if ( current_theme_supports( 'bbpress' ) ) {
|
|
@@ -818,7 +892,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
| 818 |
'post_date' => 0,
|
| 819 |
'post_content' => '',
|
| 820 |
'post_type' => bbp_get_forum_post_type(),
|
| 821 |
-
'post_status' =>
|
| 822 |
'is_archive' => true
|
| 823 |
) );
|
| 824 |
|
|
@@ -835,7 +909,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
| 835 |
'post_date' => 0,
|
| 836 |
'post_content' => '',
|
| 837 |
'post_type' => bbp_get_topic_post_type(),
|
| 838 |
-
'post_status' =>
|
| 839 |
'is_archive' => true
|
| 840 |
) );
|
| 841 |
|
|
@@ -867,7 +941,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
| 867 |
'post_date' => 0,
|
| 868 |
'post_content' => '',
|
| 869 |
'post_type' => bbp_get_reply_post_type(),
|
| 870 |
-
'post_status' =>
|
| 871 |
) );
|
| 872 |
|
| 873 |
// Single reply
|
|
@@ -896,7 +970,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
| 896 |
'post_date' => 0,
|
| 897 |
'post_content' => '',
|
| 898 |
'post_type' => '',
|
| 899 |
-
'post_status' =>
|
| 900 |
) );
|
| 901 |
|
| 902 |
|
|
@@ -1221,9 +1295,16 @@ function bbp_redirect_canonical( $redirect_url ) {
|
|
| 1221 |
if ( bbp_is_single_topic() ) {
|
| 1222 |
$redirect_url = false;
|
| 1223 |
|
| 1224 |
-
// ...and single replies
|
| 1225 |
} elseif ( bbp_is_single_forum() ) {
|
| 1226 |
$redirect_url = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1227 |
}
|
| 1228 |
|
| 1229 |
// If editing a topic
|
|
@@ -1565,21 +1646,22 @@ function bbp_pre_get_posts( $posts_query ) {
|
|
| 1565 |
$status = array();
|
| 1566 |
|
| 1567 |
// All users can see published forums
|
| 1568 |
-
$status[] =
|
| 1569 |
|
| 1570 |
-
// Add
|
| 1571 |
if ( current_user_can( 'read_private_forums' ) )
|
| 1572 |
-
$status[] =
|
| 1573 |
|
| 1574 |
-
// Add
|
| 1575 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 1576 |
-
$status[] =
|
| 1577 |
|
| 1578 |
// Implode and add the statuses
|
| 1579 |
$posts_query->set( 'post_status', implode( ',', $status ) );
|
| 1580 |
|
| 1581 |
// Topic tag page
|
| 1582 |
} elseif ( bbp_is_topic_tag() ) {
|
|
|
|
| 1583 |
$posts_query->set( 'post_type', bbp_get_topic_post_type() );
|
| 1584 |
$posts_query->set( 'posts_per_page', get_option( '_bbp_topics_per_page', 15 ) );
|
| 1585 |
}
|
| 22 |
* Don't try anything you're about to witness here, at home. Ever.
|
| 23 |
*/
|
| 24 |
|
| 25 |
+
/** Base Class ****************************************************************/
|
| 26 |
+
|
| 27 |
/**
|
| 28 |
+
* Theme Compatibility base class
|
| 29 |
+
*
|
| 30 |
+
* This is only intended to be extended, and is included here as a basic guide
|
| 31 |
+
* for future Theme Packs to use. @link BBP_Twenty_Ten is a good example of
|
| 32 |
+
* extending this class, as is @link bbp_setup_theme_compat()
|
| 33 |
+
*
|
| 34 |
+
* @since bbPress (r3506)
|
| 35 |
+
*/
|
| 36 |
+
class BBP_Theme_Compat {
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* @var string Name of the theme (should match style.css)
|
| 40 |
+
*/
|
| 41 |
+
public $name = '';
|
| 42 |
+
|
| 43 |
+
/**
|
| 44 |
+
* @public string Theme version for cache busting scripts and styling
|
| 45 |
+
*/
|
| 46 |
+
public $version = '';
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* @var string Path to theme
|
| 50 |
+
*/
|
| 51 |
+
public $dir = '';
|
| 52 |
+
|
| 53 |
+
/**
|
| 54 |
+
* @var string URL to theme
|
| 55 |
+
*/
|
| 56 |
+
public $url = '';
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/** Functions *****************************************************************/
|
| 60 |
+
|
| 61 |
+
/**
|
| 62 |
+
* Set the theme compat theme properties
|
| 63 |
*
|
| 64 |
* @since bbPress (r3311)
|
| 65 |
*
|
| 66 |
* @global bbPress $bbp
|
| 67 |
+
* @param BBP_Theme_Compat $theme
|
| 68 |
* @uses current_theme_supports()
|
| 69 |
*/
|
| 70 |
+
function bbp_setup_theme_compat( $theme = '' ) {
|
| 71 |
global $bbp;
|
| 72 |
|
| 73 |
// Check if current theme supports bbPress
|
| 74 |
if ( empty( $bbp->theme_compat->theme ) && !current_theme_supports( 'bbpress' ) ) {
|
| 75 |
if ( empty( $theme ) ) {
|
| 76 |
+
$theme = new BBP_Theme_Compat();
|
| 77 |
+
$theme->name = 'bbPress (Twenty Ten)';
|
| 78 |
+
$theme->version = '20110912';
|
| 79 |
+
$theme->dir = $bbp->themes_dir . '/bbp-twentyten';
|
| 80 |
+
$theme->url = $bbp->themes_url . '/bbp-twentyten';
|
| 81 |
}
|
| 82 |
|
| 83 |
// Set the theme compat globals for help with loading template parts
|
| 100 |
// Check if current theme supports bbPress
|
| 101 |
if ( !current_theme_supports( 'bbpress' ) ) {
|
| 102 |
|
|
|
|
|
|
|
| 103 |
// Version of CSS
|
| 104 |
+
$version = bbp_get_theme_compat_version();
|
| 105 |
|
| 106 |
// Right to left
|
| 107 |
if ( is_rtl() ) {
|
| 145 |
|
| 146 |
}
|
| 147 |
|
| 148 |
+
/**
|
| 149 |
+
* Gets the name of the bbPress compatable theme used, in the event the
|
| 150 |
+
* currently active WordPress theme does not explicitly support bbPress.
|
| 151 |
+
* This can be filtered or set manually. Tricky theme authors can override the
|
| 152 |
+
* default and include their own bbPress compatability layers for their themes.
|
| 153 |
+
*
|
| 154 |
+
* @since bbPress (r3506)
|
| 155 |
+
*
|
| 156 |
+
* @global bbPress $bbp
|
| 157 |
+
* @uses apply_filters()
|
| 158 |
+
* @return string
|
| 159 |
+
*/
|
| 160 |
+
function bbp_get_theme_compat_name() {
|
| 161 |
+
global $bbp;
|
| 162 |
+
|
| 163 |
+
return apply_filters( 'bbp_get_theme_compat_name', $bbp->theme_compat->theme->name );
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
/**
|
| 167 |
+
* Gets the version of the bbPress compatable theme used, in the event the
|
| 168 |
+
* currently active WordPress theme does not explicitly support bbPress.
|
| 169 |
+
* This can be filtered or set manually. Tricky theme authors can override the
|
| 170 |
+
* default and include their own bbPress compatability layers for their themes.
|
| 171 |
+
*
|
| 172 |
+
* @since bbPress (r3506)
|
| 173 |
+
*
|
| 174 |
+
* @global bbPress $bbp
|
| 175 |
+
* @uses apply_filters()
|
| 176 |
+
* @return string
|
| 177 |
+
*/
|
| 178 |
+
function bbp_get_theme_compat_version() {
|
| 179 |
+
global $bbp;
|
| 180 |
+
|
| 181 |
+
return apply_filters( 'bbp_get_theme_compat_version', $bbp->theme_compat->theme->version );
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
/**
|
| 185 |
* Gets the bbPress compatable theme used in the event the currently active
|
| 186 |
* WordPress theme does not explicitly support bbPress. This can be filtered,
|
| 196 |
function bbp_get_theme_compat_dir() {
|
| 197 |
global $bbp;
|
| 198 |
|
| 199 |
+
return apply_filters( 'bbp_get_theme_compat_dir', $bbp->theme_compat->theme->dir );
|
| 200 |
}
|
| 201 |
|
| 202 |
/**
|
| 214 |
function bbp_get_theme_compat_url() {
|
| 215 |
global $bbp;
|
| 216 |
|
| 217 |
+
return apply_filters( 'bbp_get_theme_compat_url', $bbp->theme_compat->theme->url );
|
| 218 |
}
|
| 219 |
|
| 220 |
/**
|
| 310 |
// Default for current post
|
| 311 |
if ( isset( $wp_query->post ) ) {
|
| 312 |
$defaults = array(
|
| 313 |
+
'ID' => get_the_ID(),
|
| 314 |
+
'post_title' => get_the_title(),
|
| 315 |
+
'post_author' => get_the_author_meta('ID'),
|
| 316 |
+
'post_date' => get_the_date(),
|
| 317 |
+
'post_content' => get_the_content(),
|
| 318 |
+
'post_type' => get_post_type(),
|
| 319 |
+
'post_status' => get_post_status(),
|
| 320 |
+
'post_name' => !empty( $wp_query->post->post_name ) ? $wp_query->post->post_name : '',
|
| 321 |
+
'comment_status' => comments_open(),
|
| 322 |
+
'is_404' => false,
|
| 323 |
+
'is_page' => false,
|
| 324 |
+
'is_single' => false,
|
| 325 |
+
'is_archive' => false,
|
| 326 |
+
'is_tax' => false,
|
| 327 |
);
|
| 328 |
|
| 329 |
// Empty defaults
|
| 330 |
} else {
|
| 331 |
$defaults = array(
|
| 332 |
+
'ID' => 0,
|
| 333 |
+
'post_title' => '',
|
| 334 |
+
'post_author' => 0,
|
| 335 |
+
'post_date' => 0,
|
| 336 |
+
'post_content' => '',
|
| 337 |
+
'post_type' => 'page',
|
| 338 |
+
'post_status' => bbp_get_public_status_id(),
|
| 339 |
+
'post_name' => '',
|
| 340 |
+
'comment_status' => 'closed',
|
| 341 |
+
'is_404' => false,
|
| 342 |
+
'is_page' => false,
|
| 343 |
+
'is_single' => false,
|
| 344 |
+
'is_archive' => false,
|
| 345 |
+
'is_tax' => false,
|
| 346 |
);
|
| 347 |
}
|
| 348 |
$dummy = wp_parse_args( $args, $defaults );
|
| 353 |
unset( $post );
|
| 354 |
|
| 355 |
// Setup the dummy post object
|
| 356 |
+
$wp_query->post->ID = $dummy['ID'];
|
| 357 |
+
$wp_query->post->post_title = $dummy['post_title'];
|
| 358 |
+
$wp_query->post->post_author = $dummy['post_author'];
|
| 359 |
+
$wp_query->post->post_date = $dummy['post_date'];
|
| 360 |
+
$wp_query->post->post_content = $dummy['post_content'];
|
| 361 |
+
$wp_query->post->post_type = $dummy['post_type'];
|
| 362 |
+
$wp_query->post->post_status = $dummy['post_status'];
|
| 363 |
+
$wp_query->post->post_name = $dummy['post_name'];
|
| 364 |
+
$wp_query->post->comment_status = $dummy['comment_status'];
|
| 365 |
|
| 366 |
// Set the $post global
|
| 367 |
$post = $wp_query->post;
|
| 376 |
$wp_query->is_single = $dummy['is_single'];
|
| 377 |
$wp_query->is_archive = $dummy['is_archive'];
|
| 378 |
$wp_query->is_tax = $dummy['is_tax'];
|
| 379 |
+
|
| 380 |
|
| 381 |
// If we are resetting a post, we are in theme compat
|
| 382 |
bbp_set_theme_compat_active();
|
| 799 |
*
|
| 800 |
* @since bbPress (r3032)
|
| 801 |
*
|
|
|
|
|
|
|
|
|
|
| 802 |
* @param string $template
|
| 803 |
*
|
| 804 |
* @uses current_theme_supports() To check if theme supports bbPress
|
| 821 |
* @return string The path to the template file that is being used
|
| 822 |
*/
|
| 823 |
function bbp_template_include_theme_supports( $template = '' ) {
|
|
|
|
| 824 |
|
| 825 |
// Current theme supports bbPress
|
| 826 |
if ( current_theme_supports( 'bbpress' ) ) {
|
| 892 |
'post_date' => 0,
|
| 893 |
'post_content' => '',
|
| 894 |
'post_type' => bbp_get_forum_post_type(),
|
| 895 |
+
'post_status' => bbp_get_public_status_id(),
|
| 896 |
'is_archive' => true
|
| 897 |
) );
|
| 898 |
|
| 909 |
'post_date' => 0,
|
| 910 |
'post_content' => '',
|
| 911 |
'post_type' => bbp_get_topic_post_type(),
|
| 912 |
+
'post_status' => bbp_get_public_status_id(),
|
| 913 |
'is_archive' => true
|
| 914 |
) );
|
| 915 |
|
| 941 |
'post_date' => 0,
|
| 942 |
'post_content' => '',
|
| 943 |
'post_type' => bbp_get_reply_post_type(),
|
| 944 |
+
'post_status' => bbp_get_public_status_id()
|
| 945 |
) );
|
| 946 |
|
| 947 |
// Single reply
|
| 970 |
'post_date' => 0,
|
| 971 |
'post_content' => '',
|
| 972 |
'post_type' => '',
|
| 973 |
+
'post_status' => bbp_get_public_status_id()
|
| 974 |
) );
|
| 975 |
|
| 976 |
|
| 1295 |
if ( bbp_is_single_topic() ) {
|
| 1296 |
$redirect_url = false;
|
| 1297 |
|
| 1298 |
+
// ...and single replies...
|
| 1299 |
} elseif ( bbp_is_single_forum() ) {
|
| 1300 |
$redirect_url = false;
|
| 1301 |
+
|
| 1302 |
+
// ...and any single anything else...
|
| 1303 |
+
//
|
| 1304 |
+
// @todo - Find a more accurate way to disable paged canonicals for
|
| 1305 |
+
// paged shortcode usage within other posts.
|
| 1306 |
+
} elseif ( is_page() || is_singular() ) {
|
| 1307 |
+
$redirect_url = false;
|
| 1308 |
}
|
| 1309 |
|
| 1310 |
// If editing a topic
|
| 1646 |
$status = array();
|
| 1647 |
|
| 1648 |
// All users can see published forums
|
| 1649 |
+
$status[] = bbp_get_public_status_id();
|
| 1650 |
|
| 1651 |
+
// Add bbp_get_private_status_id() if user is capable
|
| 1652 |
if ( current_user_can( 'read_private_forums' ) )
|
| 1653 |
+
$status[] = bbp_get_private_status_id();
|
| 1654 |
|
| 1655 |
+
// Add bbp_get_hidden_status_id() if user is capable
|
| 1656 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 1657 |
+
$status[] = bbp_get_hidden_status_id();
|
| 1658 |
|
| 1659 |
// Implode and add the statuses
|
| 1660 |
$posts_query->set( 'post_status', implode( ',', $status ) );
|
| 1661 |
|
| 1662 |
// Topic tag page
|
| 1663 |
} elseif ( bbp_is_topic_tag() ) {
|
| 1664 |
+
$posts_query->set( 'bbp_topic_tag', get_query_var( 'term' ) );
|
| 1665 |
$posts_query->set( 'post_type', bbp_get_topic_post_type() );
|
| 1666 |
$posts_query->set( 'posts_per_page', get_option( '_bbp_topics_per_page', 15 ) );
|
| 1667 |
}
|
bbp-includes/bbp-core-hooks.php
CHANGED
|
@@ -42,7 +42,7 @@ add_filter( 'template_include', 'bbp_template_include', 10 );
|
|
| 42 |
* bbp_loaded - Attached to 'plugins_loaded' above
|
| 43 |
*
|
| 44 |
* Attach various loader actions to the bbp_loaded action.
|
| 45 |
-
* The load order helps to
|
| 46 |
* v---Load order
|
| 47 |
*/
|
| 48 |
add_action( 'bbp_loaded', 'bbp_constants', 2 );
|
|
@@ -55,23 +55,32 @@ add_action( 'bbp_loaded', 'bbp_register_theme_directory', 10 );
|
|
| 55 |
* bbp_init - Attached to 'init' above
|
| 56 |
*
|
| 57 |
* Attach various initialization actions to the init action.
|
| 58 |
-
* The load order helps to
|
| 59 |
* v---Load order
|
| 60 |
*/
|
| 61 |
add_action( 'bbp_init', 'bbp_load_textdomain', 2 );
|
| 62 |
add_action( 'bbp_init', 'bbp_setup_option_filters', 4 );
|
| 63 |
add_action( 'bbp_init', 'bbp_setup_current_user', 6 );
|
| 64 |
add_action( 'bbp_init', 'bbp_setup_theme_compat', 8 );
|
| 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', '
|
| 70 |
-
add_action( 'bbp_init', '
|
| 71 |
-
add_action( 'bbp_init', 'bbp_register_shortcodes', 22 );
|
| 72 |
-
add_action( 'bbp_init', 'bbp_add_rewrite_tags', 24 );
|
| 73 |
add_action( 'bbp_init', 'bbp_ready', 999 );
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
// Multisite Global Forum Access
|
| 76 |
add_action( 'bbp_setup_current_user', 'bbp_global_access_role_mask', 10 );
|
| 77 |
|
| 42 |
* bbp_loaded - Attached to 'plugins_loaded' above
|
| 43 |
*
|
| 44 |
* Attach various loader actions to the bbp_loaded action.
|
| 45 |
+
* The load order helps to execute code at the correct time.
|
| 46 |
* v---Load order
|
| 47 |
*/
|
| 48 |
add_action( 'bbp_loaded', 'bbp_constants', 2 );
|
| 55 |
* bbp_init - Attached to 'init' above
|
| 56 |
*
|
| 57 |
* Attach various initialization actions to the init action.
|
| 58 |
+
* The load order helps to execute 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_option_filters', 4 );
|
| 63 |
add_action( 'bbp_init', 'bbp_setup_current_user', 6 );
|
| 64 |
add_action( 'bbp_init', 'bbp_setup_theme_compat', 8 );
|
| 65 |
+
add_action( 'bbp_init', 'bbp_register_post_types', 10 );
|
| 66 |
+
add_action( 'bbp_init', 'bbp_register_post_statuses', 12 );
|
| 67 |
+
add_action( 'bbp_init', 'bbp_register_taxonomies', 14 );
|
| 68 |
+
add_action( 'bbp_init', 'bbp_register_views', 16 );
|
| 69 |
+
add_action( 'bbp_init', 'bbp_register_shortcodes', 18 );
|
| 70 |
+
add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 );
|
|
|
|
|
|
|
| 71 |
add_action( 'bbp_init', 'bbp_ready', 999 );
|
| 72 |
|
| 73 |
+
/**
|
| 74 |
+
* bbp_ready - attached to end 'bbp_init' above
|
| 75 |
+
*
|
| 76 |
+
* Attach actions to the ready action after bbPress has fully initialized.
|
| 77 |
+
* The load order helps to execute code at the correct time.
|
| 78 |
+
* v---Load order
|
| 79 |
+
*/
|
| 80 |
+
add_action( 'bbp_ready', 'bbp_setup_akismet', 2 ); // Spam prevention for topics and replies
|
| 81 |
+
add_action( 'bbp_ready', 'bbp_setup_buddypress', 4 ); // Social network integration
|
| 82 |
+
add_action( 'bbp_ready', 'bbp_setup_genesis', 6 ); // Popular theme framework
|
| 83 |
+
|
| 84 |
// Multisite Global Forum Access
|
| 85 |
add_action( 'bbp_setup_current_user', 'bbp_global_access_role_mask', 10 );
|
| 86 |
|
bbp-includes/bbp-core-shortcodes.php
CHANGED
|
@@ -756,12 +756,9 @@ class BBP_Shortcodes {
|
|
| 756 |
*
|
| 757 |
* @since bbPress (r3302)
|
| 758 |
*
|
| 759 |
-
* @global bbPress $bbp
|
| 760 |
-
*
|
| 761 |
* @return string
|
| 762 |
*/
|
| 763 |
public function display_login() {
|
| 764 |
-
global $bbp;
|
| 765 |
|
| 766 |
// Unset globals
|
| 767 |
$this->unset_globals();
|
|
@@ -784,12 +781,9 @@ class BBP_Shortcodes {
|
|
| 784 |
*
|
| 785 |
* @since bbPress (r3302)
|
| 786 |
*
|
| 787 |
-
* @global bbPress $bbp
|
| 788 |
-
*
|
| 789 |
* @return string
|
| 790 |
*/
|
| 791 |
public function display_register() {
|
| 792 |
-
global $bbp;
|
| 793 |
|
| 794 |
// Unset globals
|
| 795 |
$this->unset_globals();
|
|
@@ -812,12 +806,9 @@ class BBP_Shortcodes {
|
|
| 812 |
*
|
| 813 |
* @since bbPress (r3302)
|
| 814 |
*
|
| 815 |
-
* @global bbPress $bbp
|
| 816 |
-
*
|
| 817 |
* @return string
|
| 818 |
*/
|
| 819 |
public function display_lost_pass() {
|
| 820 |
-
global $bbp;
|
| 821 |
|
| 822 |
// Unset globals
|
| 823 |
$this->unset_globals();
|
|
@@ -842,8 +833,6 @@ class BBP_Shortcodes {
|
|
| 842 |
*
|
| 843 |
* @since bbPress (r3302)
|
| 844 |
*
|
| 845 |
-
* @global bbPress $bbp
|
| 846 |
-
*
|
| 847 |
* @return string
|
| 848 |
*/
|
| 849 |
public function display_breadcrumb() {
|
|
@@ -874,6 +863,9 @@ endif;
|
|
| 874 |
function bbp_register_shortcodes() {
|
| 875 |
global $bbp;
|
| 876 |
|
|
|
|
|
|
|
|
|
|
| 877 |
$bbp->shortcodes = new BBP_Shortcodes();
|
| 878 |
}
|
| 879 |
|
| 756 |
*
|
| 757 |
* @since bbPress (r3302)
|
| 758 |
*
|
|
|
|
|
|
|
| 759 |
* @return string
|
| 760 |
*/
|
| 761 |
public function display_login() {
|
|
|
|
| 762 |
|
| 763 |
// Unset globals
|
| 764 |
$this->unset_globals();
|
| 781 |
*
|
| 782 |
* @since bbPress (r3302)
|
| 783 |
*
|
|
|
|
|
|
|
| 784 |
* @return string
|
| 785 |
*/
|
| 786 |
public function display_register() {
|
|
|
|
| 787 |
|
| 788 |
// Unset globals
|
| 789 |
$this->unset_globals();
|
| 806 |
*
|
| 807 |
* @since bbPress (r3302)
|
| 808 |
*
|
|
|
|
|
|
|
| 809 |
* @return string
|
| 810 |
*/
|
| 811 |
public function display_lost_pass() {
|
|
|
|
| 812 |
|
| 813 |
// Unset globals
|
| 814 |
$this->unset_globals();
|
| 833 |
*
|
| 834 |
* @since bbPress (r3302)
|
| 835 |
*
|
|
|
|
|
|
|
| 836 |
* @return string
|
| 837 |
*/
|
| 838 |
public function display_breadcrumb() {
|
| 863 |
function bbp_register_shortcodes() {
|
| 864 |
global $bbp;
|
| 865 |
|
| 866 |
+
// Bail if bbPress is not loaded
|
| 867 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 868 |
+
|
| 869 |
$bbp->shortcodes = new BBP_Shortcodes();
|
| 870 |
}
|
| 871 |
|
bbp-includes/bbp-core-widgets.php
CHANGED
|
@@ -100,7 +100,7 @@ class BBP_Login_Widget extends WP_Widget {
|
|
| 100 |
|
| 101 |
<?php do_action( 'login_form' ); ?>
|
| 102 |
|
| 103 |
-
<
|
| 104 |
|
| 105 |
<?php bbp_user_login_fields(); ?>
|
| 106 |
|
|
@@ -132,7 +132,7 @@ class BBP_Login_Widget extends WP_Widget {
|
|
| 132 |
<?php else : ?>
|
| 133 |
|
| 134 |
<div class="bbp-logged-in">
|
| 135 |
-
<a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>"><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?></a>
|
| 136 |
<h4><?php bbp_user_profile_link( bbp_get_current_user_id() ); ?></h4>
|
| 137 |
|
| 138 |
<?php bbp_logout_link(); ?>
|
|
@@ -529,7 +529,6 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
| 529 |
* @uses bbp_get_topic_reply_count() To get the topic reply count
|
| 530 |
*/
|
| 531 |
function widget( $args, $instance ) {
|
| 532 |
-
global $bbp;
|
| 533 |
|
| 534 |
extract( $args );
|
| 535 |
|
|
@@ -726,7 +725,6 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
| 726 |
* @uses get_the_time() To get the time of the reply
|
| 727 |
*/
|
| 728 |
function widget( $args, $instance ) {
|
| 729 |
-
global $bbp;
|
| 730 |
|
| 731 |
extract( $args );
|
| 732 |
|
|
@@ -736,7 +734,7 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
| 736 |
|
| 737 |
// Query defaults
|
| 738 |
$replies_query = array(
|
| 739 |
-
'post_status' => join( ',', array(
|
| 740 |
'posts_per_page' => $max_shown,
|
| 741 |
'order' => 'DESC'
|
| 742 |
);
|
| 100 |
|
| 101 |
<?php do_action( 'login_form' ); ?>
|
| 102 |
|
| 103 |
+
<button type="submit" name="user-submit" id="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit user-submit">"<?php _e( 'Log In', 'bbpress' ); ?></button>
|
| 104 |
|
| 105 |
<?php bbp_user_login_fields(); ?>
|
| 106 |
|
| 132 |
<?php else : ?>
|
| 133 |
|
| 134 |
<div class="bbp-logged-in">
|
| 135 |
+
<a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" class="submit user-submit"><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?></a>
|
| 136 |
<h4><?php bbp_user_profile_link( bbp_get_current_user_id() ); ?></h4>
|
| 137 |
|
| 138 |
<?php bbp_logout_link(); ?>
|
| 529 |
* @uses bbp_get_topic_reply_count() To get the topic reply count
|
| 530 |
*/
|
| 531 |
function widget( $args, $instance ) {
|
|
|
|
| 532 |
|
| 533 |
extract( $args );
|
| 534 |
|
| 725 |
* @uses get_the_time() To get the time of the reply
|
| 726 |
*/
|
| 727 |
function widget( $args, $instance ) {
|
|
|
|
| 728 |
|
| 729 |
extract( $args );
|
| 730 |
|
| 734 |
|
| 735 |
// Query defaults
|
| 736 |
$replies_query = array(
|
| 737 |
+
'post_status' => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
|
| 738 |
'posts_per_page' => $max_shown,
|
| 739 |
'order' => 'DESC'
|
| 740 |
);
|
bbp-includes/bbp-extend-akismet.php
CHANGED
|
@@ -73,11 +73,10 @@ class BBP_Akismet {
|
|
| 73 |
*
|
| 74 |
* @param string $post_data
|
| 75 |
*
|
| 76 |
-
* @global bbPress $bbp
|
| 77 |
-
*
|
| 78 |
* @uses get_userdata() To get the user data
|
| 79 |
* @uses bbp_filter_anonymous_user_data() To get anonymous user data
|
| 80 |
-
* @uses
|
|
|
|
| 81 |
* @uses bbp_current_author_ip() To get the IP address of the current user
|
| 82 |
* @uses BBP_Akismet::maybe_spam() To check if post is spam
|
| 83 |
* @uses akismet_get_user_roles() To get the role(s) of the current user
|
|
@@ -87,33 +86,64 @@ class BBP_Akismet {
|
|
| 87 |
* @return array Array of post data
|
| 88 |
*/
|
| 89 |
public function check_post( $post_data ) {
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
// Post is not published
|
| 93 |
-
if (
|
| 94 |
return $post_data;
|
| 95 |
|
| 96 |
-
//
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
// Get user data
|
| 100 |
-
$userdata = get_userdata( $post_author );
|
| 101 |
$anonymous_data = bbp_filter_anonymous_post_data();
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
// Put post_data back into usable array
|
| 104 |
$post = array(
|
| 105 |
-
'comment_author' => $
|
| 106 |
-
'comment_author_email' => $
|
| 107 |
-
'comment_author_url' => $
|
| 108 |
-
'comment_content' => $post_content,
|
| 109 |
-
'comment_post_ID' => $post_parent,
|
| 110 |
-
'comment_type' => $post_type,
|
| 111 |
-
'permalink' =>
|
| 112 |
'referrer' => $_SERVER['HTTP_REFERER'],
|
| 113 |
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
|
| 114 |
-
'user_ID' => $post_author,
|
| 115 |
'user_ip' => bbp_current_author_ip(),
|
| 116 |
-
'user_role' => akismet_get_user_roles( $post_author ),
|
| 117 |
);
|
| 118 |
|
| 119 |
// Check the post_data
|
|
@@ -133,7 +163,7 @@ class BBP_Akismet {
|
|
| 133 |
do_action( 'bbp_akismet_spam_caught' );
|
| 134 |
|
| 135 |
// This is spam
|
| 136 |
-
$post_data['post_status'] =
|
| 137 |
|
| 138 |
// We don't want your spam tags here
|
| 139 |
add_filter( 'bbp_new_reply_pre_set_terms', array( $this, 'filter_post_terms' ), 1, 3 );
|
|
@@ -158,7 +188,6 @@ class BBP_Akismet {
|
|
| 158 |
*
|
| 159 |
* @param int $post_id
|
| 160 |
*
|
| 161 |
-
* @global bbPress $bbp
|
| 162 |
* @global WP_Query $wpdb
|
| 163 |
* @global string $akismet_api_host
|
| 164 |
* @global string $akismet_api_port
|
|
@@ -180,9 +209,14 @@ class BBP_Akismet {
|
|
| 180 |
* @return array Array of existing topic terms
|
| 181 |
*/
|
| 182 |
public function submit_post( $post_id = 0 ) {
|
| 183 |
-
global $
|
| 184 |
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
| 187 |
// Mysterious, and straight from the can
|
| 188 |
case 'bbp_spammed_topic' :
|
|
@@ -205,11 +239,14 @@ class BBP_Akismet {
|
|
| 205 |
$post_id = (int) $post_id;
|
| 206 |
|
| 207 |
// Make sure we have a post
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
| 209 |
return;
|
| 210 |
|
| 211 |
// Bail if we're spamming, but the post_status isn't spam
|
| 212 |
-
if ( ( 'spam' == $request_type ) && (
|
| 213 |
return;
|
| 214 |
|
| 215 |
// Set some default post_data
|
|
@@ -362,7 +399,6 @@ class BBP_Akismet {
|
|
| 362 |
* @param int $post_id
|
| 363 |
* @param object $post
|
| 364 |
*
|
| 365 |
-
* @global bbPress $bbp
|
| 366 |
* @global object $this->last_post
|
| 367 |
*
|
| 368 |
* @uses get_post() To get the post object
|
|
@@ -372,7 +408,6 @@ class BBP_Akismet {
|
|
| 372 |
* @uses BBP_Akismet::update_post_history() To update post Akismet history
|
| 373 |
*/
|
| 374 |
public function update_post_meta( $post_id = 0, $post = false ) {
|
| 375 |
-
global $bbp;
|
| 376 |
|
| 377 |
// Define local variable(s)
|
| 378 |
$as_submitted = false;
|
|
@@ -380,22 +415,22 @@ class BBP_Akismet {
|
|
| 380 |
// Setup some variables
|
| 381 |
$post_id = (int) $post_id;
|
| 382 |
|
| 383 |
-
//
|
| 384 |
-
if (
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
// Get user data
|
| 388 |
-
$userdata = get_userdata( $post->post_author );
|
| 389 |
-
$anonymous_data = bbp_filter_anonymous_post_data();
|
| 390 |
|
| 391 |
// Set up Akismet last post data
|
| 392 |
if ( !empty( $this->last_post ) )
|
| 393 |
$as_submitted = $this->last_post['bbp_post_as_submitted'];
|
| 394 |
|
| 395 |
-
// wp_insert_post() might be called in other contexts.
|
| 396 |
// the same topic/reply as was checked by BBP_Akismet::check_post()
|
| 397 |
if ( is_object( $post ) && !empty( $this->last_post ) && is_array( $as_submitted ) ) {
|
| 398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
// More checks
|
| 400 |
if ( intval( $as_submitted['comment_post_ID'] ) == intval( $post->post_parent )
|
| 401 |
&& $as_submitted['comment_author'] == ( $anonymous_data ? $anonymous_data['bbp_anonymous_name'] : $userdata->display_name )
|
|
@@ -410,7 +445,7 @@ class BBP_Akismet {
|
|
| 410 |
$this->update_post_history( $post_id, __( 'Akismet caught this post as spam', 'bbpress' ), 'check-spam' );
|
| 411 |
|
| 412 |
// If post_status isn't the spam status, as expected, leave a note
|
| 413 |
-
if ( $post->post_status !=
|
| 414 |
$this->update_post_history( $post_id, sprintf( __( 'Post status was changed to %s', 'bbpress' ), $post->post_status ), 'status-changed-' . $post->post_status );
|
| 415 |
}
|
| 416 |
|
|
@@ -422,7 +457,7 @@ class BBP_Akismet {
|
|
| 422 |
$this->update_post_history( $post_id, __( 'Akismet cleared this post', 'bbpress' ), 'check-ham' );
|
| 423 |
|
| 424 |
// If post_status is the spam status, which isn't expected, leave a note
|
| 425 |
-
if ( $post->post_status ==
|
| 426 |
|
| 427 |
// @todo Use wp_blacklist_check()
|
| 428 |
|
|
@@ -512,8 +547,6 @@ class BBP_Akismet {
|
|
| 512 |
* @param int $topic_id
|
| 513 |
* @param int $reply_id
|
| 514 |
*
|
| 515 |
-
* @global bbPress $bbp
|
| 516 |
-
*
|
| 517 |
* @uses bbp_get_reply_id() To get the reply_id
|
| 518 |
* @uses bbp_get_topic_id() To get the topic_id
|
| 519 |
* @uses wp_get_object_terms() To a post's current terms
|
|
@@ -522,7 +555,6 @@ class BBP_Akismet {
|
|
| 522 |
* @return array Array of existing topic terms
|
| 523 |
*/
|
| 524 |
public function filter_post_terms( $terms = '', $topic_id = 0, $reply_id = 0 ) {
|
| 525 |
-
global $bbp;
|
| 526 |
|
| 527 |
// Validate the reply_id and topic_id
|
| 528 |
$reply_id = bbp_get_reply_id( $reply_id );
|
|
@@ -563,6 +595,8 @@ class BBP_Akismet {
|
|
| 563 |
$http_host = $host;
|
| 564 |
$blog_charset = get_option( 'blog_charset' );
|
| 565 |
$response = '';
|
|
|
|
|
|
|
| 566 |
|
| 567 |
// Untque User Agent
|
| 568 |
$akismet_ua = "bbPress/{$bbp_version} | ";
|
|
@@ -652,6 +686,9 @@ function bbp_setup_akismet() {
|
|
| 652 |
// Bail if no akismet
|
| 653 |
if ( !defined( 'AKISMET_VERSION' ) ) return;
|
| 654 |
|
|
|
|
|
|
|
|
|
|
| 655 |
// Instantiate Akismet for bbPress
|
| 656 |
$bbp->extend->akismet = new BBP_Akismet();
|
| 657 |
}
|
| 73 |
*
|
| 74 |
* @param string $post_data
|
| 75 |
*
|
|
|
|
|
|
|
| 76 |
* @uses get_userdata() To get the user data
|
| 77 |
* @uses bbp_filter_anonymous_user_data() To get anonymous user data
|
| 78 |
+
* @uses bbp_get_topic_permalink() To get the permalink of the topic
|
| 79 |
+
* @uses bbp_get_reply_url() To get the permalink of the reply
|
| 80 |
* @uses bbp_current_author_ip() To get the IP address of the current user
|
| 81 |
* @uses BBP_Akismet::maybe_spam() To check if post is spam
|
| 82 |
* @uses akismet_get_user_roles() To get the role(s) of the current user
|
| 86 |
* @return array Array of post data
|
| 87 |
*/
|
| 88 |
public function check_post( $post_data ) {
|
| 89 |
+
|
| 90 |
+
// Declare local variables
|
| 91 |
+
$user_data = array();
|
| 92 |
+
$post_permalink = '';
|
| 93 |
|
| 94 |
// Post is not published
|
| 95 |
+
if ( bbp_get_public_status_id() != $post_data['post_status'] )
|
| 96 |
return $post_data;
|
| 97 |
|
| 98 |
+
// Cast the post_author to 0 if it's empty
|
| 99 |
+
if ( empty( $post_data['post_author'] ) )
|
| 100 |
+
$post_data['post_author'] = 0;
|
| 101 |
+
|
| 102 |
+
/** Author ************************************************************/
|
| 103 |
|
| 104 |
// Get user data
|
| 105 |
+
$userdata = get_userdata( $post_data['post_author'] );
|
| 106 |
$anonymous_data = bbp_filter_anonymous_post_data();
|
| 107 |
|
| 108 |
+
// Author is anonymous
|
| 109 |
+
if ( !empty( $anonymous_data ) ) {
|
| 110 |
+
$user_data['name'] = $anonymous_data['bbp_anonymous_name'];
|
| 111 |
+
$user_data['email'] = $anonymous_data['bbp_anonymous_name'];
|
| 112 |
+
$user_data['website'] = $anonymous_data['bbp_anonymous_name'];
|
| 113 |
+
|
| 114 |
+
// Author is logged in
|
| 115 |
+
} elseif ( !empty( $userdata ) ) {
|
| 116 |
+
$user_data['name'] = $userdata->display_name;
|
| 117 |
+
$user_data['email'] = $userdata->user_email;
|
| 118 |
+
$user_data['website'] = $userdata->user_url;
|
| 119 |
+
|
| 120 |
+
// Missing author data, so set some empty strings
|
| 121 |
+
} else {
|
| 122 |
+
$user_data['name'] = '';
|
| 123 |
+
$user_data['email'] = '';
|
| 124 |
+
$user_data['website'] = '';
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/** Post **************************************************************/
|
| 128 |
+
|
| 129 |
+
// Use post parent for permalink
|
| 130 |
+
if ( !empty( $post_data['post_parent'] ) )
|
| 131 |
+
$post_permalink = get_permalink( $post_data['post_parent'] );
|
| 132 |
+
|
| 133 |
// Put post_data back into usable array
|
| 134 |
$post = array(
|
| 135 |
+
'comment_author' => $user_data['name'],
|
| 136 |
+
'comment_author_email' => $user_data['email'],
|
| 137 |
+
'comment_author_url' => $user_data['website'],
|
| 138 |
+
'comment_content' => $post_data['post_content'],
|
| 139 |
+
'comment_post_ID' => $post_data['post_parent'],
|
| 140 |
+
'comment_type' => $post_data['post_type'],
|
| 141 |
+
'permalink' => $post_permalink,
|
| 142 |
'referrer' => $_SERVER['HTTP_REFERER'],
|
| 143 |
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
|
| 144 |
+
'user_ID' => $post_data['post_author'],
|
| 145 |
'user_ip' => bbp_current_author_ip(),
|
| 146 |
+
'user_role' => akismet_get_user_roles( $post_data['post_author'] ),
|
| 147 |
);
|
| 148 |
|
| 149 |
// Check the post_data
|
| 163 |
do_action( 'bbp_akismet_spam_caught' );
|
| 164 |
|
| 165 |
// This is spam
|
| 166 |
+
$post_data['post_status'] = bbp_get_spam_status_id();
|
| 167 |
|
| 168 |
// We don't want your spam tags here
|
| 169 |
add_filter( 'bbp_new_reply_pre_set_terms', array( $this, 'filter_post_terms' ), 1, 3 );
|
| 188 |
*
|
| 189 |
* @param int $post_id
|
| 190 |
*
|
|
|
|
| 191 |
* @global WP_Query $wpdb
|
| 192 |
* @global string $akismet_api_host
|
| 193 |
* @global string $akismet_api_port
|
| 209 |
* @return array Array of existing topic terms
|
| 210 |
*/
|
| 211 |
public function submit_post( $post_id = 0 ) {
|
| 212 |
+
global $wpdb, $akismet_api_host, $akismet_api_port, $current_user, $current_site;
|
| 213 |
|
| 214 |
+
// Innocent until proven guilty
|
| 215 |
+
$request_type = 'ham';
|
| 216 |
+
$current_filter = current_filter();
|
| 217 |
+
|
| 218 |
+
// Check this filter and adjust the $request_type accordingly
|
| 219 |
+
switch ( $current_filter ) {
|
| 220 |
|
| 221 |
// Mysterious, and straight from the can
|
| 222 |
case 'bbp_spammed_topic' :
|
| 239 |
$post_id = (int) $post_id;
|
| 240 |
|
| 241 |
// Make sure we have a post
|
| 242 |
+
$post = get_post( $post_id );
|
| 243 |
+
|
| 244 |
+
// Bail if get_post() fails
|
| 245 |
+
if ( empty( $post ) )
|
| 246 |
return;
|
| 247 |
|
| 248 |
// Bail if we're spamming, but the post_status isn't spam
|
| 249 |
+
if ( ( 'spam' == $request_type ) && ( bbp_get_spam_status_id() != $post->post_status ) )
|
| 250 |
return;
|
| 251 |
|
| 252 |
// Set some default post_data
|
| 399 |
* @param int $post_id
|
| 400 |
* @param object $post
|
| 401 |
*
|
|
|
|
| 402 |
* @global object $this->last_post
|
| 403 |
*
|
| 404 |
* @uses get_post() To get the post object
|
| 408 |
* @uses BBP_Akismet::update_post_history() To update post Akismet history
|
| 409 |
*/
|
| 410 |
public function update_post_meta( $post_id = 0, $post = false ) {
|
|
|
|
| 411 |
|
| 412 |
// Define local variable(s)
|
| 413 |
$as_submitted = false;
|
| 415 |
// Setup some variables
|
| 416 |
$post_id = (int) $post_id;
|
| 417 |
|
| 418 |
+
// Ensure we have a post object
|
| 419 |
+
if ( empty( $post ) )
|
| 420 |
+
$post = get_post( $post_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
// Set up Akismet last post data
|
| 423 |
if ( !empty( $this->last_post ) )
|
| 424 |
$as_submitted = $this->last_post['bbp_post_as_submitted'];
|
| 425 |
|
| 426 |
+
// wp_insert_post() might be called in other contexts. Ensure this is
|
| 427 |
// the same topic/reply as was checked by BBP_Akismet::check_post()
|
| 428 |
if ( is_object( $post ) && !empty( $this->last_post ) && is_array( $as_submitted ) ) {
|
| 429 |
|
| 430 |
+
// Get user data
|
| 431 |
+
$userdata = get_userdata( $post->post_author );
|
| 432 |
+
$anonymous_data = bbp_filter_anonymous_post_data();
|
| 433 |
+
|
| 434 |
// More checks
|
| 435 |
if ( intval( $as_submitted['comment_post_ID'] ) == intval( $post->post_parent )
|
| 436 |
&& $as_submitted['comment_author'] == ( $anonymous_data ? $anonymous_data['bbp_anonymous_name'] : $userdata->display_name )
|
| 445 |
$this->update_post_history( $post_id, __( 'Akismet caught this post as spam', 'bbpress' ), 'check-spam' );
|
| 446 |
|
| 447 |
// If post_status isn't the spam status, as expected, leave a note
|
| 448 |
+
if ( $post->post_status != bbp_get_spam_status_id() ) {
|
| 449 |
$this->update_post_history( $post_id, sprintf( __( 'Post status was changed to %s', 'bbpress' ), $post->post_status ), 'status-changed-' . $post->post_status );
|
| 450 |
}
|
| 451 |
|
| 457 |
$this->update_post_history( $post_id, __( 'Akismet cleared this post', 'bbpress' ), 'check-ham' );
|
| 458 |
|
| 459 |
// If post_status is the spam status, which isn't expected, leave a note
|
| 460 |
+
if ( $post->post_status == bbp_get_spam_status_id() ) {
|
| 461 |
|
| 462 |
// @todo Use wp_blacklist_check()
|
| 463 |
|
| 547 |
* @param int $topic_id
|
| 548 |
* @param int $reply_id
|
| 549 |
*
|
|
|
|
|
|
|
| 550 |
* @uses bbp_get_reply_id() To get the reply_id
|
| 551 |
* @uses bbp_get_topic_id() To get the topic_id
|
| 552 |
* @uses wp_get_object_terms() To a post's current terms
|
| 555 |
* @return array Array of existing topic terms
|
| 556 |
*/
|
| 557 |
public function filter_post_terms( $terms = '', $topic_id = 0, $reply_id = 0 ) {
|
|
|
|
| 558 |
|
| 559 |
// Validate the reply_id and topic_id
|
| 560 |
$reply_id = bbp_get_reply_id( $reply_id );
|
| 595 |
$http_host = $host;
|
| 596 |
$blog_charset = get_option( 'blog_charset' );
|
| 597 |
$response = '';
|
| 598 |
+
$errno = null;
|
| 599 |
+
$errstr = null;
|
| 600 |
|
| 601 |
// Untque User Agent
|
| 602 |
$akismet_ua = "bbPress/{$bbp_version} | ";
|
| 686 |
// Bail if no akismet
|
| 687 |
if ( !defined( 'AKISMET_VERSION' ) ) return;
|
| 688 |
|
| 689 |
+
// Bail if bbPress is not loaded
|
| 690 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 691 |
+
|
| 692 |
// Instantiate Akismet for bbPress
|
| 693 |
$bbp->extend->akismet = new BBP_Akismet();
|
| 694 |
}
|
bbp-includes/bbp-extend-buddypress.php
CHANGED
|
@@ -115,8 +115,8 @@ class BBP_BuddyPress {
|
|
| 115 |
$this->topic_open = 'bbp_topic_open';
|
| 116 |
|
| 117 |
// Replies
|
| 118 |
-
$this->reply_create = '
|
| 119 |
-
$this->reply_edit = '
|
| 120 |
}
|
| 121 |
|
| 122 |
/**
|
|
@@ -436,8 +436,16 @@ class BBP_BuddyPress {
|
|
| 436 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 437 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
// Bail if forum is not public
|
| 440 |
-
if ( !bbp_is_forum_public( $forum_id ) )
|
| 441 |
return;
|
| 442 |
|
| 443 |
// User link for topic author
|
|
@@ -522,8 +530,12 @@ class BBP_BuddyPress {
|
|
| 522 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 523 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 525 |
// Bail if forum is not public
|
| 526 |
-
if ( !bbp_is_forum_public( $forum_id ) )
|
| 527 |
return;
|
| 528 |
|
| 529 |
// Setup links for activity stream
|
|
@@ -584,6 +596,9 @@ function bbp_setup_buddypress() {
|
|
| 584 |
// Bail if no BuddyPress
|
| 585 |
if ( !empty( $bp->maintenance_mode ) || !defined( 'BP_VERSION' ) ) return;
|
| 586 |
|
|
|
|
|
|
|
|
|
|
| 587 |
// Instantiate BuddyPress for bbPress
|
| 588 |
$bbp->extend->buddypress = new BBP_BuddyPress();
|
| 589 |
}
|
| 115 |
$this->topic_open = 'bbp_topic_open';
|
| 116 |
|
| 117 |
// Replies
|
| 118 |
+
$this->reply_create = 'bbp_reply_create';
|
| 119 |
+
$this->reply_edit = 'bbp_reply_edit';
|
| 120 |
}
|
| 121 |
|
| 122 |
/**
|
| 436 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 437 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 438 |
|
| 439 |
+
// Bail if user is not active
|
| 440 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 441 |
+
return;
|
| 442 |
+
|
| 443 |
+
// Bail if topic is not published
|
| 444 |
+
if ( !bbp_is_topic_published( $topic_id ) )
|
| 445 |
+
return;
|
| 446 |
+
|
| 447 |
// Bail if forum is not public
|
| 448 |
+
if ( !bbp_is_forum_public( $forum_id, false ) )
|
| 449 |
return;
|
| 450 |
|
| 451 |
// User link for topic author
|
| 530 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 531 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 532 |
|
| 533 |
+
// Bail if user is not active
|
| 534 |
+
if ( bbp_is_user_inactive( $user_id ) )
|
| 535 |
+
return;
|
| 536 |
+
|
| 537 |
// Bail if forum is not public
|
| 538 |
+
if ( !bbp_is_forum_public( $forum_id, false ) )
|
| 539 |
return;
|
| 540 |
|
| 541 |
// Setup links for activity stream
|
| 596 |
// Bail if no BuddyPress
|
| 597 |
if ( !empty( $bp->maintenance_mode ) || !defined( 'BP_VERSION' ) ) return;
|
| 598 |
|
| 599 |
+
// Bail if bbPress is not loaded
|
| 600 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 601 |
+
|
| 602 |
// Instantiate BuddyPress for bbPress
|
| 603 |
$bbp->extend->buddypress = new BBP_BuddyPress();
|
| 604 |
}
|
bbp-includes/bbp-extend-genesis.php
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Main bbPress Genesis Extender Class
|
| 5 |
+
*
|
| 6 |
+
* @package bbPress
|
| 7 |
+
* @subpackage Genesis
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
// Exit if accessed directly
|
| 11 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
| 12 |
+
|
| 13 |
+
if ( !class_exists( 'BBP_Genesis' ) ) :
|
| 14 |
+
/**
|
| 15 |
+
* Loads Genesis extension
|
| 16 |
+
*
|
| 17 |
+
* @since bbPress (r3485)
|
| 18 |
+
*
|
| 19 |
+
* @package bbPress
|
| 20 |
+
* @subpackage Genesis
|
| 21 |
+
*/
|
| 22 |
+
class BBP_Genesis {
|
| 23 |
+
|
| 24 |
+
/** Variables *************************************************************/
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* @var bool Should Genesis use the full width template layout
|
| 28 |
+
*/
|
| 29 |
+
public $bbp_genesis_width = 'full-width-content';
|
| 30 |
+
|
| 31 |
+
/** Functions *************************************************************/
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* The main bbPress Genesis loader
|
| 35 |
+
*
|
| 36 |
+
* @since bbPress (r3485)
|
| 37 |
+
*
|
| 38 |
+
* @uses BBP_Genesis::setup_actions()
|
| 39 |
+
*/
|
| 40 |
+
public function __construct() {
|
| 41 |
+
$this->setup_actions();
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* Setup the Genesis actions
|
| 46 |
+
*
|
| 47 |
+
* @since bbPress (r3485)
|
| 48 |
+
* @access private
|
| 49 |
+
*
|
| 50 |
+
* @uses add_action() To add 'the_content' back
|
| 51 |
+
*/
|
| 52 |
+
private function setup_actions() {
|
| 53 |
+
|
| 54 |
+
/**
|
| 55 |
+
* We hook into 'genesis_before' because t is the most reliable hook
|
| 56 |
+
* available to bbPress in the Genesis page load process.
|
| 57 |
+
*/
|
| 58 |
+
add_action( 'genesis_before', array( $this, 'genesis_post_actions' ) );
|
| 59 |
+
|
| 60 |
+
// Force Genesis into full-width-content mode
|
| 61 |
+
add_filter( 'genesis_pre_get_option_site_layout', array( $this, 'force_full_content_width' ) );
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/**
|
| 65 |
+
* Tweak problematic Genesis post actions
|
| 66 |
+
*
|
| 67 |
+
* @since bbPress (r3485)
|
| 68 |
+
* @access private
|
| 69 |
+
*
|
| 70 |
+
* @uses remove_action() To remove various Genesis actions
|
| 71 |
+
* @uses add_filter() To add a filter for fuss-width mode
|
| 72 |
+
* @uses add_action() To add 'the_content' back
|
| 73 |
+
*/
|
| 74 |
+
public function genesis_post_actions() {
|
| 75 |
+
|
| 76 |
+
/**
|
| 77 |
+
* If the current theme is a child theme of Genesis that also includes
|
| 78 |
+
* the template files bbPress needs, we can leave things how they are.
|
| 79 |
+
*/
|
| 80 |
+
if ( is_bbpress() ) {
|
| 81 |
+
|
| 82 |
+
/** Remove Actions ************************************************/
|
| 83 |
+
|
| 84 |
+
// Remove genesis breadcrumbs
|
| 85 |
+
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
|
| 86 |
+
|
| 87 |
+
/**
|
| 88 |
+
* Remove post info & meta
|
| 89 |
+
*
|
| 90 |
+
* If you moved the info/meta from their default locations, you are
|
| 91 |
+
* on your own.
|
| 92 |
+
*/
|
| 93 |
+
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
|
| 94 |
+
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
|
| 95 |
+
|
| 96 |
+
/**
|
| 97 |
+
* Remove Genesis post image and content
|
| 98 |
+
*
|
| 99 |
+
* bbPress heavily relies on the_content() so if Genesis is
|
| 100 |
+
* modifying it unexpectedly, we need to un-unexpect it.
|
| 101 |
+
*/
|
| 102 |
+
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
|
| 103 |
+
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
|
| 104 |
+
|
| 105 |
+
/**
|
| 106 |
+
* Remove authorbox
|
| 107 |
+
*
|
| 108 |
+
* In some odd cases the Genesis authorbox could appear
|
| 109 |
+
*/
|
| 110 |
+
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
|
| 111 |
+
|
| 112 |
+
// Remove the navigation after the post loop
|
| 113 |
+
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
|
| 114 |
+
|
| 115 |
+
/** Add Actions ***************************************************/
|
| 116 |
+
|
| 117 |
+
// Re add 'the_content' back onto 'genesis_post_content'
|
| 118 |
+
add_action( 'genesis_post_content', 'the_content' );
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
/**
|
| 123 |
+
* bbPress will display itself in Genesis in full-width mode by default
|
| 124 |
+
*
|
| 125 |
+
* Available default layouts (assuming theme supports them):
|
| 126 |
+
*
|
| 127 |
+
* full-width-content
|
| 128 |
+
* content-sidebar
|
| 129 |
+
* sidebar-content
|
| 130 |
+
* content-sidebar-sidebar
|
| 131 |
+
* sidebar-sidebar-content
|
| 132 |
+
* sidebar-content-sidebar
|
| 133 |
+
*
|
| 134 |
+
* @since bbPress (r3485)
|
| 135 |
+
* @param type $full_width
|
| 136 |
+
* @return bool To do, or not to do... full-width
|
| 137 |
+
*/
|
| 138 |
+
public function force_full_content_width( $bbp_genesis_width = 'full-width-content' ) {
|
| 139 |
+
|
| 140 |
+
// Only override the content width while in bbPress
|
| 141 |
+
if ( is_bbpress() ) {
|
| 142 |
+
$bbp_genesis_width = $this->bbp_genesis_width;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
// Allow the override to be overridden - a dream within a dream
|
| 146 |
+
return apply_filters( 'bbp_genesis_force_full_content_width', $bbp_genesis_width );
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
endif;
|
| 150 |
+
|
| 151 |
+
/**
|
| 152 |
+
* Loads Genesis helper inside bbPress global class
|
| 153 |
+
*
|
| 154 |
+
* @since bbPress (r3485)
|
| 155 |
+
*
|
| 156 |
+
* @global bbPress $bbp
|
| 157 |
+
* @return If Genesis is not the active theme
|
| 158 |
+
*/
|
| 159 |
+
function bbp_setup_genesis() {
|
| 160 |
+
global $bbp;
|
| 161 |
+
|
| 162 |
+
// Bail if no genesis
|
| 163 |
+
if ( basename( TEMPLATEPATH ) !== 'genesis' ) return;
|
| 164 |
+
|
| 165 |
+
// Bail if bbPress is not loaded
|
| 166 |
+
if ( 'bbPress' !== get_class( $bbp ) ) return;
|
| 167 |
+
|
| 168 |
+
// Instantiate Genesis for bbPress
|
| 169 |
+
$bbp->extend->genesis = new BBP_Genesis();
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
?>
|
bbp-includes/bbp-forum-functions.php
CHANGED
|
@@ -31,7 +31,7 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
| 31 |
// Forum
|
| 32 |
$default_forum = array(
|
| 33 |
'post_parent' => 0, // forum ID
|
| 34 |
-
'post_status' =>
|
| 35 |
'post_type' => bbp_get_forum_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
|
@@ -207,10 +207,10 @@ function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 207 |
do_action( 'bbp_publicize_forum', $forum_id );
|
| 208 |
|
| 209 |
// Only run queries if visibility is changing
|
| 210 |
-
if (
|
| 211 |
|
| 212 |
// Remove from _bbp_private_forums site option
|
| 213 |
-
if (
|
| 214 |
|
| 215 |
// Get private forums
|
| 216 |
$private = bbp_get_private_forum_ids();
|
|
@@ -229,7 +229,7 @@ function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 229 |
}
|
| 230 |
|
| 231 |
// Remove from _bbp_hidden_forums site option
|
| 232 |
-
if (
|
| 233 |
|
| 234 |
// Get hidden forums
|
| 235 |
$hidden = bbp_get_hidden_forum_ids();
|
|
@@ -249,8 +249,8 @@ function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 249 |
|
| 250 |
// Update forum post_status
|
| 251 |
global $wpdb;
|
| 252 |
-
$wpdb->update( $wpdb->posts, array( 'post_status' =>
|
| 253 |
-
wp_transition_post_status(
|
| 254 |
}
|
| 255 |
|
| 256 |
do_action( 'bbp_publicized_forum', $forum_id );
|
|
@@ -274,10 +274,10 @@ function bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 274 |
do_action( 'bbp_privatize_forum', $forum_id );
|
| 275 |
|
| 276 |
// Only run queries if visibility is changing
|
| 277 |
-
if (
|
| 278 |
|
| 279 |
// Remove from _bbp_hidden_forums site option
|
| 280 |
-
if (
|
| 281 |
|
| 282 |
// Get hidden forums
|
| 283 |
$hidden = bbp_get_hidden_forum_ids();
|
|
@@ -302,8 +302,8 @@ function bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 302 |
|
| 303 |
// Update forums visibility setting
|
| 304 |
global $wpdb;
|
| 305 |
-
$wpdb->update( $wpdb->posts, array( 'post_status' =>
|
| 306 |
-
wp_transition_post_status(
|
| 307 |
}
|
| 308 |
|
| 309 |
do_action( 'bbp_privatized_forum', $forum_id );
|
|
@@ -327,10 +327,10 @@ function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 327 |
do_action( 'bbp_hide_forum', $forum_id );
|
| 328 |
|
| 329 |
// Only run queries if visibility is changing
|
| 330 |
-
if (
|
| 331 |
|
| 332 |
// Remove from _bbp_private_forums site option
|
| 333 |
-
if (
|
| 334 |
|
| 335 |
// Get private forums
|
| 336 |
$private = bbp_get_private_forum_ids();
|
|
@@ -354,9 +354,9 @@ function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 354 |
update_option( '_bbp_hidden_forums', array_unique( array_values( $hidden ) ) );
|
| 355 |
|
| 356 |
// Update forums visibility setting
|
| 357 |
-
global $
|
| 358 |
-
$wpdb->update( $wpdb->posts, array( 'post_status' =>
|
| 359 |
-
wp_transition_post_status(
|
| 360 |
}
|
| 361 |
|
| 362 |
do_action( 'bbp_hid_forum', $forum_id );
|
|
@@ -386,13 +386,18 @@ function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
| 386 |
function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
| 387 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 388 |
|
|
|
|
|
|
|
|
|
|
| 389 |
// Do some calculation if not manually set
|
| 390 |
if ( empty( $topic_id ) ) {
|
| 391 |
|
| 392 |
// Loop through children and add together forum reply counts
|
| 393 |
-
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) )
|
| 394 |
-
foreach ( (array) $children as $child )
|
| 395 |
-
$children_last_topic = bbp_update_forum_last_topic_id
|
|
|
|
|
|
|
| 396 |
|
| 397 |
// Setup recent topic query vars
|
| 398 |
$post_vars = array(
|
|
@@ -404,18 +409,24 @@ function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
|
| 404 |
);
|
| 405 |
|
| 406 |
// Get the most recent topic in this forum_id
|
| 407 |
-
if ( $recent_topic = get_posts( $post_vars ) )
|
| 408 |
$topic_id = $recent_topic[0]->ID;
|
|
|
|
| 409 |
}
|
| 410 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
// If child forums have higher id, use that instead
|
| 412 |
if ( !empty( $children ) && ( $children_last_topic > $topic_id ) )
|
| 413 |
$topic_id = $children_last_topic;
|
| 414 |
|
| 415 |
-
// Update the last topic
|
| 416 |
-
|
|
|
|
| 417 |
|
| 418 |
-
return apply_filters( 'bbp_update_forum_last_topic_id',
|
| 419 |
}
|
| 420 |
|
| 421 |
/**
|
|
@@ -431,6 +442,7 @@ function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
|
| 431 |
* forums
|
| 432 |
* @uses bbp_forum_query_topic_ids() To get the topic ids in the forum
|
| 433 |
* @uses bbp_forum_query_last_reply_id() To get the forum's last reply id
|
|
|
|
| 434 |
* @uses update_post_meta() To update the forum's last active id meta
|
| 435 |
* @uses apply_filters() Calls 'bbp_update_forum_last_reply_id' with the last
|
| 436 |
* reply id and forum id
|
|
@@ -439,13 +451,18 @@ function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
|
| 439 |
function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
|
| 440 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 441 |
|
|
|
|
|
|
|
|
|
|
| 442 |
// Do some calculation if not manually set
|
| 443 |
if ( empty( $reply_id ) ) {
|
| 444 |
|
| 445 |
// Loop through children and get the most recent reply id
|
| 446 |
-
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) )
|
| 447 |
-
foreach ( (array) $children as $child )
|
| 448 |
-
$children_last_reply = bbp_update_forum_last_reply_id
|
|
|
|
|
|
|
| 449 |
|
| 450 |
// If this forum has topics...
|
| 451 |
if ( $topic_ids = bbp_forum_query_topic_ids( $forum_id ) ) {
|
|
@@ -458,14 +475,19 @@ function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
|
|
| 458 |
}
|
| 459 |
}
|
| 460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
// If child forums have higher ID, check for newer reply id
|
| 462 |
-
if ( !empty( $children ) && (
|
| 463 |
$reply_id = $children_last_reply;
|
| 464 |
|
| 465 |
-
// Update the last reply
|
| 466 |
-
|
|
|
|
| 467 |
|
| 468 |
-
return apply_filters( 'bbp_update_forum_last_reply_id',
|
| 469 |
}
|
| 470 |
|
| 471 |
/**
|
|
@@ -481,14 +503,19 @@ function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
|
|
| 481 |
* child forums
|
| 482 |
* @uses bbp_forum_query_topic_ids() To get the topic ids in the forum
|
| 483 |
* @uses bbp_forum_query_last_reply_id() To get the forum's last reply id
|
|
|
|
| 484 |
* @uses update_post_meta() To update the forum's last active id meta
|
| 485 |
* @uses apply_filters() Calls 'bbp_update_forum_last_active_id' with the last
|
| 486 |
* active post id and forum id
|
| 487 |
* @return bool True on success, false on failure
|
| 488 |
*/
|
| 489 |
function bbp_update_forum_last_active_id( $forum_id = 0, $active_id = 0 ) {
|
|
|
|
| 490 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 491 |
|
|
|
|
|
|
|
|
|
|
| 492 |
// Do some calculation if not manually set
|
| 493 |
if ( empty( $active_id ) ) {
|
| 494 |
|
|
@@ -508,11 +535,17 @@ function bbp_update_forum_last_active_id( $forum_id = 0, $active_id = 0 ) {
|
|
| 508 |
}
|
| 509 |
}
|
| 510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
// If child forums have higher id, use that instead
|
| 512 |
if ( !empty( $children ) && ( $children_last_active > $active_id ) )
|
| 513 |
$active_id = $children_last_active;
|
| 514 |
|
| 515 |
-
|
|
|
|
|
|
|
| 516 |
|
| 517 |
return apply_filters( 'bbp_update_forum_last_active_id', (int) $active_id, $forum_id );
|
| 518 |
}
|
|
@@ -539,7 +572,9 @@ function bbp_update_forum_last_active_time( $forum_id = 0, $new_time = '' ) {
|
|
| 539 |
if ( empty( $new_time ) )
|
| 540 |
$new_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $forum_id ) );
|
| 541 |
|
| 542 |
-
|
|
|
|
|
|
|
| 543 |
|
| 544 |
return apply_filters( 'bbp_update_forum_last_active', $new_time, $forum_id );
|
| 545 |
}
|
|
@@ -588,9 +623,11 @@ function bbp_update_forum_topic_count( $forum_id = 0 ) {
|
|
| 588 |
$children_topic_count = 0;
|
| 589 |
|
| 590 |
// Loop through subforums and add together forum topic counts
|
| 591 |
-
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) )
|
| 592 |
-
foreach ( (array) $children as $child )
|
| 593 |
-
$children_topic_count += bbp_update_forum_topic_count( $child );
|
|
|
|
|
|
|
| 594 |
|
| 595 |
// Get total topics for this forum
|
| 596 |
$topics = (int) count( bbp_forum_query_topic_ids( $forum_id ) );
|
|
@@ -624,7 +661,7 @@ function bbp_update_forum_topic_count( $forum_id = 0 ) {
|
|
| 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
|
| 628 |
|
| 629 |
// If topic_id was passed as $forum_id, then get its forum
|
| 630 |
if ( bbp_is_topic( $forum_id ) ) {
|
|
@@ -641,7 +678,7 @@ function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 )
|
|
| 641 |
|
| 642 |
// Get topics of forum
|
| 643 |
if ( empty( $topic_count ) )
|
| 644 |
-
$topic_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array(
|
| 645 |
|
| 646 |
// Update the count
|
| 647 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) $topic_count );
|
|
@@ -672,7 +709,7 @@ function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 )
|
|
| 672 |
* @return int Forum reply count
|
| 673 |
*/
|
| 674 |
function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
| 675 |
-
global $wpdb
|
| 676 |
|
| 677 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 678 |
$children_reply_count = 0;
|
|
@@ -684,7 +721,7 @@ function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
|
| 684 |
|
| 685 |
// Don't count replies if the forum is a category
|
| 686 |
if ( $topic_ids = bbp_forum_query_topic_ids( $forum_id ) )
|
| 687 |
-
$reply_count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '
|
| 688 |
else
|
| 689 |
$reply_count = 0;
|
| 690 |
|
|
@@ -725,12 +762,13 @@ function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
|
| 725 |
*/
|
| 726 |
function bbp_update_forum( $args = '' ) {
|
| 727 |
$defaults = array(
|
| 728 |
-
'forum_id'
|
| 729 |
-
'post_parent'
|
| 730 |
-
'last_topic_id'
|
| 731 |
-
'last_reply_id'
|
| 732 |
-
'last_active_id'
|
| 733 |
-
'last_active_time'
|
|
|
|
| 734 |
);
|
| 735 |
|
| 736 |
$r = wp_parse_args( $args, $defaults );
|
|
@@ -747,7 +785,9 @@ function bbp_update_forum( $args = '' ) {
|
|
| 747 |
if ( empty( $last_active_time ) )
|
| 748 |
$last_active_time = get_post_field( 'post_date', $last_active_id );
|
| 749 |
|
| 750 |
-
|
|
|
|
|
|
|
| 751 |
|
| 752 |
// Counts
|
| 753 |
bbp_update_forum_subforum_count ( $forum_id );
|
|
@@ -940,8 +980,6 @@ function bbp_pre_get_posts_exclude_forums( $posts_query ) {
|
|
| 940 |
* and forum id
|
| 941 |
*/
|
| 942 |
function bbp_forum_query_topic_ids( $forum_id ) {
|
| 943 |
-
global $bbp;
|
| 944 |
-
|
| 945 |
$topic_ids = bbp_get_public_child_ids( $forum_id, bbp_get_topic_post_type() );
|
| 946 |
|
| 947 |
return apply_filters( 'bbp_forum_query_topic_ids', $topic_ids, $forum_id );
|
|
@@ -961,8 +999,6 @@ function bbp_forum_query_topic_ids( $forum_id ) {
|
|
| 961 |
* ids and forum id
|
| 962 |
*/
|
| 963 |
function bbp_forum_query_subforum_ids( $forum_id ) {
|
| 964 |
-
global $bbp, $wpdb;
|
| 965 |
-
|
| 966 |
$subforum_ids = bbp_get_public_child_ids( $forum_id, bbp_get_forum_post_type() );
|
| 967 |
|
| 968 |
return apply_filters( 'bbp_get_forum_subforum_ids', $subforum_ids, $forum_id );
|
|
@@ -985,7 +1021,7 @@ function bbp_forum_query_subforum_ids( $forum_id ) {
|
|
| 985 |
* and forum id
|
| 986 |
*/
|
| 987 |
function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
|
| 988 |
-
global $
|
| 989 |
|
| 990 |
$cache_id = 'bbp_get_forum_' . $forum_id . '_reply_id';
|
| 991 |
|
|
@@ -994,7 +1030,7 @@ function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
|
|
| 994 |
if ( empty( $topic_ids ) )
|
| 995 |
$topic_ids = bbp_forum_query_topic_ids( $forum_id );
|
| 996 |
|
| 997 |
-
if ( !empty( $topic_ids ) && ( $reply_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '
|
| 998 |
wp_cache_set( $cache_id, $reply_id, 'bbpress' );
|
| 999 |
else
|
| 1000 |
wp_cache_set( $cache_id, '0', 'bbpress' );
|
| 31 |
// Forum
|
| 32 |
$default_forum = array(
|
| 33 |
'post_parent' => 0, // forum ID
|
| 34 |
+
'post_status' => bbp_get_public_status_id(),
|
| 35 |
'post_type' => bbp_get_forum_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
| 207 |
do_action( 'bbp_publicize_forum', $forum_id );
|
| 208 |
|
| 209 |
// Only run queries if visibility is changing
|
| 210 |
+
if ( bbp_get_public_status_id() != $current_visibility ) {
|
| 211 |
|
| 212 |
// Remove from _bbp_private_forums site option
|
| 213 |
+
if ( bbp_get_private_status_id() == $current_visibility ) {
|
| 214 |
|
| 215 |
// Get private forums
|
| 216 |
$private = bbp_get_private_forum_ids();
|
| 229 |
}
|
| 230 |
|
| 231 |
// Remove from _bbp_hidden_forums site option
|
| 232 |
+
if ( bbp_get_hidden_status_id() == $current_visibility ) {
|
| 233 |
|
| 234 |
// Get hidden forums
|
| 235 |
$hidden = bbp_get_hidden_forum_ids();
|
| 249 |
|
| 250 |
// Update forum post_status
|
| 251 |
global $wpdb;
|
| 252 |
+
$wpdb->update( $wpdb->posts, array( 'post_status' => bbp_get_public_status_id() ), array( 'ID' => $forum_id ) );
|
| 253 |
+
wp_transition_post_status( bbp_get_public_status_id(), $current_visibility, get_post( $forum_id ) );
|
| 254 |
}
|
| 255 |
|
| 256 |
do_action( 'bbp_publicized_forum', $forum_id );
|
| 274 |
do_action( 'bbp_privatize_forum', $forum_id );
|
| 275 |
|
| 276 |
// Only run queries if visibility is changing
|
| 277 |
+
if ( bbp_get_private_status_id() != $current_visibility ) {
|
| 278 |
|
| 279 |
// Remove from _bbp_hidden_forums site option
|
| 280 |
+
if ( bbp_get_hidden_status_id() == $current_visibility ) {
|
| 281 |
|
| 282 |
// Get hidden forums
|
| 283 |
$hidden = bbp_get_hidden_forum_ids();
|
| 302 |
|
| 303 |
// Update forums visibility setting
|
| 304 |
global $wpdb;
|
| 305 |
+
$wpdb->update( $wpdb->posts, array( 'post_status' => bbp_get_private_status_id() ), array( 'ID' => $forum_id ) );
|
| 306 |
+
wp_transition_post_status( bbp_get_private_status_id(), $current_visibility, get_post( $forum_id ) );
|
| 307 |
}
|
| 308 |
|
| 309 |
do_action( 'bbp_privatized_forum', $forum_id );
|
| 327 |
do_action( 'bbp_hide_forum', $forum_id );
|
| 328 |
|
| 329 |
// Only run queries if visibility is changing
|
| 330 |
+
if ( bbp_get_hidden_status_id() != $current_visibility ) {
|
| 331 |
|
| 332 |
// Remove from _bbp_private_forums site option
|
| 333 |
+
if ( bbp_get_private_status_id() == $current_visibility ) {
|
| 334 |
|
| 335 |
// Get private forums
|
| 336 |
$private = bbp_get_private_forum_ids();
|
| 354 |
update_option( '_bbp_hidden_forums', array_unique( array_values( $hidden ) ) );
|
| 355 |
|
| 356 |
// Update forums visibility setting
|
| 357 |
+
global $wpdb;
|
| 358 |
+
$wpdb->update( $wpdb->posts, array( 'post_status' => bbp_get_hidden_status_id() ), array( 'ID' => $forum_id ) );
|
| 359 |
+
wp_transition_post_status( bbp_get_hidden_status_id(), $current_visibility, get_post( $forum_id ) );
|
| 360 |
}
|
| 361 |
|
| 362 |
do_action( 'bbp_hid_forum', $forum_id );
|
| 386 |
function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
| 387 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 388 |
|
| 389 |
+
// Define local variable(s)
|
| 390 |
+
$children_last_topic = 0;
|
| 391 |
+
|
| 392 |
// Do some calculation if not manually set
|
| 393 |
if ( empty( $topic_id ) ) {
|
| 394 |
|
| 395 |
// Loop through children and add together forum reply counts
|
| 396 |
+
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) ) {
|
| 397 |
+
foreach ( (array) $children as $child ) {
|
| 398 |
+
$children_last_topic = bbp_update_forum_last_topic_id( $child ); // Recursive
|
| 399 |
+
}
|
| 400 |
+
}
|
| 401 |
|
| 402 |
// Setup recent topic query vars
|
| 403 |
$post_vars = array(
|
| 409 |
);
|
| 410 |
|
| 411 |
// Get the most recent topic in this forum_id
|
| 412 |
+
if ( $recent_topic = get_posts( $post_vars ) ) {
|
| 413 |
$topic_id = $recent_topic[0]->ID;
|
| 414 |
+
}
|
| 415 |
}
|
| 416 |
|
| 417 |
+
// Cast as integer in case of empty or string
|
| 418 |
+
$topic_id = (int) $topic_id;
|
| 419 |
+
$children_last_topic = (int) $children_last_topic;
|
| 420 |
+
|
| 421 |
// If child forums have higher id, use that instead
|
| 422 |
if ( !empty( $children ) && ( $children_last_topic > $topic_id ) )
|
| 423 |
$topic_id = $children_last_topic;
|
| 424 |
|
| 425 |
+
// Update the last public topic ID
|
| 426 |
+
if ( bbp_is_topic_published( $topic_id ) )
|
| 427 |
+
update_post_meta( $forum_id, '_bbp_last_topic_id', $topic_id );
|
| 428 |
|
| 429 |
+
return apply_filters( 'bbp_update_forum_last_topic_id', $topic_id, $forum_id );
|
| 430 |
}
|
| 431 |
|
| 432 |
/**
|
| 442 |
* forums
|
| 443 |
* @uses bbp_forum_query_topic_ids() To get the topic ids in the forum
|
| 444 |
* @uses bbp_forum_query_last_reply_id() To get the forum's last reply id
|
| 445 |
+
* @uses bbp_is_reply_published() To make sure the reply is published
|
| 446 |
* @uses update_post_meta() To update the forum's last active id meta
|
| 447 |
* @uses apply_filters() Calls 'bbp_update_forum_last_reply_id' with the last
|
| 448 |
* reply id and forum id
|
| 451 |
function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
|
| 452 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 453 |
|
| 454 |
+
// Define local variable(s)
|
| 455 |
+
$children_last_reply = 0;
|
| 456 |
+
|
| 457 |
// Do some calculation if not manually set
|
| 458 |
if ( empty( $reply_id ) ) {
|
| 459 |
|
| 460 |
// Loop through children and get the most recent reply id
|
| 461 |
+
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) ) {
|
| 462 |
+
foreach ( (array) $children as $child ) {
|
| 463 |
+
$children_last_reply = bbp_update_forum_last_reply_id( $child ); // Recursive
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
|
| 467 |
// If this forum has topics...
|
| 468 |
if ( $topic_ids = bbp_forum_query_topic_ids( $forum_id ) ) {
|
| 475 |
}
|
| 476 |
}
|
| 477 |
|
| 478 |
+
// Cast as integer in case of empty or string
|
| 479 |
+
$reply_id = (int) $reply_id;
|
| 480 |
+
$children_last_reply = (int) $children_last_reply;
|
| 481 |
+
|
| 482 |
// If child forums have higher ID, check for newer reply id
|
| 483 |
+
if ( !empty( $children ) && ( $children_last_reply > $reply_id ) )
|
| 484 |
$reply_id = $children_last_reply;
|
| 485 |
|
| 486 |
+
// Update the last public reply ID
|
| 487 |
+
if ( bbp_is_reply_published( $reply_id ) )
|
| 488 |
+
update_post_meta( $forum_id, '_bbp_last_reply_id', $reply_id );
|
| 489 |
|
| 490 |
+
return apply_filters( 'bbp_update_forum_last_reply_id', $reply_id, $forum_id );
|
| 491 |
}
|
| 492 |
|
| 493 |
/**
|
| 503 |
* child forums
|
| 504 |
* @uses bbp_forum_query_topic_ids() To get the topic ids in the forum
|
| 505 |
* @uses bbp_forum_query_last_reply_id() To get the forum's last reply id
|
| 506 |
+
* @uses get_post_status() To make sure the reply is published
|
| 507 |
* @uses update_post_meta() To update the forum's last active id meta
|
| 508 |
* @uses apply_filters() Calls 'bbp_update_forum_last_active_id' with the last
|
| 509 |
* active post id and forum id
|
| 510 |
* @return bool True on success, false on failure
|
| 511 |
*/
|
| 512 |
function bbp_update_forum_last_active_id( $forum_id = 0, $active_id = 0 ) {
|
| 513 |
+
|
| 514 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 515 |
|
| 516 |
+
// Define local variable(s)
|
| 517 |
+
$children_last_active = 0;
|
| 518 |
+
|
| 519 |
// Do some calculation if not manually set
|
| 520 |
if ( empty( $active_id ) ) {
|
| 521 |
|
| 535 |
}
|
| 536 |
}
|
| 537 |
|
| 538 |
+
// Cast as integer in case of empty or string
|
| 539 |
+
$active_id = (int) $active_id;
|
| 540 |
+
$children_last_active = (int) $children_last_active;
|
| 541 |
+
|
| 542 |
// If child forums have higher id, use that instead
|
| 543 |
if ( !empty( $children ) && ( $children_last_active > $active_id ) )
|
| 544 |
$active_id = $children_last_active;
|
| 545 |
|
| 546 |
+
// Update only if published
|
| 547 |
+
if ( bbp_get_public_status_id() == get_post_status( $active_id ) )
|
| 548 |
+
update_post_meta( $forum_id, '_bbp_last_active_id', (int) $active_id );
|
| 549 |
|
| 550 |
return apply_filters( 'bbp_update_forum_last_active_id', (int) $active_id, $forum_id );
|
| 551 |
}
|
| 572 |
if ( empty( $new_time ) )
|
| 573 |
$new_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $forum_id ) );
|
| 574 |
|
| 575 |
+
// Update only if there is a time
|
| 576 |
+
if ( !empty( $new_time ) )
|
| 577 |
+
update_post_meta( $forum_id, '_bbp_last_active_time', $new_time );
|
| 578 |
|
| 579 |
return apply_filters( 'bbp_update_forum_last_active', $new_time, $forum_id );
|
| 580 |
}
|
| 623 |
$children_topic_count = 0;
|
| 624 |
|
| 625 |
// Loop through subforums and add together forum topic counts
|
| 626 |
+
if ( $children = bbp_forum_query_subforum_ids( $forum_id ) ) {
|
| 627 |
+
foreach ( (array) $children as $child ) {
|
| 628 |
+
$children_topic_count += bbp_update_forum_topic_count( $child ); // Recursive
|
| 629 |
+
}
|
| 630 |
+
}
|
| 631 |
|
| 632 |
// Get total topics for this forum
|
| 633 |
$topics = (int) count( bbp_forum_query_topic_ids( $forum_id ) );
|
| 661 |
* @return int Topic hidden topic count
|
| 662 |
*/
|
| 663 |
function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 ) {
|
| 664 |
+
global $wpdb;
|
| 665 |
|
| 666 |
// If topic_id was passed as $forum_id, then get its forum
|
| 667 |
if ( bbp_is_topic( $forum_id ) ) {
|
| 678 |
|
| 679 |
// Get topics of forum
|
| 680 |
if ( empty( $topic_count ) )
|
| 681 |
+
$topic_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array( bbp_get_trash_status_id(), bbp_get_spam_status_id() ) ) . "') AND post_type = '%s';", $forum_id, bbp_get_topic_post_type() ) );
|
| 682 |
|
| 683 |
// Update the count
|
| 684 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) $topic_count );
|
| 709 |
* @return int Forum reply count
|
| 710 |
*/
|
| 711 |
function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
| 712 |
+
global $wpdb;
|
| 713 |
|
| 714 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 715 |
$children_reply_count = 0;
|
| 721 |
|
| 722 |
// Don't count replies if the forum is a category
|
| 723 |
if ( $topic_ids = bbp_forum_query_topic_ids( $forum_id ) )
|
| 724 |
+
$reply_count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '%s' AND post_type = '%s';", bbp_get_public_status_id(), bbp_get_reply_post_type() ) );
|
| 725 |
else
|
| 726 |
$reply_count = 0;
|
| 727 |
|
| 762 |
*/
|
| 763 |
function bbp_update_forum( $args = '' ) {
|
| 764 |
$defaults = array(
|
| 765 |
+
'forum_id' => 0,
|
| 766 |
+
'post_parent' => 0,
|
| 767 |
+
'last_topic_id' => 0,
|
| 768 |
+
'last_reply_id' => 0,
|
| 769 |
+
'last_active_id' => 0,
|
| 770 |
+
'last_active_time' => 0,
|
| 771 |
+
'last_active_status' => bbp_get_public_status_id()
|
| 772 |
);
|
| 773 |
|
| 774 |
$r = wp_parse_args( $args, $defaults );
|
| 785 |
if ( empty( $last_active_time ) )
|
| 786 |
$last_active_time = get_post_field( 'post_date', $last_active_id );
|
| 787 |
|
| 788 |
+
if ( bbp_get_public_status_id() == $last_active_status ) {
|
| 789 |
+
bbp_update_forum_last_active_time( $forum_id, $last_active_time );
|
| 790 |
+
}
|
| 791 |
|
| 792 |
// Counts
|
| 793 |
bbp_update_forum_subforum_count ( $forum_id );
|
| 980 |
* and forum id
|
| 981 |
*/
|
| 982 |
function bbp_forum_query_topic_ids( $forum_id ) {
|
|
|
|
|
|
|
| 983 |
$topic_ids = bbp_get_public_child_ids( $forum_id, bbp_get_topic_post_type() );
|
| 984 |
|
| 985 |
return apply_filters( 'bbp_forum_query_topic_ids', $topic_ids, $forum_id );
|
| 999 |
* ids and forum id
|
| 1000 |
*/
|
| 1001 |
function bbp_forum_query_subforum_ids( $forum_id ) {
|
|
|
|
|
|
|
| 1002 |
$subforum_ids = bbp_get_public_child_ids( $forum_id, bbp_get_forum_post_type() );
|
| 1003 |
|
| 1004 |
return apply_filters( 'bbp_get_forum_subforum_ids', $subforum_ids, $forum_id );
|
| 1021 |
* and forum id
|
| 1022 |
*/
|
| 1023 |
function bbp_forum_query_last_reply_id( $forum_id, $topic_ids = 0 ) {
|
| 1024 |
+
global $wpdb;
|
| 1025 |
|
| 1026 |
$cache_id = 'bbp_get_forum_' . $forum_id . '_reply_id';
|
| 1027 |
|
| 1030 |
if ( empty( $topic_ids ) )
|
| 1031 |
$topic_ids = bbp_forum_query_topic_ids( $forum_id );
|
| 1032 |
|
| 1033 |
+
if ( !empty( $topic_ids ) && ( $reply_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topic_ids ) . " ) AND post_status = '%s' AND post_type = '%s' ORDER BY ID DESC LIMIT 1;", bbp_get_public_status_id(), bbp_get_reply_post_type() ) ) ) )
|
| 1034 |
wp_cache_set( $cache_id, $reply_id, 'bbpress' );
|
| 1035 |
else
|
| 1036 |
wp_cache_set( $cache_id, '0', 'bbpress' );
|
bbp-includes/bbp-forum-template.php
CHANGED
|
@@ -61,22 +61,22 @@ function bbp_has_forums( $args = '' ) {
|
|
| 61 |
global $bbp;
|
| 62 |
|
| 63 |
// Setup possible post__not_in array
|
| 64 |
-
$post_stati[] =
|
| 65 |
|
| 66 |
// Super admin get whitelisted post statuses
|
| 67 |
if ( is_super_admin() ) {
|
| 68 |
-
$post_stati = array(
|
| 69 |
|
| 70 |
// Not a super admin, so check caps
|
| 71 |
} else {
|
| 72 |
|
| 73 |
// Check if user can read private forums
|
| 74 |
if ( current_user_can( 'read_private_forums' ) )
|
| 75 |
-
$post_stati[] =
|
| 76 |
|
| 77 |
// Check if user can read hidden forums
|
| 78 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 79 |
-
$post_stati[] =
|
| 80 |
}
|
| 81 |
|
| 82 |
// The default forum query for most circumstances
|
|
@@ -579,22 +579,22 @@ function bbp_forum_get_subforums( $args = '' ) {
|
|
| 579 |
$args = array( 'post_parent' => $args );
|
| 580 |
|
| 581 |
// Setup possible post__not_in array
|
| 582 |
-
$post_stati[] =
|
| 583 |
|
| 584 |
// Super admin get whitelisted post statuses
|
| 585 |
if ( is_super_admin() ) {
|
| 586 |
-
$post_stati = array(
|
| 587 |
|
| 588 |
// Not a super admin, so check caps
|
| 589 |
} else {
|
| 590 |
|
| 591 |
// Check if user can read private forums
|
| 592 |
if ( current_user_can( 'read_private_forums' ) )
|
| 593 |
-
$post_stati[] =
|
| 594 |
|
| 595 |
// Check if user can read hidden forums
|
| 596 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 597 |
-
$post_stati[] =
|
| 598 |
}
|
| 599 |
|
| 600 |
$default = array(
|
|
@@ -635,7 +635,6 @@ function bbp_forum_get_subforums( $args = '' ) {
|
|
| 635 |
* @uses bbp_get_forum_reply_count() To get forum reply count
|
| 636 |
*/
|
| 637 |
function bbp_list_forums( $args = '' ) {
|
| 638 |
-
global $bbp;
|
| 639 |
|
| 640 |
// Define used variables
|
| 641 |
$output = $sub_forums = $topic_count = $reply_count = $counts = '';
|
|
@@ -1076,7 +1075,6 @@ function bbp_forum_topics_link( $forum_id = 0 ) {
|
|
| 1076 |
* topics link and forum id
|
| 1077 |
*/
|
| 1078 |
function bbp_get_forum_topics_link( $forum_id = 0 ) {
|
| 1079 |
-
global $bbp;
|
| 1080 |
|
| 1081 |
$forum = bbp_get_forum( bbp_get_forum_id( (int) $forum_id ) );
|
| 1082 |
$forum_id = $forum->ID;
|
|
@@ -1374,10 +1372,9 @@ function bbp_is_forum_open( $forum_id = 0 ) {
|
|
| 1374 |
* @return bool True if closed, false if not
|
| 1375 |
*/
|
| 1376 |
function bbp_is_forum_closed( $forum_id = 0, $check_ancestors = true ) {
|
| 1377 |
-
global $bbp;
|
| 1378 |
|
| 1379 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1380 |
-
$retval = (
|
| 1381 |
|
| 1382 |
if ( !empty( $check_ancestors ) ) {
|
| 1383 |
$ancestors = bbp_get_forum_ancestors( $forum_id );
|
|
@@ -1407,13 +1404,12 @@ function bbp_is_forum_open( $forum_id = 0 ) {
|
|
| 1407 |
* @return bool True if closed, false if not
|
| 1408 |
*/
|
| 1409 |
function bbp_is_forum_public( $forum_id = 0, $check_ancestors = true ) {
|
| 1410 |
-
global $bbp;
|
| 1411 |
|
| 1412 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1413 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1414 |
|
| 1415 |
// If post status is public, return true
|
| 1416 |
-
$retval = (
|
| 1417 |
|
| 1418 |
// Check ancestors and inherit their privacy setting for display
|
| 1419 |
if ( !empty( $check_ancestors ) ) {
|
|
@@ -1444,13 +1440,12 @@ function bbp_is_forum_public( $forum_id = 0, $check_ancestors = true ) {
|
|
| 1444 |
* @return bool True if closed, false if not
|
| 1445 |
*/
|
| 1446 |
function bbp_is_forum_private( $forum_id = 0, $check_ancestors = true ) {
|
| 1447 |
-
global $bbp;
|
| 1448 |
|
| 1449 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1450 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1451 |
|
| 1452 |
// If post status is private, return true
|
| 1453 |
-
$retval = (
|
| 1454 |
|
| 1455 |
// Check ancestors and inherit their privacy setting for display
|
| 1456 |
if ( !empty( $check_ancestors ) ) {
|
|
@@ -1481,13 +1476,12 @@ function bbp_is_forum_private( $forum_id = 0, $check_ancestors = true ) {
|
|
| 1481 |
* @return bool True if closed, false if not
|
| 1482 |
*/
|
| 1483 |
function bbp_is_forum_hidden( $forum_id = 0, $check_ancestors = true ) {
|
| 1484 |
-
global $bbp;
|
| 1485 |
|
| 1486 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1487 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1488 |
|
| 1489 |
// If post status is private, return true
|
| 1490 |
-
$retval = (
|
| 1491 |
|
| 1492 |
// Check ancestors and inherit their privacy setting for display
|
| 1493 |
if ( !empty( $check_ancestors ) ) {
|
|
@@ -1654,7 +1648,7 @@ function bbp_single_forum_description( $args = '' ) {
|
|
| 1654 |
// Default arguments
|
| 1655 |
$defaults = array (
|
| 1656 |
'forum_id' => 0,
|
| 1657 |
-
'before' => '<div class="bbp-template-notice info"><p class="
|
| 1658 |
'after' => '</p></div>',
|
| 1659 |
'size' => 14,
|
| 1660 |
'feed' => true
|
| 61 |
global $bbp;
|
| 62 |
|
| 63 |
// Setup possible post__not_in array
|
| 64 |
+
$post_stati[] = bbp_get_public_status_id();
|
| 65 |
|
| 66 |
// Super admin get whitelisted post statuses
|
| 67 |
if ( is_super_admin() ) {
|
| 68 |
+
$post_stati = array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() );
|
| 69 |
|
| 70 |
// Not a super admin, so check caps
|
| 71 |
} else {
|
| 72 |
|
| 73 |
// Check if user can read private forums
|
| 74 |
if ( current_user_can( 'read_private_forums' ) )
|
| 75 |
+
$post_stati[] = bbp_get_private_status_id();
|
| 76 |
|
| 77 |
// Check if user can read hidden forums
|
| 78 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 79 |
+
$post_stati[] = bbp_get_hidden_status_id();
|
| 80 |
}
|
| 81 |
|
| 82 |
// The default forum query for most circumstances
|
| 579 |
$args = array( 'post_parent' => $args );
|
| 580 |
|
| 581 |
// Setup possible post__not_in array
|
| 582 |
+
$post_stati[] = bbp_get_public_status_id();
|
| 583 |
|
| 584 |
// Super admin get whitelisted post statuses
|
| 585 |
if ( is_super_admin() ) {
|
| 586 |
+
$post_stati = array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id() );
|
| 587 |
|
| 588 |
// Not a super admin, so check caps
|
| 589 |
} else {
|
| 590 |
|
| 591 |
// Check if user can read private forums
|
| 592 |
if ( current_user_can( 'read_private_forums' ) )
|
| 593 |
+
$post_stati[] = bbp_get_private_status_id();
|
| 594 |
|
| 595 |
// Check if user can read hidden forums
|
| 596 |
if ( current_user_can( 'read_hidden_forums' ) )
|
| 597 |
+
$post_stati[] = bbp_get_hidden_status_id();
|
| 598 |
}
|
| 599 |
|
| 600 |
$default = array(
|
| 635 |
* @uses bbp_get_forum_reply_count() To get forum reply count
|
| 636 |
*/
|
| 637 |
function bbp_list_forums( $args = '' ) {
|
|
|
|
| 638 |
|
| 639 |
// Define used variables
|
| 640 |
$output = $sub_forums = $topic_count = $reply_count = $counts = '';
|
| 1075 |
* topics link and forum id
|
| 1076 |
*/
|
| 1077 |
function bbp_get_forum_topics_link( $forum_id = 0 ) {
|
|
|
|
| 1078 |
|
| 1079 |
$forum = bbp_get_forum( bbp_get_forum_id( (int) $forum_id ) );
|
| 1080 |
$forum_id = $forum->ID;
|
| 1372 |
* @return bool True if closed, false if not
|
| 1373 |
*/
|
| 1374 |
function bbp_is_forum_closed( $forum_id = 0, $check_ancestors = true ) {
|
|
|
|
| 1375 |
|
| 1376 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1377 |
+
$retval = ( bbp_get_closed_status_id() == bbp_get_forum_status( $forum_id ) );
|
| 1378 |
|
| 1379 |
if ( !empty( $check_ancestors ) ) {
|
| 1380 |
$ancestors = bbp_get_forum_ancestors( $forum_id );
|
| 1404 |
* @return bool True if closed, false if not
|
| 1405 |
*/
|
| 1406 |
function bbp_is_forum_public( $forum_id = 0, $check_ancestors = true ) {
|
|
|
|
| 1407 |
|
| 1408 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1409 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1410 |
|
| 1411 |
// If post status is public, return true
|
| 1412 |
+
$retval = ( bbp_get_public_status_id() == $visibility );
|
| 1413 |
|
| 1414 |
// Check ancestors and inherit their privacy setting for display
|
| 1415 |
if ( !empty( $check_ancestors ) ) {
|
| 1440 |
* @return bool True if closed, false if not
|
| 1441 |
*/
|
| 1442 |
function bbp_is_forum_private( $forum_id = 0, $check_ancestors = true ) {
|
|
|
|
| 1443 |
|
| 1444 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1445 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1446 |
|
| 1447 |
// If post status is private, return true
|
| 1448 |
+
$retval = ( bbp_get_private_status_id() == $visibility );
|
| 1449 |
|
| 1450 |
// Check ancestors and inherit their privacy setting for display
|
| 1451 |
if ( !empty( $check_ancestors ) ) {
|
| 1476 |
* @return bool True if closed, false if not
|
| 1477 |
*/
|
| 1478 |
function bbp_is_forum_hidden( $forum_id = 0, $check_ancestors = true ) {
|
|
|
|
| 1479 |
|
| 1480 |
$forum_id = bbp_get_forum_id( $forum_id );
|
| 1481 |
$visibility = bbp_get_forum_visibility( $forum_id );
|
| 1482 |
|
| 1483 |
// If post status is private, return true
|
| 1484 |
+
$retval = ( bbp_get_hidden_status_id() == $visibility );
|
| 1485 |
|
| 1486 |
// Check ancestors and inherit their privacy setting for display
|
| 1487 |
if ( !empty( $check_ancestors ) ) {
|
| 1648 |
// Default arguments
|
| 1649 |
$defaults = array (
|
| 1650 |
'forum_id' => 0,
|
| 1651 |
+
'before' => '<div class="bbp-template-notice info"><p class="bbp-forum-description">',
|
| 1652 |
'after' => '</p></div>',
|
| 1653 |
'size' => 14,
|
| 1654 |
'feed' => true
|
bbp-includes/bbp-reply-functions.php
CHANGED
|
@@ -31,7 +31,7 @@ function bbp_insert_reply( $reply_data = array(), $reply_meta = array() ) {
|
|
| 31 |
// Forum
|
| 32 |
$default_reply = array(
|
| 33 |
'post_parent' => 0, // topic ID
|
| 34 |
-
'post_status' =>
|
| 35 |
'post_type' => bbp_get_reply_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
|
@@ -115,8 +115,6 @@ function bbp_new_reply_handler() {
|
|
| 115 |
if ( empty( $_POST['action'] ) || ( 'bbp-new-reply' !== $_POST['action'] ) )
|
| 116 |
return;
|
| 117 |
|
| 118 |
-
global $bbp;
|
| 119 |
-
|
| 120 |
// Nonce check
|
| 121 |
check_admin_referer( 'bbp-new-reply' );
|
| 122 |
|
|
@@ -231,7 +229,7 @@ function bbp_new_reply_handler() {
|
|
| 231 |
'post_title' => $reply_title,
|
| 232 |
'post_content' => $reply_content,
|
| 233 |
'post_parent' => $topic_id,
|
| 234 |
-
'post_status' =>
|
| 235 |
'post_type' => bbp_get_reply_post_type()
|
| 236 |
);
|
| 237 |
|
|
@@ -263,7 +261,7 @@ function bbp_new_reply_handler() {
|
|
| 263 |
|
| 264 |
// If this reply starts as trash, add it to pre_trashed_replies
|
| 265 |
// for the topic, so it is properly restored.
|
| 266 |
-
if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] ==
|
| 267 |
|
| 268 |
// Trash the reply
|
| 269 |
wp_trash_post( $reply_id );
|
|
@@ -281,8 +279,8 @@ function bbp_new_reply_handler() {
|
|
| 281 |
/** Spam Check ****************************************************/
|
| 282 |
|
| 283 |
// If reply or topic are spam, officially spam this reply
|
| 284 |
-
if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] ==
|
| 285 |
-
add_post_meta( $reply_id, '_bbp_spam_meta_status',
|
| 286 |
|
| 287 |
/** Update counts, etc... *****************************************/
|
| 288 |
|
|
@@ -609,16 +607,19 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
|
|
| 609 |
update_post_meta( $reply_id, '_bbp_anonymous_email', $bbp_anonymous_email, false );
|
| 610 |
|
| 611 |
// Set transient for throttle check (only on new, not edit)
|
| 612 |
-
if ( empty( $is_edit ) )
|
| 613 |
set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
|
|
|
|
| 614 |
|
| 615 |
// Website is optional
|
| 616 |
-
if ( !empty( $bbp_anonymous_website ) )
|
| 617 |
update_post_meta( $reply_id, '_bbp_anonymous_website', $bbp_anonymous_website, false );
|
|
|
|
| 618 |
|
| 619 |
} else {
|
| 620 |
-
if ( empty( $is_edit ) && !current_user_can( 'throttle' ) )
|
| 621 |
update_user_meta( $author_id, '_bbp_last_posted', time() );
|
|
|
|
| 622 |
}
|
| 623 |
|
| 624 |
// Handle Subscription Checkbox
|
|
@@ -627,12 +628,13 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
|
|
| 627 |
$subscheck = ( !empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' == $_POST['bbp_topic_subscription'] ) ) ? true : false;
|
| 628 |
|
| 629 |
// Subscribed and unsubscribing
|
| 630 |
-
if ( true == $subscribed && false == $subscheck )
|
| 631 |
bbp_remove_user_subscription( $author_id, $topic_id );
|
| 632 |
|
| 633 |
// Subscribing
|
| 634 |
-
elseif ( false == $subscribed && true == $subscheck )
|
| 635 |
bbp_add_user_subscription( $author_id, $topic_id );
|
|
|
|
| 636 |
}
|
| 637 |
|
| 638 |
// Reply meta relating to reply position in tree
|
|
@@ -727,16 +729,19 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
|
|
| 727 |
} elseif ( bbp_is_topic( $ancestor ) ) {
|
| 728 |
|
| 729 |
// Last reply and active ID's
|
| 730 |
-
bbp_update_topic_last_reply_id
|
| 731 |
-
bbp_update_topic_last_active_id
|
| 732 |
|
| 733 |
// Get the last active time if none was passed
|
| 734 |
-
|
|
|
|
| 735 |
$topic_last_active_time = get_post_field( 'post_date', bbp_get_topic_last_active_id( $ancestor ) );
|
| 736 |
-
|
| 737 |
-
$topic_last_active_time = $last_active_time;
|
| 738 |
|
| 739 |
-
|
|
|
|
|
|
|
|
|
|
| 740 |
|
| 741 |
// Counts
|
| 742 |
bbp_update_topic_voice_count ( $ancestor );
|
|
@@ -753,12 +758,16 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
|
|
| 753 |
// Last Active
|
| 754 |
bbp_update_forum_last_active_id( $ancestor, $active_id );
|
| 755 |
|
| 756 |
-
|
|
|
|
|
|
|
| 757 |
$forum_last_active_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $ancestor ) );
|
| 758 |
-
|
| 759 |
-
$forum_last_active_time = $last_active_time;
|
| 760 |
|
| 761 |
-
|
|
|
|
|
|
|
|
|
|
| 762 |
|
| 763 |
// Counts
|
| 764 |
bbp_update_forum_reply_count( $ancestor );
|
|
@@ -1066,14 +1075,13 @@ function bbp_toggle_reply_handler() {
|
|
| 1066 |
* @return mixed False or {@link WP_Error} on failure, reply id on success
|
| 1067 |
*/
|
| 1068 |
function bbp_spam_reply( $reply_id = 0 ) {
|
| 1069 |
-
global $bbp;
|
| 1070 |
|
| 1071 |
// Get reply
|
| 1072 |
if ( !$reply = wp_get_single_post( $reply_id, ARRAY_A ) )
|
| 1073 |
return $reply;
|
| 1074 |
|
| 1075 |
// Bail if already spam
|
| 1076 |
-
if ( $reply['post_status']
|
| 1077 |
return false;
|
| 1078 |
|
| 1079 |
// Execute pre spam code
|
|
@@ -1083,7 +1091,7 @@ function bbp_spam_reply( $reply_id = 0 ) {
|
|
| 1083 |
add_post_meta( $reply_id, '_bbp_spam_meta_status', $reply['post_status'] );
|
| 1084 |
|
| 1085 |
// Set post status to spam
|
| 1086 |
-
$reply['post_status'] =
|
| 1087 |
|
| 1088 |
// No revisions
|
| 1089 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
|
@@ -1113,14 +1121,13 @@ function bbp_spam_reply( $reply_id = 0 ) {
|
|
| 1113 |
* @return mixed False or {@link WP_Error} on failure, reply id on success
|
| 1114 |
*/
|
| 1115 |
function bbp_unspam_reply( $reply_id = 0 ) {
|
| 1116 |
-
global $bbp;
|
| 1117 |
|
| 1118 |
// Get reply
|
| 1119 |
if ( !$reply = wp_get_single_post( $reply_id, ARRAY_A ) )
|
| 1120 |
return $reply;
|
| 1121 |
|
| 1122 |
// Bail if already not spam
|
| 1123 |
-
if ( $reply['post_status']
|
| 1124 |
return false;
|
| 1125 |
|
| 1126 |
// Execute pre unspam code
|
| 31 |
// Forum
|
| 32 |
$default_reply = array(
|
| 33 |
'post_parent' => 0, // topic ID
|
| 34 |
+
'post_status' => bbp_get_public_status_id(),
|
| 35 |
'post_type' => bbp_get_reply_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
| 115 |
if ( empty( $_POST['action'] ) || ( 'bbp-new-reply' !== $_POST['action'] ) )
|
| 116 |
return;
|
| 117 |
|
|
|
|
|
|
|
| 118 |
// Nonce check
|
| 119 |
check_admin_referer( 'bbp-new-reply' );
|
| 120 |
|
| 229 |
'post_title' => $reply_title,
|
| 230 |
'post_content' => $reply_content,
|
| 231 |
'post_parent' => $topic_id,
|
| 232 |
+
'post_status' => bbp_get_public_status_id(),
|
| 233 |
'post_type' => bbp_get_reply_post_type()
|
| 234 |
);
|
| 235 |
|
| 261 |
|
| 262 |
// If this reply starts as trash, add it to pre_trashed_replies
|
| 263 |
// for the topic, so it is properly restored.
|
| 264 |
+
if ( bbp_is_topic_trash( $topic_id ) || ( $reply_data['post_status'] == bbp_get_trash_status_id() ) ) {
|
| 265 |
|
| 266 |
// Trash the reply
|
| 267 |
wp_trash_post( $reply_id );
|
| 279 |
/** Spam Check ****************************************************/
|
| 280 |
|
| 281 |
// If reply or topic are spam, officially spam this reply
|
| 282 |
+
if ( bbp_is_topic_spam( $topic_id ) || ( $reply_data['post_status'] == bbp_get_spam_status_id() ) )
|
| 283 |
+
add_post_meta( $reply_id, '_bbp_spam_meta_status', bbp_get_public_status_id() );
|
| 284 |
|
| 285 |
/** Update counts, etc... *****************************************/
|
| 286 |
|
| 607 |
update_post_meta( $reply_id, '_bbp_anonymous_email', $bbp_anonymous_email, false );
|
| 608 |
|
| 609 |
// Set transient for throttle check (only on new, not edit)
|
| 610 |
+
if ( empty( $is_edit ) ) {
|
| 611 |
set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
|
| 612 |
+
}
|
| 613 |
|
| 614 |
// Website is optional
|
| 615 |
+
if ( !empty( $bbp_anonymous_website ) ) {
|
| 616 |
update_post_meta( $reply_id, '_bbp_anonymous_website', $bbp_anonymous_website, false );
|
| 617 |
+
}
|
| 618 |
|
| 619 |
} else {
|
| 620 |
+
if ( empty( $is_edit ) && !current_user_can( 'throttle' ) ) {
|
| 621 |
update_user_meta( $author_id, '_bbp_last_posted', time() );
|
| 622 |
+
}
|
| 623 |
}
|
| 624 |
|
| 625 |
// Handle Subscription Checkbox
|
| 628 |
$subscheck = ( !empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' == $_POST['bbp_topic_subscription'] ) ) ? true : false;
|
| 629 |
|
| 630 |
// Subscribed and unsubscribing
|
| 631 |
+
if ( true == $subscribed && false == $subscheck ) {
|
| 632 |
bbp_remove_user_subscription( $author_id, $topic_id );
|
| 633 |
|
| 634 |
// Subscribing
|
| 635 |
+
} elseif ( false == $subscribed && true == $subscheck ) {
|
| 636 |
bbp_add_user_subscription( $author_id, $topic_id );
|
| 637 |
+
}
|
| 638 |
}
|
| 639 |
|
| 640 |
// Reply meta relating to reply position in tree
|
| 729 |
} elseif ( bbp_is_topic( $ancestor ) ) {
|
| 730 |
|
| 731 |
// Last reply and active ID's
|
| 732 |
+
bbp_update_topic_last_reply_id ( $ancestor, $reply_id );
|
| 733 |
+
bbp_update_topic_last_active_id( $ancestor, $active_id );
|
| 734 |
|
| 735 |
// Get the last active time if none was passed
|
| 736 |
+
$topic_last_active_time = $last_active_time;
|
| 737 |
+
if ( empty( $last_active_time ) ) {
|
| 738 |
$topic_last_active_time = get_post_field( 'post_date', bbp_get_topic_last_active_id( $ancestor ) );
|
| 739 |
+
}
|
|
|
|
| 740 |
|
| 741 |
+
// Only update if reply is published
|
| 742 |
+
if ( bbp_is_reply_published( $reply_id ) ) {
|
| 743 |
+
bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time );
|
| 744 |
+
}
|
| 745 |
|
| 746 |
// Counts
|
| 747 |
bbp_update_topic_voice_count ( $ancestor );
|
| 758 |
// Last Active
|
| 759 |
bbp_update_forum_last_active_id( $ancestor, $active_id );
|
| 760 |
|
| 761 |
+
// Get the last active time if none was passed
|
| 762 |
+
$forum_last_active_time = $last_active_time;
|
| 763 |
+
if ( empty( $last_active_time ) ) {
|
| 764 |
$forum_last_active_time = get_post_field( 'post_date', bbp_get_forum_last_active_id( $ancestor ) );
|
| 765 |
+
}
|
|
|
|
| 766 |
|
| 767 |
+
// Only update if reply is published
|
| 768 |
+
if ( bbp_is_reply_published( $reply_id ) ) {
|
| 769 |
+
bbp_update_forum_last_active_time( $ancestor, $forum_last_active_time );
|
| 770 |
+
}
|
| 771 |
|
| 772 |
// Counts
|
| 773 |
bbp_update_forum_reply_count( $ancestor );
|
| 1075 |
* @return mixed False or {@link WP_Error} on failure, reply id on success
|
| 1076 |
*/
|
| 1077 |
function bbp_spam_reply( $reply_id = 0 ) {
|
|
|
|
| 1078 |
|
| 1079 |
// Get reply
|
| 1080 |
if ( !$reply = wp_get_single_post( $reply_id, ARRAY_A ) )
|
| 1081 |
return $reply;
|
| 1082 |
|
| 1083 |
// Bail if already spam
|
| 1084 |
+
if ( bbp_get_spam_status_id() == $reply['post_status'] )
|
| 1085 |
return false;
|
| 1086 |
|
| 1087 |
// Execute pre spam code
|
| 1091 |
add_post_meta( $reply_id, '_bbp_spam_meta_status', $reply['post_status'] );
|
| 1092 |
|
| 1093 |
// Set post status to spam
|
| 1094 |
+
$reply['post_status'] = bbp_get_spam_status_id();
|
| 1095 |
|
| 1096 |
// No revisions
|
| 1097 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
| 1121 |
* @return mixed False or {@link WP_Error} on failure, reply id on success
|
| 1122 |
*/
|
| 1123 |
function bbp_unspam_reply( $reply_id = 0 ) {
|
|
|
|
| 1124 |
|
| 1125 |
// Get reply
|
| 1126 |
if ( !$reply = wp_get_single_post( $reply_id, ARRAY_A ) )
|
| 1127 |
return $reply;
|
| 1128 |
|
| 1129 |
// Bail if already not spam
|
| 1130 |
+
if ( bbp_get_spam_status_id() != $reply['post_status'] )
|
| 1131 |
return false;
|
| 1132 |
|
| 1133 |
// Execute pre unspam code
|
bbp-includes/bbp-reply-template.php
CHANGED
|
@@ -69,7 +69,7 @@ function bbp_has_replies( $args = '' ) {
|
|
| 69 |
global $wp_rewrite, $bbp;
|
| 70 |
|
| 71 |
// Default status
|
| 72 |
-
$default_status = join( ',', array(
|
| 73 |
|
| 74 |
// Skip topic_id if in the replies widget query
|
| 75 |
if ( !bbp_is_query_name( 'bbp_widget' ) ) {
|
|
@@ -83,7 +83,7 @@ function bbp_has_replies( $args = '' ) {
|
|
| 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(
|
| 87 |
}
|
| 88 |
}
|
| 89 |
|
|
@@ -368,7 +368,7 @@ function bbp_reply_url( $reply_id = 0 ) {
|
|
| 368 |
* @return string Link to reply relative to paginated topic
|
| 369 |
*/
|
| 370 |
function bbp_get_reply_url( $reply_id = 0, $redirect_to = '' ) {
|
| 371 |
-
global $
|
| 372 |
|
| 373 |
// Set needed variables
|
| 374 |
$reply_id = bbp_get_reply_id ( $reply_id );
|
|
@@ -691,10 +691,24 @@ function bbp_reply_status( $reply_id = 0 ) {
|
|
| 691 |
*/
|
| 692 |
function bbp_get_reply_status( $reply_id = 0 ) {
|
| 693 |
$reply_id = bbp_get_reply_id( $reply_id );
|
| 694 |
-
|
| 695 |
return apply_filters( 'bbp_get_reply_status', get_post_status( $reply_id ), $reply_id );
|
| 696 |
}
|
| 697 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 698 |
/**
|
| 699 |
* Is the reply marked as spam?
|
| 700 |
*
|
|
@@ -706,11 +720,8 @@ function bbp_reply_status( $reply_id = 0 ) {
|
|
| 706 |
* @return bool True if spam, false if not.
|
| 707 |
*/
|
| 708 |
function bbp_is_reply_spam( $reply_id = 0 ) {
|
| 709 |
-
global $bbp;
|
| 710 |
-
|
| 711 |
$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
|
| 712 |
-
|
| 713 |
-
return apply_filters( 'bbp_is_reply_spam', $bbp->spam_status_id == $reply_status, $reply_id );
|
| 714 |
}
|
| 715 |
|
| 716 |
/**
|
|
@@ -724,11 +735,8 @@ function bbp_is_reply_spam( $reply_id = 0 ) {
|
|
| 724 |
* @return bool True if spam, false if not.
|
| 725 |
*/
|
| 726 |
function bbp_is_reply_trash( $reply_id = 0 ) {
|
| 727 |
-
global $bbp;
|
| 728 |
-
|
| 729 |
$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
|
| 730 |
-
|
| 731 |
-
return apply_filters( 'bbp_is_reply_trash', $bbp->trash_status_id == $reply_status, $reply_id );
|
| 732 |
}
|
| 733 |
|
| 734 |
/**
|
|
@@ -942,7 +950,8 @@ function bbp_reply_author_link( $args = '' ) {
|
|
| 942 |
'post_id' => 0,
|
| 943 |
'link_title' => '',
|
| 944 |
'type' => 'both',
|
| 945 |
-
'size' => 80
|
|
|
|
| 946 |
);
|
| 947 |
|
| 948 |
$r = wp_parse_args( $args, $defaults );
|
|
@@ -964,22 +973,23 @@ function bbp_reply_author_link( $args = '' ) {
|
|
| 964 |
|
| 965 |
// Get avatar
|
| 966 |
if ( 'avatar' == $type || 'both' == $type )
|
| 967 |
-
$author_links[] = bbp_get_reply_author_avatar( $reply_id, $size );
|
| 968 |
|
| 969 |
// Get display name
|
| 970 |
if ( 'name' == $type || 'both' == $type )
|
| 971 |
-
$author_links[] = bbp_get_reply_author_display_name( $reply_id );
|
| 972 |
|
| 973 |
// Add links if not anonymous
|
| 974 |
if ( empty( $anonymous ) ) {
|
| 975 |
-
foreach ( $author_links as $link_text ) {
|
| 976 |
-
$
|
|
|
|
| 977 |
}
|
| 978 |
-
$author_link = join(
|
| 979 |
|
| 980 |
// No links if anonymous
|
| 981 |
} else {
|
| 982 |
-
$author_link = join(
|
| 983 |
}
|
| 984 |
|
| 985 |
// No replies so link is empty
|
|
@@ -1317,7 +1327,6 @@ function bbp_reply_admin_links( $args = '' ) {
|
|
| 1317 |
* @return string Reply admin links
|
| 1318 |
*/
|
| 1319 |
function bbp_get_reply_admin_links( $args = '' ) {
|
| 1320 |
-
global $bbp;
|
| 1321 |
|
| 1322 |
$defaults = array (
|
| 1323 |
'id' => 0,
|
|
@@ -1363,14 +1372,14 @@ function bbp_reply_admin_links( $args = '' ) {
|
|
| 1363 |
|
| 1364 |
// See if links need to be unset
|
| 1365 |
$reply_status = bbp_get_reply_status( $r['id'] );
|
| 1366 |
-
if ( in_array( $reply_status, array(
|
| 1367 |
|
| 1368 |
// Spam link shouldn't be visible on trashed topics
|
| 1369 |
-
if ( $reply_status ==
|
| 1370 |
unset( $r['links']['spam'] );
|
| 1371 |
|
| 1372 |
// Trash link shouldn't be visible on spam topics
|
| 1373 |
-
elseif ( isset( $r['links']['trash'] ) &&
|
| 1374 |
unset( $r['links']['trash'] );
|
| 1375 |
}
|
| 1376 |
|
| 69 |
global $wp_rewrite, $bbp;
|
| 70 |
|
| 71 |
// Default status
|
| 72 |
+
$default_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) );
|
| 73 |
|
| 74 |
// Skip topic_id if in the replies widget query
|
| 75 |
if ( !bbp_is_query_name( 'bbp_widget' ) ) {
|
| 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( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );
|
| 87 |
}
|
| 88 |
}
|
| 89 |
|
| 368 |
* @return string Link to reply relative to paginated topic
|
| 369 |
*/
|
| 370 |
function bbp_get_reply_url( $reply_id = 0, $redirect_to = '' ) {
|
| 371 |
+
global $wp_rewrite;
|
| 372 |
|
| 373 |
// Set needed variables
|
| 374 |
$reply_id = bbp_get_reply_id ( $reply_id );
|
| 691 |
*/
|
| 692 |
function bbp_get_reply_status( $reply_id = 0 ) {
|
| 693 |
$reply_id = bbp_get_reply_id( $reply_id );
|
|
|
|
| 694 |
return apply_filters( 'bbp_get_reply_status', get_post_status( $reply_id ), $reply_id );
|
| 695 |
}
|
| 696 |
|
| 697 |
+
/**
|
| 698 |
+
* Is the reply not spam or deleted?
|
| 699 |
+
*
|
| 700 |
+
* @since bbPress (r3496)
|
| 701 |
+
*
|
| 702 |
+
* @param int $reply_id Optional. Topic id
|
| 703 |
+
* @uses bbp_get_reply_id() To get the reply id
|
| 704 |
+
* @uses bbp_get_reply_status() To get the reply status
|
| 705 |
+
* @return bool True if published, false if not.
|
| 706 |
+
*/
|
| 707 |
+
function bbp_is_reply_published( $reply_id = 0 ) {
|
| 708 |
+
$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
|
| 709 |
+
return apply_filters( 'bbp_is_reply_published', bbp_get_public_status_id() == $reply_status, $reply_id );
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
/**
|
| 713 |
* Is the reply marked as spam?
|
| 714 |
*
|
| 720 |
* @return bool True if spam, false if not.
|
| 721 |
*/
|
| 722 |
function bbp_is_reply_spam( $reply_id = 0 ) {
|
|
|
|
|
|
|
| 723 |
$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
|
| 724 |
+
return apply_filters( 'bbp_is_reply_spam', bbp_get_spam_status_id() == $reply_status, $reply_id );
|
|
|
|
| 725 |
}
|
| 726 |
|
| 727 |
/**
|
| 735 |
* @return bool True if spam, false if not.
|
| 736 |
*/
|
| 737 |
function bbp_is_reply_trash( $reply_id = 0 ) {
|
|
|
|
|
|
|
| 738 |
$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
|
| 739 |
+
return apply_filters( 'bbp_is_reply_trash', bbp_get_trash_status_id() == $reply_status, $reply_id );
|
|
|
|
| 740 |
}
|
| 741 |
|
| 742 |
/**
|
| 950 |
'post_id' => 0,
|
| 951 |
'link_title' => '',
|
| 952 |
'type' => 'both',
|
| 953 |
+
'size' => 80,
|
| 954 |
+
'sep' => ' '
|
| 955 |
);
|
| 956 |
|
| 957 |
$r = wp_parse_args( $args, $defaults );
|
| 973 |
|
| 974 |
// Get avatar
|
| 975 |
if ( 'avatar' == $type || 'both' == $type )
|
| 976 |
+
$author_links['avatar'] = bbp_get_reply_author_avatar( $reply_id, $size );
|
| 977 |
|
| 978 |
// Get display name
|
| 979 |
if ( 'name' == $type || 'both' == $type )
|
| 980 |
+
$author_links['name'] = bbp_get_reply_author_display_name( $reply_id );
|
| 981 |
|
| 982 |
// Add links if not anonymous
|
| 983 |
if ( empty( $anonymous ) ) {
|
| 984 |
+
foreach ( $author_links as $link => $link_text ) {
|
| 985 |
+
$link_class = ' class="bbp-author-' . $link . '"';
|
| 986 |
+
$author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
|
| 987 |
}
|
| 988 |
+
$author_link = join( $sep, $author_link );
|
| 989 |
|
| 990 |
// No links if anonymous
|
| 991 |
} else {
|
| 992 |
+
$author_link = join( $sep, $author_links );
|
| 993 |
}
|
| 994 |
|
| 995 |
// No replies so link is empty
|
| 1327 |
* @return string Reply admin links
|
| 1328 |
*/
|
| 1329 |
function bbp_get_reply_admin_links( $args = '' ) {
|
|
|
|
| 1330 |
|
| 1331 |
$defaults = array (
|
| 1332 |
'id' => 0,
|
| 1372 |
|
| 1373 |
// See if links need to be unset
|
| 1374 |
$reply_status = bbp_get_reply_status( $r['id'] );
|
| 1375 |
+
if ( in_array( $reply_status, array( bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ) ) {
|
| 1376 |
|
| 1377 |
// Spam link shouldn't be visible on trashed topics
|
| 1378 |
+
if ( $reply_status == bbp_get_trash_status_id() )
|
| 1379 |
unset( $r['links']['spam'] );
|
| 1380 |
|
| 1381 |
// Trash link shouldn't be visible on spam topics
|
| 1382 |
+
elseif ( isset( $r['links']['trash'] ) && ( bbp_get_spam_status_id() == $reply_status ) )
|
| 1383 |
unset( $r['links']['trash'] );
|
| 1384 |
}
|
| 1385 |
|
bbp-includes/bbp-topic-functions.php
CHANGED
|
@@ -31,7 +31,7 @@ function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
|
|
| 31 |
// Forum
|
| 32 |
$default_topic = array(
|
| 33 |
'post_parent' => 0, // forum ID
|
| 34 |
-
'post_status' =>
|
| 35 |
'post_type' => bbp_get_topic_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
|
@@ -73,7 +73,7 @@ function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
|
|
| 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;
|
|
@@ -123,8 +123,6 @@ function bbp_new_topic_handler() {
|
|
| 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 |
|
|
@@ -267,7 +265,7 @@ function bbp_new_topic_handler() {
|
|
| 267 |
'post_content' => $topic_content,
|
| 268 |
'post_parent' => $forum_id,
|
| 269 |
'tax_input' => $terms,
|
| 270 |
-
'post_status' =>
|
| 271 |
'post_type' => bbp_get_topic_post_type()
|
| 272 |
);
|
| 273 |
|
|
@@ -309,7 +307,7 @@ function bbp_new_topic_handler() {
|
|
| 309 |
|
| 310 |
// If the forum is trash, or the topic_status is switched to
|
| 311 |
// trash, trash it properly
|
| 312 |
-
if ( ( get_post_field( 'post_status', $forum_id ) ==
|
| 313 |
|
| 314 |
// Trash the reply
|
| 315 |
wp_trash_post( $topic_id );
|
|
@@ -321,8 +319,8 @@ function bbp_new_topic_handler() {
|
|
| 321 |
/** Spam Check ****************************************************/
|
| 322 |
|
| 323 |
// If reply or topic are spam, officially spam this reply
|
| 324 |
-
if ( $topic_data['post_status'] ==
|
| 325 |
-
add_post_meta( $topic_id, '_bbp_spam_meta_status',
|
| 326 |
|
| 327 |
// Force view=all
|
| 328 |
$view_all = true;
|
|
@@ -338,19 +336,28 @@ function bbp_new_topic_handler() {
|
|
| 338 |
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
| 339 |
|
| 340 |
// Get the topic URL
|
| 341 |
-
$
|
| 342 |
|
| 343 |
// Add view all?
|
| 344 |
-
if ( bbp_get_view_all() ||
|
| 345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
|
| 347 |
// Allow to be filtered
|
| 348 |
-
$
|
| 349 |
|
| 350 |
/** Successful Save ***********************************************/
|
| 351 |
|
| 352 |
// Redirect back to new topic
|
| 353 |
-
wp_safe_redirect( $
|
| 354 |
|
| 355 |
// For good measure
|
| 356 |
exit();
|
|
@@ -708,15 +715,18 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = false
|
|
| 708 |
update_post_meta( $topic_id, '_bbp_anonymous_email', $bbp_anonymous_email, false );
|
| 709 |
|
| 710 |
// Set transient for throttle check (only on new, not edit)
|
| 711 |
-
if ( empty( $is_edit ) )
|
| 712 |
set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
|
|
|
|
| 713 |
|
| 714 |
// Website is optional
|
| 715 |
-
if ( !empty( $bbp_anonymous_website ) )
|
| 716 |
update_post_meta( $topic_id, '_bbp_anonymous_website', $bbp_anonymous_website, false );
|
|
|
|
| 717 |
} else {
|
| 718 |
-
if ( empty( $is_edit ) && !current_user_can( 'throttle' ) )
|
| 719 |
update_user_meta( $author_id, '_bbp_last_posted', time() );
|
|
|
|
| 720 |
}
|
| 721 |
|
| 722 |
// Handle Subscription Checkbox
|
|
@@ -725,12 +735,13 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = false
|
|
| 725 |
$subscheck = ( !empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' == $_POST['bbp_topic_subscription'] ) ) ? true : false;
|
| 726 |
|
| 727 |
// Subscribed and unsubscribing
|
| 728 |
-
if ( true == $subscribed && false == $subscheck )
|
| 729 |
bbp_remove_user_subscription( $author_id, $topic_id );
|
| 730 |
|
| 731 |
// Subscribing
|
| 732 |
-
elseif ( false == $subscribed && true == $subscheck )
|
| 733 |
bbp_add_user_subscription( $author_id, $topic_id );
|
|
|
|
| 734 |
}
|
| 735 |
|
| 736 |
// Forum topic meta
|
|
@@ -797,9 +808,14 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
|
|
| 797 |
// Get topic ancestors
|
| 798 |
$ancestors = array_values( array_unique( array_merge( array( $forum_id ), get_post_ancestors( $topic_id ) ) ) );
|
| 799 |
|
|
|
|
|
|
|
|
|
|
| 800 |
// If we want a full refresh, unset any of the possibly passed variables
|
| 801 |
-
if ( true == $refresh )
|
| 802 |
$forum_id = $topic_id = $reply_id = $active_id = $last_active_time = 0;
|
|
|
|
|
|
|
| 803 |
|
| 804 |
// Loop through ancestors
|
| 805 |
foreach ( $ancestors as $ancestor ) {
|
|
@@ -809,11 +825,12 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
|
|
| 809 |
|
| 810 |
// Update the forum
|
| 811 |
bbp_update_forum( array(
|
| 812 |
-
'forum_id'
|
| 813 |
-
'last_topic_id'
|
| 814 |
-
'last_reply_id'
|
| 815 |
-
'last_active_id'
|
| 816 |
-
'last_active_time'
|
|
|
|
| 817 |
) );
|
| 818 |
}
|
| 819 |
}
|
|
@@ -828,8 +845,12 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
|
|
| 828 |
* @param int $new_forum_id New forum id
|
| 829 |
* @uses bbp_get_topic_id() To get the topic id
|
| 830 |
* @uses bbp_get_forum_id() To get the forum id
|
|
|
|
|
|
|
|
|
|
|
|
|
| 831 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
| 832 |
-
* @uses
|
| 833 |
* @uses bbp_update_reply_forum_id() To update the reply forum id
|
| 834 |
* @uses bbp_update_topic_forum_id() To update the topic forum id
|
| 835 |
* @uses get_post_ancestors() To get the topic's ancestors
|
|
@@ -837,10 +858,49 @@ function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id =
|
|
| 837 |
* @uses bbp_update_forum() To update the forum
|
| 838 |
*/
|
| 839 |
function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
|
|
|
|
|
|
|
| 840 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 841 |
$old_forum_id = bbp_get_forum_id( $old_forum_id );
|
| 842 |
$new_forum_id = bbp_get_forum_id( $new_forum_id );
|
| 843 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 844 |
|
| 845 |
// Update the forum_id of all replies in the topic
|
| 846 |
foreach ( $replies as $reply_id )
|
|
@@ -1106,6 +1166,11 @@ function bbp_merge_topic_handler() {
|
|
| 1106 |
|
| 1107 |
/** Successful Merge **************************************************/
|
| 1108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1109 |
// Send the post parent of the source topic as it has been shifted
|
| 1110 |
// (possibly to a new forum) so we need to update the counts of the
|
| 1111 |
// old forum as well as the new one
|
|
@@ -1211,7 +1276,7 @@ function bbp_split_topic_handler() {
|
|
| 1211 |
if ( empty( $_POST['action'] ) || ( 'bbp-split-topic' !== $_POST['action'] ) )
|
| 1212 |
return;
|
| 1213 |
|
| 1214 |
-
global $wpdb
|
| 1215 |
|
| 1216 |
// Prevent debug notices
|
| 1217 |
$from_reply_id = $destination_topic_id = 0;
|
|
@@ -2054,7 +2119,7 @@ function bbp_update_topic_reply_count( $topic_id = 0, $reply_count = 0 ) {
|
|
| 2054 |
* @return int Topic hidden reply count
|
| 2055 |
*/
|
| 2056 |
function bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = 0 ) {
|
| 2057 |
-
global $wpdb
|
| 2058 |
|
| 2059 |
// If it's a reply, then get the parent (topic id)
|
| 2060 |
if ( bbp_is_reply( $topic_id ) )
|
|
@@ -2064,7 +2129,7 @@ function bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = 0 )
|
|
| 2064 |
|
| 2065 |
// Get replies of topic
|
| 2066 |
if ( empty( $reply_count ) )
|
| 2067 |
-
$reply_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array(
|
| 2068 |
|
| 2069 |
update_post_meta( $topic_id, '_bbp_reply_count_hidden', (int) $reply_count );
|
| 2070 |
|
|
@@ -2104,7 +2169,9 @@ function bbp_update_topic_last_active_id( $topic_id = 0, $active_id = 0 ) {
|
|
| 2104 |
if ( empty( $active_id ) || !bbp_is_reply( $active_id ) )
|
| 2105 |
$active_id = $topic_id;
|
| 2106 |
|
| 2107 |
-
|
|
|
|
|
|
|
| 2108 |
|
| 2109 |
return apply_filters( 'bbp_update_topic_last_active_id', (int) $active_id, $topic_id );
|
| 2110 |
}
|
|
@@ -2134,7 +2201,9 @@ function bbp_update_topic_last_active_time( $topic_id = 0, $new_time = '' ) {
|
|
| 2134 |
if ( empty( $new_time ) )
|
| 2135 |
$new_time = get_post_field( 'post_date', bbp_get_public_child_last_id( $topic_id, bbp_get_reply_post_type() ) );
|
| 2136 |
|
| 2137 |
-
|
|
|
|
|
|
|
| 2138 |
|
| 2139 |
return apply_filters( 'bbp_update_topic_last_active_time', $new_time, $topic_id );
|
| 2140 |
}
|
|
@@ -2175,7 +2244,9 @@ function bbp_update_topic_last_reply_id( $topic_id = 0, $reply_id = 0 ) {
|
|
| 2175 |
if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) )
|
| 2176 |
$reply_id = 0;
|
| 2177 |
|
| 2178 |
-
|
|
|
|
|
|
|
| 2179 |
|
| 2180 |
return apply_filters( 'bbp_update_topic_last_reply_id', (int) $reply_id, $topic_id );
|
| 2181 |
}
|
|
@@ -2211,7 +2282,7 @@ function bbp_update_topic_voice_count( $topic_id = 0 ) {
|
|
| 2211 |
return;
|
| 2212 |
|
| 2213 |
// Query the DB to get voices in this topic
|
| 2214 |
-
$voices = $wpdb->get_col( $wpdb->prepare( "SELECT COUNT( DISTINCT post_author ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '
|
| 2215 |
|
| 2216 |
// If there's an error, make sure we at least have 1 voice
|
| 2217 |
$voices = ( empty( $voices ) || is_wp_error( $voices ) ) ? 1 : $voices[0];
|
|
@@ -2252,7 +2323,7 @@ function bbp_update_topic_anonymous_reply_count( $topic_id = 0 ) {
|
|
| 2252 |
else
|
| 2253 |
return;
|
| 2254 |
|
| 2255 |
-
$anonymous_replies = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( ID ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '
|
| 2256 |
|
| 2257 |
update_post_meta( $topic_id, '_bbp_anonymous_reply_count', (int) $anonymous_replies );
|
| 2258 |
|
|
@@ -2317,14 +2388,13 @@ function bbp_update_topic_revision_log( $args = '' ) {
|
|
| 2317 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2318 |
*/
|
| 2319 |
function bbp_close_topic( $topic_id = 0 ) {
|
| 2320 |
-
global $bbp;
|
| 2321 |
|
| 2322 |
// Get topic
|
| 2323 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2324 |
return $topic;
|
| 2325 |
|
| 2326 |
// Bail if already closed
|
| 2327 |
-
if ( $topic['post_status']
|
| 2328 |
return false;
|
| 2329 |
|
| 2330 |
// Execute pre close code
|
|
@@ -2334,7 +2404,7 @@ function bbp_close_topic( $topic_id = 0 ) {
|
|
| 2334 |
add_post_meta( $topic_id, '_bbp_status', $topic['post_status'] );
|
| 2335 |
|
| 2336 |
// Set closed status
|
| 2337 |
-
$topic['post_status'] =
|
| 2338 |
|
| 2339 |
// No revisions
|
| 2340 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
|
@@ -2364,14 +2434,13 @@ function bbp_close_topic( $topic_id = 0 ) {
|
|
| 2364 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2365 |
*/
|
| 2366 |
function bbp_open_topic( $topic_id = 0 ) {
|
| 2367 |
-
global $bbp;
|
| 2368 |
|
| 2369 |
// Get topic
|
| 2370 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2371 |
return $topic;
|
| 2372 |
|
| 2373 |
// Bail if already open
|
| 2374 |
-
if ( $topic['post_status']
|
| 2375 |
return false;
|
| 2376 |
|
| 2377 |
// Execute pre open code
|
|
@@ -2413,14 +2482,13 @@ function bbp_open_topic( $topic_id = 0 ) {
|
|
| 2413 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2414 |
*/
|
| 2415 |
function bbp_spam_topic( $topic_id = 0 ) {
|
| 2416 |
-
global $bbp;
|
| 2417 |
|
| 2418 |
// Get the topic
|
| 2419 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2420 |
return $topic;
|
| 2421 |
|
| 2422 |
// Bail if topic is spam
|
| 2423 |
-
if ( $topic['post_status']
|
| 2424 |
return false;
|
| 2425 |
|
| 2426 |
// Execute pre spam code
|
|
@@ -2452,7 +2520,7 @@ function bbp_spam_topic( $topic_id = 0 ) {
|
|
| 2452 |
}
|
| 2453 |
|
| 2454 |
// Set post status to spam
|
| 2455 |
-
$topic['post_status'] =
|
| 2456 |
|
| 2457 |
// No revisions
|
| 2458 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
|
@@ -2482,14 +2550,13 @@ function bbp_spam_topic( $topic_id = 0 ) {
|
|
| 2482 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2483 |
*/
|
| 2484 |
function bbp_unspam_topic( $topic_id = 0 ) {
|
| 2485 |
-
global $bbp;
|
| 2486 |
|
| 2487 |
// Get the topic
|
| 2488 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2489 |
return $topic;
|
| 2490 |
|
| 2491 |
// Bail if already not spam
|
| 2492 |
-
if ( $topic['post_status']
|
| 2493 |
return false;
|
| 2494 |
|
| 2495 |
// Execute pre unspam code
|
|
@@ -2623,7 +2690,11 @@ function bbp_unstick_topic( $topic_id = 0 ) {
|
|
| 2623 |
/** Before Delete/Trash/Untrash ***********************************************/
|
| 2624 |
|
| 2625 |
/**
|
| 2626 |
-
* Called before deleting a topic
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2627 |
*
|
| 2628 |
* @uses bbp_get_topic_id() To get the topic id
|
| 2629 |
* @uses bbp_is_topic() To check if the passed id is a topic
|
|
@@ -2635,6 +2706,8 @@ function bbp_unstick_topic( $topic_id = 0 ) {
|
|
| 2635 |
* @uses wp_delete_post() To delete the reply
|
| 2636 |
*/
|
| 2637 |
function bbp_delete_topic( $topic_id = 0 ) {
|
|
|
|
|
|
|
| 2638 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 2639 |
|
| 2640 |
if ( empty( $topic_id ) || !bbp_is_topic( $topic_id ) )
|
|
@@ -2642,8 +2715,20 @@ function bbp_delete_topic( $topic_id = 0 ) {
|
|
| 2642 |
|
| 2643 |
do_action( 'bbp_delete_topic', $topic_id );
|
| 2644 |
|
|
|
|
|
|
|
|
|
|
| 2645 |
// Topic is being permanently deleted, so its replies gotta go too
|
| 2646 |
-
if ( bbp_has_replies( array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2647 |
while ( bbp_replies() ) {
|
| 2648 |
bbp_the_reply();
|
| 2649 |
wp_delete_post( bbp_get_reply_id(), true );
|
|
@@ -2654,6 +2739,10 @@ function bbp_delete_topic( $topic_id = 0 ) {
|
|
| 2654 |
/**
|
| 2655 |
* Called before trashing a topic
|
| 2656 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2657 |
* @uses bbp_get_topic_id() To get the topic id
|
| 2658 |
* @uses bbp_is_topic() To check if the passed id is a topic
|
| 2659 |
* @uses do_action() Calls 'bbp_trash_topic' with the topic id
|
|
@@ -2665,6 +2754,8 @@ function bbp_delete_topic( $topic_id = 0 ) {
|
|
| 2665 |
* @uses update_post_meta() To save a list of just trashed replies for future use
|
| 2666 |
*/
|
| 2667 |
function bbp_trash_topic( $topic_id = 0 ) {
|
|
|
|
|
|
|
| 2668 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 2669 |
|
| 2670 |
if ( empty( $topic_id ) || !bbp_is_topic( $topic_id ) )
|
|
@@ -2673,8 +2764,16 @@ function bbp_trash_topic( $topic_id = 0 ) {
|
|
| 2673 |
do_action( 'bbp_trash_topic', $topic_id );
|
| 2674 |
|
| 2675 |
// Topic is being trashed, so its replies are trashed too
|
| 2676 |
-
if ( bbp_has_replies( array(
|
| 2677 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2678 |
|
| 2679 |
// Prevent debug notices
|
| 2680 |
$pre_trashed_replies = array();
|
| 31 |
// Forum
|
| 32 |
$default_topic = array(
|
| 33 |
'post_parent' => 0, // forum ID
|
| 34 |
+
'post_status' => bbp_get_public_status_id(),
|
| 35 |
'post_type' => bbp_get_topic_post_type(),
|
| 36 |
'post_author' => 0,
|
| 37 |
'post_password' => '',
|
| 73 |
// Update the forum
|
| 74 |
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
| 75 |
if ( !empty( $forum_id ) )
|
| 76 |
+
bbp_update_forum( array( 'forum_id' => $forum_id ) );
|
| 77 |
|
| 78 |
// Return new topic ID
|
| 79 |
return $topic_id;
|
| 123 |
if ( empty( $_POST['action'] ) || ( 'bbp-new-topic' !== $_POST['action'] ) )
|
| 124 |
return;
|
| 125 |
|
|
|
|
|
|
|
| 126 |
// Nonce check
|
| 127 |
check_admin_referer( 'bbp-new-topic' );
|
| 128 |
|
| 265 |
'post_content' => $topic_content,
|
| 266 |
'post_parent' => $forum_id,
|
| 267 |
'tax_input' => $terms,
|
| 268 |
+
'post_status' => bbp_get_public_status_id(),
|
| 269 |
'post_type' => bbp_get_topic_post_type()
|
| 270 |
);
|
| 271 |
|
| 307 |
|
| 308 |
// If the forum is trash, or the topic_status is switched to
|
| 309 |
// trash, trash it properly
|
| 310 |
+
if ( ( get_post_field( 'post_status', $forum_id ) == bbp_get_trash_status_id() ) || ( $topic_data['post_status'] == bbp_get_trash_status_id() ) ) {
|
| 311 |
|
| 312 |
// Trash the reply
|
| 313 |
wp_trash_post( $topic_id );
|
| 319 |
/** Spam Check ****************************************************/
|
| 320 |
|
| 321 |
// If reply or topic are spam, officially spam this reply
|
| 322 |
+
if ( $topic_data['post_status'] == bbp_get_spam_status_id() ) {
|
| 323 |
+
add_post_meta( $topic_id, '_bbp_spam_meta_status', bbp_get_public_status_id() );
|
| 324 |
|
| 325 |
// Force view=all
|
| 326 |
$view_all = true;
|
| 336 |
$redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
| 337 |
|
| 338 |
// Get the topic URL
|
| 339 |
+
$redirect_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
|
| 340 |
|
| 341 |
// Add view all?
|
| 342 |
+
if ( bbp_get_view_all() || !empty( $view_all ) ) {
|
| 343 |
+
|
| 344 |
+
// User can moderate, so redirect to topic with view all set
|
| 345 |
+
if ( current_user_can( 'moderate' ) ) {
|
| 346 |
+
$redirect_url = bbp_add_view_all( $redirect_url );
|
| 347 |
+
|
| 348 |
+
// User cannot moderate, so redirect to forum
|
| 349 |
+
} else {
|
| 350 |
+
$redirect_url = bbp_get_forum_permalink( $forum_id );
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
|
| 354 |
// Allow to be filtered
|
| 355 |
+
$redirect_url = apply_filters( 'bbp_new_topic_redirect_to', $redirect_url, $redirect_to );
|
| 356 |
|
| 357 |
/** Successful Save ***********************************************/
|
| 358 |
|
| 359 |
// Redirect back to new topic
|
| 360 |
+
wp_safe_redirect( $redirect_url );
|
| 361 |
|
| 362 |
// For good measure
|
| 363 |
exit();
|
| 715 |
update_post_meta( $topic_id, '_bbp_anonymous_email', $bbp_anonymous_email, false );
|
| 716 |
|
| 717 |
// Set transient for throttle check (only on new, not edit)
|
| 718 |
+
if ( empty( $is_edit ) ) {
|
| 719 |
set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
|
| 720 |
+
}
|
| 721 |
|
| 722 |
// Website is optional
|
| 723 |
+
if ( !empty( $bbp_anonymous_website ) ) {
|
| 724 |
update_post_meta( $topic_id, '_bbp_anonymous_website', $bbp_anonymous_website, false );
|
| 725 |
+
}
|
| 726 |
} else {
|
| 727 |
+
if ( empty( $is_edit ) && !current_user_can( 'throttle' ) ) {
|
| 728 |
update_user_meta( $author_id, '_bbp_last_posted', time() );
|
| 729 |
+
}
|
| 730 |
}
|
| 731 |
|
| 732 |
// Handle Subscription Checkbox
|
| 735 |
$subscheck = ( !empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' == $_POST['bbp_topic_subscription'] ) ) ? true : false;
|
| 736 |
|
| 737 |
// Subscribed and unsubscribing
|
| 738 |
+
if ( true == $subscribed && false == $subscheck ) {
|
| 739 |
bbp_remove_user_subscription( $author_id, $topic_id );
|
| 740 |
|
| 741 |
// Subscribing
|
| 742 |
+
} elseif ( false == $subscribed && true == $subscheck ) {
|
| 743 |
bbp_add_user_subscription( $author_id, $topic_id );
|
| 744 |
+
}
|
| 745 |
}
|
| 746 |
|
| 747 |
// Forum topic meta
|
| 808 |
// Get topic ancestors
|
| 809 |
$ancestors = array_values( array_unique( array_merge( array( $forum_id ), get_post_ancestors( $topic_id ) ) ) );
|
| 810 |
|
| 811 |
+
// Topic status
|
| 812 |
+
$topic_status = get_post_status( $topic_id );
|
| 813 |
+
|
| 814 |
// If we want a full refresh, unset any of the possibly passed variables
|
| 815 |
+
if ( true == $refresh ) {
|
| 816 |
$forum_id = $topic_id = $reply_id = $active_id = $last_active_time = 0;
|
| 817 |
+
$topic_status = bbp_get_public_status_id();
|
| 818 |
+
}
|
| 819 |
|
| 820 |
// Loop through ancestors
|
| 821 |
foreach ( $ancestors as $ancestor ) {
|
| 825 |
|
| 826 |
// Update the forum
|
| 827 |
bbp_update_forum( array(
|
| 828 |
+
'forum_id' => $ancestor,
|
| 829 |
+
'last_topic_id' => $topic_id,
|
| 830 |
+
'last_reply_id' => $reply_id,
|
| 831 |
+
'last_active_id' => $active_id,
|
| 832 |
+
'last_active_time' => 0,
|
| 833 |
+
'last_active_status' => $topic_status
|
| 834 |
) );
|
| 835 |
}
|
| 836 |
}
|
| 845 |
* @param int $new_forum_id New forum id
|
| 846 |
* @uses bbp_get_topic_id() To get the topic id
|
| 847 |
* @uses bbp_get_forum_id() To get the forum id
|
| 848 |
+
* @uses bbp_get_stickies() To get the old forums sticky topics
|
| 849 |
+
* @uses delete_post_meta() To delete the forum sticky meta
|
| 850 |
+
* @uses update_post_meta() To update the old forum sticky meta
|
| 851 |
+
* @uses bbp_stick_topic() To stick the topic in the new forum
|
| 852 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
| 853 |
+
* @uses bbp_get_all_child_ids() To get the public child ids
|
| 854 |
* @uses bbp_update_reply_forum_id() To update the reply forum id
|
| 855 |
* @uses bbp_update_topic_forum_id() To update the topic forum id
|
| 856 |
* @uses get_post_ancestors() To get the topic's ancestors
|
| 858 |
* @uses bbp_update_forum() To update the forum
|
| 859 |
*/
|
| 860 |
function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) {
|
| 861 |
+
|
| 862 |
+
// Validate parameters
|
| 863 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 864 |
$old_forum_id = bbp_get_forum_id( $old_forum_id );
|
| 865 |
$new_forum_id = bbp_get_forum_id( $new_forum_id );
|
| 866 |
+
|
| 867 |
+
/** Stickies **************************************************************/
|
| 868 |
+
|
| 869 |
+
// Get forum stickies
|
| 870 |
+
$old_stickies = bbp_get_stickies( $old_forum_id );
|
| 871 |
+
|
| 872 |
+
// Only proceed if stickies are found
|
| 873 |
+
if ( !empty( $old_stickies ) ) {
|
| 874 |
+
|
| 875 |
+
// Define local variables
|
| 876 |
+
$updated_stickies = array();
|
| 877 |
+
|
| 878 |
+
// Loop through stickies of forum
|
| 879 |
+
foreach ( $old_stickies as $sticky_topic_id ) {
|
| 880 |
+
|
| 881 |
+
// Add non-matches to the updated array
|
| 882 |
+
if ( $topic_id != $sticky_topic_id ) {
|
| 883 |
+
$updated_stickies[$k] = $v;
|
| 884 |
+
}
|
| 885 |
+
}
|
| 886 |
+
|
| 887 |
+
// No more stickies so delete the beta
|
| 888 |
+
if ( empty( $updated_stickies ) ) {
|
| 889 |
+
delete_post_meta ( $old_forum_id, '_bbp_sticky_topics' );
|
| 890 |
+
|
| 891 |
+
// Still stickies so update the meta
|
| 892 |
+
} else {
|
| 893 |
+
update_post_meta( $old_forum_id, '_bbp_sticky_topics', $updated_stickies );
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
// Topic was sticky, so restick in new forum
|
| 897 |
+
bbp_stick_topic( $topic_id );
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
/** Topic Replies *********************************************************/
|
| 901 |
+
|
| 902 |
+
// Get the topics replies
|
| 903 |
+
$replies = bbp_get_all_child_ids( $topic_id, bbp_get_reply_post_type() );
|
| 904 |
|
| 905 |
// Update the forum_id of all replies in the topic
|
| 906 |
foreach ( $replies as $reply_id )
|
| 1166 |
|
| 1167 |
/** Successful Merge **************************************************/
|
| 1168 |
|
| 1169 |
+
// Update topic's last meta data
|
| 1170 |
+
bbp_update_topic_last_reply_id ( $destination_topic->ID );
|
| 1171 |
+
bbp_update_topic_last_active_id ( $destination_topic->ID );
|
| 1172 |
+
bbp_update_topic_last_active_time( $destination_topic->ID );
|
| 1173 |
+
|
| 1174 |
// Send the post parent of the source topic as it has been shifted
|
| 1175 |
// (possibly to a new forum) so we need to update the counts of the
|
| 1176 |
// old forum as well as the new one
|
| 1276 |
if ( empty( $_POST['action'] ) || ( 'bbp-split-topic' !== $_POST['action'] ) )
|
| 1277 |
return;
|
| 1278 |
|
| 1279 |
+
global $wpdb;
|
| 1280 |
|
| 1281 |
// Prevent debug notices
|
| 1282 |
$from_reply_id = $destination_topic_id = 0;
|
| 2119 |
* @return int Topic hidden reply count
|
| 2120 |
*/
|
| 2121 |
function bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = 0 ) {
|
| 2122 |
+
global $wpdb;
|
| 2123 |
|
| 2124 |
// If it's a reply, then get the parent (topic id)
|
| 2125 |
if ( bbp_is_reply( $topic_id ) )
|
| 2129 |
|
| 2130 |
// Get replies of topic
|
| 2131 |
if ( empty( $reply_count ) )
|
| 2132 |
+
$reply_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( '\',\'', array( bbp_get_trash_status_id(), bbp_get_spam_status_id() ) ) . "') AND post_type = '%s';", $topic_id, bbp_get_reply_post_type() ) );
|
| 2133 |
|
| 2134 |
update_post_meta( $topic_id, '_bbp_reply_count_hidden', (int) $reply_count );
|
| 2135 |
|
| 2169 |
if ( empty( $active_id ) || !bbp_is_reply( $active_id ) )
|
| 2170 |
$active_id = $topic_id;
|
| 2171 |
|
| 2172 |
+
// Update only if published
|
| 2173 |
+
if ( bbp_get_public_status_id() == get_post_status( $active_id ) )
|
| 2174 |
+
update_post_meta( $topic_id, '_bbp_last_active_id', (int) $active_id );
|
| 2175 |
|
| 2176 |
return apply_filters( 'bbp_update_topic_last_active_id', (int) $active_id, $topic_id );
|
| 2177 |
}
|
| 2201 |
if ( empty( $new_time ) )
|
| 2202 |
$new_time = get_post_field( 'post_date', bbp_get_public_child_last_id( $topic_id, bbp_get_reply_post_type() ) );
|
| 2203 |
|
| 2204 |
+
// Update only if published
|
| 2205 |
+
if ( !empty( $new_time ) )
|
| 2206 |
+
update_post_meta( $topic_id, '_bbp_last_active_time', $new_time );
|
| 2207 |
|
| 2208 |
return apply_filters( 'bbp_update_topic_last_active_time', $new_time, $topic_id );
|
| 2209 |
}
|
| 2244 |
if ( empty( $reply_id ) || !bbp_is_reply( $reply_id ) )
|
| 2245 |
$reply_id = 0;
|
| 2246 |
|
| 2247 |
+
// Update if reply is published
|
| 2248 |
+
if ( bbp_is_reply_published( $reply_id ) )
|
| 2249 |
+
update_post_meta( $topic_id, '_bbp_last_reply_id', (int) $reply_id );
|
| 2250 |
|
| 2251 |
return apply_filters( 'bbp_update_topic_last_reply_id', (int) $reply_id, $topic_id );
|
| 2252 |
}
|
| 2282 |
return;
|
| 2283 |
|
| 2284 |
// Query the DB to get voices in this topic
|
| 2285 |
+
$voices = $wpdb->get_col( $wpdb->prepare( "SELECT COUNT( DISTINCT post_author ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '%s' AND post_type = '%s' ) OR ( ID = %d AND post_type = '%s' );", $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
|
| 2286 |
|
| 2287 |
// If there's an error, make sure we at least have 1 voice
|
| 2288 |
$voices = ( empty( $voices ) || is_wp_error( $voices ) ) ? 1 : $voices[0];
|
| 2323 |
else
|
| 2324 |
return;
|
| 2325 |
|
| 2326 |
+
$anonymous_replies = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( ID ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '%s' AND post_type = '%s' AND post_author = 0 ) OR ( ID = %d AND post_type = '%s' AND post_author = 0 );", $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
|
| 2327 |
|
| 2328 |
update_post_meta( $topic_id, '_bbp_anonymous_reply_count', (int) $anonymous_replies );
|
| 2329 |
|
| 2388 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2389 |
*/
|
| 2390 |
function bbp_close_topic( $topic_id = 0 ) {
|
|
|
|
| 2391 |
|
| 2392 |
// Get topic
|
| 2393 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2394 |
return $topic;
|
| 2395 |
|
| 2396 |
// Bail if already closed
|
| 2397 |
+
if ( bbp_get_closed_status_id == $topic['post_status'] )
|
| 2398 |
return false;
|
| 2399 |
|
| 2400 |
// Execute pre close code
|
| 2404 |
add_post_meta( $topic_id, '_bbp_status', $topic['post_status'] );
|
| 2405 |
|
| 2406 |
// Set closed status
|
| 2407 |
+
$topic['post_status'] = bbp_get_closed_status_id();
|
| 2408 |
|
| 2409 |
// No revisions
|
| 2410 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
| 2434 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2435 |
*/
|
| 2436 |
function bbp_open_topic( $topic_id = 0 ) {
|
|
|
|
| 2437 |
|
| 2438 |
// Get topic
|
| 2439 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2440 |
return $topic;
|
| 2441 |
|
| 2442 |
// Bail if already open
|
| 2443 |
+
if ( bbp_get_closed_status_id() != $topic['post_status'])
|
| 2444 |
return false;
|
| 2445 |
|
| 2446 |
// Execute pre open code
|
| 2482 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2483 |
*/
|
| 2484 |
function bbp_spam_topic( $topic_id = 0 ) {
|
|
|
|
| 2485 |
|
| 2486 |
// Get the topic
|
| 2487 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2488 |
return $topic;
|
| 2489 |
|
| 2490 |
// Bail if topic is spam
|
| 2491 |
+
if ( bbp_get_spam_status_id() == $topic['post_status'] )
|
| 2492 |
return false;
|
| 2493 |
|
| 2494 |
// Execute pre spam code
|
| 2520 |
}
|
| 2521 |
|
| 2522 |
// Set post status to spam
|
| 2523 |
+
$topic['post_status'] = bbp_get_spam_status_id();
|
| 2524 |
|
| 2525 |
// No revisions
|
| 2526 |
remove_action( 'pre_post_update', 'wp_save_post_revision' );
|
| 2550 |
* @return mixed False or {@link WP_Error} on failure, topic id on success
|
| 2551 |
*/
|
| 2552 |
function bbp_unspam_topic( $topic_id = 0 ) {
|
|
|
|
| 2553 |
|
| 2554 |
// Get the topic
|
| 2555 |
if ( !$topic = wp_get_single_post( $topic_id, ARRAY_A ) )
|
| 2556 |
return $topic;
|
| 2557 |
|
| 2558 |
// Bail if already not spam
|
| 2559 |
+
if ( bbp_get_spam_status_id() != $topic['post_status'] )
|
| 2560 |
return false;
|
| 2561 |
|
| 2562 |
// Execute pre unspam code
|
| 2690 |
/** Before Delete/Trash/Untrash ***********************************************/
|
| 2691 |
|
| 2692 |
/**
|
| 2693 |
+
* Called before deleting a topic.
|
| 2694 |
+
*
|
| 2695 |
+
* This function is supplemental to the actual topic deletion which is
|
| 2696 |
+
* handled by WordPress core API functions. It is used to clean up after
|
| 2697 |
+
* a topic that is being deleted.
|
| 2698 |
*
|
| 2699 |
* @uses bbp_get_topic_id() To get the topic id
|
| 2700 |
* @uses bbp_is_topic() To check if the passed id is a topic
|
| 2706 |
* @uses wp_delete_post() To delete the reply
|
| 2707 |
*/
|
| 2708 |
function bbp_delete_topic( $topic_id = 0 ) {
|
| 2709 |
+
|
| 2710 |
+
// Validate topic ID
|
| 2711 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 2712 |
|
| 2713 |
if ( empty( $topic_id ) || !bbp_is_topic( $topic_id ) )
|
| 2715 |
|
| 2716 |
do_action( 'bbp_delete_topic', $topic_id );
|
| 2717 |
|
| 2718 |
+
// Valid topic/reply statuses
|
| 2719 |
+
$post_stati = join( ',', array( bbp_get_public_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );
|
| 2720 |
+
|
| 2721 |
// Topic is being permanently deleted, so its replies gotta go too
|
| 2722 |
+
if ( bbp_has_replies( array(
|
| 2723 |
+
'post_type' => bbp_get_reply_post_type(),
|
| 2724 |
+
'post_status' => $post_stati,
|
| 2725 |
+
'posts_per_page' => -1,
|
| 2726 |
+
'meta_query' => array( array(
|
| 2727 |
+
'key' => '_bbp_topic_id',
|
| 2728 |
+
'value' => $topic_id,
|
| 2729 |
+
'compare' => '='
|
| 2730 |
+
) )
|
| 2731 |
+
) ) ) {
|
| 2732 |
while ( bbp_replies() ) {
|
| 2733 |
bbp_the_reply();
|
| 2734 |
wp_delete_post( bbp_get_reply_id(), true );
|
| 2739 |
/**
|
| 2740 |
* Called before trashing a topic
|
| 2741 |
*
|
| 2742 |
+
* This function is supplemental to the actual topic being trashed which is
|
| 2743 |
+
* handled by WordPress core API functions. It is used to clean up after
|
| 2744 |
+
* a topic that is being trashed.
|
| 2745 |
+
*
|
| 2746 |
* @uses bbp_get_topic_id() To get the topic id
|
| 2747 |
* @uses bbp_is_topic() To check if the passed id is a topic
|
| 2748 |
* @uses do_action() Calls 'bbp_trash_topic' with the topic id
|
| 2754 |
* @uses update_post_meta() To save a list of just trashed replies for future use
|
| 2755 |
*/
|
| 2756 |
function bbp_trash_topic( $topic_id = 0 ) {
|
| 2757 |
+
global $bbp;
|
| 2758 |
+
|
| 2759 |
$topic_id = bbp_get_topic_id( $topic_id );
|
| 2760 |
|
| 2761 |
if ( empty( $topic_id ) || !bbp_is_topic( $topic_id ) )
|
| 2764 |
do_action( 'bbp_trash_topic', $topic_id );
|
| 2765 |
|
| 2766 |
// Topic is being trashed, so its replies are trashed too
|
| 2767 |
+
if ( bbp_has_replies( array(
|
| 2768 |
+
'post_type' => bbp_get_reply_post_type(),
|
| 2769 |
+
'post_status' => bbp_get_public_status_id(),
|
| 2770 |
+
'posts_per_page' => -1,
|
| 2771 |
+
'meta_query' => array( array(
|
| 2772 |
+
'key' => '_bbp_topic_id',
|
| 2773 |
+
'value' => $topic_id,
|
| 2774 |
+
'compare' => '='
|
| 2775 |
+
) )
|
| 2776 |
+
) ) ) {
|
| 2777 |
|
| 2778 |
// Prevent debug notices
|
| 2779 |
$pre_trashed_replies = array();
|
bbp-includes/bbp-topic-template.php
CHANGED
|
@@ -70,9 +70,9 @@ function bbp_has_topics( $args = '' ) {
|
|
| 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(
|
| 74 |
else
|
| 75 |
-
$default_status = join( ',', array(
|
| 76 |
|
| 77 |
// Default arguments
|
| 78 |
$default = array (
|
|
@@ -120,11 +120,8 @@ function bbp_has_topics( $args = '' ) {
|
|
| 120 |
// Extract the query variables
|
| 121 |
extract( $bbp_t );
|
| 122 |
|
| 123 |
-
//
|
| 124 |
-
|
| 125 |
-
$bbp->topic_query = $wp_query;
|
| 126 |
-
else
|
| 127 |
-
$bbp->topic_query = new WP_Query( $bbp_t );
|
| 128 |
|
| 129 |
// Set post_parent back to 0 if originally set to 'any'
|
| 130 |
if ( 'any' == $bbp_t['post_parent'] )
|
|
@@ -903,9 +900,7 @@ function bbp_is_topic_open( $topic_id = 0 ) {
|
|
| 903 |
* @return bool True if closed, false if not.
|
| 904 |
*/
|
| 905 |
function bbp_is_topic_closed( $topic_id = 0 ) {
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
if ( $bbp->closed_status_id == bbp_get_topic_status( $topic_id ) )
|
| 909 |
return true;
|
| 910 |
|
| 911 |
return false;
|
|
@@ -954,6 +949,21 @@ function bbp_is_topic_super_sticky( $topic_id = 0 ) {
|
|
| 954 |
return in_array( $topic_id, $stickies );
|
| 955 |
}
|
| 956 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 957 |
/**
|
| 958 |
* Is the topic marked as spam?
|
| 959 |
*
|
|
@@ -965,10 +975,8 @@ function bbp_is_topic_super_sticky( $topic_id = 0 ) {
|
|
| 965 |
* @return bool True if spam, false if not.
|
| 966 |
*/
|
| 967 |
function bbp_is_topic_spam( $topic_id = 0 ) {
|
| 968 |
-
global $bbp;
|
| 969 |
-
|
| 970 |
$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
|
| 971 |
-
return
|
| 972 |
}
|
| 973 |
|
| 974 |
/**
|
|
@@ -982,10 +990,8 @@ function bbp_is_topic_spam( $topic_id = 0 ) {
|
|
| 982 |
* @return bool True if trashed, false if not.
|
| 983 |
*/
|
| 984 |
function bbp_is_topic_trash( $topic_id = 0 ) {
|
| 985 |
-
global $bbp;
|
| 986 |
-
|
| 987 |
$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
|
| 988 |
-
return
|
| 989 |
}
|
| 990 |
|
| 991 |
/**
|
|
@@ -1200,7 +1206,8 @@ function bbp_topic_author_link( $args = '' ) {
|
|
| 1200 |
'post_id' => 0,
|
| 1201 |
'link_title' => '',
|
| 1202 |
'type' => 'both',
|
| 1203 |
-
'size' => 80
|
|
|
|
| 1204 |
);
|
| 1205 |
|
| 1206 |
$r = wp_parse_args( $args, $defaults );
|
|
@@ -1222,22 +1229,26 @@ function bbp_topic_author_link( $args = '' ) {
|
|
| 1222 |
|
| 1223 |
// Get avatar
|
| 1224 |
if ( 'avatar' == $type || 'both' == $type )
|
| 1225 |
-
$author_links[] = bbp_get_topic_author_avatar( $topic_id, $size );
|
| 1226 |
|
| 1227 |
// Get display name
|
| 1228 |
if ( 'name' == $type || 'both' == $type )
|
| 1229 |
-
$author_links[] = bbp_get_topic_author_display_name( $topic_id );
|
|
|
|
|
|
|
|
|
|
| 1230 |
|
| 1231 |
// Add links if not anonymous
|
| 1232 |
if ( empty( $anonymous ) ) {
|
| 1233 |
-
foreach ( $author_links as $link_text ) {
|
| 1234 |
-
$
|
|
|
|
| 1235 |
}
|
| 1236 |
-
$author_link = join(
|
| 1237 |
|
| 1238 |
// No links if anonymous
|
| 1239 |
} else {
|
| 1240 |
-
$author_link = join(
|
| 1241 |
}
|
| 1242 |
|
| 1243 |
} else {
|
|
@@ -1680,7 +1691,6 @@ function bbp_topic_replies_link( $topic_id = 0 ) {
|
|
| 1680 |
* replies link and topic id
|
| 1681 |
*/
|
| 1682 |
function bbp_get_topic_replies_link( $topic_id = 0 ) {
|
| 1683 |
-
global $bbp;
|
| 1684 |
|
| 1685 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ) );
|
| 1686 |
$topic_id = $topic->ID;
|
|
@@ -1967,7 +1977,6 @@ function bbp_topic_admin_links( $args = '' ) {
|
|
| 1967 |
* @return string Topic admin links
|
| 1968 |
*/
|
| 1969 |
function bbp_get_topic_admin_links( $args = '' ) {
|
| 1970 |
-
global $bbp;
|
| 1971 |
|
| 1972 |
if ( !bbp_is_single_topic() )
|
| 1973 |
return;
|
|
@@ -2002,17 +2011,17 @@ function bbp_topic_admin_links( $args = '' ) {
|
|
| 2002 |
|
| 2003 |
// See if links need to be unset
|
| 2004 |
$topic_status = bbp_get_topic_status( $r['id'] );
|
| 2005 |
-
if ( in_array( $topic_status, array(
|
| 2006 |
|
| 2007 |
// Close link shouldn't be visible on trashed/spammed topics
|
| 2008 |
unset( $r['links']['close'] );
|
| 2009 |
|
| 2010 |
// Spam link shouldn't be visible on trashed topics
|
| 2011 |
-
if ( $topic_status ==
|
| 2012 |
unset( $r['links']['spam'] );
|
| 2013 |
|
| 2014 |
// Trash link shouldn't be visible on spam topics
|
| 2015 |
-
elseif ( $topic_status ==
|
| 2016 |
unset( $r['links']['trash'] );
|
| 2017 |
}
|
| 2018 |
|
|
@@ -2164,7 +2173,6 @@ function bbp_topic_trash_link( $args = '' ) {
|
|
| 2164 |
* @return string Topic trash link
|
| 2165 |
*/
|
| 2166 |
function bbp_get_topic_trash_link( $args = '' ) {
|
| 2167 |
-
global $bbp;
|
| 2168 |
|
| 2169 |
$defaults = array (
|
| 2170 |
'id' => 0,
|
|
@@ -2553,7 +2561,6 @@ function bbp_forum_pagination_links() {
|
|
| 2553 |
* @uses bbPress::errors::add() To add the notices to the error handler
|
| 2554 |
*/
|
| 2555 |
function bbp_topic_notices() {
|
| 2556 |
-
global $bbp;
|
| 2557 |
|
| 2558 |
// Bail if not viewing a topic
|
| 2559 |
if ( !bbp_is_single_topic() )
|
|
@@ -2566,12 +2573,12 @@ function bbp_topic_notices() {
|
|
| 2566 |
switch ( $topic_status ) {
|
| 2567 |
|
| 2568 |
// Spam notice
|
| 2569 |
-
case
|
| 2570 |
$notice_text = __( 'This topic is marked as spam.', 'bbpress' );
|
| 2571 |
break;
|
| 2572 |
|
| 2573 |
// Trashed notice
|
| 2574 |
-
case
|
| 2575 |
$notice_text = __( 'This topic is in the trash.', 'bbpress' );
|
| 2576 |
break;
|
| 2577 |
|
|
@@ -2712,7 +2719,7 @@ function bbp_single_topic_description( $args = '' ) {
|
|
| 2712 |
// Default arguments
|
| 2713 |
$defaults = array (
|
| 2714 |
'topic_id' => 0,
|
| 2715 |
-
'before' => '<div class="bbp-template-notice info"><p class="
|
| 2716 |
'after' => '</p></div>',
|
| 2717 |
'size' => 14
|
| 2718 |
);
|
|
@@ -3002,7 +3009,6 @@ function bbp_topic_tag_description( $args = array() ) {
|
|
| 3002 |
* @return string Term Name
|
| 3003 |
*/
|
| 3004 |
function bbp_get_topic_tag_description( $args = array() ) {
|
| 3005 |
-
global $bbp;
|
| 3006 |
|
| 3007 |
$defaults = array(
|
| 3008 |
'before' => '<div class="bbp-topic-tag-description"><p>',
|
|
@@ -3122,7 +3128,7 @@ function bbp_form_topic_tags() {
|
|
| 3122 |
* @return string Value of topic tags field
|
| 3123 |
*/
|
| 3124 |
function bbp_get_form_topic_tags() {
|
| 3125 |
-
global $post
|
| 3126 |
|
| 3127 |
// Get _POST data
|
| 3128 |
if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_tags'] ) ) {
|
| 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( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_trash_status_id() ) );
|
| 74 |
else
|
| 75 |
+
$default_status = join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) );
|
| 76 |
|
| 77 |
// Default arguments
|
| 78 |
$default = array (
|
| 120 |
// Extract the query variables
|
| 121 |
extract( $bbp_t );
|
| 122 |
|
| 123 |
+
// Call the query
|
| 124 |
+
$bbp->topic_query = new WP_Query( $bbp_t );
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
// Set post_parent back to 0 if originally set to 'any'
|
| 127 |
if ( 'any' == $bbp_t['post_parent'] )
|
| 900 |
* @return bool True if closed, false if not.
|
| 901 |
*/
|
| 902 |
function bbp_is_topic_closed( $topic_id = 0 ) {
|
| 903 |
+
if ( bbp_get_closed_status_id() == bbp_get_topic_status( $topic_id ) )
|
|
|
|
|
|
|
| 904 |
return true;
|
| 905 |
|
| 906 |
return false;
|
| 949 |
return in_array( $topic_id, $stickies );
|
| 950 |
}
|
| 951 |
|
| 952 |
+
/**
|
| 953 |
+
* Is the topic not spam or deleted?
|
| 954 |
+
*
|
| 955 |
+
* @since bbPress (r3496)
|
| 956 |
+
*
|
| 957 |
+
* @param int $topic_id Optional. Topic id
|
| 958 |
+
* @uses bbp_get_topic_id() To get the topic id
|
| 959 |
+
* @uses bbp_get_topic_status() To get the topic status
|
| 960 |
+
* @return bool True if published, false if not.
|
| 961 |
+
*/
|
| 962 |
+
function bbp_is_topic_published( $topic_id = 0 ) {
|
| 963 |
+
$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
|
| 964 |
+
return bbp_get_public_status_id() == $topic_status;
|
| 965 |
+
}
|
| 966 |
+
|
| 967 |
/**
|
| 968 |
* Is the topic marked as spam?
|
| 969 |
*
|
| 975 |
* @return bool True if spam, false if not.
|
| 976 |
*/
|
| 977 |
function bbp_is_topic_spam( $topic_id = 0 ) {
|
|
|
|
|
|
|
| 978 |
$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
|
| 979 |
+
return bbp_get_spam_status_id() == $topic_status;
|
| 980 |
}
|
| 981 |
|
| 982 |
/**
|
| 990 |
* @return bool True if trashed, false if not.
|
| 991 |
*/
|
| 992 |
function bbp_is_topic_trash( $topic_id = 0 ) {
|
|
|
|
|
|
|
| 993 |
$topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
|
| 994 |
+
return bbp_get_trash_status_id() == $topic_status;
|
| 995 |
}
|
| 996 |
|
| 997 |
/**
|
| 1206 |
'post_id' => 0,
|
| 1207 |
'link_title' => '',
|
| 1208 |
'type' => 'both',
|
| 1209 |
+
'size' => 80,
|
| 1210 |
+
'sep' => ' '
|
| 1211 |
);
|
| 1212 |
|
| 1213 |
$r = wp_parse_args( $args, $defaults );
|
| 1229 |
|
| 1230 |
// Get avatar
|
| 1231 |
if ( 'avatar' == $type || 'both' == $type )
|
| 1232 |
+
$author_links['avatar'] = bbp_get_topic_author_avatar( $topic_id, $size );
|
| 1233 |
|
| 1234 |
// Get display name
|
| 1235 |
if ( 'name' == $type || 'both' == $type )
|
| 1236 |
+
$author_links['name'] = bbp_get_topic_author_display_name( $topic_id );
|
| 1237 |
+
|
| 1238 |
+
// Link class
|
| 1239 |
+
$link_class = ' class="bbp-author-' . $type . '"';
|
| 1240 |
|
| 1241 |
// Add links if not anonymous
|
| 1242 |
if ( empty( $anonymous ) ) {
|
| 1243 |
+
foreach ( $author_links as $link => $link_text ) {
|
| 1244 |
+
$link_class = ' class="bbp-author-' . $link . '"';
|
| 1245 |
+
$author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
|
| 1246 |
}
|
| 1247 |
+
$author_link = join( $sep, $author_link );
|
| 1248 |
|
| 1249 |
// No links if anonymous
|
| 1250 |
} else {
|
| 1251 |
+
$author_link = join( $sep, $author_links );
|
| 1252 |
}
|
| 1253 |
|
| 1254 |
} else {
|
| 1691 |
* replies link and topic id
|
| 1692 |
*/
|
| 1693 |
function bbp_get_topic_replies_link( $topic_id = 0 ) {
|
|
|
|
| 1694 |
|
| 1695 |
$topic = bbp_get_topic( bbp_get_topic_id( (int) $topic_id ) );
|
| 1696 |
$topic_id = $topic->ID;
|
| 1977 |
* @return string Topic admin links
|
| 1978 |
*/
|
| 1979 |
function bbp_get_topic_admin_links( $args = '' ) {
|
|
|
|
| 1980 |
|
| 1981 |
if ( !bbp_is_single_topic() )
|
| 1982 |
return;
|
| 2011 |
|
| 2012 |
// See if links need to be unset
|
| 2013 |
$topic_status = bbp_get_topic_status( $r['id'] );
|
| 2014 |
+
if ( in_array( $topic_status, array( bbp_get_spam_status_id(), bbp_get_trash_status_id() ) ) ) {
|
| 2015 |
|
| 2016 |
// Close link shouldn't be visible on trashed/spammed topics
|
| 2017 |
unset( $r['links']['close'] );
|
| 2018 |
|
| 2019 |
// Spam link shouldn't be visible on trashed topics
|
| 2020 |
+
if ( $topic_status == bbp_get_trash_status_id() )
|
| 2021 |
unset( $r['links']['spam'] );
|
| 2022 |
|
| 2023 |
// Trash link shouldn't be visible on spam topics
|
| 2024 |
+
elseif ( $topic_status == bbp_get_spam_status_id() )
|
| 2025 |
unset( $r['links']['trash'] );
|
| 2026 |
}
|
| 2027 |
|
| 2173 |
* @return string Topic trash link
|
| 2174 |
*/
|
| 2175 |
function bbp_get_topic_trash_link( $args = '' ) {
|
|
|
|
| 2176 |
|
| 2177 |
$defaults = array (
|
| 2178 |
'id' => 0,
|
| 2561 |
* @uses bbPress::errors::add() To add the notices to the error handler
|
| 2562 |
*/
|
| 2563 |
function bbp_topic_notices() {
|
|
|
|
| 2564 |
|
| 2565 |
// Bail if not viewing a topic
|
| 2566 |
if ( !bbp_is_single_topic() )
|
| 2573 |
switch ( $topic_status ) {
|
| 2574 |
|
| 2575 |
// Spam notice
|
| 2576 |
+
case bbp_get_spam_status_id() :
|
| 2577 |
$notice_text = __( 'This topic is marked as spam.', 'bbpress' );
|
| 2578 |
break;
|
| 2579 |
|
| 2580 |
// Trashed notice
|
| 2581 |
+
case bbp_get_trash_status_id() :
|
| 2582 |
$notice_text = __( 'This topic is in the trash.', 'bbpress' );
|
| 2583 |
break;
|
| 2584 |
|
| 2719 |
// Default arguments
|
| 2720 |
$defaults = array (
|
| 2721 |
'topic_id' => 0,
|
| 2722 |
+
'before' => '<div class="bbp-template-notice info"><p class="bbp-topic-description">',
|
| 2723 |
'after' => '</p></div>',
|
| 2724 |
'size' => 14
|
| 2725 |
);
|
| 3009 |
* @return string Term Name
|
| 3010 |
*/
|
| 3011 |
function bbp_get_topic_tag_description( $args = array() ) {
|
|
|
|
| 3012 |
|
| 3013 |
$defaults = array(
|
| 3014 |
'before' => '<div class="bbp-topic-tag-description"><p>',
|
| 3128 |
* @return string Value of topic tags field
|
| 3129 |
*/
|
| 3130 |
function bbp_get_form_topic_tags() {
|
| 3131 |
+
global $post;
|
| 3132 |
|
| 3133 |
// Get _POST data
|
| 3134 |
if ( 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['bbp_topic_tags'] ) ) {
|
bbp-includes/bbp-user-functions.php
CHANGED
|
@@ -1022,8 +1022,9 @@ function bbp_make_spam_user( $user_id = 0 ) {
|
|
| 1022 |
$blogs[$blog_id] = array();
|
| 1023 |
|
| 1024 |
// Make array of post types to mark as spam
|
| 1025 |
-
$post_types
|
| 1026 |
-
$post_types
|
|
|
|
| 1027 |
|
| 1028 |
// Loop through blogs and remove their posts
|
| 1029 |
foreach ( (array) $blogs as $blog_id => $details ) {
|
|
@@ -1032,7 +1033,7 @@ function bbp_make_spam_user( $user_id = 0 ) {
|
|
| 1032 |
switch_to_blog( $blog_id );
|
| 1033 |
|
| 1034 |
// Get topics and replies
|
| 1035 |
-
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '
|
| 1036 |
|
| 1037 |
// Loop through posts and spam them
|
| 1038 |
if ( !empty( $posts ) ) {
|
|
@@ -1096,7 +1097,7 @@ function bbp_make_ham_user( $user_id = 0 ) {
|
|
| 1096 |
return;
|
| 1097 |
|
| 1098 |
// Arm the torpedos
|
| 1099 |
-
global $wpdb
|
| 1100 |
|
| 1101 |
// Get the blog IDs of the user to mark as spam
|
| 1102 |
$blogs = get_blogs_of_user( $user_id, true );
|
|
@@ -1108,6 +1109,7 @@ function bbp_make_ham_user( $user_id = 0 ) {
|
|
| 1108 |
// Make array of post types to mark as spam
|
| 1109 |
$post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
|
| 1110 |
$post_types = "'" . implode( "', '", $post_types ) . "'";
|
|
|
|
| 1111 |
|
| 1112 |
// Loop through blogs and remove their posts
|
| 1113 |
foreach ( (array) $blogs as $blog_id => $details ) {
|
|
@@ -1116,7 +1118,7 @@ function bbp_make_ham_user( $user_id = 0 ) {
|
|
| 1116 |
switch_to_blog( $blog_id );
|
| 1117 |
|
| 1118 |
// Get topics and replies
|
| 1119 |
-
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$
|
| 1120 |
|
| 1121 |
// Loop through posts and spam them
|
| 1122 |
if ( !empty( $posts ) ) {
|
|
@@ -1185,4 +1187,65 @@ function bbp_is_user_deleted( $user_id = 0 ) {
|
|
| 1185 |
return apply_filters( 'bp_core_is_user_deleted', (bool) $is_deleted );
|
| 1186 |
}
|
| 1187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1188 |
?>
|
| 1022 |
$blogs[$blog_id] = array();
|
| 1023 |
|
| 1024 |
// Make array of post types to mark as spam
|
| 1025 |
+
$post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
|
| 1026 |
+
$post_types = "'" . implode( "', '", $post_types ) . "'";
|
| 1027 |
+
$status = bbp_get_public_status_id();
|
| 1028 |
|
| 1029 |
// Loop through blogs and remove their posts
|
| 1030 |
foreach ( (array) $blogs as $blog_id => $details ) {
|
| 1033 |
switch_to_blog( $blog_id );
|
| 1034 |
|
| 1035 |
// Get topics and replies
|
| 1036 |
+
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
|
| 1037 |
|
| 1038 |
// Loop through posts and spam them
|
| 1039 |
if ( !empty( $posts ) ) {
|
| 1097 |
return;
|
| 1098 |
|
| 1099 |
// Arm the torpedos
|
| 1100 |
+
global $wpdb;
|
| 1101 |
|
| 1102 |
// Get the blog IDs of the user to mark as spam
|
| 1103 |
$blogs = get_blogs_of_user( $user_id, true );
|
| 1109 |
// Make array of post types to mark as spam
|
| 1110 |
$post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
|
| 1111 |
$post_types = "'" . implode( "', '", $post_types ) . "'";
|
| 1112 |
+
$status = bbp_get_spam_status_id();
|
| 1113 |
|
| 1114 |
// Loop through blogs and remove their posts
|
| 1115 |
foreach ( (array) $blogs as $blog_id => $details ) {
|
| 1118 |
switch_to_blog( $blog_id );
|
| 1119 |
|
| 1120 |
// Get topics and replies
|
| 1121 |
+
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" );
|
| 1122 |
|
| 1123 |
// Loop through posts and spam them
|
| 1124 |
if ( !empty( $posts ) ) {
|
| 1187 |
return apply_filters( 'bp_core_is_user_deleted', (bool) $is_deleted );
|
| 1188 |
}
|
| 1189 |
|
| 1190 |
+
/**
|
| 1191 |
+
* Checks if user is active
|
| 1192 |
+
*
|
| 1193 |
+
* @since bbPress (r3502)
|
| 1194 |
+
*
|
| 1195 |
+
* @uses is_user_logged_in() To check if user is logged in
|
| 1196 |
+
* @uses bbp_get_displayed_user_id() To get current user ID
|
| 1197 |
+
* @uses bbp_is_user_spammer() To check if user is spammer
|
| 1198 |
+
* @uses bbp_is_user_deleted() To check if user is deleted
|
| 1199 |
+
*
|
| 1200 |
+
* @param int $user_id The user ID to check
|
| 1201 |
+
* @return bool True if public, false if not
|
| 1202 |
+
*/
|
| 1203 |
+
function bbp_is_user_active( $user_id = 0 ) {
|
| 1204 |
+
|
| 1205 |
+
// Default to current user
|
| 1206 |
+
if ( empty( $user_id ) && is_user_logged_in() )
|
| 1207 |
+
$user_id = bbp_get_current_user_id();
|
| 1208 |
+
|
| 1209 |
+
// No user to check
|
| 1210 |
+
if ( empty( $user_id ) )
|
| 1211 |
+
return false;
|
| 1212 |
+
|
| 1213 |
+
// Check spam
|
| 1214 |
+
if ( bbp_is_user_spammer( $user_id ) )
|
| 1215 |
+
return false;
|
| 1216 |
+
|
| 1217 |
+
// Check deleted
|
| 1218 |
+
if ( bbp_is_user_deleted( $user_id ) )
|
| 1219 |
+
return false;
|
| 1220 |
+
|
| 1221 |
+
// Assume true if not spam or deleted
|
| 1222 |
+
return true;
|
| 1223 |
+
}
|
| 1224 |
+
|
| 1225 |
+
/**
|
| 1226 |
+
* Checks if user is not active.
|
| 1227 |
+
*
|
| 1228 |
+
* @since bbPress (r3502)
|
| 1229 |
+
*
|
| 1230 |
+
* @uses is_user_logged_in() To check if user is logged in
|
| 1231 |
+
* @uses bbp_get_displayed_user_id() To get current user ID
|
| 1232 |
+
* @uses bbp_is_user_active() To check if user is active
|
| 1233 |
+
*
|
| 1234 |
+
* @param int $user_id The user ID to check
|
| 1235 |
+
* @return bool True if inactive, false if active
|
| 1236 |
+
*/
|
| 1237 |
+
function bbp_is_user_inactive( $user_id = 0 ) {
|
| 1238 |
+
|
| 1239 |
+
// Default to current user
|
| 1240 |
+
if ( empty( $user_id ) && is_user_logged_in() )
|
| 1241 |
+
$user_id = bbp_get_current_user_id();
|
| 1242 |
+
|
| 1243 |
+
// No user to check
|
| 1244 |
+
if ( empty( $user_id ) )
|
| 1245 |
+
return false;
|
| 1246 |
+
|
| 1247 |
+
// Return the inverse of active
|
| 1248 |
+
return !bbp_is_user_active( $user_id );
|
| 1249 |
+
}
|
| 1250 |
+
|
| 1251 |
?>
|
bbp-includes/bbp-user-template.php
CHANGED
|
@@ -532,6 +532,9 @@ function bbp_user_favorites_link( $add = array(), $rem = array(), $user_id = 0 )
|
|
| 532 |
* @return string User favorites link
|
| 533 |
*/
|
| 534 |
function bbp_get_user_favorites_link( $add = array(), $rem = array(), $user_id = 0 ) {
|
|
|
|
|
|
|
|
|
|
| 535 |
if ( !$user_id = bbp_get_user_id( $user_id, true, true ) )
|
| 536 |
return false;
|
| 537 |
|
|
@@ -855,7 +858,6 @@ function bbp_edit_user_contact_methods() {
|
|
| 855 |
* @uses WP_Error bbPress::errors::add() To add an error or message
|
| 856 |
*/
|
| 857 |
function bbp_login_notices() {
|
| 858 |
-
global $bbp;
|
| 859 |
|
| 860 |
// loggedout was passed
|
| 861 |
if ( !empty( $_GET['loggedout'] ) && ( true == $_GET['loggedout'] ) ) {
|
|
@@ -1151,6 +1153,7 @@ function bbp_user_can_view_forum( $args = '' ) {
|
|
| 1151 |
* @uses is_super_admin()
|
| 1152 |
* @uses is_user_logged_in()
|
| 1153 |
* @uses bbp_allow_anonymous()
|
|
|
|
| 1154 |
* @uses current_user_can()
|
| 1155 |
* @uses apply_filters()
|
| 1156 |
*
|
|
@@ -1170,7 +1173,7 @@ function bbp_current_user_can_publish_topics() {
|
|
| 1170 |
$retval = true;
|
| 1171 |
|
| 1172 |
// User is logged in
|
| 1173 |
-
elseif (
|
| 1174 |
$retval = true;
|
| 1175 |
|
| 1176 |
// Allow access to be filtered
|
|
@@ -1185,6 +1188,7 @@ function bbp_current_user_can_publish_topics() {
|
|
| 1185 |
* @uses is_super_admin()
|
| 1186 |
* @uses is_user_logged_in()
|
| 1187 |
* @uses bbp_allow_anonymous()
|
|
|
|
| 1188 |
* @uses current_user_can()
|
| 1189 |
* @uses apply_filters()
|
| 1190 |
*
|
|
@@ -1204,7 +1208,7 @@ function bbp_current_user_can_publish_replies() {
|
|
| 1204 |
$retval = true;
|
| 1205 |
|
| 1206 |
// User is logged in
|
| 1207 |
-
elseif (
|
| 1208 |
$retval = true;
|
| 1209 |
|
| 1210 |
// Allow access to be filtered
|
|
@@ -1245,7 +1249,7 @@ function bbp_get_forums_for_current_user( $args = array() ) {
|
|
| 1245 |
|
| 1246 |
$defaults = array(
|
| 1247 |
'post_type' => bbp_get_forum_post_type(),
|
| 1248 |
-
'post_status' =>
|
| 1249 |
'numberposts' => -1,
|
| 1250 |
'exclude' => $post__not_in
|
| 1251 |
);
|
|
@@ -1284,13 +1288,12 @@ function bbp_current_user_can_access_create_topic_form() {
|
|
| 1284 |
$retval = false;
|
| 1285 |
|
| 1286 |
// Looking at a single forum & forum is open
|
| 1287 |
-
if ( ( bbp_is_single_forum() || is_page() || is_single() ) && bbp_is_forum_open() )
|
| 1288 |
$retval = bbp_current_user_can_publish_topics();
|
| 1289 |
|
| 1290 |
// User can edit this topic
|
| 1291 |
-
|
| 1292 |
$retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
|
| 1293 |
-
}
|
| 1294 |
|
| 1295 |
// Allow access to be filtered
|
| 1296 |
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
|
@@ -1319,13 +1322,12 @@ function bbp_current_user_can_access_create_reply_form() {
|
|
| 1319 |
$retval = false;
|
| 1320 |
|
| 1321 |
// Looking at a single topic, topic is open, and forum is open
|
| 1322 |
-
if ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() )
|
| 1323 |
$retval = bbp_current_user_can_publish_replies();
|
| 1324 |
|
| 1325 |
// User can edit this topic
|
| 1326 |
-
|
| 1327 |
$retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
|
| 1328 |
-
}
|
| 1329 |
|
| 1330 |
// Allow access to be filtered
|
| 1331 |
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
| 532 |
* @return string User favorites link
|
| 533 |
*/
|
| 534 |
function bbp_get_user_favorites_link( $add = array(), $rem = array(), $user_id = 0 ) {
|
| 535 |
+
if ( !bbp_is_favorites_active() )
|
| 536 |
+
return false;
|
| 537 |
+
|
| 538 |
if ( !$user_id = bbp_get_user_id( $user_id, true, true ) )
|
| 539 |
return false;
|
| 540 |
|
| 858 |
* @uses WP_Error bbPress::errors::add() To add an error or message
|
| 859 |
*/
|
| 860 |
function bbp_login_notices() {
|
|
|
|
| 861 |
|
| 862 |
// loggedout was passed
|
| 863 |
if ( !empty( $_GET['loggedout'] ) && ( true == $_GET['loggedout'] ) ) {
|
| 1153 |
* @uses is_super_admin()
|
| 1154 |
* @uses is_user_logged_in()
|
| 1155 |
* @uses bbp_allow_anonymous()
|
| 1156 |
+
* @uses bbp_is_user_active()
|
| 1157 |
* @uses current_user_can()
|
| 1158 |
* @uses apply_filters()
|
| 1159 |
*
|
| 1173 |
$retval = true;
|
| 1174 |
|
| 1175 |
// User is logged in
|
| 1176 |
+
elseif ( bbp_is_user_active() && current_user_can( 'publish_topics' ) )
|
| 1177 |
$retval = true;
|
| 1178 |
|
| 1179 |
// Allow access to be filtered
|
| 1188 |
* @uses is_super_admin()
|
| 1189 |
* @uses is_user_logged_in()
|
| 1190 |
* @uses bbp_allow_anonymous()
|
| 1191 |
+
* @uses bbp_is_user_active()
|
| 1192 |
* @uses current_user_can()
|
| 1193 |
* @uses apply_filters()
|
| 1194 |
*
|
| 1208 |
$retval = true;
|
| 1209 |
|
| 1210 |
// User is logged in
|
| 1211 |
+
elseif ( bbp_is_user_active() && current_user_can( 'publish_replies' ) )
|
| 1212 |
$retval = true;
|
| 1213 |
|
| 1214 |
// Allow access to be filtered
|
| 1249 |
|
| 1250 |
$defaults = array(
|
| 1251 |
'post_type' => bbp_get_forum_post_type(),
|
| 1252 |
+
'post_status' => bbp_get_public_status_id(),
|
| 1253 |
'numberposts' => -1,
|
| 1254 |
'exclude' => $post__not_in
|
| 1255 |
);
|
| 1288 |
$retval = false;
|
| 1289 |
|
| 1290 |
// Looking at a single forum & forum is open
|
| 1291 |
+
if ( ( bbp_is_single_forum() || is_page() || is_single() ) && bbp_is_forum_open() )
|
| 1292 |
$retval = bbp_current_user_can_publish_topics();
|
| 1293 |
|
| 1294 |
// User can edit this topic
|
| 1295 |
+
elseif ( bbp_is_topic_edit() )
|
| 1296 |
$retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
|
|
|
|
| 1297 |
|
| 1298 |
// Allow access to be filtered
|
| 1299 |
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
| 1322 |
$retval = false;
|
| 1323 |
|
| 1324 |
// Looking at a single topic, topic is open, and forum is open
|
| 1325 |
+
if ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() )
|
| 1326 |
$retval = bbp_current_user_can_publish_replies();
|
| 1327 |
|
| 1328 |
// User can edit this topic
|
| 1329 |
+
elseif ( bbp_is_reply_edit() )
|
| 1330 |
$retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
|
|
|
|
| 1331 |
|
| 1332 |
// Allow access to be filtered
|
| 1333 |
return apply_filters( 'bbp_current_user_can_access_create_topic_form', (bool) $retval );
|
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-rc-
|
| 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"
|
|
@@ -420,34 +420,34 @@ msgid "Topic \"%1$s\" successfully unmarked as spam."
|
|
| 420 |
msgstr ""
|
| 421 |
|
| 422 |
#: bbp-admin/bbp-topics.php:591 bbp-admin/bbp-admin.php:236
|
| 423 |
-
#: bbp-admin/bbp-admin.php:249 bbp-admin/bbp-forums.php:
|
| 424 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 425 |
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:45
|
| 426 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:19 bbpress.php:
|
| 427 |
-
#: bbpress.php:
|
| 428 |
msgid "Topics"
|
| 429 |
msgstr ""
|
| 430 |
|
| 431 |
-
#: bbp-admin/bbp-topics.php:592 bbp-admin/bbp-forums.php:
|
| 432 |
#: bbp-admin/bbp-metaboxes.php:50 bbp-admin/bbp-metaboxes.php:254
|
| 433 |
#: bbp-admin/bbp-metaboxes.php:362 bbp-admin/bbp-metaboxes.php:365
|
| 434 |
#: bbp-admin/bbp-metaboxes.php:405 bbp-admin/bbp-metaboxes.php:408
|
| 435 |
#: bbp-admin/bbp-replies.php:524
|
| 436 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:18 bbpress.php:
|
| 437 |
msgid "Forum"
|
| 438 |
msgstr ""
|
| 439 |
|
| 440 |
#: bbp-admin/bbp-topics.php:593 bbp-admin/bbp-admin.php:240
|
| 441 |
-
#: bbp-admin/bbp-admin.php:253 bbp-admin/bbp-forums.php:
|
| 442 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 443 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 444 |
#: bbp-themes/bbp-twentyten/single-reply.php:32
|
| 445 |
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:50
|
| 446 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:30
|
| 447 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:49
|
| 448 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
| 449 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:19 bbpress.php:
|
| 450 |
-
#: bbpress.php:
|
| 451 |
msgid "Replies"
|
| 452 |
msgstr ""
|
| 453 |
|
|
@@ -463,12 +463,12 @@ msgstr ""
|
|
| 463 |
msgid "Author"
|
| 464 |
msgstr ""
|
| 465 |
|
| 466 |
-
#: bbp-admin/bbp-topics.php:596 bbp-admin/bbp-forums.php:
|
| 467 |
#: bbp-admin/bbp-replies.php:527
|
| 468 |
msgid "Created"
|
| 469 |
msgstr ""
|
| 470 |
|
| 471 |
-
#: bbp-admin/bbp-topics.php:597 bbp-admin/bbp-forums.php:
|
| 472 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:21
|
| 473 |
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:20
|
| 474 |
msgid "Freshness"
|
|
@@ -483,176 +483,176 @@ msgstr ""
|
|
| 483 |
msgid "(No Forum)"
|
| 484 |
msgstr ""
|
| 485 |
|
| 486 |
-
#: bbp-admin/bbp-topics.php:672 bbp-admin/bbp-forums.php:
|
| 487 |
#: bbp-admin/bbp-replies.php:629
|
| 488 |
msgid "%1$s <br /> %2$s"
|
| 489 |
msgstr ""
|
| 490 |
|
| 491 |
-
#: bbp-admin/bbp-topics.php:682 bbp-admin/bbp-forums.php:
|
| 492 |
msgid "%s ago"
|
| 493 |
msgstr ""
|
| 494 |
|
| 495 |
-
#: bbp-admin/bbp-topics.php:684 bbp-includes/bbp-topic-template.php:
|
| 496 |
msgid "No Replies"
|
| 497 |
msgstr ""
|
| 498 |
|
| 499 |
-
#: bbp-admin/bbp-topics.php:
|
| 500 |
msgid "View “%s”"
|
| 501 |
msgstr ""
|
| 502 |
|
| 503 |
-
#: bbp-admin/bbp-topics.php:
|
| 504 |
msgid "View"
|
| 505 |
msgstr ""
|
| 506 |
|
| 507 |
-
#: bbp-admin/bbp-topics.php:
|
| 508 |
msgid "Close this topic"
|
| 509 |
msgstr ""
|
| 510 |
|
| 511 |
-
#: bbp-admin/bbp-topics.php:
|
| 512 |
msgid "Close"
|
| 513 |
msgstr ""
|
| 514 |
|
| 515 |
-
#: bbp-admin/bbp-topics.php:
|
| 516 |
msgid "Open this topic"
|
| 517 |
msgstr ""
|
| 518 |
|
| 519 |
-
#: bbp-admin/bbp-topics.php:
|
| 520 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 521 |
msgid "Open"
|
| 522 |
msgstr ""
|
| 523 |
|
| 524 |
-
#: bbp-admin/bbp-topics.php:
|
| 525 |
msgid "Unstick this topic"
|
| 526 |
msgstr ""
|
| 527 |
|
| 528 |
-
#: bbp-admin/bbp-topics.php:
|
| 529 |
msgid "Unstick"
|
| 530 |
msgstr ""
|
| 531 |
|
| 532 |
-
#: bbp-admin/bbp-topics.php:
|
| 533 |
msgid "Stick this topic to its forum"
|
| 534 |
msgstr ""
|
| 535 |
|
| 536 |
-
#: bbp-admin/bbp-topics.php:
|
| 537 |
msgid "Stick"
|
| 538 |
msgstr ""
|
| 539 |
|
| 540 |
-
#: bbp-admin/bbp-topics.php:
|
| 541 |
msgid "Stick this topic to front"
|
| 542 |
msgstr ""
|
| 543 |
|
| 544 |
-
#: bbp-admin/bbp-topics.php:
|
| 545 |
msgid "to front"
|
| 546 |
msgstr ""
|
| 547 |
|
| 548 |
-
#: bbp-admin/bbp-topics.php:
|
| 549 |
msgid "Mark the topic as not spam"
|
| 550 |
msgstr ""
|
| 551 |
|
| 552 |
-
#: bbp-admin/bbp-topics.php:
|
| 553 |
msgid "Not spam"
|
| 554 |
msgstr ""
|
| 555 |
|
| 556 |
-
#: bbp-admin/bbp-topics.php:
|
| 557 |
msgid "Mark this topic as spam"
|
| 558 |
msgstr ""
|
| 559 |
|
| 560 |
-
#: bbp-admin/bbp-topics.php:
|
| 561 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 562 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 563 |
msgid "Spam"
|
| 564 |
msgstr ""
|
| 565 |
|
| 566 |
-
#: bbp-admin/bbp-topics.php:
|
| 567 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 568 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 569 |
msgid "Restore this item from the Trash"
|
| 570 |
msgstr ""
|
| 571 |
|
| 572 |
-
#: bbp-admin/bbp-topics.php:
|
| 573 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 574 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 575 |
msgid "Restore"
|
| 576 |
msgstr ""
|
| 577 |
|
| 578 |
-
#: bbp-admin/bbp-topics.php:
|
| 579 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 580 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 581 |
msgid "Move this item to the Trash"
|
| 582 |
msgstr ""
|
| 583 |
|
| 584 |
-
#: bbp-admin/bbp-topics.php:
|
| 585 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 586 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 587 |
msgid "Trash"
|
| 588 |
msgstr ""
|
| 589 |
|
| 590 |
-
#: bbp-admin/bbp-topics.php:
|
| 591 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 592 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 593 |
msgid "Delete this item permanently"
|
| 594 |
msgstr ""
|
| 595 |
|
| 596 |
-
#: bbp-admin/bbp-topics.php:
|
| 597 |
msgid "Delete Permanently"
|
| 598 |
msgstr ""
|
| 599 |
|
| 600 |
-
#: bbp-admin/bbp-topics.php:
|
| 601 |
msgid "Empty Spam"
|
| 602 |
msgstr ""
|
| 603 |
|
| 604 |
-
#: bbp-admin/bbp-topics.php:
|
| 605 |
msgid "In all forums"
|
| 606 |
msgstr ""
|
| 607 |
|
| 608 |
-
#: bbp-admin/bbp-topics.php:
|
| 609 |
msgid "Topic updated. <a href=\"%s\">View topic</a>"
|
| 610 |
msgstr ""
|
| 611 |
|
| 612 |
-
#: bbp-admin/bbp-topics.php:
|
| 613 |
#: bbp-admin/bbp-replies.php:826
|
| 614 |
msgid "Custom field updated."
|
| 615 |
msgstr ""
|
| 616 |
|
| 617 |
-
#: bbp-admin/bbp-topics.php:
|
| 618 |
#: bbp-admin/bbp-replies.php:829
|
| 619 |
msgid "Custom field deleted."
|
| 620 |
msgstr ""
|
| 621 |
|
| 622 |
-
#: bbp-admin/bbp-topics.php:
|
| 623 |
msgid "Topic updated."
|
| 624 |
msgstr ""
|
| 625 |
|
| 626 |
#. translators: %s: date and time of the revision
|
| 627 |
-
#: bbp-admin/bbp-topics.php:
|
| 628 |
msgid "Topic restored to revision from %s"
|
| 629 |
msgstr ""
|
| 630 |
|
| 631 |
-
#: bbp-admin/bbp-topics.php:
|
| 632 |
msgid "Topic created. <a href=\"%s\">View topic</a>"
|
| 633 |
msgstr ""
|
| 634 |
|
| 635 |
-
#: bbp-admin/bbp-topics.php:
|
| 636 |
msgid "Topic saved."
|
| 637 |
msgstr ""
|
| 638 |
|
| 639 |
-
#: bbp-admin/bbp-topics.php:
|
| 640 |
msgid "Topic submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 641 |
msgstr ""
|
| 642 |
|
| 643 |
-
#: bbp-admin/bbp-topics.php:
|
| 644 |
msgid ""
|
| 645 |
"Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
| 646 |
"\">Preview topic</a>"
|
| 647 |
msgstr ""
|
| 648 |
|
| 649 |
#. translators: Publish box date format, see http:php.net/date
|
| 650 |
-
#: bbp-admin/bbp-topics.php:
|
| 651 |
#: bbp-admin/bbp-replies.php:852
|
| 652 |
msgid "M j, Y @ G:i"
|
| 653 |
msgstr ""
|
| 654 |
|
| 655 |
-
#: bbp-admin/bbp-topics.php:
|
| 656 |
msgid "Topic draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 657 |
msgstr ""
|
| 658 |
|
|
@@ -715,7 +715,7 @@ msgid ""
|
|
| 715 |
msgstr ""
|
| 716 |
|
| 717 |
#: bbp-admin/bbp-settings.php:312
|
| 718 |
-
msgid "
|
| 719 |
msgstr ""
|
| 720 |
|
| 721 |
#: bbp-admin/bbp-settings.php:440
|
|
@@ -789,7 +789,7 @@ msgid ""
|
|
| 789 |
"settings to take effect."
|
| 790 |
msgstr ""
|
| 791 |
|
| 792 |
-
#: bbp-admin/bbp-settings.php:
|
| 793 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:22
|
| 794 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:45
|
| 795 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
|
@@ -797,64 +797,68 @@ msgstr ""
|
|
| 797 |
msgid "Posts"
|
| 798 |
msgstr ""
|
| 799 |
|
| 800 |
-
#: bbp-admin/bbp-settings.php:
|
| 801 |
msgid "Pages"
|
| 802 |
msgstr ""
|
| 803 |
|
| 804 |
-
#: bbp-admin/bbp-settings.php:
|
| 805 |
msgid "Revisions"
|
| 806 |
msgstr ""
|
| 807 |
|
| 808 |
-
#: bbp-admin/bbp-settings.php:
|
| 809 |
msgid "Attachments"
|
| 810 |
msgstr ""
|
| 811 |
|
| 812 |
-
#: bbp-admin/bbp-settings.php:
|
| 813 |
msgid "Menus"
|
| 814 |
msgstr ""
|
| 815 |
|
| 816 |
-
#: bbp-admin/bbp-settings.php:
|
| 817 |
msgid "Tag base"
|
| 818 |
msgstr ""
|
| 819 |
|
| 820 |
-
#: bbp-admin/bbp-settings.php:
|
| 821 |
msgid "Category base"
|
| 822 |
msgstr ""
|
| 823 |
|
| 824 |
-
#: bbp-admin/bbp-settings.php:
|
| 825 |
msgid "Forums base"
|
| 826 |
msgstr ""
|
| 827 |
|
| 828 |
-
#: bbp-admin/bbp-settings.php:
|
| 829 |
msgid "Topics base"
|
| 830 |
msgstr ""
|
| 831 |
|
| 832 |
-
#: bbp-admin/bbp-settings.php:
|
| 833 |
msgid "Forum slug"
|
| 834 |
msgstr ""
|
| 835 |
|
| 836 |
-
#: bbp-admin/bbp-settings.php:
|
| 837 |
msgid "Topic slug"
|
| 838 |
msgstr ""
|
| 839 |
|
| 840 |
-
#: bbp-admin/bbp-settings.php:
|
| 841 |
msgid "Reply slug"
|
| 842 |
msgstr ""
|
| 843 |
|
| 844 |
-
#: bbp-admin/bbp-settings.php:
|
| 845 |
msgid "User base"
|
| 846 |
msgstr ""
|
| 847 |
|
| 848 |
-
#: bbp-admin/bbp-settings.php:
|
| 849 |
msgid "View base"
|
| 850 |
msgstr ""
|
| 851 |
|
| 852 |
-
#: bbp-admin/bbp-settings.php:
|
| 853 |
msgid "Topic tag slug"
|
| 854 |
msgstr ""
|
| 855 |
|
| 856 |
-
#: bbp-admin/bbp-settings.php:
|
| 857 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 858 |
msgstr ""
|
| 859 |
|
| 860 |
#: bbp-admin/bbp-admin.php:177 bbp-admin/bbp-tools.php:67
|
|
@@ -862,8 +866,8 @@ msgid "Recount"
|
|
| 862 |
msgstr ""
|
| 863 |
|
| 864 |
#: bbp-admin/bbp-admin.php:180
|
| 865 |
-
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:40 bbpress.php:
|
| 866 |
-
#: bbpress.php:
|
| 867 |
msgid "Forums"
|
| 868 |
msgstr ""
|
| 869 |
|
|
@@ -1247,7 +1251,7 @@ msgid ""
|
|
| 1247 |
"We’re importing your bbPress standalone forums, topics and replies..."
|
| 1248 |
msgstr ""
|
| 1249 |
|
| 1250 |
-
#: bbp-admin/importers/bbpress.php:875 bbpress.php:
|
| 1251 |
msgid "No forums found"
|
| 1252 |
msgstr ""
|
| 1253 |
|
|
@@ -1282,10 +1286,10 @@ msgid "Total number of topics in the forum: %s"
|
|
| 1282 |
msgstr ""
|
| 1283 |
|
| 1284 |
#: bbp-admin/importers/bbpress.php:1002
|
| 1285 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1286 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1287 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 1288 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 1289 |
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:27
|
| 1290 |
msgid "Reply To: %s"
|
| 1291 |
msgstr ""
|
|
@@ -1461,47 +1465,47 @@ msgstr ""
|
|
| 1461 |
msgid "Forum Attributes"
|
| 1462 |
msgstr ""
|
| 1463 |
|
| 1464 |
-
#: bbp-admin/bbp-forums.php:
|
| 1465 |
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:15
|
| 1466 |
msgid "Creator"
|
| 1467 |
msgstr ""
|
| 1468 |
|
| 1469 |
-
#: bbp-admin/bbp-forums.php:
|
| 1470 |
msgid "No Topics"
|
| 1471 |
msgstr ""
|
| 1472 |
|
| 1473 |
-
#: bbp-admin/bbp-forums.php:
|
| 1474 |
msgid "Forum updated. <a href=\"%s\">View forum</a>"
|
| 1475 |
msgstr ""
|
| 1476 |
|
| 1477 |
-
#: bbp-admin/bbp-forums.php:
|
| 1478 |
msgid "Forum updated."
|
| 1479 |
msgstr ""
|
| 1480 |
|
| 1481 |
#. translators: %s: date and time of the revision
|
| 1482 |
-
#: bbp-admin/bbp-forums.php:
|
| 1483 |
msgid "Forum restored to revision from %s"
|
| 1484 |
msgstr ""
|
| 1485 |
|
| 1486 |
-
#: bbp-admin/bbp-forums.php:
|
| 1487 |
msgid "Forum created. <a href=\"%s\">View forum</a>"
|
| 1488 |
msgstr ""
|
| 1489 |
|
| 1490 |
-
#: bbp-admin/bbp-forums.php:
|
| 1491 |
msgid "Forum saved."
|
| 1492 |
msgstr ""
|
| 1493 |
|
| 1494 |
-
#: bbp-admin/bbp-forums.php:
|
| 1495 |
msgid "Forum submitted. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
| 1496 |
msgstr ""
|
| 1497 |
|
| 1498 |
-
#: bbp-admin/bbp-forums.php:
|
| 1499 |
msgid ""
|
| 1500 |
"Forum scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
| 1501 |
"\">Preview forum</a>"
|
| 1502 |
msgstr ""
|
| 1503 |
|
| 1504 |
-
#: bbp-admin/bbp-forums.php:
|
| 1505 |
msgid "Forum draft updated. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
| 1506 |
msgstr ""
|
| 1507 |
|
|
@@ -1512,19 +1516,19 @@ msgstr ""
|
|
| 1512 |
#: bbp-admin/bbp-metaboxes.php:67 bbp-admin/bbp-metaboxes.php:430
|
| 1513 |
#: bbp-admin/bbp-metaboxes.php:433 bbp-admin/bbp-replies.php:525
|
| 1514 |
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:18
|
| 1515 |
-
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17 bbpress.php:
|
| 1516 |
msgid "Topic"
|
| 1517 |
msgid_plural "Topics"
|
| 1518 |
msgstr[0] ""
|
| 1519 |
msgstr[1] ""
|
| 1520 |
|
| 1521 |
-
#: bbp-admin/bbp-metaboxes.php:84 bbpress.php:
|
| 1522 |
msgid "Reply"
|
| 1523 |
msgid_plural "Replies"
|
| 1524 |
msgstr[0] ""
|
| 1525 |
msgstr[1] ""
|
| 1526 |
|
| 1527 |
-
#: bbp-admin/bbp-metaboxes.php:101 bbpress.php:
|
| 1528 |
msgid "Topic Tag"
|
| 1529 |
msgid_plural "Topic Tags"
|
| 1530 |
msgstr[0] ""
|
|
@@ -1820,11 +1824,11 @@ msgstr ""
|
|
| 1820 |
msgid "(Mismatch)"
|
| 1821 |
msgstr ""
|
| 1822 |
|
| 1823 |
-
#: bbp-admin/bbp-replies.php:
|
| 1824 |
msgid "Mark the reply as not spam"
|
| 1825 |
msgstr ""
|
| 1826 |
|
| 1827 |
-
#: bbp-admin/bbp-replies.php:
|
| 1828 |
msgid "Mark this reply as spam"
|
| 1829 |
msgstr ""
|
| 1830 |
|
|
@@ -1863,81 +1867,81 @@ msgstr ""
|
|
| 1863 |
msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 1864 |
msgstr ""
|
| 1865 |
|
| 1866 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1867 |
msgid "No topics available"
|
| 1868 |
msgstr ""
|
| 1869 |
|
| 1870 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1871 |
msgid "No forums available"
|
| 1872 |
msgstr ""
|
| 1873 |
|
| 1874 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1875 |
msgid "None available"
|
| 1876 |
msgstr ""
|
| 1877 |
|
| 1878 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1879 |
msgid "Home"
|
| 1880 |
msgstr ""
|
| 1881 |
|
| 1882 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1883 |
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:18
|
| 1884 |
msgid "(Edit)"
|
| 1885 |
msgstr ""
|
| 1886 |
|
| 1887 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1888 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1889 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1890 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 1891 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 1892 |
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag.php:20
|
| 1893 |
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php:20
|
| 1894 |
msgid "Topic Tag: %s"
|
| 1895 |
msgstr ""
|
| 1896 |
|
| 1897 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1898 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 1899 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 1900 |
-
#: bbpress.php:
|
| 1901 |
msgid "Edit"
|
| 1902 |
msgstr ""
|
| 1903 |
|
| 1904 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1905 |
msgid "‹"
|
| 1906 |
msgstr ""
|
| 1907 |
|
| 1908 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1909 |
msgid "›"
|
| 1910 |
msgstr ""
|
| 1911 |
|
| 1912 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1913 |
msgid "Log Out"
|
| 1914 |
msgstr ""
|
| 1915 |
|
| 1916 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1917 |
msgid "Forum: %s"
|
| 1918 |
msgstr ""
|
| 1919 |
|
| 1920 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1921 |
msgid "Topic: %s"
|
| 1922 |
msgstr ""
|
| 1923 |
|
| 1924 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1925 |
msgid "Your Profile"
|
| 1926 |
msgstr ""
|
| 1927 |
|
| 1928 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1929 |
msgid "%s's Profile"
|
| 1930 |
msgstr ""
|
| 1931 |
|
| 1932 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1933 |
msgid "Edit Your Profile"
|
| 1934 |
msgstr ""
|
| 1935 |
|
| 1936 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1937 |
msgid "Edit %s's Profile"
|
| 1938 |
msgstr ""
|
| 1939 |
|
| 1940 |
-
#: bbp-includes/bbp-common-template.php:
|
| 1941 |
msgid "View: %s"
|
| 1942 |
msgstr ""
|
| 1943 |
|
|
@@ -1949,327 +1953,327 @@ msgstr ""
|
|
| 1949 |
msgid "Admin"
|
| 1950 |
msgstr ""
|
| 1951 |
|
| 1952 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1953 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 1954 |
msgid "Add this topic to your favorites"
|
| 1955 |
msgstr ""
|
| 1956 |
|
| 1957 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1958 |
msgid " (%?%)"
|
| 1959 |
msgstr ""
|
| 1960 |
|
| 1961 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1962 |
msgid "This topic is one of your %favorites% ["
|
| 1963 |
msgstr ""
|
| 1964 |
|
| 1965 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1966 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 1967 |
msgid "×"
|
| 1968 |
msgstr ""
|
| 1969 |
|
| 1970 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1971 |
msgid "]"
|
| 1972 |
msgstr ""
|
| 1973 |
|
| 1974 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1975 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 1976 |
msgid "Subscribe"
|
| 1977 |
msgstr ""
|
| 1978 |
|
| 1979 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1980 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 1981 |
msgid "Unsubscribe"
|
| 1982 |
msgstr ""
|
| 1983 |
|
| 1984 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1985 |
msgid "User updated."
|
| 1986 |
msgstr ""
|
| 1987 |
|
| 1988 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1989 |
msgid "You have super admin privileges."
|
| 1990 |
msgstr ""
|
| 1991 |
|
| 1992 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1993 |
msgid "This user has super admin privileges."
|
| 1994 |
msgstr ""
|
| 1995 |
|
| 1996 |
-
#: bbp-includes/bbp-user-template.php:
|
| 1997 |
msgid "— No role for this site —"
|
| 1998 |
msgstr ""
|
| 1999 |
|
| 2000 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2001 |
msgid "You are now logged out."
|
| 2002 |
msgstr ""
|
| 2003 |
|
| 2004 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2005 |
msgid "New user registration is currently not allowed."
|
| 2006 |
msgstr ""
|
| 2007 |
|
| 2008 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2009 |
msgid "Check your e-mail for the confirmation link."
|
| 2010 |
msgstr ""
|
| 2011 |
|
| 2012 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2013 |
msgid "Check your e-mail for your new password."
|
| 2014 |
msgstr ""
|
| 2015 |
|
| 2016 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2017 |
msgid "Registration complete. Please check your e-mail."
|
| 2018 |
msgstr ""
|
| 2019 |
|
| 2020 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2021 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2022 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2023 |
msgid "View %s's profile"
|
| 2024 |
msgstr ""
|
| 2025 |
|
| 2026 |
-
#: bbp-includes/bbp-user-template.php:
|
| 2027 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2028 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2029 |
msgid "Visit %s's website"
|
| 2030 |
msgstr ""
|
| 2031 |
|
| 2032 |
-
#: bbp-includes/bbp-extend-buddypress.php:
|
| 2033 |
msgid "New topic created"
|
| 2034 |
msgstr ""
|
| 2035 |
|
| 2036 |
-
#: bbp-includes/bbp-extend-buddypress.php:
|
| 2037 |
msgid "New reply created"
|
| 2038 |
msgstr ""
|
| 2039 |
|
| 2040 |
-
#: bbp-includes/bbp-extend-buddypress.php:
|
| 2041 |
msgid "%1$s started the topic %2$s in the forum %3$s"
|
| 2042 |
msgstr ""
|
| 2043 |
|
| 2044 |
-
#: bbp-includes/bbp-extend-buddypress.php:
|
| 2045 |
msgid "%1$s replied to the topic %2$s in the forum %3$s"
|
| 2046 |
msgstr ""
|
| 2047 |
|
| 2048 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 2049 |
msgid "Hands off, partner!"
|
| 2050 |
msgstr ""
|
| 2051 |
|
| 2052 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 2053 |
msgid ""
|
| 2054 |
"Conditional query tags do not work before the query is run. Before then, "
|
| 2055 |
"they always return false."
|
| 2056 |
msgstr ""
|
| 2057 |
|
| 2058 |
-
#: bbp-includes/bbp-core-compatibility.php:
|
| 2059 |
msgid "You do not have the permission to edit this user."
|
| 2060 |
msgstr ""
|
| 2061 |
|
| 2062 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2063 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
| 2064 |
msgstr ""
|
| 2065 |
|
| 2066 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2067 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
| 2068 |
msgstr ""
|
| 2069 |
|
| 2070 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2071 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2072 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2073 |
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
| 2074 |
msgstr ""
|
| 2075 |
|
| 2076 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2077 |
msgid "<strong>ERROR</strong>: Your reply needs a title."
|
| 2078 |
msgstr ""
|
| 2079 |
|
| 2080 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2081 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2082 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
| 2083 |
msgstr ""
|
| 2084 |
|
| 2085 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2086 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2087 |
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
| 2088 |
msgstr ""
|
| 2089 |
|
| 2090 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2091 |
msgid ""
|
| 2092 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
| 2093 |
"you’ve already said that!"
|
| 2094 |
msgstr ""
|
| 2095 |
|
| 2096 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2097 |
msgid "<strong>ERROR</strong>: Your reply cannot be created at this time."
|
| 2098 |
msgstr ""
|
| 2099 |
|
| 2100 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2101 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2102 |
msgid ""
|
| 2103 |
"<strong>ERROR</strong>: There was a problem adding the tags to the topic."
|
| 2104 |
msgstr ""
|
| 2105 |
|
| 2106 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2107 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
| 2108 |
msgstr ""
|
| 2109 |
|
| 2110 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2111 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
| 2112 |
msgstr ""
|
| 2113 |
|
| 2114 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2115 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
| 2116 |
msgstr ""
|
| 2117 |
|
| 2118 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2119 |
msgid ""
|
| 2120 |
"<strong>ERROR</strong>: This forum is a category. No topics or replies can "
|
| 2121 |
"be created in it."
|
| 2122 |
msgstr ""
|
| 2123 |
|
| 2124 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2125 |
msgid ""
|
| 2126 |
"<strong>ERROR</strong>: This forum has been closed to new topics and replies."
|
| 2127 |
msgstr ""
|
| 2128 |
|
| 2129 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2130 |
msgid ""
|
| 2131 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
| 2132 |
"capability to read or create new replies in it."
|
| 2133 |
msgstr ""
|
| 2134 |
|
| 2135 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2136 |
msgid ""
|
| 2137 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
| 2138 |
"capability to read or create new replies in it."
|
| 2139 |
msgstr ""
|
| 2140 |
|
| 2141 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2142 |
msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
|
| 2143 |
msgstr ""
|
| 2144 |
|
| 2145 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2146 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
|
| 2147 |
msgstr ""
|
| 2148 |
|
| 2149 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2150 |
msgid ""
|
| 2151 |
"<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
|
| 2152 |
msgstr ""
|
| 2153 |
|
| 2154 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2155 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
|
| 2156 |
msgstr ""
|
| 2157 |
|
| 2158 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2159 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
|
| 2160 |
msgstr ""
|
| 2161 |
|
| 2162 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2163 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
|
| 2164 |
msgstr ""
|
| 2165 |
|
| 2166 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2167 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
|
| 2168 |
msgstr ""
|
| 2169 |
|
| 2170 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2171 |
msgid "All Posts"
|
| 2172 |
msgstr ""
|
| 2173 |
|
| 2174 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2175 |
msgid "All Replies"
|
| 2176 |
msgstr ""
|
| 2177 |
|
| 2178 |
-
#: bbp-includes/bbp-reply-functions.php:
|
| 2179 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2180 |
msgid "Replies: %s"
|
| 2181 |
msgstr ""
|
| 2182 |
|
| 2183 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2184 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2185 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:89
|
| 2186 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:102
|
| 2187 |
msgid "Delete"
|
| 2188 |
msgstr ""
|
| 2189 |
|
| 2190 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2191 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2192 |
msgid "Are you sure you want to delete that permanently?"
|
| 2193 |
msgstr ""
|
| 2194 |
|
| 2195 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2196 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2197 |
msgid "Unspam"
|
| 2198 |
msgstr ""
|
| 2199 |
|
| 2200 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2201 |
msgid "Split"
|
| 2202 |
msgstr ""
|
| 2203 |
|
| 2204 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2205 |
msgid "Split the topic from this reply"
|
| 2206 |
msgstr ""
|
| 2207 |
|
| 2208 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2209 |
msgid "Viewing reply %1$s (of %2$s total)"
|
| 2210 |
msgstr ""
|
| 2211 |
|
| 2212 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2213 |
msgid "Viewing %1$s replies"
|
| 2214 |
msgstr ""
|
| 2215 |
|
| 2216 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2217 |
msgid "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
|
| 2218 |
msgstr ""
|
| 2219 |
|
| 2220 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2221 |
msgid "Viewing %1$s reply"
|
| 2222 |
msgstr ""
|
| 2223 |
|
| 2224 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2225 |
msgid "Viewing post %1$s (of %2$s total)"
|
| 2226 |
msgstr ""
|
| 2227 |
|
| 2228 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2229 |
msgid "Viewing %1$s posts"
|
| 2230 |
msgstr ""
|
| 2231 |
|
| 2232 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2233 |
msgid "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
|
| 2234 |
msgstr ""
|
| 2235 |
|
| 2236 |
-
#: bbp-includes/bbp-reply-template.php:
|
| 2237 |
msgid "Viewing %1$s post"
|
| 2238 |
msgstr ""
|
| 2239 |
|
| 2240 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2241 |
msgid "%s topic"
|
| 2242 |
msgid_plural "%s topics"
|
| 2243 |
msgstr[0] ""
|
| 2244 |
msgstr[1] ""
|
| 2245 |
|
| 2246 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2247 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2248 |
msgid " (+ %d hidden)"
|
| 2249 |
msgstr ""
|
| 2250 |
|
| 2251 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2252 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2253 |
msgid "%s reply"
|
| 2254 |
msgid_plural "%s replies"
|
| 2255 |
msgstr[0] ""
|
| 2256 |
msgstr[1] ""
|
| 2257 |
|
| 2258 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2259 |
msgid ""
|
| 2260 |
"This category contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
| 2261 |
msgstr ""
|
| 2262 |
|
| 2263 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2264 |
msgid ""
|
| 2265 |
"This forum contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
| 2266 |
msgstr ""
|
| 2267 |
|
| 2268 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2269 |
msgid "This category contains %1$s and %2$s."
|
| 2270 |
msgstr ""
|
| 2271 |
|
| 2272 |
-
#: bbp-includes/bbp-forum-template.php:
|
| 2273 |
msgid "This forum contains %1$s and %2$s."
|
| 2274 |
msgstr ""
|
| 2275 |
|
|
@@ -2314,8 +2318,8 @@ msgid "Lost Password"
|
|
| 2314 |
msgstr ""
|
| 2315 |
|
| 2316 |
#: bbp-includes/bbp-core-widgets.php:182 bbp-includes/bbp-core-widgets.php:308
|
| 2317 |
-
#: bbp-includes/bbp-core-widgets.php:450 bbp-includes/bbp-core-widgets.php:
|
| 2318 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2319 |
msgid "Title:"
|
| 2320 |
msgstr ""
|
| 2321 |
|
|
@@ -2359,56 +2363,56 @@ msgstr ""
|
|
| 2359 |
msgid "bbPress Topics List"
|
| 2360 |
msgstr ""
|
| 2361 |
|
| 2362 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2363 |
msgid "Maximum topics to show:"
|
| 2364 |
msgstr ""
|
| 2365 |
|
| 2366 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2367 |
msgid "Show post date:"
|
| 2368 |
msgstr ""
|
| 2369 |
|
| 2370 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2371 |
msgid "Popularity check:"
|
| 2372 |
msgstr ""
|
| 2373 |
|
| 2374 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2375 |
msgid ""
|
| 2376 |
"Number of topics back to check reply count to determine popularity. A number "
|
| 2377 |
"less than the maximum number of topics to show disables the check."
|
| 2378 |
msgstr ""
|
| 2379 |
|
| 2380 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2381 |
msgid "A list of bbPress recent replies."
|
| 2382 |
msgstr ""
|
| 2383 |
|
| 2384 |
-
#: bbp-includes/bbp-core-widgets.php:
|
| 2385 |
msgid "Maximum replies to show:"
|
| 2386 |
msgstr ""
|
| 2387 |
|
| 2388 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2389 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2390 |
msgid "Private: %s"
|
| 2391 |
msgstr ""
|
| 2392 |
|
| 2393 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2394 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2395 |
msgid "Spammed: %s"
|
| 2396 |
msgstr ""
|
| 2397 |
|
| 2398 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2399 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2400 |
msgid "Trashed: %s"
|
| 2401 |
msgstr ""
|
| 2402 |
|
| 2403 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2404 |
msgid "<strong>ERROR</strong>: Invalid author name submitted!"
|
| 2405 |
msgstr ""
|
| 2406 |
|
| 2407 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2408 |
msgid "<strong>ERROR</strong>: Invalid email address submitted!"
|
| 2409 |
msgstr ""
|
| 2410 |
|
| 2411 |
-
#: bbp-includes/bbp-common-functions.php:
|
| 2412 |
msgid ""
|
| 2413 |
"%1$s wrote:\n"
|
| 2414 |
"\n"
|
|
@@ -2416,265 +2420,265 @@ msgid ""
|
|
| 2416 |
"\n"
|
| 2417 |
"Post Link: %3$s\n"
|
| 2418 |
"\n"
|
| 2419 |
-
"You
|
| 2420 |
-
"topic
|
| 2421 |
msgstr ""
|
| 2422 |
|
| 2423 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2424 |
msgid ""
|
| 2425 |
"<strong>ERROR</strong>: You do not have permission to create new topics."
|
| 2426 |
msgstr ""
|
| 2427 |
|
| 2428 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2429 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2430 |
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
| 2431 |
msgstr ""
|
| 2432 |
|
| 2433 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2434 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2435 |
msgid "<strong>ERROR</strong>: Your topic cannot be empty."
|
| 2436 |
msgstr ""
|
| 2437 |
|
| 2438 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2439 |
msgid ""
|
| 2440 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
| 2441 |
"in this forum."
|
| 2442 |
msgstr ""
|
| 2443 |
|
| 2444 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2445 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2446 |
msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
|
| 2447 |
msgstr ""
|
| 2448 |
|
| 2449 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2450 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2451 |
msgid ""
|
| 2452 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
| 2453 |
"capability to read or create new topics in it."
|
| 2454 |
msgstr ""
|
| 2455 |
|
| 2456 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2457 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2458 |
msgid ""
|
| 2459 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
| 2460 |
"capability to read or create new topics in it."
|
| 2461 |
msgstr ""
|
| 2462 |
|
| 2463 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2464 |
msgid ""
|
| 2465 |
"<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
|
| 2466 |
"you’ve already said that!"
|
| 2467 |
msgstr ""
|
| 2468 |
|
| 2469 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2470 |
msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
|
| 2471 |
msgstr ""
|
| 2472 |
|
| 2473 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2474 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2475 |
msgid "<strong>ERROR</strong>: Topic ID not found."
|
| 2476 |
msgstr ""
|
| 2477 |
|
| 2478 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2479 |
msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
|
| 2480 |
msgstr ""
|
| 2481 |
|
| 2482 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2483 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
|
| 2484 |
msgstr ""
|
| 2485 |
|
| 2486 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2487 |
msgid ""
|
| 2488 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
| 2489 |
"in it."
|
| 2490 |
msgstr ""
|
| 2491 |
|
| 2492 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2493 |
msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
|
| 2494 |
msgstr ""
|
| 2495 |
|
| 2496 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2497 |
msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
|
| 2498 |
msgstr ""
|
| 2499 |
|
| 2500 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2501 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2502 |
msgid ""
|
| 2503 |
"<strong>ERROR</strong>: You do not have the permissions to edit the source "
|
| 2504 |
"topic."
|
| 2505 |
msgstr ""
|
| 2506 |
|
| 2507 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2508 |
msgid "<strong>ERROR</strong>: Destination topic ID not found."
|
| 2509 |
msgstr ""
|
| 2510 |
|
| 2511 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2512 |
msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
|
| 2513 |
msgstr ""
|
| 2514 |
|
| 2515 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2516 |
msgid ""
|
| 2517 |
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
| 2518 |
"destination topic."
|
| 2519 |
msgstr ""
|
| 2520 |
|
| 2521 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2522 |
msgid "<strong>ERROR</strong>: Reply ID to split the topic from not found!"
|
| 2523 |
msgstr ""
|
| 2524 |
|
| 2525 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2526 |
msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
|
| 2527 |
msgstr ""
|
| 2528 |
|
| 2529 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2530 |
msgid "<strong>ERROR</strong>: The topic you want to split was not found."
|
| 2531 |
msgstr ""
|
| 2532 |
|
| 2533 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2534 |
msgid "<strong>ERROR</strong>: You need to choose a valid split option."
|
| 2535 |
msgstr ""
|
| 2536 |
|
| 2537 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2538 |
msgid "<strong>ERROR</strong>: Destination topic ID not found!"
|
| 2539 |
msgstr ""
|
| 2540 |
|
| 2541 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2542 |
msgid "<strong>ERROR</strong>: The topic you want to split to was not found!"
|
| 2543 |
msgstr ""
|
| 2544 |
|
| 2545 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2546 |
msgid ""
|
| 2547 |
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
| 2548 |
"destination topic!"
|
| 2549 |
msgstr ""
|
| 2550 |
|
| 2551 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2552 |
msgid ""
|
| 2553 |
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
| 2554 |
"topic. Please try again."
|
| 2555 |
msgstr ""
|
| 2556 |
|
| 2557 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2558 |
msgid ""
|
| 2559 |
"<strong>ERROR</strong>: You do not have the permissions to create new "
|
| 2560 |
"topics. The reply could not be converted into a topic."
|
| 2561 |
msgstr ""
|
| 2562 |
|
| 2563 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2564 |
msgid ""
|
| 2565 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2566 |
"getting the tag: %s"
|
| 2567 |
msgstr ""
|
| 2568 |
|
| 2569 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2570 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2571 |
msgid ""
|
| 2572 |
"<strong>ERROR</strong>: You do not have the permissions to edit the topic "
|
| 2573 |
"tags."
|
| 2574 |
msgstr ""
|
| 2575 |
|
| 2576 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2577 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2578 |
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
| 2579 |
msgstr ""
|
| 2580 |
|
| 2581 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2582 |
msgid ""
|
| 2583 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2584 |
"updating the tag: %s"
|
| 2585 |
msgstr ""
|
| 2586 |
|
| 2587 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2588 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2589 |
msgid ""
|
| 2590 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2591 |
"merging the tags: %s"
|
| 2592 |
msgstr ""
|
| 2593 |
|
| 2594 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2595 |
msgid ""
|
| 2596 |
"<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
| 2597 |
msgstr ""
|
| 2598 |
|
| 2599 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2600 |
msgid ""
|
| 2601 |
"<strong>ERROR</strong>: You do not have the permissions to delete the topic "
|
| 2602 |
"tags."
|
| 2603 |
msgstr ""
|
| 2604 |
|
| 2605 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2606 |
msgid ""
|
| 2607 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2608 |
"deleting the tag: %s"
|
| 2609 |
msgstr ""
|
| 2610 |
|
| 2611 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2612 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that."
|
| 2613 |
msgstr ""
|
| 2614 |
|
| 2615 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2616 |
msgid "<strong>ERROR</strong>: There was a problem closing the topic."
|
| 2617 |
msgstr ""
|
| 2618 |
|
| 2619 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2620 |
msgid "<strong>ERROR</strong>: There was a problem opening the topic."
|
| 2621 |
msgstr ""
|
| 2622 |
|
| 2623 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2624 |
msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
|
| 2625 |
msgstr ""
|
| 2626 |
|
| 2627 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2628 |
msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
|
| 2629 |
msgstr ""
|
| 2630 |
|
| 2631 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2632 |
msgid ""
|
| 2633 |
"<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
| 2634 |
msgstr ""
|
| 2635 |
|
| 2636 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2637 |
msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
|
| 2638 |
msgstr ""
|
| 2639 |
|
| 2640 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2641 |
msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
|
| 2642 |
msgstr ""
|
| 2643 |
|
| 2644 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2645 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
|
| 2646 |
msgstr ""
|
| 2647 |
|
| 2648 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2649 |
msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
|
| 2650 |
msgstr ""
|
| 2651 |
|
| 2652 |
-
#: bbp-includes/bbp-topic-functions.php:
|
| 2653 |
msgid "All Topics"
|
| 2654 |
msgstr ""
|
| 2655 |
|
| 2656 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2657 |
msgid "%1$s reported this %2$s as spam"
|
| 2658 |
msgstr ""
|
| 2659 |
|
| 2660 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2661 |
msgid "%1$s reported this %2$s as not spam"
|
| 2662 |
msgstr ""
|
| 2663 |
|
| 2664 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2665 |
msgid "Akismet caught this post as spam"
|
| 2666 |
msgstr ""
|
| 2667 |
|
| 2668 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2669 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2670 |
msgid "Post status was changed to %s"
|
| 2671 |
msgstr ""
|
| 2672 |
|
| 2673 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2674 |
msgid "Akismet cleared this post"
|
| 2675 |
msgstr ""
|
| 2676 |
|
| 2677 |
-
#: bbp-includes/bbp-extend-akismet.php:
|
| 2678 |
msgid ""
|
| 2679 |
"Akismet was unable to check this post (response: %s), will automatically "
|
| 2680 |
"retry again later."
|
|
@@ -2723,80 +2727,80 @@ msgid ""
|
|
| 2723 |
"What are you doing here? You do not have the permission to edit this user."
|
| 2724 |
msgstr ""
|
| 2725 |
|
| 2726 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2727 |
msgid "Tagged:"
|
| 2728 |
msgstr ""
|
| 2729 |
|
| 2730 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2731 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:59
|
| 2732 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:73
|
| 2733 |
msgid "Merge"
|
| 2734 |
msgstr ""
|
| 2735 |
|
| 2736 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2737 |
msgid "Viewing topic %1$s (of %2$s total)"
|
| 2738 |
msgstr ""
|
| 2739 |
|
| 2740 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2741 |
msgid "Viewing %1$s topics"
|
| 2742 |
msgstr ""
|
| 2743 |
|
| 2744 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2745 |
msgid "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
| 2746 |
msgstr ""
|
| 2747 |
|
| 2748 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2749 |
msgid "Viewing %1$s topic"
|
| 2750 |
msgstr ""
|
| 2751 |
|
| 2752 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2753 |
msgid "This topic is marked as spam."
|
| 2754 |
msgstr ""
|
| 2755 |
|
| 2756 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2757 |
msgid "This topic is in the trash."
|
| 2758 |
msgstr ""
|
| 2759 |
|
| 2760 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2761 |
msgid "Normal"
|
| 2762 |
msgstr ""
|
| 2763 |
|
| 2764 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2765 |
msgid "Sticky"
|
| 2766 |
msgstr ""
|
| 2767 |
|
| 2768 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2769 |
msgid "Super Sticky"
|
| 2770 |
msgstr ""
|
| 2771 |
|
| 2772 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2773 |
msgid "%s voice"
|
| 2774 |
msgid_plural "%s voices"
|
| 2775 |
msgstr[0] ""
|
| 2776 |
msgstr[1] ""
|
| 2777 |
|
| 2778 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2779 |
msgid ""
|
| 2780 |
"This topic has %1$s, contains %2$s, and was last updated by %3$s %4$s ago."
|
| 2781 |
msgstr ""
|
| 2782 |
|
| 2783 |
-
#: bbp-includes/bbp-topic-template.php:
|
| 2784 |
msgid "This topic has %1$s, contains %2$s."
|
| 2785 |
msgstr ""
|
| 2786 |
|
| 2787 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 2788 |
msgid "favorites"
|
| 2789 |
msgstr ""
|
| 2790 |
|
| 2791 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 2792 |
msgid "?"
|
| 2793 |
msgstr ""
|
| 2794 |
|
| 2795 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 2796 |
msgid "This topic is one of your %favLinkYes% [%favDel%]"
|
| 2797 |
msgstr ""
|
| 2798 |
|
| 2799 |
-
#: bbp-themes/bbp-twentyten/functions.php:
|
| 2800 |
msgid "%favAdd% (%favLinkNo%)"
|
| 2801 |
msgstr ""
|
| 2802 |
|
|
@@ -2817,7 +2821,7 @@ msgstr ""
|
|
| 2817 |
msgid "Registered Users"
|
| 2818 |
msgstr ""
|
| 2819 |
|
| 2820 |
-
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:55 bbpress.php:
|
| 2821 |
msgid "Topic Tags"
|
| 2822 |
msgstr ""
|
| 2823 |
|
|
@@ -3299,7 +3303,7 @@ msgstr ""
|
|
| 3299 |
msgid "Create New Topic in “%s”"
|
| 3300 |
msgstr ""
|
| 3301 |
|
| 3302 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:41 bbpress.php:
|
| 3303 |
msgid "Create New Topic"
|
| 3304 |
msgstr ""
|
| 3305 |
|
|
@@ -3321,7 +3325,7 @@ msgstr ""
|
|
| 3321 |
msgid "Topic Tags:"
|
| 3322 |
msgstr ""
|
| 3323 |
|
| 3324 |
-
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:111 bbpress.php:
|
| 3325 |
msgid "Forum:"
|
| 3326 |
msgstr ""
|
| 3327 |
|
|
@@ -3365,187 +3369,187 @@ msgstr ""
|
|
| 3365 |
msgid "Reset my password"
|
| 3366 |
msgstr ""
|
| 3367 |
|
| 3368 |
-
#: bbpress.php:
|
| 3369 |
msgid "All Forums"
|
| 3370 |
msgstr ""
|
| 3371 |
|
| 3372 |
-
#: bbpress.php:
|
| 3373 |
msgid "New Forum"
|
| 3374 |
msgstr ""
|
| 3375 |
|
| 3376 |
-
#: bbpress.php:
|
| 3377 |
msgid "Create New Forum"
|
| 3378 |
msgstr ""
|
| 3379 |
|
| 3380 |
-
#: bbpress.php:
|
| 3381 |
msgid "Edit Forum"
|
| 3382 |
msgstr ""
|
| 3383 |
|
| 3384 |
-
#: bbpress.php:
|
| 3385 |
msgid "View Forum"
|
| 3386 |
msgstr ""
|
| 3387 |
|
| 3388 |
-
#: bbpress.php:
|
| 3389 |
msgid "Search Forums"
|
| 3390 |
msgstr ""
|
| 3391 |
|
| 3392 |
-
#: bbpress.php:
|
| 3393 |
msgid "No forums found in Trash"
|
| 3394 |
msgstr ""
|
| 3395 |
|
| 3396 |
-
#: bbpress.php:
|
| 3397 |
msgid "Parent Forum:"
|
| 3398 |
msgstr ""
|
| 3399 |
|
| 3400 |
-
#: bbpress.php:
|
| 3401 |
msgid "bbPress Forums"
|
| 3402 |
msgstr ""
|
| 3403 |
|
| 3404 |
-
#: bbpress.php:
|
| 3405 |
msgid "New Topic"
|
| 3406 |
msgstr ""
|
| 3407 |
|
| 3408 |
-
#: bbpress.php:
|
| 3409 |
msgid "Edit Topic"
|
| 3410 |
msgstr ""
|
| 3411 |
|
| 3412 |
-
#: bbpress.php:
|
| 3413 |
msgid "View Topic"
|
| 3414 |
msgstr ""
|
| 3415 |
|
| 3416 |
-
#: bbpress.php:
|
| 3417 |
msgid "Search Topics"
|
| 3418 |
msgstr ""
|
| 3419 |
|
| 3420 |
-
#: bbpress.php:
|
| 3421 |
msgid "No topics found"
|
| 3422 |
msgstr ""
|
| 3423 |
|
| 3424 |
-
#: bbpress.php:
|
| 3425 |
msgid "No topics found in Trash"
|
| 3426 |
msgstr ""
|
| 3427 |
|
| 3428 |
-
#: bbpress.php:
|
| 3429 |
msgid "bbPress Topics"
|
| 3430 |
msgstr ""
|
| 3431 |
|
| 3432 |
-
#: bbpress.php:
|
| 3433 |
msgid "New Reply"
|
| 3434 |
msgstr ""
|
| 3435 |
|
| 3436 |
-
#: bbpress.php:
|
| 3437 |
msgid "Create New Reply"
|
| 3438 |
msgstr ""
|
| 3439 |
|
| 3440 |
-
#: bbpress.php:
|
| 3441 |
msgid "Edit Reply"
|
| 3442 |
msgstr ""
|
| 3443 |
|
| 3444 |
-
#: bbpress.php:
|
| 3445 |
msgid "View Reply"
|
| 3446 |
msgstr ""
|
| 3447 |
|
| 3448 |
-
#: bbpress.php:
|
| 3449 |
msgid "Search Replies"
|
| 3450 |
msgstr ""
|
| 3451 |
|
| 3452 |
-
#: bbpress.php:
|
| 3453 |
msgid "No replies found"
|
| 3454 |
msgstr ""
|
| 3455 |
|
| 3456 |
-
#: bbpress.php:
|
| 3457 |
msgid "No replies found in Trash"
|
| 3458 |
msgstr ""
|
| 3459 |
|
| 3460 |
-
#: bbpress.php:
|
| 3461 |
msgid "Topic:"
|
| 3462 |
msgstr ""
|
| 3463 |
|
| 3464 |
-
#: bbpress.php:
|
| 3465 |
msgid "bbPress Replies"
|
| 3466 |
msgstr ""
|
| 3467 |
|
| 3468 |
-
#: bbpress.php:
|
| 3469 |
msgctxt "post"
|
| 3470 |
msgid "Closed"
|
| 3471 |
msgstr ""
|
| 3472 |
|
| 3473 |
-
#: bbpress.php:
|
| 3474 |
msgctxt "bbpress"
|
| 3475 |
msgid "Closed <span class=\"count\">(%s)</span>"
|
| 3476 |
msgid_plural "Closed <span class=\"count\">(%s)</span>"
|
| 3477 |
msgstr[0] ""
|
| 3478 |
msgstr[1] ""
|
| 3479 |
|
| 3480 |
-
#: bbpress.php:
|
| 3481 |
msgctxt "post"
|
| 3482 |
msgid "Spam"
|
| 3483 |
msgstr ""
|
| 3484 |
|
| 3485 |
-
#: bbpress.php:
|
| 3486 |
msgctxt "bbpress"
|
| 3487 |
msgid "Spam <span class=\"count\">(%s)</span>"
|
| 3488 |
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
| 3489 |
msgstr[0] ""
|
| 3490 |
msgstr[1] ""
|
| 3491 |
|
| 3492 |
-
#: bbpress.php:
|
| 3493 |
msgctxt "post"
|
| 3494 |
msgid "Orphan"
|
| 3495 |
msgstr ""
|
| 3496 |
|
| 3497 |
-
#: bbpress.php:
|
| 3498 |
msgctxt "bbpress"
|
| 3499 |
msgid "Orphan <span class=\"count\">(%s)</span>"
|
| 3500 |
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
| 3501 |
msgstr[0] ""
|
| 3502 |
msgstr[1] ""
|
| 3503 |
|
| 3504 |
-
#: bbpress.php:
|
| 3505 |
msgctxt "post"
|
| 3506 |
msgid "Hidden"
|
| 3507 |
msgstr ""
|
| 3508 |
|
| 3509 |
-
#: bbpress.php:
|
| 3510 |
msgctxt "bbpress"
|
| 3511 |
msgid "Hidden <span class=\"count\">(%s)</span>"
|
| 3512 |
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
| 3513 |
msgstr[0] ""
|
| 3514 |
msgstr[1] ""
|
| 3515 |
|
| 3516 |
-
#: bbpress.php:
|
| 3517 |
msgid "Search Tags"
|
| 3518 |
msgstr ""
|
| 3519 |
|
| 3520 |
-
#: bbpress.php:
|
| 3521 |
msgid "Popular Tags"
|
| 3522 |
msgstr ""
|
| 3523 |
|
| 3524 |
-
#: bbpress.php:
|
| 3525 |
msgid "All Tags"
|
| 3526 |
msgstr ""
|
| 3527 |
|
| 3528 |
-
#: bbpress.php:
|
| 3529 |
msgid "Edit Tag"
|
| 3530 |
msgstr ""
|
| 3531 |
|
| 3532 |
-
#: bbpress.php:
|
| 3533 |
msgid "Update Tag"
|
| 3534 |
msgstr ""
|
| 3535 |
|
| 3536 |
-
#: bbpress.php:
|
| 3537 |
msgid "Add New Tag"
|
| 3538 |
msgstr ""
|
| 3539 |
|
| 3540 |
-
#: bbpress.php:
|
| 3541 |
msgid "New Tag Name"
|
| 3542 |
msgstr ""
|
| 3543 |
|
| 3544 |
-
#: bbpress.php:
|
| 3545 |
msgid "View Topic Tag"
|
| 3546 |
msgstr ""
|
| 3547 |
|
| 3548 |
-
#: bbpress.php:
|
| 3549 |
msgid "Topics with no replies"
|
| 3550 |
msgstr ""
|
| 3551 |
|
|
@@ -3553,9 +3557,9 @@ msgstr ""
|
|
| 3553 |
msgid "bbPress"
|
| 3554 |
msgstr ""
|
| 3555 |
|
| 3556 |
-
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-
|
| 3557 |
#. Plugin URI of the plugin/theme
|
| 3558 |
-
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-
|
| 3559 |
#. Author URI of the plugin/theme
|
| 3560 |
msgid "http://bbpress.org"
|
| 3561 |
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-5\n"
|
| 6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/bbpress\n"
|
| 7 |
+
"POT-Creation-Date: 2011-09-12 06:45:41+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 420 |
msgstr ""
|
| 421 |
|
| 422 |
#: bbp-admin/bbp-topics.php:591 bbp-admin/bbp-admin.php:236
|
| 423 |
+
#: bbp-admin/bbp-admin.php:249 bbp-admin/bbp-forums.php:390
|
| 424 |
+
#: bbp-includes/bbp-forum-template.php:1771
|
| 425 |
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:45
|
| 426 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:19 bbpress.php:632
|
| 427 |
+
#: bbpress.php:633
|
| 428 |
msgid "Topics"
|
| 429 |
msgstr ""
|
| 430 |
|
| 431 |
+
#: bbp-admin/bbp-topics.php:592 bbp-admin/bbp-forums.php:389
|
| 432 |
#: bbp-admin/bbp-metaboxes.php:50 bbp-admin/bbp-metaboxes.php:254
|
| 433 |
#: bbp-admin/bbp-metaboxes.php:362 bbp-admin/bbp-metaboxes.php:365
|
| 434 |
#: bbp-admin/bbp-metaboxes.php:405 bbp-admin/bbp-metaboxes.php:408
|
| 435 |
#: bbp-admin/bbp-replies.php:524
|
| 436 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:18 bbpress.php:577
|
| 437 |
msgid "Forum"
|
| 438 |
msgstr ""
|
| 439 |
|
| 440 |
#: bbp-admin/bbp-topics.php:593 bbp-admin/bbp-admin.php:240
|
| 441 |
+
#: bbp-admin/bbp-admin.php:253 bbp-admin/bbp-forums.php:391
|
| 442 |
+
#: bbp-includes/bbp-core-compatibility.php:939
|
| 443 |
+
#: bbp-includes/bbp-forum-template.php:1835
|
| 444 |
#: bbp-themes/bbp-twentyten/single-reply.php:32
|
| 445 |
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:50
|
| 446 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:30
|
| 447 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:49
|
| 448 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
| 449 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:19 bbpress.php:689
|
| 450 |
+
#: bbpress.php:690
|
| 451 |
msgid "Replies"
|
| 452 |
msgstr ""
|
| 453 |
|
| 463 |
msgid "Author"
|
| 464 |
msgstr ""
|
| 465 |
|
| 466 |
+
#: bbp-admin/bbp-topics.php:596 bbp-admin/bbp-forums.php:393
|
| 467 |
#: bbp-admin/bbp-replies.php:527
|
| 468 |
msgid "Created"
|
| 469 |
msgstr ""
|
| 470 |
|
| 471 |
+
#: bbp-admin/bbp-topics.php:597 bbp-admin/bbp-forums.php:394
|
| 472 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:21
|
| 473 |
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:20
|
| 474 |
msgid "Freshness"
|
| 483 |
msgid "(No Forum)"
|
| 484 |
msgstr ""
|
| 485 |
|
| 486 |
+
#: bbp-admin/bbp-topics.php:672 bbp-admin/bbp-forums.php:428
|
| 487 |
#: bbp-admin/bbp-replies.php:629
|
| 488 |
msgid "%1$s <br /> %2$s"
|
| 489 |
msgstr ""
|
| 490 |
|
| 491 |
+
#: bbp-admin/bbp-topics.php:682 bbp-admin/bbp-forums.php:437
|
| 492 |
msgid "%s ago"
|
| 493 |
msgstr ""
|
| 494 |
|
| 495 |
+
#: bbp-admin/bbp-topics.php:684 bbp-includes/bbp-topic-template.php:1657
|
| 496 |
msgid "No Replies"
|
| 497 |
msgstr ""
|
| 498 |
|
| 499 |
+
#: bbp-admin/bbp-topics.php:729 bbp-admin/bbp-replies.php:673
|
| 500 |
msgid "View “%s”"
|
| 501 |
msgstr ""
|
| 502 |
|
| 503 |
+
#: bbp-admin/bbp-topics.php:729 bbp-admin/bbp-replies.php:673
|
| 504 |
msgid "View"
|
| 505 |
msgstr ""
|
| 506 |
|
| 507 |
+
#: bbp-admin/bbp-topics.php:739
|
| 508 |
msgid "Close this topic"
|
| 509 |
msgstr ""
|
| 510 |
|
| 511 |
+
#: bbp-admin/bbp-topics.php:739 bbp-includes/bbp-topic-template.php:2253
|
| 512 |
msgid "Close"
|
| 513 |
msgstr ""
|
| 514 |
|
| 515 |
+
#: bbp-admin/bbp-topics.php:741
|
| 516 |
msgid "Open this topic"
|
| 517 |
msgstr ""
|
| 518 |
|
| 519 |
+
#: bbp-admin/bbp-topics.php:741 bbp-admin/bbp-metaboxes.php:267
|
| 520 |
+
#: bbp-includes/bbp-topic-template.php:2254
|
| 521 |
msgid "Open"
|
| 522 |
msgstr ""
|
| 523 |
|
| 524 |
+
#: bbp-admin/bbp-topics.php:750
|
| 525 |
msgid "Unstick this topic"
|
| 526 |
msgstr ""
|
| 527 |
|
| 528 |
+
#: bbp-admin/bbp-topics.php:750 bbp-includes/bbp-topic-template.php:2315
|
| 529 |
msgid "Unstick"
|
| 530 |
msgstr ""
|
| 531 |
|
| 532 |
+
#: bbp-admin/bbp-topics.php:753
|
| 533 |
msgid "Stick this topic to its forum"
|
| 534 |
msgstr ""
|
| 535 |
|
| 536 |
+
#: bbp-admin/bbp-topics.php:753 bbp-includes/bbp-topic-template.php:2314
|
| 537 |
msgid "Stick"
|
| 538 |
msgstr ""
|
| 539 |
|
| 540 |
+
#: bbp-admin/bbp-topics.php:753
|
| 541 |
msgid "Stick this topic to front"
|
| 542 |
msgstr ""
|
| 543 |
|
| 544 |
+
#: bbp-admin/bbp-topics.php:753 bbp-includes/bbp-topic-template.php:2316
|
| 545 |
msgid "to front"
|
| 546 |
msgstr ""
|
| 547 |
|
| 548 |
+
#: bbp-admin/bbp-topics.php:760
|
| 549 |
msgid "Mark the topic as not spam"
|
| 550 |
msgstr ""
|
| 551 |
|
| 552 |
+
#: bbp-admin/bbp-topics.php:760 bbp-admin/bbp-replies.php:684
|
| 553 |
msgid "Not spam"
|
| 554 |
msgstr ""
|
| 555 |
|
| 556 |
+
#: bbp-admin/bbp-topics.php:762
|
| 557 |
msgid "Mark this topic as spam"
|
| 558 |
msgstr ""
|
| 559 |
|
| 560 |
+
#: bbp-admin/bbp-topics.php:762 bbp-admin/bbp-replies.php:686
|
| 561 |
+
#: bbp-includes/bbp-reply-template.php:1613
|
| 562 |
+
#: bbp-includes/bbp-topic-template.php:2440
|
| 563 |
msgid "Spam"
|
| 564 |
msgstr ""
|
| 565 |
|
| 566 |
+
#: bbp-admin/bbp-topics.php:770 bbp-admin/bbp-replies.php:695
|
| 567 |
+
#: bbp-includes/bbp-reply-template.php:1557
|
| 568 |
+
#: bbp-includes/bbp-topic-template.php:2197
|
| 569 |
msgid "Restore this item from the Trash"
|
| 570 |
msgstr ""
|
| 571 |
|
| 572 |
+
#: bbp-admin/bbp-topics.php:770 bbp-admin/bbp-replies.php:695
|
| 573 |
+
#: bbp-includes/bbp-reply-template.php:1542
|
| 574 |
+
#: bbp-includes/bbp-topic-template.php:2183
|
| 575 |
msgid "Restore"
|
| 576 |
msgstr ""
|
| 577 |
|
| 578 |
+
#: bbp-admin/bbp-topics.php:772 bbp-admin/bbp-replies.php:697
|
| 579 |
+
#: bbp-includes/bbp-reply-template.php:1559
|
| 580 |
+
#: bbp-includes/bbp-topic-template.php:2199
|
| 581 |
msgid "Move this item to the Trash"
|
| 582 |
msgstr ""
|
| 583 |
|
| 584 |
+
#: bbp-admin/bbp-topics.php:772 bbp-admin/bbp-replies.php:697
|
| 585 |
+
#: bbp-includes/bbp-reply-template.php:1541
|
| 586 |
+
#: bbp-includes/bbp-topic-template.php:2182
|
| 587 |
msgid "Trash"
|
| 588 |
msgstr ""
|
| 589 |
|
| 590 |
+
#: bbp-admin/bbp-topics.php:776 bbp-admin/bbp-replies.php:701
|
| 591 |
+
#: bbp-includes/bbp-reply-template.php:1563
|
| 592 |
+
#: bbp-includes/bbp-topic-template.php:2203
|
| 593 |
msgid "Delete this item permanently"
|
| 594 |
msgstr ""
|
| 595 |
|
| 596 |
+
#: bbp-admin/bbp-topics.php:776 bbp-admin/bbp-replies.php:701
|
| 597 |
msgid "Delete Permanently"
|
| 598 |
msgstr ""
|
| 599 |
|
| 600 |
+
#: bbp-admin/bbp-topics.php:811 bbp-admin/bbp-replies.php:736
|
| 601 |
msgid "Empty Spam"
|
| 602 |
msgstr ""
|
| 603 |
|
| 604 |
+
#: bbp-admin/bbp-topics.php:821 bbp-admin/bbp-replies.php:746
|
| 605 |
msgid "In all forums"
|
| 606 |
msgstr ""
|
| 607 |
|
| 608 |
+
#: bbp-admin/bbp-topics.php:898
|
| 609 |
msgid "Topic updated. <a href=\"%s\">View topic</a>"
|
| 610 |
msgstr ""
|
| 611 |
|
| 612 |
+
#: bbp-admin/bbp-topics.php:901 bbp-admin/bbp-forums.php:507
|
| 613 |
#: bbp-admin/bbp-replies.php:826
|
| 614 |
msgid "Custom field updated."
|
| 615 |
msgstr ""
|
| 616 |
|
| 617 |
+
#: bbp-admin/bbp-topics.php:904 bbp-admin/bbp-forums.php:510
|
| 618 |
#: bbp-admin/bbp-replies.php:829
|
| 619 |
msgid "Custom field deleted."
|
| 620 |
msgstr ""
|
| 621 |
|
| 622 |
+
#: bbp-admin/bbp-topics.php:907
|
| 623 |
msgid "Topic updated."
|
| 624 |
msgstr ""
|
| 625 |
|
| 626 |
#. translators: %s: date and time of the revision
|
| 627 |
+
#: bbp-admin/bbp-topics.php:912
|
| 628 |
msgid "Topic restored to revision from %s"
|
| 629 |
msgstr ""
|
| 630 |
|
| 631 |
+
#: bbp-admin/bbp-topics.php:916
|
| 632 |
msgid "Topic created. <a href=\"%s\">View topic</a>"
|
| 633 |
msgstr ""
|
| 634 |
|
| 635 |
+
#: bbp-admin/bbp-topics.php:919
|
| 636 |
msgid "Topic saved."
|
| 637 |
msgstr ""
|
| 638 |
|
| 639 |
+
#: bbp-admin/bbp-topics.php:922
|
| 640 |
msgid "Topic submitted. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 641 |
msgstr ""
|
| 642 |
|
| 643 |
+
#: bbp-admin/bbp-topics.php:925
|
| 644 |
msgid ""
|
| 645 |
"Topic scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
| 646 |
"\">Preview topic</a>"
|
| 647 |
msgstr ""
|
| 648 |
|
| 649 |
#. translators: Publish box date format, see http:php.net/date
|
| 650 |
+
#: bbp-admin/bbp-topics.php:927 bbp-admin/bbp-forums.php:533
|
| 651 |
#: bbp-admin/bbp-replies.php:852
|
| 652 |
msgid "M j, Y @ G:i"
|
| 653 |
msgstr ""
|
| 654 |
|
| 655 |
+
#: bbp-admin/bbp-topics.php:932
|
| 656 |
msgid "Topic draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 657 |
msgstr ""
|
| 658 |
|
| 715 |
msgstr ""
|
| 716 |
|
| 717 |
#: bbp-admin/bbp-settings.php:312
|
| 718 |
+
msgid "Prefix your forum area with the Forum Base slug (Recommended)"
|
| 719 |
msgstr ""
|
| 720 |
|
| 721 |
#: bbp-admin/bbp-settings.php:440
|
| 789 |
"settings to take effect."
|
| 790 |
msgstr ""
|
| 791 |
|
| 792 |
+
#: bbp-admin/bbp-settings.php:570
|
| 793 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:22
|
| 794 |
#: bbp-themes/bbp-twentyten/bbpress/loop-replies.php:45
|
| 795 |
#: bbp-themes/bbp-twentyten/bbpress/loop-forums.php:20
|
| 797 |
msgid "Posts"
|
| 798 |
msgstr ""
|
| 799 |
|
| 800 |
+
#: bbp-admin/bbp-settings.php:571
|
| 801 |
msgid "Pages"
|
| 802 |
msgstr ""
|
| 803 |
|
| 804 |
+
#: bbp-admin/bbp-settings.php:572
|
| 805 |
msgid "Revisions"
|
| 806 |
msgstr ""
|
| 807 |
|
| 808 |
+
#: bbp-admin/bbp-settings.php:573
|
| 809 |
msgid "Attachments"
|
| 810 |
msgstr ""
|
| 811 |
|
| 812 |
+
#: bbp-admin/bbp-settings.php:574
|
| 813 |
msgid "Menus"
|
| 814 |
msgstr ""
|
| 815 |
|
| 816 |
+
#: bbp-admin/bbp-settings.php:577
|
| 817 |
msgid "Tag base"
|
| 818 |
msgstr ""
|
| 819 |
|
| 820 |
+
#: bbp-admin/bbp-settings.php:580
|
| 821 |
msgid "Category base"
|
| 822 |
msgstr ""
|
| 823 |
|
| 824 |
+
#: bbp-admin/bbp-settings.php:585 bbp-admin/bbp-admin.php:262
|
| 825 |
msgid "Forums base"
|
| 826 |
msgstr ""
|
| 827 |
|
| 828 |
+
#: bbp-admin/bbp-settings.php:588 bbp-admin/bbp-admin.php:266
|
| 829 |
msgid "Topics base"
|
| 830 |
msgstr ""
|
| 831 |
|
| 832 |
+
#: bbp-admin/bbp-settings.php:591 bbp-admin/bbp-admin.php:279
|
| 833 |
msgid "Forum slug"
|
| 834 |
msgstr ""
|
| 835 |
|
| 836 |
+
#: bbp-admin/bbp-settings.php:594 bbp-admin/bbp-admin.php:283
|
| 837 |
msgid "Topic slug"
|
| 838 |
msgstr ""
|
| 839 |
|
| 840 |
+
#: bbp-admin/bbp-settings.php:597 bbp-admin/bbp-admin.php:291
|
| 841 |
msgid "Reply slug"
|
| 842 |
msgstr ""
|
| 843 |
|
| 844 |
+
#: bbp-admin/bbp-settings.php:600 bbp-admin/bbp-admin.php:297
|
| 845 |
msgid "User base"
|
| 846 |
msgstr ""
|
| 847 |
|
| 848 |
+
#: bbp-admin/bbp-settings.php:603 bbp-admin/bbp-admin.php:301
|
| 849 |
msgid "View base"
|
| 850 |
msgstr ""
|
| 851 |
|
| 852 |
+
#: bbp-admin/bbp-settings.php:606 bbp-admin/bbp-admin.php:287
|
| 853 |
msgid "Topic tag slug"
|
| 854 |
msgstr ""
|
| 855 |
|
| 856 |
+
#: bbp-admin/bbp-settings.php:618
|
| 857 |
+
msgid "%s page"
|
| 858 |
+
msgstr ""
|
| 859 |
+
|
| 860 |
+
#: bbp-admin/bbp-settings.php:637
|
| 861 |
+
msgid "Possible %1$s conflict: <strong>%2$s</strong>"
|
| 862 |
msgstr ""
|
| 863 |
|
| 864 |
#: bbp-admin/bbp-admin.php:177 bbp-admin/bbp-tools.php:67
|
| 866 |
msgstr ""
|
| 867 |
|
| 868 |
#: bbp-admin/bbp-admin.php:180
|
| 869 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:40 bbpress.php:575
|
| 870 |
+
#: bbpress.php:576
|
| 871 |
msgid "Forums"
|
| 872 |
msgstr ""
|
| 873 |
|
| 1251 |
"We’re importing your bbPress standalone forums, topics and replies..."
|
| 1252 |
msgstr ""
|
| 1253 |
|
| 1254 |
+
#: bbp-admin/importers/bbpress.php:875 bbpress.php:587
|
| 1255 |
msgid "No forums found"
|
| 1256 |
msgstr ""
|
| 1257 |
|
| 1286 |
msgstr ""
|
| 1287 |
|
| 1288 |
#: bbp-admin/importers/bbpress.php:1002
|
| 1289 |
+
#: bbp-includes/bbp-common-template.php:1093
|
| 1290 |
+
#: bbp-includes/bbp-common-template.php:1110
|
| 1291 |
+
#: bbp-includes/bbp-topic-functions.php:1149
|
| 1292 |
+
#: bbp-includes/bbp-topic-functions.php:1469
|
| 1293 |
#: bbp-themes/bbp-twentyten/bbpress/form-reply.php:27
|
| 1294 |
msgid "Reply To: %s"
|
| 1295 |
msgstr ""
|
| 1465 |
msgid "Forum Attributes"
|
| 1466 |
msgstr ""
|
| 1467 |
|
| 1468 |
+
#: bbp-admin/bbp-forums.php:392
|
| 1469 |
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:15
|
| 1470 |
msgid "Creator"
|
| 1471 |
msgstr ""
|
| 1472 |
|
| 1473 |
+
#: bbp-admin/bbp-forums.php:439 bbp-includes/bbp-forum-template.php:512
|
| 1474 |
msgid "No Topics"
|
| 1475 |
msgstr ""
|
| 1476 |
|
| 1477 |
+
#: bbp-admin/bbp-forums.php:504
|
| 1478 |
msgid "Forum updated. <a href=\"%s\">View forum</a>"
|
| 1479 |
msgstr ""
|
| 1480 |
|
| 1481 |
+
#: bbp-admin/bbp-forums.php:513
|
| 1482 |
msgid "Forum updated."
|
| 1483 |
msgstr ""
|
| 1484 |
|
| 1485 |
#. translators: %s: date and time of the revision
|
| 1486 |
+
#: bbp-admin/bbp-forums.php:518
|
| 1487 |
msgid "Forum restored to revision from %s"
|
| 1488 |
msgstr ""
|
| 1489 |
|
| 1490 |
+
#: bbp-admin/bbp-forums.php:522
|
| 1491 |
msgid "Forum created. <a href=\"%s\">View forum</a>"
|
| 1492 |
msgstr ""
|
| 1493 |
|
| 1494 |
+
#: bbp-admin/bbp-forums.php:525
|
| 1495 |
msgid "Forum saved."
|
| 1496 |
msgstr ""
|
| 1497 |
|
| 1498 |
+
#: bbp-admin/bbp-forums.php:528
|
| 1499 |
msgid "Forum submitted. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
| 1500 |
msgstr ""
|
| 1501 |
|
| 1502 |
+
#: bbp-admin/bbp-forums.php:531
|
| 1503 |
msgid ""
|
| 1504 |
"Forum scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
|
| 1505 |
"\">Preview forum</a>"
|
| 1506 |
msgstr ""
|
| 1507 |
|
| 1508 |
+
#: bbp-admin/bbp-forums.php:538
|
| 1509 |
msgid "Forum draft updated. <a target=\"_blank\" href=\"%s\">Preview forum</a>"
|
| 1510 |
msgstr ""
|
| 1511 |
|
| 1516 |
#: bbp-admin/bbp-metaboxes.php:67 bbp-admin/bbp-metaboxes.php:430
|
| 1517 |
#: bbp-admin/bbp-metaboxes.php:433 bbp-admin/bbp-replies.php:525
|
| 1518 |
#: bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php:18
|
| 1519 |
+
#: bbp-themes/bbp-twentyten/bbpress/loop-topics.php:17 bbpress.php:634
|
| 1520 |
msgid "Topic"
|
| 1521 |
msgid_plural "Topics"
|
| 1522 |
msgstr[0] ""
|
| 1523 |
msgstr[1] ""
|
| 1524 |
|
| 1525 |
+
#: bbp-admin/bbp-metaboxes.php:84 bbpress.php:691
|
| 1526 |
msgid "Reply"
|
| 1527 |
msgid_plural "Replies"
|
| 1528 |
msgstr[0] ""
|
| 1529 |
msgstr[1] ""
|
| 1530 |
|
| 1531 |
+
#: bbp-admin/bbp-metaboxes.php:101 bbpress.php:832
|
| 1532 |
msgid "Topic Tag"
|
| 1533 |
msgid_plural "Topic Tags"
|
| 1534 |
msgstr[0] ""
|
| 1824 |
msgid "(Mismatch)"
|
| 1825 |
msgstr ""
|
| 1826 |
|
| 1827 |
+
#: bbp-admin/bbp-replies.php:684
|
| 1828 |
msgid "Mark the reply as not spam"
|
| 1829 |
msgstr ""
|
| 1830 |
|
| 1831 |
+
#: bbp-admin/bbp-replies.php:686
|
| 1832 |
msgid "Mark this reply as spam"
|
| 1833 |
msgstr ""
|
| 1834 |
|
| 1867 |
msgid "Reply draft updated. <a target=\"_blank\" href=\"%s\">Preview topic</a>"
|
| 1868 |
msgstr ""
|
| 1869 |
|
| 1870 |
+
#: bbp-includes/bbp-common-template.php:1011
|
| 1871 |
msgid "No topics available"
|
| 1872 |
msgstr ""
|
| 1873 |
|
| 1874 |
+
#: bbp-includes/bbp-common-template.php:1016
|
| 1875 |
msgid "No forums available"
|
| 1876 |
msgstr ""
|
| 1877 |
|
| 1878 |
+
#: bbp-includes/bbp-common-template.php:1021
|
| 1879 |
msgid "None available"
|
| 1880 |
msgstr ""
|
| 1881 |
|
| 1882 |
+
#: bbp-includes/bbp-common-template.php:1441
|
| 1883 |
msgid "Home"
|
| 1884 |
msgstr ""
|
| 1885 |
|
| 1886 |
+
#: bbp-includes/bbp-common-template.php:1503
|
| 1887 |
#: bbp-themes/bbp-twentyten/bbpress/user-details.php:18
|
| 1888 |
msgid "(Edit)"
|
| 1889 |
msgstr ""
|
| 1890 |
|
| 1891 |
+
#: bbp-includes/bbp-common-template.php:1507
|
| 1892 |
+
#: bbp-includes/bbp-common-template.php:1605
|
| 1893 |
+
#: bbp-includes/bbp-common-template.php:1817
|
| 1894 |
+
#: bbp-includes/bbp-core-compatibility.php:986
|
| 1895 |
+
#: bbp-includes/bbp-core-compatibility.php:996
|
| 1896 |
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag.php:20
|
| 1897 |
#: bbp-themes/bbp-twentyten/taxonomy-topic-tag-edit.php:20
|
| 1898 |
msgid "Topic Tag: %s"
|
| 1899 |
msgstr ""
|
| 1900 |
|
| 1901 |
+
#: bbp-includes/bbp-common-template.php:1511
|
| 1902 |
+
#: bbp-includes/bbp-reply-template.php:1428
|
| 1903 |
+
#: bbp-includes/bbp-topic-template.php:2070 bbpress.php:581 bbpress.php:638
|
| 1904 |
+
#: bbpress.php:695
|
| 1905 |
msgid "Edit"
|
| 1906 |
msgstr ""
|
| 1907 |
|
| 1908 |
+
#: bbp-includes/bbp-common-template.php:1526
|
| 1909 |
msgid "‹"
|
| 1910 |
msgstr ""
|
| 1911 |
|
| 1912 |
+
#: bbp-includes/bbp-common-template.php:1526
|
| 1913 |
msgid "›"
|
| 1914 |
msgstr ""
|
| 1915 |
|
| 1916 |
+
#: bbp-includes/bbp-common-template.php:1751
|
| 1917 |
msgid "Log Out"
|
| 1918 |
msgstr ""
|
| 1919 |
|
| 1920 |
+
#: bbp-includes/bbp-common-template.php:1804
|
| 1921 |
msgid "Forum: %s"
|
| 1922 |
msgstr ""
|
| 1923 |
|
| 1924 |
+
#: bbp-includes/bbp-common-template.php:1808
|
| 1925 |
msgid "Topic: %s"
|
| 1926 |
msgstr ""
|
| 1927 |
|
| 1928 |
+
#: bbp-includes/bbp-common-template.php:1826
|
| 1929 |
msgid "Your Profile"
|
| 1930 |
msgstr ""
|
| 1931 |
|
| 1932 |
+
#: bbp-includes/bbp-common-template.php:1831
|
| 1933 |
msgid "%s's Profile"
|
| 1934 |
msgstr ""
|
| 1935 |
|
| 1936 |
+
#: bbp-includes/bbp-common-template.php:1839
|
| 1937 |
msgid "Edit Your Profile"
|
| 1938 |
msgstr ""
|
| 1939 |
|
| 1940 |
+
#: bbp-includes/bbp-common-template.php:1844
|
| 1941 |
msgid "Edit %s's Profile"
|
| 1942 |
msgstr ""
|
| 1943 |
|
| 1944 |
+
#: bbp-includes/bbp-common-template.php:1851
|
| 1945 |
msgid "View: %s"
|
| 1946 |
msgstr ""
|
| 1947 |
|
| 1953 |
msgid "Admin"
|
| 1954 |
msgstr ""
|
| 1955 |
|
| 1956 |
+
#: bbp-includes/bbp-user-template.php:549
|
| 1957 |
+
#: bbp-themes/bbp-twentyten/functions.php:250
|
| 1958 |
msgid "Add this topic to your favorites"
|
| 1959 |
msgstr ""
|
| 1960 |
|
| 1961 |
+
#: bbp-includes/bbp-user-template.php:550
|
| 1962 |
msgid " (%?%)"
|
| 1963 |
msgstr ""
|
| 1964 |
|
| 1965 |
+
#: bbp-includes/bbp-user-template.php:556
|
| 1966 |
msgid "This topic is one of your %favorites% ["
|
| 1967 |
msgstr ""
|
| 1968 |
|
| 1969 |
+
#: bbp-includes/bbp-user-template.php:557
|
| 1970 |
+
#: bbp-themes/bbp-twentyten/functions.php:249
|
| 1971 |
msgid "×"
|
| 1972 |
msgstr ""
|
| 1973 |
|
| 1974 |
+
#: bbp-includes/bbp-user-template.php:558
|
| 1975 |
msgid "]"
|
| 1976 |
msgstr ""
|
| 1977 |
|
| 1978 |
+
#: bbp-includes/bbp-user-template.php:662
|
| 1979 |
+
#: bbp-themes/bbp-twentyten/functions.php:259
|
| 1980 |
msgid "Subscribe"
|
| 1981 |
msgstr ""
|
| 1982 |
|
| 1983 |
+
#: bbp-includes/bbp-user-template.php:663
|
| 1984 |
+
#: bbp-themes/bbp-twentyten/functions.php:260
|
| 1985 |
msgid "Unsubscribe"
|
| 1986 |
msgstr ""
|
| 1987 |
|
| 1988 |
+
#: bbp-includes/bbp-user-template.php:725
|
| 1989 |
msgid "User updated."
|
| 1990 |
msgstr ""
|
| 1991 |
|
| 1992 |
+
#: bbp-includes/bbp-user-template.php:749
|
| 1993 |
msgid "You have super admin privileges."
|
| 1994 |
msgstr ""
|
| 1995 |
|
| 1996 |
+
#: bbp-includes/bbp-user-template.php:749
|
| 1997 |
msgid "This user has super admin privileges."
|
| 1998 |
msgstr ""
|
| 1999 |
|
| 2000 |
+
#: bbp-includes/bbp-user-template.php:816
|
| 2001 |
msgid "— No role for this site —"
|
| 2002 |
msgstr ""
|
| 2003 |
|
| 2004 |
+
#: bbp-includes/bbp-user-template.php:864
|
| 2005 |
msgid "You are now logged out."
|
| 2006 |
msgstr ""
|
| 2007 |
|
| 2008 |
+
#: bbp-includes/bbp-user-template.php:868
|
| 2009 |
msgid "New user registration is currently not allowed."
|
| 2010 |
msgstr ""
|
| 2011 |
|
| 2012 |
+
#: bbp-includes/bbp-user-template.php:877
|
| 2013 |
msgid "Check your e-mail for the confirmation link."
|
| 2014 |
msgstr ""
|
| 2015 |
|
| 2016 |
+
#: bbp-includes/bbp-user-template.php:882
|
| 2017 |
msgid "Check your e-mail for your new password."
|
| 2018 |
msgstr ""
|
| 2019 |
|
| 2020 |
+
#: bbp-includes/bbp-user-template.php:887
|
| 2021 |
msgid "Registration complete. Please check your e-mail."
|
| 2022 |
msgstr ""
|
| 2023 |
|
| 2024 |
+
#: bbp-includes/bbp-user-template.php:1058
|
| 2025 |
+
#: bbp-includes/bbp-reply-template.php:968
|
| 2026 |
+
#: bbp-includes/bbp-topic-template.php:1224
|
| 2027 |
msgid "View %s's profile"
|
| 2028 |
msgstr ""
|
| 2029 |
|
| 2030 |
+
#: bbp-includes/bbp-user-template.php:1058
|
| 2031 |
+
#: bbp-includes/bbp-reply-template.php:968
|
| 2032 |
+
#: bbp-includes/bbp-topic-template.php:1224
|
| 2033 |
msgid "Visit %s's website"
|
| 2034 |
msgstr ""
|
| 2035 |
|
| 2036 |
+
#: bbp-includes/bbp-extend-buddypress.php:228
|
| 2037 |
msgid "New topic created"
|
| 2038 |
msgstr ""
|
| 2039 |
|
| 2040 |
+
#: bbp-includes/bbp-extend-buddypress.php:231
|
| 2041 |
msgid "New reply created"
|
| 2042 |
msgstr ""
|
| 2043 |
|
| 2044 |
+
#: bbp-includes/bbp-extend-buddypress.php:466
|
| 2045 |
msgid "%1$s started the topic %2$s in the forum %3$s"
|
| 2046 |
msgstr ""
|
| 2047 |
|
| 2048 |
+
#: bbp-includes/bbp-extend-buddypress.php:559
|
| 2049 |
msgid "%1$s replied to the topic %2$s in the forum %3$s"
|
| 2050 |
msgstr ""
|
| 2051 |
|
| 2052 |
+
#: bbp-includes/bbp-core-compatibility.php:308
|
| 2053 |
msgid "Hands off, partner!"
|
| 2054 |
msgstr ""
|
| 2055 |
|
| 2056 |
+
#: bbp-includes/bbp-core-compatibility.php:1337
|
| 2057 |
msgid ""
|
| 2058 |
"Conditional query tags do not work before the query is run. Before then, "
|
| 2059 |
"they always return false."
|
| 2060 |
msgstr ""
|
| 2061 |
|
| 2062 |
+
#: bbp-includes/bbp-core-compatibility.php:1572
|
| 2063 |
msgid "You do not have the permission to edit this user."
|
| 2064 |
msgstr ""
|
| 2065 |
|
| 2066 |
+
#: bbp-includes/bbp-reply-functions.php:143
|
| 2067 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
| 2068 |
msgstr ""
|
| 2069 |
|
| 2070 |
+
#: bbp-includes/bbp-reply-functions.php:155
|
| 2071 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
| 2072 |
msgstr ""
|
| 2073 |
|
| 2074 |
+
#: bbp-includes/bbp-reply-functions.php:161
|
| 2075 |
+
#: bbp-includes/bbp-topic-functions.php:195
|
| 2076 |
+
#: bbp-includes/bbp-topic-functions.php:470
|
| 2077 |
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
| 2078 |
msgstr ""
|
| 2079 |
|
| 2080 |
+
#: bbp-includes/bbp-reply-functions.php:181
|
| 2081 |
msgid "<strong>ERROR</strong>: Your reply needs a title."
|
| 2082 |
msgstr ""
|
| 2083 |
|
| 2084 |
+
#: bbp-includes/bbp-reply-functions.php:193
|
| 2085 |
+
#: bbp-includes/bbp-reply-functions.php:451
|
| 2086 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
| 2087 |
msgstr ""
|
| 2088 |
|
| 2089 |
+
#: bbp-includes/bbp-reply-functions.php:198
|
| 2090 |
+
#: bbp-includes/bbp-topic-functions.php:224
|
| 2091 |
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
| 2092 |
msgstr ""
|
| 2093 |
|
| 2094 |
+
#: bbp-includes/bbp-reply-functions.php:203
|
| 2095 |
msgid ""
|
| 2096 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
| 2097 |
"you’ve already said that!"
|
| 2098 |
msgstr ""
|
| 2099 |
|
| 2100 |
+
#: bbp-includes/bbp-reply-functions.php:208
|
| 2101 |
msgid "<strong>ERROR</strong>: Your reply cannot be created at this time."
|
| 2102 |
msgstr ""
|
| 2103 |
|
| 2104 |
+
#: bbp-includes/bbp-reply-functions.php:257
|
| 2105 |
+
#: bbp-includes/bbp-reply-functions.php:495
|
| 2106 |
msgid ""
|
| 2107 |
"<strong>ERROR</strong>: There was a problem adding the tags to the topic."
|
| 2108 |
msgstr ""
|
| 2109 |
|
| 2110 |
+
#: bbp-includes/bbp-reply-functions.php:365
|
| 2111 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
| 2112 |
msgstr ""
|
| 2113 |
|
| 2114 |
+
#: bbp-includes/bbp-reply-functions.php:375
|
| 2115 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
| 2116 |
msgstr ""
|
| 2117 |
|
| 2118 |
+
#: bbp-includes/bbp-reply-functions.php:388
|
| 2119 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
| 2120 |
msgstr ""
|
| 2121 |
|
| 2122 |
+
#: bbp-includes/bbp-reply-functions.php:418
|
| 2123 |
msgid ""
|
| 2124 |
"<strong>ERROR</strong>: This forum is a category. No topics or replies can "
|
| 2125 |
"be created in it."
|
| 2126 |
msgstr ""
|
| 2127 |
|
| 2128 |
+
#: bbp-includes/bbp-reply-functions.php:422
|
| 2129 |
msgid ""
|
| 2130 |
"<strong>ERROR</strong>: This forum has been closed to new topics and replies."
|
| 2131 |
msgstr ""
|
| 2132 |
|
| 2133 |
+
#: bbp-includes/bbp-reply-functions.php:426
|
| 2134 |
msgid ""
|
| 2135 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
| 2136 |
"capability to read or create new replies in it."
|
| 2137 |
msgstr ""
|
| 2138 |
|
| 2139 |
+
#: bbp-includes/bbp-reply-functions.php:430
|
| 2140 |
msgid ""
|
| 2141 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
| 2142 |
"capability to read or create new replies in it."
|
| 2143 |
msgstr ""
|
| 2144 |
|
| 2145 |
+
#: bbp-includes/bbp-reply-functions.php:456
|
| 2146 |
msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
|
| 2147 |
msgstr ""
|
| 2148 |
|
| 2149 |
+
#: bbp-includes/bbp-reply-functions.php:976
|
| 2150 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that!"
|
| 2151 |
msgstr ""
|
| 2152 |
|
| 2153 |
+
#: bbp-includes/bbp-reply-functions.php:989
|
| 2154 |
msgid ""
|
| 2155 |
"<strong>ERROR</strong>: There was a problem unmarking the reply as spam!"
|
| 2156 |
msgstr ""
|
| 2157 |
|
| 2158 |
+
#: bbp-includes/bbp-reply-functions.php:989
|
| 2159 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam!"
|
| 2160 |
msgstr ""
|
| 2161 |
|
| 2162 |
+
#: bbp-includes/bbp-reply-functions.php:1008
|
| 2163 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply!"
|
| 2164 |
msgstr ""
|
| 2165 |
|
| 2166 |
+
#: bbp-includes/bbp-reply-functions.php:1016
|
| 2167 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply!"
|
| 2168 |
msgstr ""
|
| 2169 |
|
| 2170 |
+
#: bbp-includes/bbp-reply-functions.php:1024
|
| 2171 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply!"
|
| 2172 |
msgstr ""
|
| 2173 |
|
| 2174 |
+
#: bbp-includes/bbp-reply-functions.php:1299
|
| 2175 |
msgid "All Posts"
|
| 2176 |
msgstr ""
|
| 2177 |
|
| 2178 |
+
#: bbp-includes/bbp-reply-functions.php:1301 bbpress.php:692
|
| 2179 |
msgid "All Replies"
|
| 2180 |
msgstr ""
|
| 2181 |
|
| 2182 |
+
#: bbp-includes/bbp-reply-functions.php:1341
|
| 2183 |
+
#: bbp-includes/bbp-topic-functions.php:2958
|
| 2184 |
msgid "Replies: %s"
|
| 2185 |
msgstr ""
|
| 2186 |
|
| 2187 |
+
#: bbp-includes/bbp-reply-template.php:1543
|
| 2188 |
+
#: bbp-includes/bbp-topic-template.php:2184
|
| 2189 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:89
|
| 2190 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:102
|
| 2191 |
msgid "Delete"
|
| 2192 |
msgstr ""
|
| 2193 |
|
| 2194 |
+
#: bbp-includes/bbp-reply-template.php:1563
|
| 2195 |
+
#: bbp-includes/bbp-topic-template.php:2203
|
| 2196 |
msgid "Are you sure you want to delete that permanently?"
|
| 2197 |
msgstr ""
|
| 2198 |
|
| 2199 |
+
#: bbp-includes/bbp-reply-template.php:1614
|
| 2200 |
+
#: bbp-includes/bbp-topic-template.php:2441
|
| 2201 |
msgid "Unspam"
|
| 2202 |
msgstr ""
|
| 2203 |
|
| 2204 |
+
#: bbp-includes/bbp-reply-template.php:1678
|
| 2205 |
msgid "Split"
|
| 2206 |
msgstr ""
|
| 2207 |
|
| 2208 |
+
#: bbp-includes/bbp-reply-template.php:1679
|
| 2209 |
msgid "Split the topic from this reply"
|
| 2210 |
msgstr ""
|
| 2211 |
|
| 2212 |
+
#: bbp-includes/bbp-reply-template.php:1776
|
| 2213 |
msgid "Viewing reply %1$s (of %2$s total)"
|
| 2214 |
msgstr ""
|
| 2215 |
|
| 2216 |
+
#: bbp-includes/bbp-reply-template.php:1780
|
| 2217 |
msgid "Viewing %1$s replies"
|
| 2218 |
msgstr ""
|
| 2219 |
|
| 2220 |
+
#: bbp-includes/bbp-reply-template.php:1784
|
| 2221 |
msgid "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
|
| 2222 |
msgstr ""
|
| 2223 |
|
| 2224 |
+
#: bbp-includes/bbp-reply-template.php:1789
|
| 2225 |
msgid "Viewing %1$s reply"
|
| 2226 |
msgstr ""
|
| 2227 |
|
| 2228 |
+
#: bbp-includes/bbp-reply-template.php:1800
|
| 2229 |
msgid "Viewing post %1$s (of %2$s total)"
|
| 2230 |
msgstr ""
|
| 2231 |
|
| 2232 |
+
#: bbp-includes/bbp-reply-template.php:1804
|
| 2233 |
msgid "Viewing %1$s posts"
|
| 2234 |
msgstr ""
|
| 2235 |
|
| 2236 |
+
#: bbp-includes/bbp-reply-template.php:1808
|
| 2237 |
msgid "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
|
| 2238 |
msgstr ""
|
| 2239 |
|
| 2240 |
+
#: bbp-includes/bbp-reply-template.php:1813
|
| 2241 |
msgid "Viewing %1$s post"
|
| 2242 |
msgstr ""
|
| 2243 |
|
| 2244 |
+
#: bbp-includes/bbp-forum-template.php:1082
|
| 2245 |
msgid "%s topic"
|
| 2246 |
msgid_plural "%s topics"
|
| 2247 |
msgstr[0] ""
|
| 2248 |
msgstr[1] ""
|
| 2249 |
|
| 2250 |
+
#: bbp-includes/bbp-forum-template.php:1095
|
| 2251 |
+
#: bbp-includes/bbp-topic-template.php:1711
|
| 2252 |
msgid " (+ %d hidden)"
|
| 2253 |
msgstr ""
|
| 2254 |
|
| 2255 |
+
#: bbp-includes/bbp-forum-template.php:1672
|
| 2256 |
+
#: bbp-includes/bbp-topic-template.php:1698
|
| 2257 |
msgid "%s reply"
|
| 2258 |
msgid_plural "%s replies"
|
| 2259 |
msgstr[0] ""
|
| 2260 |
msgstr[1] ""
|
| 2261 |
|
| 2262 |
+
#: bbp-includes/bbp-forum-template.php:1682
|
| 2263 |
msgid ""
|
| 2264 |
"This category contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
| 2265 |
msgstr ""
|
| 2266 |
|
| 2267 |
+
#: bbp-includes/bbp-forum-template.php:1686
|
| 2268 |
msgid ""
|
| 2269 |
"This forum contains %1$s and %2$s, and was last updated by %3$s %4$s ago."
|
| 2270 |
msgstr ""
|
| 2271 |
|
| 2272 |
+
#: bbp-includes/bbp-forum-template.php:1693
|
| 2273 |
msgid "This category contains %1$s and %2$s."
|
| 2274 |
msgstr ""
|
| 2275 |
|
| 2276 |
+
#: bbp-includes/bbp-forum-template.php:1697
|
| 2277 |
msgid "This forum contains %1$s and %2$s."
|
| 2278 |
msgstr ""
|
| 2279 |
|
| 2318 |
msgstr ""
|
| 2319 |
|
| 2320 |
#: bbp-includes/bbp-core-widgets.php:182 bbp-includes/bbp-core-widgets.php:308
|
| 2321 |
+
#: bbp-includes/bbp-core-widgets.php:450 bbp-includes/bbp-core-widgets.php:651
|
| 2322 |
+
#: bbp-includes/bbp-core-widgets.php:809
|
| 2323 |
msgid "Title:"
|
| 2324 |
msgstr ""
|
| 2325 |
|
| 2363 |
msgid "bbPress Topics List"
|
| 2364 |
msgstr ""
|
| 2365 |
|
| 2366 |
+
#: bbp-includes/bbp-core-widgets.php:652
|
| 2367 |
msgid "Maximum topics to show:"
|
| 2368 |
msgstr ""
|
| 2369 |
|
| 2370 |
+
#: bbp-includes/bbp-core-widgets.php:653 bbp-includes/bbp-core-widgets.php:811
|
| 2371 |
msgid "Show post date:"
|
| 2372 |
msgstr ""
|
| 2373 |
|
| 2374 |
+
#: bbp-includes/bbp-core-widgets.php:655
|
| 2375 |
msgid "Popularity check:"
|
| 2376 |
msgstr ""
|
| 2377 |
|
| 2378 |
+
#: bbp-includes/bbp-core-widgets.php:656
|
| 2379 |
msgid ""
|
| 2380 |
"Number of topics back to check reply count to determine popularity. A number "
|
| 2381 |
"less than the maximum number of topics to show disables the check."
|
| 2382 |
msgstr ""
|
| 2383 |
|
| 2384 |
+
#: bbp-includes/bbp-core-widgets.php:698
|
| 2385 |
msgid "A list of bbPress recent replies."
|
| 2386 |
msgstr ""
|
| 2387 |
|
| 2388 |
+
#: bbp-includes/bbp-core-widgets.php:810
|
| 2389 |
msgid "Maximum replies to show:"
|
| 2390 |
msgstr ""
|
| 2391 |
|
| 2392 |
+
#: bbp-includes/bbp-common-functions.php:500
|
| 2393 |
+
#: bbp-includes/bbp-common-functions.php:532
|
| 2394 |
msgid "Private: %s"
|
| 2395 |
msgstr ""
|
| 2396 |
|
| 2397 |
+
#: bbp-includes/bbp-common-functions.php:501
|
| 2398 |
+
#: bbp-includes/bbp-common-functions.php:533
|
| 2399 |
msgid "Spammed: %s"
|
| 2400 |
msgstr ""
|
| 2401 |
|
| 2402 |
+
#: bbp-includes/bbp-common-functions.php:502
|
| 2403 |
+
#: bbp-includes/bbp-common-functions.php:534
|
| 2404 |
msgid "Trashed: %s"
|
| 2405 |
msgstr ""
|
| 2406 |
|
| 2407 |
+
#: bbp-includes/bbp-common-functions.php:734
|
| 2408 |
msgid "<strong>ERROR</strong>: Invalid author name submitted!"
|
| 2409 |
msgstr ""
|
| 2410 |
|
| 2411 |
+
#: bbp-includes/bbp-common-functions.php:737
|
| 2412 |
msgid "<strong>ERROR</strong>: Invalid email address submitted!"
|
| 2413 |
msgstr ""
|
| 2414 |
|
| 2415 |
+
#: bbp-includes/bbp-common-functions.php:1043
|
| 2416 |
msgid ""
|
| 2417 |
"%1$s wrote:\n"
|
| 2418 |
"\n"
|
| 2420 |
"\n"
|
| 2421 |
"Post Link: %3$s\n"
|
| 2422 |
"\n"
|
| 2423 |
+
"You are recieving this email because you subscribed to it. Login and visit "
|
| 2424 |
+
"the topic to unsubscribe from these emails."
|
| 2425 |
msgstr ""
|
| 2426 |
|
| 2427 |
+
#: bbp-includes/bbp-topic-functions.php:153
|
| 2428 |
msgid ""
|
| 2429 |
"<strong>ERROR</strong>: You do not have permission to create new topics."
|
| 2430 |
msgstr ""
|
| 2431 |
|
| 2432 |
+
#: bbp-includes/bbp-topic-functions.php:177
|
| 2433 |
+
#: bbp-includes/bbp-topic-functions.php:510
|
| 2434 |
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
| 2435 |
msgstr ""
|
| 2436 |
|
| 2437 |
+
#: bbp-includes/bbp-topic-functions.php:189
|
| 2438 |
+
#: bbp-includes/bbp-topic-functions.php:522
|
| 2439 |
msgid "<strong>ERROR</strong>: Your topic cannot be empty."
|
| 2440 |
msgstr ""
|
| 2441 |
|
| 2442 |
+
#: bbp-includes/bbp-topic-functions.php:206
|
| 2443 |
msgid ""
|
| 2444 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
| 2445 |
"in this forum."
|
| 2446 |
msgstr ""
|
| 2447 |
|
| 2448 |
+
#: bbp-includes/bbp-topic-functions.php:210
|
| 2449 |
+
#: bbp-includes/bbp-topic-functions.php:489
|
| 2450 |
msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
|
| 2451 |
msgstr ""
|
| 2452 |
|
| 2453 |
+
#: bbp-includes/bbp-topic-functions.php:214
|
| 2454 |
+
#: bbp-includes/bbp-topic-functions.php:493
|
| 2455 |
msgid ""
|
| 2456 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
| 2457 |
"capability to read or create new topics in it."
|
| 2458 |
msgstr ""
|
| 2459 |
|
| 2460 |
+
#: bbp-includes/bbp-topic-functions.php:218
|
| 2461 |
+
#: bbp-includes/bbp-topic-functions.php:497
|
| 2462 |
msgid ""
|
| 2463 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
| 2464 |
"capability to read or create new topics in it."
|
| 2465 |
msgstr ""
|
| 2466 |
|
| 2467 |
+
#: bbp-includes/bbp-topic-functions.php:229
|
| 2468 |
msgid ""
|
| 2469 |
"<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
|
| 2470 |
"you’ve already said that!"
|
| 2471 |
msgstr ""
|
| 2472 |
|
| 2473 |
+
#: bbp-includes/bbp-topic-functions.php:234
|
| 2474 |
msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
|
| 2475 |
msgstr ""
|
| 2476 |
|
| 2477 |
+
#: bbp-includes/bbp-topic-functions.php:426
|
| 2478 |
+
#: bbp-includes/bbp-topic-functions.php:1010
|
| 2479 |
msgid "<strong>ERROR</strong>: Topic ID not found."
|
| 2480 |
msgstr ""
|
| 2481 |
|
| 2482 |
+
#: bbp-includes/bbp-topic-functions.php:436
|
| 2483 |
msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
|
| 2484 |
msgstr ""
|
| 2485 |
|
| 2486 |
+
#: bbp-includes/bbp-topic-functions.php:449
|
| 2487 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
|
| 2488 |
msgstr ""
|
| 2489 |
|
| 2490 |
+
#: bbp-includes/bbp-topic-functions.php:485
|
| 2491 |
msgid ""
|
| 2492 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
| 2493 |
"in it."
|
| 2494 |
msgstr ""
|
| 2495 |
|
| 2496 |
+
#: bbp-includes/bbp-topic-functions.php:527
|
| 2497 |
msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
|
| 2498 |
msgstr ""
|
| 2499 |
|
| 2500 |
+
#: bbp-includes/bbp-topic-functions.php:1019
|
| 2501 |
msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
|
| 2502 |
msgstr ""
|
| 2503 |
|
| 2504 |
+
#: bbp-includes/bbp-topic-functions.php:1023
|
| 2505 |
+
#: bbp-includes/bbp-topic-functions.php:1314
|
| 2506 |
msgid ""
|
| 2507 |
"<strong>ERROR</strong>: You do not have the permissions to edit the source "
|
| 2508 |
"topic."
|
| 2509 |
msgstr ""
|
| 2510 |
|
| 2511 |
+
#: bbp-includes/bbp-topic-functions.php:1029
|
| 2512 |
msgid "<strong>ERROR</strong>: Destination topic ID not found."
|
| 2513 |
msgstr ""
|
| 2514 |
|
| 2515 |
+
#: bbp-includes/bbp-topic-functions.php:1035
|
| 2516 |
msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
|
| 2517 |
msgstr ""
|
| 2518 |
|
| 2519 |
+
#: bbp-includes/bbp-topic-functions.php:1039
|
| 2520 |
msgid ""
|
| 2521 |
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
| 2522 |
"destination topic."
|
| 2523 |
msgstr ""
|
| 2524 |
|
| 2525 |
+
#: bbp-includes/bbp-topic-functions.php:1290
|
| 2526 |
msgid "<strong>ERROR</strong>: Reply ID to split the topic from not found!"
|
| 2527 |
msgstr ""
|
| 2528 |
|
| 2529 |
+
#: bbp-includes/bbp-topic-functions.php:1298
|
| 2530 |
msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
|
| 2531 |
msgstr ""
|
| 2532 |
|
| 2533 |
+
#: bbp-includes/bbp-topic-functions.php:1307
|
| 2534 |
msgid "<strong>ERROR</strong>: The topic you want to split was not found."
|
| 2535 |
msgstr ""
|
| 2536 |
|
| 2537 |
+
#: bbp-includes/bbp-topic-functions.php:1323
|
| 2538 |
msgid "<strong>ERROR</strong>: You need to choose a valid split option."
|
| 2539 |
msgstr ""
|
| 2540 |
|
| 2541 |
+
#: bbp-includes/bbp-topic-functions.php:1336
|
| 2542 |
msgid "<strong>ERROR</strong>: Destination topic ID not found!"
|
| 2543 |
msgstr ""
|
| 2544 |
|
| 2545 |
+
#: bbp-includes/bbp-topic-functions.php:1345
|
| 2546 |
msgid "<strong>ERROR</strong>: The topic you want to split to was not found!"
|
| 2547 |
msgstr ""
|
| 2548 |
|
| 2549 |
+
#: bbp-includes/bbp-topic-functions.php:1349
|
| 2550 |
msgid ""
|
| 2551 |
"<strong>ERROR</strong>: You do not have the permissions to edit the "
|
| 2552 |
"destination topic!"
|
| 2553 |
msgstr ""
|
| 2554 |
|
| 2555 |
+
#: bbp-includes/bbp-topic-functions.php:1388
|
| 2556 |
msgid ""
|
| 2557 |
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
| 2558 |
"topic. Please try again."
|
| 2559 |
msgstr ""
|
| 2560 |
|
| 2561 |
+
#: bbp-includes/bbp-topic-functions.php:1393
|
| 2562 |
msgid ""
|
| 2563 |
"<strong>ERROR</strong>: You do not have the permissions to create new "
|
| 2564 |
"topics. The reply could not be converted into a topic."
|
| 2565 |
msgstr ""
|
| 2566 |
|
| 2567 |
+
#: bbp-includes/bbp-topic-functions.php:1599
|
| 2568 |
msgid ""
|
| 2569 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2570 |
"getting the tag: %s"
|
| 2571 |
msgstr ""
|
| 2572 |
|
| 2573 |
+
#: bbp-includes/bbp-topic-functions.php:1614
|
| 2574 |
+
#: bbp-includes/bbp-topic-functions.php:1650
|
| 2575 |
msgid ""
|
| 2576 |
"<strong>ERROR</strong>: You do not have the permissions to edit the topic "
|
| 2577 |
"tags."
|
| 2578 |
msgstr ""
|
| 2579 |
|
| 2580 |
+
#: bbp-includes/bbp-topic-functions.php:1620
|
| 2581 |
+
#: bbp-includes/bbp-topic-functions.php:1656
|
| 2582 |
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
| 2583 |
msgstr ""
|
| 2584 |
|
| 2585 |
+
#: bbp-includes/bbp-topic-functions.php:1630
|
| 2586 |
msgid ""
|
| 2587 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2588 |
"updating the tag: %s"
|
| 2589 |
msgstr ""
|
| 2590 |
|
| 2591 |
+
#: bbp-includes/bbp-topic-functions.php:1666
|
| 2592 |
+
#: bbp-includes/bbp-topic-functions.php:1684
|
| 2593 |
msgid ""
|
| 2594 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2595 |
"merging the tags: %s"
|
| 2596 |
msgstr ""
|
| 2597 |
|
| 2598 |
+
#: bbp-includes/bbp-topic-functions.php:1675
|
| 2599 |
msgid ""
|
| 2600 |
"<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
| 2601 |
msgstr ""
|
| 2602 |
|
| 2603 |
+
#: bbp-includes/bbp-topic-functions.php:1704
|
| 2604 |
msgid ""
|
| 2605 |
"<strong>ERROR</strong>: You do not have the permissions to delete the topic "
|
| 2606 |
"tags."
|
| 2607 |
msgstr ""
|
| 2608 |
|
| 2609 |
+
#: bbp-includes/bbp-topic-functions.php:1713
|
| 2610 |
msgid ""
|
| 2611 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
| 2612 |
"deleting the tag: %s"
|
| 2613 |
msgstr ""
|
| 2614 |
|
| 2615 |
+
#: bbp-includes/bbp-topic-functions.php:1839
|
| 2616 |
msgid "<strong>ERROR:</strong> You do not have the permission to do that."
|
| 2617 |
msgstr ""
|
| 2618 |
|
| 2619 |
+
#: bbp-includes/bbp-topic-functions.php:1852
|
| 2620 |
msgid "<strong>ERROR</strong>: There was a problem closing the topic."
|
| 2621 |
msgstr ""
|
| 2622 |
|
| 2623 |
+
#: bbp-includes/bbp-topic-functions.php:1852
|
| 2624 |
msgid "<strong>ERROR</strong>: There was a problem opening the topic."
|
| 2625 |
msgstr ""
|
| 2626 |
|
| 2627 |
+
#: bbp-includes/bbp-topic-functions.php:1863
|
| 2628 |
msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
|
| 2629 |
msgstr ""
|
| 2630 |
|
| 2631 |
+
#: bbp-includes/bbp-topic-functions.php:1863
|
| 2632 |
msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
|
| 2633 |
msgstr ""
|
| 2634 |
|
| 2635 |
+
#: bbp-includes/bbp-topic-functions.php:1873
|
| 2636 |
msgid ""
|
| 2637 |
"<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
| 2638 |
msgstr ""
|
| 2639 |
|
| 2640 |
+
#: bbp-includes/bbp-topic-functions.php:1873
|
| 2641 |
msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
|
| 2642 |
msgstr ""
|
| 2643 |
|
| 2644 |
+
#: bbp-includes/bbp-topic-functions.php:1892
|
| 2645 |
msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
|
| 2646 |
msgstr ""
|
| 2647 |
|
| 2648 |
+
#: bbp-includes/bbp-topic-functions.php:1900
|
| 2649 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
|
| 2650 |
msgstr ""
|
| 2651 |
|
| 2652 |
+
#: bbp-includes/bbp-topic-functions.php:1908
|
| 2653 |
msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
|
| 2654 |
msgstr ""
|
| 2655 |
|
| 2656 |
+
#: bbp-includes/bbp-topic-functions.php:2933 bbpress.php:635
|
| 2657 |
msgid "All Topics"
|
| 2658 |
msgstr ""
|
| 2659 |
|
| 2660 |
+
#: bbp-includes/bbp-extend-akismet.php:296
|
| 2661 |
msgid "%1$s reported this %2$s as spam"
|
| 2662 |
msgstr ""
|
| 2663 |
|
| 2664 |
+
#: bbp-includes/bbp-extend-akismet.php:303
|
| 2665 |
msgid "%1$s reported this %2$s as not spam"
|
| 2666 |
msgstr ""
|
| 2667 |
|
| 2668 |
+
#: bbp-includes/bbp-extend-akismet.php:445
|
| 2669 |
msgid "Akismet caught this post as spam"
|
| 2670 |
msgstr ""
|
| 2671 |
|
| 2672 |
+
#: bbp-includes/bbp-extend-akismet.php:449
|
| 2673 |
+
#: bbp-includes/bbp-extend-akismet.php:464
|
| 2674 |
msgid "Post status was changed to %s"
|
| 2675 |
msgstr ""
|
| 2676 |
|
| 2677 |
+
#: bbp-includes/bbp-extend-akismet.php:457
|
| 2678 |
msgid "Akismet cleared this post"
|
| 2679 |
msgstr ""
|
| 2680 |
|
| 2681 |
+
#: bbp-includes/bbp-extend-akismet.php:471
|
| 2682 |
msgid ""
|
| 2683 |
"Akismet was unable to check this post (response: %s), will automatically "
|
| 2684 |
"retry again later."
|
| 2727 |
"What are you doing here? You do not have the permission to edit this user."
|
| 2728 |
msgstr ""
|
| 2729 |
|
| 2730 |
+
#: bbp-includes/bbp-topic-template.php:1872
|
| 2731 |
msgid "Tagged:"
|
| 2732 |
msgstr ""
|
| 2733 |
|
| 2734 |
+
#: bbp-includes/bbp-topic-template.php:2383
|
| 2735 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:59
|
| 2736 |
#: bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php:73
|
| 2737 |
msgid "Merge"
|
| 2738 |
msgstr ""
|
| 2739 |
|
| 2740 |
+
#: bbp-includes/bbp-topic-template.php:2504
|
| 2741 |
msgid "Viewing topic %1$s (of %2$s total)"
|
| 2742 |
msgstr ""
|
| 2743 |
|
| 2744 |
+
#: bbp-includes/bbp-topic-template.php:2508
|
| 2745 |
msgid "Viewing %1$s topics"
|
| 2746 |
msgstr ""
|
| 2747 |
|
| 2748 |
+
#: bbp-includes/bbp-topic-template.php:2512
|
| 2749 |
msgid "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
| 2750 |
msgstr ""
|
| 2751 |
|
| 2752 |
+
#: bbp-includes/bbp-topic-template.php:2517
|
| 2753 |
msgid "Viewing %1$s topic"
|
| 2754 |
msgstr ""
|
| 2755 |
|
| 2756 |
+
#: bbp-includes/bbp-topic-template.php:2577
|
| 2757 |
msgid "This topic is marked as spam."
|
| 2758 |
msgstr ""
|
| 2759 |
|
| 2760 |
+
#: bbp-includes/bbp-topic-template.php:2582
|
| 2761 |
msgid "This topic is in the trash."
|
| 2762 |
msgstr ""
|
| 2763 |
|
| 2764 |
+
#: bbp-includes/bbp-topic-template.php:2618
|
| 2765 |
msgid "Normal"
|
| 2766 |
msgstr ""
|
| 2767 |
|
| 2768 |
+
#: bbp-includes/bbp-topic-template.php:2619
|
| 2769 |
msgid "Sticky"
|
| 2770 |
msgstr ""
|
| 2771 |
|
| 2772 |
+
#: bbp-includes/bbp-topic-template.php:2620
|
| 2773 |
msgid "Super Sticky"
|
| 2774 |
msgstr ""
|
| 2775 |
|
| 2776 |
+
#: bbp-includes/bbp-topic-template.php:2742
|
| 2777 |
msgid "%s voice"
|
| 2778 |
msgid_plural "%s voices"
|
| 2779 |
msgstr[0] ""
|
| 2780 |
msgstr[1] ""
|
| 2781 |
|
| 2782 |
+
#: bbp-includes/bbp-topic-template.php:2747
|
| 2783 |
msgid ""
|
| 2784 |
"This topic has %1$s, contains %2$s, and was last updated by %3$s %4$s ago."
|
| 2785 |
msgstr ""
|
| 2786 |
|
| 2787 |
+
#: bbp-includes/bbp-topic-template.php:2751
|
| 2788 |
msgid "This topic has %1$s, contains %2$s."
|
| 2789 |
msgstr ""
|
| 2790 |
|
| 2791 |
+
#: bbp-themes/bbp-twentyten/functions.php:245
|
| 2792 |
msgid "favorites"
|
| 2793 |
msgstr ""
|
| 2794 |
|
| 2795 |
+
#: bbp-themes/bbp-twentyten/functions.php:246
|
| 2796 |
msgid "?"
|
| 2797 |
msgstr ""
|
| 2798 |
|
| 2799 |
+
#: bbp-themes/bbp-twentyten/functions.php:247
|
| 2800 |
msgid "This topic is one of your %favLinkYes% [%favDel%]"
|
| 2801 |
msgstr ""
|
| 2802 |
|
| 2803 |
+
#: bbp-themes/bbp-twentyten/functions.php:248
|
| 2804 |
msgid "%favAdd% (%favLinkNo%)"
|
| 2805 |
msgstr ""
|
| 2806 |
|
| 2821 |
msgid "Registered Users"
|
| 2822 |
msgstr ""
|
| 2823 |
|
| 2824 |
+
#: bbp-themes/bbp-twentyten/page-forum-statistics.php:55 bbpress.php:831
|
| 2825 |
msgid "Topic Tags"
|
| 2826 |
msgstr ""
|
| 2827 |
|
| 3303 |
msgid "Create New Topic in “%s”"
|
| 3304 |
msgstr ""
|
| 3305 |
|
| 3306 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:41 bbpress.php:637
|
| 3307 |
msgid "Create New Topic"
|
| 3308 |
msgstr ""
|
| 3309 |
|
| 3325 |
msgid "Topic Tags:"
|
| 3326 |
msgstr ""
|
| 3327 |
|
| 3328 |
+
#: bbp-themes/bbp-twentyten/bbpress/form-topic.php:111 bbpress.php:646
|
| 3329 |
msgid "Forum:"
|
| 3330 |
msgstr ""
|
| 3331 |
|
| 3369 |
msgid "Reset my password"
|
| 3370 |
msgstr ""
|
| 3371 |
|
| 3372 |
+
#: bbpress.php:578
|
| 3373 |
msgid "All Forums"
|
| 3374 |
msgstr ""
|
| 3375 |
|
| 3376 |
+
#: bbpress.php:579 bbpress.php:583
|
| 3377 |
msgid "New Forum"
|
| 3378 |
msgstr ""
|
| 3379 |
|
| 3380 |
+
#: bbpress.php:580
|
| 3381 |
msgid "Create New Forum"
|
| 3382 |
msgstr ""
|
| 3383 |
|
| 3384 |
+
#: bbpress.php:582
|
| 3385 |
msgid "Edit Forum"
|
| 3386 |
msgstr ""
|
| 3387 |
|
| 3388 |
+
#: bbpress.php:584 bbpress.php:585
|
| 3389 |
msgid "View Forum"
|
| 3390 |
msgstr ""
|
| 3391 |
|
| 3392 |
+
#: bbpress.php:586
|
| 3393 |
msgid "Search Forums"
|
| 3394 |
msgstr ""
|
| 3395 |
|
| 3396 |
+
#: bbpress.php:588
|
| 3397 |
msgid "No forums found in Trash"
|
| 3398 |
msgstr ""
|
| 3399 |
|
| 3400 |
+
#: bbpress.php:589
|
| 3401 |
msgid "Parent Forum:"
|
| 3402 |
msgstr ""
|
| 3403 |
|
| 3404 |
+
#: bbpress.php:610
|
| 3405 |
msgid "bbPress Forums"
|
| 3406 |
msgstr ""
|
| 3407 |
|
| 3408 |
+
#: bbpress.php:636 bbpress.php:640
|
| 3409 |
msgid "New Topic"
|
| 3410 |
msgstr ""
|
| 3411 |
|
| 3412 |
+
#: bbpress.php:639
|
| 3413 |
msgid "Edit Topic"
|
| 3414 |
msgstr ""
|
| 3415 |
|
| 3416 |
+
#: bbpress.php:641 bbpress.php:642
|
| 3417 |
msgid "View Topic"
|
| 3418 |
msgstr ""
|
| 3419 |
|
| 3420 |
+
#: bbpress.php:643
|
| 3421 |
msgid "Search Topics"
|
| 3422 |
msgstr ""
|
| 3423 |
|
| 3424 |
+
#: bbpress.php:644
|
| 3425 |
msgid "No topics found"
|
| 3426 |
msgstr ""
|
| 3427 |
|
| 3428 |
+
#: bbpress.php:645
|
| 3429 |
msgid "No topics found in Trash"
|
| 3430 |
msgstr ""
|
| 3431 |
|
| 3432 |
+
#: bbpress.php:667
|
| 3433 |
msgid "bbPress Topics"
|
| 3434 |
msgstr ""
|
| 3435 |
|
| 3436 |
+
#: bbpress.php:693 bbpress.php:697
|
| 3437 |
msgid "New Reply"
|
| 3438 |
msgstr ""
|
| 3439 |
|
| 3440 |
+
#: bbpress.php:694
|
| 3441 |
msgid "Create New Reply"
|
| 3442 |
msgstr ""
|
| 3443 |
|
| 3444 |
+
#: bbpress.php:696
|
| 3445 |
msgid "Edit Reply"
|
| 3446 |
msgstr ""
|
| 3447 |
|
| 3448 |
+
#: bbpress.php:698 bbpress.php:699
|
| 3449 |
msgid "View Reply"
|
| 3450 |
msgstr ""
|
| 3451 |
|
| 3452 |
+
#: bbpress.php:700
|
| 3453 |
msgid "Search Replies"
|
| 3454 |
msgstr ""
|
| 3455 |
|
| 3456 |
+
#: bbpress.php:701
|
| 3457 |
msgid "No replies found"
|
| 3458 |
msgstr ""
|
| 3459 |
|
| 3460 |
+
#: bbpress.php:702
|
| 3461 |
msgid "No replies found in Trash"
|
| 3462 |
msgstr ""
|
| 3463 |
|
| 3464 |
+
#: bbpress.php:703
|
| 3465 |
msgid "Topic:"
|
| 3466 |
msgstr ""
|
| 3467 |
|
| 3468 |
+
#: bbpress.php:724
|
| 3469 |
msgid "bbPress Replies"
|
| 3470 |
msgstr ""
|
| 3471 |
|
| 3472 |
+
#: bbpress.php:758
|
| 3473 |
msgctxt "post"
|
| 3474 |
msgid "Closed"
|
| 3475 |
msgstr ""
|
| 3476 |
|
| 3477 |
+
#: bbpress.php:759
|
| 3478 |
msgctxt "bbpress"
|
| 3479 |
msgid "Closed <span class=\"count\">(%s)</span>"
|
| 3480 |
msgid_plural "Closed <span class=\"count\">(%s)</span>"
|
| 3481 |
msgstr[0] ""
|
| 3482 |
msgstr[1] ""
|
| 3483 |
|
| 3484 |
+
#: bbpress.php:767
|
| 3485 |
msgctxt "post"
|
| 3486 |
msgid "Spam"
|
| 3487 |
msgstr ""
|
| 3488 |
|
| 3489 |
+
#: bbpress.php:768
|
| 3490 |
msgctxt "bbpress"
|
| 3491 |
msgid "Spam <span class=\"count\">(%s)</span>"
|
| 3492 |
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
| 3493 |
msgstr[0] ""
|
| 3494 |
msgstr[1] ""
|
| 3495 |
|
| 3496 |
+
#: bbpress.php:778
|
| 3497 |
msgctxt "post"
|
| 3498 |
msgid "Orphan"
|
| 3499 |
msgstr ""
|
| 3500 |
|
| 3501 |
+
#: bbpress.php:779
|
| 3502 |
msgctxt "bbpress"
|
| 3503 |
msgid "Orphan <span class=\"count\">(%s)</span>"
|
| 3504 |
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
| 3505 |
msgstr[0] ""
|
| 3506 |
msgstr[1] ""
|
| 3507 |
|
| 3508 |
+
#: bbpress.php:789
|
| 3509 |
msgctxt "post"
|
| 3510 |
msgid "Hidden"
|
| 3511 |
msgstr ""
|
| 3512 |
|
| 3513 |
+
#: bbpress.php:790
|
| 3514 |
msgctxt "bbpress"
|
| 3515 |
msgid "Hidden <span class=\"count\">(%s)</span>"
|
| 3516 |
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
| 3517 |
msgstr[0] ""
|
| 3518 |
msgstr[1] ""
|
| 3519 |
|
| 3520 |
+
#: bbpress.php:833
|
| 3521 |
msgid "Search Tags"
|
| 3522 |
msgstr ""
|
| 3523 |
|
| 3524 |
+
#: bbpress.php:834
|
| 3525 |
msgid "Popular Tags"
|
| 3526 |
msgstr ""
|
| 3527 |
|
| 3528 |
+
#: bbpress.php:835
|
| 3529 |
msgid "All Tags"
|
| 3530 |
msgstr ""
|
| 3531 |
|
| 3532 |
+
#: bbpress.php:836
|
| 3533 |
msgid "Edit Tag"
|
| 3534 |
msgstr ""
|
| 3535 |
|
| 3536 |
+
#: bbpress.php:837
|
| 3537 |
msgid "Update Tag"
|
| 3538 |
msgstr ""
|
| 3539 |
|
| 3540 |
+
#: bbpress.php:838
|
| 3541 |
msgid "Add New Tag"
|
| 3542 |
msgstr ""
|
| 3543 |
|
| 3544 |
+
#: bbpress.php:839
|
| 3545 |
msgid "New Tag Name"
|
| 3546 |
msgstr ""
|
| 3547 |
|
| 3548 |
+
#: bbpress.php:840
|
| 3549 |
msgid "View Topic Tag"
|
| 3550 |
msgstr ""
|
| 3551 |
|
| 3552 |
+
#: bbpress.php:887
|
| 3553 |
msgid "Topics with no replies"
|
| 3554 |
msgstr ""
|
| 3555 |
|
| 3557 |
msgid "bbPress"
|
| 3558 |
msgstr ""
|
| 3559 |
|
| 3560 |
+
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-5) #-#-#-#-#
|
| 3561 |
#. Plugin URI of the plugin/theme
|
| 3562 |
+
#. #-#-#-#-# plugin.pot (bbPress 2.0-rc-5) #-#-#-#-#
|
| 3563 |
#. Author URI of the plugin/theme
|
| 3564 |
msgid "http://bbpress.org"
|
| 3565 |
msgstr ""
|
bbp-themes/bbp-twentyten/bbpress/content-single-topic-lead.php
CHANGED
|
@@ -51,7 +51,7 @@
|
|
| 51 |
|
| 52 |
<td class="bbp-topic-author">
|
| 53 |
|
| 54 |
-
<?php bbp_topic_author_link(); ?>
|
| 55 |
|
| 56 |
<?php if ( is_super_admin() ) : ?>
|
| 57 |
|
| 51 |
|
| 52 |
<td class="bbp-topic-author">
|
| 53 |
|
| 54 |
+
<?php bbp_topic_author_link( array( 'sep' => '<br />' ) ); ?>
|
| 55 |
|
| 56 |
<?php if ( is_super_admin() ) : ?>
|
| 57 |
|
bbp-themes/bbp-twentyten/bbpress/form-reply.php
CHANGED
|
@@ -132,7 +132,7 @@
|
|
| 132 |
|
| 133 |
<?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?>
|
| 134 |
|
| 135 |
-
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 136 |
|
| 137 |
<?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>
|
| 138 |
|
| 132 |
|
| 133 |
<?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?>
|
| 134 |
|
| 135 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 136 |
|
| 137 |
<?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>
|
| 138 |
|
bbp-themes/bbp-twentyten/bbpress/form-topic-merge.php
CHANGED
|
@@ -85,7 +85,7 @@
|
|
| 85 |
</div>
|
| 86 |
|
| 87 |
<div class="bbp-submit-wrapper">
|
| 88 |
-
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 89 |
</div>
|
| 90 |
</div>
|
| 91 |
|
| 85 |
</div>
|
| 86 |
|
| 87 |
<div class="bbp-submit-wrapper">
|
| 88 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 89 |
</div>
|
| 90 |
</div>
|
| 91 |
|
bbp-themes/bbp-twentyten/bbpress/form-topic-split.php
CHANGED
|
@@ -89,7 +89,7 @@
|
|
| 89 |
</div>
|
| 90 |
|
| 91 |
<div class="bbp-submit-wrapper">
|
| 92 |
-
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 93 |
</div>
|
| 94 |
</div>
|
| 95 |
|
| 89 |
</div>
|
| 90 |
|
| 91 |
<div class="bbp-submit-wrapper">
|
| 92 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 93 |
</div>
|
| 94 |
</div>
|
| 95 |
|
bbp-themes/bbp-twentyten/bbpress/form-topic.php
CHANGED
|
@@ -181,13 +181,13 @@
|
|
| 181 |
|
| 182 |
<?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
|
| 183 |
|
| 184 |
-
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 185 |
|
| 186 |
<?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
|
| 187 |
|
| 188 |
</div>
|
| 189 |
|
| 190 |
-
<?php do_action( '
|
| 191 |
|
| 192 |
</div>
|
| 193 |
|
| 181 |
|
| 182 |
<?php do_action( 'bbp_theme_before_topic_form_submit_button' ); ?>
|
| 183 |
|
| 184 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_topic_submit" name="bbp_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
|
| 185 |
|
| 186 |
<?php do_action( 'bbp_theme_after_topic_form_submit_button' ); ?>
|
| 187 |
|
| 188 |
</div>
|
| 189 |
|
| 190 |
+
<?php do_action( 'bbp_theme_after_topic_form_submit_wrapper' ); ?>
|
| 191 |
|
| 192 |
</div>
|
| 193 |
|
bbp-themes/bbp-twentyten/bbpress/form-user-edit.php
CHANGED
|
@@ -22,17 +22,17 @@
|
|
| 22 |
|
| 23 |
<div>
|
| 24 |
<label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label>
|
| 25 |
-
<input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'first_name' ) ); ?>" class="regular-text" />
|
| 26 |
</div>
|
| 27 |
|
| 28 |
<div>
|
| 29 |
<label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label>
|
| 30 |
-
<input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'last_name' ) ); ?>" class="regular-text" />
|
| 31 |
</div>
|
| 32 |
|
| 33 |
<div>
|
| 34 |
<label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
|
| 35 |
-
<input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'nickname' ) ); ?>" class="regular-text" />
|
| 36 |
</div>
|
| 37 |
|
| 38 |
<div>
|
|
@@ -55,14 +55,14 @@
|
|
| 55 |
|
| 56 |
<div>
|
| 57 |
<label for="url"><?php _e( 'Website', 'bbpress' ) ?></label>
|
| 58 |
-
<input type="text" name="url" id="url" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_url' ) ); ?>" class="regular-text code" />
|
| 59 |
</div>
|
| 60 |
|
| 61 |
<?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?>
|
| 62 |
|
| 63 |
<div>
|
| 64 |
<label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label>
|
| 65 |
-
<input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'name' ) ); ?>" class="regular-text" />
|
| 66 |
</div>
|
| 67 |
|
| 68 |
<?php endforeach; ?>
|
|
@@ -80,7 +80,7 @@
|
|
| 80 |
|
| 81 |
<div>
|
| 82 |
<label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label>
|
| 83 |
-
<textarea name="description" id="description" rows="5" cols="30"><?php echo esc_attr( bbp_get_displayed_user_field( 'description' ) ); ?></textarea>
|
| 84 |
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'bbpress' ); ?></span>
|
| 85 |
</div>
|
| 86 |
|
|
@@ -97,14 +97,14 @@
|
|
| 97 |
|
| 98 |
<div>
|
| 99 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label>
|
| 100 |
-
<input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_login' ) ); ?>" disabled="disabled" class="regular-text" />
|
| 101 |
<span class="description"><?php _e( 'Usernames cannot be changed.', 'bbpress' ); ?></span>
|
| 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 |
|
| 109 |
<?php
|
| 110 |
|
|
@@ -125,10 +125,10 @@
|
|
| 125 |
<div id="password">
|
| 126 |
<label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label>
|
| 127 |
<fieldset class="bbp-form">
|
| 128 |
-
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" />
|
| 129 |
<span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
|
| 130 |
|
| 131 |
-
<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" />
|
| 132 |
<span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br />
|
| 133 |
|
| 134 |
<div id="pass-strength-result"></div>
|
|
@@ -152,7 +152,7 @@
|
|
| 152 |
<div>
|
| 153 |
<label for="role"><?php _e( 'Super Admin', 'bbpress' ); ?></label>
|
| 154 |
<label>
|
| 155 |
-
<input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> />
|
| 156 |
<?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
|
| 157 |
</label>
|
| 158 |
</div>
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
|
| 172 |
<?php bbp_edit_user_form_fields(); ?>
|
| 173 |
|
| 174 |
-
<button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit"><?php bbp_is_user_home() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button>
|
| 175 |
</div>
|
| 176 |
</fieldset>
|
| 177 |
|
| 22 |
|
| 23 |
<div>
|
| 24 |
<label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label>
|
| 25 |
+
<input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'first_name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
|
| 26 |
</div>
|
| 27 |
|
| 28 |
<div>
|
| 29 |
<label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label>
|
| 30 |
+
<input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'last_name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
|
| 31 |
</div>
|
| 32 |
|
| 33 |
<div>
|
| 34 |
<label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
|
| 35 |
+
<input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'nickname' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
|
| 36 |
</div>
|
| 37 |
|
| 38 |
<div>
|
| 55 |
|
| 56 |
<div>
|
| 57 |
<label for="url"><?php _e( 'Website', 'bbpress' ) ?></label>
|
| 58 |
+
<input type="text" name="url" id="url" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_url' ) ); ?>" class="regular-text code" tabindex="<?php bbp_tab_index(); ?>" />
|
| 59 |
</div>
|
| 60 |
|
| 61 |
<?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?>
|
| 62 |
|
| 63 |
<div>
|
| 64 |
<label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label>
|
| 65 |
+
<input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'name' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
|
| 66 |
</div>
|
| 67 |
|
| 68 |
<?php endforeach; ?>
|
| 80 |
|
| 81 |
<div>
|
| 82 |
<label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label>
|
| 83 |
+
<textarea name="description" id="description" rows="5" cols="30" tabindex="<?php bbp_tab_index(); ?>"><?php echo esc_attr( bbp_get_displayed_user_field( 'description' ) ); ?></textarea>
|
| 84 |
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'bbpress' ); ?></span>
|
| 85 |
</div>
|
| 86 |
|
| 97 |
|
| 98 |
<div>
|
| 99 |
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label>
|
| 100 |
+
<input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_login' ) ); ?>" disabled="disabled" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
|
| 101 |
<span class="description"><?php _e( 'Usernames cannot be changed.', 'bbpress' ); ?></span>
|
| 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" tabindex="<?php bbp_tab_index(); ?>" />
|
| 108 |
|
| 109 |
<?php
|
| 110 |
|
| 125 |
<div id="password">
|
| 126 |
<label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label>
|
| 127 |
<fieldset class="bbp-form">
|
| 128 |
+
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" />
|
| 129 |
<span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
|
| 130 |
|
| 131 |
+
<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" tabindex="<?php bbp_tab_index(); ?>" />
|
| 132 |
<span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br />
|
| 133 |
|
| 134 |
<div id="pass-strength-result"></div>
|
| 152 |
<div>
|
| 153 |
<label for="role"><?php _e( 'Super Admin', 'bbpress' ); ?></label>
|
| 154 |
<label>
|
| 155 |
+
<input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> tabindex="<?php bbp_tab_index(); ?>" />
|
| 156 |
<?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
|
| 157 |
</label>
|
| 158 |
</div>
|
| 171 |
|
| 172 |
<?php bbp_edit_user_form_fields(); ?>
|
| 173 |
|
| 174 |
+
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button>
|
| 175 |
</div>
|
| 176 |
</fieldset>
|
| 177 |
|
bbp-themes/bbp-twentyten/bbpress/form-user-register.php
CHANGED
|
@@ -33,7 +33,7 @@
|
|
| 33 |
|
| 34 |
<div class="bbp-submit-wrapper">
|
| 35 |
|
| 36 |
-
<button type="submit" name="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="user-submit"><?php _e( 'Register', 'bbpress' ); ?></button>
|
| 37 |
|
| 38 |
<?php bbp_user_register_fields(); ?>
|
| 39 |
|
| 33 |
|
| 34 |
<div class="bbp-submit-wrapper">
|
| 35 |
|
| 36 |
+
<button type="submit" name="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit user-submit"><?php _e( 'Register', 'bbpress' ); ?></button>
|
| 37 |
|
| 38 |
<?php bbp_user_register_fields(); ?>
|
| 39 |
|
bbp-themes/bbp-twentyten/bbpress/loop-single-reply.php
CHANGED
|
@@ -31,7 +31,7 @@
|
|
| 31 |
|
| 32 |
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
|
| 33 |
|
| 34 |
-
<?php bbp_reply_author_link(); ?>
|
| 35 |
|
| 36 |
<?php if ( is_super_admin() ) : ?>
|
| 37 |
|
| 31 |
|
| 32 |
<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
|
| 33 |
|
| 34 |
+
<?php bbp_reply_author_link( array( 'sep' => '<br />' ) ); ?>
|
| 35 |
|
| 36 |
<?php if ( is_super_admin() ) : ?>
|
| 37 |
|
bbp-themes/bbp-twentyten/css/bbpress.css
CHANGED
|
@@ -30,6 +30,7 @@
|
|
| 30 |
#main table.bbp-replies {
|
| 31 |
clear: left;
|
| 32 |
table-layout: fixed;
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
/* =Breadcrumb and Tags
|
| 30 |
#main table.bbp-replies {
|
| 31 |
clear: left;
|
| 32 |
table-layout: fixed;
|
| 33 |
+
width: 100%;
|
| 34 |
}
|
| 35 |
|
| 36 |
/* =Breadcrumb and Tags
|
bbp-themes/bbp-twentyten/functions.php
CHANGED
|
@@ -1,273 +1,362 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
|
|
|
|
|
|
| 4 |
* @package bbPress
|
| 5 |
* @subpackage BBP_Twenty_Ten
|
| 6 |
* @since Twenty Ten 1.1
|
| 7 |
*/
|
| 8 |
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
/**
|
| 13 |
-
* Sets up theme support for bbPress
|
| 14 |
-
*
|
| 15 |
-
* If you're looking to add bbPress support into your own custom theme, you'll
|
| 16 |
-
* want to make sure to use: add_theme_support( 'bbpress' );
|
| 17 |
-
*
|
| 18 |
-
* @since bbPress (r2652)
|
| 19 |
-
*/
|
| 20 |
-
function bbp_twentyten_setup() {
|
| 21 |
-
|
| 22 |
-
// This theme comes bundled with bbPress template files
|
| 23 |
-
add_theme_support( 'bbpress' );
|
| 24 |
-
}
|
| 25 |
-
/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
|
| 26 |
-
add_action( 'after_setup_theme', 'bbp_twentyten_setup' );
|
| 27 |
-
endif;
|
| 28 |
-
|
| 29 |
-
/** Theme CSS *****************************************************************/
|
| 30 |
|
| 31 |
-
if ( !
|
| 32 |
/**
|
| 33 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
*
|
| 35 |
-
* @since bbPress (
|
| 36 |
*
|
| 37 |
-
* @
|
|
|
|
| 38 |
*/
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
} else {
|
| 55 |
-
|
| 56 |
-
// TwentyTen
|
| 57 |
-
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $version, 'screen' );
|
| 58 |
-
|
| 59 |
-
// bbPress specific
|
| 60 |
-
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten', $version, 'screen' );
|
| 61 |
}
|
| 62 |
-
}
|
| 63 |
-
add_action( 'bbp_enqueue_scripts', 'bbp_twentyten_enqueue_styles' );
|
| 64 |
-
endif;
|
| 65 |
-
|
| 66 |
-
/** Theme Ajax and JS *********************************************************/
|
| 67 |
-
|
| 68 |
-
if ( !function_exists( 'bbp_twentyten_enqueue_scripts' ) ) :
|
| 69 |
-
/**
|
| 70 |
-
* Enqueue the required Javascript files
|
| 71 |
-
*
|
| 72 |
-
* @since bbPress (r2652)
|
| 73 |
-
*
|
| 74 |
-
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 75 |
-
* @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
|
| 76 |
-
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
| 77 |
-
* @uses wp_enqueue_script() To enqueue the scripts
|
| 78 |
-
*/
|
| 79 |
-
function bbp_twentyten_enqueue_scripts () {
|
| 80 |
-
|
| 81 |
-
$version = '20110830';
|
| 82 |
-
|
| 83 |
-
if ( bbp_is_single_topic() )
|
| 84 |
-
wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), $version );
|
| 85 |
-
|
| 86 |
-
if ( bbp_is_single_user_edit() )
|
| 87 |
-
wp_enqueue_script( 'user-profile' );
|
| 88 |
-
}
|
| 89 |
-
add_action( 'bbp_enqueue_scripts', 'bbp_twentyten_enqueue_scripts' );
|
| 90 |
-
endif;
|
| 91 |
-
|
| 92 |
-
if ( !function_exists( 'bbp_twentyten_scripts' ) ) :
|
| 93 |
-
/**
|
| 94 |
-
* Put some scripts in the header, like AJAX url for wp-lists
|
| 95 |
-
*
|
| 96 |
-
* @since bbPress (r2652)
|
| 97 |
-
*
|
| 98 |
-
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 99 |
-
* @uses admin_url() To get the admin url
|
| 100 |
-
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
| 101 |
-
*/
|
| 102 |
-
function bbp_twentyten_scripts () {
|
| 103 |
-
if ( bbp_is_single_topic() ) : ?>
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
-
</script>
|
| 118 |
-
|
| 119 |
-
<?php
|
| 120 |
-
endif;
|
| 121 |
-
}
|
| 122 |
-
add_filter( 'bbp_head', 'bbp_twentyten_scripts', -1 );
|
| 123 |
-
endif;
|
| 124 |
-
|
| 125 |
-
if ( !function_exists( 'bbp_twentyten_topic_script_localization' ) ) :
|
| 126 |
-
/**
|
| 127 |
-
* Load localizations for topic script.
|
| 128 |
-
*
|
| 129 |
-
* These localizations require information that may not be loaded even by init.
|
| 130 |
-
*
|
| 131 |
-
* @since bbPress (r2652)
|
| 132 |
-
*
|
| 133 |
-
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 134 |
-
* @uses bbp_get_current_user_id() To get the current user id
|
| 135 |
-
* @uses bbp_get_topic_id() To get the topic id
|
| 136 |
-
* @uses bbp_get_favorites_permalink() To get the favorites permalink
|
| 137 |
-
* @uses bbp_is_user_favorite() To check if the topic is in user's favorites
|
| 138 |
-
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
| 139 |
-
* @uses bbp_is_user_subscribed() To check if the user is subscribed to topic
|
| 140 |
-
* @uses bbp_get_topic_permalink() To get the topic permalink
|
| 141 |
-
* @uses wp_localize_script() To localize the script
|
| 142 |
-
*/
|
| 143 |
-
function bbp_twentyten_topic_script_localization () {
|
| 144 |
-
if ( !bbp_is_single_topic() )
|
| 145 |
-
return;
|
| 146 |
-
|
| 147 |
-
$user_id = bbp_get_current_user_id();
|
| 148 |
-
|
| 149 |
-
$localizations = array(
|
| 150 |
-
'currentUserId' => $user_id,
|
| 151 |
-
'topicId' => bbp_get_topic_id(),
|
| 152 |
-
);
|
| 153 |
-
|
| 154 |
-
// Favorites
|
| 155 |
-
if ( bbp_is_favorites_active() ) {
|
| 156 |
-
$localizations['favoritesActive'] = 1;
|
| 157 |
-
$localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id );
|
| 158 |
-
$localizations['isFav'] = (int) bbp_is_user_favorite( $user_id );
|
| 159 |
-
$localizations['favLinkYes'] = __( 'favorites', 'bbpress' );
|
| 160 |
-
$localizations['favLinkNo'] = __( '?', 'bbpress' );
|
| 161 |
-
$localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' );
|
| 162 |
-
$localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' );
|
| 163 |
-
$localizations['favDel'] = __( '×', 'bbpress' );
|
| 164 |
-
$localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' );
|
| 165 |
-
} else {
|
| 166 |
-
$localizations['favoritesActive'] = 0;
|
| 167 |
}
|
| 168 |
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
* @uses bbp_is_user_favorite() To check if the topic is user's favorite
|
| 196 |
-
* @uses bbp_remove_user_favorite() To remove the topic from user's favorites
|
| 197 |
-
* @uses bbp_add_user_favorite() To add the topic from user's favorites
|
| 198 |
-
*/
|
| 199 |
-
function bbp_twentyten_dim_favorite () {
|
| 200 |
-
$user_id = bbp_get_current_user_id();
|
| 201 |
-
$id = intval( $_POST['id'] );
|
| 202 |
|
| 203 |
-
|
| 204 |
-
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
-
|
|
|
|
| 210 |
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
}
|
| 219 |
-
}
|
| 220 |
|
| 221 |
-
|
|
|
|
| 222 |
}
|
| 223 |
-
add_action( 'wp_ajax_dim-favorite', 'bbp_twentyten_dim_favorite' );
|
| 224 |
-
endif;
|
| 225 |
|
| 226 |
-
if ( !function_exists( 'bbp_twentyten_dim_subscription' ) ) :
|
| 227 |
/**
|
| 228 |
-
*
|
| 229 |
-
*
|
| 230 |
-
* @since bbPress (r2668)
|
| 231 |
-
*
|
| 232 |
-
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
| 233 |
-
* @uses bbp_get_current_user_id() To get the current user id
|
| 234 |
-
* @uses current_user_can() To check if the current user can edit the user
|
| 235 |
-
* @uses bbp_get_topic() To get the topic
|
| 236 |
-
* @uses check_ajax_referer() To verify the nonce & check the referer
|
| 237 |
-
* @uses bbp_is_user_subscribed() To check if the topic is in user's
|
| 238 |
-
* subscriptions
|
| 239 |
-
* @uses bbp_remove_user_subscriptions() To remove the topic from user's
|
| 240 |
-
* subscriptions
|
| 241 |
-
* @uses bbp_add_user_subscriptions() To add the topic from user's subscriptions
|
| 242 |
*/
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
return;
|
| 246 |
-
|
| 247 |
-
$user_id = bbp_get_current_user_id();
|
| 248 |
-
$id = intval( $_POST['id'] );
|
| 249 |
-
|
| 250 |
-
if ( !current_user_can( 'edit_user', $user_id ) )
|
| 251 |
-
die( '-1' );
|
| 252 |
-
|
| 253 |
-
if ( !$topic = bbp_get_topic( $id ) )
|
| 254 |
-
die( '0' );
|
| 255 |
-
|
| 256 |
-
check_ajax_referer( 'toggle-subscription_' . $topic->ID );
|
| 257 |
-
|
| 258 |
-
if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
|
| 259 |
-
if ( bbp_remove_user_subscription( $user_id, $topic->ID ) ) {
|
| 260 |
-
die( '1' );
|
| 261 |
-
}
|
| 262 |
-
} else {
|
| 263 |
-
if ( bbp_add_user_subscription( $user_id, $topic->ID ) ) {
|
| 264 |
-
die( '1' );
|
| 265 |
-
}
|
| 266 |
-
}
|
| 267 |
-
|
| 268 |
-
die( '0' );
|
| 269 |
}
|
| 270 |
-
|
| 271 |
endif;
|
| 272 |
|
| 273 |
?>
|
| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
| 4 |
+
* Functions of bbPress's Twenty Ten theme
|
| 5 |
+
*
|
| 6 |
* @package bbPress
|
| 7 |
* @subpackage BBP_Twenty_Ten
|
| 8 |
* @since Twenty Ten 1.1
|
| 9 |
*/
|
| 10 |
|
| 11 |
+
// Exit if accessed directly
|
| 12 |
+
if ( !defined( 'ABSPATH' ) ) exit;
|
| 13 |
|
| 14 |
+
/** Theme Setup ***************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
if ( !class_exists( 'BBP_Twenty_Ten' ) ) :
|
| 17 |
/**
|
| 18 |
+
* Loads bbPress Twenty Ten Theme functionality
|
| 19 |
+
*
|
| 20 |
+
* Usually functions.php contains a few functions wrapped in function_exisits()
|
| 21 |
+
* checks. Since bbp-twenty-ten is intended to be used both as a child theme and
|
| 22 |
+
* for Theme Compatibility, we've moved everything into one convenient class
|
| 23 |
+
* that can be copied or extended.
|
| 24 |
+
*
|
| 25 |
+
* See @link BBP_Theme_Compat() for more.
|
| 26 |
*
|
| 27 |
+
* @since bbPress (r3277)
|
| 28 |
*
|
| 29 |
+
* @package bbPress
|
| 30 |
+
* @subpackage BBP_Twenty_Ten
|
| 31 |
*/
|
| 32 |
+
class BBP_Twenty_Ten extends BBP_Theme_Compat {
|
| 33 |
+
|
| 34 |
+
/** Functions *************************************************************/
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* The main bbPress (Twenty Ten) Loader
|
| 38 |
+
*
|
| 39 |
+
* @since bbPress (r3277)
|
| 40 |
+
*
|
| 41 |
+
* @uses BBP_Twenty_Ten::setup_globals()
|
| 42 |
+
* @uses BBP_Twenty_Ten::setup_actions()
|
| 43 |
+
*/
|
| 44 |
+
public function __construct() {
|
| 45 |
+
$this->setup_globals();
|
| 46 |
+
$this->setup_actions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
/**
|
| 50 |
+
* Component global variables
|
| 51 |
+
*
|
| 52 |
+
* @since bbPress (r2626)
|
| 53 |
+
* @access private
|
| 54 |
+
*
|
| 55 |
+
* @uses plugin_dir_path() To generate bbPress plugin path
|
| 56 |
+
* @uses plugin_dir_url() To generate bbPress plugin url
|
| 57 |
+
* @uses apply_filters() Calls various filters
|
| 58 |
+
*/
|
| 59 |
+
private function setup_globals() {
|
| 60 |
+
global $bbp;
|
| 61 |
+
|
| 62 |
+
// Theme name to help identify if it's been extended
|
| 63 |
+
$this->name = 'bbPress (Twenty Ten)';
|
| 64 |
+
|
| 65 |
+
// Version of theme in YYYMMDD format
|
| 66 |
+
$this->version = '20110912';
|
| 67 |
+
|
| 68 |
+
// Setup the theme path
|
| 69 |
+
$this->dir = $bbp->themes_dir . '/bbp-twentyten';
|
| 70 |
+
|
| 71 |
+
// Setup the theme URL
|
| 72 |
+
$this->url = $bbp->themes_url . '/bbp-twentyten';
|
| 73 |
+
}
|
| 74 |
|
| 75 |
+
/**
|
| 76 |
+
* Setup the theme hooks
|
| 77 |
+
*
|
| 78 |
+
* @since bbPress (r3277)
|
| 79 |
+
* @access private
|
| 80 |
+
*
|
| 81 |
+
* @uses add_filter() To add various filters
|
| 82 |
+
* @uses add_action() To add various actions
|
| 83 |
+
*/
|
| 84 |
+
private function setup_actions() {
|
| 85 |
+
|
| 86 |
+
// Add theme support for bbPress
|
| 87 |
+
add_action( 'after_setup_theme', array( $this, 'add_theme_support' ) );
|
| 88 |
+
|
| 89 |
+
// Enqueue theme CSS
|
| 90 |
+
add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
| 91 |
+
|
| 92 |
+
// Enqueue theme JS
|
| 93 |
+
add_action( 'bbp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
| 94 |
+
|
| 95 |
+
// Enqueue theme script localization
|
| 96 |
+
add_filter( 'bbp_enqueue_scripts', array( $this, 'localize_topic_script' ) );
|
| 97 |
+
|
| 98 |
+
// Output some extra JS in the <head>
|
| 99 |
+
add_action( 'bbp_head', array( $this, 'head_scripts' ) );
|
| 100 |
+
|
| 101 |
+
// Handles the ajax favorite/unfavorite
|
| 102 |
+
add_action( 'wp_ajax_dim-favorite', array( $this, 'ajax_favorite' ) );
|
| 103 |
+
|
| 104 |
+
// Handles the ajax subscribe/unsubscribe
|
| 105 |
+
add_action( 'wp_ajax_dim-subscription', array( $this, 'ajax_subscription' ) );
|
| 106 |
+
}
|
| 107 |
|
| 108 |
+
/**
|
| 109 |
+
* Sets up theme support for bbPress
|
| 110 |
+
*
|
| 111 |
+
* Because this theme comes bundled with bbPress template files, we add it
|
| 112 |
+
* to the list of things this theme supports. Note that the function
|
| 113 |
+
* "add_theme_support()" does not /enable/ theme support, but is instead an
|
| 114 |
+
* API for telling WordPress what it can already do on its own.
|
| 115 |
+
*
|
| 116 |
+
* If you're looking to add bbPress support into your own custom theme, you'll
|
| 117 |
+
* want to make sure it includes all of the template files for bbPress, and then
|
| 118 |
+
* use: add_theme_support( 'bbpress' ); in your functions.php.
|
| 119 |
+
*
|
| 120 |
+
* @since bbPress (r2652)
|
| 121 |
+
*/
|
| 122 |
+
public function add_theme_support() {
|
| 123 |
+
add_theme_support( 'bbpress' );
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
/**
|
| 127 |
+
* Load the theme CSS
|
| 128 |
+
*
|
| 129 |
+
* @since bbPress (r2652)
|
| 130 |
+
*
|
| 131 |
+
* @uses wp_enqueue_style() To enqueue the styles
|
| 132 |
+
*/
|
| 133 |
+
public function enqueue_styles() {
|
| 134 |
+
|
| 135 |
+
// Right to left
|
| 136 |
+
if ( is_rtl() ) {
|
| 137 |
+
|
| 138 |
+
// TwentyTen
|
| 139 |
+
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $this->version, 'screen' );
|
| 140 |
+
wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten', $this->version, 'screen' );
|
| 141 |
+
|
| 142 |
+
// bbPress specific
|
| 143 |
+
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress-rtl.css', 'twentyten-rtl', $this->version, 'screen' );
|
| 144 |
+
|
| 145 |
+
// Left to right
|
| 146 |
+
} else {
|
| 147 |
+
|
| 148 |
+
// TwentyTen
|
| 149 |
+
wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $this->version, 'screen' );
|
| 150 |
+
|
| 151 |
+
// bbPress specific
|
| 152 |
+
wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten', $this->version, 'screen' );
|
| 153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
}
|
| 155 |
|
| 156 |
+
/**
|
| 157 |
+
* Enqueue the required Javascript files
|
| 158 |
+
*
|
| 159 |
+
* @since bbPress (r2652)
|
| 160 |
+
*
|
| 161 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 162 |
+
* @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
|
| 163 |
+
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
| 164 |
+
* @uses wp_enqueue_script() To enqueue the scripts
|
| 165 |
+
*/
|
| 166 |
+
public function enqueue_scripts() {
|
| 167 |
+
|
| 168 |
+
if ( bbp_is_single_topic() )
|
| 169 |
+
wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), $this->version );
|
| 170 |
+
|
| 171 |
+
if ( bbp_is_single_user_edit() )
|
| 172 |
+
wp_enqueue_script( 'user-profile' );
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
/**
|
| 176 |
+
* Put some scripts in the header, like AJAX url for wp-lists
|
| 177 |
+
*
|
| 178 |
+
* @since bbPress (r2652)
|
| 179 |
+
*
|
| 180 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 181 |
+
* @uses admin_url() To get the admin url
|
| 182 |
+
* @uses bbp_is_single_user_edit() To check if it's the profile edit page
|
| 183 |
+
*/
|
| 184 |
+
public function head_scripts() {
|
| 185 |
+
if ( bbp_is_single_topic() ) : ?>
|
| 186 |
+
|
| 187 |
+
<script type='text/javascript'>
|
| 188 |
+
/* <![CDATA[ */
|
| 189 |
+
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
| 190 |
+
/* ]]> */
|
| 191 |
+
</script>
|
| 192 |
+
|
| 193 |
+
<?php elseif ( bbp_is_single_user_edit() ) : ?>
|
| 194 |
+
|
| 195 |
+
<script type="text/javascript" charset="utf-8">
|
| 196 |
+
if ( window.location.hash == '#password' ) {
|
| 197 |
+
document.getElementById('pass1').focus();
|
| 198 |
+
}
|
| 199 |
+
</script>
|
| 200 |
+
|
| 201 |
+
<?php
|
| 202 |
+
endif;
|
| 203 |
}
|
| 204 |
|
| 205 |
+
/**
|
| 206 |
+
* Load localizations for topic script
|
| 207 |
+
*
|
| 208 |
+
* These localizations require information that may not be loaded even by init.
|
| 209 |
+
*
|
| 210 |
+
* @since bbPress (r2652)
|
| 211 |
+
*
|
| 212 |
+
* @uses bbp_is_single_topic() To check if it's the topic page
|
| 213 |
+
* @uses is_user_logged_in() To check if user is logged in
|
| 214 |
+
* @uses bbp_get_current_user_id() To get the current user id
|
| 215 |
+
* @uses bbp_get_topic_id() To get the topic id
|
| 216 |
+
* @uses bbp_get_favorites_permalink() To get the favorites permalink
|
| 217 |
+
* @uses bbp_is_user_favorite() To check if the topic is in user's favorites
|
| 218 |
+
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
| 219 |
+
* @uses bbp_is_user_subscribed() To check if the user is subscribed to topic
|
| 220 |
+
* @uses bbp_get_topic_permalink() To get the topic permalink
|
| 221 |
+
* @uses wp_localize_script() To localize the script
|
| 222 |
+
*/
|
| 223 |
+
public function localize_topic_script() {
|
| 224 |
+
|
| 225 |
+
// Bail if not viewing a single topic
|
| 226 |
+
if ( !bbp_is_single_topic() )
|
| 227 |
+
return;
|
| 228 |
+
|
| 229 |
+
// Bail if user is not logged in
|
| 230 |
+
if ( !is_user_logged_in() )
|
| 231 |
+
return;
|
| 232 |
+
|
| 233 |
+
$user_id = bbp_get_current_user_id();
|
| 234 |
+
|
| 235 |
+
$localizations = array(
|
| 236 |
+
'currentUserId' => $user_id,
|
| 237 |
+
'topicId' => bbp_get_topic_id(),
|
| 238 |
+
);
|
| 239 |
+
|
| 240 |
+
// Favorites
|
| 241 |
+
if ( bbp_is_favorites_active() ) {
|
| 242 |
+
$localizations['favoritesActive'] = 1;
|
| 243 |
+
$localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id );
|
| 244 |
+
$localizations['isFav'] = (int) bbp_is_user_favorite( $user_id );
|
| 245 |
+
$localizations['favLinkYes'] = __( 'favorites', 'bbpress' );
|
| 246 |
+
$localizations['favLinkNo'] = __( '?', 'bbpress' );
|
| 247 |
+
$localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' );
|
| 248 |
+
$localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' );
|
| 249 |
+
$localizations['favDel'] = __( '×', 'bbpress' );
|
| 250 |
+
$localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' );
|
| 251 |
+
} else {
|
| 252 |
+
$localizations['favoritesActive'] = 0;
|
| 253 |
+
}
|
| 254 |
|
| 255 |
+
// Subscriptions
|
| 256 |
+
if ( bbp_is_subscriptions_active() ) {
|
| 257 |
+
$localizations['subsActive'] = 1;
|
| 258 |
+
$localizations['isSubscribed'] = (int) bbp_is_user_subscribed( $user_id );
|
| 259 |
+
$localizations['subsSub'] = __( 'Subscribe', 'bbpress' );
|
| 260 |
+
$localizations['subsUns'] = __( 'Unsubscribe', 'bbpress' );
|
| 261 |
+
$localizations['subsLink'] = bbp_get_topic_permalink();
|
| 262 |
+
} else {
|
| 263 |
+
$localizations['subsActive'] = 0;
|
| 264 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
|
| 266 |
+
wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );
|
| 267 |
+
}
|
| 268 |
|
| 269 |
+
/**
|
| 270 |
+
* Add or remove a topic from a user's favorites
|
| 271 |
+
*
|
| 272 |
+
* @since bbPress (r2652)
|
| 273 |
+
*
|
| 274 |
+
* @uses bbp_get_current_user_id() To get the current user id
|
| 275 |
+
* @uses current_user_can() To check if the current user can edit the user
|
| 276 |
+
* @uses bbp_get_topic() To get the topic
|
| 277 |
+
* @uses check_ajax_referer() To verify the nonce & check the referer
|
| 278 |
+
* @uses bbp_is_user_favorite() To check if the topic is user's favorite
|
| 279 |
+
* @uses bbp_remove_user_favorite() To remove the topic from user's favorites
|
| 280 |
+
* @uses bbp_add_user_favorite() To add the topic from user's favorites
|
| 281 |
+
*/
|
| 282 |
+
public function ajax_favorite() {
|
| 283 |
+
$user_id = bbp_get_current_user_id();
|
| 284 |
+
$id = intval( $_POST['id'] );
|
| 285 |
+
|
| 286 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
| 287 |
+
die( '-1' );
|
| 288 |
+
|
| 289 |
+
if ( !$topic = bbp_get_topic( $id ) )
|
| 290 |
+
die( '0' );
|
| 291 |
+
|
| 292 |
+
check_ajax_referer( 'toggle-favorite_' . $topic->ID );
|
| 293 |
+
|
| 294 |
+
if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {
|
| 295 |
+
if ( bbp_remove_user_favorite( $user_id, $topic->ID ) ) {
|
| 296 |
+
die( '1' );
|
| 297 |
+
}
|
| 298 |
+
} else {
|
| 299 |
+
if ( bbp_add_user_favorite( $user_id, $topic->ID ) ) {
|
| 300 |
+
die( '1' );
|
| 301 |
+
}
|
| 302 |
+
}
|
| 303 |
|
| 304 |
+
die( '0' );
|
| 305 |
+
}
|
| 306 |
|
| 307 |
+
/**
|
| 308 |
+
* Subscribe/Unsubscribe a user from a topic
|
| 309 |
+
*
|
| 310 |
+
* @since bbPress (r2668)
|
| 311 |
+
*
|
| 312 |
+
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
| 313 |
+
* @uses bbp_get_current_user_id() To get the current user id
|
| 314 |
+
* @uses current_user_can() To check if the current user can edit the user
|
| 315 |
+
* @uses bbp_get_topic() To get the topic
|
| 316 |
+
* @uses check_ajax_referer() To verify the nonce & check the referer
|
| 317 |
+
* @uses bbp_is_user_subscribed() To check if the topic is in user's
|
| 318 |
+
* subscriptions
|
| 319 |
+
* @uses bbp_remove_user_subscriptions() To remove the topic from user's
|
| 320 |
+
* subscriptions
|
| 321 |
+
* @uses bbp_add_user_subscriptions() To add the topic from user's subscriptions
|
| 322 |
+
*/
|
| 323 |
+
public function ajax_subscription() {
|
| 324 |
+
if ( !bbp_is_subscriptions_active() )
|
| 325 |
+
return;
|
| 326 |
+
|
| 327 |
+
$user_id = bbp_get_current_user_id();
|
| 328 |
+
$id = intval( $_POST['id'] );
|
| 329 |
+
|
| 330 |
+
if ( !current_user_can( 'edit_user', $user_id ) )
|
| 331 |
+
die( '-1' );
|
| 332 |
+
|
| 333 |
+
if ( !$topic = bbp_get_topic( $id ) )
|
| 334 |
+
die( '0' );
|
| 335 |
+
|
| 336 |
+
check_ajax_referer( 'toggle-subscription_' . $topic->ID );
|
| 337 |
+
|
| 338 |
+
if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
|
| 339 |
+
if ( bbp_remove_user_subscription( $user_id, $topic->ID ) ) {
|
| 340 |
+
die( '1' );
|
| 341 |
+
}
|
| 342 |
+
} else {
|
| 343 |
+
if ( bbp_add_user_subscription( $user_id, $topic->ID ) ) {
|
| 344 |
+
die( '1' );
|
| 345 |
+
}
|
| 346 |
}
|
|
|
|
| 347 |
|
| 348 |
+
die( '0' );
|
| 349 |
+
}
|
| 350 |
}
|
|
|
|
|
|
|
| 351 |
|
|
|
|
| 352 |
/**
|
| 353 |
+
* Instantiate a new BBP_Twenty_Ten class inside the $bbp global. It is
|
| 354 |
+
* responsible for hooking itself into WordPress where apprpriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
*/
|
| 356 |
+
if ( 'bbPress' == get_class( $bbp ) ) {
|
| 357 |
+
$bbp->theme_compat->theme = new BBP_Twenty_Ten();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
}
|
| 359 |
+
|
| 360 |
endif;
|
| 361 |
|
| 362 |
?>
|
bbpress.php
CHANGED
|
@@ -11,11 +11,13 @@
|
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Plugin Name: bbPress
|
| 14 |
-
* Plugin URI:
|
| 15 |
* Description: bbPress is forum software with a twist from the creators of WordPress.
|
| 16 |
-
* Author:
|
| 17 |
-
* Author URI:
|
| 18 |
-
* Version:
|
|
|
|
|
|
|
| 19 |
*/
|
| 20 |
|
| 21 |
// Exit if accessed directly
|
|
@@ -31,17 +33,27 @@ if ( !class_exists( 'bbPress' ) ) :
|
|
| 31 |
*/
|
| 32 |
class bbPress {
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
/** Version ***************************************************************/
|
| 35 |
|
| 36 |
/**
|
| 37 |
* @public string bbPress version
|
| 38 |
*/
|
| 39 |
-
public $version = '2.0-rc-
|
| 40 |
|
| 41 |
/**
|
| 42 |
* @public string bbPress DB version
|
| 43 |
*/
|
| 44 |
-
public $db_version = '
|
| 45 |
|
| 46 |
/** Post types ************************************************************/
|
| 47 |
|
|
@@ -346,11 +358,13 @@ class bbPress {
|
|
| 346 |
$this->topic_tag_tax_id = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' );
|
| 347 |
|
| 348 |
// Status identifiers
|
| 349 |
-
$this->spam_status_id = apply_filters( 'bbp_spam_post_status',
|
| 350 |
-
$this->closed_status_id = apply_filters( 'bbp_closed_post_status',
|
| 351 |
-
$this->orphan_status_id = apply_filters( 'bbp_orphan_post_status',
|
| 352 |
-
$this->
|
| 353 |
-
$this->
|
|
|
|
|
|
|
| 354 |
|
| 355 |
// Other identifiers
|
| 356 |
$this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
|
|
@@ -427,6 +441,7 @@ class bbPress {
|
|
| 427 |
|
| 428 |
require( $this->plugin_dir . 'bbp-includes/bbp-extend-akismet.php' ); // Spam prevention for topics and replies
|
| 429 |
require( $this->plugin_dir . 'bbp-includes/bbp-extend-buddypress.php' ); // Social network integration
|
|
|
|
| 430 |
|
| 431 |
/** Components ********************************************************/
|
| 432 |
|
| 11 |
|
| 12 |
/**
|
| 13 |
* Plugin Name: bbPress
|
| 14 |
+
* Plugin URI: http://bbpress.org
|
| 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-5
|
| 19 |
+
* Text Domain: bbpress
|
| 20 |
+
* Domain Path: /bbp-languages/
|
| 21 |
*/
|
| 22 |
|
| 23 |
// Exit if accessed directly
|
| 33 |
*/
|
| 34 |
class bbPress {
|
| 35 |
|
| 36 |
+
/**
|
| 37 |
+
* Note to Plugin and Theme authors:
|
| 38 |
+
*
|
| 39 |
+
* Do not directly reference the variables below in your code. Their names
|
| 40 |
+
* and locations in the bbPress class are subject to change at any time.
|
| 41 |
+
*
|
| 42 |
+
* Most of them have reference functions located in bbp-includes. The ones
|
| 43 |
+
* that don't can be accessed via their respective WordPress API's.
|
| 44 |
+
*/
|
| 45 |
+
|
| 46 |
/** Version ***************************************************************/
|
| 47 |
|
| 48 |
/**
|
| 49 |
* @public string bbPress version
|
| 50 |
*/
|
| 51 |
+
public $version = '2.0-rc-5';
|
| 52 |
|
| 53 |
/**
|
| 54 |
* @public string bbPress DB version
|
| 55 |
*/
|
| 56 |
+
public $db_version = '185';
|
| 57 |
|
| 58 |
/** Post types ************************************************************/
|
| 59 |
|
| 358 |
$this->topic_tag_tax_id = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' );
|
| 359 |
|
| 360 |
// Status identifiers
|
| 361 |
+
$this->spam_status_id = apply_filters( 'bbp_spam_post_status', 'spam' );
|
| 362 |
+
$this->closed_status_id = apply_filters( 'bbp_closed_post_status', 'closed' );
|
| 363 |
+
$this->orphan_status_id = apply_filters( 'bbp_orphan_post_status', 'orphan' );
|
| 364 |
+
$this->public_status_id = apply_filters( 'bbp_public_post_status', 'publish' );
|
| 365 |
+
$this->private_status_id = apply_filters( 'bbp_private_post_status', 'private' );
|
| 366 |
+
$this->hidden_status_id = apply_filters( 'bbp_hidden_post_status', 'hidden' );
|
| 367 |
+
$this->trash_status_id = apply_filters( 'bbp_trash_post_status', 'trash' );
|
| 368 |
|
| 369 |
// Other identifiers
|
| 370 |
$this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
|
| 441 |
|
| 442 |
require( $this->plugin_dir . 'bbp-includes/bbp-extend-akismet.php' ); // Spam prevention for topics and replies
|
| 443 |
require( $this->plugin_dir . 'bbp-includes/bbp-extend-buddypress.php' ); // Social network integration
|
| 444 |
+
require( $this->plugin_dir . 'bbp-includes/bbp-extend-genesis.php' ); // Popular theme framework
|
| 445 |
|
| 446 |
/** Components ********************************************************/
|
| 447 |
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: matt, johnjamesjacoby
|
|
| 3 |
Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
|
| 4 |
Requires at least: 3.2.1
|
| 5 |
Tested up to: 3.2.1
|
| 6 |
-
Stable tag: 2.0-rc-
|
| 7 |
|
| 8 |
bbPress is forum software with a twist from the creators of WordPress
|
| 9 |
|
|
@@ -24,6 +24,14 @@ We're keeping things as small and light as possible while still allowing for gre
|
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
= 2.0-rc-4 =
|
| 28 |
* BuddyPress @mention integration
|
| 29 |
* Improved Akismet user agent handling
|
| 3 |
Tags: bbpress, forums, discussion, support, theme, buddypress, akismet, multisite
|
| 4 |
Requires at least: 3.2.1
|
| 5 |
Tested up to: 3.2.1
|
| 6 |
+
Stable tag: 2.0-rc-5
|
| 7 |
|
| 8 |
bbPress is forum software with a twist from the creators of WordPress
|
| 9 |
|
| 24 |
|
| 25 |
== Changelog ==
|
| 26 |
|
| 27 |
+
= 2.0-rc-5 =
|
| 28 |
+
* Fixed Genesis incompatibilities
|
| 29 |
+
* Fixed BuddyPress activity stream issues
|
| 30 |
+
* Fixed Subscription email sending issues
|
| 31 |
+
* Fixed Theme Compat display issues for some themes
|
| 32 |
+
* Improved Theme Compat class
|
| 33 |
+
* More future proofing internal API's
|
| 34 |
+
|
| 35 |
= 2.0-rc-4 =
|
| 36 |
* BuddyPress @mention integration
|
| 37 |
* Improved Akismet user agent handling
|
