bbPress - Version 2.6.6

Version Description

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 bbPress
Version 2.6.6
Comparing to
See all releases

Code changes from version 2.6.5 to 2.6.6

bbpress.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
- * $Id: bbpress.php 7090 2020-05-28 16:58:55Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
@@ -17,12 +17,12 @@
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Contributors
19
  * Author URI: https://bbpress.org
20
- * Version: 2.6.5
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  * License: GPLv2 or later (license.txt)
24
  * Requires PHP: 5.6.20
25
- * Requires at least: 4.7
26
  */
27
 
28
  // Exit if accessed directly
@@ -205,7 +205,7 @@ final class bbPress {
205
 
206
  /** Versions **********************************************************/
207
 
208
- $this->version = '2.6.5';
209
  $this->db_version = '263';
210
 
211
  /** Paths *************************************************************/
5
  *
6
  * bbPress is forum software with a twist from the creators of WordPress.
7
  *
8
+ * $Id: bbpress.php 7161 2020-11-06 01:05:46Z johnjamesjacoby $
9
  *
10
  * @package bbPress
11
  * @subpackage Main
17
  * Description: bbPress is forum software with a twist from the creators of WordPress.
18
  * Author: The bbPress Contributors
19
  * Author URI: https://bbpress.org
20
+ * Version: 2.6.6
21
  * Text Domain: bbpress
22
  * Domain Path: /languages/
23
  * License: GPLv2 or later (license.txt)
24
  * Requires PHP: 5.6.20
25
+ * Requires at least: 5.0
26
  */
27
 
28
  // Exit if accessed directly
205
 
206
  /** Versions **********************************************************/
207
 
208
+ $this->version = '2.6.6';
209
  $this->db_version = '263';
210
 
211
  /** Paths *************************************************************/
bbpress.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPLv2 or later (license.txt).
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: bbPress 2.6.5\n"
6
  "Report-Msgid-Bugs-To: https://bbpress.trac.wordpress.org\n"
7
- "POT-Creation-Date: 2020-05-28 16:59:55+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -45,7 +45,7 @@ msgstr ""
45
  msgid "bbPress User Activity"
46
  msgstr ""
47
 
48
- #: includes/admin/actions.php:178 includes/admin/forums.php:538
49
  #: includes/admin/settings.php:281 includes/admin/settings.php:302
50
  #: includes/admin/tools/common.php:437 includes/admin/topics.php:854
51
  #: includes/extend/buddypress/activity.php:197
@@ -57,11 +57,11 @@ msgstr ""
57
  msgid "Topics"
58
  msgstr ""
59
 
60
- #: includes/admin/actions.php:183 includes/admin/actions.php:195
61
  #: includes/admin/forums.php:539 includes/admin/settings.php:289
62
  #: includes/admin/settings.php:310 includes/admin/tools/common.php:440
63
  #: includes/admin/topics.php:390 includes/admin/topics.php:856
64
- #: includes/core/theme-compat.php:694
65
  #: includes/extend/buddypress/activity.php:207
66
  #: includes/extend/buddypress/activity.php:392
67
  #: includes/forums/template.php:2714 includes/replies/template.php:49
@@ -74,7 +74,7 @@ msgstr ""
74
  msgid "Replies"
75
  msgstr ""
76
 
77
- #: includes/admin/actions.php:190 includes/admin/actions.php:202
78
  #: includes/admin/forums.php:537 includes/admin/metaboxes.php:113
79
  #: includes/admin/metaboxes.php:432 includes/admin/metaboxes.php:496
80
  #: includes/admin/replies.php:665 includes/admin/settings.php:352
@@ -84,7 +84,7 @@ msgstr ""
84
  msgid "Forum"
85
  msgstr ""
86
 
87
- #: includes/admin/actions.php:207 includes/admin/metaboxes.php:130
88
  #: includes/admin/metaboxes.php:523 includes/admin/replies.php:666
89
  #: includes/admin/settings.php:360 includes/topics/template.php:49
90
  #: templates/default/bbpress/content-single-topic-lead.php:23
@@ -147,7 +147,7 @@ msgstr ""
147
 
148
  #: includes/admin/classes/class-bbp-admin.php:938
149
  #: includes/admin/classes/class-bbp-admin.php:1018
150
- #: includes/common/classes.php:493 includes/replies/template.php:2564
151
  msgid "%1$s - %2$s"
152
  msgstr ""
153
 
@@ -626,13 +626,13 @@ msgstr ""
626
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:91
627
  #: includes/admin/replies.php:235 includes/admin/replies.php:818
628
  #: includes/admin/topics.php:240 includes/admin/topics.php:1023
629
- #: includes/replies/template.php:2028 includes/topics/template.php:2807
630
  msgid "Spam"
631
  msgstr ""
632
 
633
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:92
634
  #: includes/admin/replies.php:833 includes/admin/topics.php:1037
635
- #: includes/replies/template.php:1960 includes/topics/template.php:2515
636
  msgid "Trash"
637
  msgstr ""
638
 
@@ -645,7 +645,7 @@ msgstr ""
645
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:149
646
  #: includes/admin/settings.php:392 includes/common/template.php:2331
647
  #: includes/forums/template.php:54 includes/replies/template.php:55
648
- #: includes/replies/template.php:1848 includes/topics/template.php:53
649
  #: includes/topics/template.php:2403
650
  #: templates/default/bbpress/user-details.php:74
651
  msgid "Edit"
@@ -1057,7 +1057,7 @@ msgstr[0] ""
1057
  msgstr[1] ""
1058
 
1059
  #: includes/admin/metaboxes.php:166 includes/admin/settings.php:368
1060
- #: includes/topics/template.php:3380
1061
  msgid "Topic Tag"
1062
  msgid_plural "Topic Tags"
1063
  msgstr[0] ""
@@ -1402,7 +1402,7 @@ msgid "<strong>Reply To</strong> determines the threading of the reply."
1402
  msgstr ""
1403
 
1404
  #: includes/admin/replies.php:233 includes/admin/topics.php:238
1405
- #: includes/replies/template.php:2029 includes/topics/template.php:2808
1406
  msgid "Unspam"
1407
  msgstr ""
1408
 
@@ -1521,22 +1521,22 @@ msgid "Not Spam"
1521
  msgstr ""
1522
 
1523
  #: includes/admin/replies.php:831 includes/admin/topics.php:1035
1524
- #: includes/replies/template.php:1978 includes/topics/template.php:2532
1525
  msgid "Restore this item from the Trash"
1526
  msgstr ""
1527
 
1528
  #: includes/admin/replies.php:831 includes/admin/topics.php:1035
1529
- #: includes/replies/template.php:1961 includes/topics/template.php:2516
1530
  msgid "Restore"
1531
  msgstr ""
1532
 
1533
  #: includes/admin/replies.php:833 includes/admin/topics.php:1037
1534
- #: includes/replies/template.php:1982 includes/topics/template.php:2534
1535
  msgid "Move this item to the Trash"
1536
  msgstr ""
1537
 
1538
  #: includes/admin/replies.php:837 includes/admin/topics.php:1041
1539
- #: includes/replies/template.php:1987 includes/topics/template.php:2538
1540
  msgid "Delete this item permanently"
1541
  msgstr ""
1542
 
@@ -1653,7 +1653,7 @@ msgstr ""
1653
  msgid "Editing"
1654
  msgstr ""
1655
 
1656
- #: includes/admin/settings.php:155 includes/users/template.php:800
1657
  msgid "Anonymous"
1658
  msgstr ""
1659
 
@@ -2390,8 +2390,8 @@ msgstr ""
2390
  msgid "Users"
2391
  msgstr ""
2392
 
2393
- #: includes/admin/tools/common.php:443 includes/topics/template.php:3378
2394
- #: includes/topics/template.php:3379
2395
  #: templates/default/bbpress/content-statistics.php:40
2396
  msgid "Topic Tags"
2397
  msgstr ""
@@ -2592,7 +2592,7 @@ msgstr ""
2592
  #: includes/admin/tools/repair.php:661 includes/admin/tools/repair.php:726
2593
  #: includes/admin/tools/repair.php:795 includes/admin/tools/repair.php:903
2594
  #: includes/admin/tools/repair.php:1024 includes/admin/tools/repair.php:1136
2595
- #: includes/admin/tools/repair.php:1156 includes/admin/tools/repair.php:1207
2596
  #: includes/admin/tools/reset.php:122 includes/admin/tools/upgrade.php:288
2597
  msgid "Failed!"
2598
  msgstr ""
@@ -2604,8 +2604,8 @@ msgstr ""
2604
  #: includes/admin/tools/repair.php:579 includes/admin/tools/repair.php:646
2605
  #: includes/admin/tools/repair.php:711 includes/admin/tools/repair.php:776
2606
  #: includes/admin/tools/repair.php:1009 includes/admin/tools/repair.php:1069
2607
- #: includes/admin/tools/repair.php:1140 includes/admin/tools/repair.php:1192
2608
- #: includes/admin/tools/repair.php:1243 includes/admin/tools/repair.php:1294
2609
  msgid "Complete!"
2610
  msgstr ""
2611
 
@@ -2700,15 +2700,15 @@ msgstr ""
2700
  msgid "Recalculating the forum for each post&hellip; %s"
2701
  msgstr ""
2702
 
2703
- #: includes/admin/tools/repair.php:1206
2704
  msgid "Recalculating the topic for each post&hellip; %s"
2705
  msgstr ""
2706
 
2707
- #: includes/admin/tools/repair.php:1257
2708
  msgid "Recalculating reply menu order&hellip; %s"
2709
  msgstr ""
2710
 
2711
- #: includes/admin/tools/repair.php:1258
2712
  msgid "No reply positions to recalculate."
2713
  msgstr ""
2714
 
@@ -2731,7 +2731,7 @@ msgstr ""
2731
  msgid "All Topics"
2732
  msgstr ""
2733
 
2734
- #: includes/admin/tools/reset.php:36 includes/replies/functions.php:2125
2735
  #: includes/replies/template.php:52
2736
  msgid "All Replies"
2737
  msgstr ""
@@ -3599,7 +3599,7 @@ msgid "Forum Role"
3599
  msgstr ""
3600
 
3601
  #: includes/admin/users.php:107 includes/admin/users.php:111
3602
- #: includes/users/template.php:1541
3603
  msgid "&mdash; No role for these forums &mdash;"
3604
  msgstr ""
3605
 
@@ -3686,11 +3686,11 @@ msgid "Private: %s"
3686
  msgstr ""
3687
 
3688
  #: includes/common/functions.php:556
3689
- msgid "<strong>ERROR</strong>: Invalid author name."
3690
  msgstr ""
3691
 
3692
  #: includes/common/functions.php:562
3693
- msgid "<strong>ERROR</strong>: Invalid email address."
3694
  msgstr ""
3695
 
3696
  #: includes/common/functions.php:1101
@@ -3750,7 +3750,7 @@ msgid "(Edit)"
3750
  msgstr ""
3751
 
3752
  #: includes/common/template.php:2327 includes/common/template.php:2442
3753
- #: includes/common/template.php:2687 includes/core/theme-compat.php:794
3754
  #: templates/default/extras/taxonomy-topic-tag-edit.php:17
3755
  #: templates/default/extras/taxonomy-topic-tag.php:17
3756
  msgid "Topic Tag: %s"
@@ -4043,63 +4043,64 @@ msgstr ""
4043
  msgid "And this is the very first reply."
4044
  msgstr ""
4045
 
4046
- #: includes/extend/akismet.php:171 includes/extend/akismet.php:473
 
4047
  msgid "No response"
4048
  msgstr ""
4049
 
4050
- #: includes/extend/akismet.php:345
4051
  #. translators: %s: reporter name
4052
  msgid "%s reported this topic as spam"
4053
  msgstr ""
4054
 
4055
- #: includes/extend/akismet.php:350
4056
  #. translators: %s: reporter name
4057
  msgid "%s reported this reply as spam"
4058
  msgstr ""
4059
 
4060
- #: includes/extend/akismet.php:355
4061
  #. translators: 1: reporter name, 2: comment type
4062
  msgid "%1$s reported this %2$s as spam"
4063
  msgstr ""
4064
 
4065
- #: includes/extend/akismet.php:370
4066
  #. translators: %s: reporter name
4067
  msgid "%s reported this topic as not spam"
4068
  msgstr ""
4069
 
4070
- #: includes/extend/akismet.php:375
4071
  #. translators: %s: reporter name
4072
  msgid "%s reported this reply as not spam"
4073
  msgstr ""
4074
 
4075
- #: includes/extend/akismet.php:380
4076
  #. translators: 1: reporter name, 2: comment type
4077
  msgid "%1$s reported this %2$s as not spam"
4078
  msgstr ""
4079
 
4080
- #: includes/extend/akismet.php:527
4081
  msgid "Akismet caught this post as spam"
4082
  msgstr ""
4083
 
4084
- #: includes/extend/akismet.php:531 includes/extend/akismet.php:543
4085
  msgid "Post status was changed to %s"
4086
  msgstr ""
4087
 
4088
- #: includes/extend/akismet.php:539
4089
  msgid "Akismet cleared this post as not spam"
4090
  msgstr ""
4091
 
4092
- #: includes/extend/akismet.php:550
4093
  msgid ""
4094
  "Akismet was unable to check this post (response: %s), will automatically "
4095
  "retry again later."
4096
  msgstr ""
4097
 
4098
- #: includes/extend/akismet.php:752 includes/extend/akismet.php:762
4099
  msgid "Akismet History"
4100
  msgstr ""
4101
 
4102
- #: includes/extend/akismet.php:806
4103
  msgid "No recorded history. Akismet has not checked this post."
4104
  msgstr ""
4105
 
@@ -4122,11 +4123,11 @@ msgid "%1$s replied to the topic %2$s in the forum %3$s"
4122
  msgstr ""
4123
 
4124
  #: includes/extend/buddypress/groups.php:379
4125
- msgid "<strong>ERROR</strong>: Forum ID is invalid."
4126
  msgstr ""
4127
 
4128
  #: includes/extend/buddypress/groups.php:442
4129
- msgid "<strong>ERROR</strong>: Reply To is invalid."
4130
  msgstr ""
4131
 
4132
  #: includes/extend/buddypress/groups.php:467
@@ -4164,17 +4165,17 @@ msgstr ""
4164
 
4165
  #: includes/extend/buddypress/groups.php:531
4166
  #: includes/extend/buddypress/groups.php:688
4167
- #: includes/extend/buddypress/notifications.php:196
4168
  #: includes/forums/functions.php:126 includes/forums/functions.php:393
4169
- #: includes/replies/functions.php:134 includes/replies/functions.php:517
4170
- #: includes/replies/functions.php:1238 includes/topics/functions.php:105
4171
- #: includes/topics/functions.php:468 includes/topics/functions.php:1092
4172
- #: includes/topics/functions.php:1367 includes/topics/functions.php:1703
4173
- #: includes/topics/functions.php:1747 includes/topics/functions.php:1808
4174
  #: includes/users/engagements.php:612 includes/users/engagements.php:853
4175
  #: includes/users/functions.php:196 includes/users/functions.php:202
4176
  #: includes/users/functions.php:380
4177
- msgid "<strong>ERROR</strong>: Are you sure you wanted to do that?"
4178
  msgstr ""
4179
 
4180
  #: includes/extend/buddypress/groups.php:668
@@ -4199,103 +4200,103 @@ msgid "You have %d new replies"
4199
  msgstr ""
4200
 
4201
  #: includes/extend/buddypress/notifications.php:95
4202
- msgid "You have %d new reply to %2$s from %3$s"
4203
  msgstr ""
4204
 
4205
  #: includes/extend/buddypress/notifications.php:96
4206
- msgid "You have %d new reply to %s"
4207
  msgstr ""
4208
 
4209
  #: includes/extend/buddypress/notifications.php:101
4210
  msgid "Topic Replies"
4211
  msgstr ""
4212
 
4213
- #: includes/extend/buddypress/notifications.php:200
4214
  msgid ""
4215
- "<strong>ERROR</strong>: You do not have permission to mark notifications "
4216
  "for that user."
4217
  msgstr ""
4218
 
4219
  #: includes/forums/functions.php:140
4220
- msgid "<strong>ERROR</strong>: You do not have permission to create new forums."
4221
  msgstr ""
4222
 
4223
  #: includes/forums/functions.php:165 includes/forums/functions.php:454
4224
- msgid "<strong>ERROR</strong>: Your forum needs a title."
4225
  msgstr ""
4226
 
4227
  #: includes/forums/functions.php:170 includes/forums/functions.php:459
4228
- #: includes/replies/functions.php:284 includes/replies/functions.php:601
4229
  #: includes/topics/functions.php:163 includes/topics/functions.php:535
4230
- msgid "<strong>ERROR</strong>: Your title is too long."
4231
  msgstr ""
4232
 
4233
  #: includes/forums/functions.php:184 includes/forums/functions.php:473
4234
- msgid "<strong>ERROR</strong>: Your forum description cannot be empty."
4235
  msgstr ""
4236
 
4237
  #: includes/forums/functions.php:199
4238
- msgid "<strong>ERROR</strong>: Your forum must have a parent."
4239
  msgstr ""
4240
 
4241
  #: includes/forums/functions.php:206
4242
  msgid ""
4243
- "<strong>ERROR</strong>: This forum is a category. No forums can be created "
4244
  "in this forum."
4245
  msgstr ""
4246
 
4247
  #: includes/forums/functions.php:211 includes/forums/functions.php:429
4248
- msgid "<strong>ERROR</strong>: This forum has been closed to new forums."
4249
  msgstr ""
4250
 
4251
  #: includes/forums/functions.php:216 includes/forums/functions.php:434
4252
  msgid ""
4253
- "<strong>ERROR</strong>: This forum is private and you do not have the "
4254
  "capability to read or create new forums in it."
4255
  msgstr ""
4256
 
4257
  #: includes/forums/functions.php:221 includes/forums/functions.php:439
4258
  msgid ""
4259
- "<strong>ERROR</strong>: This forum is hidden and you do not have the "
4260
  "capability to read or create new forums in it."
4261
  msgstr ""
4262
 
4263
  #: includes/forums/functions.php:228 includes/replies/functions.php:304
4264
  #: includes/topics/functions.php:247
4265
- msgid "<strong>ERROR</strong>: Slow down; you move too fast."
4266
  msgstr ""
4267
 
4268
  #: includes/forums/functions.php:234
4269
- msgid "<strong>ERROR</strong>: This forum already exists."
4270
  msgstr ""
4271
 
4272
  #: includes/forums/functions.php:240
4273
- msgid "<strong>ERROR</strong>: Your forum cannot be created at this time."
4274
  msgstr ""
4275
 
4276
- #: includes/forums/functions.php:353 includes/replies/functions.php:474
4277
  #: includes/topics/functions.php:400
4278
- msgid "<strong>ERROR</strong>: The following problem(s) occurred: %s"
4279
  msgstr ""
4280
 
4281
  #: includes/forums/functions.php:357
4282
- msgid "<strong>ERROR</strong>: The forum was not created."
4283
  msgstr ""
4284
 
4285
  #: includes/forums/functions.php:382
4286
- msgid "<strong>ERROR</strong>: Forum ID not found."
4287
  msgstr ""
4288
 
4289
  #: includes/forums/functions.php:398
4290
- msgid "<strong>ERROR</strong>: The forum you want to edit was not found."
4291
  msgstr ""
4292
 
4293
  #: includes/forums/functions.php:403
4294
- msgid "<strong>ERROR</strong>: You do not have permission to edit that forum."
4295
  msgstr ""
4296
 
4297
  #: includes/forums/functions.php:479
4298
- msgid "<strong>ERROR</strong>: Your forum cannot be edited at this time."
4299
  msgstr ""
4300
 
4301
  #: includes/forums/template.php:52 includes/replies/template.php:53
@@ -4388,12 +4389,12 @@ msgid "Forum scheduled."
4388
  msgstr ""
4389
 
4390
  #: includes/forums/template.php:833 includes/topics/template.php:1781
4391
- #: includes/users/template.php:1273
4392
  msgid "Subscribe"
4393
  msgstr ""
4394
 
4395
  #: includes/forums/template.php:834 includes/topics/template.php:1782
4396
- #: includes/users/template.php:1274
4397
  msgid "Unsubscribe"
4398
  msgstr ""
4399
 
@@ -4452,196 +4453,196 @@ msgid "This forum is empty."
4452
  msgstr ""
4453
 
4454
  #: includes/replies/functions.php:159
4455
- msgid "<strong>ERROR</strong>: You do not have permission to reply."
4456
  msgstr ""
4457
 
4458
  #: includes/replies/functions.php:170
4459
- msgid "<strong>ERROR</strong>: Topic ID is missing."
4460
  msgstr ""
4461
 
4462
  #: includes/replies/functions.php:174
4463
- msgid "<strong>ERROR</strong>: Topic ID must be a number."
4464
  msgstr ""
4465
 
4466
  #: includes/replies/functions.php:184
4467
- msgid "<strong>ERROR</strong>: Topic ID cannot be a negative number."
4468
  msgstr ""
4469
 
4470
  #: includes/replies/functions.php:188
4471
- msgid "<strong>ERROR</strong>: Topic does not exist."
4472
  msgstr ""
4473
 
4474
  #: includes/replies/functions.php:207 includes/replies/functions.php:221
4475
  #: includes/topics/functions.php:187 includes/topics/functions.php:201
4476
  #: includes/topics/functions.php:483
4477
- msgid "<strong>ERROR</strong>: Forum ID is missing."
4478
  msgstr ""
4479
 
4480
  #: includes/replies/functions.php:211 includes/topics/functions.php:191
4481
- msgid "<strong>ERROR</strong>: Forum ID must be a number."
4482
  msgstr ""
4483
 
4484
  #: includes/replies/functions.php:225 includes/topics/functions.php:205
4485
- msgid "<strong>ERROR</strong>: Forum ID cannot be a negative number."
4486
  msgstr ""
4487
 
4488
  #: includes/replies/functions.php:229 includes/topics/functions.php:209
4489
- msgid "<strong>ERROR</strong>: Forum does not exist."
4490
  msgstr ""
4491
 
4492
- #: includes/replies/functions.php:243 includes/replies/functions.php:569
4493
  msgid ""
4494
- "<strong>ERROR</strong>: This forum is a category. No replies can be created "
4495
  "in this forum."
4496
  msgstr ""
4497
 
4498
- #: includes/replies/functions.php:250 includes/replies/functions.php:576
4499
- msgid "<strong>ERROR</strong>: This forum has been closed to new replies."
4500
  msgstr ""
4501
 
4502
- #: includes/replies/functions.php:255 includes/replies/functions.php:581
4503
  msgid ""
4504
- "<strong>ERROR</strong>: This forum is private and you do not have the "
4505
  "capability to read or create new replies in it."
4506
  msgstr ""
4507
 
4508
- #: includes/replies/functions.php:259 includes/replies/functions.php:585
4509
  msgid ""
4510
- "<strong>ERROR</strong>: This forum is hidden and you do not have the "
4511
  "capability to read or create new replies in it."
4512
  msgstr ""
4513
 
4514
- #: includes/replies/functions.php:298 includes/replies/functions.php:615
4515
- msgid "<strong>ERROR</strong>: Your reply cannot be empty."
4516
  msgstr ""
4517
 
4518
  #: includes/replies/functions.php:310
4519
  msgid ""
4520
- "<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
4521
  "you&#8217;ve already said that."
4522
  msgstr ""
4523
 
4524
  #: includes/replies/functions.php:316
4525
- msgid "<strong>ERROR</strong>: Your reply cannot be created at this time."
4526
  msgstr ""
4527
 
4528
  #: includes/replies/functions.php:341
4529
- msgid "<strong>ERROR</strong>: Topic is closed."
4530
  msgstr ""
4531
 
4532
- #: includes/replies/functions.php:401 includes/replies/functions.php:711
4533
- msgid "<strong>ERROR</strong>: There was a problem adding the tags to the topic."
4534
  msgstr ""
4535
 
4536
- #: includes/replies/functions.php:478
4537
- msgid "<strong>ERROR</strong>: The reply was not created."
4538
  msgstr ""
4539
 
4540
- #: includes/replies/functions.php:506
4541
- msgid "<strong>ERROR</strong>: Reply ID not found."
4542
  msgstr ""
4543
 
4544
- #: includes/replies/functions.php:523
4545
- msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
4546
  msgstr ""
4547
 
4548
- #: includes/replies/functions.php:534
4549
- msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
4550
  msgstr ""
4551
 
4552
- #: includes/replies/functions.php:621
4553
- msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
4554
  msgstr ""
4555
 
4556
- #: includes/replies/functions.php:1214
4557
- msgid "<strong>ERROR</strong>: A reply ID is required"
4558
  msgstr ""
4559
 
4560
- #: includes/replies/functions.php:1223
4561
- msgid "<strong>ERROR</strong>: The reply you want to move was not found."
4562
  msgstr ""
4563
 
4564
- #: includes/replies/functions.php:1233
4565
- msgid "<strong>ERROR</strong>: The topic you want to move from was not found."
4566
  msgstr ""
4567
 
4568
- #: includes/replies/functions.php:1244 includes/topics/functions.php:1103
4569
- #: includes/topics/functions.php:1373
4570
- msgid "<strong>ERROR</strong>: You do not have permission to edit the source topic."
4571
  msgstr ""
4572
 
4573
- #: includes/replies/functions.php:1254
4574
- msgid "<strong>ERROR</strong>: You need to choose a valid move option."
4575
  msgstr ""
4576
 
4577
- #: includes/replies/functions.php:1267 includes/topics/functions.php:1396
4578
- msgid "<strong>ERROR</strong>: A topic ID is required."
4579
  msgstr ""
4580
 
4581
- #: includes/replies/functions.php:1277
4582
- msgid "<strong>ERROR</strong>: The topic you want to move to was not found."
4583
  msgstr ""
4584
 
4585
- #: includes/replies/functions.php:1282 includes/topics/functions.php:1123
4586
- #: includes/topics/functions.php:1411
4587
  msgid ""
4588
- "<strong>ERROR</strong>: You do not have permission to edit the destination "
4589
  "topic."
4590
  msgstr ""
4591
 
4592
- #: includes/replies/functions.php:1336 includes/topics/functions.php:1449
4593
  msgid ""
4594
- "<strong>ERROR</strong>: There was a problem converting the reply into the "
4595
  "topic. Please try again."
4596
  msgstr ""
4597
 
4598
- #: includes/replies/functions.php:1341 includes/topics/functions.php:1454
4599
  msgid ""
4600
- "<strong>ERROR</strong>: You do not have permission to create new topics. "
4601
  "The reply could not be converted into a topic."
4602
  msgstr ""
4603
 
4604
- #: includes/replies/functions.php:1489
4605
- msgid "<strong>ERROR</strong>: This reply could not be found or no longer exists."
4606
- msgstr ""
4607
-
4608
- #: includes/replies/functions.php:1495 includes/topics/functions.php:2025
4609
- msgid "<strong>ERROR</strong>: You do not have permission to do that."
4610
  msgstr ""
4611
 
4612
- #: includes/replies/functions.php:1571
4613
- msgid "<strong>ERROR</strong>: There was a problem approving the reply."
4614
  msgstr ""
4615
 
4616
- #: includes/replies/functions.php:1571
4617
- msgid "<strong>ERROR</strong>: There was a problem unapproving the reply."
4618
  msgstr ""
4619
 
4620
- #: includes/replies/functions.php:1582
4621
- msgid "<strong>ERROR</strong>: There was a problem unmarking the reply as spam."
4622
  msgstr ""
4623
 
4624
- #: includes/replies/functions.php:1582
4625
- msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam."
4626
  msgstr ""
4627
 
4628
- #: includes/replies/functions.php:1597
4629
- msgid "<strong>ERROR</strong>: There was a problem trashing the reply."
4630
  msgstr ""
4631
 
4632
  #: includes/replies/functions.php:1605
4633
- msgid "<strong>ERROR</strong>: There was a problem untrashing the reply."
4634
  msgstr ""
4635
 
4636
  #: includes/replies/functions.php:1613
4637
- msgid "<strong>ERROR</strong>: There was a problem deleting the reply."
4638
  msgstr ""
4639
 
4640
- #: includes/replies/functions.php:2123
 
 
 
 
4641
  msgid "All Posts"
4642
  msgstr ""
4643
 
4644
- #: includes/replies/functions.php:2169 includes/topics/functions.php:3800
4645
  msgid "Replies: %s"
4646
  msgstr ""
4647
 
@@ -4737,85 +4738,85 @@ msgstr ""
4737
  msgid "Reply scheduled."
4738
  msgstr ""
4739
 
4740
- #: includes/replies/template.php:551
4741
  #: templates/default/bbpress/form-reply.php:30
4742
  msgid "Reply To: %s"
4743
  msgstr ""
4744
 
4745
- #: includes/replies/template.php:763
4746
  msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
4747
  msgstr ""
4748
 
4749
- #: includes/replies/template.php:765
4750
  msgid "This reply was modified %1$s by %2$s."
4751
  msgstr ""
4752
 
4753
- #: includes/replies/template.php:1195 includes/topics/template.php:1429
4754
- #: includes/users/template.php:1999
4755
  msgid "View %s's profile"
4756
  msgstr ""
4757
 
4758
- #: includes/replies/template.php:1196 includes/topics/template.php:1430
4759
- #: includes/users/template.php:2000
4760
  msgid "Visit %s's website"
4761
  msgstr ""
4762
 
4763
- #: includes/replies/template.php:1652
4764
  #: templates/default/bbpress/form-user-passwords.php:31
4765
  msgid "Cancel"
4766
  msgstr ""
4767
 
4768
- #: includes/replies/template.php:1962 includes/topics/template.php:2517
4769
  #: templates/default/bbpress/form-topic-tag.php:100
4770
  #: templates/default/bbpress/form-topic-tag.php:117
4771
  msgid "Delete"
4772
  msgstr ""
4773
 
4774
- #: includes/replies/template.php:1987 includes/topics/template.php:2538
4775
  msgid "Are you sure you want to delete that permanently?"
4776
  msgstr ""
4777
 
4778
- #: includes/replies/template.php:2084
4779
  msgid "Move"
4780
  msgstr ""
4781
 
4782
- #: includes/replies/template.php:2085
4783
  msgid "Move this reply"
4784
  msgstr ""
4785
 
4786
- #: includes/replies/template.php:2143
4787
  msgid "Split"
4788
  msgstr ""
4789
 
4790
- #: includes/replies/template.php:2144
4791
  msgid "Split the topic from this reply"
4792
  msgstr ""
4793
 
4794
- #: includes/replies/template.php:2378
4795
  msgid "Viewing %1$s reply thread"
4796
  msgid_plural "Viewing %1$s reply threads"
4797
  msgstr[0] ""
4798
  msgstr[1] ""
4799
 
4800
- #: includes/replies/template.php:2385
4801
  msgid "Viewing %1$s reply"
4802
  msgid_plural "Viewing %1$s replies"
4803
  msgstr[0] ""
4804
  msgstr[1] ""
4805
 
4806
- #: includes/replies/template.php:2389
4807
  msgid "Viewing %2$s replies (of %4$s total)"
4808
  msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
4809
  msgstr[0] ""
4810
  msgstr[1] ""
4811
 
4812
- #: includes/replies/template.php:2397
4813
  msgid "Viewing %1$s post"
4814
  msgid_plural "Viewing %1$s posts"
4815
  msgstr[0] ""
4816
  msgstr[1] ""
4817
 
4818
- #: includes/replies/template.php:2401
4819
  msgid "Viewing %2$s post (of %4$s total)"
4820
  msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
4821
  msgstr[0] ""
@@ -4838,193 +4839,193 @@ msgstr[0] ""
4838
  msgstr[1] ""
4839
 
4840
  #: includes/topics/functions.php:132
4841
- msgid "<strong>ERROR</strong>: You do not have permission to create new topics."
4842
  msgstr ""
4843
 
4844
  #: includes/topics/functions.php:158 includes/topics/functions.php:530
4845
- msgid "<strong>ERROR</strong>: Your topic needs a title."
4846
  msgstr ""
4847
 
4848
  #: includes/topics/functions.php:177 includes/topics/functions.php:549
4849
- msgid "<strong>ERROR</strong>: Your topic cannot be empty."
4850
  msgstr ""
4851
 
4852
  #: includes/topics/functions.php:223
4853
  msgid ""
4854
- "<strong>ERROR</strong>: This forum is a category. No topics can be created "
4855
  "in this forum."
4856
  msgstr ""
4857
 
4858
  #: includes/topics/functions.php:230 includes/topics/functions.php:505
4859
- msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
4860
  msgstr ""
4861
 
4862
  #: includes/topics/functions.php:235 includes/topics/functions.php:510
4863
  msgid ""
4864
- "<strong>ERROR</strong>: This forum is private and you do not have the "
4865
  "capability to read or create new topics in it."
4866
  msgstr ""
4867
 
4868
  #: includes/topics/functions.php:239 includes/topics/functions.php:514
4869
  msgid ""
4870
- "<strong>ERROR</strong>: This forum is hidden and you do not have the "
4871
  "capability to read or create new topics in it."
4872
  msgstr ""
4873
 
4874
  #: includes/topics/functions.php:253
4875
  msgid ""
4876
- "<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
4877
  "you&#8217;ve already said that."
4878
  msgstr ""
4879
 
4880
  #: includes/topics/functions.php:259
4881
- msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
4882
  msgstr ""
4883
 
4884
  #: includes/topics/functions.php:404
4885
- msgid "<strong>ERROR</strong>: The topic was not created."
4886
  msgstr ""
4887
 
4888
- #: includes/topics/functions.php:430 includes/topics/functions.php:1085
4889
- msgid "<strong>ERROR</strong>: Topic ID not found."
4890
  msgstr ""
4891
 
4892
  #: includes/topics/functions.php:441
4893
- msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
4894
  msgstr ""
4895
 
4896
  #: includes/topics/functions.php:452
4897
- msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
4898
  msgstr ""
4899
 
4900
  #: includes/topics/functions.php:498
4901
  msgid ""
4902
- "<strong>ERROR</strong>: This forum is a category. No topics can be created "
4903
  "in it."
4904
  msgstr ""
4905
 
4906
  #: includes/topics/functions.php:555
4907
- msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
4908
  msgstr ""
4909
 
4910
- #: includes/topics/functions.php:1097
4911
- msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
4912
  msgstr ""
4913
 
4914
- #: includes/topics/functions.php:1111
4915
- msgid "<strong>ERROR</strong>: Destination topic ID not found."
4916
  msgstr ""
4917
 
4918
- #: includes/topics/functions.php:1118
4919
- msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
4920
  msgstr ""
4921
 
4922
- #: includes/topics/functions.php:1343
4923
- msgid "<strong>ERROR</strong>: A reply ID is required."
4924
  msgstr ""
4925
 
4926
- #: includes/topics/functions.php:1352
4927
- msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
4928
  msgstr ""
4929
 
4930
- #: includes/topics/functions.php:1362
4931
- msgid "<strong>ERROR</strong>: The topic you want to split was not found."
4932
  msgstr ""
4933
 
4934
- #: includes/topics/functions.php:1383
4935
- msgid "<strong>ERROR</strong>: You need to choose a valid split option."
4936
  msgstr ""
4937
 
4938
- #: includes/topics/functions.php:1406
4939
- msgid "<strong>ERROR</strong>: The topic you want to split to was not found."
4940
  msgstr ""
4941
 
4942
- #: includes/topics/functions.php:1691
4943
  msgid ""
4944
- "<strong>ERROR</strong>: The following problem(s) have been found while "
4945
  "getting the tag: %s"
4946
  msgstr ""
4947
 
4948
- #: includes/topics/functions.php:1709 includes/topics/functions.php:1753
4949
- msgid "<strong>ERROR</strong>: You do not have permission to edit the topic tags."
4950
  msgstr ""
4951
 
4952
- #: includes/topics/functions.php:1715 includes/topics/functions.php:1759
4953
- msgid "<strong>ERROR</strong>: You need to enter a tag name."
4954
  msgstr ""
4955
 
4956
- #: includes/topics/functions.php:1730
4957
  msgid ""
4958
- "<strong>ERROR</strong>: The following problem(s) have been found while "
4959
  "updating the tag: %s"
4960
  msgstr ""
4961
 
4962
- #: includes/topics/functions.php:1770 includes/topics/functions.php:1791
4963
  msgid ""
4964
- "<strong>ERROR</strong>: The following problem(s) have been found while "
4965
  "merging the tags: %s"
4966
  msgstr ""
4967
 
4968
- #: includes/topics/functions.php:1779
4969
- msgid "<strong>ERROR</strong>: The tags which are being merged can not be the same."
4970
  msgstr ""
4971
 
4972
- #: includes/topics/functions.php:1814
4973
- msgid "<strong>ERROR</strong>: You do not have permission to delete the topic tags."
4974
  msgstr ""
4975
 
4976
- #: includes/topics/functions.php:1823
4977
  msgid ""
4978
- "<strong>ERROR</strong>: The following problem(s) have been found while "
4979
  "deleting the tag: %s"
4980
  msgstr ""
4981
 
4982
- #: includes/topics/functions.php:2019
4983
- msgid "<strong>ERROR</strong>: This topic could not be found or no longer exists."
 
 
 
 
4984
  msgstr ""
4985
 
4986
  #: includes/topics/functions.php:2109
4987
- msgid "<strong>ERROR</strong>: There was a problem approving the topic."
4988
  msgstr ""
4989
 
4990
- #: includes/topics/functions.php:2110
4991
- msgid "<strong>ERROR</strong>: There was a problem unapproving the topic."
4992
  msgstr ""
4993
 
4994
  #: includes/topics/functions.php:2127
4995
- msgid "<strong>ERROR</strong>: There was a problem closing the topic."
4996
  msgstr ""
4997
 
4998
- #: includes/topics/functions.php:2128
4999
- msgid "<strong>ERROR</strong>: There was a problem opening the topic."
5000
  msgstr ""
5001
 
5002
  #: includes/topics/functions.php:2146
5003
- msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
5004
  msgstr ""
5005
 
5006
- #: includes/topics/functions.php:2147
5007
- msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
5008
  msgstr ""
5009
 
5010
  #: includes/topics/functions.php:2165
5011
- msgid "<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
5012
- msgstr ""
5013
-
5014
- #: includes/topics/functions.php:2166
5015
- msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
5016
  msgstr ""
5017
 
5018
- #: includes/topics/functions.php:2179
5019
- msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
5020
  msgstr ""
5021
 
5022
- #: includes/topics/functions.php:2190
5023
- msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
5024
  msgstr ""
5025
 
5026
- #: includes/topics/functions.php:2199
5027
- msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
5028
  msgstr ""
5029
 
5030
  #: includes/topics/template.php:52 templates/default/bbpress/form-topic.php:48
@@ -5123,11 +5124,11 @@ msgstr ""
5123
  msgid "This topic was modified %1$s by %2$s."
5124
  msgstr ""
5125
 
5126
- #: includes/topics/template.php:1829 includes/users/template.php:1075
5127
  msgid "Favorite"
5128
  msgstr ""
5129
 
5130
- #: includes/topics/template.php:1830 includes/users/template.php:1076
5131
  msgid "Unfavorite"
5132
  msgstr ""
5133
 
@@ -5141,188 +5142,188 @@ msgstr ""
5141
  msgid "Merge"
5142
  msgstr ""
5143
 
5144
- #: includes/topics/template.php:2988
5145
  msgid "Viewing %1$s topic"
5146
  msgid_plural "Viewing %1$s topics"
5147
  msgstr[0] ""
5148
  msgstr[1] ""
5149
 
5150
- #: includes/topics/template.php:2992
5151
  msgid "Viewing topic %2$s (of %4$s total)"
5152
  msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
5153
  msgstr[0] ""
5154
  msgstr[1] ""
5155
 
5156
- #: includes/topics/template.php:3049
5157
  msgid "This topic is marked as spam."
5158
  msgstr ""
5159
 
5160
- #: includes/topics/template.php:3054
5161
  msgid "This topic is in the trash."
5162
  msgstr ""
5163
 
5164
- #: includes/topics/template.php:3059 includes/topics/template.php:3327
5165
  msgid "This topic is pending moderation."
5166
  msgstr ""
5167
 
5168
- #: includes/topics/template.php:3309
5169
  msgid "%s voice"
5170
  msgid_plural "%s voices"
5171
  msgstr[0] ""
5172
  msgstr[1] ""
5173
 
5174
- #: includes/topics/template.php:3315
5175
  msgid "This topic has %1$s, %2$s, and was last updated %3$s by %4$s."
5176
  msgstr ""
5177
 
5178
- #: includes/topics/template.php:3319
5179
  msgid "This topic has %1$s and %2$s."
5180
  msgstr ""
5181
 
5182
- #: includes/topics/template.php:3323
5183
  msgid "This topic has no replies."
5184
  msgstr ""
5185
 
5186
- #: includes/topics/template.php:3331
5187
  msgid "This topic is empty."
5188
  msgstr ""
5189
 
5190
- #: includes/topics/template.php:3381
5191
  msgid "Search Tags"
5192
  msgstr ""
5193
 
5194
- #: includes/topics/template.php:3382
5195
  msgid "Popular Tags"
5196
  msgstr ""
5197
 
5198
- #: includes/topics/template.php:3383
5199
  msgid "All Tags"
5200
  msgstr ""
5201
 
5202
- #: includes/topics/template.php:3384
5203
  msgid "Parent Tag"
5204
  msgstr ""
5205
 
5206
- #: includes/topics/template.php:3385
5207
  msgid "Parent Tag:"
5208
  msgstr ""
5209
 
5210
- #: includes/topics/template.php:3386
5211
  msgid "Edit Tag"
5212
  msgstr ""
5213
 
5214
- #: includes/topics/template.php:3387
5215
  msgid "View Topic Tag"
5216
  msgstr ""
5217
 
5218
- #: includes/topics/template.php:3388
5219
  msgid "Update Tag"
5220
  msgstr ""
5221
 
5222
- #: includes/topics/template.php:3389
5223
  msgid "Add New Tag"
5224
  msgstr ""
5225
 
5226
- #: includes/topics/template.php:3390
5227
  msgid "New Tag Name"
5228
  msgstr ""
5229
 
5230
- #: includes/topics/template.php:3391
5231
  msgid "Separate topic tags with commas"
5232
  msgstr ""
5233
 
5234
- #: includes/topics/template.php:3392
5235
  msgid "Add or remove tags"
5236
  msgstr ""
5237
 
5238
- #: includes/topics/template.php:3393
5239
  msgid "Choose from the most used tags"
5240
  msgstr ""
5241
 
5242
- #: includes/topics/template.php:3394
5243
  msgid "No topic tags found."
5244
  msgstr ""
5245
 
5246
- #: includes/topics/template.php:3395
5247
  msgid "No topic tags"
5248
  msgstr ""
5249
 
5250
- #: includes/topics/template.php:3396
5251
  msgid "Topic tags list navigation"
5252
  msgstr ""
5253
 
5254
- #: includes/topics/template.php:3397
5255
  msgid "Topic tags list"
5256
  msgstr ""
5257
 
5258
- #: includes/topics/template.php:3398
5259
  msgid "Most used topic tags"
5260
  msgstr ""
5261
 
5262
- #: includes/topics/template.php:3399
5263
  msgid "&larr; Back to Tags"
5264
  msgstr ""
5265
 
5266
- #: includes/topics/template.php:4014
5267
  msgid "Nobody"
5268
  msgstr ""
5269
 
5270
- #: includes/topics/template.php:4018
5271
  msgid "%1$s is currently editing this topic."
5272
  msgstr ""
5273
 
5274
  #: includes/users/engagements.php:608
5275
  msgid ""
5276
- "<strong>ERROR</strong>: No topic was found. Which topic are you "
5277
  "marking/unmarking as favorite?"
5278
  msgstr ""
5279
 
5280
  #: includes/users/engagements.php:616
5281
  msgid ""
5282
- "<strong>ERROR</strong>: You do not have permission to edit favorites for "
5283
  "that user."
5284
  msgstr ""
5285
 
5286
  #: includes/users/engagements.php:657
5287
  msgid ""
5288
- "<strong>ERROR</strong>: There was a problem removing that topic from "
5289
  "favorites."
5290
  msgstr ""
5291
 
5292
  #: includes/users/engagements.php:659
5293
- msgid "<strong>ERROR</strong>: There was a problem favoriting that topic."
5294
  msgstr ""
5295
 
5296
  #: includes/users/engagements.php:849
5297
  msgid ""
5298
- "<strong>ERROR</strong>: Not found. What are you subscribing/unsubscribing "
5299
  "to?"
5300
  msgstr ""
5301
 
5302
  #: includes/users/engagements.php:857
5303
  msgid ""
5304
- "<strong>ERROR</strong>: You do not have permission to edit subscriptions of "
5305
  "that user."
5306
  msgstr ""
5307
 
5308
  #: includes/users/engagements.php:900
5309
- msgid "<strong>ERROR</strong>: There was a problem unsubscribing."
5310
  msgstr ""
5311
 
5312
  #: includes/users/engagements.php:902
5313
- msgid "<strong>ERROR</strong>: There was a problem subscribing."
5314
  msgstr ""
5315
 
5316
  #: includes/users/functions.php:208 includes/users/functions.php:220
5317
- msgid "<strong>ERROR</strong>: That is not a valid email address."
5318
  msgstr ""
5319
 
5320
  #: includes/users/functions.php:226 includes/users/functions.php:343
5321
- msgid "<strong>ERROR</strong>: That email address is already in use."
5322
  msgstr ""
5323
 
5324
  #: includes/users/functions.php:406
5325
- msgid "<strong>ERROR</strong>: An error occurred while updating your email address."
5326
  msgstr ""
5327
 
5328
  #: includes/users/functions.php:418
@@ -5349,70 +5350,70 @@ msgid "[%s] New Email Address"
5349
  msgstr ""
5350
 
5351
  #: includes/users/signups.php:209
5352
- msgid "<strong>ERROR</strong>: Empty role."
5353
  msgstr ""
5354
 
5355
  #: includes/users/signups.php:214
5356
- msgid "<strong>ERROR</strong>: Invalid role."
5357
  msgstr ""
5358
 
5359
- #: includes/users/template.php:677
5360
  msgid "Guest"
5361
  msgstr ""
5362
 
5363
- #: includes/users/template.php:681
5364
  msgid "Inactive"
5365
  msgstr ""
5366
 
5367
- #: includes/users/template.php:691
5368
  msgid "Member"
5369
  msgstr ""
5370
 
5371
- #: includes/users/template.php:732
5372
  msgid "Admin"
5373
  msgstr ""
5374
 
5375
- #: includes/users/template.php:1369
5376
  msgid "User updated."
5377
  msgstr ""
5378
 
5379
- #: includes/users/template.php:1413
5380
  msgid "There is a pending email address change to %1$s. %2$s"
5381
  msgstr ""
5382
 
5383
- #: includes/users/template.php:1430
5384
  msgid "You have super admin privileges."
5385
  msgstr ""
5386
 
5387
- #: includes/users/template.php:1430
5388
  msgid "This user has super admin privileges."
5389
  msgstr ""
5390
 
5391
- #: includes/users/template.php:1504
5392
  msgid "&mdash; No role for this site &mdash;"
5393
  msgstr ""
5394
 
5395
- #: includes/users/template.php:1824
5396
  msgid "You are now logged out."
5397
  msgstr ""
5398
 
5399
- #: includes/users/template.php:1828
5400
  msgid "New user registration is currently not allowed."
5401
  msgstr ""
5402
 
5403
- #: includes/users/template.php:1837
5404
  msgid "Check your e-mail for the confirmation link."
5405
  msgstr ""
5406
 
5407
- #: includes/users/template.php:1842
5408
  msgid "Check your e-mail for your new password."
5409
  msgstr ""
5410
 
5411
- #: includes/users/template.php:1847
5412
  msgid "Registration complete. Please check your e-mail."
5413
  msgstr ""
5414
 
5415
- #: includes/users/template.php:2365
5416
  msgid "Moderators:"
5417
  msgstr ""
5418
 
@@ -6236,7 +6237,7 @@ msgctxt "Open a Topic"
6236
  msgid "Open"
6237
  msgstr ""
6238
 
6239
- #: includes/common/formatting.php:724
6240
  msgctxt "Separator in time since"
6241
  msgid ","
6242
  msgstr ""
@@ -6328,57 +6329,57 @@ msgctxt "Make forum hidden"
6328
  msgid "Hidden"
6329
  msgstr ""
6330
 
6331
- #: includes/replies/functions.php:1645
6332
  msgctxt "Publish the reply"
6333
  msgid "Publish"
6334
  msgstr ""
6335
 
6336
- #: includes/replies/functions.php:1646
6337
  msgctxt "Spam the reply"
6338
  msgid "Spam"
6339
  msgstr ""
6340
 
6341
- #: includes/replies/functions.php:1647
6342
  msgctxt "Trash the reply"
6343
  msgid "Trash"
6344
  msgstr ""
6345
 
6346
- #: includes/replies/functions.php:1648
6347
  msgctxt "Mark reply as pending"
6348
  msgid "Pending"
6349
  msgstr ""
6350
 
6351
- #: includes/replies/template.php:673 includes/topics/template.php:765
6352
  msgctxt "date at time"
6353
  msgid "%1$s at %2$s"
6354
  msgstr ""
6355
 
6356
- #: includes/replies/template.php:1579 includes/topics/template.php:2853
6357
  msgctxt "verb"
6358
  msgid "Reply"
6359
  msgstr ""
6360
 
6361
- #: includes/replies/template.php:2200
6362
  msgctxt "Pending Status"
6363
  msgid "Approve"
6364
  msgstr ""
6365
 
6366
- #: includes/replies/template.php:2201
6367
  msgctxt "Pending Status"
6368
  msgid "Unapprove"
6369
  msgstr ""
6370
 
6371
- #: includes/replies/template.php:2563
6372
  msgctxt "Default reply to dropdown text"
6373
  msgid "None"
6374
  msgstr ""
6375
 
6376
- #: includes/topics/functions.php:1858 includes/topics/template.php:2581
6377
  msgctxt "Open the topic"
6378
  msgid "Open"
6379
  msgstr ""
6380
 
6381
- #: includes/topics/functions.php:1859
6382
  msgctxt "Close the topic"
6383
  msgid "Closed"
6384
  msgstr ""
@@ -6388,17 +6389,17 @@ msgctxt "Close the topic"
6388
  msgid "Close"
6389
  msgstr ""
6390
 
6391
- #: includes/topics/functions.php:1860
6392
  msgctxt "Spam the topic"
6393
  msgid "Spam"
6394
  msgstr ""
6395
 
6396
- #: includes/topics/functions.php:1861
6397
  msgctxt "Trash the topic"
6398
  msgid "Trash"
6399
  msgstr ""
6400
 
6401
- #: includes/topics/functions.php:1862
6402
  msgctxt "Unapprove the topic"
6403
  msgid "Pending"
6404
  msgstr ""
@@ -6408,17 +6409,17 @@ msgctxt "Unapprove the topic"
6408
  msgid "Unapprove"
6409
  msgstr ""
6410
 
6411
- #: includes/topics/functions.php:1879
6412
  msgctxt "Unstick a topic"
6413
  msgid "Normal"
6414
  msgstr ""
6415
 
6416
- #: includes/topics/functions.php:1880
6417
  msgctxt "Make topic sticky"
6418
  msgid "Sticky"
6419
  msgstr ""
6420
 
6421
- #: includes/topics/functions.php:1881
6422
  msgctxt "Make topic super sticky"
6423
  msgid "Super Sticky"
6424
  msgstr ""
@@ -6428,7 +6429,7 @@ msgctxt "Approve the topic"
6428
  msgid "Approve"
6429
  msgstr ""
6430
 
6431
- #: includes/users/template.php:1408
6432
  msgctxt "Dismiss pending user email address change"
6433
  msgid "Cancel"
6434
  msgstr ""
2
  # This file is distributed under the GPLv2 or later (license.txt).
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: bbPress 2.6.6\n"
6
  "Report-Msgid-Bugs-To: https://bbpress.trac.wordpress.org\n"
7
+ "POT-Creation-Date: 2020-11-06 01:22:02+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
45
  msgid "bbPress User Activity"
46
  msgstr ""
47
 
48
+ #: includes/admin/actions.php:180 includes/admin/forums.php:538
49
  #: includes/admin/settings.php:281 includes/admin/settings.php:302
50
  #: includes/admin/tools/common.php:437 includes/admin/topics.php:854
51
  #: includes/extend/buddypress/activity.php:197
57
  msgid "Topics"
58
  msgstr ""
59
 
60
+ #: includes/admin/actions.php:185 includes/admin/actions.php:197
61
  #: includes/admin/forums.php:539 includes/admin/settings.php:289
62
  #: includes/admin/settings.php:310 includes/admin/tools/common.php:440
63
  #: includes/admin/topics.php:390 includes/admin/topics.php:856
64
+ #: includes/core/theme-compat.php:704
65
  #: includes/extend/buddypress/activity.php:207
66
  #: includes/extend/buddypress/activity.php:392
67
  #: includes/forums/template.php:2714 includes/replies/template.php:49
74
  msgid "Replies"
75
  msgstr ""
76
 
77
+ #: includes/admin/actions.php:192 includes/admin/actions.php:204
78
  #: includes/admin/forums.php:537 includes/admin/metaboxes.php:113
79
  #: includes/admin/metaboxes.php:432 includes/admin/metaboxes.php:496
80
  #: includes/admin/replies.php:665 includes/admin/settings.php:352
84
  msgid "Forum"
85
  msgstr ""
86
 
87
+ #: includes/admin/actions.php:209 includes/admin/metaboxes.php:130
88
  #: includes/admin/metaboxes.php:523 includes/admin/replies.php:666
89
  #: includes/admin/settings.php:360 includes/topics/template.php:49
90
  #: templates/default/bbpress/content-single-topic-lead.php:23
147
 
148
  #: includes/admin/classes/class-bbp-admin.php:938
149
  #: includes/admin/classes/class-bbp-admin.php:1018
150
+ #: includes/common/classes.php:493 includes/replies/template.php:2565
151
  msgid "%1$s - %2$s"
152
  msgstr ""
153
 
626
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:91
627
  #: includes/admin/replies.php:235 includes/admin/replies.php:818
628
  #: includes/admin/topics.php:240 includes/admin/topics.php:1023
629
+ #: includes/replies/template.php:2029 includes/topics/template.php:2807
630
  msgid "Spam"
631
  msgstr ""
632
 
633
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:92
634
  #: includes/admin/replies.php:833 includes/admin/topics.php:1037
635
+ #: includes/replies/template.php:1961 includes/topics/template.php:2515
636
  msgid "Trash"
637
  msgstr ""
638
 
645
  #: includes/admin/classes/class-bbp-topic-replies-list-table.php:149
646
  #: includes/admin/settings.php:392 includes/common/template.php:2331
647
  #: includes/forums/template.php:54 includes/replies/template.php:55
648
+ #: includes/replies/template.php:1849 includes/topics/template.php:53
649
  #: includes/topics/template.php:2403
650
  #: templates/default/bbpress/user-details.php:74
651
  msgid "Edit"
1057
  msgstr[1] ""
1058
 
1059
  #: includes/admin/metaboxes.php:166 includes/admin/settings.php:368
1060
+ #: includes/topics/template.php:3387
1061
  msgid "Topic Tag"
1062
  msgid_plural "Topic Tags"
1063
  msgstr[0] ""
1402
  msgstr ""
1403
 
1404
  #: includes/admin/replies.php:233 includes/admin/topics.php:238
1405
+ #: includes/replies/template.php:2030 includes/topics/template.php:2808
1406
  msgid "Unspam"
1407
  msgstr ""
1408
 
1521
  msgstr ""
1522
 
1523
  #: includes/admin/replies.php:831 includes/admin/topics.php:1035
1524
+ #: includes/replies/template.php:1979 includes/topics/template.php:2532
1525
  msgid "Restore this item from the Trash"
1526
  msgstr ""
1527
 
1528
  #: includes/admin/replies.php:831 includes/admin/topics.php:1035
1529
+ #: includes/replies/template.php:1962 includes/topics/template.php:2516
1530
  msgid "Restore"
1531
  msgstr ""
1532
 
1533
  #: includes/admin/replies.php:833 includes/admin/topics.php:1037
1534
+ #: includes/replies/template.php:1983 includes/topics/template.php:2534
1535
  msgid "Move this item to the Trash"
1536
  msgstr ""
1537
 
1538
  #: includes/admin/replies.php:837 includes/admin/topics.php:1041
1539
+ #: includes/replies/template.php:1988 includes/topics/template.php:2538
1540
  msgid "Delete this item permanently"
1541
  msgstr ""
1542
 
1653
  msgid "Editing"
1654
  msgstr ""
1655
 
1656
+ #: includes/admin/settings.php:155 includes/users/template.php:806
1657
  msgid "Anonymous"
1658
  msgstr ""
1659
 
2390
  msgid "Users"
2391
  msgstr ""
2392
 
2393
+ #: includes/admin/tools/common.php:443 includes/topics/template.php:3385
2394
+ #: includes/topics/template.php:3386
2395
  #: templates/default/bbpress/content-statistics.php:40
2396
  msgid "Topic Tags"
2397
  msgstr ""
2592
  #: includes/admin/tools/repair.php:661 includes/admin/tools/repair.php:726
2593
  #: includes/admin/tools/repair.php:795 includes/admin/tools/repair.php:903
2594
  #: includes/admin/tools/repair.php:1024 includes/admin/tools/repair.php:1136
2595
+ #: includes/admin/tools/repair.php:1156 includes/admin/tools/repair.php:1218
2596
  #: includes/admin/tools/reset.php:122 includes/admin/tools/upgrade.php:288
2597
  msgid "Failed!"
2598
  msgstr ""
2604
  #: includes/admin/tools/repair.php:579 includes/admin/tools/repair.php:646
2605
  #: includes/admin/tools/repair.php:711 includes/admin/tools/repair.php:776
2606
  #: includes/admin/tools/repair.php:1009 includes/admin/tools/repair.php:1069
2607
+ #: includes/admin/tools/repair.php:1140 includes/admin/tools/repair.php:1203
2608
+ #: includes/admin/tools/repair.php:1254 includes/admin/tools/repair.php:1305
2609
  msgid "Complete!"
2610
  msgstr ""
2611
 
2700
  msgid "Recalculating the forum for each post&hellip; %s"
2701
  msgstr ""
2702
 
2703
+ #: includes/admin/tools/repair.php:1217
2704
  msgid "Recalculating the topic for each post&hellip; %s"
2705
  msgstr ""
2706
 
2707
+ #: includes/admin/tools/repair.php:1268
2708
  msgid "Recalculating reply menu order&hellip; %s"
2709
  msgstr ""
2710
 
2711
+ #: includes/admin/tools/repair.php:1269
2712
  msgid "No reply positions to recalculate."
2713
  msgstr ""
2714
 
2731
  msgid "All Topics"
2732
  msgstr ""
2733
 
2734
+ #: includes/admin/tools/reset.php:36 includes/replies/functions.php:2136
2735
  #: includes/replies/template.php:52
2736
  msgid "All Replies"
2737
  msgstr ""
3599
  msgstr ""
3600
 
3601
  #: includes/admin/users.php:107 includes/admin/users.php:111
3602
+ #: includes/users/template.php:1547
3603
  msgid "&mdash; No role for these forums &mdash;"
3604
  msgstr ""
3605
 
3686
  msgstr ""
3687
 
3688
  #: includes/common/functions.php:556
3689
+ msgid "<strong>Error</strong>: Invalid author name."
3690
  msgstr ""
3691
 
3692
  #: includes/common/functions.php:562
3693
+ msgid "<strong>Error</strong>: Invalid email address."
3694
  msgstr ""
3695
 
3696
  #: includes/common/functions.php:1101
3750
  msgstr ""
3751
 
3752
  #: includes/common/template.php:2327 includes/common/template.php:2442
3753
+ #: includes/common/template.php:2687 includes/core/theme-compat.php:804
3754
  #: templates/default/extras/taxonomy-topic-tag-edit.php:17
3755
  #: templates/default/extras/taxonomy-topic-tag.php:17
3756
  msgid "Topic Tag: %s"
4043
  msgid "And this is the very first reply."
4044
  msgstr ""
4045
 
4046
+ #: includes/extend/akismet.php:171 includes/extend/akismet.php:176
4047
+ #: includes/extend/akismet.php:492 includes/extend/akismet.php:497
4048
  msgid "No response"
4049
  msgstr ""
4050
 
4051
+ #: includes/extend/akismet.php:353
4052
  #. translators: %s: reporter name
4053
  msgid "%s reported this topic as spam"
4054
  msgstr ""
4055
 
4056
+ #: includes/extend/akismet.php:358
4057
  #. translators: %s: reporter name
4058
  msgid "%s reported this reply as spam"
4059
  msgstr ""
4060
 
4061
+ #: includes/extend/akismet.php:363
4062
  #. translators: 1: reporter name, 2: comment type
4063
  msgid "%1$s reported this %2$s as spam"
4064
  msgstr ""
4065
 
4066
+ #: includes/extend/akismet.php:378
4067
  #. translators: %s: reporter name
4068
  msgid "%s reported this topic as not spam"
4069
  msgstr ""
4070
 
4071
+ #: includes/extend/akismet.php:383
4072
  #. translators: %s: reporter name
4073
  msgid "%s reported this reply as not spam"
4074
  msgstr ""
4075
 
4076
+ #: includes/extend/akismet.php:388
4077
  #. translators: 1: reporter name, 2: comment type
4078
  msgid "%1$s reported this %2$s as not spam"
4079
  msgstr ""
4080
 
4081
+ #: includes/extend/akismet.php:573
4082
  msgid "Akismet caught this post as spam"
4083
  msgstr ""
4084
 
4085
+ #: includes/extend/akismet.php:582 includes/extend/akismet.php:605
4086
  msgid "Post status was changed to %s"
4087
  msgstr ""
4088
 
4089
+ #: includes/extend/akismet.php:596
4090
  msgid "Akismet cleared this post as not spam"
4091
  msgstr ""
4092
 
4093
+ #: includes/extend/akismet.php:619
4094
  msgid ""
4095
  "Akismet was unable to check this post (response: %s), will automatically "
4096
  "retry again later."
4097
  msgstr ""
4098
 
4099
+ #: includes/extend/akismet.php:829 includes/extend/akismet.php:839
4100
  msgid "Akismet History"
4101
  msgstr ""
4102
 
4103
+ #: includes/extend/akismet.php:883
4104
  msgid "No recorded history. Akismet has not checked this post."
4105
  msgstr ""
4106
 
4123
  msgstr ""
4124
 
4125
  #: includes/extend/buddypress/groups.php:379
4126
+ msgid "<strong>Error</strong>: Forum ID is invalid."
4127
  msgstr ""
4128
 
4129
  #: includes/extend/buddypress/groups.php:442
4130
+ msgid "<strong>Error</strong>: Reply To is invalid."
4131
  msgstr ""
4132
 
4133
  #: includes/extend/buddypress/groups.php:467
4165
 
4166
  #: includes/extend/buddypress/groups.php:531
4167
  #: includes/extend/buddypress/groups.php:688
4168
+ #: includes/extend/buddypress/notifications.php:199
4169
  #: includes/forums/functions.php:126 includes/forums/functions.php:393
4170
+ #: includes/replies/functions.php:134 includes/replies/functions.php:527
4171
+ #: includes/replies/functions.php:1246 includes/topics/functions.php:105
4172
+ #: includes/topics/functions.php:468 includes/topics/functions.php:1091
4173
+ #: includes/topics/functions.php:1366 includes/topics/functions.php:1702
4174
+ #: includes/topics/functions.php:1746 includes/topics/functions.php:1807
4175
  #: includes/users/engagements.php:612 includes/users/engagements.php:853
4176
  #: includes/users/functions.php:196 includes/users/functions.php:202
4177
  #: includes/users/functions.php:380
4178
+ msgid "<strong>Error</strong>: Are you sure you wanted to do that?"
4179
  msgstr ""
4180
 
4181
  #: includes/extend/buddypress/groups.php:668
4200
  msgstr ""
4201
 
4202
  #: includes/extend/buddypress/notifications.php:95
4203
+ msgid "You have %1$d new reply to %2$s from %3$s"
4204
  msgstr ""
4205
 
4206
  #: includes/extend/buddypress/notifications.php:96
4207
+ msgid "You have %1$d new reply to %2$s"
4208
  msgstr ""
4209
 
4210
  #: includes/extend/buddypress/notifications.php:101
4211
  msgid "Topic Replies"
4212
  msgstr ""
4213
 
4214
+ #: includes/extend/buddypress/notifications.php:203
4215
  msgid ""
4216
+ "<strong>Error</strong>: You do not have permission to mark notifications "
4217
  "for that user."
4218
  msgstr ""
4219
 
4220
  #: includes/forums/functions.php:140
4221
+ msgid "<strong>Error</strong>: You do not have permission to create new forums."
4222
  msgstr ""
4223
 
4224
  #: includes/forums/functions.php:165 includes/forums/functions.php:454
4225
+ msgid "<strong>Error</strong>: Your forum needs a title."
4226
  msgstr ""
4227
 
4228
  #: includes/forums/functions.php:170 includes/forums/functions.php:459
4229
+ #: includes/replies/functions.php:284 includes/replies/functions.php:611
4230
  #: includes/topics/functions.php:163 includes/topics/functions.php:535
4231
+ msgid "<strong>Error</strong>: Your title is too long."
4232
  msgstr ""
4233
 
4234
  #: includes/forums/functions.php:184 includes/forums/functions.php:473
4235
+ msgid "<strong>Error</strong>: Your forum description cannot be empty."
4236
  msgstr ""
4237
 
4238
  #: includes/forums/functions.php:199
4239
+ msgid "<strong>Error</strong>: Your forum must have a parent."
4240
  msgstr ""
4241
 
4242
  #: includes/forums/functions.php:206
4243
  msgid ""
4244
+ "<strong>Error</strong>: This forum is a category. No forums can be created "
4245
  "in this forum."
4246
  msgstr ""
4247
 
4248
  #: includes/forums/functions.php:211 includes/forums/functions.php:429
4249
+ msgid "<strong>Error</strong>: This forum has been closed to new forums."
4250
  msgstr ""
4251
 
4252
  #: includes/forums/functions.php:216 includes/forums/functions.php:434
4253
  msgid ""
4254
+ "<strong>Error</strong>: This forum is private and you do not have the "
4255
  "capability to read or create new forums in it."
4256
  msgstr ""
4257
 
4258
  #: includes/forums/functions.php:221 includes/forums/functions.php:439
4259
  msgid ""
4260
+ "<strong>Error</strong>: This forum is hidden and you do not have the "
4261
  "capability to read or create new forums in it."
4262
  msgstr ""
4263
 
4264
  #: includes/forums/functions.php:228 includes/replies/functions.php:304
4265
  #: includes/topics/functions.php:247
4266
+ msgid "<strong>Error</strong>: Slow down; you move too fast."
4267
  msgstr ""
4268
 
4269
  #: includes/forums/functions.php:234
4270
+ msgid "<strong>Error</strong>: This forum already exists."
4271
  msgstr ""
4272
 
4273
  #: includes/forums/functions.php:240
4274
+ msgid "<strong>Error</strong>: Your forum cannot be created at this time."
4275
  msgstr ""
4276
 
4277
+ #: includes/forums/functions.php:353 includes/replies/functions.php:484
4278
  #: includes/topics/functions.php:400
4279
+ msgid "<strong>Error</strong>: The following problem(s) occurred: %s"
4280
  msgstr ""
4281
 
4282
  #: includes/forums/functions.php:357
4283
+ msgid "<strong>Error</strong>: The forum was not created."
4284
  msgstr ""
4285
 
4286
  #: includes/forums/functions.php:382
4287
+ msgid "<strong>Error</strong>: Forum ID not found."
4288
  msgstr ""
4289
 
4290
  #: includes/forums/functions.php:398
4291
+ msgid "<strong>Error</strong>: The forum you want to edit was not found."
4292
  msgstr ""
4293
 
4294
  #: includes/forums/functions.php:403
4295
+ msgid "<strong>Error</strong>: You do not have permission to edit that forum."
4296
  msgstr ""
4297
 
4298
  #: includes/forums/functions.php:479
4299
+ msgid "<strong>Error</strong>: Your forum cannot be edited at this time."
4300
  msgstr ""
4301
 
4302
  #: includes/forums/template.php:52 includes/replies/template.php:53
4389
  msgstr ""
4390
 
4391
  #: includes/forums/template.php:833 includes/topics/template.php:1781
4392
+ #: includes/users/template.php:1279
4393
  msgid "Subscribe"
4394
  msgstr ""
4395
 
4396
  #: includes/forums/template.php:834 includes/topics/template.php:1782
4397
+ #: includes/users/template.php:1280
4398
  msgid "Unsubscribe"
4399
  msgstr ""
4400
 
4453
  msgstr ""
4454
 
4455
  #: includes/replies/functions.php:159
4456
+ msgid "<strong>Error</strong>: You do not have permission to reply."
4457
  msgstr ""
4458
 
4459
  #: includes/replies/functions.php:170
4460
+ msgid "<strong>Error</strong>: Topic ID is missing."
4461
  msgstr ""
4462
 
4463
  #: includes/replies/functions.php:174
4464
+ msgid "<strong>Error</strong>: Topic ID must be a number."
4465
  msgstr ""
4466
 
4467
  #: includes/replies/functions.php:184
4468
+ msgid "<strong>Error</strong>: Topic ID cannot be a negative number."
4469
  msgstr ""
4470
 
4471
  #: includes/replies/functions.php:188
4472
+ msgid "<strong>Error</strong>: Topic does not exist."
4473
  msgstr ""
4474
 
4475
  #: includes/replies/functions.php:207 includes/replies/functions.php:221
4476
  #: includes/topics/functions.php:187 includes/topics/functions.php:201
4477
  #: includes/topics/functions.php:483
4478
+ msgid "<strong>Error</strong>: Forum ID is missing."
4479
  msgstr ""
4480
 
4481
  #: includes/replies/functions.php:211 includes/topics/functions.php:191
4482
+ msgid "<strong>Error</strong>: Forum ID must be a number."
4483
  msgstr ""
4484
 
4485
  #: includes/replies/functions.php:225 includes/topics/functions.php:205
4486
+ msgid "<strong>Error</strong>: Forum ID cannot be a negative number."
4487
  msgstr ""
4488
 
4489
  #: includes/replies/functions.php:229 includes/topics/functions.php:209
4490
+ msgid "<strong>Error</strong>: Forum does not exist."
4491
  msgstr ""
4492
 
4493
+ #: includes/replies/functions.php:243 includes/replies/functions.php:579
4494
  msgid ""
4495
+ "<strong>Error</strong>: This forum is a category. No replies can be created "
4496
  "in this forum."
4497
  msgstr ""
4498
 
4499
+ #: includes/replies/functions.php:250 includes/replies/functions.php:586
4500
+ msgid "<strong>Error</strong>: This forum has been closed to new replies."
4501
  msgstr ""
4502
 
4503
+ #: includes/replies/functions.php:255 includes/replies/functions.php:591
4504
  msgid ""
4505
+ "<strong>Error</strong>: This forum is private and you do not have the "
4506
  "capability to read or create new replies in it."
4507
  msgstr ""
4508
 
4509
+ #: includes/replies/functions.php:259 includes/replies/functions.php:595
4510
  msgid ""
4511
+ "<strong>Error</strong>: This forum is hidden and you do not have the "
4512
  "capability to read or create new replies in it."
4513
  msgstr ""
4514
 
4515
+ #: includes/replies/functions.php:298 includes/replies/functions.php:625
4516
+ msgid "<strong>Error</strong>: Your reply cannot be empty."
4517
  msgstr ""
4518
 
4519
  #: includes/replies/functions.php:310
4520
  msgid ""
4521
+ "<strong>Error</strong>: Duplicate reply detected; it looks as though "
4522
  "you&#8217;ve already said that."
4523
  msgstr ""
4524
 
4525
  #: includes/replies/functions.php:316
4526
+ msgid "<strong>Error</strong>: Your reply cannot be created at this time."
4527
  msgstr ""
4528
 
4529
  #: includes/replies/functions.php:341
4530
+ msgid "<strong>Error</strong>: Topic is closed."
4531
  msgstr ""
4532
 
4533
+ #: includes/replies/functions.php:401 includes/replies/functions.php:721
4534
+ msgid "<strong>Error</strong>: There was a problem adding the tags to the topic."
4535
  msgstr ""
4536
 
4537
+ #: includes/replies/functions.php:488
4538
+ msgid "<strong>Error</strong>: The reply was not created."
4539
  msgstr ""
4540
 
4541
+ #: includes/replies/functions.php:516
4542
+ msgid "<strong>Error</strong>: Reply ID not found."
4543
  msgstr ""
4544
 
4545
+ #: includes/replies/functions.php:533
4546
+ msgid "<strong>Error</strong>: The reply you want to edit was not found."
4547
  msgstr ""
4548
 
4549
+ #: includes/replies/functions.php:544
4550
+ msgid "<strong>Error</strong>: You do not have permission to edit that reply."
4551
  msgstr ""
4552
 
4553
+ #: includes/replies/functions.php:631
4554
+ msgid "<strong>Error</strong>: Your reply cannot be edited at this time."
4555
  msgstr ""
4556
 
4557
+ #: includes/replies/functions.php:1222
4558
+ msgid "<strong>Error</strong>: A reply ID is required"
4559
  msgstr ""
4560
 
4561
+ #: includes/replies/functions.php:1231
4562
+ msgid "<strong>Error</strong>: The reply you want to move was not found."
4563
  msgstr ""
4564
 
4565
+ #: includes/replies/functions.php:1241
4566
+ msgid "<strong>Error</strong>: The topic you want to move from was not found."
4567
  msgstr ""
4568
 
4569
+ #: includes/replies/functions.php:1252 includes/topics/functions.php:1102
4570
+ #: includes/topics/functions.php:1372
4571
+ msgid "<strong>Error</strong>: You do not have permission to edit the source topic."
4572
  msgstr ""
4573
 
4574
+ #: includes/replies/functions.php:1262
4575
+ msgid "<strong>Error</strong>: You need to choose a valid move option."
4576
  msgstr ""
4577
 
4578
+ #: includes/replies/functions.php:1275 includes/topics/functions.php:1395
4579
+ msgid "<strong>Error</strong>: A topic ID is required."
4580
  msgstr ""
4581
 
4582
+ #: includes/replies/functions.php:1285
4583
+ msgid "<strong>Error</strong>: The topic you want to move to was not found."
4584
  msgstr ""
4585
 
4586
+ #: includes/replies/functions.php:1290 includes/topics/functions.php:1122
4587
+ #: includes/topics/functions.php:1410
4588
  msgid ""
4589
+ "<strong>Error</strong>: You do not have permission to edit the destination "
4590
  "topic."
4591
  msgstr ""
4592
 
4593
+ #: includes/replies/functions.php:1344 includes/topics/functions.php:1448
4594
  msgid ""
4595
+ "<strong>Error</strong>: There was a problem converting the reply into the "
4596
  "topic. Please try again."
4597
  msgstr ""
4598
 
4599
+ #: includes/replies/functions.php:1349 includes/topics/functions.php:1453
4600
  msgid ""
4601
+ "<strong>Error</strong>: You do not have permission to create new topics. "
4602
  "The reply could not be converted into a topic."
4603
  msgstr ""
4604
 
4605
+ #: includes/replies/functions.php:1497
4606
+ msgid "<strong>Error</strong>: This reply could not be found or no longer exists."
 
 
 
 
4607
  msgstr ""
4608
 
4609
+ #: includes/replies/functions.php:1503 includes/topics/functions.php:2024
4610
+ msgid "<strong>Error</strong>: You do not have permission to do that."
4611
  msgstr ""
4612
 
4613
+ #: includes/replies/functions.php:1579
4614
+ msgid "<strong>Error</strong>: There was a problem approving the reply."
4615
  msgstr ""
4616
 
4617
+ #: includes/replies/functions.php:1579
4618
+ msgid "<strong>Error</strong>: There was a problem unapproving the reply."
4619
  msgstr ""
4620
 
4621
+ #: includes/replies/functions.php:1590
4622
+ msgid "<strong>Error</strong>: There was a problem unmarking the reply as spam."
4623
  msgstr ""
4624
 
4625
+ #: includes/replies/functions.php:1590
4626
+ msgid "<strong>Error</strong>: There was a problem marking the reply as spam."
4627
  msgstr ""
4628
 
4629
  #: includes/replies/functions.php:1605
4630
+ msgid "<strong>Error</strong>: There was a problem trashing the reply."
4631
  msgstr ""
4632
 
4633
  #: includes/replies/functions.php:1613
4634
+ msgid "<strong>Error</strong>: There was a problem untrashing the reply."
4635
  msgstr ""
4636
 
4637
+ #: includes/replies/functions.php:1621
4638
+ msgid "<strong>Error</strong>: There was a problem deleting the reply."
4639
+ msgstr ""
4640
+
4641
+ #: includes/replies/functions.php:2134
4642
  msgid "All Posts"
4643
  msgstr ""
4644
 
4645
+ #: includes/replies/functions.php:2180 includes/topics/functions.php:3800
4646
  msgid "Replies: %s"
4647
  msgstr ""
4648
 
4738
  msgid "Reply scheduled."
4739
  msgstr ""
4740
 
4741
+ #: includes/replies/template.php:552
4742
  #: templates/default/bbpress/form-reply.php:30
4743
  msgid "Reply To: %s"
4744
  msgstr ""
4745
 
4746
+ #: includes/replies/template.php:764
4747
  msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
4748
  msgstr ""
4749
 
4750
+ #: includes/replies/template.php:766
4751
  msgid "This reply was modified %1$s by %2$s."
4752
  msgstr ""
4753
 
4754
+ #: includes/replies/template.php:1196 includes/topics/template.php:1429
4755
+ #: includes/users/template.php:2005
4756
  msgid "View %s's profile"
4757
  msgstr ""
4758
 
4759
+ #: includes/replies/template.php:1197 includes/topics/template.php:1430
4760
+ #: includes/users/template.php:2006
4761
  msgid "Visit %s's website"
4762
  msgstr ""
4763
 
4764
+ #: includes/replies/template.php:1653
4765
  #: templates/default/bbpress/form-user-passwords.php:31
4766
  msgid "Cancel"
4767
  msgstr ""
4768
 
4769
+ #: includes/replies/template.php:1963 includes/topics/template.php:2517
4770
  #: templates/default/bbpress/form-topic-tag.php:100
4771
  #: templates/default/bbpress/form-topic-tag.php:117
4772
  msgid "Delete"
4773
  msgstr ""
4774
 
4775
+ #: includes/replies/template.php:1988 includes/topics/template.php:2538
4776
  msgid "Are you sure you want to delete that permanently?"
4777
  msgstr ""
4778
 
4779
+ #: includes/replies/template.php:2085
4780
  msgid "Move"
4781
  msgstr ""
4782
 
4783
+ #: includes/replies/template.php:2086
4784
  msgid "Move this reply"
4785
  msgstr ""
4786
 
4787
+ #: includes/replies/template.php:2144
4788
  msgid "Split"
4789
  msgstr ""
4790
 
4791
+ #: includes/replies/template.php:2145
4792
  msgid "Split the topic from this reply"
4793
  msgstr ""
4794
 
4795
+ #: includes/replies/template.php:2379
4796
  msgid "Viewing %1$s reply thread"
4797
  msgid_plural "Viewing %1$s reply threads"
4798
  msgstr[0] ""
4799
  msgstr[1] ""
4800
 
4801
+ #: includes/replies/template.php:2386
4802
  msgid "Viewing %1$s reply"
4803
  msgid_plural "Viewing %1$s replies"
4804
  msgstr[0] ""
4805
  msgstr[1] ""
4806
 
4807
+ #: includes/replies/template.php:2390
4808
  msgid "Viewing %2$s replies (of %4$s total)"
4809
  msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
4810
  msgstr[0] ""
4811
  msgstr[1] ""
4812
 
4813
+ #: includes/replies/template.php:2398
4814
  msgid "Viewing %1$s post"
4815
  msgid_plural "Viewing %1$s posts"
4816
  msgstr[0] ""
4817
  msgstr[1] ""
4818
 
4819
+ #: includes/replies/template.php:2402
4820
  msgid "Viewing %2$s post (of %4$s total)"
4821
  msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
4822
  msgstr[0] ""
4839
  msgstr[1] ""
4840
 
4841
  #: includes/topics/functions.php:132
4842
+ msgid "<strong>Error</strong>: You do not have permission to create new topics."
4843
  msgstr ""
4844
 
4845
  #: includes/topics/functions.php:158 includes/topics/functions.php:530
4846
+ msgid "<strong>Error</strong>: Your topic needs a title."
4847
  msgstr ""
4848
 
4849
  #: includes/topics/functions.php:177 includes/topics/functions.php:549
4850
+ msgid "<strong>Error</strong>: Your topic cannot be empty."
4851
  msgstr ""
4852
 
4853
  #: includes/topics/functions.php:223
4854
  msgid ""
4855
+ "<strong>Error</strong>: This forum is a category. No topics can be created "
4856
  "in this forum."
4857
  msgstr ""
4858
 
4859
  #: includes/topics/functions.php:230 includes/topics/functions.php:505
4860
+ msgid "<strong>Error</strong>: This forum has been closed to new topics."
4861
  msgstr ""
4862
 
4863
  #: includes/topics/functions.php:235 includes/topics/functions.php:510
4864
  msgid ""
4865
+ "<strong>Error</strong>: This forum is private and you do not have the "
4866
  "capability to read or create new topics in it."
4867
  msgstr ""
4868
 
4869
  #: includes/topics/functions.php:239 includes/topics/functions.php:514
4870
  msgid ""
4871
+ "<strong>Error</strong>: This forum is hidden and you do not have the "
4872
  "capability to read or create new topics in it."
4873
  msgstr ""
4874
 
4875
  #: includes/topics/functions.php:253
4876
  msgid ""
4877
+ "<strong>Error</strong>: Duplicate topic detected; it looks as though "
4878
  "you&#8217;ve already said that."
4879
  msgstr ""
4880
 
4881
  #: includes/topics/functions.php:259
4882
+ msgid "<strong>Error</strong>: Your topic cannot be created at this time."
4883
  msgstr ""
4884
 
4885
  #: includes/topics/functions.php:404
4886
+ msgid "<strong>Error</strong>: The topic was not created."
4887
  msgstr ""
4888
 
4889
+ #: includes/topics/functions.php:430 includes/topics/functions.php:1084
4890
+ msgid "<strong>Error</strong>: Topic ID not found."
4891
  msgstr ""
4892
 
4893
  #: includes/topics/functions.php:441
4894
+ msgid "<strong>Error</strong>: The topic you want to edit was not found."
4895
  msgstr ""
4896
 
4897
  #: includes/topics/functions.php:452
4898
+ msgid "<strong>Error</strong>: You do not have permission to edit that topic."
4899
  msgstr ""
4900
 
4901
  #: includes/topics/functions.php:498
4902
  msgid ""
4903
+ "<strong>Error</strong>: This forum is a category. No topics can be created "
4904
  "in it."
4905
  msgstr ""
4906
 
4907
  #: includes/topics/functions.php:555
4908
+ msgid "<strong>Error</strong>: Your topic cannot be edited at this time."
4909
  msgstr ""
4910
 
4911
+ #: includes/topics/functions.php:1096
4912
+ msgid "<strong>Error</strong>: The topic you want to merge was not found."
4913
  msgstr ""
4914
 
4915
+ #: includes/topics/functions.php:1110
4916
+ msgid "<strong>Error</strong>: Destination topic ID not found."
4917
  msgstr ""
4918
 
4919
+ #: includes/topics/functions.php:1117
4920
+ msgid "<strong>Error</strong>: The topic you want to merge to was not found."
4921
  msgstr ""
4922
 
4923
+ #: includes/topics/functions.php:1342
4924
+ msgid "<strong>Error</strong>: A reply ID is required."
4925
  msgstr ""
4926
 
4927
+ #: includes/topics/functions.php:1351
4928
+ msgid "<strong>Error</strong>: The reply you want to split from was not found."
4929
  msgstr ""
4930
 
4931
+ #: includes/topics/functions.php:1361
4932
+ msgid "<strong>Error</strong>: The topic you want to split was not found."
4933
  msgstr ""
4934
 
4935
+ #: includes/topics/functions.php:1382
4936
+ msgid "<strong>Error</strong>: You need to choose a valid split option."
4937
  msgstr ""
4938
 
4939
+ #: includes/topics/functions.php:1405
4940
+ msgid "<strong>Error</strong>: The topic you want to split to was not found."
4941
  msgstr ""
4942
 
4943
+ #: includes/topics/functions.php:1690
4944
  msgid ""
4945
+ "<strong>Error</strong>: The following problem(s) have been found while "
4946
  "getting the tag: %s"
4947
  msgstr ""
4948
 
4949
+ #: includes/topics/functions.php:1708 includes/topics/functions.php:1752
4950
+ msgid "<strong>Error</strong>: You do not have permission to edit the topic tags."
4951
  msgstr ""
4952
 
4953
+ #: includes/topics/functions.php:1714 includes/topics/functions.php:1758
4954
+ msgid "<strong>Error</strong>: You need to enter a tag name."
4955
  msgstr ""
4956
 
4957
+ #: includes/topics/functions.php:1729
4958
  msgid ""
4959
+ "<strong>Error</strong>: The following problem(s) have been found while "
4960
  "updating the tag: %s"
4961
  msgstr ""
4962
 
4963
+ #: includes/topics/functions.php:1769 includes/topics/functions.php:1790
4964
  msgid ""
4965
+ "<strong>Error</strong>: The following problem(s) have been found while "
4966
  "merging the tags: %s"
4967
  msgstr ""
4968
 
4969
+ #: includes/topics/functions.php:1778
4970
+ msgid "<strong>Error</strong>: The tags which are being merged can not be the same."
4971
  msgstr ""
4972
 
4973
+ #: includes/topics/functions.php:1813
4974
+ msgid "<strong>Error</strong>: You do not have permission to delete the topic tags."
4975
  msgstr ""
4976
 
4977
+ #: includes/topics/functions.php:1822
4978
  msgid ""
4979
+ "<strong>Error</strong>: The following problem(s) have been found while "
4980
  "deleting the tag: %s"
4981
  msgstr ""
4982
 
4983
+ #: includes/topics/functions.php:2018
4984
+ msgid "<strong>Error</strong>: This topic could not be found or no longer exists."
4985
+ msgstr ""
4986
+
4987
+ #: includes/topics/functions.php:2108
4988
+ msgid "<strong>Error</strong>: There was a problem approving the topic."
4989
  msgstr ""
4990
 
4991
  #: includes/topics/functions.php:2109
4992
+ msgid "<strong>Error</strong>: There was a problem unapproving the topic."
4993
  msgstr ""
4994
 
4995
+ #: includes/topics/functions.php:2126
4996
+ msgid "<strong>Error</strong>: There was a problem closing the topic."
4997
  msgstr ""
4998
 
4999
  #: includes/topics/functions.php:2127
5000
+ msgid "<strong>Error</strong>: There was a problem opening the topic."
5001
  msgstr ""
5002
 
5003
+ #: includes/topics/functions.php:2145
5004
+ msgid "<strong>Error</strong>: There was a problem unsticking the topic."
5005
  msgstr ""
5006
 
5007
  #: includes/topics/functions.php:2146
5008
+ msgid "<strong>Error</strong>: There was a problem sticking the topic."
5009
  msgstr ""
5010
 
5011
+ #: includes/topics/functions.php:2164
5012
+ msgid "<strong>Error</strong>: There was a problem unmarking the topic as spam."
5013
  msgstr ""
5014
 
5015
  #: includes/topics/functions.php:2165
5016
+ msgid "<strong>Error</strong>: There was a problem marking the topic as spam."
 
 
 
 
5017
  msgstr ""
5018
 
5019
+ #: includes/topics/functions.php:2178
5020
+ msgid "<strong>Error</strong>: There was a problem trashing the topic."
5021
  msgstr ""
5022
 
5023
+ #: includes/topics/functions.php:2189
5024
+ msgid "<strong>Error</strong>: There was a problem untrashing the topic."
5025
  msgstr ""
5026
 
5027
+ #: includes/topics/functions.php:2198
5028
+ msgid "<strong>Error</strong>: There was a problem deleting the topic."
5029
  msgstr ""
5030
 
5031
  #: includes/topics/template.php:52 templates/default/bbpress/form-topic.php:48
5124
  msgid "This topic was modified %1$s by %2$s."
5125
  msgstr ""
5126
 
5127
+ #: includes/topics/template.php:1829 includes/users/template.php:1081
5128
  msgid "Favorite"
5129
  msgstr ""
5130
 
5131
+ #: includes/topics/template.php:1830 includes/users/template.php:1082
5132
  msgid "Unfavorite"
5133
  msgstr ""
5134
 
5142
  msgid "Merge"
5143
  msgstr ""
5144
 
5145
+ #: includes/topics/template.php:2995
5146
  msgid "Viewing %1$s topic"
5147
  msgid_plural "Viewing %1$s topics"
5148
  msgstr[0] ""
5149
  msgstr[1] ""
5150
 
5151
+ #: includes/topics/template.php:2999
5152
  msgid "Viewing topic %2$s (of %4$s total)"
5153
  msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
5154
  msgstr[0] ""
5155
  msgstr[1] ""
5156
 
5157
+ #: includes/topics/template.php:3056
5158
  msgid "This topic is marked as spam."
5159
  msgstr ""
5160
 
5161
+ #: includes/topics/template.php:3061
5162
  msgid "This topic is in the trash."
5163
  msgstr ""
5164
 
5165
+ #: includes/topics/template.php:3066 includes/topics/template.php:3334
5166
  msgid "This topic is pending moderation."
5167
  msgstr ""
5168
 
5169
+ #: includes/topics/template.php:3316
5170
  msgid "%s voice"
5171
  msgid_plural "%s voices"
5172
  msgstr[0] ""
5173
  msgstr[1] ""
5174
 
5175
+ #: includes/topics/template.php:3322
5176
  msgid "This topic has %1$s, %2$s, and was last updated %3$s by %4$s."
5177
  msgstr ""
5178
 
5179
+ #: includes/topics/template.php:3326
5180
  msgid "This topic has %1$s and %2$s."
5181
  msgstr ""
5182
 
5183
+ #: includes/topics/template.php:3330
5184
  msgid "This topic has no replies."
5185
  msgstr ""
5186
 
5187
+ #: includes/topics/template.php:3338
5188
  msgid "This topic is empty."
5189
  msgstr ""
5190
 
5191
+ #: includes/topics/template.php:3388
5192
  msgid "Search Tags"
5193
  msgstr ""
5194
 
5195
+ #: includes/topics/template.php:3389
5196
  msgid "Popular Tags"
5197
  msgstr ""
5198
 
5199
+ #: includes/topics/template.php:3390
5200
  msgid "All Tags"
5201
  msgstr ""
5202
 
5203
+ #: includes/topics/template.php:3391
5204
  msgid "Parent Tag"
5205
  msgstr ""
5206
 
5207
+ #: includes/topics/template.php:3392
5208
  msgid "Parent Tag:"
5209
  msgstr ""
5210
 
5211
+ #: includes/topics/template.php:3393
5212
  msgid "Edit Tag"
5213
  msgstr ""
5214
 
5215
+ #: includes/topics/template.php:3394
5216
  msgid "View Topic Tag"
5217
  msgstr ""
5218
 
5219
+ #: includes/topics/template.php:3395
5220
  msgid "Update Tag"
5221
  msgstr ""
5222
 
5223
+ #: includes/topics/template.php:3396
5224
  msgid "Add New Tag"
5225
  msgstr ""
5226
 
5227
+ #: includes/topics/template.php:3397
5228
  msgid "New Tag Name"
5229
  msgstr ""
5230
 
5231
+ #: includes/topics/template.php:3398
5232
  msgid "Separate topic tags with commas"
5233
  msgstr ""
5234
 
5235
+ #: includes/topics/template.php:3399
5236
  msgid "Add or remove tags"
5237
  msgstr ""
5238
 
5239
+ #: includes/topics/template.php:3400
5240
  msgid "Choose from the most used tags"
5241
  msgstr ""
5242
 
5243
+ #: includes/topics/template.php:3401
5244
  msgid "No topic tags found."
5245
  msgstr ""
5246
 
5247
+ #: includes/topics/template.php:3402
5248
  msgid "No topic tags"
5249
  msgstr ""
5250
 
5251
+ #: includes/topics/template.php:3403
5252
  msgid "Topic tags list navigation"
5253
  msgstr ""
5254
 
5255
+ #: includes/topics/template.php:3404
5256
  msgid "Topic tags list"
5257
  msgstr ""
5258
 
5259
+ #: includes/topics/template.php:3405
5260
  msgid "Most used topic tags"
5261
  msgstr ""
5262
 
5263
+ #: includes/topics/template.php:3406
5264
  msgid "&larr; Back to Tags"
5265
  msgstr ""
5266
 
5267
+ #: includes/topics/template.php:4021
5268
  msgid "Nobody"
5269
  msgstr ""
5270
 
5271
+ #: includes/topics/template.php:4025
5272
  msgid "%1$s is currently editing this topic."
5273
  msgstr ""
5274
 
5275
  #: includes/users/engagements.php:608
5276
  msgid ""
5277
+ "<strong>Error</strong>: No topic was found. Which topic are you "
5278
  "marking/unmarking as favorite?"
5279
  msgstr ""
5280
 
5281
  #: includes/users/engagements.php:616
5282
  msgid ""
5283
+ "<strong>Error</strong>: You do not have permission to edit favorites for "
5284
  "that user."
5285
  msgstr ""
5286
 
5287
  #: includes/users/engagements.php:657
5288
  msgid ""
5289
+ "<strong>Error</strong>: There was a problem removing that topic from "
5290
  "favorites."
5291
  msgstr ""
5292
 
5293
  #: includes/users/engagements.php:659
5294
+ msgid "<strong>Error</strong>: There was a problem favoriting that topic."
5295
  msgstr ""
5296
 
5297
  #: includes/users/engagements.php:849
5298
  msgid ""
5299
+ "<strong>Error</strong>: Not found. What are you subscribing/unsubscribing "
5300
  "to?"
5301
  msgstr ""
5302
 
5303
  #: includes/users/engagements.php:857
5304
  msgid ""
5305
+ "<strong>Error</strong>: You do not have permission to edit subscriptions of "
5306
  "that user."
5307
  msgstr ""
5308
 
5309
  #: includes/users/engagements.php:900
5310
+ msgid "<strong>Error</strong>: There was a problem unsubscribing."
5311
  msgstr ""
5312
 
5313
  #: includes/users/engagements.php:902
5314
+ msgid "<strong>Error</strong>: There was a problem subscribing."
5315
  msgstr ""
5316
 
5317
  #: includes/users/functions.php:208 includes/users/functions.php:220
5318
+ msgid "<strong>Error</strong>: That is not a valid email address."
5319
  msgstr ""
5320
 
5321
  #: includes/users/functions.php:226 includes/users/functions.php:343
5322
+ msgid "<strong>Error</strong>: That email address is already in use."
5323
  msgstr ""
5324
 
5325
  #: includes/users/functions.php:406
5326
+ msgid "<strong>Error</strong>: An error occurred while updating your email address."
5327
  msgstr ""
5328
 
5329
  #: includes/users/functions.php:418
5350
  msgstr ""
5351
 
5352
  #: includes/users/signups.php:209
5353
+ msgid "<strong>Error</strong>: Empty role."
5354
  msgstr ""
5355
 
5356
  #: includes/users/signups.php:214
5357
+ msgid "<strong>Error</strong>: Invalid role."
5358
  msgstr ""
5359
 
5360
+ #: includes/users/template.php:683
5361
  msgid "Guest"
5362
  msgstr ""
5363
 
5364
+ #: includes/users/template.php:687
5365
  msgid "Inactive"
5366
  msgstr ""
5367
 
5368
+ #: includes/users/template.php:697
5369
  msgid "Member"
5370
  msgstr ""
5371
 
5372
+ #: includes/users/template.php:738
5373
  msgid "Admin"
5374
  msgstr ""
5375
 
5376
+ #: includes/users/template.php:1375
5377
  msgid "User updated."
5378
  msgstr ""
5379
 
5380
+ #: includes/users/template.php:1419
5381
  msgid "There is a pending email address change to %1$s. %2$s"
5382
  msgstr ""
5383
 
5384
+ #: includes/users/template.php:1436
5385
  msgid "You have super admin privileges."
5386
  msgstr ""
5387
 
5388
+ #: includes/users/template.php:1436
5389
  msgid "This user has super admin privileges."
5390
  msgstr ""
5391
 
5392
+ #: includes/users/template.php:1510
5393
  msgid "&mdash; No role for this site &mdash;"
5394
  msgstr ""
5395
 
5396
+ #: includes/users/template.php:1830
5397
  msgid "You are now logged out."
5398
  msgstr ""
5399
 
5400
+ #: includes/users/template.php:1834
5401
  msgid "New user registration is currently not allowed."
5402
  msgstr ""
5403
 
5404
+ #: includes/users/template.php:1843
5405
  msgid "Check your e-mail for the confirmation link."
5406
  msgstr ""
5407
 
5408
+ #: includes/users/template.php:1848
5409
  msgid "Check your e-mail for your new password."
5410
  msgstr ""
5411
 
5412
+ #: includes/users/template.php:1853
5413
  msgid "Registration complete. Please check your e-mail."
5414
  msgstr ""
5415
 
5416
+ #: includes/users/template.php:2375
5417
  msgid "Moderators:"
5418
  msgstr ""
5419
 
6237
  msgid "Open"
6238
  msgstr ""
6239
 
6240
+ #: includes/common/formatting.php:728
6241
  msgctxt "Separator in time since"
6242
  msgid ","
6243
  msgstr ""
6329
  msgid "Hidden"
6330
  msgstr ""
6331
 
6332
+ #: includes/replies/functions.php:1653
6333
  msgctxt "Publish the reply"
6334
  msgid "Publish"
6335
  msgstr ""
6336
 
6337
+ #: includes/replies/functions.php:1654
6338
  msgctxt "Spam the reply"
6339
  msgid "Spam"
6340
  msgstr ""
6341
 
6342
+ #: includes/replies/functions.php:1655
6343
  msgctxt "Trash the reply"
6344
  msgid "Trash"
6345
  msgstr ""
6346
 
6347
+ #: includes/replies/functions.php:1656
6348
  msgctxt "Mark reply as pending"
6349
  msgid "Pending"
6350
  msgstr ""
6351
 
6352
+ #: includes/replies/template.php:674 includes/topics/template.php:765
6353
  msgctxt "date at time"
6354
  msgid "%1$s at %2$s"
6355
  msgstr ""
6356
 
6357
+ #: includes/replies/template.php:1580 includes/topics/template.php:2853
6358
  msgctxt "verb"
6359
  msgid "Reply"
6360
  msgstr ""
6361
 
6362
+ #: includes/replies/template.php:2201
6363
  msgctxt "Pending Status"
6364
  msgid "Approve"
6365
  msgstr ""
6366
 
6367
+ #: includes/replies/template.php:2202
6368
  msgctxt "Pending Status"
6369
  msgid "Unapprove"
6370
  msgstr ""
6371
 
6372
+ #: includes/replies/template.php:2564
6373
  msgctxt "Default reply to dropdown text"
6374
  msgid "None"
6375
  msgstr ""
6376
 
6377
+ #: includes/topics/functions.php:1857 includes/topics/template.php:2581
6378
  msgctxt "Open the topic"
6379
  msgid "Open"
6380
  msgstr ""
6381
 
6382
+ #: includes/topics/functions.php:1858
6383
  msgctxt "Close the topic"
6384
  msgid "Closed"
6385
  msgstr ""
6389
  msgid "Close"
6390
  msgstr ""
6391
 
6392
+ #: includes/topics/functions.php:1859
6393
  msgctxt "Spam the topic"
6394
  msgid "Spam"
6395
  msgstr ""
6396
 
6397
+ #: includes/topics/functions.php:1860
6398
  msgctxt "Trash the topic"
6399
  msgid "Trash"
6400
  msgstr ""
6401
 
6402
+ #: includes/topics/functions.php:1861
6403
  msgctxt "Unapprove the topic"
6404
  msgid "Pending"
6405
  msgstr ""
6409
  msgid "Unapprove"
6410
  msgstr ""
6411
 
6412
+ #: includes/topics/functions.php:1878
6413
  msgctxt "Unstick a topic"
6414
  msgid "Normal"
6415
  msgstr ""
6416
 
6417
+ #: includes/topics/functions.php:1879
6418
  msgctxt "Make topic sticky"
6419
  msgid "Sticky"
6420
  msgstr ""
6421
 
6422
+ #: includes/topics/functions.php:1880
6423
  msgctxt "Make topic super sticky"
6424
  msgid "Super Sticky"
6425
  msgstr ""
6429
  msgid "Approve"
6430
  msgstr ""
6431
 
6432
+ #: includes/users/template.php:1414
6433
  msgctxt "Dismiss pending user email address change"
6434
  msgid "Cancel"
6435
  msgstr ""
includes/admin/actions.php CHANGED
@@ -55,10 +55,12 @@ add_action( 'bbp_admin_init', 'bbp_register_admin_styles' );
55
  add_action( 'bbp_admin_init', 'bbp_register_admin_scripts' );
56
  add_action( 'bbp_admin_init', 'bbp_register_admin_settings' );
57
 
58
- // Hook on to current_screen
59
- add_action( 'bbp_current_screen', 'bbp_admin_forums' );
60
- add_action( 'bbp_current_screen', 'bbp_admin_topics' );
61
- add_action( 'bbp_current_screen', 'bbp_admin_replies' );
 
 
62
 
63
  // Initialize the admin area
64
  add_action( 'bbp_init', 'bbp_setup_admin' );
55
  add_action( 'bbp_admin_init', 'bbp_register_admin_scripts' );
56
  add_action( 'bbp_admin_init', 'bbp_register_admin_settings' );
57
 
58
+ // Hook on to current_screen (only in Site admin, not Network or User)
59
+ if ( is_blog_admin() ) {
60
+ add_action( 'bbp_current_screen', 'bbp_admin_forums' );
61
+ add_action( 'bbp_current_screen', 'bbp_admin_topics' );
62
+ add_action( 'bbp_current_screen', 'bbp_admin_replies' );
63
+ }
64
 
65
  // Initialize the admin area
66
  add_action( 'bbp_init', 'bbp_setup_admin' );
includes/admin/tools/repair.php CHANGED
@@ -425,7 +425,7 @@ function bbp_admin_repair_forum_reply_count() {
425
  OR `postmeta`.`meta_key` = '_bbp_total_reply_count'";
426
 
427
  if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
428
- return array( 1, sprintf( $statement, $result ) );
429
  }
430
 
431
  // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
@@ -467,7 +467,7 @@ function bbp_admin_repair_forum_hidden_reply_count() {
467
  OR `postmeta`.`meta_key` = '_bbp_total_reply_count_hidden'";
468
 
469
  if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
470
- return array( 1, sprintf( $statement, $result ) );
471
  }
472
 
473
  // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
@@ -991,8 +991,8 @@ function bbp_admin_repair_freshness() {
991
  return array( 10, sprintf( $statement, $result ) );
992
  }
993
 
994
- // Loop through forums
995
- foreach ( $forums as $forum_id ) {
996
  if ( ! bbp_is_forum_category( $forum_id ) ) {
997
  bbp_update_forum( array( 'forum_id' => $forum_id ) );
998
  }
@@ -1106,7 +1106,7 @@ function bbp_admin_repair_closed_topics() {
1106
  $topic_status = get_post_meta( $closed_topic, '_bbp_status', true );
1107
 
1108
  // If we don't have a postmeta _bbp_status value
1109
- if( empty( $topic_status ) ) {
1110
  update_post_meta( $closed_topic, '_bbp_status', 'publish' );
1111
  ++$changed; // Keep a count to display at the end
1112
  }
@@ -1163,6 +1163,7 @@ function bbp_admin_repair_forum_meta() {
1163
  // Post types and status
1164
  $tpt = bbp_get_topic_post_type();
1165
  $rpt = bbp_get_reply_post_type();
 
1166
 
1167
  // Next, give all the topics their parent forum id.
1168
  if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
@@ -1174,6 +1175,16 @@ function bbp_admin_repair_forum_meta() {
1174
  return array( 2, sprintf( $statement, $result ) );
1175
  }
1176
 
 
 
 
 
 
 
 
 
 
 
1177
  // Next, give all the replies their parent forum id.
1178
  if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
1179
  ( SELECT `reply`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
425
  OR `postmeta`.`meta_key` = '_bbp_total_reply_count'";
426
 
427
  if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
428
+ return array( 1, sprintf( $statement, $result ) );
429
  }
430
 
431
  // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
467
  OR `postmeta`.`meta_key` = '_bbp_total_reply_count_hidden'";
468
 
469
  if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
470
+ return array( 1, sprintf( $statement, $result ) );
471
  }
472
 
473
  // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
991
  return array( 10, sprintf( $statement, $result ) );
992
  }
993
 
994
+ // Loop through forums
995
+ foreach ( $forums as $forum_id ) {
996
  if ( ! bbp_is_forum_category( $forum_id ) ) {
997
  bbp_update_forum( array( 'forum_id' => $forum_id ) );
998
  }
1106
  $topic_status = get_post_meta( $closed_topic, '_bbp_status', true );
1107
 
1108
  // If we don't have a postmeta _bbp_status value
1109
+ if ( empty( $topic_status ) ) {
1110
  update_post_meta( $closed_topic, '_bbp_status', 'publish' );
1111
  ++$changed; // Keep a count to display at the end
1112
  }
1163
  // Post types and status
1164
  $tpt = bbp_get_topic_post_type();
1165
  $rpt = bbp_get_reply_post_type();
1166
+ $fmt = bbp_get_forum_post_type();
1167
 
1168
  // Next, give all the topics their parent forum id.
1169
  if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
1175
  return array( 2, sprintf( $statement, $result ) );
1176
  }
1177
 
1178
+ // Next, give all the forums their parent forum id.
1179
+ if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
1180
+ ( SELECT `forum`.`ID`, '_bbp_forum_id', `forum`.`post_parent`
1181
+ FROM `$bbp_db->posts`
1182
+ AS `forum`
1183
+ WHERE `forum`.`post_type` = '{$fmt}'
1184
+ GROUP BY `forum`.`ID` )" ) ) ) {
1185
+ return array( 2, sprintf( $statement, $result ) );
1186
+ }
1187
+
1188
  // Next, give all the replies their parent forum id.
1189
  if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
1190
  ( SELECT `reply`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
includes/admin/tools/upgrade.php CHANGED
@@ -426,7 +426,7 @@ function bbp_admin_upgrade_user_favorites() {
426
  foreach ( $post_ids as $post_id ) {
427
 
428
  // Skip if already exists
429
- if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %d", $post_id, $new_key, $meta->user_id ) ) ) {
430
  continue;
431
  }
432
 
@@ -486,7 +486,7 @@ function bbp_admin_upgrade_user_topic_subscriptions() {
486
  foreach ( $post_ids as $post_id ) {
487
 
488
  // Skip if already exists
489
- if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %d", $post_id, $new_key, $meta->user_id ) ) ) {
490
  continue;
491
  }
492
 
@@ -546,7 +546,7 @@ function bbp_admin_upgrade_user_forum_subscriptions() {
546
  foreach ( $post_ids as $post_id ) {
547
 
548
  // Skip if already exists
549
- if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %d", $post_id, $new_key, $meta->user_id ) ) ) {
550
  continue;
551
  }
552
 
426
  foreach ( $post_ids as $post_id ) {
427
 
428
  // Skip if already exists
429
+ if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %s", $post_id, $new_key, $meta->user_id ) ) ) {
430
  continue;
431
  }
432
 
486
  foreach ( $post_ids as $post_id ) {
487
 
488
  // Skip if already exists
489
+ if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %s", $post_id, $new_key, $meta->user_id ) ) ) {
490
  continue;
491
  }
492
 
546
  foreach ( $post_ids as $post_id ) {
547
 
548
  // Skip if already exists
549
+ if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %s", $post_id, $new_key, $meta->user_id ) ) ) {
550
  continue;
551
  }
552
 
includes/common/formatting.php CHANGED
@@ -507,7 +507,7 @@ function bbp_make_mentions_clickable_callback( $matches = array() ) {
507
  : '';
508
 
509
  // Create the link to the user's profile
510
- $html = '<a href="%1$s"' . $class . '">%2$s</a>';
511
  $url = bbp_get_user_profile_url( $user->ID );
512
  $anchor = sprintf( $html, esc_url( $url ), esc_html( $matches[0] ) );
513
 
@@ -694,6 +694,10 @@ function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) {
694
  // so there's only two bits of calculation below:
695
  } else {
696
 
 
 
 
 
697
  // Step one: the first chunk
698
  for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
699
  $seconds = $chunks[ $i ][0];
@@ -726,8 +730,8 @@ function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) {
726
  }
727
  }
728
 
729
- // No output, so happened right now
730
- if ( ! (int) trim( $output ) ) {
731
  $output = $right_now_text;
732
  }
733
  }
507
  : '';
508
 
509
  // Create the link to the user's profile
510
+ $html = '<a href="%1$s"' . $class . '>%2$s</a>';
511
  $url = bbp_get_user_profile_url( $user->ID );
512
  $anchor = sprintf( $html, esc_url( $url ), esc_html( $matches[0] ) );
513
 
694
  // so there's only two bits of calculation below:
695
  } else {
696
 
697
+ // Default count values
698
+ $count = 0;
699
+ $count2 = 0;
700
+
701
  // Step one: the first chunk
702
  for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
703
  $seconds = $chunks[ $i ][0];
730
  }
731
  }
732
 
733
+ // Empty counts, so fallback to right now
734
+ if ( empty( $count ) && empty( $count2 ) ) {
735
  $output = $right_now_text;
736
  }
737
  }
includes/common/functions.php CHANGED
@@ -553,13 +553,13 @@ function bbp_filter_anonymous_post_data( $args = array() ) {
553
  // Filter name
554
  $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
555
  if ( empty( $r['bbp_anonymous_name'] ) ) {
556
- bbp_add_error( 'bbp_anonymous_name', __( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
557
  }
558
 
559
  // Filter email address
560
  $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
561
  if ( empty( $r['bbp_anonymous_email'] ) ) {
562
- bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
563
  }
564
 
565
  // Website is optional (can be empty)
@@ -1385,9 +1385,7 @@ function bbp_get_email_addresses_from_user_ids( $user_ids = array() ) {
1385
  foreach ( $range as $loop ) {
1386
 
1387
  // Initial loop has no offset
1388
- $offset = ( 1 === $loop )
1389
- ? 0
1390
- : $limit * $loop;
1391
 
1392
  // Calculate user IDs to include
1393
  $loop_ids = array_slice( $user_ids, $offset, $limit );
@@ -1738,7 +1736,7 @@ function bbp_get_child_counts( $parent_id = 0 ) {
1738
  LEFT JOIN {$bbp_db->postmeta} AS pm
1739
  ON p.ID = pm.post_id
1740
  AND pm.meta_key = %s
1741
- WHERE pm.meta_value = %d
1742
  GROUP BY p.post_status, p.post_type";
1743
 
1744
  // Get prepare vars
553
  // Filter name
554
  $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
555
  if ( empty( $r['bbp_anonymous_name'] ) ) {
556
+ bbp_add_error( 'bbp_anonymous_name', __( '<strong>Error</strong>: Invalid author name.', 'bbpress' ) );
557
  }
558
 
559
  // Filter email address
560
  $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
561
  if ( empty( $r['bbp_anonymous_email'] ) ) {
562
+ bbp_add_error( 'bbp_anonymous_email', __( '<strong>Error</strong>: Invalid email address.', 'bbpress' ) );
563
  }
564
 
565
  // Website is optional (can be empty)
1385
  foreach ( $range as $loop ) {
1386
 
1387
  // Initial loop has no offset
1388
+ $offset = $limit * ( $loop - 1 );
 
 
1389
 
1390
  // Calculate user IDs to include
1391
  $loop_ids = array_slice( $user_ids, $offset, $limit );
1736
  LEFT JOIN {$bbp_db->postmeta} AS pm
1737
  ON p.ID = pm.post_id
1738
  AND pm.meta_key = %s
1739
+ WHERE pm.meta_value = %s
1740
  GROUP BY p.post_status, p.post_type";
1741
 
1742
  // Get prepare vars
includes/core/abstraction.php CHANGED
@@ -475,3 +475,24 @@ function bbp_maybe_intercept( $action = '', $args = array() ) {
475
  ? $default
476
  : $filtered;
477
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  ? $default
476
  : $filtered;
477
  }
478
+
479
+ /** Date/Time *****************************************************************/
480
+
481
+ /**
482
+ * Get an empty datetime value.
483
+ *
484
+ * @since 2.6.6 bbPress (r7094)
485
+ *
486
+ * @return string
487
+ */
488
+ function bbp_get_empty_datetime() {
489
+
490
+ // Get the database version
491
+ $db_version = bbp_db()->db_version();
492
+
493
+ // Default return value
494
+ $retval = '0000-00-00 00:00:00';
495
+
496
+ // Filter & return
497
+ return (string) apply_filters( 'bbp_get_default_zero_date', $retval, $db_version );
498
+ }
includes/core/filters.php CHANGED
@@ -190,9 +190,20 @@ if ( is_admin() ) {
190
  // Filters outside of wp-admin
191
  } else {
192
 
193
- // Responsive images
194
- add_filter( 'bbp_get_reply_content', 'wp_make_content_images_responsive', 60 );
195
- add_filter( 'bbp_get_topic_content', 'wp_make_content_images_responsive', 60 );
 
 
 
 
 
 
 
 
 
 
 
196
 
197
  // Revisions
198
  add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 99, 2 );
190
  // Filters outside of wp-admin
191
  } else {
192
 
193
+ // WordPress 5.5.x and above
194
+ if ( function_exists( 'wp_filter_content_tags' ) ) {
195
+
196
+ // Responsive images
197
+ add_filter( 'bbp_get_reply_content', 'wp_filter_content_tags', 60 );
198
+ add_filter( 'bbp_get_topic_content', 'wp_filter_content_tags', 60 );
199
+
200
+ // WordPress 5.4.x and below
201
+ } else {
202
+
203
+ // Responsive images
204
+ add_filter( 'bbp_get_reply_content', 'wp_make_content_images_responsive', 60 );
205
+ add_filter( 'bbp_get_topic_content', 'wp_make_content_images_responsive', 60 );
206
+ }
207
 
208
  // Revisions
209
  add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 99, 2 );
includes/core/theme-compat.php CHANGED
@@ -364,7 +364,9 @@ function bbp_theme_compat_reset_post( $args = array() ) {
364
 
365
  // Switch defaults if post is set
366
  if ( isset( $wp_query->post ) ) {
367
- $dummy = bbp_parse_args( $args, array(
 
 
368
  'ID' => $wp_query->post->ID,
369
  'post_status' => $wp_query->post->post_status,
370
  'post_author' => $wp_query->post->post_author,
@@ -395,18 +397,23 @@ function bbp_theme_compat_reset_post( $args = array() ) {
395
  'is_single' => false,
396
  'is_archive' => false,
397
  'is_tax' => false
398
- ), 'theme_compat_reset_post' );
399
  } else {
400
- $dummy = bbp_parse_args( $args, array(
 
 
 
 
 
401
  'ID' => -9999,
402
  'post_status' => bbp_get_public_status_id(),
403
  'post_author' => 0,
404
  'post_parent' => 0,
405
  'post_type' => 'page',
406
- 'post_date' => 0,
407
- 'post_date_gmt' => 0,
408
- 'post_modified' => 0,
409
- 'post_modified_gmt' => 0,
410
  'post_content' => '',
411
  'post_title' => '',
412
  'post_excerpt' => '',
@@ -428,9 +435,12 @@ function bbp_theme_compat_reset_post( $args = array() ) {
428
  'is_single' => false,
429
  'is_archive' => false,
430
  'is_tax' => false
431
- ), 'theme_compat_reset_post' );
432
  }
433
 
 
 
 
434
  // Bail if dummy post is empty
435
  if ( empty( $dummy ) ) {
436
  return;
@@ -510,7 +520,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
510
  bbp_theme_compat_reset_post( array(
511
  'ID' => 0,
512
  'post_author' => 0,
513
- 'post_date' => 0,
514
  'post_content' => bbp_buffer_template_part( 'content', 'single-user', false ),
515
  'post_type' => '',
516
  'post_title' => bbp_get_displayed_user_field( 'display_name' ),
@@ -566,7 +576,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
566
  'ID' => ! empty( $page->ID ) ? $page->ID : 0,
567
  'post_title' => $new_title,
568
  'post_author' => 0,
569
- 'post_date' => 0,
570
  'post_content' => $new_content,
571
  'post_type' => bbp_get_forum_post_type(),
572
  'post_status' => bbp_get_public_status_id(),
@@ -582,7 +592,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
582
  'ID' => bbp_get_forum_id(),
583
  'post_title' => bbp_get_forum_title(),
584
  'post_author' => bbp_get_forum_author_id(),
585
- 'post_date' => 0,
586
  'post_content' => $bbp_shortcodes->display_forum_form(),
587
  'post_type' => bbp_get_forum_post_type(),
588
  'post_status' => bbp_get_forum_visibility(),
@@ -600,7 +610,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
600
  'ID' => bbp_get_forum_id(),
601
  'post_title' => bbp_get_forum_title(),
602
  'post_author' => bbp_get_forum_author_id(),
603
- 'post_date' => 0,
604
  'post_content' => $bbp_shortcodes->display_forum( array( 'id' => bbp_get_forum_id() ) ),
605
  'post_type' => bbp_get_forum_post_type(),
606
  'post_status' => bbp_get_forum_visibility(),
@@ -639,7 +649,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
639
  'ID' => ! empty( $page->ID ) ? $page->ID : 0,
640
  'post_title' => bbp_get_topic_archive_title(),
641
  'post_author' => 0,
642
- 'post_date' => 0,
643
  'post_content' => $new_content,
644
  'post_type' => bbp_get_topic_post_type(),
645
  'post_status' => bbp_get_public_status_id(),
@@ -675,7 +685,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
675
  'ID' => bbp_get_topic_id(),
676
  'post_title' => bbp_get_topic_title(),
677
  'post_author' => bbp_get_topic_author_id(),
678
- 'post_date' => 0,
679
  'post_content' => $new_content,
680
  'post_type' => bbp_get_topic_post_type(),
681
  'post_status' => bbp_get_topic_status(),
@@ -693,7 +703,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
693
  'ID' => 0,
694
  'post_title' => esc_html__( 'Replies', 'bbpress' ),
695
  'post_author' => 0,
696
- 'post_date' => 0,
697
  'post_content' => $bbp_shortcodes->display_reply_index(),
698
  'post_type' => bbp_get_reply_post_type(),
699
  'post_status' => bbp_get_public_status_id(),
@@ -725,7 +735,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
725
  'ID' => bbp_get_reply_id(),
726
  'post_title' => bbp_get_reply_title(),
727
  'post_author' => bbp_get_reply_author_id(),
728
- 'post_date' => 0,
729
  'post_content' => $new_content,
730
  'post_type' => bbp_get_reply_post_type(),
731
  'post_status' => bbp_get_reply_status(),
@@ -742,7 +752,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
742
  'ID' => 0,
743
  'post_title' => bbp_get_view_title(),
744
  'post_author' => 0,
745
- 'post_date' => 0,
746
  'post_content' => $bbp_shortcodes->display_view( array( 'id' => get_query_var( bbp_get_view_rewrite_id() ) ) ),
747
  'post_type' => '',
748
  'post_status' => bbp_get_public_status_id(),
@@ -759,7 +769,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
759
  'ID' => 0,
760
  'post_title' => bbp_get_search_title(),
761
  'post_author' => 0,
762
- 'post_date' => 0,
763
  'post_content' => $bbp_shortcodes->display_search( array( 'search' => get_query_var( bbp_get_search_rewrite_id() ) ) ),
764
  'post_type' => '',
765
  'post_status' => bbp_get_public_status_id(),
@@ -788,7 +798,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
788
  bbp_theme_compat_reset_post( array(
789
  'ID' => 0,
790
  'post_author' => 0,
791
- 'post_date' => 0,
792
  'post_content' => $new_content,
793
  'post_type' => '',
794
  'post_title' => sprintf( esc_html__( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ),
364
 
365
  // Switch defaults if post is set
366
  if ( isset( $wp_query->post ) ) {
367
+
368
+ // Use primarily Post attributes
369
+ $defaults = array(
370
  'ID' => $wp_query->post->ID,
371
  'post_status' => $wp_query->post->post_status,
372
  'post_author' => $wp_query->post->post_author,
397
  'is_single' => false,
398
  'is_archive' => false,
399
  'is_tax' => false
400
+ );
401
  } else {
402
+
403
+ // Get the default zero date value a single time
404
+ $zero_date = bbp_get_empty_datetime();
405
+
406
+ // Use primarily empty attributes
407
+ $defaults = array(
408
  'ID' => -9999,
409
  'post_status' => bbp_get_public_status_id(),
410
  'post_author' => 0,
411
  'post_parent' => 0,
412
  'post_type' => 'page',
413
+ 'post_date' => $zero_date,
414
+ 'post_date_gmt' => $zero_date,
415
+ 'post_modified' => $zero_date,
416
+ 'post_modified_gmt' => $zero_date,
417
  'post_content' => '',
418
  'post_title' => '',
419
  'post_excerpt' => '',
435
  'is_single' => false,
436
  'is_archive' => false,
437
  'is_tax' => false
438
+ );
439
  }
440
 
441
+ // Parse & filter
442
+ $dummy = bbp_parse_args( $args, $defaults, 'theme_compat_reset_post' );
443
+
444
  // Bail if dummy post is empty
445
  if ( empty( $dummy ) ) {
446
  return;
520
  bbp_theme_compat_reset_post( array(
521
  'ID' => 0,
522
  'post_author' => 0,
523
+ 'post_date' => bbp_get_empty_datetime(),
524
  'post_content' => bbp_buffer_template_part( 'content', 'single-user', false ),
525
  'post_type' => '',
526
  'post_title' => bbp_get_displayed_user_field( 'display_name' ),
576
  'ID' => ! empty( $page->ID ) ? $page->ID : 0,
577
  'post_title' => $new_title,
578
  'post_author' => 0,
579
+ 'post_date' => bbp_get_empty_datetime(),
580
  'post_content' => $new_content,
581
  'post_type' => bbp_get_forum_post_type(),
582
  'post_status' => bbp_get_public_status_id(),
592
  'ID' => bbp_get_forum_id(),
593
  'post_title' => bbp_get_forum_title(),
594
  'post_author' => bbp_get_forum_author_id(),
595
+ 'post_date' => bbp_get_empty_datetime(),
596
  'post_content' => $bbp_shortcodes->display_forum_form(),
597
  'post_type' => bbp_get_forum_post_type(),
598
  'post_status' => bbp_get_forum_visibility(),
610
  'ID' => bbp_get_forum_id(),
611
  'post_title' => bbp_get_forum_title(),
612
  'post_author' => bbp_get_forum_author_id(),
613
+ 'post_date' => bbp_get_empty_datetime(),
614
  'post_content' => $bbp_shortcodes->display_forum( array( 'id' => bbp_get_forum_id() ) ),
615
  'post_type' => bbp_get_forum_post_type(),
616
  'post_status' => bbp_get_forum_visibility(),
649
  'ID' => ! empty( $page->ID ) ? $page->ID : 0,
650
  'post_title' => bbp_get_topic_archive_title(),
651
  'post_author' => 0,
652
+ 'post_date' => bbp_get_empty_datetime(),
653
  'post_content' => $new_content,
654
  'post_type' => bbp_get_topic_post_type(),
655
  'post_status' => bbp_get_public_status_id(),
685
  'ID' => bbp_get_topic_id(),
686
  'post_title' => bbp_get_topic_title(),
687
  'post_author' => bbp_get_topic_author_id(),
688
+ 'post_date' => bbp_get_empty_datetime(),
689
  'post_content' => $new_content,
690
  'post_type' => bbp_get_topic_post_type(),
691
  'post_status' => bbp_get_topic_status(),
703
  'ID' => 0,
704
  'post_title' => esc_html__( 'Replies', 'bbpress' ),
705
  'post_author' => 0,
706
+ 'post_date' => bbp_get_empty_datetime(),
707
  'post_content' => $bbp_shortcodes->display_reply_index(),
708
  'post_type' => bbp_get_reply_post_type(),
709
  'post_status' => bbp_get_public_status_id(),
735
  'ID' => bbp_get_reply_id(),
736
  'post_title' => bbp_get_reply_title(),
737
  'post_author' => bbp_get_reply_author_id(),
738
+ 'post_date' => bbp_get_empty_datetime(),
739
  'post_content' => $new_content,
740
  'post_type' => bbp_get_reply_post_type(),
741
  'post_status' => bbp_get_reply_status(),
752
  'ID' => 0,
753
  'post_title' => bbp_get_view_title(),
754
  'post_author' => 0,
755
+ 'post_date' => bbp_get_empty_datetime(),
756
  'post_content' => $bbp_shortcodes->display_view( array( 'id' => get_query_var( bbp_get_view_rewrite_id() ) ) ),
757
  'post_type' => '',
758
  'post_status' => bbp_get_public_status_id(),
769
  'ID' => 0,
770
  'post_title' => bbp_get_search_title(),
771
  'post_author' => 0,
772
+ 'post_date' => bbp_get_empty_datetime(),
773
  'post_content' => $bbp_shortcodes->display_search( array( 'search' => get_query_var( bbp_get_search_rewrite_id() ) ) ),
774
  'post_type' => '',
775
  'post_status' => bbp_get_public_status_id(),
798
  bbp_theme_compat_reset_post( array(
799
  'ID' => 0,
800
  'post_author' => 0,
801
+ 'post_date' => bbp_get_empty_datetime(),
802
  'post_content' => $new_content,
803
  'post_type' => '',
804
  'post_title' => sprintf( esc_html__( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ),
includes/extend/akismet.php CHANGED
@@ -79,11 +79,11 @@ class BBP_Akismet {
79
  *
80
  * @since 2.0.0 bbPress (r3277)
81
  *
82
- * @param string $post_data
83
  *
84
  * @return array Array of post data
85
  */
86
- public function check_post( $post_data ) {
87
 
88
  // Define local variables
89
  $user_data = array();
@@ -110,7 +110,7 @@ class BBP_Akismet {
110
  $anonymous_data = bbp_filter_anonymous_post_data();
111
 
112
  // Author is anonymous
113
- if ( ! empty( $anonymous_data ) ) {
114
  $user_data['name'] = $anonymous_data['bbp_anonymous_name'];
115
  $user_data['email'] = $anonymous_data['bbp_anonymous_email'];
116
  $user_data['website'] = $anonymous_data['bbp_anonymous_website'];
@@ -165,20 +165,28 @@ class BBP_Akismet {
165
  'user_role' => $this->get_user_roles( $post_data['post_author'] ),
166
  ) );
167
 
 
 
 
 
 
168
  // Set the result (from maybe_spam() above)
169
  $post_data['bbp_akismet_result'] = ! empty( $_post['bbp_akismet_result'] )
170
  ? $_post['bbp_akismet_result'] // raw
171
  : esc_html__( 'No response', 'bbpress' );
172
 
173
- // Set the data-as-submitted value without the result (recursion avoidance)
174
- unset( $_post['bbp_akismet_result'] );
 
 
 
175
  $post_data['bbp_post_as_submitted'] = $_post;
176
 
177
  // Cleanup to avoid touching this variable again below
178
  unset( $_post );
179
 
180
  // Allow post_data to be manipulated
181
- do_action_ref_array( 'bbp_akismet_check_post', $post_data );
182
 
183
  // Parse and log the last response
184
  $this->last_post = $this->parse_response( $post_data );
@@ -300,7 +308,7 @@ class BBP_Akismet {
300
  'comment_author_email' => $_post->post_author ? get_the_author_meta( 'email', $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_email', true ),
301
  'comment_author_url' => $_post->post_author ? bbp_get_user_profile_url( $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_website', true ),
302
  'comment_content' => $_post_content,
303
- 'comment_date' => $_post->post_date,
304
  'comment_ID' => $post_id,
305
  'comment_post_ID' => $_post->post_parent,
306
  'comment_type' => $_post->post_type,
@@ -413,12 +421,17 @@ class BBP_Akismet {
413
  *
414
  * @return array Array of post data
415
  */
416
- private function maybe_spam( $post_data, $check = 'check', $spam = 'spam' ) {
417
  global $akismet_api_host, $akismet_api_port;
418
 
419
  // Define variables
420
  $query_string = $path = $response = '';
421
 
 
 
 
 
 
422
  // Populate post data
423
  $post_data['blog'] = get_option( 'home' );
424
  $post_data['blog_charset'] = get_option( 'blog_charset' );
@@ -427,51 +440,61 @@ class BBP_Akismet {
427
  $post_data['user_agent'] = bbp_current_author_ua();
428
 
429
  // Loop through _POST args and rekey strings
430
- foreach ( $_POST as $key => $value ) {
431
- if ( is_string( $value ) ) {
432
- $post_data['POST_' . $key] = $value;
 
 
433
  }
434
  }
435
 
436
- // Keys to ignore
437
- $ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' );
438
-
439
  // Loop through _SERVER args and remove allowed keys
440
- foreach ( $_SERVER as $key => $value ) {
 
 
 
441
 
442
- // Key should not be ignored
443
- if ( ! in_array( $key, $ignore, true ) && is_string( $value ) ) {
444
- $post_data[ $key ] = $value;
445
 
446
- // Key should be ignored
447
- } else {
448
- $post_data[ $key ] = '';
 
 
 
 
 
449
  }
450
  }
451
 
452
- // Ready...
453
- foreach ( $post_data as $key => $data ) {
454
- $query_string .= $key . '=' . urlencode( wp_unslash( $data ) ) . '&';
 
 
455
  }
456
 
457
- // Aim...
458
  if ( 'check' === $check ) {
459
  $path = '/1.1/comment-check';
460
  } elseif ( 'submit' === $check ) {
461
  $path = '/1.1/submit-' . $spam;
462
  }
463
 
464
- // Fire!
465
  $response = ! apply_filters( 'bbp_bypass_check_for_spam', false, $post_data )
466
  ? $this->http_post( $query_string, $akismet_api_host, $path, $akismet_api_port )
467
  : false;
468
 
469
- // Check the high-speed cam
470
- if ( ! empty( $response[1] ) ) {
471
- $post_data['bbp_akismet_result'] = $response[1];
472
- } else {
473
- $post_data['bbp_akismet_result'] = esc_html__( 'No response', 'bbpress' );
474
- }
 
 
 
475
 
476
  // Return the post data, with the results of the external Akismet request
477
  return $post_data;
@@ -501,7 +524,7 @@ class BBP_Akismet {
501
  }
502
 
503
  // Set up Akismet last post data
504
- if ( ! empty( $this->last_post ) ) {
505
  $as_submitted = $this->last_post['bbp_post_as_submitted'];
506
  }
507
 
@@ -513,46 +536,100 @@ class BBP_Akismet {
513
  $userdata = get_userdata( $_post->post_author );
514
  $anonymous_data = bbp_filter_anonymous_post_data();
515
 
 
 
 
 
 
 
 
 
 
 
516
  // More checks
517
- if ( intval( $as_submitted['comment_post_ID'] ) === intval( $_post->post_parent )
518
- && $as_submitted['comment_author'] === ( $anonymous_data ? $anonymous_data['bbp_anonymous_name'] : $userdata->display_name )
519
- && $as_submitted['comment_author_email'] === ( $anonymous_data ? $anonymous_data['bbp_anonymous_email'] : $userdata->user_email )
520
- ) {
 
 
 
 
 
 
 
 
 
 
 
521
 
522
  // Normal result: true
523
- if ( $this->last_post['bbp_akismet_result'] === 'true' ) {
524
 
525
  // Leave a trail so other's know what we did
526
  update_post_meta( $post_id, '_bbp_akismet_result', 'true' );
527
- $this->update_post_history( $post_id, esc_html__( 'Akismet caught this post as spam', 'bbpress' ), 'check-spam' );
 
 
 
 
528
 
529
  // If post_status isn't the spam status, as expected, leave a note
530
  if ( bbp_get_spam_status_id() !== $_post->post_status ) {
531
- $this->update_post_history( $post_id, sprintf( esc_html__( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
 
 
 
 
 
 
 
532
  }
533
 
534
  // Normal result: false
535
- } elseif ( $this->last_post['bbp_akismet_result'] === 'false' ) {
536
 
537
  // Leave a trail so other's know what we did
538
  update_post_meta( $post_id, '_bbp_akismet_result', 'false' );
539
- $this->update_post_history( $post_id, esc_html__( 'Akismet cleared this post as not spam', 'bbpress' ), 'check-ham' );
 
 
 
 
540
 
541
  // If post_status is the spam status, which isn't expected, leave a note
542
  if ( bbp_get_spam_status_id() === $_post->post_status ) {
543
- $this->update_post_history( $post_id, sprintf( esc_html__( 'Post status was changed to %s', 'bbpress' ), $_post->post_status ), 'status-changed-' . $_post->post_status );
 
 
 
 
 
 
 
544
  }
545
 
546
  // Abnormal result: error
547
  } else {
548
  // Leave a trail so other's know what we did
549
  update_post_meta( $post_id, '_bbp_akismet_error', time() );
550
- $this->update_post_history( $post_id, sprintf( esc_html__( 'Akismet was unable to check this post (response: %s), will automatically retry again later.', 'bbpress' ), $this->last_post['bbp_akismet_result'] ), 'check-error' );
 
 
 
 
 
 
 
551
  }
552
 
553
  // Record the complete original data as submitted for checking
554
  if ( isset( $this->last_post['bbp_post_as_submitted'] ) ) {
555
- update_post_meta( $post_id, '_bbp_akismet_as_submitted', $this->last_post['bbp_post_as_submitted'] );
 
 
 
 
556
  }
557
  }
558
  }
79
  *
80
  * @since 2.0.0 bbPress (r3277)
81
  *
82
+ * @param array $post_data
83
  *
84
  * @return array Array of post data
85
  */
86
+ public function check_post( $post_data = array() ) {
87
 
88
  // Define local variables
89
  $user_data = array();
110
  $anonymous_data = bbp_filter_anonymous_post_data();
111
 
112
  // Author is anonymous
113
+ if ( ! bbp_has_errors() ) {
114
  $user_data['name'] = $anonymous_data['bbp_anonymous_name'];
115
  $user_data['email'] = $anonymous_data['bbp_anonymous_email'];
116
  $user_data['website'] = $anonymous_data['bbp_anonymous_website'];
165
  'user_role' => $this->get_user_roles( $post_data['post_author'] ),
166
  ) );
167
 
168
+ // Set the result headers (from maybe_spam() above)
169
+ $post_data['bbp_akismet_result_headers'] = ! empty( $_post['bbp_akismet_result_headers'] )
170
+ ? $_post['bbp_akismet_result_headers'] // raw
171
+ : esc_html__( 'No response', 'bbpress' );
172
+
173
  // Set the result (from maybe_spam() above)
174
  $post_data['bbp_akismet_result'] = ! empty( $_post['bbp_akismet_result'] )
175
  ? $_post['bbp_akismet_result'] // raw
176
  : esc_html__( 'No response', 'bbpress' );
177
 
178
+ // Avoid recurrsion by unsetting results
179
+ unset(
180
+ $_post['bbp_akismet_result_headers'],
181
+ $_post['bbp_akismet_result']
182
+ );
183
  $post_data['bbp_post_as_submitted'] = $_post;
184
 
185
  // Cleanup to avoid touching this variable again below
186
  unset( $_post );
187
 
188
  // Allow post_data to be manipulated
189
+ $post_data = apply_filters( 'bbp_akismet_check_post', $post_data );
190
 
191
  // Parse and log the last response
192
  $this->last_post = $this->parse_response( $post_data );
308
  'comment_author_email' => $_post->post_author ? get_the_author_meta( 'email', $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_email', true ),
309
  'comment_author_url' => $_post->post_author ? bbp_get_user_profile_url( $_post->post_author ) : get_post_meta( $post_id, '_bbp_anonymous_website', true ),
310
  'comment_content' => $_post_content,
311
+ 'comment_date_gmt' => $_post->post_date_gmt,
312
  'comment_ID' => $post_id,
313
  'comment_post_ID' => $_post->post_parent,
314
  'comment_type' => $_post->post_type,
421
  *
422
  * @return array Array of post data
423
  */
424
+ private function maybe_spam( $post_data = array(), $check = 'check', $spam = 'spam' ) {
425
  global $akismet_api_host, $akismet_api_port;
426
 
427
  // Define variables
428
  $query_string = $path = $response = '';
429
 
430
+ // Make sure post data is an array
431
+ if ( ! is_array( $post_data ) ) {
432
+ $post_data = array();
433
+ }
434
+
435
  // Populate post data
436
  $post_data['blog'] = get_option( 'home' );
437
  $post_data['blog_charset'] = get_option( 'blog_charset' );
440
  $post_data['user_agent'] = bbp_current_author_ua();
441
 
442
  // Loop through _POST args and rekey strings
443
+ if ( ! empty( $_POST ) && is_countable( $_POST ) ) {
444
+ foreach ( $_POST as $key => $value ) {
445
+ if ( is_string( $value ) ) {
446
+ $post_data['POST_' . $key] = $value;
447
+ }
448
  }
449
  }
450
 
 
 
 
451
  // Loop through _SERVER args and remove allowed keys
452
+ if ( ! empty( $_SERVER ) && is_countable( $_SERVER ) ) {
453
+
454
+ // Keys to ignore
455
+ $ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' );
456
 
457
+ foreach ( $_SERVER as $key => $value ) {
 
 
458
 
459
+ // Key should not be ignored
460
+ if ( ! in_array( $key, $ignore, true ) && is_string( $value ) ) {
461
+ $post_data[ $key ] = $value;
462
+
463
+ // Key should be ignored
464
+ } else {
465
+ $post_data[ $key ] = '';
466
+ }
467
  }
468
  }
469
 
470
+ // Encode post data
471
+ if ( ! empty( $post_data ) && is_countable( $post_data ) ) {
472
+ foreach ( $post_data as $key => $data ) {
473
+ $query_string .= $key . '=' . urlencode( wp_unslash( $data ) ) . '&';
474
+ }
475
  }
476
 
477
+ // Setup the API route
478
  if ( 'check' === $check ) {
479
  $path = '/1.1/comment-check';
480
  } elseif ( 'submit' === $check ) {
481
  $path = '/1.1/submit-' . $spam;
482
  }
483
 
484
+ // Send data to Akismet
485
  $response = ! apply_filters( 'bbp_bypass_check_for_spam', false, $post_data )
486
  ? $this->http_post( $query_string, $akismet_api_host, $path, $akismet_api_port )
487
  : false;
488
 
489
+ // Set the result headers
490
+ $post_data['bbp_akismet_result_headers'] = ! empty( $response[0] )
491
+ ? $response[0]
492
+ : esc_html__( 'No response', 'bbpress' );
493
+
494
+ // Set the result
495
+ $post_data['bbp_akismet_result'] = ! empty( $response[1] )
496
+ ? $response[1]
497
+ : esc_html__( 'No response', 'bbpress' );
498
 
499
  // Return the post data, with the results of the external Akismet request
500
  return $post_data;
524
  }
525
 
526
  // Set up Akismet last post data
527
+ if ( ! empty( $this->last_post['bbp_post_as_submitted'] ) ) {
528
  $as_submitted = $this->last_post['bbp_post_as_submitted'];
529
  }
530
 
536
  $userdata = get_userdata( $_post->post_author );
537
  $anonymous_data = bbp_filter_anonymous_post_data();
538
 
539
+ // Which name?
540
+ $name = ! empty( $anonymous_data['bbp_anonymous_name'] )
541
+ ? $anonymous_data['bbp_anonymous_name']
542
+ : $userdata->display_name;
543
+
544
+ // Which email?
545
+ $email = ! empty( $anonymous_data['bbp_anonymous_email'] )
546
+ ? $anonymous_data['bbp_anonymous_email']
547
+ : $userdata->user_email;
548
+
549
  // More checks
550
+ if (
551
+
552
+ // Post matches
553
+ ( intval( $as_submitted['comment_post_ID'] ) === intval( $_post->post_parent ) )
554
+
555
+ &&
556
+
557
+ // Name matches
558
+ ( $as_submitted['comment_author'] === $name )
559
+
560
+ &&
561
+
562
+ // Email matches
563
+ ( $as_submitted['comment_author_email'] === $email )
564
+ ) {
565
 
566
  // Normal result: true
567
+ if ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( $this->last_post['bbp_akismet_result'] === 'true' ) ) {
568
 
569
  // Leave a trail so other's know what we did
570
  update_post_meta( $post_id, '_bbp_akismet_result', 'true' );
571
+ $this->update_post_history(
572
+ $post_id,
573
+ esc_html__( 'Akismet caught this post as spam', 'bbpress' ),
574
+ 'check-spam'
575
+ );
576
 
577
  // If post_status isn't the spam status, as expected, leave a note
578
  if ( bbp_get_spam_status_id() !== $_post->post_status ) {
579
+ $this->update_post_history(
580
+ $post_id,
581
+ sprintf(
582
+ esc_html__( 'Post status was changed to %s', 'bbpress' ),
583
+ $_post->post_status
584
+ ),
585
+ 'status-changed-' . $_post->post_status
586
+ );
587
  }
588
 
589
  // Normal result: false
590
+ } elseif ( ! empty( $this->last_post['bbp_akismet_result'] ) && ( $this->last_post['bbp_akismet_result'] === 'false' ) ) {
591
 
592
  // Leave a trail so other's know what we did
593
  update_post_meta( $post_id, '_bbp_akismet_result', 'false' );
594
+ $this->update_post_history(
595
+ $post_id,
596
+ esc_html__( 'Akismet cleared this post as not spam', 'bbpress' ),
597
+ 'check-ham'
598
+ );
599
 
600
  // If post_status is the spam status, which isn't expected, leave a note
601
  if ( bbp_get_spam_status_id() === $_post->post_status ) {
602
+ $this->update_post_history(
603
+ $post_id,
604
+ sprintf(
605
+ esc_html__( 'Post status was changed to %s', 'bbpress' ),
606
+ $_post->post_status
607
+ ),
608
+ 'status-changed-' . $_post->post_status
609
+ );
610
  }
611
 
612
  // Abnormal result: error
613
  } else {
614
  // Leave a trail so other's know what we did
615
  update_post_meta( $post_id, '_bbp_akismet_error', time() );
616
+ $this->update_post_history(
617
+ $post_id,
618
+ sprintf(
619
+ esc_html__( 'Akismet was unable to check this post (response: %s), will automatically retry again later.', 'bbpress' ),
620
+ $this->last_post['bbp_akismet_result']
621
+ ),
622
+ 'check-error'
623
+ );
624
  }
625
 
626
  // Record the complete original data as submitted for checking
627
  if ( isset( $this->last_post['bbp_post_as_submitted'] ) ) {
628
+ update_post_meta(
629
+ $post_id,
630
+ '_bbp_akismet_as_submitted',
631
+ $this->last_post['bbp_post_as_submitted']
632
+ );
633
  }
634
  }
635
  }
includes/extend/buddypress/groups.php CHANGED
@@ -376,7 +376,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
376
 
377
  // If everything else has failed, then something is wrong and we need
378
  // to add an error to prevent this topic from saving.
379
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is invalid.', 'bbpress' ) );
380
  }
381
 
382
  /**
@@ -439,7 +439,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
439
  }
440
 
441
  // Add an error to prevent this reply from saving.
442
- bbp_add_error( 'bbp_reply_to_id', __( '<strong>ERROR</strong>: Reply To is invalid.', 'bbpress' ) );
443
  }
444
 
445
  /** Edit ******************************************************************/
@@ -528,7 +528,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
528
 
529
  // Theme-side Nonce check
530
  } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) {
531
- bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
532
  return;
533
  }
534
 
@@ -685,7 +685,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
685
 
686
  // Nonce check
687
  if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) {
688
- bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
689
  return;
690
  }
691
 
376
 
377
  // If everything else has failed, then something is wrong and we need
378
  // to add an error to prevent this topic from saving.
379
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is invalid.', 'bbpress' ) );
380
  }
381
 
382
  /**
439
  }
440
 
441
  // Add an error to prevent this reply from saving.
442
+ bbp_add_error( 'bbp_reply_to_id', __( '<strong>Error</strong>: Reply To is invalid.', 'bbpress' ) );
443
  }
444
 
445
  /** Edit ******************************************************************/
528
 
529
  // Theme-side Nonce check
530
  } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) {
531
+ bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
532
  return;
533
  }
534
 
685
 
686
  // Nonce check
687
  if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) {
688
+ bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
689
  return;
690
  }
691
 
includes/extend/buddypress/notifications.php CHANGED
@@ -92,8 +92,8 @@ function bbp_format_buddypress_notifications( $content, $item_id, $secondary_ite
92
  } else {
93
  $filter = 'bbp_single_new_subscription_notification';
94
  $text = ! empty( $secondary_item_id )
95
- ? sprintf( esc_html__( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), $action_item_count, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) )
96
- : sprintf( esc_html__( 'You have %d new reply to %s', 'bbpress' ), $action_item_count, $topic_title );
97
  }
98
 
99
  // WordPress Toolbar
@@ -154,7 +154,7 @@ function bbp_buddypress_add_notification( $reply_id = 0, $topic_id = 0, $forum_i
154
 
155
  // Notify the topic author if not the current reply author
156
  if ( $author_id !== $topic_author_id ) {
157
- $args['secondary_item_id'] = $secondary_item_id ;
158
 
159
  bp_notifications_add_notification( $args );
160
  }
@@ -189,29 +189,55 @@ function bbp_buddypress_mark_notifications( $action = '' ) {
189
 
190
  // Get required data
191
  $user_id = bp_loggedin_user_id();
192
- $topic_id = intval( $_GET['topic_id'] );
 
 
 
193
 
194
  // Check nonce
195
  if ( ! bbp_verify_nonce_request( 'bbp_mark_topic_' . $topic_id ) ) {
196
- bbp_add_error( 'bbp_notification_topic_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
197
 
198
  // Check current user's ability to edit the user
199
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
200
- bbp_add_error( 'bbp_notification_permission', __( '<strong>ERROR</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
201
  }
202
 
203
  // Bail if we have errors
204
  if ( ! bbp_has_errors() ) {
205
 
206
- // Attempt to clear notifications for the current user from this topic
207
- $success = bp_notifications_mark_notifications_by_item_id( $user_id, $topic_id, bbp_get_component_name(), 'bbp_new_reply' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
  // Do additional subscriptions actions
210
- do_action( 'bbp_notifications_handler', $success, $user_id, $topic_id, $action );
211
  }
212
 
213
  // Redirect to the topic
214
- $redirect = bbp_get_reply_url( $topic_id );
215
 
216
  // Redirect
217
  bbp_redirect( $redirect );
92
  } else {
93
  $filter = 'bbp_single_new_subscription_notification';
94
  $text = ! empty( $secondary_item_id )
95
+ ? sprintf( esc_html__( 'You have %1$d new reply to %2$s from %3$s', 'bbpress' ), $action_item_count, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) )
96
+ : sprintf( esc_html__( 'You have %1$d new reply to %2$s', 'bbpress' ), $action_item_count, $topic_title );
97
  }
98
 
99
  // WordPress Toolbar
154
 
155
  // Notify the topic author if not the current reply author
156
  if ( $author_id !== $topic_author_id ) {
157
+ $args['secondary_item_id'] = $secondary_item_id;
158
 
159
  bp_notifications_add_notification( $args );
160
  }
189
 
190
  // Get required data
191
  $user_id = bp_loggedin_user_id();
192
+ $topic_id = absint( $_GET['topic_id'] );
193
+
194
+ // By default, Redirect to this topic ID
195
+ $redirect_id = $topic_id;
196
 
197
  // Check nonce
198
  if ( ! bbp_verify_nonce_request( 'bbp_mark_topic_' . $topic_id ) ) {
199
+ bbp_add_error( 'bbp_notification_topic_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
200
 
201
  // Check current user's ability to edit the user
202
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
203
+ bbp_add_error( 'bbp_notification_permission', __( '<strong>Error</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
204
  }
205
 
206
  // Bail if we have errors
207
  if ( ! bbp_has_errors() ) {
208
 
209
+ // Get these once
210
+ $post_type = bbp_get_reply_post_type();
211
+ $component = bbp_get_component_name();
212
+
213
+ // Attempt to clear notifications for this topic
214
+ $marked = bp_notifications_mark_notifications_by_item_id( $user_id, $topic_id, $component, 'bbp_new_reply' );
215
+
216
+ // Get all reply IDs for the topic
217
+ $replies = bbp_get_all_child_ids( $topic_id, $post_type );
218
+
219
+ // If topic has replies
220
+ if ( ! empty( $replies ) ) {
221
+
222
+ // Loop through each reply and attempt to mark it
223
+ foreach ( $replies as $reply_id ) {
224
+
225
+ // Attempt to mark notification for this reply ID
226
+ $marked = bp_notifications_mark_notifications_by_item_id( $user_id, $reply_id, $component, 'bbp_new_reply' );
227
+
228
+ // If marked, redirect to this reply ID
229
+ if ( ! empty( $marked ) ) {
230
+ $redirect_id = $reply_id;
231
+ }
232
+ }
233
+ }
234
 
235
  // Do additional subscriptions actions
236
+ do_action( 'bbp_notifications_handler', $marked, $user_id, $topic_id, $action );
237
  }
238
 
239
  // Redirect to the topic
240
+ $redirect = bbp_get_reply_url( $redirect_id );
241
 
242
  // Redirect
243
  bbp_redirect( $redirect );
includes/forums/functions.php CHANGED
@@ -123,7 +123,7 @@ function bbp_new_forum_handler( $action = '' ) {
123
 
124
  // Nonce check
125
  if ( ! bbp_verify_nonce_request( 'bbp-new-forum' ) ) {
126
- bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
127
  return;
128
  }
129
 
@@ -137,7 +137,7 @@ function bbp_new_forum_handler( $action = '' ) {
137
 
138
  // User cannot create forums
139
  if ( ! current_user_can( 'publish_forums' ) ) {
140
- bbp_add_error( 'bbp_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );
141
  return;
142
  }
143
 
@@ -162,12 +162,12 @@ function bbp_new_forum_handler( $action = '' ) {
162
 
163
  // No forum title
164
  if ( empty( $forum_title ) ) {
165
- bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
166
  }
167
 
168
  // Title too long
169
  if ( bbp_is_title_too_long( $forum_title ) ) {
170
- bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
171
  }
172
 
173
  /** Forum Content *********************************************************/
@@ -181,7 +181,7 @@ function bbp_new_forum_handler( $action = '' ) {
181
 
182
  // No forum content
183
  if ( empty( $forum_content ) ) {
184
- bbp_add_error( 'bbp_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
185
  }
186
 
187
  /** Forum Parent **********************************************************/
@@ -196,48 +196,48 @@ function bbp_new_forum_handler( $action = '' ) {
196
 
197
  // No forum parent was passed (should never happen)
198
  if ( empty( $forum_parent_id ) ) {
199
- bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>ERROR</strong>: Your forum must have a parent.', 'bbpress' ) );
200
 
201
  // Forum exists
202
  } elseif ( ! empty( $forum_parent_id ) ) {
203
 
204
  // Forum is a category
205
  if ( bbp_is_forum_category( $forum_parent_id ) ) {
206
- bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) );
207
  }
208
 
209
  // Forum is closed and user cannot access
210
  if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
211
- bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
212
  }
213
 
214
  // Forum is private and user cannot access
215
  if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
216
- bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
217
  }
218
 
219
  // Forum is hidden and user cannot access
220
  if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
221
- bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
222
  }
223
  }
224
 
225
  /** Forum Flooding ********************************************************/
226
 
227
  if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
228
- bbp_add_error( 'bbp_forum_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
229
  }
230
 
231
  /** Forum Duplicate *******************************************************/
232
 
233
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) {
234
- bbp_add_error( 'bbp_forum_duplicate', __( '<strong>ERROR</strong>: This forum already exists.', 'bbpress' ) );
235
  }
236
 
237
  /** Forum Bad Words *******************************************************/
238
 
239
  if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content, true ) ) {
240
- bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
241
  }
242
 
243
  /** Forum Moderation ******************************************************/
@@ -350,11 +350,11 @@ function bbp_new_forum_handler( $action = '' ) {
350
 
351
  // WP_Error
352
  } elseif ( is_wp_error( $forum_id ) ) {
353
- bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
354
 
355
  // Generic error
356
  } else {
357
- bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The forum was not created.', 'bbpress' ) );
358
  }
359
  }
360
 
@@ -379,7 +379,7 @@ function bbp_edit_forum_handler( $action = '' ) {
379
 
380
  // Forum id was not passed
381
  if ( empty( $_POST['bbp_forum_id'] ) ) {
382
- bbp_add_error( 'bbp_edit_forum_id', __( '<strong>ERROR</strong>: Forum ID not found.', 'bbpress' ) );
383
  return;
384
 
385
  // Forum id was passed
@@ -390,17 +390,17 @@ function bbp_edit_forum_handler( $action = '' ) {
390
 
391
  // Nonce check
392
  if ( ! bbp_verify_nonce_request( 'bbp-edit-forum_' . $forum_id ) ) {
393
- bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
394
  return;
395
 
396
  // Forum does not exist
397
  } elseif ( empty( $forum ) ) {
398
- bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>ERROR</strong>: The forum you want to edit was not found.', 'bbpress' ) );
399
  return;
400
 
401
  // User cannot edit this forum
402
  } elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) {
403
- bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
404
  return;
405
  }
406
 
@@ -426,17 +426,17 @@ function bbp_edit_forum_handler( $action = '' ) {
426
 
427
  // Forum is closed and user cannot access
428
  if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
429
- bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
430
  }
431
 
432
  // Forum is private and user cannot access
433
  if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
434
- bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
435
  }
436
 
437
  // Forum is hidden and user cannot access
438
  if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
439
- bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
440
  }
441
  }
442
 
@@ -451,12 +451,12 @@ function bbp_edit_forum_handler( $action = '' ) {
451
 
452
  // No forum title
453
  if ( empty( $forum_title ) ) {
454
- bbp_add_error( 'bbp_edit_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
455
  }
456
 
457
  // Title too long
458
  if ( bbp_is_title_too_long( $forum_title ) ) {
459
- bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
460
  }
461
 
462
  /** Forum Content *********************************************************/
@@ -470,13 +470,13 @@ function bbp_edit_forum_handler( $action = '' ) {
470
 
471
  // No forum content
472
  if ( empty( $forum_content ) ) {
473
- bbp_add_error( 'bbp_edit_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
474
  }
475
 
476
  /** Forum Bad Words *******************************************************/
477
 
478
  if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content, true ) ) {
479
- bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
480
  }
481
 
482
  /** Forum Moderation ******************************************************/
@@ -590,7 +590,7 @@ function bbp_edit_forum_handler( $action = '' ) {
590
 
591
  } else {
592
  $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : '';
593
- bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );
594
  }
595
  }
596
 
123
 
124
  // Nonce check
125
  if ( ! bbp_verify_nonce_request( 'bbp-new-forum' ) ) {
126
+ bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
127
  return;
128
  }
129
 
137
 
138
  // User cannot create forums
139
  if ( ! current_user_can( 'publish_forums' ) ) {
140
+ bbp_add_error( 'bbp_forum_permission', __( '<strong>Error</strong>: You do not have permission to create new forums.', 'bbpress' ) );
141
  return;
142
  }
143
 
162
 
163
  // No forum title
164
  if ( empty( $forum_title ) ) {
165
+ bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) );
166
  }
167
 
168
  // Title too long
169
  if ( bbp_is_title_too_long( $forum_title ) ) {
170
+ bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
171
  }
172
 
173
  /** Forum Content *********************************************************/
181
 
182
  // No forum content
183
  if ( empty( $forum_content ) ) {
184
+ bbp_add_error( 'bbp_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) );
185
  }
186
 
187
  /** Forum Parent **********************************************************/
196
 
197
  // No forum parent was passed (should never happen)
198
  if ( empty( $forum_parent_id ) ) {
199
+ bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>Error</strong>: Your forum must have a parent.', 'bbpress' ) );
200
 
201
  // Forum exists
202
  } elseif ( ! empty( $forum_parent_id ) ) {
203
 
204
  // Forum is a category
205
  if ( bbp_is_forum_category( $forum_parent_id ) ) {
206
+ bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>Error</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) );
207
  }
208
 
209
  // Forum is closed and user cannot access
210
  if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
211
+ bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) );
212
  }
213
 
214
  // Forum is private and user cannot access
215
  if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
216
+ bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
217
  }
218
 
219
  // Forum is hidden and user cannot access
220
  if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
221
+ bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
222
  }
223
  }
224
 
225
  /** Forum Flooding ********************************************************/
226
 
227
  if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
228
+ bbp_add_error( 'bbp_forum_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
229
  }
230
 
231
  /** Forum Duplicate *******************************************************/
232
 
233
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) {
234
+ bbp_add_error( 'bbp_forum_duplicate', __( '<strong>Error</strong>: This forum already exists.', 'bbpress' ) );
235
  }
236
 
237
  /** Forum Bad Words *******************************************************/
238
 
239
  if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content, true ) ) {
240
+ bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
241
  }
242
 
243
  /** Forum Moderation ******************************************************/
350
 
351
  // WP_Error
352
  } elseif ( is_wp_error( $forum_id ) ) {
353
+ bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
354
 
355
  // Generic error
356
  } else {
357
+ bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The forum was not created.', 'bbpress' ) );
358
  }
359
  }
360
 
379
 
380
  // Forum id was not passed
381
  if ( empty( $_POST['bbp_forum_id'] ) ) {
382
+ bbp_add_error( 'bbp_edit_forum_id', __( '<strong>Error</strong>: Forum ID not found.', 'bbpress' ) );
383
  return;
384
 
385
  // Forum id was passed
390
 
391
  // Nonce check
392
  if ( ! bbp_verify_nonce_request( 'bbp-edit-forum_' . $forum_id ) ) {
393
+ bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
394
  return;
395
 
396
  // Forum does not exist
397
  } elseif ( empty( $forum ) ) {
398
+ bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>Error</strong>: The forum you want to edit was not found.', 'bbpress' ) );
399
  return;
400
 
401
  // User cannot edit this forum
402
  } elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) {
403
+ bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>Error</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
404
  return;
405
  }
406
 
426
 
427
  // Forum is closed and user cannot access
428
  if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
429
+ bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) );
430
  }
431
 
432
  // Forum is private and user cannot access
433
  if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
434
+ bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
435
  }
436
 
437
  // Forum is hidden and user cannot access
438
  if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
439
+ bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
440
  }
441
  }
442
 
451
 
452
  // No forum title
453
  if ( empty( $forum_title ) ) {
454
+ bbp_add_error( 'bbp_edit_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) );
455
  }
456
 
457
  // Title too long
458
  if ( bbp_is_title_too_long( $forum_title ) ) {
459
+ bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
460
  }
461
 
462
  /** Forum Content *********************************************************/
470
 
471
  // No forum content
472
  if ( empty( $forum_content ) ) {
473
+ bbp_add_error( 'bbp_edit_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) );
474
  }
475
 
476
  /** Forum Bad Words *******************************************************/
477
 
478
  if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content, true ) ) {
479
+ bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
480
  }
481
 
482
  /** Forum Moderation ******************************************************/
590
 
591
  } else {
592
  $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : '';
593
+ bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );
594
  }
595
  }
596
 
includes/replies/functions.php CHANGED
@@ -131,7 +131,7 @@ function bbp_new_reply_handler( $action = '' ) {
131
 
132
  // Nonce check
133
  if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
134
- bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
135
  return;
136
  }
137
 
@@ -156,7 +156,7 @@ function bbp_new_reply_handler( $action = '' ) {
156
 
157
  // User cannot create replies
158
  if ( ! current_user_can( 'publish_replies' ) ) {
159
- bbp_add_error( 'bbp_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
160
  }
161
 
162
  // Reply author is current user
@@ -167,11 +167,11 @@ function bbp_new_reply_handler( $action = '' ) {
167
 
168
  // Topic id was not passed
169
  if ( empty( $_POST['bbp_topic_id'] ) ) {
170
- bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID is missing.', 'bbpress' ) );
171
 
172
  // Topic id is not a number
173
  } elseif ( ! is_numeric( $_POST['bbp_topic_id'] ) ) {
174
- bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID must be a number.', 'bbpress' ) );
175
 
176
  // Topic id might be valid
177
  } else {
@@ -181,11 +181,11 @@ function bbp_new_reply_handler( $action = '' ) {
181
 
182
  // Topic id is a negative number
183
  if ( 0 > $posted_topic_id ) {
184
- bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );
185
 
186
  // Topic does not exist
187
  } elseif ( ! bbp_get_topic( $posted_topic_id ) ) {
188
- bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic does not exist.', 'bbpress' ) );
189
 
190
  // Use the POST'ed topic id
191
  } else {
@@ -204,11 +204,11 @@ function bbp_new_reply_handler( $action = '' ) {
204
 
205
  // Empty Forum id was passed
206
  if ( empty( $_POST['bbp_forum_id'] ) ) {
207
- bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
208
 
209
  // Forum id is not a number
210
  } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
211
- bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID must be a number.', 'bbpress' ) );
212
 
213
  // Forum id might be valid
214
  } else {
@@ -218,15 +218,15 @@ function bbp_new_reply_handler( $action = '' ) {
218
 
219
  // Forum id is empty
220
  if ( 0 === $posted_forum_id ) {
221
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
222
 
223
  // Forum id is a negative number
224
  } elseif ( 0 > $posted_forum_id ) {
225
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
226
 
227
  // Forum does not exist
228
  } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
229
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum does not exist.', 'bbpress' ) );
230
 
231
  // Use the POST'ed forum id
232
  } else {
@@ -240,23 +240,23 @@ function bbp_new_reply_handler( $action = '' ) {
240
 
241
  // Forum is a category
242
  if ( bbp_is_forum_category( $forum_id ) ) {
243
- bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
244
 
245
  // Forum is not a category
246
  } else {
247
 
248
  // Forum is closed and user cannot access
249
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
250
- bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
251
  }
252
 
253
  // Forum is private and user cannot access
254
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
255
- bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
256
 
257
  // Forum is hidden and user cannot access
258
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
259
- bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
260
  }
261
  }
262
  }
@@ -281,7 +281,7 @@ function bbp_new_reply_handler( $action = '' ) {
281
 
282
  // Title too long
283
  if ( bbp_is_title_too_long( $reply_title ) ) {
284
- bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
285
  }
286
 
287
  /** Reply Content *********************************************************/
@@ -295,25 +295,25 @@ function bbp_new_reply_handler( $action = '' ) {
295
 
296
  // No reply content
297
  if ( empty( $reply_content ) ) {
298
- bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
299
  }
300
 
301
  /** Reply Flooding ********************************************************/
302
 
303
  if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
304
- bbp_add_error( 'bbp_reply_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
305
  }
306
 
307
  /** Reply Duplicate *******************************************************/
308
 
309
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
310
- bbp_add_error( 'bbp_reply_duplicate', __( '<strong>ERROR</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
311
  }
312
 
313
  /** Reply Bad Words *******************************************************/
314
 
315
  if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
316
- bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
317
  }
318
 
319
  /** Reply Status **********************************************************/
@@ -338,7 +338,7 @@ function bbp_new_reply_handler( $action = '' ) {
338
 
339
  // If topic is closed, moderators can still reply
340
  if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate', $topic_id ) ) {
341
- bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>ERROR</strong>: Topic is closed.', 'bbpress' ) );
342
  }
343
 
344
  /** Topic Tags ************************************************************/
@@ -398,7 +398,7 @@ function bbp_new_reply_handler( $action = '' ) {
398
 
399
  // Term error
400
  if ( is_wp_error( $terms ) ) {
401
- bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
402
  }
403
 
404
  /** Trash Check *******************************************************/
@@ -414,7 +414,12 @@ function bbp_new_reply_handler( $action = '' ) {
414
  if ( bbp_is_topic_trash( $topic_id ) ) {
415
 
416
  // Get pre_trashed_replies for topic
417
- $pre_trashed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
 
 
 
 
 
418
 
419
  // Add this reply to the end of the existing replies
420
  $pre_trashed_replies[] = $reply_id;
@@ -433,7 +438,12 @@ function bbp_new_reply_handler( $action = '' ) {
433
  if ( bbp_is_topic_spam( $topic_id ) ) {
434
 
435
  // Get pre_spammed_replies for topic
436
- $pre_spammed_replies = (array) get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
 
 
 
 
 
437
 
438
  // Add this reply to the end of the existing replies
439
  $pre_spammed_replies[] = $reply_id;
@@ -471,11 +481,11 @@ function bbp_new_reply_handler( $action = '' ) {
471
 
472
  // WP_Error
473
  } elseif ( is_wp_error( $reply_id ) ) {
474
- bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
475
 
476
  // Generic error
477
  } else {
478
- bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The reply was not created.', 'bbpress' ) );
479
  }
480
  }
481
 
@@ -503,7 +513,7 @@ function bbp_edit_reply_handler( $action = '' ) {
503
 
504
  // Reply id was not passed
505
  if ( empty( $_POST['bbp_reply_id'] ) ) {
506
- bbp_add_error( 'bbp_edit_reply_id', __( '<strong>ERROR</strong>: Reply ID not found.', 'bbpress' ) );
507
  return;
508
 
509
  // Reply id was passed
@@ -514,13 +524,13 @@ function bbp_edit_reply_handler( $action = '' ) {
514
 
515
  // Nonce check
516
  if ( ! bbp_verify_nonce_request( 'bbp-edit-reply_' . $reply_id ) ) {
517
- bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
518
  return;
519
  }
520
 
521
  // Reply does not exist
522
  if ( empty( $reply ) ) {
523
- bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>ERROR</strong>: The reply you want to edit was not found.', 'bbpress' ) );
524
  return;
525
 
526
  // Reply exists
@@ -531,7 +541,7 @@ function bbp_edit_reply_handler( $action = '' ) {
531
 
532
  // User cannot edit this reply
533
  if ( ! current_user_can( 'edit_reply', $reply_id ) ) {
534
- bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
535
  return;
536
  }
537
 
@@ -566,23 +576,23 @@ function bbp_edit_reply_handler( $action = '' ) {
566
 
567
  // Forum is a category
568
  if ( bbp_is_forum_category( $forum_id ) ) {
569
- bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
570
 
571
  // Forum is not a category
572
  } else {
573
 
574
  // Forum is closed and user cannot access
575
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
576
- bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
577
  }
578
 
579
  // Forum is private and user cannot access
580
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
581
- bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
582
 
583
  // Forum is hidden and user cannot access
584
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
585
- bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
586
  }
587
  }
588
  }
@@ -598,7 +608,7 @@ function bbp_edit_reply_handler( $action = '' ) {
598
 
599
  // Title too long
600
  if ( bbp_is_title_too_long( $reply_title ) ) {
601
- bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
602
  }
603
 
604
  /** Reply Content *********************************************************/
@@ -612,13 +622,13 @@ function bbp_edit_reply_handler( $action = '' ) {
612
 
613
  // No reply content
614
  if ( empty( $reply_content ) ) {
615
- bbp_add_error( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
616
  }
617
 
618
  /** Reply Bad Words *******************************************************/
619
 
620
  if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
621
- bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
622
  }
623
 
624
  /** Reply Status **********************************************************/
@@ -708,7 +718,7 @@ function bbp_edit_reply_handler( $action = '' ) {
708
 
709
  // Term error
710
  if ( is_wp_error( $terms ) ) {
711
- bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
712
  }
713
 
714
  /** No Errors *************************************************************/
@@ -766,7 +776,7 @@ function bbp_edit_reply_handler( $action = '' ) {
766
 
767
  } else {
768
  $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
769
- bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
770
  }
771
  }
772
 
@@ -819,12 +829,7 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
819
 
820
  // Set transient for throttle check (only on new, not edit)
821
  if ( empty( $is_edit ) ) {
822
- set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
823
- }
824
-
825
- } else {
826
- if ( empty( $is_edit ) && ! current_user_can( 'throttle' ) ) {
827
- bbp_update_user_last_posted( $author_id );
828
  }
829
  }
830
 
@@ -857,7 +862,10 @@ function bbp_update_reply( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymo
857
  // Update associated topic values if this is a new reply
858
  if ( empty( $is_edit ) ) {
859
 
860
- // Update poster IP if not editing
 
 
 
861
  update_post_meta( $reply_id, '_bbp_author_ip', bbp_current_author_ip(), false );
862
 
863
  // Last active time
@@ -951,7 +959,7 @@ function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id =
951
  } elseif ( bbp_is_forum( $ancestor ) ) {
952
 
953
  // Only update if reply is published
954
- if ( bbp_is_reply_pending( $reply_id ) && ! bbp_is_topic_pending( $topic_id ) ) {
955
 
956
  // Last topic and reply ID's
957
  bbp_update_forum_last_topic_id( $ancestor, $topic_id );
@@ -1211,7 +1219,7 @@ function bbp_move_reply_handler( $action = '' ) {
1211
  /** Move Reply ***********************************************************/
1212
 
1213
  if ( empty( $_POST['bbp_reply_id'] ) ) {
1214
- bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: A reply ID is required', 'bbpress' ) );
1215
  } else {
1216
  $move_reply_id = (int) $_POST['bbp_reply_id'];
1217
  }
@@ -1220,7 +1228,7 @@ function bbp_move_reply_handler( $action = '' ) {
1220
 
1221
  // Reply exists
1222
  if ( empty( $move_reply ) ) {
1223
- bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>ERROR</strong>: The reply you want to move was not found.', 'bbpress' ) );
1224
  }
1225
 
1226
  /** Topic to Move From ***************************************************/
@@ -1230,18 +1238,18 @@ function bbp_move_reply_handler( $action = '' ) {
1230
 
1231
  // No topic
1232
  if ( empty( $source_topic ) ) {
1233
- bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>ERROR</strong>: The topic you want to move from was not found.', 'bbpress' ) );
1234
  }
1235
 
1236
  // Nonce check failed
1237
  if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) {
1238
- bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1239
  return;
1240
  }
1241
 
1242
  // Use cannot edit topic
1243
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1244
- bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1245
  }
1246
 
1247
  // How to move
@@ -1251,7 +1259,7 @@ function bbp_move_reply_handler( $action = '' ) {
1251
 
1252
  // Invalid move option
1253
  if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) {
1254
- bbp_add_error( 'bbp_move_reply_option', __( '<strong>ERROR</strong>: You need to choose a valid move option.', 'bbpress' ) );
1255
 
1256
  // Valid move option
1257
  } else {
@@ -1264,7 +1272,7 @@ function bbp_move_reply_handler( $action = '' ) {
1264
 
1265
  // Get destination topic id
1266
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1267
- bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
1268
  } else {
1269
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1270
  }
@@ -1274,12 +1282,12 @@ function bbp_move_reply_handler( $action = '' ) {
1274
 
1275
  // No destination topic
1276
  if ( empty( $destination_topic ) ) {
1277
- bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );
1278
  }
1279
 
1280
  // User cannot edit the destination topic
1281
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1282
- bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1283
  }
1284
 
1285
  // Bump the reply position
@@ -1333,12 +1341,12 @@ function bbp_move_reply_handler( $action = '' ) {
1333
 
1334
  // Shouldn't happen
1335
  if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
1336
- bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
1337
  }
1338
 
1339
  // User cannot publish posts
1340
  } else {
1341
- bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
1342
  }
1343
 
1344
  break;
@@ -1486,13 +1494,13 @@ function bbp_toggle_reply_handler( $action = '' ) {
1486
  // Make sure reply exists
1487
  $reply = bbp_get_reply( $reply_id );
1488
  if ( empty( $reply ) ) {
1489
- bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>ERROR</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );
1490
  return;
1491
  }
1492
 
1493
  // What is the user doing here?
1494
  if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) {
1495
- bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to do that.', 'bbpress' ) );
1496
  return;
1497
  }
1498
 
@@ -1568,7 +1576,7 @@ function bbp_toggle_reply( $args = array() ) {
1568
 
1569
  $is_approve = bbp_is_reply_pending( $r['id'] );
1570
  $retval['status'] = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] );
1571
- $retval['message'] = $is_approve ? __( '<strong>ERROR</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply.', 'bbpress' );
1572
  $retval['view_all'] = ! $is_approve;
1573
 
1574
  break;
@@ -1579,7 +1587,7 @@ function bbp_toggle_reply( $args = array() ) {
1579
 
1580
  $is_spam = bbp_is_reply_spam( $r['id'] );
1581
  $retval['status'] = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] );
1582
- $retval['message'] = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam.', 'bbpress' );
1583
  $retval['view_all'] = ! $is_spam;
1584
 
1585
  break;
@@ -1594,7 +1602,7 @@ function bbp_toggle_reply( $args = array() ) {
1594
 
1595
  $retval['view_all'] = true;
1596
  $retval['status'] = wp_trash_post( $r['id'] );
1597
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the reply.', 'bbpress' );
1598
 
1599
  break;
1600
 
@@ -1602,7 +1610,7 @@ function bbp_toggle_reply( $args = array() ) {
1602
  check_ajax_referer( "untrash-{$nonce_suffix}" );
1603
 
1604
  $retval['status'] = wp_untrash_post( $r['id'] );
1605
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply.', 'bbpress' );
1606
 
1607
  break;
1608
 
@@ -1610,7 +1618,7 @@ function bbp_toggle_reply( $args = array() ) {
1610
  check_ajax_referer( "delete-{$nonce_suffix}" );
1611
 
1612
  $retval['status'] = wp_delete_post( $r['id'] );
1613
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply.', 'bbpress' );
1614
 
1615
  break;
1616
  }
@@ -1825,6 +1833,9 @@ function bbp_approve_reply( $reply_id = 0 ) {
1825
  // Set publish status
1826
  $reply->post_status = $status;
1827
 
 
 
 
1828
  // No revisions
1829
  remove_action( 'pre_post_update', 'wp_save_post_revision' );
1830
 
131
 
132
  // Nonce check
133
  if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
134
+ bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
135
  return;
136
  }
137
 
156
 
157
  // User cannot create replies
158
  if ( ! current_user_can( 'publish_replies' ) ) {
159
+ bbp_add_error( 'bbp_reply_permission', __( '<strong>Error</strong>: You do not have permission to reply.', 'bbpress' ) );
160
  }
161
 
162
  // Reply author is current user
167
 
168
  // Topic id was not passed
169
  if ( empty( $_POST['bbp_topic_id'] ) ) {
170
+ bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID is missing.', 'bbpress' ) );
171
 
172
  // Topic id is not a number
173
  } elseif ( ! is_numeric( $_POST['bbp_topic_id'] ) ) {
174
+ bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID must be a number.', 'bbpress' ) );
175
 
176
  // Topic id might be valid
177
  } else {
181
 
182
  // Topic id is a negative number
183
  if ( 0 > $posted_topic_id ) {
184
+ bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );
185
 
186
  // Topic does not exist
187
  } elseif ( ! bbp_get_topic( $posted_topic_id ) ) {
188
+ bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic does not exist.', 'bbpress' ) );
189
 
190
  // Use the POST'ed topic id
191
  } else {
204
 
205
  // Empty Forum id was passed
206
  if ( empty( $_POST['bbp_forum_id'] ) ) {
207
+ bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
208
 
209
  // Forum id is not a number
210
  } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
211
+ bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) );
212
 
213
  // Forum id might be valid
214
  } else {
218
 
219
  // Forum id is empty
220
  if ( 0 === $posted_forum_id ) {
221
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
222
 
223
  // Forum id is a negative number
224
  } elseif ( 0 > $posted_forum_id ) {
225
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
226
 
227
  // Forum does not exist
228
  } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
229
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) );
230
 
231
  // Use the POST'ed forum id
232
  } else {
240
 
241
  // Forum is a category
242
  if ( bbp_is_forum_category( $forum_id ) ) {
243
+ bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
244
 
245
  // Forum is not a category
246
  } else {
247
 
248
  // Forum is closed and user cannot access
249
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
250
+ bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) );
251
  }
252
 
253
  // Forum is private and user cannot access
254
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
255
+ bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
256
 
257
  // Forum is hidden and user cannot access
258
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
259
+ bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
260
  }
261
  }
262
  }
281
 
282
  // Title too long
283
  if ( bbp_is_title_too_long( $reply_title ) ) {
284
+ bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
285
  }
286
 
287
  /** Reply Content *********************************************************/
295
 
296
  // No reply content
297
  if ( empty( $reply_content ) ) {
298
+ bbp_add_error( 'bbp_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) );
299
  }
300
 
301
  /** Reply Flooding ********************************************************/
302
 
303
  if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
304
+ bbp_add_error( 'bbp_reply_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
305
  }
306
 
307
  /** Reply Duplicate *******************************************************/
308
 
309
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
310
+ bbp_add_error( 'bbp_reply_duplicate', __( '<strong>Error</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
311
  }
312
 
313
  /** Reply Bad Words *******************************************************/
314
 
315
  if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
316
+ bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
317
  }
318
 
319
  /** Reply Status **********************************************************/
338
 
339
  // If topic is closed, moderators can still reply
340
  if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate', $topic_id ) ) {
341
+ bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>Error</strong>: Topic is closed.', 'bbpress' ) );
342
  }
343
 
344
  /** Topic Tags ************************************************************/
398
 
399
  // Term error
400
  if ( is_wp_error( $terms ) ) {
401
+ bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
402
  }
403
 
404
  /** Trash Check *******************************************************/
414
  if ( bbp_is_topic_trash( $topic_id ) ) {
415
 
416
  // Get pre_trashed_replies for topic
417
+ $pre_trashed_meta = get_post_meta( $topic_id, '_bbp_pre_trashed_replies', true );
418
+
419
+ // Format the meta value
420
+ $pre_trashed_replies = is_array( $pre_trashed_meta )
421
+ ? array_filter( $pre_trashed_meta )
422
+ : array();
423
 
424
  // Add this reply to the end of the existing replies
425
  $pre_trashed_replies[] = $reply_id;
438
  if ( bbp_is_topic_spam( $topic_id ) ) {
439
 
440
  // Get pre_spammed_replies for topic
441
+ $pre_trashed_meta = get_post_meta( $topic_id, '_bbp_pre_spammed_replies', true );
442
+
443
+ // Format the meta value
444
+ $pre_spammed_replies = is_array( $pre_trashed_meta )
445
+ ? array_filter( $pre_trashed_meta )
446
+ : array();
447
 
448
  // Add this reply to the end of the existing replies
449
  $pre_spammed_replies[] = $reply_id;
481
 
482
  // WP_Error
483
  } elseif ( is_wp_error( $reply_id ) ) {
484
+ bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
485
 
486
  // Generic error
487
  } else {
488
+ bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The reply was not created.', 'bbpress' ) );
489
  }
490
  }
491
 
513
 
514
  // Reply id was not passed
515
  if ( empty( $_POST['bbp_reply_id'] ) ) {
516
+ bbp_add_error( 'bbp_edit_reply_id', __( '<strong>Error</strong>: Reply ID not found.', 'bbpress' ) );
517
  return;
518
 
519
  // Reply id was passed
524
 
525
  // Nonce check
526
  if ( ! bbp_verify_nonce_request( 'bbp-edit-reply_' . $reply_id ) ) {
527
+ bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
528
  return;
529
  }
530
 
531
  // Reply does not exist
532
  if ( empty( $reply ) ) {
533
+ bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>Error</strong>: The reply you want to edit was not found.', 'bbpress' ) );
534
  return;
535
 
536
  // Reply exists
541
 
542
  // User cannot edit this reply
543
  if ( ! current_user_can( 'edit_reply', $reply_id ) ) {
544
+ bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>Error</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
545
  return;
546
  }
547
 
576
 
577
  // Forum is a category
578
  if ( bbp_is_forum_category( $forum_id ) ) {
579
+ bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
580
 
581
  // Forum is not a category
582
  } else {
583
 
584
  // Forum is closed and user cannot access
585
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
586
+ bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) );
587
  }
588
 
589
  // Forum is private and user cannot access
590
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
591
+ bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
592
 
593
  // Forum is hidden and user cannot access
594
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
595
+ bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
596
  }
597
  }
598
  }
608
 
609
  // Title too long
610
  if ( bbp_is_title_too_long( $reply_title ) ) {
611
+ bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
612
  }
613
 
614
  /** Reply Content *********************************************************/
622
 
623
  // No reply content
624
  if ( empty( $reply_content ) ) {
625
+ bbp_add_error( 'bbp_edit_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) );
626
  }
627
 
628
  /** Reply Bad Words *******************************************************/
629
 
630
  if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
631
+ bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
632
  }
633
 
634
  /** Reply Status **********************************************************/
718
 
719
  // Term error
720
  if ( is_wp_error( $terms ) ) {
721
+ bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
722
  }
723
 
724
  /** No Errors *************************************************************/
776
 
777
  } else {
778
  $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
779
+ bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
780
  }
781
  }
782
 
829
 
830
  // Set transient for throttle check (only on new, not edit)
831
  if ( empty( $is_edit ) ) {
832
+ set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time(), HOUR_IN_SECONDS );
 
 
 
 
 
833
  }
834
  }
835
 
862
  // Update associated topic values if this is a new reply
863
  if ( empty( $is_edit ) ) {
864
 
865
+ // Update poster activity time
866
+ bbp_update_user_last_posted( $author_id );
867
+
868
+ // Update poster IP
869
  update_post_meta( $reply_id, '_bbp_author_ip', bbp_current_author_ip(), false );
870
 
871
  // Last active time
959
  } elseif ( bbp_is_forum( $ancestor ) ) {
960
 
961
  // Only update if reply is published
962
+ if ( ! bbp_is_reply_pending( $reply_id ) && ! bbp_is_topic_pending( $topic_id ) ) {
963
 
964
  // Last topic and reply ID's
965
  bbp_update_forum_last_topic_id( $ancestor, $topic_id );
1219
  /** Move Reply ***********************************************************/
1220
 
1221
  if ( empty( $_POST['bbp_reply_id'] ) ) {
1222
+ bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>Error</strong>: A reply ID is required', 'bbpress' ) );
1223
  } else {
1224
  $move_reply_id = (int) $_POST['bbp_reply_id'];
1225
  }
1228
 
1229
  // Reply exists
1230
  if ( empty( $move_reply ) ) {
1231
+ bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>Error</strong>: The reply you want to move was not found.', 'bbpress' ) );
1232
  }
1233
 
1234
  /** Topic to Move From ***************************************************/
1238
 
1239
  // No topic
1240
  if ( empty( $source_topic ) ) {
1241
+ bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>Error</strong>: The topic you want to move from was not found.', 'bbpress' ) );
1242
  }
1243
 
1244
  // Nonce check failed
1245
  if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) {
1246
+ bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1247
  return;
1248
  }
1249
 
1250
  // Use cannot edit topic
1251
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1252
+ bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1253
  }
1254
 
1255
  // How to move
1259
 
1260
  // Invalid move option
1261
  if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) {
1262
+ bbp_add_error( 'bbp_move_reply_option', __( '<strong>Error</strong>: You need to choose a valid move option.', 'bbpress' ) );
1263
 
1264
  // Valid move option
1265
  } else {
1272
 
1273
  // Get destination topic id
1274
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1275
+ bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) );
1276
  } else {
1277
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1278
  }
1282
 
1283
  // No destination topic
1284
  if ( empty( $destination_topic ) ) {
1285
+ bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>Error</strong>: The topic you want to move to was not found.', 'bbpress' ) );
1286
  }
1287
 
1288
  // User cannot edit the destination topic
1289
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1290
+ bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1291
  }
1292
 
1293
  // Bump the reply position
1341
 
1342
  // Shouldn't happen
1343
  if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
1344
+ bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
1345
  }
1346
 
1347
  // User cannot publish posts
1348
  } else {
1349
+ bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
1350
  }
1351
 
1352
  break;
1494
  // Make sure reply exists
1495
  $reply = bbp_get_reply( $reply_id );
1496
  if ( empty( $reply ) ) {
1497
+ bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>Error</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );
1498
  return;
1499
  }
1500
 
1501
  // What is the user doing here?
1502
  if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) {
1503
+ bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) );
1504
  return;
1505
  }
1506
 
1576
 
1577
  $is_approve = bbp_is_reply_pending( $r['id'] );
1578
  $retval['status'] = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] );
1579
+ $retval['message'] = $is_approve ? __( '<strong>Error</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem unapproving the reply.', 'bbpress' );
1580
  $retval['view_all'] = ! $is_approve;
1581
 
1582
  break;
1587
 
1588
  $is_spam = bbp_is_reply_spam( $r['id'] );
1589
  $retval['status'] = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] );
1590
+ $retval['message'] = $is_spam ? __( '<strong>Error</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem marking the reply as spam.', 'bbpress' );
1591
  $retval['view_all'] = ! $is_spam;
1592
 
1593
  break;
1602
 
1603
  $retval['view_all'] = true;
1604
  $retval['status'] = wp_trash_post( $r['id'] );
1605
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem trashing the reply.', 'bbpress' );
1606
 
1607
  break;
1608
 
1610
  check_ajax_referer( "untrash-{$nonce_suffix}" );
1611
 
1612
  $retval['status'] = wp_untrash_post( $r['id'] );
1613
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the reply.', 'bbpress' );
1614
 
1615
  break;
1616
 
1618
  check_ajax_referer( "delete-{$nonce_suffix}" );
1619
 
1620
  $retval['status'] = wp_delete_post( $r['id'] );
1621
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the reply.', 'bbpress' );
1622
 
1623
  break;
1624
  }
1833
  // Set publish status
1834
  $reply->post_status = $status;
1835
 
1836
+ // Set post date GMT - prevents post_date override in wp_update_post()
1837
+ $reply->post_date_gmt = get_gmt_from_date( $reply->post_date );
1838
+
1839
  // No revisions
1840
  remove_action( 'pre_post_update', 'wp_save_post_revision' );
1841
 
includes/replies/template.php CHANGED
@@ -436,6 +436,7 @@ function bbp_reply_url( $reply_id = 0 ) {
436
 
437
  // Set needed variables
438
  $reply_id = bbp_get_reply_id( $reply_id );
 
439
 
440
  // Juggle reply & topic IDs for unpretty URL formatting
441
  if ( bbp_is_reply( $reply_id ) ) {
@@ -2493,7 +2494,7 @@ function bbp_form_reply_to() {
2493
  $reply_to = 0;
2494
 
2495
  // Get $_REQUEST data
2496
- if ( bbp_is_reply_form_post_request() && isset( $_REQUEST['bbp_reply_to'] ) ) {
2497
  $reply_to = bbp_validate_reply_to( $_REQUEST['bbp_reply_to'] );
2498
  }
2499
 
436
 
437
  // Set needed variables
438
  $reply_id = bbp_get_reply_id( $reply_id );
439
+ $topic_id = 0;
440
 
441
  // Juggle reply & topic IDs for unpretty URL formatting
442
  if ( bbp_is_reply( $reply_id ) ) {
2494
  $reply_to = 0;
2495
 
2496
  // Get $_REQUEST data
2497
+ if ( isset( $_REQUEST['bbp_reply_to'] ) ) {
2498
  $reply_to = bbp_validate_reply_to( $_REQUEST['bbp_reply_to'] );
2499
  }
2500
 
includes/topics/functions.php CHANGED
@@ -102,7 +102,7 @@ function bbp_new_topic_handler( $action = '' ) {
102
 
103
  // Nonce check
104
  if ( ! bbp_verify_nonce_request( 'bbp-new-topic' ) ) {
105
- bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
106
  return;
107
  }
108
 
@@ -129,7 +129,7 @@ function bbp_new_topic_handler( $action = '' ) {
129
 
130
  // User cannot create topics
131
  if ( ! current_user_can( 'publish_topics' ) ) {
132
- bbp_add_error( 'bbp_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );
133
  return;
134
  }
135
 
@@ -155,12 +155,12 @@ function bbp_new_topic_handler( $action = '' ) {
155
 
156
  // No topic title
157
  if ( empty( $topic_title ) ) {
158
- bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
159
  }
160
 
161
  // Title too long
162
  if ( bbp_is_title_too_long( $topic_title ) ) {
163
- bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
164
  }
165
 
166
  /** Topic Content *********************************************************/
@@ -174,7 +174,7 @@ function bbp_new_topic_handler( $action = '' ) {
174
 
175
  // No topic content
176
  if ( empty( $topic_content ) ) {
177
- bbp_add_error( 'bbp_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
178
  }
179
 
180
  /** Topic Forum ***********************************************************/
@@ -184,11 +184,11 @@ function bbp_new_topic_handler( $action = '' ) {
184
 
185
  // Empty Forum id was passed
186
  if ( empty( $_POST['bbp_forum_id'] ) ) {
187
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
188
 
189
  // Forum id is not a number
190
  } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
191
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID must be a number.', 'bbpress' ) );
192
 
193
  // Forum id might be valid
194
  } else {
@@ -198,15 +198,15 @@ function bbp_new_topic_handler( $action = '' ) {
198
 
199
  // Forum id is empty
200
  if ( 0 === $posted_forum_id ) {
201
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
202
 
203
  // Forum id is a negative number
204
  } elseif ( 0 > $posted_forum_id ) {
205
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
206
 
207
  // Forum does not exist
208
  } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
209
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum does not exist.', 'bbpress' ) );
210
 
211
  // Use the POST'ed forum id
212
  } else {
@@ -220,23 +220,23 @@ function bbp_new_topic_handler( $action = '' ) {
220
 
221
  // Forum is a category
222
  if ( bbp_is_forum_category( $forum_id ) ) {
223
- bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
224
 
225
  // Forum is not a category
226
  } else {
227
 
228
  // Forum is closed and user cannot access
229
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
230
- bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
231
  }
232
 
233
  // Forum is private and user cannot access
234
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
235
- bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
236
 
237
  // Forum is hidden and user cannot access
238
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
239
- bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
240
  }
241
  }
242
  }
@@ -244,19 +244,19 @@ function bbp_new_topic_handler( $action = '' ) {
244
  /** Topic Flooding ********************************************************/
245
 
246
  if ( ! bbp_check_for_flood( $anonymous_data, $topic_author ) ) {
247
- bbp_add_error( 'bbp_topic_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
248
  }
249
 
250
  /** Topic Duplicate *******************************************************/
251
 
252
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_topic_post_type(), 'post_author' => $topic_author, 'post_content' => $topic_content, 'anonymous_data' => $anonymous_data ) ) ) {
253
- bbp_add_error( 'bbp_topic_duplicate', __( '<strong>ERROR</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
254
  }
255
 
256
  /** Topic Bad Words *******************************************************/
257
 
258
  if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
259
- bbp_add_error( 'bbp_topic_moderation', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
260
  }
261
 
262
  /** Topic Status **********************************************************/
@@ -397,11 +397,11 @@ function bbp_new_topic_handler( $action = '' ) {
397
 
398
  // WP_Error
399
  } elseif ( is_wp_error( $topic_id ) ) {
400
- bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) );
401
 
402
  // Generic error
403
  } else {
404
- bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The topic was not created.', 'bbpress' ) );
405
  }
406
  }
407
 
@@ -427,7 +427,7 @@ function bbp_edit_topic_handler( $action = '' ) {
427
 
428
  // Topic id was not passed
429
  if ( empty( $_POST['bbp_topic_id'] ) ) {
430
- bbp_add_error( 'bbp_edit_topic_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
431
  return;
432
 
433
  // Topic id was passed
@@ -438,7 +438,7 @@ function bbp_edit_topic_handler( $action = '' ) {
438
 
439
  // Topic does not exist
440
  if ( empty( $topic ) ) {
441
- bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>ERROR</strong>: The topic you want to edit was not found.', 'bbpress' ) );
442
  return;
443
 
444
  // Topic exists
@@ -449,7 +449,7 @@ function bbp_edit_topic_handler( $action = '' ) {
449
 
450
  // User cannot edit this topic
451
  if ( ! current_user_can( 'edit_topic', $topic_id ) ) {
452
- bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
453
  }
454
 
455
  // Set topic author
@@ -465,7 +465,7 @@ function bbp_edit_topic_handler( $action = '' ) {
465
 
466
  // Nonce check
467
  if ( ! bbp_verify_nonce_request( 'bbp-edit-topic_' . $topic_id ) ) {
468
- bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
469
  return;
470
  }
471
 
@@ -480,7 +480,7 @@ function bbp_edit_topic_handler( $action = '' ) {
480
 
481
  // Forum id was not passed
482
  if ( empty( $_POST['bbp_forum_id'] ) ) {
483
- bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
484
 
485
  // Forum id was passed
486
  } elseif ( is_numeric( $_POST['bbp_forum_id'] ) ) {
@@ -495,23 +495,23 @@ function bbp_edit_topic_handler( $action = '' ) {
495
 
496
  // Forum is a category
497
  if ( bbp_is_forum_category( $forum_id ) ) {
498
- bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
499
 
500
  // Forum is not a category
501
  } else {
502
 
503
  // Forum is closed and user cannot access
504
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
505
- bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
506
  }
507
 
508
  // Forum is private and user cannot access
509
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
510
- bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
511
 
512
  // Forum is hidden and user cannot access
513
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
514
- bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
515
  }
516
  }
517
  }
@@ -527,12 +527,12 @@ function bbp_edit_topic_handler( $action = '' ) {
527
 
528
  // No topic title
529
  if ( empty( $topic_title ) ) {
530
- bbp_add_error( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
531
  }
532
 
533
  // Title too long
534
  if ( bbp_is_title_too_long( $topic_title ) ) {
535
- bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
536
  }
537
 
538
  /** Topic Content *********************************************************/
@@ -546,13 +546,13 @@ function bbp_edit_topic_handler( $action = '' ) {
546
 
547
  // No topic content
548
  if ( empty( $topic_content ) ) {
549
- bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
550
  }
551
 
552
  /** Topic Bad Words *******************************************************/
553
 
554
  if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
555
- bbp_add_error( 'bbp_topic_moderation', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
556
  }
557
 
558
  /** Topic Status **********************************************************/
@@ -713,7 +713,7 @@ function bbp_edit_topic_handler( $action = '' ) {
713
 
714
  } else {
715
  $append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : '';
716
- bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
717
  }
718
  }
719
 
@@ -770,9 +770,10 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = array
770
  bbp_stick_topic( $topic_id, true );
771
  break;
772
 
773
- // We can avoid this as it is a new topic
774
  case 'unstick' :
775
  default :
 
776
  break;
777
  }
778
  }
@@ -786,12 +787,7 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = array
786
 
787
  // Set transient for throttle check (only on new, not edit)
788
  if ( empty( $is_edit ) ) {
789
- set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time() );
790
- }
791
-
792
- } else {
793
- if ( empty( $is_edit ) && ! current_user_can( 'throttle' ) ) {
794
- bbp_update_user_last_posted( $author_id );
795
  }
796
  }
797
 
@@ -819,7 +815,10 @@ function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = array
819
  // Update associated topic values if this is a new topic
820
  if ( empty( $is_edit ) ) {
821
 
822
- // Update poster IP if not editing
 
 
 
823
  update_post_meta( $topic_id, '_bbp_author_ip', bbp_current_author_ip(), false );
824
 
825
  // Last active time
@@ -1082,25 +1081,25 @@ function bbp_merge_topic_handler( $action = '' ) {
1082
 
1083
  // Topic id
1084
  if ( empty( $_POST['bbp_topic_id'] ) ) {
1085
- bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
1086
  } else {
1087
  $source_topic_id = (int) $_POST['bbp_topic_id'];
1088
  }
1089
 
1090
  // Nonce check
1091
  if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
1092
- bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1093
  return;
1094
 
1095
  // Source topic not found
1096
  } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
1097
- bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
1098
  return;
1099
  }
1100
 
1101
  // Cannot edit source topic
1102
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1103
- bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1104
  return;
1105
  }
1106
 
@@ -1108,19 +1107,19 @@ function bbp_merge_topic_handler( $action = '' ) {
1108
 
1109
  // Topic id
1110
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1111
- bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
1112
  } else {
1113
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1114
  }
1115
 
1116
  // Destination topic not found
1117
  if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
1118
- bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
1119
  }
1120
 
1121
  // Cannot edit destination topic
1122
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1123
- bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1124
  }
1125
 
1126
  // Bail if errors
@@ -1340,7 +1339,7 @@ function bbp_split_topic_handler( $action = '' ) {
1340
  /** Split Reply ***********************************************************/
1341
 
1342
  if ( empty( $_POST['bbp_reply_id'] ) ) {
1343
- bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: A reply ID is required.', 'bbpress' ) );
1344
  } else {
1345
  $from_reply_id = (int) $_POST['bbp_reply_id'];
1346
  }
@@ -1349,7 +1348,7 @@ function bbp_split_topic_handler( $action = '' ) {
1349
 
1350
  // Reply exists
1351
  if ( empty( $from_reply ) ) {
1352
- bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
1353
  }
1354
 
1355
  /** Topic to Split ********************************************************/
@@ -1359,18 +1358,18 @@ function bbp_split_topic_handler( $action = '' ) {
1359
 
1360
  // No topic
1361
  if ( empty( $source_topic ) ) {
1362
- bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
1363
  }
1364
 
1365
  // Nonce check failed
1366
  if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) {
1367
- bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1368
  return;
1369
  }
1370
 
1371
  // Use cannot edit topic
1372
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1373
- bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1374
  }
1375
 
1376
  // How to Split
@@ -1380,7 +1379,7 @@ function bbp_split_topic_handler( $action = '' ) {
1380
 
1381
  // Invalid split option
1382
  if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) {
1383
- bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
1384
 
1385
  // Valid Split Option
1386
  } else {
@@ -1393,7 +1392,7 @@ function bbp_split_topic_handler( $action = '' ) {
1393
 
1394
  // Get destination topic id
1395
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1396
- bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
1397
  } else {
1398
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1399
  }
@@ -1403,12 +1402,12 @@ function bbp_split_topic_handler( $action = '' ) {
1403
 
1404
  // No destination topic
1405
  if ( empty( $destination_topic ) ) {
1406
- bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );
1407
  }
1408
 
1409
  // User cannot edit the destination topic
1410
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1411
- bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1412
  }
1413
 
1414
  break;
@@ -1446,12 +1445,12 @@ function bbp_split_topic_handler( $action = '' ) {
1446
 
1447
  // Shouldn't happen
1448
  if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
1449
- bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
1450
  }
1451
 
1452
  // User cannot publish posts
1453
  } else {
1454
- bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
1455
  }
1456
 
1457
  break;
@@ -1688,7 +1687,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1688
 
1689
  // Tag does not exist
1690
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1691
- bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1692
  return;
1693
  }
1694
 
@@ -1700,19 +1699,19 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1700
 
1701
  // Nonce check
1702
  if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) {
1703
- bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1704
  return;
1705
  }
1706
 
1707
  // Can user edit topic tags?
1708
  if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) {
1709
- bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
1710
  return;
1711
  }
1712
 
1713
  // No tag name was provided
1714
  if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
1715
- bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
1716
  return;
1717
  }
1718
 
@@ -1727,7 +1726,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1727
 
1728
  // Cannot update tag
1729
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1730
- bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1731
  return;
1732
  }
1733
 
@@ -1744,19 +1743,19 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1744
 
1745
  // Nonce check
1746
  if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) {
1747
- bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1748
  return;
1749
  }
1750
 
1751
  // Can user edit topic tags?
1752
  if ( ! current_user_can( 'edit_topic_tags' ) ) {
1753
- bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
1754
  return;
1755
  }
1756
 
1757
  // No tag name was provided
1758
  if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
1759
- bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
1760
  return;
1761
  }
1762
 
@@ -1767,7 +1766,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1767
 
1768
  // Problem inserting the new term
1769
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1770
- bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
1771
  return;
1772
  }
1773
 
@@ -1776,7 +1775,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1776
 
1777
  // Attempting to merge a tag into itself
1778
  if ( $tag_id === $to_tag ) {
1779
- bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
1780
  return;
1781
  }
1782
 
@@ -1788,7 +1787,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1788
 
1789
  // Error merging the terms
1790
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1791
- bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
1792
  return;
1793
  }
1794
 
@@ -1805,13 +1804,13 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1805
 
1806
  // Nonce check
1807
  if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) {
1808
- bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1809
  return;
1810
  }
1811
 
1812
  // Can user delete topic tags?
1813
  if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) {
1814
- bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>ERROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
1815
  return;
1816
  }
1817
 
@@ -1820,7 +1819,7 @@ function bbp_edit_topic_tag_handler( $action = '' ) {
1820
 
1821
  // Error deleting term
1822
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1823
- bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1824
  return;
1825
  }
1826
 
@@ -2016,13 +2015,13 @@ function bbp_toggle_topic_handler( $action = '' ) {
2016
  // Make sure topic exists
2017
  $topic = bbp_get_topic( $topic_id );
2018
  if ( empty( $topic ) ) {
2019
- bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>ERROR</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
2020
  return;
2021
  }
2022
 
2023
  // What is the user doing here?
2024
  if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) {
2025
- bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to do that.', 'bbpress' ) );
2026
  return;
2027
  }
2028
 
@@ -2106,8 +2105,8 @@ function bbp_toggle_topic( $args = array() ) {
2106
 
2107
  // Feedback
2108
  $retval['message'] = ( true === $is_pending )
2109
- ? __( '<strong>ERROR</strong>: There was a problem approving the topic.', 'bbpress' )
2110
- : __( '<strong>ERROR</strong>: There was a problem unapproving the topic.', 'bbpress' );
2111
 
2112
  break;
2113
 
@@ -2124,8 +2123,8 @@ function bbp_toggle_topic( $args = array() ) {
2124
 
2125
  // Feedback
2126
  $retval['message'] = ( true === $is_open )
2127
- ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' )
2128
- : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );
2129
 
2130
  break;
2131
 
@@ -2143,8 +2142,8 @@ function bbp_toggle_topic( $args = array() ) {
2143
 
2144
  // Feedback
2145
  $retval['message'] = ( true === $is_sticky )
2146
- ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' )
2147
- : __( '<strong>ERROR</strong>: There was a problem sticking the topic.', 'bbpress' );
2148
 
2149
  break;
2150
 
@@ -2162,8 +2161,8 @@ function bbp_toggle_topic( $args = array() ) {
2162
 
2163
  // Feedback
2164
  $retval['message'] = ( true === $is_spam )
2165
- ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
2166
- : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.', 'bbpress' );
2167
 
2168
  break;
2169
 
@@ -2176,7 +2175,7 @@ function bbp_toggle_topic( $args = array() ) {
2176
 
2177
  $retval['view_all'] = true;
2178
  $retval['status'] = wp_trash_post( $r['id'] );
2179
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
2180
  $retval['redirect_to'] = current_user_can( 'view_trash' )
2181
  ? bbp_get_topic_permalink( $r['id'] )
2182
  : bbp_get_forum_permalink( bbp_get_topic_forum_id( $r['id'] ) );
@@ -2187,7 +2186,7 @@ function bbp_toggle_topic( $args = array() ) {
2187
  check_ajax_referer( "untrash-{$nonce_suffix}" );
2188
 
2189
  $retval['status'] = wp_untrash_post( $r['id'] );
2190
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' );
2191
  $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
2192
 
2193
  break;
@@ -2196,7 +2195,7 @@ function bbp_toggle_topic( $args = array() ) {
2196
  check_ajax_referer( "delete-{$nonce_suffix}" );
2197
 
2198
  $retval['status'] = wp_delete_post( $r['id'] );
2199
- $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' );
2200
  $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );
2201
 
2202
  break;
@@ -2503,9 +2502,8 @@ function bbp_update_topic_forum_id( $topic_id = 0, $forum_id = 0 ) {
2503
  $forum_id = get_post_field( 'post_parent', $topic_id );
2504
  }
2505
 
2506
- $forum_id = (int) $forum_id;
2507
-
2508
- update_post_meta( $topic_id, '_bbp_forum_id', $forum_id );
2509
 
2510
  // Filter & return
2511
  return (int) apply_filters( 'bbp_update_topic_forum_id', $forum_id, $topic_id );
@@ -2521,11 +2519,10 @@ function bbp_update_topic_forum_id( $topic_id = 0, $forum_id = 0 ) {
2521
  */
2522
  function bbp_update_topic_topic_id( $topic_id = 0 ) {
2523
  $topic_id = bbp_get_topic_id( $topic_id );
2524
-
2525
- update_post_meta( $topic_id, '_bbp_topic_id', $topic_id );
2526
 
2527
  // Filter & return
2528
- return apply_filters( 'bbp_update_topic_topic_id', $topic_id );
2529
  }
2530
 
2531
  /**
@@ -3238,6 +3235,9 @@ function bbp_approve_topic( $topic_id = 0 ) {
3238
  // Set publish status
3239
  $topic->post_status = $status;
3240
 
 
 
 
3241
  // No revisions
3242
  remove_action( 'pre_post_update', 'wp_save_post_revision' );
3243
 
102
 
103
  // Nonce check
104
  if ( ! bbp_verify_nonce_request( 'bbp-new-topic' ) ) {
105
+ bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
106
  return;
107
  }
108
 
129
 
130
  // User cannot create topics
131
  if ( ! current_user_can( 'publish_topics' ) ) {
132
+ bbp_add_error( 'bbp_topic_permission', __( '<strong>Error</strong>: You do not have permission to create new topics.', 'bbpress' ) );
133
  return;
134
  }
135
 
155
 
156
  // No topic title
157
  if ( empty( $topic_title ) ) {
158
+ bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) );
159
  }
160
 
161
  // Title too long
162
  if ( bbp_is_title_too_long( $topic_title ) ) {
163
+ bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
164
  }
165
 
166
  /** Topic Content *********************************************************/
174
 
175
  // No topic content
176
  if ( empty( $topic_content ) ) {
177
+ bbp_add_error( 'bbp_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) );
178
  }
179
 
180
  /** Topic Forum ***********************************************************/
184
 
185
  // Empty Forum id was passed
186
  if ( empty( $_POST['bbp_forum_id'] ) ) {
187
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
188
 
189
  // Forum id is not a number
190
  } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
191
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) );
192
 
193
  // Forum id might be valid
194
  } else {
198
 
199
  // Forum id is empty
200
  if ( 0 === $posted_forum_id ) {
201
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
202
 
203
  // Forum id is a negative number
204
  } elseif ( 0 > $posted_forum_id ) {
205
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
206
 
207
  // Forum does not exist
208
  } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
209
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) );
210
 
211
  // Use the POST'ed forum id
212
  } else {
220
 
221
  // Forum is a category
222
  if ( bbp_is_forum_category( $forum_id ) ) {
223
+ bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
224
 
225
  // Forum is not a category
226
  } else {
227
 
228
  // Forum is closed and user cannot access
229
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
230
+ bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) );
231
  }
232
 
233
  // Forum is private and user cannot access
234
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
235
+ bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
236
 
237
  // Forum is hidden and user cannot access
238
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
239
+ bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
240
  }
241
  }
242
  }
244
  /** Topic Flooding ********************************************************/
245
 
246
  if ( ! bbp_check_for_flood( $anonymous_data, $topic_author ) ) {
247
+ bbp_add_error( 'bbp_topic_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
248
  }
249
 
250
  /** Topic Duplicate *******************************************************/
251
 
252
  if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_topic_post_type(), 'post_author' => $topic_author, 'post_content' => $topic_content, 'anonymous_data' => $anonymous_data ) ) ) {
253
+ bbp_add_error( 'bbp_topic_duplicate', __( '<strong>Error</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
254
  }
255
 
256
  /** Topic Bad Words *******************************************************/
257
 
258
  if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
259
+ bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
260
  }
261
 
262
  /** Topic Status **********************************************************/
397
 
398
  // WP_Error
399
  } elseif ( is_wp_error( $topic_id ) ) {
400
+ bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) );
401
 
402
  // Generic error
403
  } else {
404
+ bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The topic was not created.', 'bbpress' ) );
405
  }
406
  }
407
 
427
 
428
  // Topic id was not passed
429
  if ( empty( $_POST['bbp_topic_id'] ) ) {
430
+ bbp_add_error( 'bbp_edit_topic_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) );
431
  return;
432
 
433
  // Topic id was passed
438
 
439
  // Topic does not exist
440
  if ( empty( $topic ) ) {
441
+ bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>Error</strong>: The topic you want to edit was not found.', 'bbpress' ) );
442
  return;
443
 
444
  // Topic exists
449
 
450
  // User cannot edit this topic
451
  if ( ! current_user_can( 'edit_topic', $topic_id ) ) {
452
+ bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>Error</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
453
  }
454
 
455
  // Set topic author
465
 
466
  // Nonce check
467
  if ( ! bbp_verify_nonce_request( 'bbp-edit-topic_' . $topic_id ) ) {
468
+ bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
469
  return;
470
  }
471
 
480
 
481
  // Forum id was not passed
482
  if ( empty( $_POST['bbp_forum_id'] ) ) {
483
+ bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
484
 
485
  // Forum id was passed
486
  } elseif ( is_numeric( $_POST['bbp_forum_id'] ) ) {
495
 
496
  // Forum is a category
497
  if ( bbp_is_forum_category( $forum_id ) ) {
498
+ bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
499
 
500
  // Forum is not a category
501
  } else {
502
 
503
  // Forum is closed and user cannot access
504
  if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
505
+ bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) );
506
  }
507
 
508
  // Forum is private and user cannot access
509
  if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
510
+ bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
511
 
512
  // Forum is hidden and user cannot access
513
  } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
514
+ bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
515
  }
516
  }
517
  }
527
 
528
  // No topic title
529
  if ( empty( $topic_title ) ) {
530
+ bbp_add_error( 'bbp_edit_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) );
531
  }
532
 
533
  // Title too long
534
  if ( bbp_is_title_too_long( $topic_title ) ) {
535
+ bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
536
  }
537
 
538
  /** Topic Content *********************************************************/
546
 
547
  // No topic content
548
  if ( empty( $topic_content ) ) {
549
+ bbp_add_error( 'bbp_edit_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) );
550
  }
551
 
552
  /** Topic Bad Words *******************************************************/
553
 
554
  if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
555
+ bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
556
  }
557
 
558
  /** Topic Status **********************************************************/
713
 
714
  } else {
715
  $append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : '';
716
+ bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
717
  }
718
  }
719
 
770
  bbp_stick_topic( $topic_id, true );
771
  break;
772
 
773
+ // Unsticky from everywhere
774
  case 'unstick' :
775
  default :
776
+ bbp_unstick_topic( $topic_id );
777
  break;
778
  }
779
  }
787
 
788
  // Set transient for throttle check (only on new, not edit)
789
  if ( empty( $is_edit ) ) {
790
+ set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time(), HOUR_IN_SECONDS );
 
 
 
 
 
791
  }
792
  }
793
 
815
  // Update associated topic values if this is a new topic
816
  if ( empty( $is_edit ) ) {
817
 
818
+ // Update poster activity time
819
+ bbp_update_user_last_posted( $author_id );
820
+
821
+ // Update poster IP
822
  update_post_meta( $topic_id, '_bbp_author_ip', bbp_current_author_ip(), false );
823
 
824
  // Last active time
1081
 
1082
  // Topic id
1083
  if ( empty( $_POST['bbp_topic_id'] ) ) {
1084
+ bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) );
1085
  } else {
1086
  $source_topic_id = (int) $_POST['bbp_topic_id'];
1087
  }
1088
 
1089
  // Nonce check
1090
  if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
1091
+ bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1092
  return;
1093
 
1094
  // Source topic not found
1095
  } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
1096
+ bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to merge was not found.', 'bbpress' ) );
1097
  return;
1098
  }
1099
 
1100
  // Cannot edit source topic
1101
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1102
+ bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1103
  return;
1104
  }
1105
 
1107
 
1108
  // Topic id
1109
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1110
+ bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>Error</strong>: Destination topic ID not found.', 'bbpress' ) );
1111
  } else {
1112
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1113
  }
1114
 
1115
  // Destination topic not found
1116
  if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
1117
+ bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
1118
  }
1119
 
1120
  // Cannot edit destination topic
1121
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1122
+ bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1123
  }
1124
 
1125
  // Bail if errors
1339
  /** Split Reply ***********************************************************/
1340
 
1341
  if ( empty( $_POST['bbp_reply_id'] ) ) {
1342
+ bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>Error</strong>: A reply ID is required.', 'bbpress' ) );
1343
  } else {
1344
  $from_reply_id = (int) $_POST['bbp_reply_id'];
1345
  }
1348
 
1349
  // Reply exists
1350
  if ( empty( $from_reply ) ) {
1351
+ bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>Error</strong>: The reply you want to split from was not found.', 'bbpress' ) );
1352
  }
1353
 
1354
  /** Topic to Split ********************************************************/
1358
 
1359
  // No topic
1360
  if ( empty( $source_topic ) ) {
1361
+ bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to split was not found.', 'bbpress' ) );
1362
  }
1363
 
1364
  // Nonce check failed
1365
  if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) {
1366
+ bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1367
  return;
1368
  }
1369
 
1370
  // Use cannot edit topic
1371
  if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
1372
+ bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
1373
  }
1374
 
1375
  // How to Split
1379
 
1380
  // Invalid split option
1381
  if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) {
1382
+ bbp_add_error( 'bbp_split_topic_option', __( '<strong>Error</strong>: You need to choose a valid split option.', 'bbpress' ) );
1383
 
1384
  // Valid Split Option
1385
  } else {
1392
 
1393
  // Get destination topic id
1394
  if ( empty( $_POST['bbp_destination_topic'] ) ) {
1395
+ bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) );
1396
  } else {
1397
  $destination_topic_id = (int) $_POST['bbp_destination_topic'];
1398
  }
1402
 
1403
  // No destination topic
1404
  if ( empty( $destination_topic ) ) {
1405
+ bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to split to was not found.', 'bbpress' ) );
1406
  }
1407
 
1408
  // User cannot edit the destination topic
1409
  if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
1410
+ bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
1411
  }
1412
 
1413
  break;
1445
 
1446
  // Shouldn't happen
1447
  if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
1448
+ bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
1449
  }
1450
 
1451
  // User cannot publish posts
1452
  } else {
1453
+ bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
1454
  }
1455
 
1456
  break;
1687
 
1688
  // Tag does not exist
1689
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1690
+ bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1691
  return;
1692
  }
1693
 
1699
 
1700
  // Nonce check
1701
  if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) {
1702
+ bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1703
  return;
1704
  }
1705
 
1706
  // Can user edit topic tags?
1707
  if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) {
1708
+ bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
1709
  return;
1710
  }
1711
 
1712
  // No tag name was provided
1713
  if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
1714
+ bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
1715
  return;
1716
  }
1717
 
1726
 
1727
  // Cannot update tag
1728
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1729
+ bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1730
  return;
1731
  }
1732
 
1743
 
1744
  // Nonce check
1745
  if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) {
1746
+ bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1747
  return;
1748
  }
1749
 
1750
  // Can user edit topic tags?
1751
  if ( ! current_user_can( 'edit_topic_tags' ) ) {
1752
+ bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
1753
  return;
1754
  }
1755
 
1756
  // No tag name was provided
1757
  if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
1758
+ bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
1759
  return;
1760
  }
1761
 
1766
 
1767
  // Problem inserting the new term
1768
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1769
+ bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
1770
  return;
1771
  }
1772
 
1775
 
1776
  // Attempting to merge a tag into itself
1777
  if ( $tag_id === $to_tag ) {
1778
+ bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>Error</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
1779
  return;
1780
  }
1781
 
1787
 
1788
  // Error merging the terms
1789
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1790
+ bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
1791
  return;
1792
  }
1793
 
1804
 
1805
  // Nonce check
1806
  if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) {
1807
+ bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
1808
  return;
1809
  }
1810
 
1811
  // Can user delete topic tags?
1812
  if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) {
1813
+ bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>Error</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
1814
  return;
1815
  }
1816
 
1819
 
1820
  // Error deleting term
1821
  if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
1822
+ bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
1823
  return;
1824
  }
1825
 
2015
  // Make sure topic exists
2016
  $topic = bbp_get_topic( $topic_id );
2017
  if ( empty( $topic ) ) {
2018
+ bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>Error</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
2019
  return;
2020
  }
2021
 
2022
  // What is the user doing here?
2023
  if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) {
2024
+ bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) );
2025
  return;
2026
  }
2027
 
2105
 
2106
  // Feedback
2107
  $retval['message'] = ( true === $is_pending )
2108
+ ? __( '<strong>Error</strong>: There was a problem approving the topic.', 'bbpress' )
2109
+ : __( '<strong>Error</strong>: There was a problem unapproving the topic.', 'bbpress' );
2110
 
2111
  break;
2112
 
2123
 
2124
  // Feedback
2125
  $retval['message'] = ( true === $is_open )
2126
+ ? __( '<strong>Error</strong>: There was a problem closing the topic.', 'bbpress' )
2127
+ : __( '<strong>Error</strong>: There was a problem opening the topic.', 'bbpress' );
2128
 
2129
  break;
2130
 
2142
 
2143
  // Feedback
2144
  $retval['message'] = ( true === $is_sticky )
2145
+ ? __( '<strong>Error</strong>: There was a problem unsticking the topic.', 'bbpress' )
2146
+ : __( '<strong>Error</strong>: There was a problem sticking the topic.', 'bbpress' );
2147
 
2148
  break;
2149
 
2161
 
2162
  // Feedback
2163
  $retval['message'] = ( true === $is_spam )
2164
+ ? __( '<strong>Error</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
2165
+ : __( '<strong>Error</strong>: There was a problem marking the topic as spam.', 'bbpress' );
2166
 
2167
  break;
2168
 
2175
 
2176
  $retval['view_all'] = true;
2177
  $retval['status'] = wp_trash_post( $r['id'] );
2178
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem trashing the topic.', 'bbpress' );
2179
  $retval['redirect_to'] = current_user_can( 'view_trash' )
2180
  ? bbp_get_topic_permalink( $r['id'] )
2181
  : bbp_get_forum_permalink( bbp_get_topic_forum_id( $r['id'] ) );
2186
  check_ajax_referer( "untrash-{$nonce_suffix}" );
2187
 
2188
  $retval['status'] = wp_untrash_post( $r['id'] );
2189
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the topic.', 'bbpress' );
2190
  $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
2191
 
2192
  break;
2195
  check_ajax_referer( "delete-{$nonce_suffix}" );
2196
 
2197
  $retval['status'] = wp_delete_post( $r['id'] );
2198
+ $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the topic.', 'bbpress' );
2199
  $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );
2200
 
2201
  break;
2502
  $forum_id = get_post_field( 'post_parent', $topic_id );
2503
  }
2504
 
2505
+ // Update the forum ID
2506
+ $forum_id = bbp_update_forum_id( $topic_id, $forum_id );
 
2507
 
2508
  // Filter & return
2509
  return (int) apply_filters( 'bbp_update_topic_forum_id', $forum_id, $topic_id );
2519
  */
2520
  function bbp_update_topic_topic_id( $topic_id = 0 ) {
2521
  $topic_id = bbp_get_topic_id( $topic_id );
2522
+ $topic_id = bbp_update_topic_id( $topic_id, $topic_id );
 
2523
 
2524
  // Filter & return
2525
+ return (int) apply_filters( 'bbp_update_topic_topic_id', $topic_id );
2526
  }
2527
 
2528
  /**
3235
  // Set publish status
3236
  $topic->post_status = $status;
3237
 
3238
+ // Set post date GMT - prevents post_date override in wp_update_post()
3239
+ $topic->post_date_gmt = get_gmt_from_date( $topic->post_date );
3240
+
3241
  // No revisions
3242
  remove_action( 'pre_post_update', 'wp_save_post_revision' );
3243
 
includes/topics/template.php CHANGED
@@ -2851,6 +2851,8 @@ function bbp_topic_reply_link( $args = array() ) {
2851
  'link_before' => '',
2852
  'link_after' => '',
2853
  'reply_text' => esc_html_x( 'Reply', 'verb', 'bbpress' ),
 
 
2854
  ), 'get_topic_reply_link' );
2855
 
2856
  // Get the topic to use it's ID and post_parent
@@ -2861,9 +2863,14 @@ function bbp_topic_reply_link( $args = array() ) {
2861
  return;
2862
  }
2863
 
 
 
 
 
 
2864
  // Add $uri to the array, to be passed through the filter
2865
- $r['uri'] = '#new-post';
2866
- $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after'];
2867
 
2868
  // Filter & return
2869
  return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args );
2851
  'link_before' => '',
2852
  'link_after' => '',
2853
  'reply_text' => esc_html_x( 'Reply', 'verb', 'bbpress' ),
2854
+ 'add_below' => 'post',
2855
+ 'respond_id' => 'new-reply-' . bbp_get_topic_id(),
2856
  ), 'get_topic_reply_link' );
2857
 
2858
  // Get the topic to use it's ID and post_parent
2863
  return;
2864
  }
2865
 
2866
+ // Only add onclick if replies are threaded
2867
+ $onclick = bbp_thread_replies()
2868
+ ? ' onclick="return addReply.cancelForm();"'
2869
+ : '';
2870
+
2871
  // Add $uri to the array, to be passed through the filter
2872
+ $r['uri'] = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#new-post';
2873
+ $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link"' . $onclick . '>' . $r['reply_text'] . '</a>' . $r['link_after'];
2874
 
2875
  // Filter & return
2876
  return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args );
includes/users/engagements.php CHANGED
@@ -605,15 +605,15 @@ function bbp_favorites_handler( $action = '' ) {
605
 
606
  // Check for empty topic
607
  if ( empty( $topic_id ) ) {
608
- bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
609
 
610
  // Check nonce
611
  } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) {
612
- bbp_add_error( 'bbp_favorite_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
613
 
614
  // Check current user's ability to edit the user
615
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
616
- bbp_add_error( 'bbp_favorite_permission', __( '<strong>ERROR</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
617
  }
618
 
619
  // Bail if errors
@@ -654,9 +654,9 @@ function bbp_favorites_handler( $action = '' ) {
654
 
655
  // Fail! Handle errors
656
  } elseif ( 'bbp_favorite_remove' === $action ) {
657
- bbp_add_error( 'bbp_favorite_remove', __( '<strong>ERROR</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
658
  } elseif ( 'bbp_favorite_add' === $action ) {
659
- bbp_add_error( 'bbp_favorite_add', __( '<strong>ERROR</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
660
  }
661
 
662
  return (bool) $success;
@@ -846,15 +846,15 @@ function bbp_subscriptions_handler( $action = '' ) {
846
 
847
  // Check for empty topic
848
  if ( empty( $object_id ) ) {
849
- bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
850
 
851
  // Check nonce
852
  } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) {
853
- bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
854
 
855
  // Check current user's ability to edit the user
856
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
857
- bbp_add_error( 'bbp_subscription_permission', __( '<strong>ERROR</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
858
  }
859
 
860
  // Bail if we have errors
@@ -897,9 +897,9 @@ function bbp_subscriptions_handler( $action = '' ) {
897
 
898
  // Fail! Handle errors
899
  } elseif ( 'bbp_unsubscribe' === $action ) {
900
- bbp_add_error( 'bbp_unsubscribe', __( '<strong>ERROR</strong>: There was a problem unsubscribing.', 'bbpress' ) );
901
  } elseif ( 'bbp_subscribe' === $action ) {
902
- bbp_add_error( 'bbp_subscribe', __( '<strong>ERROR</strong>: There was a problem subscribing.', 'bbpress' ) );
903
  }
904
 
905
  return (bool) $success;
605
 
606
  // Check for empty topic
607
  if ( empty( $topic_id ) ) {
608
+ bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>Error</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
609
 
610
  // Check nonce
611
  } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) {
612
+ bbp_add_error( 'bbp_favorite_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
613
 
614
  // Check current user's ability to edit the user
615
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
616
+ bbp_add_error( 'bbp_favorite_permission', __( '<strong>Error</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
617
  }
618
 
619
  // Bail if errors
654
 
655
  // Fail! Handle errors
656
  } elseif ( 'bbp_favorite_remove' === $action ) {
657
+ bbp_add_error( 'bbp_favorite_remove', __( '<strong>Error</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
658
  } elseif ( 'bbp_favorite_add' === $action ) {
659
+ bbp_add_error( 'bbp_favorite_add', __( '<strong>Error</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
660
  }
661
 
662
  return (bool) $success;
846
 
847
  // Check for empty topic
848
  if ( empty( $object_id ) ) {
849
+ bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
850
 
851
  // Check nonce
852
  } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) {
853
+ bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
854
 
855
  // Check current user's ability to edit the user
856
  } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
857
+ bbp_add_error( 'bbp_subscription_permission', __( '<strong>Error</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
858
  }
859
 
860
  // Bail if we have errors
897
 
898
  // Fail! Handle errors
899
  } elseif ( 'bbp_unsubscribe' === $action ) {
900
+ bbp_add_error( 'bbp_unsubscribe', __( '<strong>Error</strong>: There was a problem unsubscribing.', 'bbpress' ) );
901
  } elseif ( 'bbp_subscribe' === $action ) {
902
+ bbp_add_error( 'bbp_subscribe', __( '<strong>Error</strong>: There was a problem subscribing.', 'bbpress' ) );
903
  }
904
 
905
  return (bool) $success;
includes/users/functions.php CHANGED
@@ -193,19 +193,19 @@ function bbp_edit_user_handler( $action = '' ) {
193
 
194
  // Nonce check
195
  if ( ! bbp_verify_nonce_request( 'update-user_' . $user_id ) ) {
196
- bbp_add_error( 'bbp_update_user_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
197
  return;
198
  }
199
 
200
  // Cap check
201
  if ( ! current_user_can( 'edit_user', $user_id ) ) {
202
- bbp_add_error( 'bbp_update_user_capability', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
203
  return;
204
  }
205
 
206
  // Empty email check
207
  if ( empty( $_POST['email'] ) ) {
208
- bbp_add_error( 'bbp_user_email_empty', __( '<strong>ERROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
209
  return;
210
  }
211
 
@@ -217,13 +217,13 @@ function bbp_edit_user_handler( $action = '' ) {
217
 
218
  // Check that new email address is valid
219
  if ( ! is_email( $_POST['email'] ) ) {
220
- bbp_add_error( 'bbp_user_email_invalid', __( '<strong>ERROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
221
  return;
222
  }
223
 
224
  // Check if email address is already in use
225
  if ( email_exists( $_POST['email'] ) ) {
226
- bbp_add_error( 'bbp_user_email_taken', __( '<strong>ERROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
227
  return;
228
  }
229
 
@@ -340,7 +340,7 @@ function bbp_user_email_change_handler( $action = '' ) {
340
  if ( email_exists( $new_email['newemail'] ) ) {
341
  delete_user_meta( $user_id, $key );
342
 
343
- bbp_add_error( 'bbp_user_email_taken', __( '<strong>ERROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
344
 
345
  // Email address is good to change to
346
  } else {
@@ -377,7 +377,7 @@ function bbp_user_email_change_handler( $action = '' ) {
377
  // Delete new email address from user options
378
  } elseif ( ! empty( $_GET['dismiss'] ) && ( "{$user_id}{$key}" === $_GET['dismiss'] ) ) {
379
  if ( ! bbp_verify_nonce_request( "dismiss-{$user_id}{$key}" ) ) {
380
- bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
381
  return;
382
  }
383
 
@@ -403,7 +403,7 @@ function bbp_edit_user_email_send_notification( $user_id = 0, $args = array() )
403
 
404
  // Bail if any relevant parameters are empty
405
  if ( empty( $user_id ) || empty( $r['hash'] ) || empty( $r['newemail'] ) ) {
406
- bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>ERROR</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
407
  return;
408
  }
409
 
193
 
194
  // Nonce check
195
  if ( ! bbp_verify_nonce_request( 'update-user_' . $user_id ) ) {
196
+ bbp_add_error( 'bbp_update_user_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
197
  return;
198
  }
199
 
200
  // Cap check
201
  if ( ! current_user_can( 'edit_user', $user_id ) ) {
202
+ bbp_add_error( 'bbp_update_user_capability', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
203
  return;
204
  }
205
 
206
  // Empty email check
207
  if ( empty( $_POST['email'] ) ) {
208
+ bbp_add_error( 'bbp_user_email_empty', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
209
  return;
210
  }
211
 
217
 
218
  // Check that new email address is valid
219
  if ( ! is_email( $_POST['email'] ) ) {
220
+ bbp_add_error( 'bbp_user_email_invalid', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
221
  return;
222
  }
223
 
224
  // Check if email address is already in use
225
  if ( email_exists( $_POST['email'] ) ) {
226
+ bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
227
  return;
228
  }
229
 
340
  if ( email_exists( $new_email['newemail'] ) ) {
341
  delete_user_meta( $user_id, $key );
342
 
343
+ bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
344
 
345
  // Email address is good to change to
346
  } else {
377
  // Delete new email address from user options
378
  } elseif ( ! empty( $_GET['dismiss'] ) && ( "{$user_id}{$key}" === $_GET['dismiss'] ) ) {
379
  if ( ! bbp_verify_nonce_request( "dismiss-{$user_id}{$key}" ) ) {
380
+ bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
381
  return;
382
  }
383
 
403
 
404
  // Bail if any relevant parameters are empty
405
  if ( empty( $user_id ) || empty( $r['hash'] ) || empty( $r['newemail'] ) ) {
406
+ bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>Error</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
407
  return;
408
  }
409
 
includes/users/signups.php CHANGED
@@ -206,12 +206,12 @@ function bbp_validate_signup_role( $to_validate = '' ) {
206
 
207
  // Add error if role is empty
208
  if ( empty( $to_validate ) ) {
209
- bbp_add_error( 'bbp_signup_role_empty', __( '<strong>ERROR</strong>: Empty role.', 'bbpress' ) );
210
  }
211
 
212
  // Add error if posted role is not a valid role
213
  if ( ! bbp_is_valid_role( $to_validate ) ) {
214
- bbp_add_error( 'bbp_signup_role_invalid', __( '<strong>ERROR</strong>: Invalid role.', 'bbpress' ) );
215
  }
216
 
217
  // If no errors, set return value to the role to validate
206
 
207
  // Add error if role is empty
208
  if ( empty( $to_validate ) ) {
209
+ bbp_add_error( 'bbp_signup_role_empty', __( '<strong>Error</strong>: Empty role.', 'bbpress' ) );
210
  }
211
 
212
  // Add error if posted role is not a valid role
213
  if ( ! bbp_is_valid_role( $to_validate ) ) {
214
+ bbp_add_error( 'bbp_signup_role_invalid', __( '<strong>Error</strong>: Invalid role.', 'bbpress' ) );
215
  }
216
 
217
  // If no errors, set return value to the role to validate
includes/users/template.php CHANGED
@@ -487,14 +487,20 @@ function bbp_user_nicename( $user_id = 0, $args = array() ) {
487
  'force' => ''
488
  ), 'get_user_nicename' );
489
 
490
- // Get the user data and nicename
491
- if ( empty( $r['force'] ) ) {
492
- $user = get_userdata( $user_id );
493
- $nicename = $user->user_nicename;
 
 
 
 
 
 
494
 
495
- // Force the nicename to something else
496
  } else {
497
- $nicename = (string) $r['force'];
498
  }
499
 
500
  // Maybe wrap the nicename
@@ -2293,8 +2299,12 @@ function bbp_current_user_can_access_create_reply_form() {
2293
  $retval = bbp_current_user_can_publish_replies();
2294
 
2295
  // User can edit this reply
2296
- } else {
2297
  $retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
 
 
 
 
2298
  }
2299
 
2300
  // Filter & return
487
  'force' => ''
488
  ), 'get_user_nicename' );
489
 
490
+ // Force the nicename (likely from a previous user query)
491
+ if ( ! empty( $r['force'] ) ) {
492
+ $nicename = (string) $r['force'];
493
+
494
+ // Maybe fallback to getting the nicename from user data
495
+ } elseif ( ! empty( $r['user_id'] ) ) {
496
+ $user = get_userdata( $r['user_id'] );
497
+ $nicename = ! empty( $user )
498
+ ? $user->user_nicename
499
+ : '';
500
 
501
+ // Maybe fallback to empty string so filter still applies
502
  } else {
503
+ $nicename = '';
504
  }
505
 
506
  // Maybe wrap the nicename
2299
  $retval = bbp_current_user_can_publish_replies();
2300
 
2301
  // User can edit this reply
2302
+ } elseif ( bbp_get_reply_id() ) {
2303
  $retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
2304
+
2305
+ // User can edit this topic
2306
+ } elseif ( bbp_get_topic_id() ) {
2307
+ $retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
2308
  }
2309
 
2310
  // Filter & return
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === bbPress ===
2
  Contributors: matt, johnjamesjacoby, jmdodd, netweb, sergeybiryukov
3
  Tags: forum, forums, discussion, support
4
- Tested up to: 5.4
5
- Stable tag: 2.6.5
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
8
  Requires PHP: 5.6.20
9
- Requires at least: 4.7
10
 
11
  bbPress is forum software for WordPress.
12
 
@@ -55,4 +55,4 @@ bbPress is intentionally simple yet infinitely powerful forum software, built by
55
 
56
  == Changelog ==
57
 
58
- Check out the [releases page](https://codex.bbpress.org/releases/)
1
  === bbPress ===
2
  Contributors: matt, johnjamesjacoby, jmdodd, netweb, sergeybiryukov
3
  Tags: forum, forums, discussion, support
4
+ Tested up to: 5.8
5
+ Stable tag: 2.6.6
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
8
  Requires PHP: 5.6.20
9
+ Requires at least: 5.0
10
 
11
  bbPress is forum software for WordPress.
12
 
55
 
56
  == Changelog ==
57
 
58
+ Check out the [releases page](https://codex.bbpress.org/releases/)
templates/default/bbpress/user-profile.php CHANGED
@@ -35,7 +35,7 @@ do_action( 'bbp_template_before_user_profile' ); ?>
35
 
36
  <?php if ( bbp_get_user_last_posted() ) : ?>
37
 
38
- <p class="bbp-user-topic-count"><?php printf( esc_html__( 'Last Activity: %s', 'bbpress' ), bbp_get_time_since( bbp_get_user_last_posted() ) ); ?></p>
39
 
40
  <?php endif; ?>
41
 
35
 
36
  <?php if ( bbp_get_user_last_posted() ) : ?>
37
 
38
+ <p class="bbp-user-last-activity"><?php printf( esc_html__( 'Last Activity: %s', 'bbpress' ), bbp_get_time_since( bbp_get_user_last_posted(), false, true ) ); ?></p>
39
 
40
  <?php endif; ?>
41
 
templates/default/js/reply.js CHANGED
@@ -24,7 +24,7 @@ addReply = {
24
  /* Remove the editor, if its already been moved */
25
  t.removeEditor();
26
 
27
- /* Bail to avoid errors */
28
  if ( ! reply || ! respond || ! cancel || ! parent ) {
29
  return;
30
  }
@@ -62,29 +62,46 @@ addReply = {
62
  * @returns {void}
63
  */
64
  cancel.onclick = function () {
65
- var r = addReply,
66
- temp = r.getElement( 'bbp-temp-form-div' ),
67
- respond = r.getElement( r.respondId );
68
 
69
- r.removeEditor();
70
 
71
- if ( ! temp || ! respond ) {
72
- return;
73
- }
74
 
75
- r.getElement( 'bbp_reply_to' ).value = '0';
 
 
 
 
 
 
 
 
 
 
76
 
77
- temp.parentNode.insertBefore( respond, temp );
78
- temp.parentNode.removeChild( temp );
79
 
80
- this.style.display = 'none';
81
- this.onclick = null;
 
 
82
 
83
- r.addEditor();
84
- };
85
 
86
- t.scrollToForm();
 
 
 
 
 
 
 
87
 
 
88
  return false;
89
  },
90
 
24
  /* Remove the editor, if its already been moved */
25
  t.removeEditor();
26
 
27
+ /* Allow click to go through */
28
  if ( ! reply || ! respond || ! cancel || ! parent ) {
29
  return;
30
  }
62
  * @returns {void}
63
  */
64
  cancel.onclick = function () {
65
+ t.cancelForm( this );
66
+ };
 
67
 
68
+ t.scrollToForm();
69
 
70
+ /* Prevent click from going through */
71
+ return false;
72
+ },
73
 
74
+ /**
75
+ * Cancel the reply form.
76
+ *
77
+ * @since 2.6.6
78
+ * @returns {void}
79
+ */
80
+ cancelForm: function () {
81
+ var r = addReply,
82
+ temp = r.getElement( 'bbp-temp-form-div' ),
83
+ cancel = r.getElement( 'bbp-cancel-reply-to-link' ),
84
+ respond = r.getElement( r.respondId );
85
 
86
+ r.removeEditor();
 
87
 
88
+ /* Allow click to go through */
89
+ if ( ! temp || ! respond ) {
90
+ return;
91
+ }
92
 
93
+ r.getElement( 'bbp_reply_to' ).value = '0';
 
94
 
95
+ temp.parentNode.insertBefore( respond, temp );
96
+ temp.parentNode.removeChild( temp );
97
+
98
+ cancel.style.display = 'none';
99
+ cancel.onclick = null;
100
+
101
+ r.addEditor();
102
+ r.scrollToForm();
103
 
104
+ /* Prevent click from going through */
105
  return false;
106
  },
107
 
templates/default/js/reply.min.js CHANGED
@@ -1,3 +1,3 @@
1
  /*! This file is automatically generated. */
2
 
3
- addReply={moveForm:function(e,t,n,o){var i=this,d=i.getElement(e),l=i.getElement(n),r=i.getElement("bbp-cancel-reply-to-link"),m=i.getElement("bbp_reply_to"),p=i.getElement("bbp_topic_id");if(i.removeEditor(),d&&l&&r&&m){if(i.respondId=n,o=o||!1,!i.getElement("bbp-temp-form-div")){var s=document.createElement("div");s.id="bbp-temp-form-div",s.style.display="none",l.parentNode.appendChild(s)}return d.parentNode.appendChild(l),p&&o&&(p.value=o),m.value=t,r.style.display="",i.addEditor(),r.onclick=function(){var e=addReply,t=e.getElement("bbp-temp-form-div"),n=e.getElement(e.respondId);e.removeEditor(),t&&n&&(e.getElement("bbp_reply_to").value="0",t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t),this.style.display="none",this.onclick=null,e.addEditor())},i.scrollToForm(),!1}},scrollToForm:function(){var e=this,t=e.getElement("new-post").getBoundingClientRect(),n=(window.pageYOffset||document.scrollTop)-(document.clientTop||0),o=n+t.top,i=o<n,d=e.getElement("wpadminbar"),l=0;void 0!==d&&(l=d.scrollHeight),distance=!0===i?n-o:o-n;var r=distance>800?30:20,m=Math.min(12,Math.round(distance/r)),p=Math.round(distance/r),s=[],c=0;if(!0===i)for(;n>o;)(n-=p)<o&&(n=o),s.push(n-l),setTimeout(function(){window.scrollTo(0,s.shift())},c*m),c++;else for(;n<o;)(n+=p)>o&&(n=o),s.push(n-l),setTimeout(function(){window.scrollTo(0,s.shift())},c*m),c++},getElement:function(e){return document.getElementById(e)},removeEditor:function(){if("undefined"!=typeof tinyMCE){var e=tinyMCE.get("bbp_reply_content");e&&!e.isHidden()?(this.mode="tmce",e.remove()):this.mode="html"}},addEditor:function(){"undefined"!=typeof tinyMCE&&("tmce"===this.mode?switchEditors.go("bbp_reply_content","tmce"):"html"===this.mode&&switchEditors.go("bbp_reply_content","html"))}};
1
  /*! This file is automatically generated. */
2
 
3
+ addReply={moveForm:function(e,t,n,o){var i=this,d=i.getElement(e),l=i.getElement(n),r=i.getElement("bbp-cancel-reply-to-link"),m=i.getElement("bbp_reply_to"),c=i.getElement("bbp_topic_id");if(i.removeEditor(),d&&l&&r&&m){if(i.respondId=n,o=o||!1,!i.getElement("bbp-temp-form-div")){var p=document.createElement("div");p.id="bbp-temp-form-div",p.style.display="none",l.parentNode.appendChild(p)}return d.parentNode.appendChild(l),c&&o&&(c.value=o),m.value=t,r.style.display="",i.addEditor(),r.onclick=function(){i.cancelForm(this)},i.scrollToForm(),!1}},cancelForm:function(){var e=addReply,t=e.getElement("bbp-temp-form-div"),n=e.getElement("bbp-cancel-reply-to-link"),o=e.getElement(e.respondId);if(e.removeEditor(),t&&o)return e.getElement("bbp_reply_to").value="0",t.parentNode.insertBefore(o,t),t.parentNode.removeChild(t),n.style.display="none",n.onclick=null,e.addEditor(),e.scrollToForm(),!1},scrollToForm:function(){var e=this,t=e.getElement("new-post").getBoundingClientRect(),n=(window.pageYOffset||document.scrollTop)-(document.clientTop||0),o=n+t.top,i=o<n,d=e.getElement("wpadminbar"),l=0;void 0!==d&&(l=d.scrollHeight),distance=!0===i?n-o:o-n;var r=distance>800?30:20,m=Math.min(12,Math.round(distance/r)),c=Math.round(distance/r),p=[],s=0;if(!0===i)for(;n>o;)(n-=c)<o&&(n=o),p.push(n-l),setTimeout(function(){window.scrollTo(0,p.shift())},s*m),s++;else for(;n<o;)(n+=c)>o&&(n=o),p.push(n-l),setTimeout(function(){window.scrollTo(0,p.shift())},s*m),s++},getElement:function(e){return document.getElementById(e)},removeEditor:function(){if("undefined"!=typeof tinyMCE){var e=tinyMCE.get("bbp_reply_content");e&&!e.isHidden()?(this.mode="tmce",e.remove()):this.mode="html"}},addEditor:function(){"undefined"!=typeof tinyMCE&&("tmce"===this.mode?switchEditors.go("bbp_reply_content","tmce"):"html"===this.mode&&switchEditors.go("bbp_reply_content","html"))}};