Version Description
Download this release
Release Info
Developer | johnjamesjacoby |
Plugin | bbPress |
Version | 2.6-rc-1 |
Comparing to | |
See all releases |
Code changes from version 2.6-beta-2 to 2.6-rc-1
- bbpress.php +101 -38
- bbpress.pot +1863 -1546
- includes/admin/actions.php +22 -6
- includes/admin/admin.php +126 -123
- includes/admin/{css → assets/css}/admin-rtl.css +55 -0
- includes/admin/{css → assets/css}/admin-rtl.min.css +1 -1
- includes/admin/{css → assets/css}/admin.css +55 -0
- includes/admin/{css → assets/css}/admin.min.css +1 -1
- includes/admin/{js → assets/js}/common.js +0 -0
- includes/admin/{js → assets/js}/common.min.js +2 -1
- includes/admin/assets/js/converter.js +252 -0
- includes/admin/assets/js/converter.min.js +3 -0
- includes/admin/{js → assets/js}/replies.js +0 -0
- includes/admin/{js → assets/js}/replies.min.js +2 -1
- includes/admin/{js → assets/js}/topics.js +0 -0
- includes/admin/{js → assets/js}/topics.min.js +1 -0
- includes/admin/{converter.php → classes/class-bbp-converter-base.php} +107 -747
- includes/admin/classes/class-bbp-converter.php +689 -0
- includes/admin/{list-tables/topic-replies.php → classes/class-bbp-topic-replies-list-table.php} +10 -10
- includes/admin/{functions.php → common.php} +4 -56
- includes/admin/converters/AEF.php +3 -6
- includes/admin/converters/Drupal7.php +3 -6
- includes/admin/converters/FluxBB.php +3 -6
- includes/admin/converters/Invision.php +4 -4
- includes/admin/converters/Kunena3.php +3 -6
- includes/admin/converters/Mingle.php +1 -1
- includes/admin/converters/MyBB.php +3 -6
- includes/admin/converters/PHPFox3.php +3 -6
- includes/admin/converters/PHPWind.php +3 -6
- includes/admin/converters/Phorum.php +3 -6
- includes/admin/converters/PunBB.php +3 -6
- includes/admin/converters/SMF.php +4 -7
- includes/admin/converters/SimplePress5.php +1 -1
- includes/admin/converters/Vanilla.php +1 -1
- includes/admin/converters/XMB.php +3 -6
- includes/admin/converters/XenForo.php +4 -7
- includes/admin/converters/bbPress1.php +1 -1
- includes/admin/converters/e107v1.php +5 -8
- includes/admin/converters/phpBB.php +2 -3
- includes/admin/converters/vBulletin.php +1 -1
- includes/admin/converters/vBulletin3.php +1 -1
- includes/admin/forums.php +139 -81
- includes/admin/metaboxes.php +82 -30
- includes/admin/replies.php +211 -132
- includes/admin/settings.php +343 -163
- includes/admin/styles/evergreen/colors-rtl.min.css +1 -1
- includes/admin/styles/evergreen/colors.min.css +1 -1
- includes/admin/styles/mint/colors-rtl.min.css +1 -1
- includes/admin/styles/mint/colors.min.css +1 -1
- includes/admin/tools.php +191 -2391
- includes/admin/tools/common.php +540 -0
- includes/admin/tools/converter.php +75 -0
- includes/admin/tools/help.php +141 -0
- includes/admin/tools/repair.php +1252 -0
- includes/admin/tools/reset.php +232 -0
- includes/admin/tools/upgrades.php +630 -0
- includes/admin/topics.php +317 -199
- includes/admin/users.php +5 -5
- includes/common/ajax.php +7 -6
- includes/common/classes.php +15 -11
- includes/common/formatting.php +310 -12
- includes/common/functions.php +313 -338
- includes/common/locks.php +82 -0
- includes/common/shortcodes.php +7 -2
- includes/common/template.php +200 -27
- includes/common/widgets.php +171 -107
- includes/core/abstraction.php +4 -0
- includes/core/actions.php +13 -0
- includes/core/cache.php +3 -2
- includes/core/capabilities.php +15 -2
- includes/core/extend.php +3 -3
- includes/core/filters.php +73 -36
- includes/core/functions.php +43 -18
- includes/core/options.php +158 -8
- includes/core/sub-actions.php +28 -2
- includes/core/template-functions.php +14 -4
- includes/core/template-loader.php +2 -1
- includes/core/theme-compat.php +35 -11
- includes/core/update.php +32 -20
- includes/extend/akismet.php +3 -3
- includes/extend/buddypress/activity.php +52 -8
- includes/extend/buddypress/functions.php +295 -44
- includes/extend/buddypress/groups.php +81 -25
- includes/extend/buddypress/loader.php +45 -16
- includes/extend/buddypress/members.php +44 -10
- includes/extend/buddypress/notifications.php +39 -23
- includes/forums/capabilities.php +72 -25
- includes/forums/functions.php +190 -136
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
|
9 |
*
|
10 |
* @package bbPress
|
11 |
* @subpackage Main
|
@@ -17,7 +17,7 @@
|
|
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-
|
21 |
* Text Domain: bbpress
|
22 |
* Domain Path: /languages/
|
23 |
* License: GPLv2 or later (license.txt)
|
@@ -44,7 +44,7 @@ final class bbPress {
|
|
44 |
* private array that gets updated with the help of PHP magic methods.
|
45 |
*
|
46 |
* This is a precautionary measure, to avoid potential errors produced by
|
47 |
-
* unanticipated direct manipulation of
|
48 |
*
|
49 |
* @see bbPress::setup_globals()
|
50 |
* @var array
|
@@ -112,8 +112,9 @@ final class bbPress {
|
|
112 |
// Only run these methods if they haven't been ran previously
|
113 |
if ( null === $instance ) {
|
114 |
$instance = new bbPress;
|
115 |
-
$instance->
|
116 |
$instance->includes();
|
|
|
117 |
$instance->setup_actions();
|
118 |
}
|
119 |
|
@@ -189,8 +190,8 @@ final class bbPress {
|
|
189 |
/** Private Methods *******************************************************/
|
190 |
|
191 |
/**
|
192 |
-
*
|
193 |
-
*
|
194 |
*
|
195 |
* @since 2.0.0 bbPress (r2626)
|
196 |
*
|
@@ -199,33 +200,43 @@ final class bbPress {
|
|
199 |
* @uses plugin_dir_url() To generate bbPress plugin url
|
200 |
* @uses apply_filters() Calls various filters
|
201 |
*/
|
202 |
-
private function
|
203 |
|
204 |
/** Versions **********************************************************/
|
205 |
|
206 |
-
$this->version = '2.6-
|
207 |
-
$this->db_version = '
|
208 |
|
209 |
/** Paths *************************************************************/
|
210 |
|
211 |
-
//
|
212 |
-
$this->file
|
213 |
-
$this->basename
|
|
|
214 |
|
215 |
// Path and URL
|
216 |
-
$this->plugin_dir
|
217 |
-
$this->plugin_url
|
218 |
|
219 |
// Includes
|
220 |
$this->includes_dir = apply_filters( 'bbp_includes_dir', trailingslashit( $this->plugin_dir . 'includes' ) );
|
221 |
$this->includes_url = apply_filters( 'bbp_includes_url', trailingslashit( $this->plugin_url . 'includes' ) );
|
222 |
|
223 |
// Languages
|
|
|
224 |
$this->lang_dir = apply_filters( 'bbp_lang_dir', trailingslashit( $this->plugin_dir . 'languages' ) );
|
225 |
|
226 |
// Templates
|
227 |
$this->themes_dir = apply_filters( 'bbp_themes_dir', trailingslashit( $this->plugin_dir . 'templates' ) );
|
228 |
$this->themes_url = apply_filters( 'bbp_themes_url', trailingslashit( $this->plugin_url . 'templates' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
/** Identifiers *******************************************************/
|
231 |
|
@@ -246,15 +257,16 @@ final class bbPress {
|
|
246 |
$this->trash_status_id = apply_filters( 'bbp_trash_post_status', 'trash' );
|
247 |
|
248 |
// Other identifiers
|
249 |
-
$this->user_id = apply_filters( 'bbp_user_id',
|
250 |
-
$this->tops_id = apply_filters( 'bbp_tops_id',
|
251 |
-
$this->reps_id = apply_filters( 'bbp_reps_id',
|
252 |
-
$this->favs_id = apply_filters( 'bbp_favs_id',
|
253 |
-
$this->subs_id = apply_filters( 'bbp_subs_id',
|
254 |
-
$this->view_id = apply_filters( 'bbp_view_id',
|
255 |
-
$this->edit_id = apply_filters( 'bbp_edit_id',
|
256 |
-
$this->paged_id = apply_filters( 'bbp_paged_id',
|
257 |
-
$this->search_id = apply_filters( 'bbp_search_id',
|
|
|
258 |
|
259 |
/** Queries ***********************************************************/
|
260 |
|
@@ -263,11 +275,13 @@ final class bbPress {
|
|
263 |
$this->current_topic_id = 0; // Current topic id
|
264 |
$this->current_reply_id = 0; // Current reply id
|
265 |
$this->current_topic_tag_id = 0; // Current topic tag id
|
|
|
266 |
|
267 |
-
$this->forum_query = new WP_Query();
|
268 |
-
$this->topic_query = new WP_Query();
|
269 |
-
$this->reply_query = new WP_Query();
|
270 |
-
$this->search_query = new WP_Query();
|
|
|
271 |
|
272 |
/** Theme Compat ******************************************************/
|
273 |
|
@@ -321,6 +335,7 @@ final class bbPress {
|
|
321 |
require $this->includes_dir . 'common/functions.php';
|
322 |
require $this->includes_dir . 'common/formatting.php';
|
323 |
require $this->includes_dir . 'common/locale.php';
|
|
|
324 |
require $this->includes_dir . 'common/template.php';
|
325 |
require $this->includes_dir . 'common/widgets.php';
|
326 |
require $this->includes_dir . 'common/shortcodes.php';
|
@@ -346,6 +361,7 @@ final class bbPress {
|
|
346 |
|
347 |
// Users
|
348 |
require $this->includes_dir . 'users/capabilities.php';
|
|
|
349 |
require $this->includes_dir . 'users/functions.php';
|
350 |
require $this->includes_dir . 'users/template.php';
|
351 |
require $this->includes_dir . 'users/options.php';
|
@@ -389,6 +405,7 @@ final class bbPress {
|
|
389 |
'setup_theme', // Setup the default theme compat
|
390 |
'setup_current_user', // Setup currently logged in user
|
391 |
'roles_init', // User roles init
|
|
|
392 |
'register_post_types', // Register post types (forum|topic|reply)
|
393 |
'register_post_statuses', // Register post statuses (closed|spam|orphan|hidden)
|
394 |
'register_taxonomies', // Register taxonomies (topic-tag)
|
@@ -470,22 +487,23 @@ final class bbPress {
|
|
470 |
*/
|
471 |
public function load_textdomain() {
|
472 |
|
473 |
-
//
|
474 |
-
$
|
475 |
-
$mofile = sprintf( '%1$s-%2$s.mo', $this->domain, $locale );
|
476 |
|
477 |
-
//
|
478 |
-
|
479 |
-
$mofile_global = WP_LANG_DIR . '/bbpress/' . $mofile;
|
480 |
|
481 |
-
|
482 |
-
|
|
|
|
|
483 |
|
484 |
-
|
485 |
-
|
|
|
486 |
|
487 |
// Look in global /wp-content/languages/plugins/
|
488 |
-
load_plugin_textdomain( $this->domain );
|
489 |
}
|
490 |
|
491 |
/**
|
@@ -748,6 +766,44 @@ final class bbPress {
|
|
748 |
$this->shortcodes = new BBP_Shortcodes();
|
749 |
}
|
750 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
/**
|
752 |
* Setup the currently logged-in user
|
753 |
*
|
@@ -797,6 +853,7 @@ final class bbPress {
|
|
797 |
add_rewrite_tag( '%' . bbp_get_user_rewrite_id() . '%', '([^/]+)' ); // User Profile tag
|
798 |
add_rewrite_tag( '%' . bbp_get_user_favorites_rewrite_id() . '%', '([1]{1,})' ); // User Favorites tag
|
799 |
add_rewrite_tag( '%' . bbp_get_user_subscriptions_rewrite_id() . '%', '([1]{1,})' ); // User Subscriptions tag
|
|
|
800 |
add_rewrite_tag( '%' . bbp_get_user_topics_rewrite_id() . '%', '([1]{1,})' ); // User Topics Tag
|
801 |
add_rewrite_tag( '%' . bbp_get_user_replies_rewrite_id() . '%', '([1]{1,})' ); // User Replies Tag
|
802 |
}
|
@@ -838,6 +895,7 @@ final class bbPress {
|
|
838 |
$paged_slug = bbp_get_paged_slug();
|
839 |
$user_favs_slug = bbp_get_user_favorites_slug();
|
840 |
$user_subs_slug = bbp_get_user_subscriptions_slug();
|
|
|
841 |
|
842 |
// Unique rewrite ID's
|
843 |
$feed_id = 'feed';
|
@@ -850,6 +908,7 @@ final class bbPress {
|
|
850 |
$user_subs_id = bbp_get_user_subscriptions_rewrite_id();
|
851 |
$user_tops_id = bbp_get_user_topics_rewrite_id();
|
852 |
$user_reps_id = bbp_get_user_replies_rewrite_id();
|
|
|
853 |
|
854 |
// Rewrite rule matches used repeatedly below
|
855 |
$root_rule = '/([^/]+)/?$';
|
@@ -868,10 +927,12 @@ final class bbPress {
|
|
868 |
$reps_rule = '/([^/]+)/' . $reply_archive_slug . '/?$';
|
869 |
$favs_rule = '/([^/]+)/' . $user_favs_slug . '/?$';
|
870 |
$subs_rule = '/([^/]+)/' . $user_subs_slug . '/?$';
|
|
|
871 |
$tops_paged_rule = '/([^/]+)/' . $topic_archive_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
872 |
$reps_paged_rule = '/([^/]+)/' . $reply_archive_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
873 |
$favs_paged_rule = '/([^/]+)/' . $user_favs_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
874 |
$subs_paged_rule = '/([^/]+)/' . $user_subs_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
|
|
875 |
|
876 |
// Edit Forum|Topic|Reply|Topic-tag
|
877 |
add_rewrite_rule( $forum_slug . $edit_rule, 'index.php?' . bbp_get_forum_post_type() . '=$matches[1]&' . $edit_id . '=1', $priority );
|
@@ -884,10 +945,12 @@ final class bbPress {
|
|
884 |
add_rewrite_rule( $user_slug . $reps_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_reps_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
885 |
add_rewrite_rule( $user_slug . $favs_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_favs_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
886 |
add_rewrite_rule( $user_slug . $subs_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_subs_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
|
|
887 |
add_rewrite_rule( $user_slug . $tops_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_tops_id . '=1', $priority );
|
888 |
add_rewrite_rule( $user_slug . $reps_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_reps_id . '=1', $priority );
|
889 |
add_rewrite_rule( $user_slug . $favs_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_favs_id . '=1', $priority );
|
890 |
add_rewrite_rule( $user_slug . $subs_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_subs_id . '=1', $priority );
|
|
|
891 |
add_rewrite_rule( $user_slug . $edit_rule, 'index.php?' . $user_id . '=$matches[1]&' . $edit_id . '=1', $priority );
|
892 |
add_rewrite_rule( $user_slug . $root_rule, 'index.php?' . $user_id . '=$matches[1]', $priority );
|
893 |
|
5 |
*
|
6 |
* bbPress is forum software with a twist from the creators of WordPress.
|
7 |
*
|
8 |
+
* $Id: bbpress.php 6510 2017-06-09 15:17:02Z 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-rc-1
|
21 |
* Text Domain: bbpress
|
22 |
* Domain Path: /languages/
|
23 |
* License: GPLv2 or later (license.txt)
|
44 |
* private array that gets updated with the help of PHP magic methods.
|
45 |
*
|
46 |
* This is a precautionary measure, to avoid potential errors produced by
|
47 |
+
* unanticipated direct manipulation of run-time data.
|
48 |
*
|
49 |
* @see bbPress::setup_globals()
|
50 |
* @var array
|
112 |
// Only run these methods if they haven't been ran previously
|
113 |
if ( null === $instance ) {
|
114 |
$instance = new bbPress;
|
115 |
+
$instance->setup_environment();
|
116 |
$instance->includes();
|
117 |
+
$instance->setup_variables();
|
118 |
$instance->setup_actions();
|
119 |
}
|
120 |
|
190 |
/** Private Methods *******************************************************/
|
191 |
|
192 |
/**
|
193 |
+
* Setup the environment variables to allow the rest of bbPress to function
|
194 |
+
* more easily.
|
195 |
*
|
196 |
* @since 2.0.0 bbPress (r2626)
|
197 |
*
|
200 |
* @uses plugin_dir_url() To generate bbPress plugin url
|
201 |
* @uses apply_filters() Calls various filters
|
202 |
*/
|
203 |
+
private function setup_environment() {
|
204 |
|
205 |
/** Versions **********************************************************/
|
206 |
|
207 |
+
$this->version = '2.6-rc-6509';
|
208 |
+
$this->db_version = '261';
|
209 |
|
210 |
/** Paths *************************************************************/
|
211 |
|
212 |
+
// File & base
|
213 |
+
$this->file = __FILE__;
|
214 |
+
$this->basename = apply_filters( 'bbp_plugin_basename', str_replace( array( 'build/', 'src/' ), '', plugin_basename( $this->file ) ) );
|
215 |
+
$this->basepath = apply_filters( 'bbp_plugin_basepath', trailingslashit( dirname( $this->basename ) ) );
|
216 |
|
217 |
// Path and URL
|
218 |
+
$this->plugin_dir = apply_filters( 'bbp_plugin_dir_path', plugin_dir_path( $this->file ) );
|
219 |
+
$this->plugin_url = apply_filters( 'bbp_plugin_dir_url', plugin_dir_url ( $this->file ) );
|
220 |
|
221 |
// Includes
|
222 |
$this->includes_dir = apply_filters( 'bbp_includes_dir', trailingslashit( $this->plugin_dir . 'includes' ) );
|
223 |
$this->includes_url = apply_filters( 'bbp_includes_url', trailingslashit( $this->plugin_url . 'includes' ) );
|
224 |
|
225 |
// Languages
|
226 |
+
$this->lang_base = apply_filters( 'bbp_lang_base', trailingslashit( $this->basepath . 'languages' ) );
|
227 |
$this->lang_dir = apply_filters( 'bbp_lang_dir', trailingslashit( $this->plugin_dir . 'languages' ) );
|
228 |
|
229 |
// Templates
|
230 |
$this->themes_dir = apply_filters( 'bbp_themes_dir', trailingslashit( $this->plugin_dir . 'templates' ) );
|
231 |
$this->themes_url = apply_filters( 'bbp_themes_url', trailingslashit( $this->plugin_url . 'templates' ) );
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Smart defaults to many bbPress specific class variables.
|
236 |
+
*
|
237 |
+
* @since 2.6.0 bbPress (r6330)
|
238 |
+
*/
|
239 |
+
private function setup_variables() {
|
240 |
|
241 |
/** Identifiers *******************************************************/
|
242 |
|
257 |
$this->trash_status_id = apply_filters( 'bbp_trash_post_status', 'trash' );
|
258 |
|
259 |
// Other identifiers
|
260 |
+
$this->user_id = apply_filters( 'bbp_user_id', 'bbp_user' );
|
261 |
+
$this->tops_id = apply_filters( 'bbp_tops_id', 'bbp_tops' );
|
262 |
+
$this->reps_id = apply_filters( 'bbp_reps_id', 'bbp_reps' );
|
263 |
+
$this->favs_id = apply_filters( 'bbp_favs_id', 'bbp_favs' );
|
264 |
+
$this->subs_id = apply_filters( 'bbp_subs_id', 'bbp_subs' );
|
265 |
+
$this->view_id = apply_filters( 'bbp_view_id', 'bbp_view' );
|
266 |
+
$this->edit_id = apply_filters( 'bbp_edit_id', 'edit' );
|
267 |
+
$this->paged_id = apply_filters( 'bbp_paged_id', 'paged' );
|
268 |
+
$this->search_id = apply_filters( 'bbp_search_id', 'bbp_search' );
|
269 |
+
$this->engagements_id = apply_filters( 'bbp_engagements_id', 'bbp_engagements' );
|
270 |
|
271 |
/** Queries ***********************************************************/
|
272 |
|
275 |
$this->current_topic_id = 0; // Current topic id
|
276 |
$this->current_reply_id = 0; // Current reply id
|
277 |
$this->current_topic_tag_id = 0; // Current topic tag id
|
278 |
+
$this->current_user_id = 0; // Current topic tag id
|
279 |
|
280 |
+
$this->forum_query = new WP_Query(); // Main forum query
|
281 |
+
$this->topic_query = new WP_Query(); // Main topic query
|
282 |
+
$this->reply_query = new WP_Query(); // Main reply query
|
283 |
+
$this->search_query = new WP_Query(); // Main search query
|
284 |
+
$this->user_query = new BBP_User_Query(); // Main user query
|
285 |
|
286 |
/** Theme Compat ******************************************************/
|
287 |
|
335 |
require $this->includes_dir . 'common/functions.php';
|
336 |
require $this->includes_dir . 'common/formatting.php';
|
337 |
require $this->includes_dir . 'common/locale.php';
|
338 |
+
require $this->includes_dir . 'common/locks.php';
|
339 |
require $this->includes_dir . 'common/template.php';
|
340 |
require $this->includes_dir . 'common/widgets.php';
|
341 |
require $this->includes_dir . 'common/shortcodes.php';
|
361 |
|
362 |
// Users
|
363 |
require $this->includes_dir . 'users/capabilities.php';
|
364 |
+
require $this->includes_dir . 'users/engagements.php';
|
365 |
require $this->includes_dir . 'users/functions.php';
|
366 |
require $this->includes_dir . 'users/template.php';
|
367 |
require $this->includes_dir . 'users/options.php';
|
405 |
'setup_theme', // Setup the default theme compat
|
406 |
'setup_current_user', // Setup currently logged in user
|
407 |
'roles_init', // User roles init
|
408 |
+
'register_meta', // Register meta (forum|topic|reply|user)
|
409 |
'register_post_types', // Register post types (forum|topic|reply)
|
410 |
'register_post_statuses', // Register post statuses (closed|spam|orphan|hidden)
|
411 |
'register_taxonomies', // Register taxonomies (topic-tag)
|
487 |
*/
|
488 |
public function load_textdomain() {
|
489 |
|
490 |
+
// Define the old directory
|
491 |
+
$old_dir = WP_LANG_DIR . '/bbpress/';
|
|
|
492 |
|
493 |
+
// Old location, deprecated in 2.6.0
|
494 |
+
if ( is_dir( $old_dir ) ) {
|
|
|
495 |
|
496 |
+
// Get locale & file-name
|
497 |
+
$type = is_admin() ? get_user_locale() : get_locale();
|
498 |
+
$locale = apply_filters( 'plugin_locale', $type, $this->domain );
|
499 |
+
$mofile = sprintf( '%1$s-%2$s.mo', $this->domain, $locale );
|
500 |
|
501 |
+
// Look in global /wp-content/languages/bbpress/ folder
|
502 |
+
load_textdomain( $this->domain, $old_dir . $mofile );
|
503 |
+
}
|
504 |
|
505 |
// Look in global /wp-content/languages/plugins/
|
506 |
+
load_plugin_textdomain( $this->domain, false, $this->lang_base );
|
507 |
}
|
508 |
|
509 |
/**
|
766 |
$this->shortcodes = new BBP_Shortcodes();
|
767 |
}
|
768 |
|
769 |
+
/**
|
770 |
+
* Register bbPress meta-data
|
771 |
+
*
|
772 |
+
* Counts added in 2.6.0 to avoid negative values
|
773 |
+
*
|
774 |
+
* @since 2.6.0 bbPress (r6300)
|
775 |
+
*/
|
776 |
+
public function register_meta() {
|
777 |
+
|
778 |
+
// Define "count" meta-type array
|
779 |
+
$count = array(
|
780 |
+
'type' => 'integer',
|
781 |
+
'description' => esc_html__( 'bbPress Item Count', 'bbpress' ),
|
782 |
+
'single' => true,
|
783 |
+
'sanitize_callback' => 'bbp_number_not_negative',
|
784 |
+
'show_in_rest' => true
|
785 |
+
);
|
786 |
+
|
787 |
+
/** Post **************************************************************/
|
788 |
+
|
789 |
+
// Counts
|
790 |
+
register_meta( 'post', '_bbp_topic_count', $count );
|
791 |
+
register_meta( 'post', '_bbp_reply_count', $count );
|
792 |
+
register_meta( 'post', '_bbp_total_topic_count', $count );
|
793 |
+
register_meta( 'post', '_bbp_total_reply_count', $count );
|
794 |
+
register_meta( 'post', '_bbp_voice_count', $count );
|
795 |
+
register_meta( 'post', '_bbp_anonymous_reply_count', $count );
|
796 |
+
register_meta( 'post', '_bbp_topic_count_hidden', $count );
|
797 |
+
register_meta( 'post', '_bbp_reply_count_hidden', $count );
|
798 |
+
register_meta( 'post', '_bbp_forum_subforum_count', $count );
|
799 |
+
|
800 |
+
/* User ***************************************************************/
|
801 |
+
|
802 |
+
// Counts
|
803 |
+
register_meta( 'user', '_bbp_topic_count', $count );
|
804 |
+
register_meta( 'user', '_bbp_reply_count', $count );
|
805 |
+
}
|
806 |
+
|
807 |
/**
|
808 |
* Setup the currently logged-in user
|
809 |
*
|
853 |
add_rewrite_tag( '%' . bbp_get_user_rewrite_id() . '%', '([^/]+)' ); // User Profile tag
|
854 |
add_rewrite_tag( '%' . bbp_get_user_favorites_rewrite_id() . '%', '([1]{1,})' ); // User Favorites tag
|
855 |
add_rewrite_tag( '%' . bbp_get_user_subscriptions_rewrite_id() . '%', '([1]{1,})' ); // User Subscriptions tag
|
856 |
+
add_rewrite_tag( '%' . bbp_get_user_engagements_rewrite_id() . '%', '([1]{1,})' ); // User Engagements tag
|
857 |
add_rewrite_tag( '%' . bbp_get_user_topics_rewrite_id() . '%', '([1]{1,})' ); // User Topics Tag
|
858 |
add_rewrite_tag( '%' . bbp_get_user_replies_rewrite_id() . '%', '([1]{1,})' ); // User Replies Tag
|
859 |
}
|
895 |
$paged_slug = bbp_get_paged_slug();
|
896 |
$user_favs_slug = bbp_get_user_favorites_slug();
|
897 |
$user_subs_slug = bbp_get_user_subscriptions_slug();
|
898 |
+
$user_engs_slug = bbp_get_user_engagements_slug();
|
899 |
|
900 |
// Unique rewrite ID's
|
901 |
$feed_id = 'feed';
|
908 |
$user_subs_id = bbp_get_user_subscriptions_rewrite_id();
|
909 |
$user_tops_id = bbp_get_user_topics_rewrite_id();
|
910 |
$user_reps_id = bbp_get_user_replies_rewrite_id();
|
911 |
+
$user_engs_id = bbp_get_user_engagements_rewrite_id();
|
912 |
|
913 |
// Rewrite rule matches used repeatedly below
|
914 |
$root_rule = '/([^/]+)/?$';
|
927 |
$reps_rule = '/([^/]+)/' . $reply_archive_slug . '/?$';
|
928 |
$favs_rule = '/([^/]+)/' . $user_favs_slug . '/?$';
|
929 |
$subs_rule = '/([^/]+)/' . $user_subs_slug . '/?$';
|
930 |
+
$engs_rule = '/([^/]+)/' . $user_engs_slug . '/?$';
|
931 |
$tops_paged_rule = '/([^/]+)/' . $topic_archive_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
932 |
$reps_paged_rule = '/([^/]+)/' . $reply_archive_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
933 |
$favs_paged_rule = '/([^/]+)/' . $user_favs_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
934 |
$subs_paged_rule = '/([^/]+)/' . $user_subs_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
935 |
+
$engs_paged_rule = '/([^/]+)/' . $user_engs_slug . '/' . $paged_slug . '/?([0-9]{1,})/?$';
|
936 |
|
937 |
// Edit Forum|Topic|Reply|Topic-tag
|
938 |
add_rewrite_rule( $forum_slug . $edit_rule, 'index.php?' . bbp_get_forum_post_type() . '=$matches[1]&' . $edit_id . '=1', $priority );
|
945 |
add_rewrite_rule( $user_slug . $reps_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_reps_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
946 |
add_rewrite_rule( $user_slug . $favs_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_favs_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
947 |
add_rewrite_rule( $user_slug . $subs_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_subs_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
948 |
+
add_rewrite_rule( $user_slug . $engs_paged_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_engs_id . '=1&' . $paged_id . '=$matches[2]', $priority );
|
949 |
add_rewrite_rule( $user_slug . $tops_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_tops_id . '=1', $priority );
|
950 |
add_rewrite_rule( $user_slug . $reps_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_reps_id . '=1', $priority );
|
951 |
add_rewrite_rule( $user_slug . $favs_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_favs_id . '=1', $priority );
|
952 |
add_rewrite_rule( $user_slug . $subs_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_subs_id . '=1', $priority );
|
953 |
+
add_rewrite_rule( $user_slug . $engs_rule, 'index.php?' . $user_id . '=$matches[1]&' . $user_engs_id . '=1', $priority );
|
954 |
add_rewrite_rule( $user_slug . $edit_rule, 'index.php?' . $user_id . '=$matches[1]&' . $edit_id . '=1', $priority );
|
955 |
add_rewrite_rule( $user_slug . $root_rule, 'index.php?' . $user_id . '=$matches[1]', $priority );
|
956 |
|
bbpress.pot
CHANGED
@@ -2,139 +2,118 @@
|
|
2 |
# This file is distributed under the GPLv2 or later (license.txt).
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: bbPress 2.6-
|
6 |
"Report-Msgid-Bugs-To: https://bbpress.trac.wordpress.org\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: JOHN JAMES JACOBY <jjj@bbpress.org>\n"
|
13 |
"Language-Team: ENGLISH <jjj@bbpress.org>\n"
|
14 |
-
"X-Generator: grunt-wp-
|
15 |
|
16 |
-
#: bbpress.php:
|
17 |
msgid "Cheatin’ huh?"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: bbpress.php:
|
21 |
msgid "bbPress Default"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: bbpress.php:
|
25 |
msgid "bbPress Forums"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: bbpress.php:
|
29 |
msgid "bbPress Topics"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: bbpress.php:
|
33 |
msgid "bbPress Replies"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: bbpress.php:
|
37 |
msgid "Most popular topics"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: bbpress.php:
|
41 |
msgid "Topics with no replies"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#:
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
#: includes/
|
49 |
-
#: includes/
|
50 |
-
#:
|
51 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
52 |
msgid "Topics"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: includes/admin/actions.php:
|
56 |
-
#: includes/admin/forums.php:
|
57 |
-
#: includes/admin/
|
58 |
-
#: includes/admin/
|
59 |
-
#: includes/
|
60 |
-
#: includes/
|
61 |
-
#: includes/extend/buddypress/activity.php:
|
62 |
-
#: includes/forums/template.php:
|
63 |
-
#: includes/replies/template.php:
|
64 |
-
#: templates/default/bbpress/content-statistics.php:
|
65 |
-
#: templates/default/bbpress/loop-forums.php:
|
66 |
-
#: templates/default/bbpress/loop-replies.php:
|
67 |
-
#: templates/default/bbpress/loop-replies.php:
|
68 |
-
#: templates/default/bbpress/loop-topics.php:
|
69 |
msgid "Replies"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: includes/admin/actions.php:
|
73 |
-
#: includes/admin/forums.php:
|
74 |
#: includes/admin/metaboxes.php:425 includes/admin/metaboxes.php:492
|
75 |
-
#: includes/admin/replies.php:
|
76 |
-
#: includes/admin/topics.php:
|
77 |
-
#: includes/extend/buddypress/groups.php:51 includes/forums/template.php:
|
78 |
-
#: templates/default/bbpress/loop-forums.php:
|
79 |
msgid "Forum"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: includes/admin/actions.php:
|
83 |
-
#: includes/admin/metaboxes.php:519 includes/admin/replies.php:
|
84 |
-
#: includes/admin/settings.php:
|
85 |
-
#: templates/default/bbpress/content-single-topic-lead.php:
|
86 |
-
#: templates/default/bbpress/content-single-topic-lead.php:
|
87 |
-
#: templates/default/bbpress/loop-topics.php:
|
88 |
msgid "Topic"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/admin/admin.php:
|
92 |
-
#: includes/admin/
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
#: includes/admin/admin.php:209
|
97 |
-
msgid "Forum Repair"
|
98 |
-
msgstr ""
|
99 |
-
|
100 |
-
#: includes/admin/admin.php:218 includes/admin/functions.php:287
|
101 |
-
#: includes/admin/settings.php:1535
|
102 |
-
msgid "Import Forums"
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: includes/admin/admin.php:219
|
106 |
-
msgid "Forum Import"
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: includes/admin/admin.php:228 includes/admin/functions.php:291
|
110 |
-
#: includes/admin/tools.php:308 includes/admin/tools.php:2495
|
111 |
-
msgid "Reset Forums"
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: includes/admin/admin.php:229
|
115 |
-
msgid "Forum Reset"
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: includes/admin/admin.php:243 includes/admin/admin.php:244
|
119 |
-
#: includes/admin/admin.php:254 includes/admin/admin.php:255
|
120 |
-
#: includes/admin/tools.php:842 includes/admin/users.php:97
|
121 |
-
#: includes/common/widgets.php:667 includes/extend/buddypress/loader.php:42
|
122 |
#: includes/extend/buddypress/loader.php:179
|
123 |
-
#: includes/extend/buddypress/loader.php:
|
124 |
-
#: includes/extend/buddypress/loader.php:
|
125 |
-
#: includes/forums/template.php:
|
126 |
-
#: templates/default/bbpress/content-statistics.php:
|
127 |
msgid "Forums"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/admin/admin.php:
|
131 |
-
#: includes/admin/admin.php:
|
132 |
msgid "Welcome to bbPress"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: includes/admin/admin.php:
|
136 |
-
#: includes/admin/admin.php:
|
137 |
-
#: includes/admin/admin.php:
|
138 |
msgid "Update Forums"
|
139 |
msgstr ""
|
140 |
|
@@ -150,53 +129,54 @@ msgstr ""
|
|
150 |
msgid "About bbPress"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/admin/admin.php:
|
154 |
msgid "%s - %s"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/admin/admin.php:
|
158 |
msgid "Welcome to bbPress %s"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: includes/admin/admin.php:
|
162 |
msgid ""
|
163 |
-
"Thank you for updating! bbPress %s is
|
164 |
-
"
|
|
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: includes/admin/admin.php:
|
168 |
msgid "What’s New"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: includes/admin/admin.php:
|
172 |
msgid "Credits"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: includes/admin/admin.php:
|
176 |
msgid "Forum Subscriptions"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: includes/admin/admin.php:
|
180 |
msgid "Subscribe to Forums"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: includes/admin/admin.php:
|
184 |
msgid "Now your users can subscribe to new topics in specific forums."
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: includes/admin/admin.php:
|
188 |
msgid "Manage Subscriptions"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: includes/admin/admin.php:
|
192 |
msgid "Your users can manage all of their subscriptions in one convenient location."
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: includes/admin/admin.php:
|
196 |
msgid "Converters"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/admin/admin.php:
|
200 |
msgid ""
|
201 |
"We’re all abuzz about the hive of new importers, AEF, Drupal, FluxBB, "
|
202 |
"Kunena Forums for Joomla, MyBB, Phorum, PHPFox, PHPWind, PunBB, SMF, "
|
@@ -205,318 +185,421 @@ msgid ""
|
|
205 |
"now gone if you need to remove imported users."
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: includes/admin/admin.php:
|
209 |
msgid "Theme Compatibility"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: includes/admin/admin.php:
|
213 |
msgid "Better handling of styles and scripts in the template stack."
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: includes/admin/admin.php:
|
217 |
msgid "Polyglot support"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: includes/admin/admin.php:
|
221 |
msgid "bbPress fully supports automatic translation updates."
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: includes/admin/admin.php:
|
225 |
msgid "User capabilities"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: includes/admin/admin.php:
|
229 |
msgid "Roles and capabilities have been swept through, cleaned up, and simplified."
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: includes/admin/admin.php:
|
233 |
msgid "Go to Forum Settings"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: includes/admin/admin.php:
|
237 |
-
msgid ""
|
238 |
-
"Thank you for updating! bbPress %s is waxed, polished, and ready for you to "
|
239 |
-
"take it for a lap or two around the block!"
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: includes/admin/admin.php:879
|
243 |
msgid "bbPress is created by a worldwide swarm of busy, busy bees."
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: includes/admin/admin.php:
|
247 |
msgid "Project Leaders"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: includes/admin/admin.php:
|
251 |
msgid "Founding Developer"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: includes/admin/admin.php:
|
255 |
msgid "Lead Developer"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: includes/admin/admin.php:
|
259 |
msgid "Feature Developer"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: includes/admin/admin.php:
|
263 |
msgid "Converter Specialist"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: includes/admin/admin.php:
|
267 |
msgid "Contributing Developers"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: includes/admin/admin.php:
|
271 |
-
msgid "
|
|
|
|
|
|
|
|
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: includes/admin/admin.php:
|
|
|
|
|
|
|
|
|
275 |
msgid "Core Contributors to bbPress 2.6"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: includes/admin/admin.php:
|
279 |
msgid "Update Forum"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: includes/admin/admin.php:
|
283 |
msgid "All done!"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: includes/admin/admin.php:
|
287 |
msgid "Go Back"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: includes/admin/admin.php:
|
291 |
msgid "You can update your forum through this page. Hit the link below to update."
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: includes/admin/admin.php:
|
295 |
msgid ""
|
296 |
"Warning! Problem updating %1$s. Your server may not be able to connect to "
|
297 |
"sites running on it. Error message: %2$s"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: includes/admin/admin.php:
|
301 |
msgid ""
|
302 |
"If your browser doesn’t start loading the next page automatically, "
|
303 |
"click this link:"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: includes/admin/admin.php:
|
307 |
msgid "Next Forums"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: includes/admin/admin.php:
|
311 |
msgid ""
|
312 |
"You can update all the forums on your network through this page. It works "
|
313 |
"by calling the update script of each site automatically. Hit the link below "
|
314 |
"to update."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/admin/converter.php:
|
|
|
|
|
|
|
|
|
|
|
318 |
msgid "Database Settings"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: includes/admin/converter.php:
|
322 |
msgid "Select Platform"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: includes/admin/converter.php:
|
326 |
msgid "Database Server"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: includes/admin/converter.php:
|
330 |
msgid "Database Port"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: includes/admin/converter.php:
|
334 |
msgid "Database Name"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/admin/converter.php:
|
338 |
msgid "Database User"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: includes/admin/converter.php:
|
342 |
msgid "Database Password"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: includes/admin/converter.php:
|
346 |
msgid "Table Prefix"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: includes/admin/converter.php:
|
350 |
msgid "Options"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: includes/admin/converter.php:
|
354 |
msgid "Rows Limit"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: includes/admin/converter.php:
|
358 |
msgid "Delay Time"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: includes/admin/converter.php:
|
362 |
msgid "Convert Users"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: includes/admin/converter.php:
|
366 |
msgid "Start Over"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: includes/admin/converter.php:
|
370 |
msgid "Purge Previous Import"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: includes/admin/converter.php:
|
374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/admin/
|
378 |
-
msgid "
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: includes/admin/converter.php:
|
382 |
-
msgid "
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: includes/admin/converter.php:
|
386 |
msgid "Deleting previously converted data (%1$s - %2$s)"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: includes/admin/converter.php:
|
390 |
-
msgid "
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/admin/converter.php:
|
|
|
|
|
|
|
|
|
394 |
msgid "Converting users (%1$s - %2$s)"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/admin/converter.php:
|
|
|
|
|
|
|
|
|
398 |
msgid "No passwords to clear"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/admin/converter.php:
|
402 |
msgid "Delete users WordPress default passwords (%1$s - %2$s)"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/admin/converter.php:
|
406 |
-
msgid "
|
|
|
|
|
|
|
|
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/admin/converter.php:
|
410 |
msgid "Converting forums (%1$s - %2$s)"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/admin/converter.php:
|
414 |
-
msgid "No forum parents to
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: includes/admin/converter.php:
|
418 |
msgid "Calculating forum hierarchy (%1$s - %2$s)"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/admin/converter.php:
|
422 |
-
msgid "No forum subscriptions to
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/admin/converter.php:
|
426 |
msgid "Converting forum subscriptions (%1$s - %2$s)"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: includes/admin/converter.php:
|
430 |
-
msgid "No topics to
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/admin/converter.php:
|
434 |
msgid "Converting topics (%1$s - %2$s)"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: includes/admin/converter.php:
|
438 |
-
msgid "No anonymous topic authors to
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: includes/admin/converter.php:
|
442 |
msgid "Converting anonymous topic authors (%1$s - %2$s)"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: includes/admin/converter.php:
|
446 |
msgid "No stickies to stick"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: includes/admin/converter.php:
|
450 |
msgid "Calculating topic stickies (%1$s - %2$s)"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: includes/admin/converter.php:
|
454 |
msgid "No super stickies to stick"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: includes/admin/converter.php:
|
458 |
msgid "Calculating topic super stickies (%1$s - %2$s)"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: includes/admin/converter.php:
|
462 |
msgid "No closed topics to close"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: includes/admin/converter.php:
|
466 |
msgid "Calculating closed topics (%1$s - %2$s)"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: includes/admin/converter.php:
|
470 |
-
msgid "No topic tags to
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: includes/admin/converter.php:
|
474 |
msgid "Converting topic tags (%1$s - %2$s)"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: includes/admin/converter.php:
|
478 |
-
msgid "No topic subscriptions to
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: includes/admin/converter.php:
|
482 |
msgid "Converting topic subscriptions (%1$s - %2$s)"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: includes/admin/converter.php:
|
486 |
-
msgid "No favorites to
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: includes/admin/converter.php:
|
490 |
msgid "Converting favorites (%1$s - %2$s)"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: includes/admin/converter.php:
|
494 |
-
msgid "No replies to
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: includes/admin/converter.php:
|
498 |
msgid "Converting replies (%1$s - %2$s)"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: includes/admin/converter.php:
|
502 |
-
msgid "No anonymous reply authors to
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: includes/admin/converter.php:
|
506 |
msgid "Converting anonymous reply authors (%1$s - %2$s)"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: includes/admin/converter.php:
|
510 |
-
msgid "No threaded replies to
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/admin/converter.php:
|
514 |
msgid "Calculating threaded replies parents (%1$s - %2$s)"
|
515 |
msgstr ""
|
516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
#: includes/admin/forums.php:113 includes/admin/replies.php:124
|
518 |
-
#: includes/admin/settings.php:
|
519 |
-
#: includes/admin/topics.php:
|
520 |
msgid "Overview"
|
521 |
msgstr ""
|
522 |
|
@@ -527,12 +610,12 @@ msgid ""
|
|
527 |
msgstr ""
|
528 |
|
529 |
#: includes/admin/forums.php:121 includes/admin/replies.php:132
|
530 |
-
#: includes/admin/topics.php:
|
531 |
msgid "Screen Content"
|
532 |
msgstr ""
|
533 |
|
534 |
#: includes/admin/forums.php:123 includes/admin/replies.php:134
|
535 |
-
#: includes/admin/topics.php:
|
536 |
msgid ""
|
537 |
"You can customize the display of this screen’s contents in a number "
|
538 |
"of ways:"
|
@@ -560,7 +643,7 @@ msgid ""
|
|
560 |
msgstr ""
|
561 |
|
562 |
#: includes/admin/forums.php:134 includes/admin/replies.php:146
|
563 |
-
#: includes/admin/topics.php:
|
564 |
msgid "Available Actions"
|
565 |
msgstr ""
|
566 |
|
@@ -590,8 +673,9 @@ msgid ""
|
|
590 |
msgstr ""
|
591 |
|
592 |
#: includes/admin/forums.php:147 includes/admin/replies.php:162
|
593 |
-
#: includes/admin/tools.php:
|
594 |
-
#: includes/admin/
|
|
|
595 |
msgid "Bulk Actions"
|
596 |
msgstr ""
|
597 |
|
@@ -611,17 +695,17 @@ msgstr ""
|
|
611 |
|
612 |
#: includes/admin/forums.php:155 includes/admin/forums.php:213
|
613 |
#: includes/admin/replies.php:170 includes/admin/replies.php:226
|
614 |
-
#: includes/admin/settings.php:
|
615 |
-
#: includes/admin/tools.php:
|
616 |
-
#: includes/admin/topics.php:
|
617 |
msgid "For more information:"
|
618 |
msgstr ""
|
619 |
|
620 |
#: includes/admin/forums.php:156 includes/admin/forums.php:214
|
621 |
#: includes/admin/replies.php:171 includes/admin/replies.php:227
|
622 |
-
#: includes/admin/settings.php:
|
623 |
-
#: includes/admin/tools.php:
|
624 |
-
#: includes/admin/topics.php:
|
625 |
msgid ""
|
626 |
"<a href=\"https://codex.bbpress.org\" target=\"_blank\">bbPress "
|
627 |
"Documentation</a>"
|
@@ -629,9 +713,9 @@ msgstr ""
|
|
629 |
|
630 |
#: includes/admin/forums.php:157 includes/admin/forums.php:215
|
631 |
#: includes/admin/replies.php:172 includes/admin/replies.php:228
|
632 |
-
#: includes/admin/settings.php:
|
633 |
-
#: includes/admin/tools.php:
|
634 |
-
#: includes/admin/topics.php:
|
635 |
msgid ""
|
636 |
"<a href=\"https://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
|
637 |
"Forums</a>"
|
@@ -648,7 +732,7 @@ msgid ""
|
|
648 |
msgstr ""
|
649 |
|
650 |
#: includes/admin/forums.php:174 includes/admin/replies.php:189
|
651 |
-
#: includes/admin/topics.php:
|
652 |
msgid "Customizing This Display"
|
653 |
msgstr ""
|
654 |
|
@@ -734,190 +818,138 @@ msgid "<strong>Order</strong> allows you to order your forums numerically."
|
|
734 |
msgstr ""
|
735 |
|
736 |
#: includes/admin/forums.php:208 includes/admin/replies.php:221
|
737 |
-
#: includes/admin/topics.php:
|
738 |
msgid "Publish Box"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: includes/admin/forums.php:258 includes/admin/settings.php:
|
742 |
-
#: includes/admin/tools.php:
|
743 |
msgid "Forum Moderators"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: includes/admin/forums.php:290 includes/admin/settings.php:
|
747 |
-
#: includes/admin/settings.php:
|
748 |
-
#: includes/extend/buddypress/loader.php:
|
749 |
-
#: templates/default/bbpress/user-details.php:
|
750 |
msgid "Subscriptions"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: includes/admin/forums.php:
|
754 |
msgid "The forum was not found."
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: includes/admin/forums.php:
|
758 |
-
#: includes/admin/topics.php:
|
759 |
msgid "You do not have permission to do that."
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: includes/admin/forums.php:
|
763 |
msgid "There was a problem opening the forum \"%1$s\"."
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/admin/forums.php:
|
767 |
msgid "Forum \"%1$s\" successfully opened."
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: includes/admin/forums.php:
|
771 |
msgid "There was a problem closing the forum \"%1$s\"."
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/admin/forums.php:
|
775 |
msgid "Forum \"%1$s\" successfully closed."
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/admin/forums.php:
|
779 |
msgid "Moderators"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/admin/forums.php:
|
783 |
-
#: templates/default/bbpress/content-single-topic-lead.php:
|
784 |
-
#: templates/default/bbpress/content-single-topic-lead.php:
|
785 |
msgid "Creator"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: includes/admin/forums.php:
|
789 |
-
#: includes/admin/topics.php:
|
790 |
msgid "Created"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: includes/admin/forums.php:
|
794 |
-
#: templates/default/bbpress/loop-forums.php:
|
795 |
-
#: templates/default/bbpress/loop-topics.php:
|
796 |
msgid "Last Post"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/admin/forums.php:
|
800 |
msgid "—"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: includes/admin/forums.php:
|
804 |
msgid "No Topics"
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: includes/admin/forums.php:
|
808 |
msgid "Close this forum"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/admin/forums.php:
|
812 |
msgid "Open this forum"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: includes/admin/forums.php:
|
816 |
msgid "Forum updated."
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: includes/admin/forums.php:
|
820 |
msgid "View forum"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/admin/forums.php:
|
824 |
-
#: includes/admin/topics.php:
|
825 |
msgid "Custom field updated."
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: includes/admin/forums.php:
|
829 |
-
#: includes/admin/topics.php:
|
830 |
msgid "Custom field deleted."
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/admin/forums.php:
|
834 |
#. translators: %s: date and time of the revision
|
835 |
msgid "Forum restored to revision from %s"
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: includes/admin/forums.php:
|
839 |
msgid "Forum created."
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: includes/admin/forums.php:
|
843 |
msgid "Forum saved."
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: includes/admin/forums.php:
|
847 |
msgid "Forum submitted."
|
848 |
msgstr ""
|
849 |
|
850 |
-
#: includes/admin/forums.php:
|
851 |
-
#: includes/admin/forums.php:
|
852 |
msgid "Preview forum"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: includes/admin/forums.php:
|
856 |
msgid "Forum scheduled for: %s."
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: includes/admin/forums.php:
|
860 |
-
#: includes/admin/topics.php:
|
861 |
#. translators: Publish box date format, see http:php.net/date
|
862 |
msgid "M j, Y @ G:i"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/admin/forums.php:
|
866 |
msgid "Forum draft updated."
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: includes/admin/list-tables/topic-replies.php:56
|
870 |
-
#: includes/admin/replies.php:618 includes/admin/topics.php:786
|
871 |
-
#: templates/default/bbpress/loop-replies.php:15
|
872 |
-
#: templates/default/bbpress/loop-replies.php:41
|
873 |
-
#: templates/default/bbpress/loop-search.php:16
|
874 |
-
#: templates/default/bbpress/loop-search.php:38
|
875 |
-
msgid "Author"
|
876 |
-
msgstr ""
|
877 |
-
|
878 |
-
#: includes/admin/list-tables/topic-replies.php:57
|
879 |
-
msgid "Content"
|
880 |
-
msgstr ""
|
881 |
-
|
882 |
-
#: includes/admin/list-tables/topic-replies.php:58
|
883 |
-
msgid "Replied"
|
884 |
-
msgstr ""
|
885 |
-
|
886 |
-
#: includes/admin/list-tables/topic-replies.php:87
|
887 |
-
msgid "Unapprove"
|
888 |
-
msgstr ""
|
889 |
-
|
890 |
-
#: includes/admin/list-tables/topic-replies.php:88
|
891 |
-
#: includes/admin/replies.php:246 includes/admin/replies.php:791
|
892 |
-
#: includes/admin/topics.php:250 includes/admin/topics.php:966
|
893 |
-
#: includes/replies/template.php:2171 includes/topics/template.php:3049
|
894 |
-
msgid "Spam"
|
895 |
-
msgstr ""
|
896 |
-
|
897 |
-
#: includes/admin/list-tables/topic-replies.php:89
|
898 |
-
#: includes/admin/replies.php:802 includes/admin/topics.php:976
|
899 |
-
#: includes/replies/template.php:2099 includes/topics/template.php:2727
|
900 |
-
msgid "Trash"
|
901 |
-
msgstr ""
|
902 |
-
|
903 |
-
#: includes/admin/list-tables/topic-replies.php:141
|
904 |
-
#: includes/admin/replies.php:767 includes/admin/topics.php:922
|
905 |
-
#: includes/admin/topics.php:935
|
906 |
-
msgid "View"
|
907 |
-
msgstr ""
|
908 |
-
|
909 |
-
#: includes/admin/list-tables/topic-replies.php:146
|
910 |
-
#: includes/common/template.php:2294 includes/forums/template.php:54
|
911 |
-
#: includes/replies/template.php:53 includes/replies/template.php:1972
|
912 |
-
#: includes/topics/template.php:53 includes/topics/template.php:2600
|
913 |
-
#: templates/default/bbpress/user-details.php:63
|
914 |
-
msgid "Edit"
|
915 |
-
msgstr ""
|
916 |
-
|
917 |
-
#: includes/admin/list-tables/topic-replies.php:239
|
918 |
-
msgid "No replies to this topic."
|
919 |
-
msgstr ""
|
920 |
-
|
921 |
#: includes/admin/metaboxes.php:28
|
922 |
msgid "%s Forum"
|
923 |
msgid_plural "%s Forums"
|
@@ -952,8 +984,8 @@ msgid_plural "Replies"
|
|
952 |
msgstr[0] ""
|
953 |
msgstr[1] ""
|
954 |
|
955 |
-
#: includes/admin/metaboxes.php:150 includes/admin/settings.php:
|
956 |
-
#: includes/topics/template.php:
|
957 |
msgid "Topic Tag"
|
958 |
msgid_plural "Topic Tags"
|
959 |
msgstr[0] ""
|
@@ -998,12 +1030,12 @@ msgstr ""
|
|
998 |
|
999 |
#: includes/admin/metaboxes.php:319 includes/admin/metaboxes.php:320
|
1000 |
#: includes/admin/metaboxes.php:409 includes/admin/metaboxes.php:475
|
1001 |
-
#: templates/default/bbpress/form-forum.php:
|
1002 |
msgid "Status:"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
#: includes/admin/metaboxes.php:331 includes/admin/metaboxes.php:332
|
1006 |
-
#: templates/default/bbpress/form-forum.php:
|
1007 |
msgid "Visibility:"
|
1008 |
msgstr ""
|
1009 |
|
@@ -1015,10 +1047,9 @@ msgstr ""
|
|
1015 |
msgid "Forum Parent"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: includes/admin/metaboxes.php:359 includes/admin/
|
1019 |
-
#:
|
1020 |
-
|
1021 |
-
msgid "— No forum —"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
#: includes/admin/metaboxes.php:366
|
@@ -1038,15 +1069,15 @@ msgid "Select whether to open or close the topic."
|
|
1038 |
msgstr ""
|
1039 |
|
1040 |
#: includes/admin/metaboxes.php:424 includes/admin/metaboxes.php:491
|
1041 |
-
#: includes/extend/buddypress/groups.php:
|
1042 |
-
#: templates/default/bbpress/form-topic.php:
|
1043 |
-
#: templates/default/bbpress/loop-search-forum.php:
|
1044 |
msgid "Forum:"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: includes/admin/metaboxes.php:438
|
1048 |
-
#: templates/default/bbpress/form-
|
1049 |
-
msgid "— No
|
1050 |
msgstr ""
|
1051 |
|
1052 |
#: includes/admin/metaboxes.php:477
|
@@ -1057,13 +1088,13 @@ msgstr ""
|
|
1057 |
msgid "— No reply —"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: includes/admin/metaboxes.php:518 includes/replies/template.php:
|
1061 |
-
#: templates/default/bbpress/loop-search-topic.php:
|
1062 |
msgid "Topic:"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
#: includes/admin/metaboxes.php:531
|
1066 |
-
#: templates/default/bbpress/form-reply.php:
|
1067 |
msgid "Reply To:"
|
1068 |
msgstr ""
|
1069 |
|
@@ -1072,13 +1103,13 @@ msgid "Reply To"
|
|
1072 |
msgstr ""
|
1073 |
|
1074 |
#: includes/admin/metaboxes.php:606
|
1075 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
1076 |
msgid "Name:"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
#: includes/admin/metaboxes.php:607
|
1080 |
-
#: templates/default/bbpress/form-user-edit.php:
|
1081 |
-
#: templates/default/bbpress/form-user-edit.php:
|
1082 |
msgid "Name"
|
1083 |
msgstr ""
|
1084 |
|
@@ -1087,18 +1118,18 @@ msgid "Email:"
|
|
1087 |
msgstr ""
|
1088 |
|
1089 |
#: includes/admin/metaboxes.php:613
|
1090 |
-
#: templates/default/bbpress/form-user-edit.php:
|
1091 |
-
#: templates/default/bbpress/form-user-register.php:
|
1092 |
msgid "Email"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
#: includes/admin/metaboxes.php:618
|
1096 |
-
#: templates/default/bbpress/form-anonymous.php:
|
1097 |
msgid "Website:"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
#: includes/admin/metaboxes.php:619
|
1101 |
-
#: templates/default/bbpress/form-user-edit.php:
|
1102 |
msgid "Website"
|
1103 |
msgstr ""
|
1104 |
|
@@ -1118,15 +1149,23 @@ msgstr ""
|
|
1118 |
msgid "IP Address"
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: includes/admin/metaboxes.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1122 |
msgid "No users have favorited this topic."
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: includes/admin/metaboxes.php:
|
1126 |
msgid "No users have subscribed to this topic."
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: includes/admin/metaboxes.php:
|
1130 |
msgid "No users have subscribed to this forum."
|
1131 |
msgstr ""
|
1132 |
|
@@ -1191,7 +1230,7 @@ msgstr ""
|
|
1191 |
msgid "<strong>View</strong> will take you to your live site to view the reply."
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: includes/admin/replies.php:155 includes/admin/topics.php:
|
1195 |
msgid "<strong>Approve</strong> will change the status from pending to publish."
|
1196 |
msgstr ""
|
1197 |
|
@@ -1289,8 +1328,8 @@ msgstr ""
|
|
1289 |
msgid "<strong>Reply To</strong> determines the threading of the reply."
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: includes/admin/replies.php:244 includes/admin/topics.php:
|
1293 |
-
#: includes/replies/template.php:
|
1294 |
msgid "Unspam"
|
1295 |
msgstr ""
|
1296 |
|
@@ -1310,7 +1349,7 @@ msgid_plural "%s replies not updated, somebody is editing them."
|
|
1310 |
msgstr[0] ""
|
1311 |
msgstr[1] ""
|
1312 |
|
1313 |
-
#: includes/admin/replies.php:288 includes/admin/topics.php:
|
1314 |
msgid "Sorry, you are not allowed to spam this item."
|
1315 |
msgstr ""
|
1316 |
|
@@ -1326,809 +1365,873 @@ msgstr ""
|
|
1326 |
msgid "Error in unspamming reply."
|
1327 |
msgstr ""
|
1328 |
|
1329 |
-
#: includes/admin/replies.php:373 includes/admin/topics.php:
|
1330 |
-
#: templates/default/bbpress/form-anonymous.php:
|
1331 |
msgid "Author Information"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
-
#: includes/admin/replies.php:
|
1335 |
msgid "The reply was not found."
|
1336 |
msgstr ""
|
1337 |
|
1338 |
-
#: includes/admin/replies.php:
|
1339 |
msgid "There was a problem marking the reply \"%1$s\" as spam."
|
1340 |
msgstr ""
|
1341 |
|
1342 |
-
#: includes/admin/replies.php:
|
1343 |
msgid "Reply \"%1$s\" successfully marked as spam."
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: includes/admin/replies.php:
|
1347 |
msgid "There was a problem unmarking the reply \"%1$s\" as spam."
|
1348 |
msgstr ""
|
1349 |
|
1350 |
-
#: includes/admin/replies.php:
|
1351 |
msgid "Reply \"%1$s\" successfully unmarked as spam."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: includes/admin/replies.php:
|
1355 |
msgid "There was a problem approving the reply \"%1$s\"."
|
1356 |
msgstr ""
|
1357 |
|
1358 |
-
#: includes/admin/replies.php:
|
1359 |
msgid "Reply \"%1$s\" successfully approved."
|
1360 |
msgstr ""
|
1361 |
|
1362 |
-
#: includes/admin/replies.php:
|
1363 |
msgid "There was a problem unapproving the reply \"%1$s\"."
|
1364 |
msgstr ""
|
1365 |
|
1366 |
-
#: includes/admin/replies.php:
|
1367 |
msgid "Reply \"%1$s\" successfully unapproved."
|
1368 |
msgstr ""
|
1369 |
|
1370 |
-
#: includes/admin/replies.php:
|
1371 |
msgid "Title"
|
1372 |
msgstr ""
|
1373 |
|
1374 |
-
#: includes/admin/replies.php:
|
1375 |
-
msgid "No
|
1376 |
msgstr ""
|
1377 |
|
1378 |
-
#: includes/admin/replies.php:
|
1379 |
-
|
1380 |
-
msgid "No Forum"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: includes/admin/replies.php:
|
1384 |
-
msgid "
|
1385 |
msgstr ""
|
1386 |
|
1387 |
-
#: includes/admin/replies.php:
|
1388 |
-
#: includes/admin/topics.php:
|
1389 |
msgid "View “%s”"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
-
#: includes/admin/replies.php:
|
1393 |
msgid "Unapprove this reply"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
-
#: includes/admin/replies.php:
|
1397 |
msgid "Approve this reply"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
-
#: includes/admin/replies.php:
|
1401 |
msgid "Mark the reply as not spam"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: includes/admin/replies.php:
|
1405 |
msgid "Not spam"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: includes/admin/replies.php:
|
1409 |
msgid "Mark this reply as spam"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: includes/admin/replies.php:
|
1413 |
-
#: includes/replies/template.php:
|
1414 |
msgid "Restore this item from the Trash"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
-
#: includes/admin/replies.php:
|
1418 |
-
#: includes/replies/template.php:
|
1419 |
msgid "Restore"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
-
#: includes/admin/replies.php:
|
1423 |
-
#: includes/replies/template.php:
|
1424 |
msgid "Move this item to the Trash"
|
1425 |
msgstr ""
|
1426 |
|
1427 |
-
#: includes/admin/replies.php:
|
1428 |
-
#: includes/replies/template.php:
|
1429 |
msgid "Delete this item permanently"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
-
#: includes/admin/replies.php:
|
1433 |
msgid "Delete Permanently"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
-
#: includes/admin/replies.php:
|
1437 |
msgid "Empty Spam"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: includes/admin/replies.php:
|
1441 |
msgid "In all forums"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
-
#: includes/admin/replies.php:
|
1445 |
msgid "Reply updated."
|
1446 |
msgstr ""
|
1447 |
|
1448 |
-
#: includes/admin/replies.php:
|
1449 |
-
#: includes/admin/topics.php:
|
1450 |
msgid "View topic"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
-
#: includes/admin/replies.php:
|
1454 |
#. translators: %s: date and time of the revision
|
1455 |
msgid "Reply restored to revision from %s"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: includes/admin/replies.php:
|
1459 |
msgid "Reply created."
|
1460 |
msgstr ""
|
1461 |
|
1462 |
-
#: includes/admin/replies.php:
|
1463 |
msgid "Reply saved."
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#: includes/admin/replies.php:
|
1467 |
msgid "Reply submitted."
|
1468 |
msgstr ""
|
1469 |
|
1470 |
-
#: includes/admin/replies.php:
|
1471 |
-
#: includes/admin/replies.php:
|
1472 |
-
#: includes/admin/topics.php:
|
1473 |
msgid "Preview topic"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: includes/admin/replies.php:
|
1477 |
msgid "Reply scheduled for: %s."
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: includes/admin/replies.php:
|
1481 |
msgid "Reply draft updated."
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: includes/admin/settings.php:
|
1485 |
msgid "Forum User Settings"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: includes/admin/settings.php:
|
1489 |
msgid "Forum Features"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: includes/admin/settings.php:
|
1493 |
msgid "Forum Theme Packages"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: includes/admin/settings.php:
|
1497 |
msgid "Topics and Replies Per Page"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: includes/admin/settings.php:
|
1501 |
msgid "Topics and Replies Per RSS Page"
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: includes/admin/settings.php:
|
1505 |
msgid "Forum Root Slug"
|
1506 |
msgstr ""
|
1507 |
|
1508 |
-
#: includes/admin/settings.php:
|
1509 |
-
msgid "Single
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#: includes/admin/settings.php:
|
1513 |
msgid "Forum User Slugs"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: includes/admin/settings.php:
|
1517 |
-
msgid "
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: includes/admin/settings.php:
|
1521 |
-
msgid "
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: includes/admin/settings.php:
|
1525 |
-
msgid "
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: includes/admin/settings.php:
|
1529 |
-
msgid "
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: includes/admin/settings.php:
|
1533 |
-
msgid "
|
1534 |
msgstr ""
|
1535 |
|
1536 |
-
#: includes/admin/settings.php:
|
1537 |
-
|
|
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: includes/admin/settings.php:
|
1541 |
msgid "Revisions"
|
1542 |
msgstr ""
|
1543 |
|
1544 |
-
#: includes/admin/settings.php:
|
1545 |
-
#: includes/extend/buddypress/loader.php:
|
1546 |
-
#: templates/default/bbpress/user-details.php:
|
1547 |
msgid "Favorites"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1551 |
msgid "Topic tags"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
-
#: includes/admin/settings.php:
|
1555 |
-
#: includes/common/template.php:
|
1556 |
-
#: templates/default/bbpress/form-search.php:
|
1557 |
msgid "Search"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: includes/admin/settings.php:
|
1561 |
msgid "Post Formatting"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
-
#: includes/admin/settings.php:
|
1565 |
msgid "Auto-embed links"
|
1566 |
msgstr ""
|
1567 |
|
1568 |
-
#: includes/admin/settings.php:
|
1569 |
msgid "Reply Threading"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
-
#: includes/admin/settings.php:
|
1573 |
msgid "Current Package"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
-
#: includes/admin/settings.php:
|
1577 |
msgid "Forum Root"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
-
#: includes/admin/settings.php:
|
1581 |
msgid "Forum Prefix"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
-
#: includes/admin/settings.php:
|
1585 |
msgid "Forum root should show"
|
1586 |
msgstr ""
|
1587 |
|
1588 |
-
#: includes/admin/settings.php:
|
1589 |
msgid "Topic View"
|
1590 |
msgstr ""
|
1591 |
|
1592 |
-
#: includes/admin/settings.php:
|
1593 |
msgid "User Base"
|
1594 |
msgstr ""
|
1595 |
|
1596 |
-
#: includes/admin/settings.php:
|
1597 |
-
#: includes/extend/buddypress/loader.php:
|
1598 |
-
#: templates/default/bbpress/user-details.php:
|
1599 |
msgid "Topics Started"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
-
#: includes/admin/settings.php:
|
1603 |
-
#: includes/extend/buddypress/loader.php:
|
1604 |
-
#: templates/default/bbpress/user-details.php:
|
1605 |
msgid "Replies Created"
|
1606 |
msgstr ""
|
1607 |
|
1608 |
-
#: includes/admin/settings.php:
|
1609 |
msgid "Favorite Topics"
|
1610 |
msgstr ""
|
1611 |
|
1612 |
-
#: includes/admin/settings.php:
|
1613 |
-
|
|
|
1614 |
msgstr ""
|
1615 |
|
1616 |
-
#: includes/admin/settings.php:
|
1617 |
-
msgid "
|
1618 |
msgstr ""
|
1619 |
|
1620 |
-
#: includes/admin/settings.php:
|
1621 |
msgid "Use Akismet"
|
1622 |
msgstr ""
|
1623 |
|
1624 |
-
#: includes/admin/settings.php:
|
1625 |
msgid "Setting time limits and other user posting capabilities"
|
1626 |
msgstr ""
|
1627 |
|
1628 |
-
#: includes/admin/settings.php:
|
1629 |
-
msgid "minutes"
|
1630 |
msgstr ""
|
1631 |
|
1632 |
-
#: includes/admin/settings.php:
|
1633 |
-
msgid "
|
1634 |
msgstr ""
|
1635 |
|
1636 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1637 |
msgid "Allow guest users without accounts to create topics and replies"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
1641 |
msgid "Automatically give registered visitors the %s forum role"
|
1642 |
msgstr ""
|
1643 |
|
1644 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
1645 |
msgid "Forum features that can be toggled on and off"
|
1646 |
msgstr ""
|
1647 |
|
1648 |
-
#: includes/admin/settings.php:
|
1649 |
msgid "Allow users to mark topics as favorites"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
-
#: includes/admin/settings.php:
|
1653 |
msgid "Allow users to subscribe to forums and topics"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
1657 |
msgid "Allow topics to have tags"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
-
#: includes/admin/settings.php:
|
1661 |
msgid "Allow forums to have dedicated moderators"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
-
#: includes/admin/settings.php:
|
1665 |
msgid "Allow forum wide search"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
-
#: includes/admin/settings.php:
|
1669 |
msgid "Enable threaded (nested) replies %s levels deep"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
-
#: includes/admin/settings.php:
|
1673 |
msgid "Allow topic and reply revision logging"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
-
#: includes/admin/settings.php:
|
1677 |
msgid "Add toolbar & buttons to textareas to help with HTML formatting"
|
1678 |
msgstr ""
|
1679 |
|
1680 |
-
#: includes/admin/settings.php:
|
1681 |
msgid "How your forum content is displayed within your existing theme."
|
1682 |
msgstr ""
|
1683 |
|
1684 |
-
#: includes/admin/settings.php:
|
1685 |
-
#: includes/replies/template.php:2673
|
1686 |
-
msgid "%1$s - %2$s"
|
1687 |
-
msgstr ""
|
1688 |
-
|
1689 |
-
#: includes/admin/settings.php:758
|
1690 |
msgid "will serve all bbPress templates"
|
1691 |
msgstr ""
|
1692 |
|
1693 |
-
#: includes/admin/settings.php:
|
1694 |
msgid "No template packages available."
|
1695 |
msgstr ""
|
1696 |
|
1697 |
-
#: includes/admin/settings.php:
|
1698 |
msgid ""
|
1699 |
"Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and "
|
1700 |
"replies"
|
1701 |
msgstr ""
|
1702 |
|
1703 |
-
#: includes/admin/settings.php:
|
1704 |
msgid "How many topics and replies to show per page"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
-
#: includes/admin/settings.php:
|
1708 |
-
#: includes/admin/settings.php:
|
1709 |
msgid "per page"
|
1710 |
msgstr ""
|
1711 |
|
1712 |
-
#: includes/admin/settings.php:
|
1713 |
msgid "How many topics and replies to show per RSS page"
|
1714 |
msgstr ""
|
1715 |
|
1716 |
-
#: includes/admin/settings.php:
|
1717 |
msgid ""
|
1718 |
"Customize your Forums root. Partner with a WordPress Page and use "
|
1719 |
"Shortcodes for more flexibility."
|
1720 |
msgstr ""
|
1721 |
|
1722 |
-
#: includes/admin/settings.php:
|
1723 |
msgid "Prefix all forum content with the Forum Root slug (Recommended)"
|
1724 |
msgstr ""
|
1725 |
|
1726 |
-
#: includes/admin/settings.php:
|
1727 |
msgid "Forum Index"
|
1728 |
msgstr ""
|
1729 |
|
1730 |
-
#: includes/admin/settings.php:
|
1731 |
msgid "Topics by Last Post"
|
1732 |
msgstr ""
|
1733 |
|
1734 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
1735 |
msgid "Customize your user profile slugs."
|
1736 |
msgstr ""
|
1737 |
|
1738 |
-
#: includes/admin/settings.php:
|
1739 |
msgid "Custom slugs for single forums, topics, replies, tags, views, and search."
|
1740 |
msgstr ""
|
1741 |
|
1742 |
-
#: includes/admin/settings.php:
|
1743 |
-
msgid "Forum settings for BuddyPress"
|
1744 |
msgstr ""
|
1745 |
|
1746 |
-
#: includes/admin/settings.php:
|
1747 |
msgid "Allow BuddyPress Groups to have their own forums"
|
1748 |
msgstr ""
|
1749 |
|
1750 |
-
#: includes/admin/settings.php:
|
1751 |
-
msgid "
|
1752 |
msgstr ""
|
1753 |
|
1754 |
-
#: includes/admin/settings.php:
|
1755 |
-
msgid "
|
1756 |
msgstr ""
|
1757 |
|
1758 |
-
#: includes/admin/settings.php:
|
1759 |
-
msgid ""
|
1760 |
-
|
1761 |
-
|
|
|
|
|
1762 |
msgstr ""
|
1763 |
|
1764 |
-
#: includes/admin/settings.php:
|
1765 |
msgid "Forum settings for Akismet"
|
1766 |
msgstr ""
|
1767 |
|
1768 |
-
#: includes/admin/settings.php:
|
1769 |
msgid "Allow Akismet to actively prevent forum spam."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: includes/admin/settings.php:
|
1773 |
msgid "Forums Settings"
|
1774 |
msgstr ""
|
1775 |
|
1776 |
-
#: includes/admin/settings.php:
|
1777 |
-
#: templates/default/bbpress/form-user-edit.php:
|
1778 |
msgid "Save Changes"
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/admin/settings.php:
|
1782 |
msgid ""
|
1783 |
"Information about your previous forums database so that they can be "
|
1784 |
"converted. <strong>Backup your database before proceeding.</strong>"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: includes/admin/settings.php:
|
1788 |
msgid "is the previous forum software"
|
1789 |
msgstr ""
|
1790 |
|
1791 |
-
#: includes/admin/settings.php:
|
1792 |
-
msgid "IP or hostname"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
-
#: includes/admin/settings.php:
|
1796 |
-
msgid "Use default 3306 if unsure"
|
1797 |
msgstr ""
|
1798 |
|
1799 |
-
#: includes/admin/settings.php:
|
1800 |
-
msgid "User
|
1801 |
msgstr ""
|
1802 |
|
1803 |
-
#: includes/admin/settings.php:
|
1804 |
-
msgid "Password
|
1805 |
msgstr ""
|
1806 |
|
1807 |
-
#: includes/admin/settings.php:
|
1808 |
msgid "Name of the database with your old forum data"
|
1809 |
msgstr ""
|
1810 |
|
1811 |
-
#: includes/admin/settings.php:
|
1812 |
msgid "Some optional parameters to help tune the conversion process."
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: includes/admin/settings.php:
|
1816 |
msgid "(If converting from BuddyPress Forums, use \"wp_bb_\" or your custom prefix)"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: includes/admin/settings.php:
|
1820 |
msgid "rows to process at a time"
|
1821 |
msgstr ""
|
1822 |
|
1823 |
-
#: includes/admin/settings.php:
|
1824 |
msgid "Keep this low if you experience out-of-memory issues."
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: includes/admin/settings.php:
|
1828 |
msgid "second(s) delay between each group of rows"
|
1829 |
msgstr ""
|
1830 |
|
1831 |
-
#: includes/admin/settings.php:
|
1832 |
msgid "Keep this high to prevent too-many-connection issues."
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/admin/settings.php:
|
1836 |
msgid "Start a fresh conversion from the beginning"
|
1837 |
msgstr ""
|
1838 |
|
1839 |
-
#: includes/admin/settings.php:
|
1840 |
msgid "You should clean old conversion information before starting over."
|
1841 |
msgstr ""
|
1842 |
|
1843 |
-
#: includes/admin/settings.php:
|
1844 |
msgid "Purge all information from a previously attempted import"
|
1845 |
msgstr ""
|
1846 |
|
1847 |
-
#: includes/admin/settings.php:
|
1848 |
msgid "Use this if an import failed and you want to remove that incomplete data."
|
1849 |
msgstr ""
|
1850 |
|
1851 |
-
#: includes/admin/settings.php:
|
1852 |
msgid "Attempt to import user accounts from previous forums"
|
1853 |
msgstr ""
|
1854 |
|
1855 |
-
#: includes/admin/settings.php:
|
1856 |
msgid ""
|
1857 |
"Non-bbPress passwords cannot be automatically converted. They will be "
|
1858 |
"converted as each user logs in."
|
1859 |
msgstr ""
|
1860 |
|
1861 |
-
#: includes/admin/settings.php:
|
1862 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1863 |
msgid "Forum Tools"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
-
#: includes/admin/settings.php:
|
1867 |
-
msgid "
|
1868 |
msgstr ""
|
1869 |
|
1870 |
-
#: includes/admin/settings.php:
|
1871 |
msgid "Stop"
|
1872 |
msgstr ""
|
1873 |
|
1874 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1875 |
msgid "This screen provides access to all of the Forums settings."
|
1876 |
msgstr ""
|
1877 |
|
1878 |
-
#: includes/admin/settings.php:
|
1879 |
msgid ""
|
1880 |
"Please see the additional help tabs for more information on each individual "
|
1881 |
"section."
|
1882 |
msgstr ""
|
1883 |
|
1884 |
-
#: includes/admin/settings.php:
|
1885 |
msgid "Main Settings"
|
1886 |
msgstr ""
|
1887 |
|
1888 |
-
#: includes/admin/settings.php:
|
1889 |
-
msgid "
|
1890 |
msgstr ""
|
1891 |
|
1892 |
-
#: includes/admin/settings.php:
|
1893 |
msgid ""
|
1894 |
"You can choose to lock a post after a certain number of minutes. \"Locking "
|
1895 |
"post editing\" will prevent the author from editing some amount of time "
|
1896 |
"after saving a post."
|
1897 |
msgstr ""
|
1898 |
|
1899 |
-
#: includes/admin/settings.php:
|
1900 |
msgid ""
|
1901 |
"\"Throttle time\" is the amount of time required between posts from a "
|
1902 |
"single author. The higher the throttle time, the longer a user will need to "
|
1903 |
"wait between posting to the forum."
|
1904 |
msgstr ""
|
1905 |
|
1906 |
-
#: includes/admin/settings.php:
|
1907 |
msgid ""
|
1908 |
"Favorites are a way for users to save and later return to topics they "
|
1909 |
"favor. This is enabled by default."
|
1910 |
msgstr ""
|
1911 |
|
1912 |
-
#: includes/admin/settings.php:
|
1913 |
msgid ""
|
1914 |
"Subscriptions allow users to subscribe for notifications to topics that "
|
1915 |
"interest them. This is enabled by default."
|
1916 |
msgstr ""
|
1917 |
|
1918 |
-
#: includes/admin/settings.php:
|
1919 |
msgid ""
|
1920 |
"Topic-Tags allow users to filter topics between forums. This is enabled by "
|
1921 |
"default."
|
1922 |
msgstr ""
|
1923 |
|
1924 |
-
#: includes/admin/settings.php:
|
1925 |
msgid ""
|
1926 |
"\"Anonymous Posting\" allows guest users who do not have accounts on your "
|
1927 |
"site to both create topics as well as replies."
|
1928 |
msgstr ""
|
1929 |
|
1930 |
-
#: includes/admin/settings.php:
|
1931 |
msgid ""
|
1932 |
"The Fancy Editor brings the luxury of the Visual editor and HTML editor "
|
1933 |
"from the traditional WordPress dashboard into your theme."
|
1934 |
msgstr ""
|
1935 |
|
1936 |
-
#: includes/admin/settings.php:
|
1937 |
msgid ""
|
1938 |
"Auto-embed will embed the media content from a URL directly into the "
|
1939 |
"replies. For example: links to Flickr and YouTube."
|
1940 |
msgstr ""
|
1941 |
|
1942 |
-
#: includes/admin/settings.php:
|
1943 |
msgid ""
|
1944 |
"You must click the Save Changes button at the bottom of the screen for new "
|
1945 |
"settings to take effect."
|
1946 |
msgstr ""
|
1947 |
|
1948 |
-
#: includes/admin/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1949 |
msgid "Per Page"
|
1950 |
msgstr ""
|
1951 |
|
1952 |
-
#: includes/admin/settings.php:
|
1953 |
msgid ""
|
1954 |
-
"Per Page
|
1955 |
-
"appear on each page."
|
1956 |
msgstr ""
|
1957 |
|
1958 |
-
#: includes/admin/settings.php:
|
1959 |
msgid ""
|
1960 |
"This is comparable to the WordPress \"Reading Settings\" page, where you "
|
1961 |
"can set the number of posts that should show on blog pages and in feeds."
|
1962 |
msgstr ""
|
1963 |
|
1964 |
-
#: includes/admin/settings.php:
|
1965 |
msgid ""
|
1966 |
"These are broken up into two separate groups: one for what appears in your "
|
1967 |
"theme, another for RSS feeds."
|
1968 |
msgstr ""
|
1969 |
|
1970 |
-
#: includes/admin/settings.php:
|
1971 |
msgid "Slugs"
|
1972 |
msgstr ""
|
1973 |
|
1974 |
-
#: includes/admin/settings.php:
|
1975 |
msgid ""
|
1976 |
-
"The Slugs section allows you to control the permalink structure for
|
1977 |
-
"forums."
|
1978 |
msgstr ""
|
1979 |
|
1980 |
-
#: includes/admin/settings.php:
|
1981 |
msgid ""
|
1982 |
"\"Archive Slugs\" are used as the \"root\" for your forums and topics. If "
|
1983 |
"you combine these values with existing page slugs, bbPress will attempt to "
|
1984 |
"output the most correct title and content."
|
1985 |
msgstr ""
|
1986 |
|
1987 |
-
#: includes/admin/settings.php:
|
1988 |
msgid ""
|
1989 |
"\"Single Slugs\" are used as a prefix when viewing an individual forum, "
|
1990 |
"topic, reply, user, or view."
|
1991 |
msgstr ""
|
1992 |
|
1993 |
-
#: includes/admin/settings.php:
|
1994 |
msgid ""
|
1995 |
"In the event of a slug collision with WordPress or BuddyPress, a warning "
|
1996 |
"will appear next to the problem slug(s)."
|
1997 |
msgstr ""
|
1998 |
|
1999 |
-
#: includes/admin/settings.php:
|
2000 |
-
#: templates/default/bbpress/loop-forums.php:
|
2001 |
-
#: templates/default/bbpress/loop-replies.php:
|
2002 |
-
#: templates/default/bbpress/loop-replies.php:
|
2003 |
-
#: templates/default/bbpress/loop-topics.php:
|
2004 |
msgid "Posts"
|
2005 |
msgstr ""
|
2006 |
|
2007 |
-
#: includes/admin/settings.php:
|
2008 |
msgid "Pages"
|
2009 |
msgstr ""
|
2010 |
|
2011 |
-
#: includes/admin/settings.php:
|
2012 |
msgid "Attachments"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
-
#: includes/admin/settings.php:
|
2016 |
msgid "Menus"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
-
#: includes/admin/settings.php:
|
2020 |
msgid "Tag base"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
-
#: includes/admin/settings.php:
|
2024 |
msgid "Category base"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
-
#: includes/admin/settings.php:
|
2028 |
msgid "Forums base"
|
2029 |
msgstr ""
|
2030 |
|
2031 |
-
#: includes/admin/settings.php:
|
2032 |
msgid "Topics base"
|
2033 |
msgstr ""
|
2034 |
|
2035 |
-
#: includes/admin/settings.php:
|
2036 |
msgid "Forum slug"
|
2037 |
msgstr ""
|
2038 |
|
2039 |
-
#: includes/admin/settings.php:
|
2040 |
msgid "Topic slug"
|
2041 |
msgstr ""
|
2042 |
|
2043 |
-
#: includes/admin/settings.php:
|
2044 |
msgid "Reply slug"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
-
#: includes/admin/settings.php:
|
2048 |
msgid "User base"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
-
#: includes/admin/settings.php:
|
2052 |
msgid "View base"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
-
#: includes/admin/settings.php:
|
2056 |
msgid "Topic tag slug"
|
2057 |
msgstr ""
|
2058 |
|
2059 |
-
#: includes/admin/settings.php:
|
2060 |
msgid "%s page"
|
2061 |
msgstr ""
|
2062 |
|
2063 |
-
#: includes/admin/settings.php:
|
2064 |
msgid "Possible %1$s conflict: %2$s"
|
2065 |
msgstr ""
|
2066 |
|
2067 |
-
#: includes/admin/tools.php:
|
2068 |
-
msgid ""
|
2069 |
-
"bbPress keeps track of relationships between forums, topics, replies, "
|
2070 |
-
"topic-tags, favorites, subscriptions, and users. Occasionally these "
|
2071 |
-
"relationships become out of sync, most often after an import or migration. "
|
2072 |
-
"Use the tools below to manually recalculate these relationships."
|
2073 |
msgstr ""
|
2074 |
|
2075 |
-
#: includes/admin/tools.php:
|
2076 |
-
msgid ""
|
2077 |
-
"Some of these tools create substantial database overhead. Use caution when "
|
2078 |
-
"running more than 1 repair at a time."
|
2079 |
msgstr ""
|
2080 |
|
2081 |
-
#: includes/admin/tools
|
2082 |
-
msgid "
|
2083 |
msgstr ""
|
2084 |
|
2085 |
-
#: includes/admin/tools
|
2086 |
-
|
2087 |
-
msgid "Run"
|
2088 |
msgstr ""
|
2089 |
|
2090 |
-
#: includes/admin/tools
|
2091 |
-
msgid "
|
2092 |
msgstr ""
|
2093 |
|
2094 |
-
#: includes/admin/tools
|
2095 |
-
msgid "
|
2096 |
msgstr ""
|
2097 |
|
2098 |
-
#: includes/admin/tools
|
2099 |
-
|
2100 |
-
msgid "Description"
|
2101 |
msgstr ""
|
2102 |
|
2103 |
-
#: includes/admin/tools
|
2104 |
-
|
2105 |
-
msgid "Components"
|
2106 |
msgstr ""
|
2107 |
|
2108 |
-
#: includes/admin/tools
|
2109 |
-
|
2110 |
-
msgid "Overhead"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
-
#: includes/admin/tools.php:
|
2114 |
-
msgid "
|
2115 |
msgstr ""
|
2116 |
|
2117 |
-
#: includes/admin/tools.php:
|
2118 |
-
|
|
|
2119 |
msgstr ""
|
2120 |
|
2121 |
-
#: includes/admin/tools.php:
|
2122 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
2123 |
msgstr ""
|
2124 |
|
2125 |
-
#: includes/admin/tools.php:
|
2126 |
msgid ""
|
2127 |
"There is more detailed information available on the bbPress and BuddyPress "
|
2128 |
"codex for the following:"
|
2129 |
msgstr ""
|
2130 |
|
2131 |
-
#: includes/admin/tools.php:
|
2132 |
msgid ""
|
2133 |
"BuddyPress Group Forums: <a "
|
2134 |
"href=\"https://codex.buddypress.org/getting-started/installing-group-and-"
|
@@ -2137,43 +2240,48 @@ msgid ""
|
|
2137 |
"old-forums-to-bbpress-2/\">Migrating from old forums to bbPress 2.2+</a>."
|
2138 |
msgstr ""
|
2139 |
|
2140 |
-
#: includes/admin/tools.php:
|
2141 |
msgid ""
|
2142 |
"bbPress roles: <a "
|
2143 |
"href=\"https://codex.bbpress.org/bbpress-user-roles-and-capabilities/\" "
|
2144 |
"target=\"_blank\">bbPress User Roles and Capabilities</a>"
|
2145 |
msgstr ""
|
2146 |
|
2147 |
-
#: includes/admin/tools.php:
|
2148 |
msgid ""
|
2149 |
"Also see <a href=\"https://codex.bbpress.org/repair-forums/\">bbPress: "
|
2150 |
"Repair Forums</a>."
|
2151 |
msgstr ""
|
2152 |
|
2153 |
-
#: includes/admin/tools.php:
|
|
|
|
|
|
|
|
|
|
|
2154 |
msgid ""
|
2155 |
"Also see <a href=\"https://codex.bbpress.org/reset-forums/\">bbPress: Reset "
|
2156 |
"Forums</a>."
|
2157 |
msgstr ""
|
2158 |
|
2159 |
-
#: includes/admin/tools.php:
|
2160 |
msgid ""
|
2161 |
"This screen provides access to all of the bbPress Import Forums settings "
|
2162 |
"and resources."
|
2163 |
msgstr ""
|
2164 |
|
2165 |
-
#: includes/admin/tools.php:
|
2166 |
msgid ""
|
2167 |
"Also see the main article on the bbPress codex <a "
|
2168 |
"href=\"https://codex.bbpress.org/import-forums/\">bbPress: Import "
|
2169 |
"Forums</a>."
|
2170 |
msgstr ""
|
2171 |
|
2172 |
-
#: includes/admin/tools.php:
|
2173 |
msgid "In the Database Settings you have a number of options:"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
-
#: includes/admin/tools.php:
|
2177 |
msgid ""
|
2178 |
"The settings in this section refer to the database connection strings used "
|
2179 |
"by your old forum software. The best way to determine the exact settings "
|
@@ -2181,599 +2289,692 @@ msgid ""
|
|
2181 |
"contact your web hosting provider."
|
2182 |
msgstr ""
|
2183 |
|
2184 |
-
#: includes/admin/tools.php:
|
2185 |
msgid "Importer Options"
|
2186 |
msgstr ""
|
2187 |
|
2188 |
-
#: includes/admin/tools.php:
|
2189 |
msgid "In the Options you have a number of options:"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
-
#: includes/admin/tools.php:
|
2193 |
msgid ""
|
2194 |
"Depending on your MySQL configuration you can tweak the \"Rows Limit\" and "
|
2195 |
"\"Delay Time\" that may help to improve the overall time it takes to "
|
2196 |
"perform a complete forum import."
|
2197 |
msgstr ""
|
2198 |
|
2199 |
-
#: includes/admin/tools.php:
|
2200 |
msgid "\"Convert Users\" will import your legacy forum members as WordPress Users."
|
2201 |
msgstr ""
|
2202 |
|
2203 |
-
#: includes/admin/tools.php:
|
2204 |
msgid ""
|
2205 |
"\"Start Over\" will start the importer fresh, if your import failed for any "
|
2206 |
"reason leaving this setting unchecked the importer will begin from where it "
|
2207 |
"left off."
|
2208 |
msgstr ""
|
2209 |
|
2210 |
-
#: includes/admin/tools.php:
|
2211 |
msgid ""
|
2212 |
"\"Purge Previous Import\" will remove data imported from a failed import "
|
2213 |
"without removing your existing forum data."
|
2214 |
msgstr ""
|
2215 |
|
2216 |
-
#: includes/admin/tools.php:
|
2217 |
-
msgid "
|
|
|
|
|
|
|
|
|
2218 |
msgstr ""
|
2219 |
|
2220 |
-
#: includes/admin/tools.php:
|
2221 |
-
msgid "
|
|
|
|
|
2222 |
msgstr ""
|
2223 |
|
2224 |
-
#: includes/admin/tools.php:
|
2225 |
-
|
|
|
2226 |
msgstr ""
|
2227 |
|
2228 |
-
#: includes/admin/tools.php:
|
2229 |
-
|
|
|
|
|
2230 |
msgstr ""
|
2231 |
|
2232 |
-
#: includes/admin/tools.php:
|
2233 |
-
|
|
|
2234 |
msgstr ""
|
2235 |
|
2236 |
-
#: includes/admin/tools.php:
|
2237 |
-
|
|
|
2238 |
msgstr ""
|
2239 |
|
2240 |
-
#: includes/admin/tools.php:
|
2241 |
-
|
|
|
|
|
2242 |
msgstr ""
|
2243 |
|
2244 |
-
#: includes/admin/tools.php:
|
2245 |
-
|
|
|
|
|
2246 |
msgstr ""
|
2247 |
|
2248 |
-
#: includes/admin/tools.php:
|
2249 |
-
|
|
|
|
|
2250 |
msgstr ""
|
2251 |
|
2252 |
-
#: includes/admin/tools.php:
|
2253 |
-
msgid "
|
2254 |
msgstr ""
|
2255 |
|
2256 |
-
#: includes/admin/tools.php:
|
2257 |
-
msgid "
|
2258 |
msgstr ""
|
2259 |
|
2260 |
-
#: includes/admin/tools.php:
|
2261 |
-
msgid "
|
2262 |
msgstr ""
|
2263 |
|
2264 |
-
#: includes/admin/tools.php:
|
2265 |
-
msgid "
|
2266 |
msgstr ""
|
2267 |
|
2268 |
-
#: includes/admin/tools.php:
|
2269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2270 |
msgstr ""
|
2271 |
|
2272 |
-
#: includes/admin/tools.php:
|
2273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2274 |
msgstr ""
|
2275 |
|
2276 |
-
#: includes/admin/tools.php:
|
2277 |
-
msgid "
|
2278 |
msgstr ""
|
2279 |
|
2280 |
-
#: includes/admin/tools.php:
|
2281 |
-
msgid "
|
|
|
|
|
2282 |
msgstr ""
|
2283 |
|
2284 |
-
#: includes/admin/tools.php:
|
2285 |
-
msgid "
|
2286 |
msgstr ""
|
2287 |
|
2288 |
-
#: includes/admin/tools.php:
|
2289 |
-
msgid "
|
2290 |
msgstr ""
|
2291 |
|
2292 |
-
#: includes/admin/tools.php:
|
2293 |
-
msgid "
|
2294 |
msgstr ""
|
2295 |
|
2296 |
-
#: includes/admin/tools.php:
|
2297 |
-
msgid "
|
2298 |
msgstr ""
|
2299 |
|
2300 |
-
#: includes/admin/tools.php:
|
2301 |
-
msgid "
|
2302 |
msgstr ""
|
2303 |
|
2304 |
-
#: includes/admin/tools.php:
|
2305 |
-
msgid "
|
2306 |
msgstr ""
|
2307 |
|
2308 |
-
#: includes/admin/tools.php:
|
2309 |
-
|
|
|
2310 |
msgstr ""
|
2311 |
|
2312 |
-
#: includes/admin/tools.php:
|
2313 |
-
msgid "
|
2314 |
msgstr ""
|
2315 |
|
2316 |
-
#: includes/admin/tools.php:
|
2317 |
-
msgid "
|
2318 |
msgstr ""
|
2319 |
|
2320 |
-
#: includes/admin/tools.php:
|
2321 |
-
msgid "
|
2322 |
msgstr ""
|
2323 |
|
2324 |
-
#: includes/admin/tools.php:
|
2325 |
-
msgid "
|
2326 |
msgstr ""
|
2327 |
|
2328 |
-
#: includes/admin/tools.php:
|
2329 |
-
msgid "
|
2330 |
msgstr ""
|
2331 |
|
2332 |
-
#: includes/admin/tools.php:
|
2333 |
-
msgid "
|
2334 |
msgstr ""
|
2335 |
|
2336 |
-
#: includes/admin/tools.php:
|
2337 |
-
msgid "
|
2338 |
msgstr ""
|
2339 |
|
2340 |
-
#: includes/admin/tools.php:
|
2341 |
-
msgid "
|
2342 |
msgstr ""
|
2343 |
|
2344 |
-
#: includes/admin/tools.php:
|
2345 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
2346 |
msgstr ""
|
2347 |
|
2348 |
-
#: includes/admin/tools.php:
|
2349 |
-
msgid "
|
2350 |
msgstr ""
|
2351 |
|
2352 |
-
#: includes/admin/tools.php:
|
2353 |
-
msgid "
|
2354 |
msgstr ""
|
2355 |
|
2356 |
-
#: includes/admin/tools
|
2357 |
-
|
2358 |
-
msgid "Topic Tags"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: includes/admin/tools.php:
|
2362 |
-
msgid "
|
2363 |
msgstr ""
|
2364 |
|
2365 |
-
#: includes/admin/tools.php:
|
2366 |
-
msgid "
|
|
|
|
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: includes/admin/tools
|
2370 |
-
|
2371 |
-
#: includes/admin/tools.php:1366 includes/admin/tools.php:1404
|
2372 |
-
#: includes/admin/tools.php:1454 includes/admin/tools.php:1499
|
2373 |
-
#: includes/admin/tools.php:1551 includes/admin/tools.php:1603
|
2374 |
-
#: includes/admin/tools.php:1673 includes/admin/tools.php:1742
|
2375 |
-
#: includes/admin/tools.php:1817 includes/admin/tools.php:1874
|
2376 |
-
#: includes/admin/tools.php:2002 includes/admin/tools.php:2115
|
2377 |
-
#: includes/admin/tools.php:2139 includes/admin/tools.php:2194
|
2378 |
-
#: includes/admin/tools.php:2576
|
2379 |
-
msgid "Failed!"
|
2380 |
msgstr ""
|
2381 |
|
2382 |
-
#: includes/admin/tools.php:
|
2383 |
-
|
2384 |
-
#: includes/admin/tools.php:1434 includes/admin/tools.php:1480
|
2385 |
-
#: includes/admin/tools.php:1532 includes/admin/tools.php:1584
|
2386 |
-
#: includes/admin/tools.php:1654 includes/admin/tools.php:1723
|
2387 |
-
#: includes/admin/tools.php:1792 includes/admin/tools.php:1980
|
2388 |
-
#: includes/admin/tools.php:2045 includes/admin/tools.php:2119
|
2389 |
-
#: includes/admin/tools.php:2175 includes/admin/tools.php:2230
|
2390 |
-
#: includes/admin/tools.php:2287
|
2391 |
-
msgid "Complete!"
|
2392 |
msgstr ""
|
2393 |
|
2394 |
-
#: includes/admin/tools.php:
|
2395 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2396 |
msgstr ""
|
2397 |
|
2398 |
-
#: includes/admin/tools.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2399 |
msgid ""
|
2400 |
-
"
|
2401 |
-
"
|
2402 |
msgstr ""
|
2403 |
|
2404 |
-
#: includes/admin/tools.php:
|
2405 |
-
msgid "
|
2406 |
msgstr ""
|
2407 |
|
2408 |
-
#: includes/admin/tools.php:
|
2409 |
-
|
|
|
|
|
|
|
2410 |
msgstr ""
|
2411 |
|
2412 |
-
#: includes/admin/tools.php:
|
2413 |
-
msgid "
|
2414 |
msgstr ""
|
2415 |
|
2416 |
-
#: includes/admin/tools.php:
|
2417 |
-
msgid "
|
2418 |
msgstr ""
|
2419 |
|
2420 |
-
#: includes/admin/tools.php:
|
2421 |
-
msgid "
|
2422 |
msgstr ""
|
2423 |
|
2424 |
-
#: includes/admin/tools.php:
|
2425 |
-
msgid "
|
2426 |
msgstr ""
|
2427 |
|
2428 |
-
#: includes/admin/tools.php:
|
2429 |
-
msgid "
|
2430 |
msgstr ""
|
2431 |
|
2432 |
-
#: includes/admin/tools.php:
|
2433 |
-
msgid "
|
2434 |
msgstr ""
|
2435 |
|
2436 |
-
#: includes/admin/tools.php:
|
2437 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2438 |
msgstr ""
|
2439 |
|
2440 |
-
#: includes/admin/tools.php:
|
2441 |
-
msgid "
|
2442 |
msgstr ""
|
2443 |
|
2444 |
-
#: includes/admin/tools
|
2445 |
-
|
2446 |
-
msgid "Nothing to remove!"
|
2447 |
msgstr ""
|
2448 |
|
2449 |
-
#: includes/admin/tools.php:
|
2450 |
-
msgid "
|
2451 |
msgstr ""
|
2452 |
|
2453 |
-
#: includes/admin/tools.php:
|
2454 |
-
msgid "
|
2455 |
msgstr ""
|
2456 |
|
2457 |
-
#: includes/admin/tools.php:
|
2458 |
-
msgid "
|
2459 |
msgstr ""
|
2460 |
|
2461 |
-
#: includes/admin/tools.php:
|
2462 |
-
msgid "
|
2463 |
msgstr ""
|
2464 |
|
2465 |
-
#: includes/admin/tools.php:
|
2466 |
-
msgid "
|
|
|
|
|
|
|
2467 |
msgstr ""
|
2468 |
|
2469 |
-
#: includes/admin/tools.php:
|
2470 |
-
msgid "
|
|
|
|
|
2471 |
msgstr ""
|
2472 |
|
2473 |
-
#: includes/admin/tools.php:
|
2474 |
-
msgid "
|
2475 |
msgstr ""
|
2476 |
|
2477 |
-
#: includes/admin/tools.php:
|
2478 |
-
msgid "No
|
2479 |
msgstr ""
|
2480 |
|
2481 |
-
#: includes/admin/tools.php:
|
2482 |
-
msgid "Complete! %d
|
2483 |
-
msgid_plural "Complete! %d
|
2484 |
msgstr[0] ""
|
2485 |
msgstr[1] ""
|
2486 |
|
2487 |
-
#: includes/admin/tools.php:
|
2488 |
-
msgid "
|
2489 |
-
msgstr ""
|
2490 |
-
|
2491 |
-
#: includes/admin/tools.php:2138
|
2492 |
-
msgid "Recalculating the forum for each post … %s"
|
2493 |
-
msgstr ""
|
2494 |
-
|
2495 |
-
#: includes/admin/tools.php:2193
|
2496 |
-
msgid "Recalculating the topic for each post … %s"
|
2497 |
msgstr ""
|
2498 |
|
2499 |
-
#: includes/admin/tools.php:
|
2500 |
-
msgid "
|
2501 |
msgstr ""
|
2502 |
|
2503 |
-
#: includes/admin/tools.php:
|
2504 |
-
msgid "
|
2505 |
msgstr ""
|
2506 |
|
2507 |
-
#: includes/admin/tools.php:
|
2508 |
msgid "Upgrading user favorites … %s"
|
2509 |
msgstr ""
|
2510 |
|
2511 |
-
#: includes/admin/tools.php:
|
2512 |
msgid "No favorites to upgrade."
|
2513 |
msgstr ""
|
2514 |
|
2515 |
-
#: includes/admin/tools.php:
|
2516 |
msgid "Complete! %d favorite upgraded."
|
2517 |
msgid_plural "Complete! %d favorites upgraded."
|
2518 |
msgstr[0] ""
|
2519 |
msgstr[1] ""
|
2520 |
|
2521 |
-
#: includes/admin/tools.php:
|
2522 |
msgid "Upgrading user topic subscriptions … %s"
|
2523 |
msgstr ""
|
2524 |
|
2525 |
-
#: includes/admin/tools.php:
|
2526 |
msgid "No topic subscriptions to upgrade."
|
2527 |
msgstr ""
|
2528 |
|
2529 |
-
#: includes/admin/tools.php:
|
2530 |
msgid "Complete! %d topic subscription upgraded."
|
2531 |
msgid_plural "Complete! %d topic subscriptions upgraded."
|
2532 |
msgstr[0] ""
|
2533 |
msgstr[1] ""
|
2534 |
|
2535 |
-
#: includes/admin/tools.php:
|
2536 |
msgid "Upgrading user forum subscriptions … %s"
|
2537 |
msgstr ""
|
2538 |
|
2539 |
-
#: includes/admin/tools.php:
|
2540 |
msgid "No forum subscriptions to upgrade."
|
2541 |
msgstr ""
|
2542 |
|
2543 |
-
#: includes/admin/tools.php:
|
2544 |
msgid "Complete! %d forum subscription upgraded."
|
2545 |
msgid_plural "Complete! %d forum subscriptions upgraded."
|
2546 |
msgstr[0] ""
|
2547 |
msgstr[1] ""
|
2548 |
|
2549 |
-
#: includes/admin/tools.php:
|
2550 |
-
msgid ""
|
2551 |
-
"Revert your forums back to a brand new installation. This process cannot be "
|
2552 |
-
"undone."
|
2553 |
msgstr ""
|
2554 |
|
2555 |
-
#: includes/admin/tools.php:
|
2556 |
-
msgid "
|
2557 |
msgstr ""
|
2558 |
|
2559 |
-
#: includes/admin/tools.php:
|
2560 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
2561 |
msgstr ""
|
2562 |
|
2563 |
-
#: includes/admin/tools
|
2564 |
-
msgid "
|
2565 |
msgstr ""
|
2566 |
|
2567 |
-
#: includes/admin/tools
|
2568 |
-
|
2569 |
-
msgid "All Topics"
|
2570 |
msgstr ""
|
2571 |
|
2572 |
-
#: includes/admin/tools
|
2573 |
-
|
2574 |
-
msgid "All Replies"
|
2575 |
msgstr ""
|
2576 |
|
2577 |
-
#: includes/admin/tools.php:
|
2578 |
-
msgid "
|
2579 |
msgstr ""
|
2580 |
|
2581 |
-
#: includes/admin/tools.php:
|
2582 |
-
msgid "
|
2583 |
msgstr ""
|
2584 |
|
2585 |
-
#: includes/admin/tools.php:
|
2586 |
-
msgid "
|
2587 |
msgstr ""
|
2588 |
|
2589 |
-
#: includes/admin/tools.php:
|
2590 |
-
msgid "
|
2591 |
msgstr ""
|
2592 |
|
2593 |
-
#: includes/admin/tools.php:
|
2594 |
-
msgid "
|
2595 |
msgstr ""
|
2596 |
|
2597 |
-
#: includes/admin/tools.php:
|
2598 |
-
msgid "
|
2599 |
msgstr ""
|
2600 |
|
2601 |
-
#: includes/admin/tools.php:
|
2602 |
-
msgid "
|
2603 |
msgstr ""
|
2604 |
|
2605 |
-
#: includes/admin/tools.php:
|
2606 |
-
msgid "
|
2607 |
msgstr ""
|
2608 |
|
2609 |
-
#: includes/admin/tools.php:
|
2610 |
-
msgid "
|
2611 |
msgstr ""
|
2612 |
|
2613 |
-
#: includes/admin/tools.php:
|
2614 |
-
msgid ""
|
2615 |
-
"Note: Resetting without this checked will delete the meta-data necessary to "
|
2616 |
-
"delete these users."
|
2617 |
msgstr ""
|
2618 |
|
2619 |
-
#: includes/admin/tools.php:
|
2620 |
-
msgid "
|
2621 |
msgstr ""
|
2622 |
|
2623 |
-
#: includes/admin/tools.php:
|
2624 |
-
|
2625 |
-
#: templates/default/bbpress/form-topic-merge.php:95
|
2626 |
-
#: templates/default/bbpress/form-topic-split.php:99
|
2627 |
-
msgid "This process cannot be undone."
|
2628 |
msgstr ""
|
2629 |
|
2630 |
-
#: includes/admin/tools.php:
|
2631 |
-
msgid "
|
2632 |
msgstr ""
|
2633 |
|
2634 |
-
#: includes/admin/tools.php:
|
2635 |
-
msgid "
|
2636 |
msgstr ""
|
2637 |
|
2638 |
-
#: includes/admin/tools.php:
|
2639 |
-
msgid "
|
2640 |
msgstr ""
|
2641 |
|
2642 |
-
#: includes/admin/tools.php:
|
2643 |
-
msgid "
|
2644 |
msgstr ""
|
2645 |
|
2646 |
-
#: includes/admin/tools.php:
|
2647 |
-
msgid "
|
2648 |
msgstr ""
|
2649 |
|
2650 |
-
#: includes/admin/tools.php:
|
2651 |
-
msgid "
|
2652 |
msgstr ""
|
2653 |
|
2654 |
-
#: includes/admin/tools.php:
|
2655 |
-
msgid "
|
2656 |
msgstr ""
|
2657 |
|
2658 |
-
#: includes/admin/tools.php:
|
2659 |
-
msgid "
|
2660 |
msgstr ""
|
2661 |
|
2662 |
-
#: includes/admin/tools.php:
|
2663 |
-
msgid "
|
2664 |
msgstr ""
|
2665 |
|
2666 |
-
#: includes/admin/tools.php:
|
2667 |
-
msgid "
|
2668 |
msgstr ""
|
2669 |
|
2670 |
-
#: includes/admin/tools.php:
|
2671 |
-
msgid "
|
2672 |
msgstr ""
|
2673 |
|
2674 |
-
#: includes/admin/tools.php:
|
2675 |
-
msgid "
|
2676 |
msgstr ""
|
2677 |
|
2678 |
-
#: includes/admin/tools.php:
|
2679 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2680 |
msgstr ""
|
2681 |
|
2682 |
-
#: includes/admin/topics.php:
|
2683 |
msgid ""
|
2684 |
"This screen displays the individual topics on your site. You can customize "
|
2685 |
"the display of this screen to suit your workflow."
|
2686 |
msgstr ""
|
2687 |
|
2688 |
-
#: includes/admin/topics.php:
|
2689 |
msgid ""
|
2690 |
"You can hide/display columns based on your needs and decide how many topics "
|
2691 |
"to list per screen using the Screen Options tab."
|
2692 |
msgstr ""
|
2693 |
|
2694 |
-
#: includes/admin/topics.php:
|
2695 |
msgid ""
|
2696 |
"You can filter the list of topics by topic status using the text links in "
|
2697 |
"the upper left to show All, Published, Draft, Pending, Trashed, Closed, or "
|
2698 |
"Spam topics. The default view is to show all topics."
|
2699 |
msgstr ""
|
2700 |
|
2701 |
-
#: includes/admin/topics.php:
|
2702 |
msgid ""
|
2703 |
"You can view topics in a simple title list or with an excerpt. Choose the "
|
2704 |
"view you prefer by clicking on the icons at the top of the list on the "
|
2705 |
"right."
|
2706 |
msgstr ""
|
2707 |
|
2708 |
-
#: includes/admin/topics.php:
|
2709 |
msgid ""
|
2710 |
"You can refine the list to show only topics in a specific forum or from a "
|
2711 |
"specific month by using the dropdown menus above the topics list. Click the "
|
2712 |
"Filter button after making your selection."
|
2713 |
msgstr ""
|
2714 |
|
2715 |
-
#: includes/admin/topics.php:
|
2716 |
msgid ""
|
2717 |
"Hovering over a row in the topics list will display action links that allow "
|
2718 |
"you to manage your topic. You can perform the following actions:"
|
2719 |
msgstr ""
|
2720 |
|
2721 |
-
#: includes/admin/topics.php:
|
2722 |
msgid ""
|
2723 |
"<strong>Edit</strong> takes you to the editing screen for that topic. You "
|
2724 |
"can also reach that screen by clicking on the topic title."
|
2725 |
msgstr ""
|
2726 |
|
2727 |
-
#: includes/admin/topics.php:
|
2728 |
msgid ""
|
2729 |
"<strong>Trash</strong> removes your topic from this list and places it in "
|
2730 |
"the trash, from which you can permanently delete it."
|
2731 |
msgstr ""
|
2732 |
|
2733 |
-
#: includes/admin/topics.php:
|
2734 |
msgid ""
|
2735 |
"<strong>Spam</strong> removes your topic from this list and places it in "
|
2736 |
"the spam queue, from which you can permanently delete it."
|
2737 |
msgstr ""
|
2738 |
|
2739 |
-
#: includes/admin/topics.php:
|
2740 |
msgid "<strong>View</strong> will take you to your live site to view the topic."
|
2741 |
msgstr ""
|
2742 |
|
2743 |
-
#: includes/admin/topics.php:
|
2744 |
msgid ""
|
2745 |
"<strong>Close</strong> will mark the selected topic as ’closed’ "
|
2746 |
"and disable the option to post new replies to the topic."
|
2747 |
msgstr ""
|
2748 |
|
2749 |
-
#: includes/admin/topics.php:
|
2750 |
msgid ""
|
2751 |
"<strong>Stick</strong> will keep the selected topic ’pinned’ to "
|
2752 |
"the top the parent forum topic list."
|
2753 |
msgstr ""
|
2754 |
|
2755 |
-
#: includes/admin/topics.php:
|
2756 |
msgid ""
|
2757 |
"<strong>Stick <em>(to front)</em></strong> will keep the selected topic "
|
2758 |
"’pinned’ to the top of ALL forums and be visable in any forums "
|
2759 |
"topics list."
|
2760 |
msgstr ""
|
2761 |
|
2762 |
-
#: includes/admin/topics.php:
|
2763 |
msgid ""
|
2764 |
"You can also edit, spam, or move multiple topics to the trash at once. "
|
2765 |
"Select the topics you want to act on using the checkboxes, then select the "
|
2766 |
"action you want to take from the Bulk Actions menu and click Apply."
|
2767 |
msgstr ""
|
2768 |
|
2769 |
-
#: includes/admin/topics.php:
|
2770 |
msgid ""
|
2771 |
"When using Bulk Edit, you can change the metadata (categories, author, "
|
2772 |
"etc.) for all selected topics at once. To remove a topic from the grouping, "
|
2773 |
"just click the x next to its name in the Bulk Edit area that appears."
|
2774 |
msgstr ""
|
2775 |
|
2776 |
-
#: includes/admin/topics.php:
|
2777 |
msgid ""
|
2778 |
"The title field and the big topic editing Area are fixed in place, but you "
|
2779 |
"can reposition all the other boxes using drag and drop, and can minimize or "
|
@@ -2783,17 +2984,17 @@ msgid ""
|
|
2783 |
"screen."
|
2784 |
msgstr ""
|
2785 |
|
2786 |
-
#: includes/admin/topics.php:
|
2787 |
msgid "Title and Topic Editor"
|
2788 |
msgstr ""
|
2789 |
|
2790 |
-
#: includes/admin/topics.php:
|
2791 |
msgid ""
|
2792 |
"<strong>Title</strong> - Enter a title for your topic. After you enter a "
|
2793 |
"title, you’ll see the permalink below, which you can edit."
|
2794 |
msgstr ""
|
2795 |
|
2796 |
-
#: includes/admin/topics.php:
|
2797 |
msgid ""
|
2798 |
"<strong>Topic Editor</strong> - Enter the text for your topic. There are "
|
2799 |
"two modes of editing: Visual and HTML. Choose the mode by clicking on the "
|
@@ -2808,7 +3009,7 @@ msgid ""
|
|
2808 |
"editor."
|
2809 |
msgstr ""
|
2810 |
|
2811 |
-
#: includes/admin/topics.php:
|
2812 |
msgid ""
|
2813 |
"<strong>Publish</strong> - You can set the terms of publishing your topic "
|
2814 |
"in the Publish box. For Status, Visibility, and Publish (immediately), "
|
@@ -2819,7 +3020,7 @@ msgid ""
|
|
2819 |
"future or backdate a topic."
|
2820 |
msgstr ""
|
2821 |
|
2822 |
-
#: includes/admin/topics.php:
|
2823 |
msgid ""
|
2824 |
"<strong>Featured Image</strong> - This allows you to associate an image "
|
2825 |
"with your topic without inserting it. This is usually useful only if your "
|
@@ -2827,22 +3028,22 @@ msgid ""
|
|
2827 |
"page, a custom header, etc."
|
2828 |
msgstr ""
|
2829 |
|
2830 |
-
#: includes/admin/topics.php:
|
2831 |
msgid "Topic Attributes"
|
2832 |
msgstr ""
|
2833 |
|
2834 |
-
#: includes/admin/topics.php:
|
2835 |
msgid "Select the attributes that your topic should have:"
|
2836 |
msgstr ""
|
2837 |
|
2838 |
-
#: includes/admin/topics.php:
|
2839 |
msgid ""
|
2840 |
"<strong>Forum</strong> dropdown determines the parent forum that the topic "
|
2841 |
"belongs to. Select the forum or category from the dropdown, or leave the "
|
2842 |
"default \"No forum\" to post the topic without an assigned forum."
|
2843 |
msgstr ""
|
2844 |
|
2845 |
-
#: includes/admin/topics.php:
|
2846 |
msgid ""
|
2847 |
"<strong>Topic Type</strong> dropdown indicates the sticky status of the "
|
2848 |
"topic. Selecting the super sticky option would stick the topic to the front "
|
@@ -2851,202 +3052,202 @@ msgid ""
|
|
2851 |
"anywhere."
|
2852 |
msgstr ""
|
2853 |
|
2854 |
-
#: includes/admin/topics.php:
|
2855 |
msgid "%s topic updated."
|
2856 |
msgid_plural "%s topics updated."
|
2857 |
msgstr[0] ""
|
2858 |
msgstr[1] ""
|
2859 |
|
2860 |
-
#: includes/admin/topics.php:
|
2861 |
msgid "1 topic not updated, somebody is editing it."
|
2862 |
msgstr ""
|
2863 |
|
2864 |
-
#: includes/admin/topics.php:
|
2865 |
msgid "%s topic not updated, somebody is editing it."
|
2866 |
msgid_plural "%s topics not updated, somebody is editing them."
|
2867 |
msgstr[0] ""
|
2868 |
msgstr[1] ""
|
2869 |
|
2870 |
-
#: includes/admin/topics.php:
|
2871 |
msgid "Error in spamming topic."
|
2872 |
msgstr ""
|
2873 |
|
2874 |
-
#: includes/admin/topics.php:
|
2875 |
msgid "Sorry, you are not allowed to unspam this topic."
|
2876 |
msgstr ""
|
2877 |
|
2878 |
-
#: includes/admin/topics.php:
|
2879 |
msgid "Error in unspamming topic."
|
2880 |
msgstr ""
|
2881 |
|
2882 |
-
#: includes/admin/topics.php:
|
2883 |
msgid "The topic was not found."
|
2884 |
msgstr ""
|
2885 |
|
2886 |
-
#: includes/admin/topics.php:
|
2887 |
msgid "There was a problem opening the topic \"%1$s\"."
|
2888 |
msgstr ""
|
2889 |
|
2890 |
-
#: includes/admin/topics.php:
|
2891 |
msgid "Topic \"%1$s\" successfully opened."
|
2892 |
msgstr ""
|
2893 |
|
2894 |
-
#: includes/admin/topics.php:
|
2895 |
msgid "There was a problem closing the topic \"%1$s\"."
|
2896 |
msgstr ""
|
2897 |
|
2898 |
-
#: includes/admin/topics.php:
|
2899 |
msgid "Topic \"%1$s\" successfully closed."
|
2900 |
msgstr ""
|
2901 |
|
2902 |
-
#: includes/admin/topics.php:
|
2903 |
msgid "There was a problem sticking the topic \"%1$s\" to front."
|
2904 |
msgstr ""
|
2905 |
|
2906 |
-
#: includes/admin/topics.php:
|
2907 |
msgid "Topic \"%1$s\" successfully stuck to front."
|
2908 |
msgstr ""
|
2909 |
|
2910 |
-
#: includes/admin/topics.php:
|
2911 |
msgid "There was a problem sticking the topic \"%1$s\"."
|
2912 |
msgstr ""
|
2913 |
|
2914 |
-
#: includes/admin/topics.php:
|
2915 |
msgid "Topic \"%1$s\" successfully stuck."
|
2916 |
msgstr ""
|
2917 |
|
2918 |
-
#: includes/admin/topics.php:
|
2919 |
msgid "There was a problem unsticking the topic \"%1$s\"."
|
2920 |
msgstr ""
|
2921 |
|
2922 |
-
#: includes/admin/topics.php:
|
2923 |
msgid "Topic \"%1$s\" successfully unstuck."
|
2924 |
msgstr ""
|
2925 |
|
2926 |
-
#: includes/admin/topics.php:
|
2927 |
msgid "There was a problem marking the topic \"%1$s\" as spam."
|
2928 |
msgstr ""
|
2929 |
|
2930 |
-
#: includes/admin/topics.php:
|
2931 |
msgid "Topic \"%1$s\" successfully marked as spam."
|
2932 |
msgstr ""
|
2933 |
|
2934 |
-
#: includes/admin/topics.php:
|
2935 |
msgid "There was a problem unmarking the topic \"%1$s\" as spam."
|
2936 |
msgstr ""
|
2937 |
|
2938 |
-
#: includes/admin/topics.php:
|
2939 |
msgid "Topic \"%1$s\" successfully unmarked as spam."
|
2940 |
msgstr ""
|
2941 |
|
2942 |
-
#: includes/admin/topics.php:
|
2943 |
msgid "There was a problem approving the topic \"%1$s\"."
|
2944 |
msgstr ""
|
2945 |
|
2946 |
-
#: includes/admin/topics.php:
|
2947 |
msgid "Topic \"%1$s\" successfully approved."
|
2948 |
msgstr ""
|
2949 |
|
2950 |
-
#: includes/admin/topics.php:
|
2951 |
msgid "There was a problem unapproving the topic \"%1$s\"."
|
2952 |
msgstr ""
|
2953 |
|
2954 |
-
#: includes/admin/topics.php:
|
2955 |
msgid "Topic \"%1$s\" successfully unapproved."
|
2956 |
msgstr ""
|
2957 |
|
2958 |
-
#: includes/admin/topics.php:
|
2959 |
msgid "Voices"
|
2960 |
msgstr ""
|
2961 |
|
2962 |
-
#: includes/admin/topics.php:
|
2963 |
msgid "No Replies"
|
2964 |
msgstr ""
|
2965 |
|
2966 |
-
#: includes/admin/topics.php:
|
2967 |
msgid "Unapprove this topic"
|
2968 |
msgstr ""
|
2969 |
|
2970 |
-
#: includes/admin/topics.php:
|
2971 |
msgid "Approve this topic"
|
2972 |
msgstr ""
|
2973 |
|
2974 |
-
#: includes/admin/topics.php:
|
2975 |
msgid "Close this topic"
|
2976 |
msgstr ""
|
2977 |
|
2978 |
-
#: includes/admin/topics.php:
|
2979 |
msgid "Open this topic"
|
2980 |
msgstr ""
|
2981 |
|
2982 |
-
#: includes/admin/topics.php:
|
2983 |
msgid "Unstick this topic"
|
2984 |
msgstr ""
|
2985 |
|
2986 |
-
#: includes/admin/topics.php:
|
2987 |
msgid "Unstick"
|
2988 |
msgstr ""
|
2989 |
|
2990 |
-
#: includes/admin/topics.php:
|
2991 |
msgid "Stick this topic to its forum"
|
2992 |
msgstr ""
|
2993 |
|
2994 |
-
#: includes/admin/topics.php:
|
2995 |
msgid "Stick"
|
2996 |
msgstr ""
|
2997 |
|
2998 |
-
#: includes/admin/topics.php:
|
2999 |
msgid "Stick this topic to front"
|
3000 |
msgstr ""
|
3001 |
|
3002 |
-
#: includes/admin/topics.php:
|
3003 |
msgid "(to front)"
|
3004 |
msgstr ""
|
3005 |
|
3006 |
-
#: includes/admin/topics.php:
|
3007 |
msgid "Mark the topic as not spam"
|
3008 |
msgstr ""
|
3009 |
|
3010 |
-
#: includes/admin/topics.php:
|
3011 |
msgid "Mark this topic as spam"
|
3012 |
msgstr ""
|
3013 |
|
3014 |
-
#: includes/admin/topics.php:
|
3015 |
msgid "Topic updated."
|
3016 |
msgstr ""
|
3017 |
|
3018 |
-
#: includes/admin/topics.php:
|
3019 |
#. translators: %s: date and time of the revision
|
3020 |
msgid "Topic restored to revision from %s"
|
3021 |
msgstr ""
|
3022 |
|
3023 |
-
#: includes/admin/topics.php:
|
3024 |
msgid "Topic created."
|
3025 |
msgstr ""
|
3026 |
|
3027 |
-
#: includes/admin/topics.php:
|
3028 |
msgid "Topic saved."
|
3029 |
msgstr ""
|
3030 |
|
3031 |
-
#: includes/admin/topics.php:
|
3032 |
msgid "Topic submitted."
|
3033 |
msgstr ""
|
3034 |
|
3035 |
-
#: includes/admin/topics.php:
|
3036 |
msgid "Topic scheduled for: %s."
|
3037 |
msgstr ""
|
3038 |
|
3039 |
-
#: includes/admin/topics.php:
|
3040 |
msgid "Topic draft updated."
|
3041 |
msgstr ""
|
3042 |
|
3043 |
#: includes/admin/users.php:102 includes/admin/users.php:263
|
3044 |
-
#: templates/default/bbpress/form-user-roles.php:
|
3045 |
msgid "Forum Role"
|
3046 |
msgstr ""
|
3047 |
|
3048 |
#: includes/admin/users.php:111 includes/admin/users.php:115
|
3049 |
-
#: includes/users/template.php:
|
3050 |
msgid "— No role for these forums —"
|
3051 |
msgstr ""
|
3052 |
|
@@ -3062,91 +3263,103 @@ msgstr ""
|
|
3062 |
msgid "Site Role"
|
3063 |
msgstr ""
|
3064 |
|
3065 |
-
#: includes/common/
|
|
|
|
|
|
|
|
|
3066 |
msgid "sometime"
|
3067 |
msgstr ""
|
3068 |
|
3069 |
-
#: includes/common/
|
3070 |
msgid "right now"
|
3071 |
msgstr ""
|
3072 |
|
3073 |
-
#: includes/common/
|
3074 |
msgid "%s ago"
|
3075 |
msgstr ""
|
3076 |
|
3077 |
-
#: includes/common/
|
3078 |
msgid "year"
|
3079 |
msgstr ""
|
3080 |
|
3081 |
-
#: includes/common/
|
3082 |
msgid "years"
|
3083 |
msgstr ""
|
3084 |
|
3085 |
-
#: includes/common/
|
3086 |
msgid "month"
|
3087 |
msgstr ""
|
3088 |
|
3089 |
-
#: includes/common/
|
3090 |
msgid "months"
|
3091 |
msgstr ""
|
3092 |
|
3093 |
-
#: includes/common/
|
3094 |
msgid "week"
|
3095 |
msgstr ""
|
3096 |
|
3097 |
-
#: includes/common/
|
3098 |
msgid "weeks"
|
3099 |
msgstr ""
|
3100 |
|
3101 |
-
#: includes/common/
|
3102 |
msgid "day"
|
3103 |
msgstr ""
|
3104 |
|
3105 |
-
#: includes/common/
|
3106 |
msgid "days"
|
3107 |
msgstr ""
|
3108 |
|
3109 |
-
#: includes/common/
|
3110 |
msgid "hour"
|
3111 |
msgstr ""
|
3112 |
|
3113 |
-
#: includes/common/
|
3114 |
msgid "hours"
|
3115 |
msgstr ""
|
3116 |
|
3117 |
-
#: includes/common/
|
3118 |
msgid "minute"
|
3119 |
msgstr ""
|
3120 |
|
3121 |
-
#: includes/common/
|
|
|
|
|
|
|
|
|
3122 |
msgid "second"
|
3123 |
msgstr ""
|
3124 |
|
3125 |
-
#: includes/common/
|
|
|
|
|
|
|
|
|
3126 |
msgid "Pending: %s"
|
3127 |
msgstr ""
|
3128 |
|
3129 |
-
#: includes/common/functions.php:
|
3130 |
msgid "Private: %s"
|
3131 |
msgstr ""
|
3132 |
|
3133 |
-
#: includes/common/functions.php:
|
3134 |
msgid "Spammed: %s"
|
3135 |
msgstr ""
|
3136 |
|
3137 |
-
#: includes/common/functions.php:
|
3138 |
msgid "Trashed: %s"
|
3139 |
msgstr ""
|
3140 |
|
3141 |
-
#: includes/common/functions.php:
|
3142 |
msgid "<strong>ERROR</strong>: Invalid author name."
|
3143 |
msgstr ""
|
3144 |
|
3145 |
-
#: includes/common/functions.php:
|
3146 |
msgid "<strong>ERROR</strong>: Invalid email address."
|
3147 |
msgstr ""
|
3148 |
|
3149 |
-
#: includes/common/functions.php:
|
3150 |
msgid ""
|
3151 |
"%1$s wrote:\n"
|
3152 |
"\n"
|
@@ -3161,7 +3374,7 @@ msgid ""
|
|
3161 |
"Login and visit the topic to unsubscribe from these emails."
|
3162 |
msgstr ""
|
3163 |
|
3164 |
-
#: includes/common/functions.php:
|
3165 |
msgid ""
|
3166 |
"%1$s wrote:\n"
|
3167 |
"\n"
|
@@ -3176,133 +3389,133 @@ msgid ""
|
|
3176 |
"Login and visit the topic to unsubscribe from these emails."
|
3177 |
msgstr ""
|
3178 |
|
3179 |
-
#: includes/common/functions.php:
|
3180 |
msgid ""
|
3181 |
"Conditional query tags do not work before the query is run. Before then, "
|
3182 |
"they always return false."
|
3183 |
msgstr ""
|
3184 |
|
3185 |
-
#: includes/common/template.php:
|
3186 |
msgid "No topics available"
|
3187 |
msgstr ""
|
3188 |
|
3189 |
-
#: includes/common/template.php:
|
3190 |
msgid "No forums available"
|
3191 |
msgstr ""
|
3192 |
|
3193 |
-
#: includes/common/template.php:
|
3194 |
msgid "None available"
|
3195 |
msgstr ""
|
3196 |
|
3197 |
-
#: includes/common/template.php:
|
3198 |
msgid "Home"
|
3199 |
msgstr ""
|
3200 |
|
3201 |
-
#: includes/common/template.php:
|
3202 |
msgid "(Edit)"
|
3203 |
msgstr ""
|
3204 |
|
3205 |
-
#: includes/common/template.php:
|
3206 |
-
#: includes/common/template.php:
|
3207 |
#: templates/default/extras/taxonomy-topic-tag-edit.php:17
|
3208 |
#: templates/default/extras/taxonomy-topic-tag.php:17
|
3209 |
msgid "Topic Tag: %s"
|
3210 |
msgstr ""
|
3211 |
|
3212 |
-
#: includes/common/template.php:
|
3213 |
msgid "‹"
|
3214 |
msgstr ""
|
3215 |
|
3216 |
-
#: includes/common/template.php:
|
3217 |
msgid "›"
|
3218 |
msgstr ""
|
3219 |
|
3220 |
-
#: includes/common/template.php:
|
3221 |
msgid "Log Out"
|
3222 |
msgstr ""
|
3223 |
|
3224 |
-
#: includes/common/template.php:
|
3225 |
msgid "Forum Edit: %s"
|
3226 |
msgstr ""
|
3227 |
|
3228 |
-
#: includes/common/template.php:
|
3229 |
msgid "Topic Edit: %s"
|
3230 |
msgstr ""
|
3231 |
|
3232 |
-
#: includes/common/template.php:
|
3233 |
msgid "Reply Edit: %s"
|
3234 |
msgstr ""
|
3235 |
|
3236 |
-
#: includes/common/template.php:
|
3237 |
msgid "Topic Tag Edit: %s"
|
3238 |
msgstr ""
|
3239 |
|
3240 |
-
#: includes/common/template.php:
|
3241 |
msgid "Forum: %s"
|
3242 |
msgstr ""
|
3243 |
|
3244 |
-
#: includes/common/template.php:
|
3245 |
msgid "Topic: %s"
|
3246 |
msgstr ""
|
3247 |
|
3248 |
-
#: includes/common/template.php:
|
3249 |
msgid "Your Topics"
|
3250 |
msgstr ""
|
3251 |
|
3252 |
-
#: includes/common/template.php:
|
3253 |
#. translators: user's display name
|
3254 |
msgid "%s's Topics"
|
3255 |
msgstr ""
|
3256 |
|
3257 |
-
#: includes/common/template.php:
|
3258 |
msgid "Your Replies"
|
3259 |
msgstr ""
|
3260 |
|
3261 |
-
#: includes/common/template.php:
|
3262 |
#. translators: user's display name
|
3263 |
msgid "%s's Replies"
|
3264 |
msgstr ""
|
3265 |
|
3266 |
-
#: includes/common/template.php:
|
3267 |
msgid "Your Favorites"
|
3268 |
msgstr ""
|
3269 |
|
3270 |
-
#: includes/common/template.php:
|
3271 |
-
#: templates/default/bbpress/user-details.php:
|
3272 |
#. translators: user's display name
|
3273 |
msgid "%s's Favorites"
|
3274 |
msgstr ""
|
3275 |
|
3276 |
-
#: includes/common/template.php:
|
3277 |
msgid "Your Subscriptions"
|
3278 |
msgstr ""
|
3279 |
|
3280 |
-
#: includes/common/template.php:
|
3281 |
-
#: templates/default/bbpress/user-details.php:
|
3282 |
#. translators: user's display name
|
3283 |
msgid "%s's Subscriptions"
|
3284 |
msgstr ""
|
3285 |
|
3286 |
-
#: includes/common/template.php:
|
3287 |
msgid "Your Profile"
|
3288 |
msgstr ""
|
3289 |
|
3290 |
-
#: includes/common/template.php:
|
3291 |
-
#: templates/default/bbpress/user-details.php:
|
3292 |
#. translators: user's display name
|
3293 |
msgid "%s's Profile"
|
3294 |
msgstr ""
|
3295 |
|
3296 |
-
#: includes/common/template.php:
|
3297 |
msgid "Edit Your Profile"
|
3298 |
msgstr ""
|
3299 |
|
3300 |
-
#: includes/common/template.php:
|
3301 |
-
#: templates/default/bbpress/user-details.php:
|
3302 |
msgid "Edit %s's Profile"
|
3303 |
msgstr ""
|
3304 |
|
3305 |
-
#: includes/common/template.php:
|
3306 |
msgid "View: %s"
|
3307 |
msgstr ""
|
3308 |
|
@@ -3315,20 +3528,20 @@ msgid "(bbPress) Login Widget"
|
|
3315 |
msgstr ""
|
3316 |
|
3317 |
#: includes/common/widgets.php:89 includes/common/widgets.php:110
|
3318 |
-
#: templates/default/bbpress/form-user-login.php:
|
3319 |
-
#: templates/default/bbpress/form-user-login.php:
|
3320 |
msgid "Log In"
|
3321 |
msgstr ""
|
3322 |
|
3323 |
#: includes/common/widgets.php:92
|
3324 |
-
#: templates/default/bbpress/form-user-edit.php:
|
3325 |
-
#: templates/default/bbpress/form-user-login.php:
|
3326 |
-
#: templates/default/bbpress/form-user-register.php:
|
3327 |
msgid "Username"
|
3328 |
msgstr ""
|
3329 |
|
3330 |
#: includes/common/widgets.php:97
|
3331 |
-
#: templates/default/bbpress/form-user-login.php:
|
3332 |
msgid "Password"
|
3333 |
msgstr ""
|
3334 |
|
@@ -3337,19 +3550,19 @@ msgid "Remember Me"
|
|
3337 |
msgstr ""
|
3338 |
|
3339 |
#: includes/common/widgets.php:122
|
3340 |
-
#: templates/default/bbpress/form-user-register.php:
|
3341 |
msgid "Register"
|
3342 |
msgstr ""
|
3343 |
|
3344 |
#: includes/common/widgets.php:128
|
3345 |
-
#: templates/default/bbpress/form-user-lost-pass.php:
|
3346 |
msgid "Lost Password"
|
3347 |
msgstr ""
|
3348 |
|
3349 |
-
#: includes/common/widgets.php:185 includes/common/widgets.php:
|
3350 |
-
#: includes/common/widgets.php:
|
3351 |
-
#: includes/common/widgets.php:
|
3352 |
-
#: includes/common/widgets.php:
|
3353 |
msgid "Title:"
|
3354 |
msgstr ""
|
3355 |
|
@@ -3369,128 +3582,128 @@ msgstr ""
|
|
3369 |
msgid "(bbPress) Topic Views List"
|
3370 |
msgstr ""
|
3371 |
|
3372 |
-
#: includes/common/widgets.php:
|
3373 |
msgid "The bbPress forum search form."
|
3374 |
msgstr ""
|
3375 |
|
3376 |
-
#: includes/common/widgets.php:
|
3377 |
msgid "(bbPress) Forum Search Form"
|
3378 |
msgstr ""
|
3379 |
|
3380 |
-
#: includes/common/widgets.php:
|
3381 |
msgid "Search Forums"
|
3382 |
msgstr ""
|
3383 |
|
3384 |
-
#: includes/common/widgets.php:
|
3385 |
msgid "A list of forums with an option to set the parent."
|
3386 |
msgstr ""
|
3387 |
|
3388 |
-
#: includes/common/widgets.php:
|
3389 |
msgid "(bbPress) Forums List"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
-
#: includes/common/widgets.php:
|
3393 |
msgid "Parent Forum ID:"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
-
#: includes/common/widgets.php:
|
3397 |
msgid "\"0\" to show only root - \"any\" to show all"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
-
#: includes/common/widgets.php:
|
3401 |
msgid "A list of recent topics, sorted by: newness, popularity, or recent replies."
|
3402 |
msgstr ""
|
3403 |
|
3404 |
-
#: includes/common/widgets.php:
|
3405 |
msgid "(bbPress) Recent Topics"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
-
#: includes/common/widgets.php:
|
3409 |
msgid "Maximum topics to show:"
|
3410 |
msgstr ""
|
3411 |
|
3412 |
-
#: includes/common/widgets.php:
|
3413 |
msgid "Show post date:"
|
3414 |
msgstr ""
|
3415 |
|
3416 |
-
#: includes/common/widgets.php:
|
3417 |
msgid "Show topic author:"
|
3418 |
msgstr ""
|
3419 |
|
3420 |
-
#: includes/common/widgets.php:
|
3421 |
msgid "Order By:"
|
3422 |
msgstr ""
|
3423 |
|
3424 |
-
#: includes/common/widgets.php:
|
3425 |
msgid "Newest Topics"
|
3426 |
msgstr ""
|
3427 |
|
3428 |
-
#: includes/common/widgets.php:
|
3429 |
#: templates/default/extras/page-forum-statistics.php:34
|
3430 |
msgid "Popular Topics"
|
3431 |
msgstr ""
|
3432 |
|
3433 |
-
#: includes/common/widgets.php:
|
3434 |
msgid "Topics With Recent Replies"
|
3435 |
msgstr ""
|
3436 |
|
3437 |
-
#: includes/common/widgets.php:
|
3438 |
msgid "Recent Topics"
|
3439 |
msgstr ""
|
3440 |
|
3441 |
-
#: includes/common/widgets.php:
|
3442 |
msgid "Some statistics from your forum."
|
3443 |
msgstr ""
|
3444 |
|
3445 |
-
#: includes/common/widgets.php:
|
3446 |
msgid "(bbPress) Statistics"
|
3447 |
msgstr ""
|
3448 |
|
3449 |
-
#: includes/common/widgets.php:
|
3450 |
msgid "Forum Statistics"
|
3451 |
msgstr ""
|
3452 |
|
3453 |
-
#: includes/common/widgets.php:
|
3454 |
msgid "A list of the most recent replies."
|
3455 |
msgstr ""
|
3456 |
|
3457 |
-
#: includes/common/widgets.php:
|
3458 |
msgid "(bbPress) Recent Replies"
|
3459 |
msgstr ""
|
3460 |
|
3461 |
-
#: includes/common/widgets.php:
|
3462 |
msgid "Maximum replies to show:"
|
3463 |
msgstr ""
|
3464 |
|
3465 |
-
#: includes/common/widgets.php:
|
3466 |
msgid "Show reply author:"
|
3467 |
msgstr ""
|
3468 |
|
3469 |
-
#: includes/common/widgets.php:
|
3470 |
msgid "Recent Replies"
|
3471 |
msgstr ""
|
3472 |
|
3473 |
-
#: includes/core/capabilities.php:
|
3474 |
msgid "Editable forum roles no longer exist."
|
3475 |
msgstr ""
|
3476 |
|
3477 |
-
#: includes/core/update.php:
|
3478 |
msgid "General"
|
3479 |
msgstr ""
|
3480 |
|
3481 |
-
#: includes/core/update.php:
|
3482 |
msgid "General chit-chat"
|
3483 |
msgstr ""
|
3484 |
|
3485 |
-
#: includes/core/update.php:
|
3486 |
msgid "Hello World!"
|
3487 |
msgstr ""
|
3488 |
|
3489 |
-
#: includes/core/update.php:
|
3490 |
msgid "I am the first topic in your new forums."
|
3491 |
msgstr ""
|
3492 |
|
3493 |
-
#: includes/core/update.php:
|
3494 |
msgid "Oh, and this is what a reply looks like."
|
3495 |
msgstr ""
|
3496 |
|
@@ -3554,75 +3767,77 @@ msgstr ""
|
|
3554 |
msgid "No recorded history. Akismet has not checked this post."
|
3555 |
msgstr ""
|
3556 |
|
3557 |
-
#: includes/extend/buddypress/activity.php:
|
3558 |
msgid "New forum topic"
|
3559 |
msgstr ""
|
3560 |
|
3561 |
-
#: includes/extend/buddypress/activity.php:
|
3562 |
msgid "New forum reply"
|
3563 |
msgstr ""
|
3564 |
|
3565 |
-
#: includes/extend/buddypress/activity.php:
|
|
|
3566 |
msgid "%1$s started the topic %2$s in the forum %3$s"
|
3567 |
msgstr ""
|
3568 |
|
3569 |
-
#: includes/extend/buddypress/activity.php:
|
|
|
3570 |
msgid "%1$s replied to the topic %2$s in the forum %3$s"
|
3571 |
msgstr ""
|
3572 |
|
3573 |
-
#: includes/extend/buddypress/groups.php:
|
3574 |
-
#: includes/extend/buddypress/groups.php:
|
3575 |
msgid "Group Forum Settings"
|
3576 |
msgstr ""
|
3577 |
|
3578 |
-
#: includes/extend/buddypress/groups.php:
|
3579 |
-
#: includes/extend/buddypress/groups.php:
|
3580 |
msgid ""
|
3581 |
"Create a discussion forum to allow members of this group to communicate in "
|
3582 |
"a structured, bulletin-board style fashion."
|
3583 |
msgstr ""
|
3584 |
|
3585 |
-
#: includes/extend/buddypress/groups.php:
|
3586 |
-
#: includes/extend/buddypress/groups.php:
|
3587 |
msgid "Yes. I want this group to have a forum."
|
3588 |
msgstr ""
|
3589 |
|
3590 |
-
#: includes/extend/buddypress/groups.php:
|
3591 |
msgid "Saying no will not delete existing forum content."
|
3592 |
msgstr ""
|
3593 |
|
3594 |
-
#: includes/extend/buddypress/groups.php:
|
3595 |
msgid "Group Forum:"
|
3596 |
msgstr ""
|
3597 |
|
3598 |
-
#: includes/extend/buddypress/groups.php:
|
3599 |
msgid "Network administrators can reconfigure which forum belongs to this group."
|
3600 |
msgstr ""
|
3601 |
|
3602 |
-
#: includes/extend/buddypress/groups.php:
|
3603 |
msgid "Save Settings"
|
3604 |
msgstr ""
|
3605 |
|
3606 |
-
#: includes/extend/buddypress/groups.php:
|
3607 |
-
#: includes/extend/buddypress/groups.php:
|
3608 |
-
#: includes/extend/buddypress/notifications.php:
|
3609 |
-
#: includes/forums/functions.php:
|
3610 |
-
#: includes/replies/functions.php:
|
3611 |
-
#: includes/replies/functions.php:
|
3612 |
-
#: includes/topics/functions.php:
|
3613 |
-
#: includes/topics/functions.php:
|
3614 |
-
#: includes/topics/functions.php:
|
3615 |
-
#: includes/users/
|
3616 |
-
#: includes/users/
|
3617 |
-
#: includes/users/functions.php:
|
3618 |
msgid "<strong>ERROR</strong>: Are you sure you wanted to do that?"
|
3619 |
msgstr ""
|
3620 |
|
3621 |
-
#: includes/extend/buddypress/groups.php:
|
3622 |
msgid "Group Forum"
|
3623 |
msgstr ""
|
3624 |
|
3625 |
-
#: includes/extend/buddypress/groups.php:
|
3626 |
msgid "This group does not currently have a forum."
|
3627 |
msgstr ""
|
3628 |
|
@@ -3630,292 +3845,317 @@ msgstr ""
|
|
3630 |
msgid "Search Forums..."
|
3631 |
msgstr ""
|
3632 |
|
3633 |
-
#: includes/extend/buddypress/loader.php:
|
3634 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
3635 |
msgid "Subscribed Topics"
|
3636 |
msgstr ""
|
3637 |
|
3638 |
-
#: includes/extend/buddypress/notifications.php:
|
3639 |
-
msgid "Topic Replies"
|
3640 |
-
msgstr ""
|
3641 |
-
|
3642 |
-
#: includes/extend/buddypress/notifications.php:72
|
3643 |
msgid "You have %d new replies"
|
3644 |
msgstr ""
|
3645 |
|
3646 |
-
#: includes/extend/buddypress/notifications.php:
|
3647 |
msgid "You have %d new reply to %2$s from %3$s"
|
3648 |
msgstr ""
|
3649 |
|
3650 |
-
#: includes/extend/buddypress/notifications.php:
|
3651 |
msgid "You have %d new reply to %s"
|
3652 |
msgstr ""
|
3653 |
|
3654 |
-
#: includes/extend/buddypress/notifications.php:
|
|
|
|
|
|
|
|
|
3655 |
msgid ""
|
3656 |
"<strong>ERROR</strong>: You do not have permission to mark notifications "
|
3657 |
"for that user."
|
3658 |
msgstr ""
|
3659 |
|
3660 |
-
#: includes/forums/functions.php:
|
3661 |
msgid "<strong>ERROR</strong>: You do not have permission to create new forums."
|
3662 |
msgstr ""
|
3663 |
|
3664 |
-
#: includes/forums/functions.php:
|
3665 |
msgid "<strong>ERROR</strong>: Your forum needs a title."
|
3666 |
msgstr ""
|
3667 |
|
3668 |
-
#: includes/forums/functions.php:
|
3669 |
msgid "<strong>ERROR</strong>: Your forum description cannot be empty."
|
3670 |
msgstr ""
|
3671 |
|
3672 |
-
#: includes/forums/functions.php:
|
3673 |
msgid "<strong>ERROR</strong>: Your forum must have a parent."
|
3674 |
msgstr ""
|
3675 |
|
3676 |
-
#: includes/forums/functions.php:
|
3677 |
msgid ""
|
3678 |
"<strong>ERROR</strong>: This forum is a category. No forums can be created "
|
3679 |
"in this forum."
|
3680 |
msgstr ""
|
3681 |
|
3682 |
-
#: includes/forums/functions.php:
|
3683 |
msgid "<strong>ERROR</strong>: This forum has been closed to new forums."
|
3684 |
msgstr ""
|
3685 |
|
3686 |
-
#: includes/forums/functions.php:
|
3687 |
msgid ""
|
3688 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
3689 |
"capability to read or create new forums in it."
|
3690 |
msgstr ""
|
3691 |
|
3692 |
-
#: includes/forums/functions.php:
|
3693 |
msgid ""
|
3694 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
3695 |
"capability to read or create new forums in it."
|
3696 |
msgstr ""
|
3697 |
|
3698 |
-
#: includes/forums/functions.php:
|
3699 |
-
#: includes/topics/functions.php:
|
3700 |
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
3701 |
msgstr ""
|
3702 |
|
3703 |
-
#: includes/forums/functions.php:
|
3704 |
msgid "<strong>ERROR</strong>: This forum already exists."
|
3705 |
msgstr ""
|
3706 |
|
3707 |
-
#: includes/forums/functions.php:
|
3708 |
msgid "<strong>ERROR</strong>: Your forum cannot be created at this time."
|
3709 |
msgstr ""
|
3710 |
|
3711 |
-
#: includes/forums/functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3712 |
msgid "<strong>ERROR</strong>: Forum ID not found."
|
3713 |
msgstr ""
|
3714 |
|
3715 |
-
#: includes/forums/functions.php:
|
3716 |
msgid "<strong>ERROR</strong>: The forum you want to edit was not found."
|
3717 |
msgstr ""
|
3718 |
|
3719 |
-
#: includes/forums/functions.php:
|
3720 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that forum."
|
3721 |
msgstr ""
|
3722 |
|
3723 |
-
#: includes/forums/functions.php:
|
3724 |
msgid "<strong>ERROR</strong>: Your forum cannot be edited at this time."
|
3725 |
msgstr ""
|
3726 |
|
3727 |
-
#: includes/forums/template.php:
|
3728 |
-
#: includes/topics/template.php:
|
3729 |
msgid "Add New"
|
3730 |
msgstr ""
|
3731 |
|
3732 |
-
#: includes/forums/template.php:
|
3733 |
msgid "Create New Forum"
|
3734 |
msgstr ""
|
3735 |
|
3736 |
-
#: includes/forums/template.php:
|
3737 |
msgid "Edit Forum"
|
3738 |
msgstr ""
|
3739 |
|
3740 |
-
#: includes/forums/template.php:
|
3741 |
msgid "New Forum"
|
3742 |
msgstr ""
|
3743 |
|
3744 |
-
#: includes/forums/template.php:
|
3745 |
msgid "View Forum"
|
3746 |
msgstr ""
|
3747 |
|
3748 |
-
#: includes/forums/template.php:
|
3749 |
msgid "View Forums"
|
3750 |
msgstr ""
|
3751 |
|
3752 |
-
#: includes/forums/template.php:
|
3753 |
msgid "No forums found"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
-
#: includes/forums/template.php:
|
3757 |
msgid "No forums found in Trash"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
-
#: includes/forums/template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3761 |
msgid "Parent Forum:"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
-
#: includes/forums/template.php:
|
3765 |
-
#: includes/users/template.php:
|
3766 |
msgid "Subscribe"
|
3767 |
msgstr ""
|
3768 |
|
3769 |
-
#: includes/forums/template.php:
|
3770 |
-
#: includes/users/template.php:
|
3771 |
msgid "Unsubscribe"
|
3772 |
msgstr ""
|
3773 |
|
3774 |
-
#: includes/forums/template.php:
|
3775 |
msgid "%s topic"
|
3776 |
msgid_plural "%s topics"
|
3777 |
msgstr[0] ""
|
3778 |
msgstr[1] ""
|
3779 |
|
3780 |
-
#: includes/forums/template.php:
|
3781 |
-
msgid "(
|
3782 |
-
msgid_plural "(
|
3783 |
msgstr[0] ""
|
3784 |
msgstr[1] ""
|
3785 |
|
3786 |
-
#: includes/forums/template.php:
|
3787 |
msgid "%s reply"
|
3788 |
msgid_plural "%s replies"
|
3789 |
msgstr[0] ""
|
3790 |
msgstr[1] ""
|
3791 |
|
3792 |
-
#: includes/forums/template.php:
|
3793 |
msgid "This category contains %1$s and %2$s, and was last updated by %3$s %4$s."
|
3794 |
msgstr ""
|
3795 |
|
3796 |
-
#: includes/forums/template.php:
|
3797 |
msgid "This forum contains %1$s and %2$s, and was last updated by %3$s %4$s."
|
3798 |
msgstr ""
|
3799 |
|
3800 |
-
#: includes/forums/template.php:
|
3801 |
msgid "This category contains %1$s, and was last updated by %2$s %3$s."
|
3802 |
msgstr ""
|
3803 |
|
3804 |
-
#: includes/forums/template.php:
|
3805 |
msgid "This forum contains %1$s, and was last updated by %2$s %3$s."
|
3806 |
msgstr ""
|
3807 |
|
3808 |
-
#: includes/forums/template.php:
|
3809 |
msgid "This category contains %1$s and %2$s."
|
3810 |
msgstr ""
|
3811 |
|
3812 |
-
#: includes/forums/template.php:
|
3813 |
msgid "This forum contains %1$s and %2$s."
|
3814 |
msgstr ""
|
3815 |
|
3816 |
-
#: includes/forums/template.php:
|
3817 |
msgid "This category contains %1$s."
|
3818 |
msgstr ""
|
3819 |
|
3820 |
-
#: includes/forums/template.php:
|
3821 |
msgid "This forum contains %1$s."
|
3822 |
msgstr ""
|
3823 |
|
3824 |
-
#: includes/forums/template.php:
|
3825 |
msgid "This forum is empty."
|
3826 |
msgstr ""
|
3827 |
|
3828 |
-
#: includes/replies/functions.php:
|
3829 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
3830 |
msgstr ""
|
3831 |
|
3832 |
-
#: includes/replies/functions.php:
|
3833 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
3834 |
msgstr ""
|
3835 |
|
3836 |
-
#: includes/replies/functions.php:
|
3837 |
msgid "<strong>ERROR</strong>: Topic ID must be a number."
|
3838 |
msgstr ""
|
3839 |
|
3840 |
-
#: includes/replies/functions.php:
|
3841 |
msgid "<strong>ERROR</strong>: Topic ID cannot be a negative number."
|
3842 |
msgstr ""
|
3843 |
|
3844 |
-
#: includes/replies/functions.php:
|
3845 |
msgid "<strong>ERROR</strong>: Topic does not exist."
|
3846 |
msgstr ""
|
3847 |
|
3848 |
-
#: includes/replies/functions.php:
|
3849 |
-
#: includes/topics/functions.php:
|
3850 |
-
#: includes/topics/functions.php:
|
3851 |
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
3852 |
msgstr ""
|
3853 |
|
3854 |
-
#: includes/replies/functions.php:
|
3855 |
msgid "<strong>ERROR</strong>: Forum ID must be a number."
|
3856 |
msgstr ""
|
3857 |
|
3858 |
-
#: includes/replies/functions.php:
|
3859 |
msgid "<strong>ERROR</strong>: Forum ID cannot be a negative number."
|
3860 |
msgstr ""
|
3861 |
|
3862 |
-
#: includes/replies/functions.php:
|
3863 |
msgid "<strong>ERROR</strong>: Forum does not exist."
|
3864 |
msgstr ""
|
3865 |
|
3866 |
-
#: includes/replies/functions.php:
|
3867 |
msgid ""
|
3868 |
"<strong>ERROR</strong>: This forum is a category. No replies can be created "
|
3869 |
"in this forum."
|
3870 |
msgstr ""
|
3871 |
|
3872 |
-
#: includes/replies/functions.php:
|
3873 |
msgid "<strong>ERROR</strong>: This forum has been closed to new replies."
|
3874 |
msgstr ""
|
3875 |
|
3876 |
-
#: includes/replies/functions.php:
|
3877 |
msgid ""
|
3878 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
3879 |
"capability to read or create new replies in it."
|
3880 |
msgstr ""
|
3881 |
|
3882 |
-
#: includes/replies/functions.php:286 includes/replies/functions.php:
|
3883 |
msgid ""
|
3884 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
3885 |
"capability to read or create new replies in it."
|
3886 |
msgstr ""
|
3887 |
|
3888 |
-
#: includes/replies/functions.php:
|
3889 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
3890 |
msgstr ""
|
3891 |
|
3892 |
-
#: includes/replies/functions.php:
|
3893 |
msgid ""
|
3894 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
3895 |
"you’ve already said that."
|
3896 |
msgstr ""
|
3897 |
|
3898 |
-
#: includes/replies/functions.php:
|
3899 |
msgid "<strong>ERROR</strong>: Your reply cannot be created at this time."
|
3900 |
msgstr ""
|
3901 |
|
3902 |
-
#: includes/replies/functions.php:
|
3903 |
msgid "<strong>ERROR</strong>: Topic is closed."
|
3904 |
msgstr ""
|
3905 |
|
3906 |
-
#: includes/replies/functions.php:
|
3907 |
msgid "<strong>ERROR</strong>: There was a problem adding the tags to the topic."
|
3908 |
msgstr ""
|
3909 |
|
3910 |
-
#: includes/replies/functions.php:
|
|
|
|
|
|
|
|
|
3911 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
3912 |
msgstr ""
|
3913 |
|
3914 |
-
#: includes/replies/functions.php:
|
3915 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
3916 |
msgstr ""
|
3917 |
|
3918 |
-
#: includes/replies/functions.php:
|
3919 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
3920 |
msgstr ""
|
3921 |
|
@@ -3923,213 +4163,220 @@ msgstr ""
|
|
3923 |
msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
|
3924 |
msgstr ""
|
3925 |
|
3926 |
-
#: includes/replies/functions.php:
|
3927 |
msgid "<strong>ERROR</strong>: A reply ID is required"
|
3928 |
msgstr ""
|
3929 |
|
3930 |
-
#: includes/replies/functions.php:
|
3931 |
msgid "<strong>ERROR</strong>: The reply you want to move was not found."
|
3932 |
msgstr ""
|
3933 |
|
3934 |
-
#: includes/replies/functions.php:
|
3935 |
msgid "<strong>ERROR</strong>: The topic you want to move from was not found."
|
3936 |
msgstr ""
|
3937 |
|
3938 |
-
#: includes/replies/functions.php:
|
3939 |
-
#: includes/topics/functions.php:
|
3940 |
msgid "<strong>ERROR</strong>: You do not have permission to edit the source topic."
|
3941 |
msgstr ""
|
3942 |
|
3943 |
-
#: includes/replies/functions.php:
|
3944 |
msgid "<strong>ERROR</strong>: You need to choose a valid move option."
|
3945 |
msgstr ""
|
3946 |
|
3947 |
-
#: includes/replies/functions.php:
|
3948 |
msgid "<strong>ERROR</strong>: A topic ID is required."
|
3949 |
msgstr ""
|
3950 |
|
3951 |
-
#: includes/replies/functions.php:
|
3952 |
msgid "<strong>ERROR</strong>: The topic you want to move to was not found."
|
3953 |
msgstr ""
|
3954 |
|
3955 |
-
#: includes/replies/functions.php:
|
3956 |
-
#: includes/topics/functions.php:
|
3957 |
msgid ""
|
3958 |
"<strong>ERROR</strong>: You do not have permission to edit the destination "
|
3959 |
"topic."
|
3960 |
msgstr ""
|
3961 |
|
3962 |
-
#: includes/replies/functions.php:
|
3963 |
msgid ""
|
3964 |
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
3965 |
"topic. Please try again."
|
3966 |
msgstr ""
|
3967 |
|
3968 |
-
#: includes/replies/functions.php:
|
3969 |
msgid ""
|
3970 |
"<strong>ERROR</strong>: You do not have permission to create new topics. "
|
3971 |
"The reply could not be converted into a topic."
|
3972 |
msgstr ""
|
3973 |
|
3974 |
-
#: includes/replies/functions.php:
|
3975 |
msgid "<strong>ERROR:</strong> This reply could not be found or no longer exists."
|
3976 |
msgstr ""
|
3977 |
|
3978 |
-
#: includes/replies/functions.php:
|
3979 |
msgid "<strong>ERROR:</strong> You do not have permission to do that."
|
3980 |
msgstr ""
|
3981 |
|
3982 |
-
#: includes/replies/functions.php:
|
3983 |
msgid "<strong>ERROR</strong>: There was a problem approving the reply."
|
3984 |
msgstr ""
|
3985 |
|
3986 |
-
#: includes/replies/functions.php:
|
3987 |
msgid "<strong>ERROR</strong>: There was a problem unapproving the reply."
|
3988 |
msgstr ""
|
3989 |
|
3990 |
-
#: includes/replies/functions.php:
|
3991 |
msgid "<strong>ERROR</strong>: There was a problem unmarking the reply as spam."
|
3992 |
msgstr ""
|
3993 |
|
3994 |
-
#: includes/replies/functions.php:
|
3995 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam."
|
3996 |
msgstr ""
|
3997 |
|
3998 |
-
#: includes/replies/functions.php:
|
3999 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply."
|
4000 |
msgstr ""
|
4001 |
|
4002 |
-
#: includes/replies/functions.php:
|
4003 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply."
|
4004 |
msgstr ""
|
4005 |
|
4006 |
-
#: includes/replies/functions.php:
|
4007 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply."
|
4008 |
msgstr ""
|
4009 |
|
4010 |
-
#: includes/replies/functions.php:
|
4011 |
msgid "All Posts"
|
4012 |
msgstr ""
|
4013 |
|
4014 |
-
#: includes/replies/functions.php:
|
4015 |
msgid "Replies: %s"
|
4016 |
msgstr ""
|
4017 |
|
4018 |
-
#: includes/replies/template.php:
|
4019 |
msgid "Create New Reply"
|
4020 |
msgstr ""
|
4021 |
|
4022 |
-
#: includes/replies/template.php:
|
4023 |
msgid "Edit Reply"
|
4024 |
msgstr ""
|
4025 |
|
4026 |
-
#: includes/replies/template.php:
|
4027 |
msgid "New Reply"
|
4028 |
msgstr ""
|
4029 |
|
4030 |
-
#: includes/replies/template.php:
|
4031 |
msgid "View Reply"
|
4032 |
msgstr ""
|
4033 |
|
4034 |
-
#: includes/replies/template.php:
|
4035 |
msgid "View Replies"
|
4036 |
msgstr ""
|
4037 |
|
4038 |
-
#: includes/replies/template.php:
|
4039 |
msgid "Search Replies"
|
4040 |
msgstr ""
|
4041 |
|
4042 |
-
#: includes/replies/template.php:
|
4043 |
msgid "No replies found"
|
4044 |
msgstr ""
|
4045 |
|
4046 |
-
#: includes/replies/template.php:
|
4047 |
msgid "No replies found in Trash"
|
4048 |
msgstr ""
|
4049 |
|
4050 |
-
#: includes/replies/template.php:
|
4051 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4052 |
msgid "Reply To: %s"
|
4053 |
msgstr ""
|
4054 |
|
4055 |
-
#: includes/replies/template.php:
|
4056 |
msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
|
4057 |
msgstr ""
|
4058 |
|
4059 |
-
#: includes/replies/template.php:
|
4060 |
msgid "This reply was modified %1$s by %2$s."
|
4061 |
msgstr ""
|
4062 |
|
4063 |
-
#: includes/replies/template.php:
|
4064 |
-
#: includes/users/template.php:
|
4065 |
-
msgid "Anonymous"
|
4066 |
-
msgstr ""
|
4067 |
-
|
4068 |
-
#: includes/replies/template.php:1259 includes/topics/template.php:1557
|
4069 |
-
#: includes/users/template.php:1714
|
4070 |
msgid "View %s's profile"
|
4071 |
msgstr ""
|
4072 |
|
4073 |
-
#: includes/replies/template.php:
|
4074 |
-
#: includes/users/template.php:
|
4075 |
msgid "Visit %s's website"
|
4076 |
msgstr ""
|
4077 |
|
4078 |
-
#: includes/replies/template.php:
|
4079 |
msgid "Cancel"
|
4080 |
msgstr ""
|
4081 |
|
4082 |
-
#: includes/replies/template.php:
|
4083 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4084 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4085 |
msgid "Delete"
|
4086 |
msgstr ""
|
4087 |
|
4088 |
-
#: includes/replies/template.php:
|
4089 |
msgid "Are you sure you want to delete that permanently?"
|
4090 |
msgstr ""
|
4091 |
|
4092 |
-
#: includes/replies/template.php:
|
4093 |
msgid "Move"
|
4094 |
msgstr ""
|
4095 |
|
4096 |
-
#: includes/replies/template.php:
|
4097 |
msgid "Move this reply"
|
4098 |
msgstr ""
|
4099 |
|
4100 |
-
#: includes/replies/template.php:
|
4101 |
msgid "Split"
|
4102 |
msgstr ""
|
4103 |
|
4104 |
-
#: includes/replies/template.php:
|
4105 |
msgid "Split the topic from this reply"
|
4106 |
msgstr ""
|
4107 |
|
4108 |
-
#: includes/replies/template.php:
|
4109 |
msgid "Viewing %1$s reply thread"
|
4110 |
msgid_plural "Viewing %1$s reply threads"
|
4111 |
msgstr[0] ""
|
4112 |
msgstr[1] ""
|
4113 |
|
4114 |
-
#: includes/replies/template.php:
|
4115 |
msgid "Viewing %1$s reply"
|
4116 |
msgid_plural "Viewing %1$s replies"
|
4117 |
msgstr[0] ""
|
4118 |
msgstr[1] ""
|
4119 |
|
4120 |
-
#: includes/replies/template.php:
|
4121 |
msgid "Viewing %2$s replies (of %4$s total)"
|
4122 |
msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
|
4123 |
msgstr[0] ""
|
4124 |
msgstr[1] ""
|
4125 |
|
4126 |
-
#: includes/replies/template.php:
|
4127 |
msgid "Viewing %1$s post"
|
4128 |
msgid_plural "Viewing %1$s posts"
|
4129 |
msgstr[0] ""
|
4130 |
msgstr[1] ""
|
4131 |
|
4132 |
-
#: includes/replies/template.php:
|
4133 |
msgid "Viewing %2$s post (of %4$s total)"
|
4134 |
msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
|
4135 |
msgstr[0] ""
|
@@ -4139,409 +4386,441 @@ msgstr[1] ""
|
|
4139 |
msgid "Search Results for '%s'"
|
4140 |
msgstr ""
|
4141 |
|
4142 |
-
#: includes/search/template.php:
|
4143 |
msgid "Viewing %1$s result"
|
4144 |
msgid_plural "Viewing %1$s results"
|
4145 |
msgstr[0] ""
|
4146 |
msgstr[1] ""
|
4147 |
|
4148 |
-
#: includes/search/template.php:
|
4149 |
msgid "Viewing %2$s results (of %4$s total)"
|
4150 |
msgid_plural "Viewing %1$s results - %2$s through %3$s (of %4$s total)"
|
4151 |
msgstr[0] ""
|
4152 |
msgstr[1] ""
|
4153 |
|
4154 |
-
#: includes/topics/functions.php:
|
4155 |
msgid "<strong>ERROR</strong>: You do not have permission to create new topics."
|
4156 |
msgstr ""
|
4157 |
|
4158 |
-
#: includes/topics/functions.php:
|
4159 |
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
4160 |
msgstr ""
|
4161 |
|
4162 |
-
#: includes/topics/functions.php:
|
4163 |
msgid "<strong>ERROR</strong>: Your topic cannot be empty."
|
4164 |
msgstr ""
|
4165 |
|
4166 |
-
#: includes/topics/functions.php:
|
4167 |
msgid ""
|
4168 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
4169 |
"in this forum."
|
4170 |
msgstr ""
|
4171 |
|
4172 |
-
#: includes/topics/functions.php:
|
4173 |
msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
|
4174 |
msgstr ""
|
4175 |
|
4176 |
-
#: includes/topics/functions.php:
|
4177 |
msgid ""
|
4178 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
4179 |
"capability to read or create new topics in it."
|
4180 |
msgstr ""
|
4181 |
|
4182 |
-
#: includes/topics/functions.php:270 includes/topics/functions.php:
|
4183 |
msgid ""
|
4184 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
4185 |
"capability to read or create new topics in it."
|
4186 |
msgstr ""
|
4187 |
|
4188 |
-
#: includes/topics/functions.php:
|
4189 |
msgid ""
|
4190 |
"<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
|
4191 |
"you’ve already said that."
|
4192 |
msgstr ""
|
4193 |
|
4194 |
-
#: includes/topics/functions.php:
|
4195 |
msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
|
4196 |
msgstr ""
|
4197 |
|
4198 |
-
#: includes/topics/functions.php:
|
|
|
|
|
|
|
|
|
4199 |
msgid "<strong>ERROR</strong>: Topic ID not found."
|
4200 |
msgstr ""
|
4201 |
|
4202 |
-
#: includes/topics/functions.php:
|
4203 |
msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
|
4204 |
msgstr ""
|
4205 |
|
4206 |
-
#: includes/topics/functions.php:
|
4207 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
|
4208 |
msgstr ""
|
4209 |
|
4210 |
-
#: includes/topics/functions.php:
|
4211 |
msgid ""
|
4212 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
4213 |
"in it."
|
4214 |
msgstr ""
|
4215 |
|
4216 |
-
#: includes/topics/functions.php:
|
4217 |
msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
|
4218 |
msgstr ""
|
4219 |
|
4220 |
-
#: includes/topics/functions.php:
|
4221 |
msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
|
4222 |
msgstr ""
|
4223 |
|
4224 |
-
#: includes/topics/functions.php:
|
4225 |
msgid "<strong>ERROR</strong>: Destination topic ID not found."
|
4226 |
msgstr ""
|
4227 |
|
4228 |
-
#: includes/topics/functions.php:
|
4229 |
msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
|
4230 |
msgstr ""
|
4231 |
|
4232 |
-
#: includes/topics/functions.php:
|
4233 |
msgid "<strong>ERROR</strong>: A reply ID is required."
|
4234 |
msgstr ""
|
4235 |
|
4236 |
-
#: includes/topics/functions.php:
|
4237 |
msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
|
4238 |
msgstr ""
|
4239 |
|
4240 |
-
#: includes/topics/functions.php:
|
4241 |
msgid "<strong>ERROR</strong>: The topic you want to split was not found."
|
4242 |
msgstr ""
|
4243 |
|
4244 |
-
#: includes/topics/functions.php:
|
4245 |
msgid "<strong>ERROR</strong>: You need to choose a valid split option."
|
4246 |
msgstr ""
|
4247 |
|
4248 |
-
#: includes/topics/functions.php:
|
4249 |
msgid "<strong>ERROR</strong>: The topic you want to split to was not found."
|
4250 |
msgstr ""
|
4251 |
|
4252 |
-
#: includes/topics/functions.php:
|
4253 |
msgid ""
|
4254 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4255 |
"getting the tag: %s"
|
4256 |
msgstr ""
|
4257 |
|
4258 |
-
#: includes/topics/functions.php:
|
4259 |
msgid "<strong>ERROR</strong>: You do not have permission to edit the topic tags."
|
4260 |
msgstr ""
|
4261 |
|
4262 |
-
#: includes/topics/functions.php:
|
4263 |
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
4264 |
msgstr ""
|
4265 |
|
4266 |
-
#: includes/topics/functions.php:
|
4267 |
msgid ""
|
4268 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4269 |
"updating the tag: %s"
|
4270 |
msgstr ""
|
4271 |
|
4272 |
-
#: includes/topics/functions.php:
|
4273 |
msgid ""
|
4274 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4275 |
"merging the tags: %s"
|
4276 |
msgstr ""
|
4277 |
|
4278 |
-
#: includes/topics/functions.php:
|
4279 |
msgid "<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
4280 |
msgstr ""
|
4281 |
|
4282 |
-
#: includes/topics/functions.php:
|
4283 |
msgid "<strong>ERROR</strong>: You do not have permission to delete the topic tags."
|
4284 |
msgstr ""
|
4285 |
|
4286 |
-
#: includes/topics/functions.php:
|
4287 |
msgid ""
|
4288 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4289 |
"deleting the tag: %s"
|
4290 |
msgstr ""
|
4291 |
|
4292 |
-
#: includes/topics/functions.php:
|
4293 |
msgid "<strong>ERROR:</strong> This topic could not be found or no longer exists."
|
4294 |
msgstr ""
|
4295 |
|
4296 |
-
#: includes/topics/functions.php:
|
4297 |
msgid "<strong>ERROR</strong>: There was a problem approving the topic."
|
4298 |
msgstr ""
|
4299 |
|
4300 |
-
#: includes/topics/functions.php:
|
4301 |
msgid "<strong>ERROR</strong>: There was a problem unapproving the topic."
|
4302 |
msgstr ""
|
4303 |
|
4304 |
-
#: includes/topics/functions.php:
|
4305 |
msgid "<strong>ERROR</strong>: There was a problem closing the topic."
|
4306 |
msgstr ""
|
4307 |
|
4308 |
-
#: includes/topics/functions.php:
|
4309 |
msgid "<strong>ERROR</strong>: There was a problem opening the topic."
|
4310 |
msgstr ""
|
4311 |
|
4312 |
-
#: includes/topics/functions.php:
|
4313 |
msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
|
4314 |
msgstr ""
|
4315 |
|
4316 |
-
#: includes/topics/functions.php:
|
4317 |
msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
|
4318 |
msgstr ""
|
4319 |
|
4320 |
-
#: includes/topics/functions.php:
|
4321 |
msgid "<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
4322 |
msgstr ""
|
4323 |
|
4324 |
-
#: includes/topics/functions.php:
|
4325 |
msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
|
4326 |
msgstr ""
|
4327 |
|
4328 |
-
#: includes/topics/functions.php:
|
4329 |
msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
|
4330 |
msgstr ""
|
4331 |
|
4332 |
-
#: includes/topics/functions.php:
|
4333 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
|
4334 |
msgstr ""
|
4335 |
|
4336 |
-
#: includes/topics/functions.php:
|
4337 |
msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
|
4338 |
msgstr ""
|
4339 |
|
4340 |
-
#: includes/topics/template.php:
|
4341 |
msgid "Create New Topic"
|
4342 |
msgstr ""
|
4343 |
|
4344 |
-
#: includes/topics/template.php:
|
4345 |
msgid "Edit Topic"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
-
#: includes/topics/template.php:
|
4349 |
msgid "New Topic"
|
4350 |
msgstr ""
|
4351 |
|
4352 |
-
#: includes/topics/template.php:
|
4353 |
msgid "View Topic"
|
4354 |
msgstr ""
|
4355 |
|
4356 |
-
#: includes/topics/template.php:
|
4357 |
msgid "View Topics"
|
4358 |
msgstr ""
|
4359 |
|
4360 |
-
#: includes/topics/template.php:
|
4361 |
msgid "Search Topics"
|
4362 |
msgstr ""
|
4363 |
|
4364 |
-
#: includes/topics/template.php:
|
4365 |
msgid "No topics found"
|
4366 |
msgstr ""
|
4367 |
|
4368 |
-
#: includes/topics/template.php:
|
4369 |
msgid "No topics found in Trash"
|
4370 |
msgstr ""
|
4371 |
|
4372 |
-
#: includes/topics/template.php:
|
4373 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4374 |
msgstr ""
|
4375 |
|
4376 |
#: includes/topics/template.php:1011
|
|
|
|
|
|
|
|
|
4377 |
msgid "This topic was modified %1$s by %2$s."
|
4378 |
msgstr ""
|
4379 |
|
4380 |
-
#: includes/topics/template.php:
|
4381 |
msgid "Favorite"
|
4382 |
msgstr ""
|
4383 |
|
4384 |
-
#: includes/topics/template.php:
|
4385 |
msgid "Unfavorite"
|
4386 |
msgstr ""
|
4387 |
|
4388 |
-
#: includes/topics/template.php:
|
4389 |
msgid "Tagged:"
|
4390 |
msgstr ""
|
4391 |
|
4392 |
-
#: includes/topics/template.php:
|
4393 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4394 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4395 |
msgid "Merge"
|
4396 |
msgstr ""
|
4397 |
|
4398 |
-
#: includes/topics/template.php:
|
4399 |
msgid "Viewing %1$s topic"
|
4400 |
msgid_plural "Viewing %1$s topics"
|
4401 |
msgstr[0] ""
|
4402 |
msgstr[1] ""
|
4403 |
|
4404 |
-
#: includes/topics/template.php:
|
4405 |
msgid "Viewing topic %2$s (of %4$s total)"
|
4406 |
msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
4407 |
msgstr[0] ""
|
4408 |
msgstr[1] ""
|
4409 |
|
4410 |
-
#: includes/topics/template.php:
|
4411 |
msgid "This topic is marked as spam."
|
4412 |
msgstr ""
|
4413 |
|
4414 |
-
#: includes/topics/template.php:
|
4415 |
msgid "This topic is in the trash."
|
4416 |
msgstr ""
|
4417 |
|
4418 |
-
#: includes/topics/template.php:
|
4419 |
msgid "%s voice"
|
4420 |
msgid_plural "%s voices"
|
4421 |
msgstr[0] ""
|
4422 |
msgstr[1] ""
|
4423 |
|
4424 |
-
#: includes/topics/template.php:
|
4425 |
msgid "This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s."
|
4426 |
msgstr ""
|
4427 |
|
4428 |
-
#: includes/topics/template.php:
|
4429 |
msgid "This topic contains %1$s and has %2$s."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
-
#: includes/topics/template.php:
|
4433 |
msgid "This topic has no replies."
|
4434 |
msgstr ""
|
4435 |
|
4436 |
-
#: includes/topics/template.php:
|
4437 |
msgid "Search Tags"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
-
#: includes/topics/template.php:
|
4441 |
msgid "Popular Tags"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
-
#: includes/topics/template.php:
|
4445 |
msgid "All Tags"
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#: includes/topics/template.php:
|
4449 |
msgid "Edit Tag"
|
4450 |
msgstr ""
|
4451 |
|
4452 |
-
#: includes/topics/template.php:
|
4453 |
msgid "Update Tag"
|
4454 |
msgstr ""
|
4455 |
|
4456 |
-
#: includes/topics/template.php:
|
4457 |
msgid "Add New Tag"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
-
#: includes/topics/template.php:
|
4461 |
msgid "New Tag Name"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
-
#: includes/topics/template.php:
|
4465 |
msgid "View Topic Tag"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
-
#: includes/topics/template.php:
|
4469 |
msgid "View Topic Tags"
|
4470 |
msgstr ""
|
4471 |
|
4472 |
-
#: includes/topics/template.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4473 |
msgid "Separate topic tags with commas"
|
4474 |
msgstr ""
|
4475 |
|
4476 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4477 |
msgid ""
|
4478 |
"<strong>ERROR</strong>: No topic was found. Which topic are you "
|
4479 |
"marking/unmarking as favorite?"
|
4480 |
msgstr ""
|
4481 |
|
4482 |
-
#: includes/users/
|
4483 |
msgid ""
|
4484 |
"<strong>ERROR</strong>: You do not have permission to edit favorites for "
|
4485 |
"that user!."
|
4486 |
msgstr ""
|
4487 |
|
4488 |
-
#: includes/users/
|
4489 |
msgid ""
|
4490 |
"<strong>ERROR</strong>: There was a problem removing that topic from "
|
4491 |
"favorites."
|
4492 |
msgstr ""
|
4493 |
|
4494 |
-
#: includes/users/
|
4495 |
msgid "<strong>ERROR</strong>: There was a problem favoriting that topic."
|
4496 |
msgstr ""
|
4497 |
|
4498 |
-
#: includes/users/
|
4499 |
msgid ""
|
4500 |
"<strong>ERROR</strong>: No forum was found. Which forum are you "
|
4501 |
"subscribing/unsubscribing to?"
|
4502 |
msgstr ""
|
4503 |
|
4504 |
-
#: includes/users/
|
4505 |
msgid ""
|
4506 |
"<strong>ERROR</strong>: You do not have permission to edit favorites of "
|
4507 |
"that user."
|
4508 |
msgstr ""
|
4509 |
|
4510 |
-
#: includes/users/
|
4511 |
msgid "<strong>ERROR</strong>: There was a problem unsubscribing from that forum."
|
4512 |
msgstr ""
|
4513 |
|
4514 |
-
#: includes/users/
|
4515 |
msgid "<strong>ERROR</strong>: There was a problem subscribing to that forum."
|
4516 |
msgstr ""
|
4517 |
|
4518 |
-
#: includes/users/
|
4519 |
msgid ""
|
4520 |
"<strong>ERROR</strong>: No topic was found. Which topic are you "
|
4521 |
"subscribing/unsubscribing to?"
|
4522 |
msgstr ""
|
4523 |
|
4524 |
-
#: includes/users/
|
4525 |
msgid "<strong>ERROR</strong>: There was a problem unsubscribing from that topic."
|
4526 |
msgstr ""
|
4527 |
|
4528 |
-
#: includes/users/
|
4529 |
msgid "<strong>ERROR</strong>: There was a problem subscribing to that topic."
|
4530 |
msgstr ""
|
4531 |
|
4532 |
-
#: includes/users/functions.php:
|
4533 |
msgid "<strong>ERROR</strong>: That is not a valid email address."
|
4534 |
msgstr ""
|
4535 |
|
4536 |
-
#: includes/users/functions.php:
|
4537 |
msgid "<strong>ERROR</strong>: That email address is already in use."
|
4538 |
msgstr ""
|
4539 |
|
4540 |
-
#: includes/users/functions.php:
|
4541 |
msgid "<strong>ERROR</strong>: An error occurred while updating your email address."
|
4542 |
msgstr ""
|
4543 |
|
4544 |
-
#: includes/users/functions.php:
|
4545 |
msgid ""
|
4546 |
"%1$s\n"
|
4547 |
"\n"
|
@@ -4560,765 +4839,794 @@ msgid ""
|
|
4560 |
"%5$s"
|
4561 |
msgstr ""
|
4562 |
|
4563 |
-
#: includes/users/functions.php:
|
4564 |
msgid "[%s] New Email Address"
|
4565 |
msgstr ""
|
4566 |
|
4567 |
-
#: includes/users/template.php:
|
4568 |
msgid "Guest"
|
4569 |
msgstr ""
|
4570 |
|
4571 |
-
#: includes/users/template.php:
|
4572 |
msgid "Inactive"
|
4573 |
msgstr ""
|
4574 |
|
4575 |
-
#: includes/users/template.php:
|
4576 |
msgid "Member"
|
4577 |
msgstr ""
|
4578 |
|
4579 |
-
#: includes/users/template.php:
|
4580 |
msgid "Admin"
|
4581 |
msgstr ""
|
4582 |
|
4583 |
-
#: includes/users/template.php:
|
4584 |
msgid "User updated."
|
4585 |
msgstr ""
|
4586 |
|
4587 |
-
#: includes/users/template.php:
|
4588 |
msgid "There is a pending email address change to %1$s. %2$s"
|
4589 |
msgstr ""
|
4590 |
|
4591 |
-
#: includes/users/template.php:
|
4592 |
msgid "You have super admin privileges."
|
4593 |
msgstr ""
|
4594 |
|
4595 |
-
#: includes/users/template.php:
|
4596 |
msgid "This user has super admin privileges."
|
4597 |
msgstr ""
|
4598 |
|
4599 |
-
#: includes/users/template.php:
|
4600 |
msgid "— No role for this site —"
|
4601 |
msgstr ""
|
4602 |
|
4603 |
-
#: includes/users/template.php:
|
4604 |
msgid "You are now logged out."
|
4605 |
msgstr ""
|
4606 |
|
4607 |
-
#: includes/users/template.php:
|
4608 |
msgid "New user registration is currently not allowed."
|
4609 |
msgstr ""
|
4610 |
|
4611 |
-
#: includes/users/template.php:
|
4612 |
msgid "Check your e-mail for the confirmation link."
|
4613 |
msgstr ""
|
4614 |
|
4615 |
-
#: includes/users/template.php:
|
4616 |
msgid "Check your e-mail for your new password."
|
4617 |
msgstr ""
|
4618 |
|
4619 |
-
#: includes/users/template.php:
|
4620 |
msgid "Registration complete. Please check your e-mail."
|
4621 |
msgstr ""
|
4622 |
|
4623 |
-
#: includes/users/template.php:
|
4624 |
msgid "Moderators:"
|
4625 |
msgstr ""
|
4626 |
|
4627 |
-
#: templates/default/bbpress/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4628 |
msgid "Registered Users"
|
4629 |
msgstr ""
|
4630 |
|
4631 |
-
#: templates/default/bbpress/content-statistics.php:
|
4632 |
msgid "Empty Topic Tags"
|
4633 |
msgstr ""
|
4634 |
|
4635 |
-
#: templates/default/bbpress/content-statistics.php:
|
4636 |
msgid "Hidden Topics"
|
4637 |
msgstr ""
|
4638 |
|
4639 |
-
#: templates/default/bbpress/content-statistics.php:
|
4640 |
msgid "Hidden Replies"
|
4641 |
msgstr ""
|
4642 |
|
4643 |
-
#: templates/default/bbpress/feedback-logged-in.php:
|
4644 |
msgid "You are already logged in."
|
4645 |
msgstr ""
|
4646 |
|
4647 |
-
#: templates/default/bbpress/feedback-no-access.php:
|
4648 |
msgid "Private"
|
4649 |
msgstr ""
|
4650 |
|
4651 |
-
#: templates/default/bbpress/feedback-no-access.php:
|
4652 |
msgid "You do not have permission to view this forum."
|
4653 |
msgstr ""
|
4654 |
|
4655 |
-
#: templates/default/bbpress/feedback-no-forums.php:
|
4656 |
msgid "Oh, bother! No forums were found here."
|
4657 |
msgstr ""
|
4658 |
|
4659 |
-
#: templates/default/bbpress/feedback-no-replies.php:
|
4660 |
msgid "Oh, bother! No replies were found here."
|
4661 |
msgstr ""
|
4662 |
|
4663 |
-
#: templates/default/bbpress/feedback-no-search.php:
|
4664 |
msgid "Oh, bother! No search results were found here."
|
4665 |
msgstr ""
|
4666 |
|
4667 |
-
#: templates/default/bbpress/feedback-no-topics.php:
|
4668 |
msgid "Oh, bother! No topics were found here."
|
4669 |
msgstr ""
|
4670 |
|
4671 |
-
#: templates/default/bbpress/form-anonymous.php:
|
4672 |
msgid "Your information:"
|
4673 |
msgstr ""
|
4674 |
|
4675 |
-
#: templates/default/bbpress/form-anonymous.php:
|
4676 |
msgid "Name (required):"
|
4677 |
msgstr ""
|
4678 |
|
4679 |
-
#: templates/default/bbpress/form-anonymous.php:
|
4680 |
msgid "Mail (will not be published) (required):"
|
4681 |
msgstr ""
|
4682 |
|
4683 |
-
#: templates/default/bbpress/form-forum.php:
|
4684 |
-
#: templates/default/bbpress/form-topic.php:
|
4685 |
msgid "Now Editing “%s”"
|
4686 |
msgstr ""
|
4687 |
|
4688 |
-
#: templates/default/bbpress/form-forum.php:
|
4689 |
msgid "Create New Forum in “%s”"
|
4690 |
msgstr ""
|
4691 |
|
4692 |
-
#: templates/default/bbpress/form-forum.php:
|
|
|
4693 |
msgid ""
|
4694 |
-
"This forum is closed to new content, however your
|
4695 |
-
"to
|
4696 |
msgstr ""
|
4697 |
|
4698 |
-
#: templates/default/bbpress/form-forum.php:
|
4699 |
-
#: templates/default/bbpress/form-reply.php:
|
4700 |
-
#: templates/default/bbpress/form-topic.php:
|
4701 |
msgid "Your account has the ability to post unrestricted HTML content."
|
4702 |
msgstr ""
|
4703 |
|
4704 |
-
#: templates/default/bbpress/form-forum.php:
|
4705 |
msgid "Forum Name (Maximum Length: %d):"
|
4706 |
msgstr ""
|
4707 |
|
4708 |
-
#: templates/default/bbpress/form-forum.php:
|
4709 |
-
#: templates/default/bbpress/form-reply.php:
|
4710 |
msgid ""
|
4711 |
"You may use these <abbr title=\"HyperText Markup Language\">HTML</abbr> "
|
4712 |
"tags and attributes:"
|
4713 |
msgstr ""
|
4714 |
|
4715 |
-
#: templates/default/bbpress/form-forum.php:
|
4716 |
msgid "Forum Moderators:"
|
4717 |
msgstr ""
|
4718 |
|
4719 |
-
#: templates/default/bbpress/form-forum.php:
|
4720 |
msgid "Forum Type:"
|
4721 |
msgstr ""
|
4722 |
|
4723 |
-
#: templates/default/bbpress/form-forum.php:
|
4724 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4725 |
-
#: templates/default/bbpress/form-reply.php:
|
4726 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4727 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4728 |
-
#: templates/default/bbpress/form-topic.php:
|
4729 |
msgid "Submit"
|
4730 |
msgstr ""
|
4731 |
|
4732 |
-
#: templates/default/bbpress/form-forum.php:
|
4733 |
msgid "The forum ‘%s’ is closed to new content."
|
4734 |
msgstr ""
|
4735 |
|
4736 |
-
#: templates/default/bbpress/form-forum.php:
|
4737 |
msgid "You cannot create new forums."
|
4738 |
msgstr ""
|
4739 |
|
4740 |
-
#: templates/default/bbpress/form-forum.php:
|
4741 |
msgid "You must be logged in to create new forums."
|
4742 |
msgstr ""
|
4743 |
|
4744 |
-
#: templates/default/bbpress/form-protected.php:
|
4745 |
msgid "Protected"
|
4746 |
msgstr ""
|
4747 |
|
4748 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4749 |
msgid "Move reply \"%s\""
|
4750 |
msgstr ""
|
4751 |
|
4752 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4753 |
msgid ""
|
4754 |
"You can either make this reply a new topic with a new title, or merge it "
|
4755 |
"into an existing topic."
|
4756 |
msgstr ""
|
4757 |
|
4758 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4759 |
msgid ""
|
4760 |
"If you choose an existing topic, replies will be ordered by the time and "
|
4761 |
"date they were created."
|
4762 |
msgstr ""
|
4763 |
|
4764 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4765 |
msgid "Move Method"
|
4766 |
msgstr ""
|
4767 |
|
4768 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4769 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4770 |
msgid "New topic in %s titled:"
|
4771 |
msgstr ""
|
4772 |
|
4773 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4774 |
msgid "Moved: %s"
|
4775 |
msgstr ""
|
4776 |
|
4777 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4778 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4779 |
msgid "Use an existing topic in this forum:"
|
4780 |
msgstr ""
|
4781 |
|
4782 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4783 |
msgid "You do not have permission to edit this reply."
|
4784 |
msgstr ""
|
4785 |
|
4786 |
-
#: templates/default/bbpress/form-reply-move.php:
|
4787 |
msgid "You cannot edit this reply."
|
4788 |
msgstr ""
|
4789 |
|
4790 |
-
#: templates/default/bbpress/form-reply.php:
|
4791 |
msgid "Reply #%1$s in %2$s"
|
4792 |
msgstr ""
|
4793 |
|
4794 |
-
#: templates/default/bbpress/form-reply.php:
|
4795 |
msgid ""
|
4796 |
"This topic is marked as closed to new replies, however your posting "
|
4797 |
-
"capabilities still allow you to
|
4798 |
msgstr ""
|
4799 |
|
4800 |
-
#: templates/default/bbpress/form-reply.php:
|
4801 |
msgid "Tags:"
|
4802 |
msgstr ""
|
4803 |
|
4804 |
-
#: templates/default/bbpress/form-reply.php:
|
4805 |
-
#: templates/default/bbpress/form-topic.php:
|
4806 |
msgid "Notify the author of follow-up replies via email"
|
4807 |
msgstr ""
|
4808 |
|
4809 |
-
#: templates/default/bbpress/form-reply.php:
|
4810 |
-
#: templates/default/bbpress/form-topic.php:
|
4811 |
msgid "Notify me of follow-up replies via email"
|
4812 |
msgstr ""
|
4813 |
|
4814 |
-
#: templates/default/bbpress/form-reply.php:
|
4815 |
msgid "Reply Status:"
|
4816 |
msgstr ""
|
4817 |
|
4818 |
-
#: templates/default/bbpress/form-reply.php:
|
4819 |
-
#: templates/default/bbpress/form-topic.php:
|
4820 |
msgid "Keep a log of this edit:"
|
4821 |
msgstr ""
|
4822 |
|
4823 |
-
#: templates/default/bbpress/form-reply.php:
|
4824 |
-
#: templates/default/bbpress/form-topic.php:
|
4825 |
msgid "Optional reason for editing:"
|
4826 |
msgstr ""
|
4827 |
|
4828 |
-
#: templates/default/bbpress/form-reply.php:
|
4829 |
msgid "The topic ‘%s’ is closed to new replies."
|
4830 |
msgstr ""
|
4831 |
|
4832 |
-
#: templates/default/bbpress/form-reply.php:
|
4833 |
-
#: templates/default/bbpress/form-topic.php:
|
4834 |
msgid "The forum ‘%s’ is closed to new topics and replies."
|
4835 |
msgstr ""
|
4836 |
|
4837 |
-
#: templates/default/bbpress/form-reply.php:
|
4838 |
msgid "You cannot reply to this topic."
|
4839 |
msgstr ""
|
4840 |
|
4841 |
-
#: templates/default/bbpress/form-reply.php:
|
4842 |
msgid "You must be logged in to reply to this topic."
|
4843 |
msgstr ""
|
4844 |
|
4845 |
-
#: templates/default/bbpress/form-search.php:
|
4846 |
msgid "Search for:"
|
4847 |
msgstr ""
|
4848 |
|
4849 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4850 |
msgid "Merge topic \"%s\""
|
4851 |
msgstr ""
|
4852 |
|
4853 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4854 |
msgid ""
|
4855 |
"Select the topic to merge this one into. The destination topic will remain "
|
4856 |
"the lead topic, and this one will change into a reply."
|
4857 |
msgstr ""
|
4858 |
|
4859 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4860 |
msgid ""
|
4861 |
"To keep this topic as the lead, go to the other topic and use the merge "
|
4862 |
"tool from there instead."
|
4863 |
msgstr ""
|
4864 |
|
4865 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4866 |
msgid ""
|
4867 |
"Replies to both topics are merged chronologically, ordered by the time and "
|
4868 |
"date they were published. Topics may be updated to a 1 second difference to "
|
4869 |
"maintain chronological order based on the merge direction."
|
4870 |
msgstr ""
|
4871 |
|
4872 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4873 |
msgid "Destination"
|
4874 |
msgstr ""
|
4875 |
|
4876 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4877 |
msgid "Merge with this topic:"
|
4878 |
msgstr ""
|
4879 |
|
4880 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4881 |
msgid "There are no other topics in this forum to merge with."
|
4882 |
msgstr ""
|
4883 |
|
4884 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4885 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4886 |
msgid "Topic Extras"
|
4887 |
msgstr ""
|
4888 |
|
4889 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4890 |
msgid "Merge topic subscribers"
|
4891 |
msgstr ""
|
4892 |
|
4893 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4894 |
msgid "Merge topic favoriters"
|
4895 |
msgstr ""
|
4896 |
|
4897 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4898 |
msgid "Merge topic tags"
|
4899 |
msgstr ""
|
4900 |
|
4901 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4902 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4903 |
msgid "You do not have permission to edit this topic."
|
4904 |
msgstr ""
|
4905 |
|
4906 |
-
#: templates/default/bbpress/form-topic-merge.php:
|
4907 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4908 |
msgid "You cannot edit this topic."
|
4909 |
msgstr ""
|
4910 |
|
4911 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4912 |
msgid "Split topic \"%s\""
|
4913 |
msgstr ""
|
4914 |
|
4915 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4916 |
msgid ""
|
4917 |
"When you split a topic, you are slicing it in half starting with the reply "
|
4918 |
"you just selected. Choose to use that reply as a new topic with a new "
|
4919 |
"title, or merge those replies into an existing topic."
|
4920 |
msgstr ""
|
4921 |
|
4922 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4923 |
msgid ""
|
4924 |
"If you use the existing topic option, replies within both topics will be "
|
4925 |
"merged chronologically. The order of the merged replies is based on the "
|
4926 |
"time and date they were posted."
|
4927 |
msgstr ""
|
4928 |
|
4929 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4930 |
msgid "Split Method"
|
4931 |
msgstr ""
|
4932 |
|
4933 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4934 |
msgid "Split: %s"
|
4935 |
msgstr ""
|
4936 |
|
4937 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4938 |
msgid "Copy subscribers to the new topic"
|
4939 |
msgstr ""
|
4940 |
|
4941 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4942 |
msgid "Copy favoriters to the new topic"
|
4943 |
msgstr ""
|
4944 |
|
4945 |
-
#: templates/default/bbpress/form-topic-split.php:
|
4946 |
msgid "Copy topic tags to the new topic"
|
4947 |
msgstr ""
|
4948 |
|
4949 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4950 |
msgid "Manage Tag: \"%s\""
|
4951 |
msgstr ""
|
4952 |
|
4953 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4954 |
msgid "Rename"
|
4955 |
msgstr ""
|
4956 |
|
4957 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4958 |
msgid "Leave the slug empty to have one automatically generated."
|
4959 |
msgstr ""
|
4960 |
|
4961 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4962 |
msgid ""
|
4963 |
"Changing the slug affects its permalink. Any links to the old slug will "
|
4964 |
"stop working."
|
4965 |
msgstr ""
|
4966 |
|
4967 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4968 |
msgid "Slug:"
|
4969 |
msgstr ""
|
4970 |
|
4971 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4972 |
msgid "Description:"
|
4973 |
msgstr ""
|
4974 |
|
4975 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4976 |
msgid "Update"
|
4977 |
msgstr ""
|
4978 |
|
4979 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4980 |
msgid "Merging tags together cannot be undone."
|
4981 |
msgstr ""
|
4982 |
|
4983 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4984 |
msgid "Existing tag:"
|
4985 |
msgstr ""
|
4986 |
|
4987 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4988 |
msgid "Are you sure you want to merge the \"%s\" tag into the tag you specified?"
|
4989 |
msgstr ""
|
4990 |
|
4991 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4992 |
msgid "This does not delete your topics. Only the tag itself is deleted."
|
4993 |
msgstr ""
|
4994 |
|
4995 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
4996 |
msgid "Deleting a tag cannot be undone."
|
4997 |
msgstr ""
|
4998 |
|
4999 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
5000 |
msgid "Any links to this tag will no longer function."
|
5001 |
msgstr ""
|
5002 |
|
5003 |
-
#: templates/default/bbpress/form-topic-tag.php:
|
5004 |
msgid ""
|
5005 |
"Are you sure you want to delete the \"%s\" tag? This is permanent and "
|
5006 |
"cannot be undone."
|
5007 |
msgstr ""
|
5008 |
|
5009 |
-
#: templates/default/bbpress/form-topic.php:
|
5010 |
msgid "Create New Topic in “%s”"
|
5011 |
msgstr ""
|
5012 |
|
5013 |
-
#: templates/default/bbpress/form-topic.php:
|
5014 |
msgid ""
|
5015 |
"This forum is marked as closed to new topics, however your posting "
|
5016 |
-
"capabilities still allow you to
|
5017 |
msgstr ""
|
5018 |
|
5019 |
-
#: templates/default/bbpress/form-topic.php:
|
5020 |
msgid "Topic Title (Maximum Length: %d):"
|
5021 |
msgstr ""
|
5022 |
|
5023 |
-
#: templates/default/bbpress/form-topic.php:
|
5024 |
msgid "You may use these %s tags and attributes:"
|
5025 |
msgstr ""
|
5026 |
|
5027 |
-
#: templates/default/bbpress/form-topic.php:
|
5028 |
msgid "Topic Tags:"
|
5029 |
msgstr ""
|
5030 |
|
5031 |
-
#: templates/default/bbpress/form-topic.php:
|
5032 |
msgid "Topic Type:"
|
5033 |
msgstr ""
|
5034 |
|
5035 |
-
#: templates/default/bbpress/form-topic.php:
|
5036 |
msgid "Topic Status:"
|
5037 |
msgstr ""
|
5038 |
|
5039 |
-
#: templates/default/bbpress/form-topic.php:
|
5040 |
msgid "You cannot create new topics."
|
5041 |
msgstr ""
|
5042 |
|
5043 |
-
#: templates/default/bbpress/form-topic.php:
|
5044 |
msgid "You must be logged in to create new topics."
|
5045 |
msgstr ""
|
5046 |
|
5047 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5048 |
msgid "First Name"
|
5049 |
msgstr ""
|
5050 |
|
5051 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5052 |
msgid "Last Name"
|
5053 |
msgstr ""
|
5054 |
|
5055 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5056 |
msgid "Nickname"
|
5057 |
msgstr ""
|
5058 |
|
5059 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5060 |
msgid "Display Name"
|
5061 |
msgstr ""
|
5062 |
|
5063 |
-
#: templates/default/bbpress/form-user-edit.php:49
|
5064 |
#: templates/default/bbpress/form-user-edit.php:52
|
|
|
5065 |
msgid "Contact Info"
|
5066 |
msgstr ""
|
5067 |
|
5068 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5069 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5070 |
msgid "About Yourself"
|
5071 |
msgstr ""
|
5072 |
|
5073 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5074 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5075 |
msgid "About the user"
|
5076 |
msgstr ""
|
5077 |
|
5078 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5079 |
msgid "Biographical Info"
|
5080 |
msgstr ""
|
5081 |
|
5082 |
-
#: templates/default/bbpress/form-user-edit.php:96
|
5083 |
#: templates/default/bbpress/form-user-edit.php:99
|
|
|
5084 |
msgid "Account"
|
5085 |
msgstr ""
|
5086 |
|
5087 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5088 |
msgid "New Password"
|
5089 |
msgstr ""
|
5090 |
|
5091 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5092 |
msgid ""
|
5093 |
"If you would like to change the password type a new one. Otherwise leave "
|
5094 |
"this blank."
|
5095 |
msgstr ""
|
5096 |
|
5097 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5098 |
msgid "Type your new password again."
|
5099 |
msgstr ""
|
5100 |
|
5101 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5102 |
msgid ""
|
5103 |
"Your password should be at least ten characters long. Use upper and lower "
|
5104 |
"case letters, numbers, and symbols to make it even stronger."
|
5105 |
msgstr ""
|
5106 |
|
5107 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5108 |
-
|
5109 |
-
msgid "User Role"
|
5110 |
msgstr ""
|
5111 |
|
5112 |
#: templates/default/bbpress/form-user-edit.php:143
|
|
|
|
|
|
|
|
|
|
|
5113 |
msgid "Network Role"
|
5114 |
msgstr ""
|
5115 |
|
5116 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5117 |
msgid "Grant this user super admin privileges for the Network."
|
5118 |
msgstr ""
|
5119 |
|
5120 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5121 |
msgid "Update Profile"
|
5122 |
msgstr ""
|
5123 |
|
5124 |
-
#: templates/default/bbpress/form-user-edit.php:
|
5125 |
msgid "Update User"
|
5126 |
msgstr ""
|
5127 |
|
5128 |
-
#: templates/default/bbpress/form-user-login.php:
|
5129 |
msgid "Keep me signed in"
|
5130 |
msgstr ""
|
5131 |
|
5132 |
-
#: templates/default/bbpress/form-user-lost-pass.php:
|
5133 |
msgid "Username or Email"
|
5134 |
msgstr ""
|
5135 |
|
5136 |
-
#: templates/default/bbpress/form-user-lost-pass.php:
|
5137 |
msgid "Reset My Password"
|
5138 |
msgstr ""
|
5139 |
|
5140 |
-
#: templates/default/bbpress/form-user-register.php:
|
5141 |
msgid "Create an Account"
|
5142 |
msgstr ""
|
5143 |
|
5144 |
-
#: templates/default/bbpress/form-user-register.php:
|
5145 |
msgid "Your username must be unique, and cannot be changed later."
|
5146 |
msgstr ""
|
5147 |
|
5148 |
-
#: templates/default/bbpress/form-user-register.php:
|
5149 |
msgid ""
|
5150 |
"We use your email address to email you a secure password and verify your "
|
5151 |
"account."
|
5152 |
msgstr ""
|
5153 |
|
5154 |
-
#: templates/default/bbpress/form-user-roles.php:
|
5155 |
msgid "Blog Role"
|
5156 |
msgstr ""
|
5157 |
|
5158 |
-
#: templates/default/bbpress/loop-search-forum.php:
|
5159 |
msgid "Last updated %s"
|
5160 |
msgstr ""
|
5161 |
|
5162 |
-
#: templates/default/bbpress/loop-search-reply.php:
|
5163 |
msgid "In reply to: "
|
5164 |
msgstr ""
|
5165 |
|
5166 |
-
#: templates/default/bbpress/loop-search-topic.php:
|
5167 |
msgid "in group forum "
|
5168 |
msgstr ""
|
5169 |
|
5170 |
-
#: templates/default/bbpress/loop-search-topic.php:
|
5171 |
msgid "in forum "
|
5172 |
msgstr ""
|
5173 |
|
5174 |
-
#: templates/default/bbpress/loop-search.php:
|
5175 |
-
#: templates/default/bbpress/loop-search.php:
|
5176 |
msgid "Search Results"
|
5177 |
msgstr ""
|
5178 |
|
5179 |
-
#: templates/default/bbpress/loop-single-reply.php:
|
5180 |
msgid "in reply to: "
|
5181 |
msgstr ""
|
5182 |
|
5183 |
-
#: templates/default/bbpress/loop-single-topic.php:
|
5184 |
msgid "Started by: %1$s"
|
5185 |
msgstr ""
|
5186 |
|
5187 |
-
#: templates/default/bbpress/loop-single-topic.php:
|
5188 |
msgid "in: %1$s"
|
5189 |
msgstr ""
|
5190 |
|
5191 |
-
#: templates/default/bbpress/user-details.php:
|
5192 |
-
#: templates/default/bbpress/user-profile.php:
|
5193 |
msgid "Profile"
|
5194 |
msgstr ""
|
5195 |
|
5196 |
-
#: templates/default/bbpress/user-details.php:
|
5197 |
msgid "%s's Topics Started"
|
5198 |
msgstr ""
|
5199 |
|
5200 |
-
#: templates/default/bbpress/user-details.php:
|
5201 |
msgid "%s's Replies Created"
|
5202 |
msgstr ""
|
5203 |
|
5204 |
-
#: templates/default/bbpress/user-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5205 |
msgid "Favorite Forum Topics"
|
5206 |
msgstr ""
|
5207 |
|
5208 |
-
#: templates/default/bbpress/user-favorites.php:
|
5209 |
msgid "You currently have no favorite topics."
|
5210 |
msgstr ""
|
5211 |
|
5212 |
-
#: templates/default/bbpress/user-favorites.php:
|
5213 |
msgid "This user has no favorite topics."
|
5214 |
msgstr ""
|
5215 |
|
5216 |
-
#: templates/default/bbpress/user-profile.php:
|
5217 |
msgid "Forum Role: %s"
|
5218 |
msgstr ""
|
5219 |
|
5220 |
-
#: templates/default/bbpress/user-profile.php:
|
5221 |
msgid "Topics Started: %s"
|
5222 |
msgstr ""
|
5223 |
|
5224 |
-
#: templates/default/bbpress/user-profile.php:
|
5225 |
msgid "Replies Created: %s"
|
5226 |
msgstr ""
|
5227 |
|
5228 |
-
#: templates/default/bbpress/user-replies-created.php:
|
5229 |
msgid "Forum Replies Created"
|
5230 |
msgstr ""
|
5231 |
|
5232 |
-
#: templates/default/bbpress/user-replies-created.php:
|
5233 |
msgid "You have not replied to any topics."
|
5234 |
msgstr ""
|
5235 |
|
5236 |
-
#: templates/default/bbpress/user-replies-created.php:
|
5237 |
msgid "This user has not replied to any topics."
|
5238 |
msgstr ""
|
5239 |
|
5240 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
5241 |
msgid "Subscribed Forums"
|
5242 |
msgstr ""
|
5243 |
|
5244 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
5245 |
msgid "You are not currently subscribed to any forums."
|
5246 |
msgstr ""
|
5247 |
|
5248 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
5249 |
msgid "This user is not currently subscribed to any forums."
|
5250 |
msgstr ""
|
5251 |
|
5252 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
5253 |
msgid "You are not currently subscribed to any topics."
|
5254 |
msgstr ""
|
5255 |
|
5256 |
-
#: templates/default/bbpress/user-subscriptions.php:
|
5257 |
msgid "This user is not currently subscribed to any topics."
|
5258 |
msgstr ""
|
5259 |
|
5260 |
-
#: templates/default/bbpress/user-topics-created.php:
|
5261 |
msgid "Forum Topics Started"
|
5262 |
msgstr ""
|
5263 |
|
5264 |
-
#: templates/default/bbpress/user-topics-created.php:
|
5265 |
msgid "You have not created any topics."
|
5266 |
msgstr ""
|
5267 |
|
5268 |
-
#: templates/default/bbpress/user-topics-created.php:
|
5269 |
msgid "This user has not created any topics."
|
5270 |
msgstr ""
|
5271 |
|
5272 |
-
#: templates/default/bbpress-functions.php:
|
5273 |
-
#: templates/default/bbpress-functions.php:
|
5274 |
msgid "Something went wrong. Refresh your browser and try again."
|
5275 |
msgstr ""
|
5276 |
|
5277 |
-
#: templates/default/bbpress-functions.php:
|
5278 |
-
#: templates/default/bbpress-functions.php:
|
5279 |
msgid "Subscriptions are no longer active."
|
5280 |
msgstr ""
|
5281 |
|
5282 |
-
#: templates/default/bbpress-functions.php:
|
5283 |
msgid "Please login to subscribe to this forum."
|
5284 |
msgstr ""
|
5285 |
|
5286 |
-
#: templates/default/bbpress-functions.php:
|
5287 |
-
#: templates/default/bbpress-functions.php:
|
5288 |
-
#: templates/default/bbpress-functions.php:
|
5289 |
msgid "You do not have permission to do this."
|
5290 |
msgstr ""
|
5291 |
|
5292 |
-
#: templates/default/bbpress-functions.php:
|
5293 |
msgid "The forum could not be found."
|
5294 |
msgstr ""
|
5295 |
|
5296 |
-
#: templates/default/bbpress-functions.php:
|
5297 |
-
#: templates/default/bbpress-functions.php:
|
5298 |
-
#: templates/default/bbpress-functions.php:
|
5299 |
msgid "Are you sure you meant to do that?"
|
5300 |
msgstr ""
|
5301 |
|
5302 |
-
#: templates/default/bbpress-functions.php:
|
5303 |
-
#: templates/default/bbpress-functions.php:
|
5304 |
-
#: templates/default/bbpress-functions.php:
|
5305 |
msgid "The request was unsuccessful. Please try again."
|
5306 |
msgstr ""
|
5307 |
|
5308 |
-
#: templates/default/bbpress-functions.php:
|
5309 |
msgid "Favorites are no longer active."
|
5310 |
msgstr ""
|
5311 |
|
5312 |
-
#: templates/default/bbpress-functions.php:
|
5313 |
msgid "Please login to make this topic a favorite."
|
5314 |
msgstr ""
|
5315 |
|
5316 |
-
#: templates/default/bbpress-functions.php:
|
5317 |
-
#: templates/default/bbpress-functions.php:
|
5318 |
msgid "The topic could not be found."
|
5319 |
msgstr ""
|
5320 |
|
5321 |
-
#: templates/default/bbpress-functions.php:
|
5322 |
msgid "Please login to subscribe to this topic."
|
5323 |
msgstr ""
|
5324 |
|
@@ -5346,111 +5654,110 @@ msgstr ""
|
|
5346 |
msgid "The bbPress Contributors"
|
5347 |
msgstr ""
|
5348 |
|
5349 |
-
#: bbpress.php:
|
5350 |
msgctxt "post"
|
5351 |
msgid "Closed"
|
5352 |
msgstr ""
|
5353 |
|
5354 |
-
#: bbpress.php:
|
5355 |
msgctxt "post"
|
5356 |
msgid "Closed <span class=\"count\">(%s)</span>"
|
5357 |
msgid_plural "Closed <span class=\"count\">(%s)</span>"
|
5358 |
msgstr[0] ""
|
5359 |
msgstr[1] ""
|
5360 |
|
5361 |
-
#: bbpress.php:
|
5362 |
msgctxt "post"
|
5363 |
msgid "Spam"
|
5364 |
msgstr ""
|
5365 |
|
5366 |
-
#: bbpress.php:
|
5367 |
msgctxt "post"
|
5368 |
msgid "Spam <span class=\"count\">(%s)</span>"
|
5369 |
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
5370 |
msgstr[0] ""
|
5371 |
msgstr[1] ""
|
5372 |
|
5373 |
-
#: bbpress.php:
|
5374 |
msgctxt "post"
|
5375 |
msgid "Orphan"
|
5376 |
msgstr ""
|
5377 |
|
5378 |
-
#: bbpress.php:
|
5379 |
msgctxt "post"
|
5380 |
msgid "Orphan <span class=\"count\">(%s)</span>"
|
5381 |
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
5382 |
msgstr[0] ""
|
5383 |
msgstr[1] ""
|
5384 |
|
5385 |
-
#: bbpress.php:
|
5386 |
msgctxt "post"
|
5387 |
msgid "Hidden"
|
5388 |
msgstr ""
|
5389 |
|
5390 |
-
#: bbpress.php:
|
5391 |
msgctxt "post"
|
5392 |
msgid "Hidden <span class=\"count\">(%s)</span>"
|
5393 |
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
5394 |
msgstr[0] ""
|
5395 |
msgstr[1] ""
|
5396 |
|
5397 |
-
#: includes/admin/admin.php:
|
5398 |
msgctxt "admin color scheme"
|
5399 |
msgid "Mint"
|
5400 |
msgstr ""
|
5401 |
|
5402 |
-
#: includes/admin/admin.php:
|
5403 |
msgctxt "admin color scheme"
|
5404 |
msgid "Evergreen"
|
5405 |
msgstr ""
|
5406 |
|
5407 |
-
#: includes/admin/forums.php:
|
5408 |
msgctxt "Close a Forum"
|
5409 |
msgid "Close"
|
5410 |
msgstr ""
|
5411 |
|
5412 |
-
#: includes/admin/forums.php:
|
5413 |
msgctxt "Open a Forum"
|
5414 |
msgid "Open"
|
5415 |
msgstr ""
|
5416 |
|
5417 |
-
#: includes/admin/
|
5418 |
-
#: includes/admin/settings.php:335 includes/replies/template.php:49
|
5419 |
-
msgctxt "noun"
|
5420 |
-
msgid "Reply"
|
5421 |
-
msgstr ""
|
5422 |
-
|
5423 |
-
#: includes/admin/replies.php:780
|
5424 |
msgctxt "Unapprove reply"
|
5425 |
msgid "Unapprove"
|
5426 |
msgstr ""
|
5427 |
|
5428 |
-
#: includes/admin/replies.php:
|
5429 |
msgctxt "Approve reply"
|
5430 |
msgid "Approve"
|
5431 |
msgstr ""
|
5432 |
|
5433 |
-
#: includes/admin/
|
|
|
|
|
|
|
|
|
|
|
5434 |
msgctxt "Unapprove Topic"
|
5435 |
msgid "Unapprove"
|
5436 |
msgstr ""
|
5437 |
|
5438 |
-
#: includes/admin/topics.php:
|
5439 |
msgctxt "Approve Topic"
|
5440 |
msgid "Approve"
|
5441 |
msgstr ""
|
5442 |
|
5443 |
-
#: includes/admin/topics.php:
|
5444 |
msgctxt "Close a Topic"
|
5445 |
msgid "Close"
|
5446 |
msgstr ""
|
5447 |
|
5448 |
-
#: includes/admin/topics.php:
|
5449 |
msgctxt "Open a Topic"
|
5450 |
msgid "Open"
|
5451 |
msgstr ""
|
5452 |
|
5453 |
-
#: includes/common/
|
5454 |
msgctxt "Separator in time since"
|
5455 |
msgid ","
|
5456 |
msgstr ""
|
@@ -5485,71 +5792,71 @@ msgctxt "User role"
|
|
5485 |
msgid "Blocked"
|
5486 |
msgstr ""
|
5487 |
|
5488 |
-
#: includes/common/widgets.php:
|
5489 |
msgctxt "widgets"
|
5490 |
msgid "by %1$s"
|
5491 |
msgstr ""
|
5492 |
|
5493 |
-
#: includes/common/widgets.php:
|
5494 |
#. translators: 1: reply author, 2: reply link, 3: reply timestamp
|
5495 |
msgctxt "widgets"
|
5496 |
msgid "%1$s on %2$s %3$s"
|
5497 |
msgstr ""
|
5498 |
|
5499 |
-
#: includes/common/widgets.php:
|
5500 |
#. translators: 1: reply link, 2: reply timestamp
|
5501 |
msgctxt "widgets"
|
5502 |
msgid "%1$s %2$s"
|
5503 |
msgstr ""
|
5504 |
|
5505 |
-
#: includes/common/widgets.php:
|
5506 |
#. translators: 1: reply author, 2: reply link
|
5507 |
msgctxt "widgets"
|
5508 |
msgid "%1$s on %2$s"
|
5509 |
msgstr ""
|
5510 |
|
5511 |
-
#: includes/common/widgets.php:
|
5512 |
#. translators: 1: reply link
|
5513 |
msgctxt "widgets"
|
5514 |
msgid "%1$s"
|
5515 |
msgstr ""
|
5516 |
|
5517 |
-
#: includes/extend/buddypress/groups.php:
|
5518 |
msgctxt "group admin edit screen"
|
5519 |
msgid "Discussion Forum"
|
5520 |
msgstr ""
|
5521 |
|
5522 |
-
#: includes/forums/functions.php:
|
5523 |
msgctxt "Open the forum"
|
5524 |
msgid "Open"
|
5525 |
msgstr ""
|
5526 |
|
5527 |
-
#: includes/forums/functions.php:
|
5528 |
msgctxt "Close the forum"
|
5529 |
msgid "Closed"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
-
#: includes/forums/functions.php:
|
5533 |
msgctxt "Forum accepts new topics"
|
5534 |
msgid "Forum"
|
5535 |
msgstr ""
|
5536 |
|
5537 |
-
#: includes/forums/functions.php:
|
5538 |
msgctxt "Forum is a category"
|
5539 |
msgid "Category"
|
5540 |
msgstr ""
|
5541 |
|
5542 |
-
#: includes/forums/functions.php:
|
5543 |
msgctxt "Make forum public"
|
5544 |
msgid "Public"
|
5545 |
msgstr ""
|
5546 |
|
5547 |
-
#: includes/forums/functions.php:
|
5548 |
msgctxt "Make forum private"
|
5549 |
msgid "Private"
|
5550 |
msgstr ""
|
5551 |
|
5552 |
-
#: includes/forums/functions.php:
|
5553 |
msgctxt "Make forum hidden"
|
5554 |
msgid "Hidden"
|
5555 |
msgstr ""
|
@@ -5574,77 +5881,87 @@ msgctxt "Mark reply as pending"
|
|
5574 |
msgid "Pending"
|
5575 |
msgstr ""
|
5576 |
|
5577 |
-
#: includes/replies/template.php:
|
5578 |
msgctxt "date at time"
|
5579 |
msgid "%1$s at %2$s"
|
5580 |
msgstr ""
|
5581 |
|
5582 |
-
#: includes/replies/template.php:
|
5583 |
msgctxt "verb"
|
5584 |
msgid "Reply"
|
5585 |
msgstr ""
|
5586 |
|
5587 |
-
#: includes/replies/template.php:
|
5588 |
msgctxt "Pending Status"
|
5589 |
msgid "Approve"
|
5590 |
msgstr ""
|
5591 |
|
5592 |
-
#: includes/replies/template.php:
|
5593 |
msgctxt "Pending Status"
|
5594 |
msgid "Unapprove"
|
5595 |
msgstr ""
|
5596 |
|
5597 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
5598 |
msgctxt "Open the topic"
|
5599 |
msgid "Open"
|
5600 |
msgstr ""
|
5601 |
|
5602 |
-
#: includes/topics/functions.php:
|
5603 |
msgctxt "Close the topic"
|
5604 |
msgid "Closed"
|
5605 |
msgstr ""
|
5606 |
|
5607 |
-
#: includes/topics/
|
|
|
|
|
|
|
|
|
|
|
5608 |
msgctxt "Spam the topic"
|
5609 |
msgid "Spam"
|
5610 |
msgstr ""
|
5611 |
|
5612 |
-
#: includes/topics/functions.php:
|
5613 |
msgctxt "Trash the topic"
|
5614 |
msgid "Trash"
|
5615 |
msgstr ""
|
5616 |
|
5617 |
-
#: includes/topics/functions.php:
|
5618 |
msgctxt "Mark topic as pending"
|
5619 |
msgid "Pending"
|
5620 |
msgstr ""
|
5621 |
|
5622 |
-
#: includes/topics/functions.php:
|
5623 |
msgctxt "Unstick a topic"
|
5624 |
msgid "Normal"
|
5625 |
msgstr ""
|
5626 |
|
5627 |
-
#: includes/topics/functions.php:
|
5628 |
msgctxt "Make topic sticky"
|
5629 |
msgid "Sticky"
|
5630 |
msgstr ""
|
5631 |
|
5632 |
-
#: includes/topics/functions.php:
|
5633 |
msgctxt "Make topic super sticky"
|
5634 |
msgid "Super Sticky"
|
5635 |
msgstr ""
|
5636 |
|
5637 |
-
#: includes/topics/template.php:
|
5638 |
-
msgctxt "
|
5639 |
-
msgid "
|
5640 |
msgstr ""
|
5641 |
|
5642 |
-
#: includes/topics/template.php:
|
5643 |
-
msgctxt "
|
5644 |
-
msgid "
|
5645 |
msgstr ""
|
5646 |
|
5647 |
-
#: includes/users/template.php:
|
5648 |
msgctxt "Dismiss pending user email address change"
|
5649 |
msgid "Cancel"
|
5650 |
msgstr ""
|
2 |
# This file is distributed under the GPLv2 or later (license.txt).
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: bbPress 2.6-rc-1\n"
|
6 |
"Report-Msgid-Bugs-To: https://bbpress.trac.wordpress.org\n"
|
7 |
+
"POT-Creation-Date: 2017-06-09 15:27:38+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: JOHN JAMES JACOBY <jjj@bbpress.org>\n"
|
13 |
"Language-Team: ENGLISH <jjj@bbpress.org>\n"
|
14 |
+
"X-Generator: grunt-wp-i18n1.0.0\n"
|
15 |
|
16 |
+
#: bbpress.php:142 bbpress.php:149
|
17 |
msgid "Cheatin’ huh?"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: bbpress.php:446
|
21 |
msgid "bbPress Default"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: bbpress.php:529
|
25 |
msgid "bbPress Forums"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: bbpress.php:554
|
29 |
msgid "bbPress Topics"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: bbpress.php:579
|
33 |
msgid "bbPress Replies"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: bbpress.php:733
|
37 |
msgid "Most popular topics"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: bbpress.php:746
|
41 |
msgid "Topics with no replies"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: bbpress.php:781
|
45 |
+
msgid "bbPress Item Count"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: includes/admin/actions.php:158 includes/admin/forums.php:581
|
49 |
+
#: includes/admin/settings.php:256 includes/admin/settings.php:277
|
50 |
+
#: includes/admin/tools/common.php:302 includes/admin/topics.php:888
|
51 |
+
#: includes/extend/buddypress/activity.php:204
|
52 |
+
#: includes/extend/buddypress/activity.php:409
|
53 |
+
#: includes/forums/template.php:2919 includes/topics/template.php:51
|
54 |
+
#: includes/topics/template.php:52
|
55 |
+
#: templates/default/bbpress/content-statistics.php:30
|
56 |
+
#: templates/default/bbpress/loop-forums.php:21
|
57 |
msgid "Topics"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: includes/admin/actions.php:163 includes/admin/actions.php:175
|
61 |
+
#: includes/admin/forums.php:582 includes/admin/settings.php:264
|
62 |
+
#: includes/admin/settings.php:285 includes/admin/tools/common.php:305
|
63 |
+
#: includes/admin/topics.php:406 includes/admin/topics.php:890
|
64 |
+
#: includes/core/theme-compat.php:691
|
65 |
+
#: includes/extend/buddypress/activity.php:214
|
66 |
+
#: includes/extend/buddypress/activity.php:410
|
67 |
+
#: includes/forums/template.php:2984 includes/replies/template.php:51
|
68 |
+
#: includes/replies/template.php:52
|
69 |
+
#: templates/default/bbpress/content-statistics.php:35
|
70 |
+
#: templates/default/bbpress/loop-forums.php:23
|
71 |
+
#: templates/default/bbpress/loop-replies.php:20
|
72 |
+
#: templates/default/bbpress/loop-replies.php:46
|
73 |
+
#: templates/default/bbpress/loop-topics.php:21
|
74 |
msgid "Replies"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/admin/actions.php:170 includes/admin/actions.php:182
|
78 |
+
#: includes/admin/forums.php:580 includes/admin/metaboxes.php:97
|
79 |
#: includes/admin/metaboxes.php:425 includes/admin/metaboxes.php:492
|
80 |
+
#: includes/admin/replies.php:684 includes/admin/settings.php:327
|
81 |
+
#: includes/admin/topics.php:889 includes/extend/buddypress/groups.php:50
|
82 |
+
#: includes/extend/buddypress/groups.php:51 includes/forums/template.php:54
|
83 |
+
#: templates/default/bbpress/loop-forums.php:20
|
84 |
msgid "Forum"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/admin/actions.php:187 includes/admin/metaboxes.php:114
|
88 |
+
#: includes/admin/metaboxes.php:519 includes/admin/replies.php:685
|
89 |
+
#: includes/admin/settings.php:335 includes/topics/template.php:53
|
90 |
+
#: templates/default/bbpress/content-single-topic-lead.php:23
|
91 |
+
#: templates/default/bbpress/content-single-topic-lead.php:91
|
92 |
+
#: templates/default/bbpress/loop-topics.php:18
|
93 |
msgid "Topic"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/admin/admin.php:242 includes/admin/admin.php:243
|
97 |
+
#: includes/admin/admin.php:252 includes/admin/admin.php:253
|
98 |
+
#: includes/admin/tools/common.php:299 includes/admin/tools.php:30
|
99 |
+
#: includes/admin/users.php:97 includes/common/widgets.php:682
|
100 |
+
#: includes/extend/buddypress/loader.php:42
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
#: includes/extend/buddypress/loader.php:179
|
102 |
+
#: includes/extend/buddypress/loader.php:301
|
103 |
+
#: includes/extend/buddypress/loader.php:366 includes/forums/template.php:52
|
104 |
+
#: includes/forums/template.php:53
|
105 |
+
#: templates/default/bbpress/content-statistics.php:25
|
106 |
msgid "Forums"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/admin/admin.php:265 includes/admin/admin.php:266
|
110 |
+
#: includes/admin/admin.php:274 includes/admin/admin.php:275
|
111 |
msgid "Welcome to bbPress"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/admin/admin.php:289 includes/admin/admin.php:290
|
115 |
+
#: includes/admin/admin.php:313 includes/admin/admin.php:314
|
116 |
+
#: includes/admin/admin.php:1047 includes/admin/admin.php:1144
|
117 |
msgid "Update Forums"
|
118 |
msgstr ""
|
119 |
|
129 |
msgid "About bbPress"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: includes/admin/admin.php:723 includes/admin/admin.php:760
|
133 |
msgid "%s - %s"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: includes/admin/admin.php:778 includes/admin/admin.php:855
|
137 |
msgid "Welcome to bbPress %s"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/admin/admin.php:779 includes/admin/admin.php:856
|
141 |
msgid ""
|
142 |
+
"Thank you for updating! bbPress %s is sweet and savory, contains no "
|
143 |
+
"artificial flavors or preservatives, is environmentally friendly, and is a "
|
144 |
+
"great compliment to your site."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/admin/admin.php:784 includes/admin/admin.php:861
|
148 |
msgid "What’s New"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/admin/admin.php:786 includes/admin/admin.php:863
|
152 |
msgid "Credits"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: includes/admin/admin.php:791
|
156 |
msgid "Forum Subscriptions"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: includes/admin/admin.php:795
|
160 |
msgid "Subscribe to Forums"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: includes/admin/admin.php:796
|
164 |
msgid "Now your users can subscribe to new topics in specific forums."
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/admin/admin.php:800
|
168 |
msgid "Manage Subscriptions"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/admin/admin.php:801
|
172 |
msgid "Your users can manage all of their subscriptions in one convenient location."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/admin/admin.php:807
|
176 |
msgid "Converters"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/admin/admin.php:811
|
180 |
msgid ""
|
181 |
"We’re all abuzz about the hive of new importers, AEF, Drupal, FluxBB, "
|
182 |
"Kunena Forums for Joomla, MyBB, Phorum, PHPFox, PHPWind, PunBB, SMF, "
|
185 |
"now gone if you need to remove imported users."
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/admin/admin.php:817
|
189 |
msgid "Theme Compatibility"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/admin/admin.php:818
|
193 |
msgid "Better handling of styles and scripts in the template stack."
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: includes/admin/admin.php:822
|
197 |
msgid "Polyglot support"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/admin/admin.php:823
|
201 |
msgid "bbPress fully supports automatic translation updates."
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/admin/admin.php:827
|
205 |
msgid "User capabilities"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: includes/admin/admin.php:828
|
209 |
msgid "Roles and capabilities have been swept through, cleaned up, and simplified."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/admin/admin.php:834 includes/admin/admin.php:977
|
213 |
msgid "Go to Forum Settings"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/admin/admin.php:867
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
msgid "bbPress is created by a worldwide swarm of busy, busy bees."
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/admin/admin.php:869
|
221 |
msgid "Project Leaders"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/admin/admin.php:873
|
225 |
msgid "Founding Developer"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: includes/admin/admin.php:877
|
229 |
msgid "Lead Developer"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/admin/admin.php:881 includes/admin/admin.php:905
|
233 |
msgid "Feature Developer"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: includes/admin/admin.php:885
|
237 |
msgid "Converter Specialist"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/admin/admin.php:889
|
241 |
msgid "Contributing Developers"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: includes/admin/admin.php:893 includes/admin/admin.php:897
|
245 |
+
msgid "Core Developer"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: includes/admin/admin.php:901
|
249 |
+
msgid "Project Emeriti"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: includes/admin/admin.php:909
|
253 |
+
msgid "Integration Testing"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: includes/admin/admin.php:913
|
257 |
msgid "Core Contributors to bbPress 2.6"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: includes/admin/admin.php:1001 includes/admin/admin.php:1023
|
261 |
msgid "Update Forum"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: includes/admin/admin.php:1012 includes/admin/admin.php:1064
|
265 |
msgid "All done!"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: includes/admin/admin.php:1013 includes/admin/admin.php:1065
|
269 |
msgid "Go Back"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: includes/admin/admin.php:1022
|
273 |
msgid "You can update your forum through this page. Hit the link below to update."
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: includes/admin/admin.php:1099
|
277 |
msgid ""
|
278 |
"Warning! Problem updating %1$s. Your server may not be able to connect to "
|
279 |
"sites running on it. Error message: %2$s"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/admin/admin.php:1124
|
283 |
msgid ""
|
284 |
"If your browser doesn’t start loading the next page automatically, "
|
285 |
"click this link:"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: includes/admin/admin.php:1125
|
289 |
msgid "Next Forums"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/admin/admin.php:1143
|
293 |
msgid ""
|
294 |
"You can update all the forums on your network through this page. It works "
|
295 |
"by calling the update script of each site automatically. Hit the link below "
|
296 |
"to update."
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: includes/admin/classes/class-bbp-converter-base.php:158
|
300 |
+
msgid "Database connection failed."
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: includes/admin/classes/class-bbp-converter.php:88
|
304 |
+
#: includes/admin/tools/help.php:111
|
305 |
msgid "Database Settings"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: includes/admin/classes/class-bbp-converter.php:91
|
309 |
msgid "Select Platform"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: includes/admin/classes/class-bbp-converter.php:95
|
313 |
msgid "Database Server"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: includes/admin/classes/class-bbp-converter.php:99
|
317 |
msgid "Database Port"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: includes/admin/classes/class-bbp-converter.php:103
|
321 |
msgid "Database Name"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: includes/admin/classes/class-bbp-converter.php:107
|
325 |
msgid "Database User"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/admin/classes/class-bbp-converter.php:111
|
329 |
msgid "Database Password"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: includes/admin/classes/class-bbp-converter.php:115
|
333 |
msgid "Table Prefix"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: includes/admin/classes/class-bbp-converter.php:119
|
337 |
msgid "Options"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: includes/admin/classes/class-bbp-converter.php:122
|
341 |
msgid "Rows Limit"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/admin/classes/class-bbp-converter.php:126
|
345 |
msgid "Delay Time"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: includes/admin/classes/class-bbp-converter.php:130
|
349 |
msgid "Convert Users"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/admin/classes/class-bbp-converter.php:134
|
353 |
msgid "Start Over"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/admin/classes/class-bbp-converter.php:138
|
357 |
msgid "Purge Previous Import"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/admin/classes/class-bbp-converter.php:176
|
361 |
+
#: includes/admin/settings.php:1669
|
362 |
+
msgid "Start"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: includes/admin/classes/class-bbp-converter.php:177
|
366 |
+
#: includes/admin/classes/class-bbp-converter.php:184
|
367 |
+
#: includes/admin/settings.php:1668
|
368 |
+
msgid "Continue"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: includes/admin/classes/class-bbp-converter.php:180
|
372 |
+
msgid "Starting Import"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: includes/admin/classes/class-bbp-converter.php:181
|
376 |
+
msgid "Continuing Import"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/admin/classes/class-bbp-converter.php:184
|
380 |
+
msgid "Repair any missing information: %s"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/admin/classes/class-bbp-converter.php:185
|
384 |
+
#: includes/admin/classes/class-bbp-converter.php:631
|
385 |
+
msgid "Import Finished"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: includes/admin/classes/class-bbp-converter.php:186
|
389 |
+
msgid "Import Stopped (by User)"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/admin/classes/class-bbp-converter.php:187
|
393 |
+
msgid "Database Connection Failed"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/admin/classes/class-bbp-converter.php:188
|
397 |
+
msgid "Import Halted (Error)"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/admin/classes/class-bbp-converter.php:364
|
401 |
+
msgid "Recreating sync-table"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/admin/classes/class-bbp-converter.php:367
|
405 |
msgid "Deleting previously converted data (%1$s - %2$s)"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: includes/admin/classes/class-bbp-converter.php:371
|
409 |
+
msgid "Skipping sync-table clean-up"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: includes/admin/classes/class-bbp-converter.php:385
|
413 |
+
msgid "No users to import"
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: includes/admin/classes/class-bbp-converter.php:389
|
417 |
msgid "Converting users (%1$s - %2$s)"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: includes/admin/classes/class-bbp-converter.php:393
|
421 |
+
msgid "Skipping user clean-up"
|
422 |
+
msgstr ""
|
423 |
+
|
424 |
+
#: includes/admin/classes/class-bbp-converter.php:405
|
425 |
msgid "No passwords to clear"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/admin/classes/class-bbp-converter.php:409
|
429 |
msgid "Delete users WordPress default passwords (%1$s - %2$s)"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: includes/admin/classes/class-bbp-converter.php:413
|
433 |
+
msgid "Skipping password clean-up"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: includes/admin/classes/class-bbp-converter.php:424
|
437 |
+
msgid "No forums to import"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/admin/classes/class-bbp-converter.php:428
|
441 |
msgid "Converting forums (%1$s - %2$s)"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: includes/admin/classes/class-bbp-converter.php:439
|
445 |
+
msgid "No forum parents to import"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: includes/admin/classes/class-bbp-converter.php:443
|
449 |
msgid "Calculating forum hierarchy (%1$s - %2$s)"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: includes/admin/classes/class-bbp-converter.php:454
|
453 |
+
msgid "No forum subscriptions to import"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: includes/admin/classes/class-bbp-converter.php:458
|
457 |
msgid "Converting forum subscriptions (%1$s - %2$s)"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: includes/admin/classes/class-bbp-converter.php:469
|
461 |
+
msgid "No topics to import"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: includes/admin/classes/class-bbp-converter.php:473
|
465 |
msgid "Converting topics (%1$s - %2$s)"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: includes/admin/classes/class-bbp-converter.php:484
|
469 |
+
msgid "No anonymous topic authors to import"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: includes/admin/classes/class-bbp-converter.php:488
|
473 |
msgid "Converting anonymous topic authors (%1$s - %2$s)"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: includes/admin/classes/class-bbp-converter.php:499
|
477 |
msgid "No stickies to stick"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: includes/admin/classes/class-bbp-converter.php:503
|
481 |
msgid "Calculating topic stickies (%1$s - %2$s)"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: includes/admin/classes/class-bbp-converter.php:514
|
485 |
msgid "No super stickies to stick"
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: includes/admin/classes/class-bbp-converter.php:518
|
489 |
msgid "Calculating topic super stickies (%1$s - %2$s)"
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: includes/admin/classes/class-bbp-converter.php:529
|
493 |
msgid "No closed topics to close"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: includes/admin/classes/class-bbp-converter.php:533
|
497 |
msgid "Calculating closed topics (%1$s - %2$s)"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: includes/admin/classes/class-bbp-converter.php:544
|
501 |
+
msgid "No topic tags to import"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: includes/admin/classes/class-bbp-converter.php:548
|
505 |
msgid "Converting topic tags (%1$s - %2$s)"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: includes/admin/classes/class-bbp-converter.php:559
|
509 |
+
msgid "No topic subscriptions to import"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: includes/admin/classes/class-bbp-converter.php:563
|
513 |
msgid "Converting topic subscriptions (%1$s - %2$s)"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: includes/admin/classes/class-bbp-converter.php:574
|
517 |
+
msgid "No favorites to import"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: includes/admin/classes/class-bbp-converter.php:578
|
521 |
msgid "Converting favorites (%1$s - %2$s)"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: includes/admin/classes/class-bbp-converter.php:589
|
525 |
+
msgid "No replies to import"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/admin/classes/class-bbp-converter.php:593
|
529 |
msgid "Converting replies (%1$s - %2$s)"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/admin/classes/class-bbp-converter.php:604
|
533 |
+
msgid "No anonymous reply authors to import"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: includes/admin/classes/class-bbp-converter.php:608
|
537 |
msgid "Converting anonymous reply authors (%1$s - %2$s)"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/admin/classes/class-bbp-converter.php:619
|
541 |
+
msgid "No threaded replies to import"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: includes/admin/classes/class-bbp-converter.php:623
|
545 |
msgid "Calculating threaded replies parents (%1$s - %2$s)"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:56
|
549 |
+
#: includes/admin/replies.php:686 includes/admin/topics.php:892
|
550 |
+
#: templates/default/bbpress/loop-replies.php:18
|
551 |
+
#: templates/default/bbpress/loop-replies.php:44
|
552 |
+
#: templates/default/bbpress/loop-search.php:19
|
553 |
+
#: templates/default/bbpress/loop-search.php:41
|
554 |
+
msgid "Author"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:57
|
558 |
+
msgid "Content"
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:58
|
562 |
+
msgid "Replied"
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:87
|
566 |
+
msgid "Unapprove"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:88
|
570 |
+
#: includes/admin/replies.php:246 includes/admin/replies.php:868
|
571 |
+
#: includes/admin/topics.php:251 includes/admin/topics.php:1082
|
572 |
+
#: includes/replies/template.php:2258 includes/topics/template.php:3162
|
573 |
+
msgid "Spam"
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:89
|
577 |
+
#: includes/admin/replies.php:881 includes/admin/topics.php:1094
|
578 |
+
#: includes/replies/template.php:2178 includes/topics/template.php:2824
|
579 |
+
msgid "Trash"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:141
|
583 |
+
#: includes/admin/replies.php:844 includes/admin/topics.php:1038
|
584 |
+
#: includes/admin/topics.php:1051
|
585 |
+
msgid "View"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:146
|
589 |
+
#: includes/common/template.php:2460 includes/forums/template.php:58
|
590 |
+
#: includes/replies/template.php:57 includes/replies/template.php:2046
|
591 |
+
#: includes/topics/template.php:57 includes/topics/template.php:2694
|
592 |
+
#: templates/default/bbpress/user-details.php:74
|
593 |
+
msgid "Edit"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: includes/admin/classes/class-bbp-topic-replies-list-table.php:239
|
597 |
+
msgid "No replies to this topic."
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
#: includes/admin/forums.php:113 includes/admin/replies.php:124
|
601 |
+
#: includes/admin/settings.php:1738 includes/admin/tools/help.php:102
|
602 |
+
#: includes/admin/topics.php:128
|
603 |
msgid "Overview"
|
604 |
msgstr ""
|
605 |
|
610 |
msgstr ""
|
611 |
|
612 |
#: includes/admin/forums.php:121 includes/admin/replies.php:132
|
613 |
+
#: includes/admin/topics.php:136
|
614 |
msgid "Screen Content"
|
615 |
msgstr ""
|
616 |
|
617 |
#: includes/admin/forums.php:123 includes/admin/replies.php:134
|
618 |
+
#: includes/admin/topics.php:138
|
619 |
msgid ""
|
620 |
"You can customize the display of this screen’s contents in a number "
|
621 |
"of ways:"
|
643 |
msgstr ""
|
644 |
|
645 |
#: includes/admin/forums.php:134 includes/admin/replies.php:146
|
646 |
+
#: includes/admin/topics.php:150
|
647 |
msgid "Available Actions"
|
648 |
msgstr ""
|
649 |
|
673 |
msgstr ""
|
674 |
|
675 |
#: includes/admin/forums.php:147 includes/admin/replies.php:162
|
676 |
+
#: includes/admin/tools/repair.php:52 includes/admin/tools/repair.php:148
|
677 |
+
#: includes/admin/tools/upgrades.php:49 includes/admin/tools/upgrades.php:145
|
678 |
+
#: includes/admin/topics.php:168
|
679 |
msgid "Bulk Actions"
|
680 |
msgstr ""
|
681 |
|
695 |
|
696 |
#: includes/admin/forums.php:155 includes/admin/forums.php:213
|
697 |
#: includes/admin/replies.php:170 includes/admin/replies.php:226
|
698 |
+
#: includes/admin/settings.php:1804 includes/admin/tools/help.php:45
|
699 |
+
#: includes/admin/tools/help.php:76 includes/admin/tools/help.php:137
|
700 |
+
#: includes/admin/topics.php:176 includes/admin/topics.php:231
|
701 |
msgid "For more information:"
|
702 |
msgstr ""
|
703 |
|
704 |
#: includes/admin/forums.php:156 includes/admin/forums.php:214
|
705 |
#: includes/admin/replies.php:171 includes/admin/replies.php:227
|
706 |
+
#: includes/admin/settings.php:1805 includes/admin/tools/help.php:46
|
707 |
+
#: includes/admin/tools/help.php:77 includes/admin/tools/help.php:138
|
708 |
+
#: includes/admin/topics.php:177 includes/admin/topics.php:232
|
709 |
msgid ""
|
710 |
"<a href=\"https://codex.bbpress.org\" target=\"_blank\">bbPress "
|
711 |
"Documentation</a>"
|
713 |
|
714 |
#: includes/admin/forums.php:157 includes/admin/forums.php:215
|
715 |
#: includes/admin/replies.php:172 includes/admin/replies.php:228
|
716 |
+
#: includes/admin/settings.php:1806 includes/admin/tools/help.php:47
|
717 |
+
#: includes/admin/tools/help.php:78 includes/admin/tools/help.php:139
|
718 |
+
#: includes/admin/topics.php:178 includes/admin/topics.php:233
|
719 |
msgid ""
|
720 |
"<a href=\"https://bbpress.org/forums/\" target=\"_blank\">bbPress Support "
|
721 |
"Forums</a>"
|
732 |
msgstr ""
|
733 |
|
734 |
#: includes/admin/forums.php:174 includes/admin/replies.php:189
|
735 |
+
#: includes/admin/topics.php:195
|
736 |
msgid "Customizing This Display"
|
737 |
msgstr ""
|
738 |
|
818 |
msgstr ""
|
819 |
|
820 |
#: includes/admin/forums.php:208 includes/admin/replies.php:221
|
821 |
+
#: includes/admin/topics.php:226
|
822 |
msgid "Publish Box"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: includes/admin/forums.php:258 includes/admin/settings.php:192
|
826 |
+
#: includes/admin/tools/reset.php:44
|
827 |
msgid "Forum Moderators"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: includes/admin/forums.php:290 includes/admin/settings.php:168
|
831 |
+
#: includes/admin/settings.php:412 includes/admin/tools/common.php:317
|
832 |
+
#: includes/admin/topics.php:502 includes/extend/buddypress/loader.php:250
|
833 |
+
#: templates/default/bbpress/user-details.php:67
|
834 |
msgid "Subscriptions"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: includes/admin/forums.php:412
|
838 |
msgid "The forum was not found."
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: includes/admin/forums.php:417 includes/admin/replies.php:494
|
842 |
+
#: includes/admin/topics.php:629
|
843 |
msgid "You do not have permission to do that."
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/admin/forums.php:508
|
847 |
msgid "There was a problem opening the forum \"%1$s\"."
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: includes/admin/forums.php:509
|
851 |
msgid "Forum \"%1$s\" successfully opened."
|
852 |
msgstr ""
|
853 |
|
854 |
+
#: includes/admin/forums.php:514
|
855 |
msgid "There was a problem closing the forum \"%1$s\"."
|
856 |
msgstr ""
|
857 |
|
858 |
+
#: includes/admin/forums.php:515
|
859 |
msgid "Forum \"%1$s\" successfully closed."
|
860 |
msgstr ""
|
861 |
|
862 |
+
#: includes/admin/forums.php:583 includes/admin/metaboxes.php:661
|
863 |
msgid "Moderators"
|
864 |
msgstr ""
|
865 |
|
866 |
+
#: includes/admin/forums.php:584
|
867 |
+
#: templates/default/bbpress/content-single-topic-lead.php:19
|
868 |
+
#: templates/default/bbpress/content-single-topic-lead.php:87
|
869 |
msgid "Creator"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: includes/admin/forums.php:585 includes/admin/replies.php:687
|
873 |
+
#: includes/admin/topics.php:893
|
874 |
msgid "Created"
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: includes/admin/forums.php:586 includes/admin/topics.php:894
|
878 |
+
#: templates/default/bbpress/loop-forums.php:26
|
879 |
+
#: templates/default/bbpress/loop-topics.php:24
|
880 |
msgid "Last Post"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: includes/admin/forums.php:630
|
884 |
msgid "—"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: includes/admin/forums.php:647 includes/forums/template.php:633
|
888 |
msgid "No Topics"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: includes/admin/forums.php:688
|
892 |
msgid "Close this forum"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: includes/admin/forums.php:690
|
896 |
msgid "Open this forum"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: includes/admin/forums.php:732 includes/admin/forums.php:744
|
900 |
msgid "Forum updated."
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: includes/admin/forums.php:734 includes/admin/forums.php:757
|
904 |
msgid "View forum"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: includes/admin/forums.php:738 includes/admin/replies.php:990
|
908 |
+
#: includes/admin/topics.php:1203
|
909 |
msgid "Custom field updated."
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: includes/admin/forums.php:741 includes/admin/replies.php:993
|
913 |
+
#: includes/admin/topics.php:1206
|
914 |
msgid "Custom field deleted."
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/admin/forums.php:749
|
918 |
#. translators: %s: date and time of the revision
|
919 |
msgid "Forum restored to revision from %s"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: includes/admin/forums.php:755
|
923 |
msgid "Forum created."
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: includes/admin/forums.php:761
|
927 |
msgid "Forum saved."
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: includes/admin/forums.php:766
|
931 |
msgid "Forum submitted."
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: includes/admin/forums.php:768 includes/admin/forums.php:780
|
935 |
+
#: includes/admin/forums.php:788
|
936 |
msgid "Preview forum"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: includes/admin/forums.php:775
|
940 |
msgid "Forum scheduled for: %s."
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: includes/admin/forums.php:777 includes/admin/replies.php:1029
|
944 |
+
#: includes/admin/topics.php:1242
|
945 |
#. translators: Publish box date format, see http:php.net/date
|
946 |
msgid "M j, Y @ G:i"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: includes/admin/forums.php:786
|
950 |
msgid "Forum draft updated."
|
951 |
msgstr ""
|
952 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
953 |
#: includes/admin/metaboxes.php:28
|
954 |
msgid "%s Forum"
|
955 |
msgid_plural "%s Forums"
|
984 |
msgstr[0] ""
|
985 |
msgstr[1] ""
|
986 |
|
987 |
+
#: includes/admin/metaboxes.php:150 includes/admin/settings.php:343
|
988 |
+
#: includes/topics/template.php:3741
|
989 |
msgid "Topic Tag"
|
990 |
msgid_plural "Topic Tags"
|
991 |
msgstr[0] ""
|
1030 |
|
1031 |
#: includes/admin/metaboxes.php:319 includes/admin/metaboxes.php:320
|
1032 |
#: includes/admin/metaboxes.php:409 includes/admin/metaboxes.php:475
|
1033 |
+
#: templates/default/bbpress/form-forum.php:121
|
1034 |
msgid "Status:"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
#: includes/admin/metaboxes.php:331 includes/admin/metaboxes.php:332
|
1038 |
+
#: templates/default/bbpress/form-forum.php:130
|
1039 |
msgid "Visibility:"
|
1040 |
msgstr ""
|
1041 |
|
1047 |
msgid "Forum Parent"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: includes/admin/metaboxes.php:359 includes/admin/settings.php:1343
|
1051 |
+
#: templates/default/bbpress/form-forum.php:144
|
1052 |
+
msgid "— No parent —"
|
|
|
1053 |
msgstr ""
|
1054 |
|
1055 |
#: includes/admin/metaboxes.php:366
|
1069 |
msgstr ""
|
1070 |
|
1071 |
#: includes/admin/metaboxes.php:424 includes/admin/metaboxes.php:491
|
1072 |
+
#: includes/extend/buddypress/groups.php:1211 includes/topics/template.php:69
|
1073 |
+
#: templates/default/bbpress/form-topic.php:124
|
1074 |
+
#: templates/default/bbpress/loop-search-forum.php:25
|
1075 |
msgid "Forum:"
|
1076 |
msgstr ""
|
1077 |
|
1078 |
+
#: includes/admin/metaboxes.php:438 includes/extend/buddypress/groups.php:352
|
1079 |
+
#: templates/default/bbpress/form-topic.php:127
|
1080 |
+
msgid "— No forum —"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
#: includes/admin/metaboxes.php:477
|
1088 |
msgid "— No reply —"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: includes/admin/metaboxes.php:518 includes/replies/template.php:69
|
1092 |
+
#: templates/default/bbpress/loop-search-topic.php:25
|
1093 |
msgid "Topic:"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
#: includes/admin/metaboxes.php:531
|
1097 |
+
#: templates/default/bbpress/form-reply.php:129
|
1098 |
msgid "Reply To:"
|
1099 |
msgstr ""
|
1100 |
|
1103 |
msgstr ""
|
1104 |
|
1105 |
#: includes/admin/metaboxes.php:606
|
1106 |
+
#: templates/default/bbpress/form-topic-tag.php:40
|
1107 |
msgid "Name:"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
#: includes/admin/metaboxes.php:607
|
1111 |
+
#: templates/default/bbpress/form-user-edit.php:17
|
1112 |
+
#: templates/default/bbpress/form-user-edit.php:22
|
1113 |
msgid "Name"
|
1114 |
msgstr ""
|
1115 |
|
1118 |
msgstr ""
|
1119 |
|
1120 |
#: includes/admin/metaboxes.php:613
|
1121 |
+
#: templates/default/bbpress/form-user-edit.php:112
|
1122 |
+
#: templates/default/bbpress/form-user-register.php:34
|
1123 |
msgid "Email"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
#: includes/admin/metaboxes.php:618
|
1127 |
+
#: templates/default/bbpress/form-anonymous.php:33
|
1128 |
msgid "Website:"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
#: includes/admin/metaboxes.php:619
|
1132 |
+
#: templates/default/bbpress/form-user-edit.php:60
|
1133 |
msgid "Website"
|
1134 |
msgstr ""
|
1135 |
|
1149 |
msgid "IP Address"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: includes/admin/metaboxes.php:663
|
1153 |
+
msgid "Separate user-names with commas"
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: includes/admin/metaboxes.php:697
|
1157 |
+
msgid "No users have engaged to this topic."
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: includes/admin/metaboxes.php:733
|
1161 |
msgid "No users have favorited this topic."
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: includes/admin/metaboxes.php:769
|
1165 |
msgid "No users have subscribed to this topic."
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: includes/admin/metaboxes.php:805
|
1169 |
msgid "No users have subscribed to this forum."
|
1170 |
msgstr ""
|
1171 |
|
1230 |
msgid "<strong>View</strong> will take you to your live site to view the reply."
|
1231 |
msgstr ""
|
1232 |
|
1233 |
+
#: includes/admin/replies.php:155 includes/admin/topics.php:158
|
1234 |
msgid "<strong>Approve</strong> will change the status from pending to publish."
|
1235 |
msgstr ""
|
1236 |
|
1328 |
msgid "<strong>Reply To</strong> determines the threading of the reply."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: includes/admin/replies.php:244 includes/admin/topics.php:249
|
1332 |
+
#: includes/replies/template.php:2259 includes/topics/template.php:3163
|
1333 |
msgid "Unspam"
|
1334 |
msgstr ""
|
1335 |
|
1349 |
msgstr[0] ""
|
1350 |
msgstr[1] ""
|
1351 |
|
1352 |
+
#: includes/admin/replies.php:288 includes/admin/topics.php:293
|
1353 |
msgid "Sorry, you are not allowed to spam this item."
|
1354 |
msgstr ""
|
1355 |
|
1365 |
msgid "Error in unspamming reply."
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: includes/admin/replies.php:373 includes/admin/topics.php:372
|
1369 |
+
#: templates/default/bbpress/form-anonymous.php:18
|
1370 |
msgid "Author Information"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
+
#: includes/admin/replies.php:489
|
1374 |
msgid "The reply was not found."
|
1375 |
msgstr ""
|
1376 |
|
1377 |
+
#: includes/admin/replies.php:598
|
1378 |
msgid "There was a problem marking the reply \"%1$s\" as spam."
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: includes/admin/replies.php:599
|
1382 |
msgid "Reply \"%1$s\" successfully marked as spam."
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: includes/admin/replies.php:604
|
1386 |
msgid "There was a problem unmarking the reply \"%1$s\" as spam."
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: includes/admin/replies.php:605
|
1390 |
msgid "Reply \"%1$s\" successfully unmarked as spam."
|
1391 |
msgstr ""
|
1392 |
|
1393 |
+
#: includes/admin/replies.php:610
|
1394 |
msgid "There was a problem approving the reply \"%1$s\"."
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: includes/admin/replies.php:611
|
1398 |
msgid "Reply \"%1$s\" successfully approved."
|
1399 |
msgstr ""
|
1400 |
|
1401 |
+
#: includes/admin/replies.php:616
|
1402 |
msgid "There was a problem unapproving the reply \"%1$s\"."
|
1403 |
msgstr ""
|
1404 |
|
1405 |
+
#: includes/admin/replies.php:617
|
1406 |
msgid "Reply \"%1$s\" successfully unapproved."
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: includes/admin/replies.php:683
|
1410 |
msgid "Title"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: includes/admin/replies.php:745
|
1414 |
+
msgid "No topic"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: includes/admin/replies.php:766
|
1418 |
+
msgid "(Mismatch)"
|
|
|
1419 |
msgstr ""
|
1420 |
|
1421 |
+
#: includes/admin/replies.php:778 includes/admin/topics.php:949
|
1422 |
+
msgid "No forum"
|
1423 |
msgstr ""
|
1424 |
|
1425 |
+
#: includes/admin/replies.php:844 includes/admin/topics.php:1038
|
1426 |
+
#: includes/admin/topics.php:1051
|
1427 |
msgid "View “%s”"
|
1428 |
msgstr ""
|
1429 |
|
1430 |
+
#: includes/admin/replies.php:857
|
1431 |
msgid "Unapprove this reply"
|
1432 |
msgstr ""
|
1433 |
|
1434 |
+
#: includes/admin/replies.php:859
|
1435 |
msgid "Approve this reply"
|
1436 |
msgstr ""
|
1437 |
|
1438 |
+
#: includes/admin/replies.php:866
|
1439 |
msgid "Mark the reply as not spam"
|
1440 |
msgstr ""
|
1441 |
|
1442 |
+
#: includes/admin/replies.php:866 includes/admin/topics.php:1080
|
1443 |
msgid "Not spam"
|
1444 |
msgstr ""
|
1445 |
|
1446 |
+
#: includes/admin/replies.php:868
|
1447 |
msgid "Mark this reply as spam"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
+
#: includes/admin/replies.php:879 includes/admin/topics.php:1092
|
1451 |
+
#: includes/replies/template.php:2196 includes/topics/template.php:2841
|
1452 |
msgid "Restore this item from the Trash"
|
1453 |
msgstr ""
|
1454 |
|
1455 |
+
#: includes/admin/replies.php:879 includes/admin/topics.php:1092
|
1456 |
+
#: includes/replies/template.php:2179 includes/topics/template.php:2825
|
1457 |
msgid "Restore"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
+
#: includes/admin/replies.php:881 includes/admin/topics.php:1094
|
1461 |
+
#: includes/replies/template.php:2200 includes/topics/template.php:2843
|
1462 |
msgid "Move this item to the Trash"
|
1463 |
msgstr ""
|
1464 |
|
1465 |
+
#: includes/admin/replies.php:885 includes/admin/topics.php:1098
|
1466 |
+
#: includes/replies/template.php:2205 includes/topics/template.php:2847
|
1467 |
msgid "Delete this item permanently"
|
1468 |
msgstr ""
|
1469 |
|
1470 |
+
#: includes/admin/replies.php:885 includes/admin/topics.php:1098
|
1471 |
msgid "Delete Permanently"
|
1472 |
msgstr ""
|
1473 |
|
1474 |
+
#: includes/admin/replies.php:910 includes/admin/topics.php:1123
|
1475 |
msgid "Empty Spam"
|
1476 |
msgstr ""
|
1477 |
|
1478 |
+
#: includes/admin/replies.php:925 includes/admin/topics.php:1138
|
1479 |
msgid "In all forums"
|
1480 |
msgstr ""
|
1481 |
|
1482 |
+
#: includes/admin/replies.php:984 includes/admin/replies.php:996
|
1483 |
msgid "Reply updated."
|
1484 |
msgstr ""
|
1485 |
|
1486 |
+
#: includes/admin/replies.php:986 includes/admin/replies.php:1009
|
1487 |
+
#: includes/admin/topics.php:1199 includes/admin/topics.php:1222
|
1488 |
msgid "View topic"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
+
#: includes/admin/replies.php:1001
|
1492 |
#. translators: %s: date and time of the revision
|
1493 |
msgid "Reply restored to revision from %s"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
+
#: includes/admin/replies.php:1007
|
1497 |
msgid "Reply created."
|
1498 |
msgstr ""
|
1499 |
|
1500 |
+
#: includes/admin/replies.php:1013
|
1501 |
msgid "Reply saved."
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: includes/admin/replies.php:1018
|
1505 |
msgid "Reply submitted."
|
1506 |
msgstr ""
|
1507 |
|
1508 |
+
#: includes/admin/replies.php:1020 includes/admin/replies.php:1032
|
1509 |
+
#: includes/admin/replies.php:1040 includes/admin/topics.php:1233
|
1510 |
+
#: includes/admin/topics.php:1245 includes/admin/topics.php:1253
|
1511 |
msgid "Preview topic"
|
1512 |
msgstr ""
|
1513 |
|
1514 |
+
#: includes/admin/replies.php:1027
|
1515 |
msgid "Reply scheduled for: %s."
|
1516 |
msgstr ""
|
1517 |
|
1518 |
+
#: includes/admin/replies.php:1038
|
1519 |
msgid "Reply draft updated."
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: includes/admin/settings.php:27
|
1523 |
msgid "Forum User Settings"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
+
#: includes/admin/settings.php:32
|
1527 |
msgid "Forum Features"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
+
#: includes/admin/settings.php:37
|
1531 |
msgid "Forum Theme Packages"
|
1532 |
msgstr ""
|
1533 |
|
1534 |
+
#: includes/admin/settings.php:42
|
1535 |
msgid "Topics and Replies Per Page"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: includes/admin/settings.php:47
|
1539 |
msgid "Topics and Replies Per RSS Page"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
+
#: includes/admin/settings.php:52
|
1543 |
msgid "Forum Root Slug"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: includes/admin/settings.php:57
|
1547 |
+
msgid "Forum Single Slugs"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
+
#: includes/admin/settings.php:62
|
1551 |
msgid "Forum User Slugs"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
+
#: includes/admin/settings.php:67
|
1555 |
+
msgid "Forum Integration for BuddyPress"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: includes/admin/settings.php:72
|
1559 |
+
msgid "Forum Integration for Akismet"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
+
#: includes/admin/settings.php:103
|
1563 |
+
msgid "Roles"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
+
#: includes/admin/settings.php:117
|
1567 |
+
msgid "Flooding"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
+
#: includes/admin/settings.php:131
|
1571 |
+
msgid "Editing"
|
1572 |
msgstr ""
|
1573 |
|
1574 |
+
#: includes/admin/settings.php:139 includes/replies/template.php:1197
|
1575 |
+
#: includes/topics/template.php:1502 includes/users/template.php:404
|
1576 |
+
msgid "Anonymous"
|
1577 |
msgstr ""
|
1578 |
|
1579 |
+
#: includes/admin/settings.php:152 includes/admin/settings.php:1899
|
1580 |
msgid "Revisions"
|
1581 |
msgstr ""
|
1582 |
|
1583 |
+
#: includes/admin/settings.php:160 includes/admin/tools/common.php:314
|
1584 |
+
#: includes/admin/topics.php:470 includes/extend/buddypress/loader.php:237
|
1585 |
+
#: templates/default/bbpress/user-details.php:57
|
1586 |
msgid "Favorites"
|
1587 |
msgstr ""
|
1588 |
|
1589 |
+
#: includes/admin/settings.php:176 includes/admin/settings.php:420
|
1590 |
+
#: includes/admin/tools/common.php:320 includes/admin/topics.php:438
|
1591 |
+
#: includes/extend/buddypress/loader.php:224
|
1592 |
+
#: includes/extend/buddypress/loader.php:326
|
1593 |
+
#: templates/default/bbpress/user-details.php:49
|
1594 |
+
msgid "Engagements"
|
1595 |
+
msgstr ""
|
1596 |
+
|
1597 |
+
#: includes/admin/settings.php:184
|
1598 |
msgid "Topic tags"
|
1599 |
msgstr ""
|
1600 |
|
1601 |
+
#: includes/admin/settings.php:200 includes/admin/settings.php:367
|
1602 |
+
#: includes/common/template.php:2575 includes/search/template.php:232
|
1603 |
+
#: templates/default/bbpress/form-search.php:20
|
1604 |
msgid "Search"
|
1605 |
msgstr ""
|
1606 |
|
1607 |
+
#: includes/admin/settings.php:208
|
1608 |
msgid "Post Formatting"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
+
#: includes/admin/settings.php:216
|
1612 |
msgid "Auto-embed links"
|
1613 |
msgstr ""
|
1614 |
|
1615 |
+
#: includes/admin/settings.php:224
|
1616 |
msgid "Reply Threading"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
+
#: includes/admin/settings.php:243
|
1620 |
msgid "Current Package"
|
1621 |
msgstr ""
|
1622 |
|
1623 |
+
#: includes/admin/settings.php:298
|
1624 |
msgid "Forum Root"
|
1625 |
msgstr ""
|
1626 |
|
1627 |
+
#: includes/admin/settings.php:306
|
1628 |
msgid "Forum Prefix"
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: includes/admin/settings.php:314
|
1632 |
msgid "Forum root should show"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
+
#: includes/admin/settings.php:351
|
1636 |
msgid "Topic View"
|
1637 |
msgstr ""
|
1638 |
|
1639 |
+
#: includes/admin/settings.php:380
|
1640 |
msgid "User Base"
|
1641 |
msgstr ""
|
1642 |
|
1643 |
+
#: includes/admin/settings.php:388 includes/extend/buddypress/loader.php:201
|
1644 |
+
#: includes/extend/buddypress/loader.php:309
|
1645 |
+
#: templates/default/bbpress/user-details.php:36
|
1646 |
msgid "Topics Started"
|
1647 |
msgstr ""
|
1648 |
|
1649 |
+
#: includes/admin/settings.php:396 includes/extend/buddypress/loader.php:212
|
1650 |
+
#: includes/extend/buddypress/loader.php:317
|
1651 |
+
#: templates/default/bbpress/user-details.php:42
|
1652 |
msgid "Replies Created"
|
1653 |
msgstr ""
|
1654 |
|
1655 |
+
#: includes/admin/settings.php:404 includes/extend/buddypress/loader.php:336
|
1656 |
msgid "Favorite Topics"
|
1657 |
msgstr ""
|
1658 |
|
1659 |
+
#: includes/admin/settings.php:433 includes/admin/tools/upgrades.php:323
|
1660 |
+
#: includes/extend/buddypress/functions.php:366
|
1661 |
+
msgid "Group Forums"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: includes/admin/settings.php:441
|
1665 |
+
msgid "Primary Forum"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: includes/admin/settings.php:454
|
1669 |
msgid "Use Akismet"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: includes/admin/settings.php:507
|
1673 |
msgid "Setting time limits and other user posting capabilities"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: includes/admin/settings.php:533
|
1677 |
+
msgid "Allow users to edit their content for %s minutes after posting"
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: includes/admin/settings.php:535
|
1681 |
+
msgid "If checked, setting to \"0 minutes\" allows editing forever."
|
1682 |
msgstr ""
|
1683 |
|
1684 |
+
#: includes/admin/settings.php:560
|
1685 |
+
msgid "Allow flood protection by throttling users for %s seconds after posting"
|
1686 |
+
msgstr ""
|
1687 |
+
|
1688 |
+
#: includes/admin/settings.php:562
|
1689 |
+
msgid "Use this to discourage users from spamming your forums."
|
1690 |
+
msgstr ""
|
1691 |
+
|
1692 |
+
#: includes/admin/settings.php:578
|
1693 |
msgid "Allow guest users without accounts to create topics and replies"
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: includes/admin/settings.php:579
|
1697 |
+
msgid "Works best on intranets or paired with antispam measures like Akismet."
|
1698 |
+
msgstr ""
|
1699 |
+
|
1700 |
+
#: includes/admin/settings.php:614
|
1701 |
msgid "Automatically give registered visitors the %s forum role"
|
1702 |
msgstr ""
|
1703 |
|
1704 |
+
#: includes/admin/settings.php:616
|
1705 |
+
msgid "Uncheck this to manually assign all user access to your forums."
|
1706 |
+
msgstr ""
|
1707 |
+
|
1708 |
+
#: includes/admin/settings.php:631
|
1709 |
msgid "Forum features that can be toggled on and off"
|
1710 |
msgstr ""
|
1711 |
|
1712 |
+
#: includes/admin/settings.php:647
|
1713 |
msgid "Allow users to mark topics as favorites"
|
1714 |
msgstr ""
|
1715 |
|
1716 |
+
#: includes/admin/settings.php:663
|
1717 |
msgid "Allow users to subscribe to forums and topics"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: includes/admin/settings.php:679
|
1721 |
+
msgid "Allow tracking of topics each user engages in"
|
1722 |
+
msgstr ""
|
1723 |
+
|
1724 |
+
#: includes/admin/settings.php:695
|
1725 |
msgid "Allow topics to have tags"
|
1726 |
msgstr ""
|
1727 |
|
1728 |
+
#: includes/admin/settings.php:711
|
1729 |
msgid "Allow forums to have dedicated moderators"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
+
#: includes/admin/settings.php:727
|
1733 |
msgid "Allow forum wide search"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: includes/admin/settings.php:766
|
1737 |
msgid "Enable threaded (nested) replies %s levels deep"
|
1738 |
msgstr ""
|
1739 |
|
1740 |
+
#: includes/admin/settings.php:783
|
1741 |
msgid "Allow topic and reply revision logging"
|
1742 |
msgstr ""
|
1743 |
|
1744 |
+
#: includes/admin/settings.php:799
|
1745 |
msgid "Add toolbar & buttons to textareas to help with HTML formatting"
|
1746 |
msgstr ""
|
1747 |
|
1748 |
+
#: includes/admin/settings.php:812
|
1749 |
msgid "How your forum content is displayed within your existing theme."
|
1750 |
msgstr ""
|
1751 |
|
1752 |
+
#: includes/admin/settings.php:842
|
|
|
|
|
|
|
|
|
|
|
1753 |
msgid "will serve all bbPress templates"
|
1754 |
msgstr ""
|
1755 |
|
1756 |
+
#: includes/admin/settings.php:846
|
1757 |
msgid "No template packages available."
|
1758 |
msgstr ""
|
1759 |
|
1760 |
+
#: includes/admin/settings.php:862
|
1761 |
msgid ""
|
1762 |
"Embed media (YouTube, Twitter, Flickr, etc...) directly into topics and "
|
1763 |
"replies"
|
1764 |
msgstr ""
|
1765 |
|
1766 |
+
#: includes/admin/settings.php:877
|
1767 |
msgid "How many topics and replies to show per page"
|
1768 |
msgstr ""
|
1769 |
|
1770 |
+
#: includes/admin/settings.php:893 includes/admin/settings.php:909
|
1771 |
+
#: includes/admin/settings.php:940 includes/admin/settings.php:956
|
1772 |
msgid "per page"
|
1773 |
msgstr ""
|
1774 |
|
1775 |
+
#: includes/admin/settings.php:924
|
1776 |
msgid "How many topics and replies to show per RSS page"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: includes/admin/settings.php:975
|
1780 |
msgid ""
|
1781 |
"Customize your Forums root. Partner with a WordPress Page and use "
|
1782 |
"Shortcodes for more flexibility."
|
1783 |
msgstr ""
|
1784 |
|
1785 |
+
#: includes/admin/settings.php:1008
|
1786 |
msgid "Prefix all forum content with the Forum Root slug (Recommended)"
|
1787 |
msgstr ""
|
1788 |
|
1789 |
+
#: includes/admin/settings.php:1028
|
1790 |
msgid "Forum Index"
|
1791 |
msgstr ""
|
1792 |
|
1793 |
+
#: includes/admin/settings.php:1031
|
1794 |
msgid "Topics by Last Post"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
+
#: includes/admin/settings.php:1053
|
1798 |
+
msgid "This setting will be ignored because %s was found in your theme."
|
1799 |
+
msgstr ""
|
1800 |
+
|
1801 |
+
#: includes/admin/settings.php:1068
|
1802 |
msgid "Customize your user profile slugs."
|
1803 |
msgstr ""
|
1804 |
|
1805 |
+
#: includes/admin/settings.php:1185
|
1806 |
msgid "Custom slugs for single forums, topics, replies, tags, views, and search."
|
1807 |
msgstr ""
|
1808 |
|
1809 |
+
#: includes/admin/settings.php:1303
|
1810 |
+
msgid "Configure how Forum settings for BuddyPress"
|
1811 |
msgstr ""
|
1812 |
|
1813 |
+
#: includes/admin/settings.php:1319
|
1814 |
msgid "Allow BuddyPress Groups to have their own forums"
|
1815 |
msgstr ""
|
1816 |
|
1817 |
+
#: includes/admin/settings.php:1365
|
1818 |
+
msgid "create a new one"
|
1819 |
msgstr ""
|
1820 |
|
1821 |
+
#: includes/admin/settings.php:1366
|
1822 |
+
msgid "Use %s to contain your group forums, or %s"
|
1823 |
msgstr ""
|
1824 |
|
1825 |
+
#: includes/admin/settings.php:1368
|
1826 |
+
msgid "Use %s to contain your group forums"
|
1827 |
+
msgstr ""
|
1828 |
+
|
1829 |
+
#: includes/admin/settings.php:1373
|
1830 |
+
msgid "Changing this will not move existing forums."
|
1831 |
msgstr ""
|
1832 |
|
1833 |
+
#: includes/admin/settings.php:1388
|
1834 |
msgid "Forum settings for Akismet"
|
1835 |
msgstr ""
|
1836 |
|
1837 |
+
#: includes/admin/settings.php:1405
|
1838 |
msgid "Allow Akismet to actively prevent forum spam."
|
1839 |
msgstr ""
|
1840 |
|
1841 |
+
#: includes/admin/settings.php:1424
|
1842 |
msgid "Forums Settings"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: includes/admin/settings.php:1434
|
1846 |
+
#: templates/default/bbpress/form-user-edit.php:173
|
1847 |
msgid "Save Changes"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
+
#: includes/admin/settings.php:1453
|
1851 |
msgid ""
|
1852 |
"Information about your previous forums database so that they can be "
|
1853 |
"converted. <strong>Backup your database before proceeding.</strong>"
|
1854 |
msgstr ""
|
1855 |
|
1856 |
+
#: includes/admin/settings.php:1475
|
1857 |
msgid "is the previous forum software"
|
1858 |
msgstr ""
|
1859 |
|
1860 |
+
#: includes/admin/settings.php:1489
|
1861 |
+
msgid "Use default \"localhost\" if on the same server, otherwise IP or hostname"
|
1862 |
msgstr ""
|
1863 |
|
1864 |
+
#: includes/admin/settings.php:1503
|
1865 |
+
msgid "Use default \"3306\" if unsure"
|
1866 |
msgstr ""
|
1867 |
|
1868 |
+
#: includes/admin/settings.php:1517
|
1869 |
+
msgid "User to acces the database"
|
1870 |
msgstr ""
|
1871 |
|
1872 |
+
#: includes/admin/settings.php:1531
|
1873 |
+
msgid "Password of the above database user"
|
1874 |
msgstr ""
|
1875 |
|
1876 |
+
#: includes/admin/settings.php:1545
|
1877 |
msgid "Name of the database with your old forum data"
|
1878 |
msgstr ""
|
1879 |
|
1880 |
+
#: includes/admin/settings.php:1558
|
1881 |
msgid "Some optional parameters to help tune the conversion process."
|
1882 |
msgstr ""
|
1883 |
|
1884 |
+
#: includes/admin/settings.php:1572
|
1885 |
msgid "(If converting from BuddyPress Forums, use \"wp_bb_\" or your custom prefix)"
|
1886 |
msgstr ""
|
1887 |
|
1888 |
+
#: includes/admin/settings.php:1586
|
1889 |
msgid "rows to process at a time"
|
1890 |
msgstr ""
|
1891 |
|
1892 |
+
#: includes/admin/settings.php:1587
|
1893 |
msgid "Keep this low if you experience out-of-memory issues."
|
1894 |
msgstr ""
|
1895 |
|
1896 |
+
#: includes/admin/settings.php:1601
|
1897 |
msgid "second(s) delay between each group of rows"
|
1898 |
msgstr ""
|
1899 |
|
1900 |
+
#: includes/admin/settings.php:1602
|
1901 |
msgid "Keep this high to prevent too-many-connection issues."
|
1902 |
msgstr ""
|
1903 |
|
1904 |
+
#: includes/admin/settings.php:1616
|
1905 |
msgid "Start a fresh conversion from the beginning"
|
1906 |
msgstr ""
|
1907 |
|
1908 |
+
#: includes/admin/settings.php:1617
|
1909 |
msgid "You should clean old conversion information before starting over."
|
1910 |
msgstr ""
|
1911 |
|
1912 |
+
#: includes/admin/settings.php:1631
|
1913 |
msgid "Purge all information from a previously attempted import"
|
1914 |
msgstr ""
|
1915 |
|
1916 |
+
#: includes/admin/settings.php:1632
|
1917 |
msgid "Use this if an import failed and you want to remove that incomplete data."
|
1918 |
msgstr ""
|
1919 |
|
1920 |
+
#: includes/admin/settings.php:1646
|
1921 |
msgid "Attempt to import user accounts from previous forums"
|
1922 |
msgstr ""
|
1923 |
|
1924 |
+
#: includes/admin/settings.php:1647
|
1925 |
msgid ""
|
1926 |
"Non-bbPress passwords cannot be automatically converted. They will be "
|
1927 |
"converted as each user logs in."
|
1928 |
msgstr ""
|
1929 |
|
1930 |
+
#: includes/admin/settings.php:1673
|
1931 |
+
msgid "Previously stopped at step %d of %d"
|
1932 |
+
msgstr ""
|
1933 |
+
|
1934 |
+
#: includes/admin/settings.php:1674
|
1935 |
+
msgid "Ready to go."
|
1936 |
+
msgstr ""
|
1937 |
+
|
1938 |
+
#: includes/admin/settings.php:1677 includes/admin/tools/repair.php:33
|
1939 |
+
#: includes/admin/tools/reset.php:26 includes/admin/tools/upgrades.php:30
|
1940 |
msgid "Forum Tools"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
+
#: includes/admin/settings.php:1679 includes/admin/tools.php:485
|
1944 |
+
msgid "Import Forums"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
+
#: includes/admin/settings.php:1689
|
1948 |
msgid "Stop"
|
1949 |
msgstr ""
|
1950 |
|
1951 |
+
#: includes/admin/settings.php:1699
|
1952 |
+
msgid "Toggle panel: Import Status"
|
1953 |
+
msgstr ""
|
1954 |
+
|
1955 |
+
#: includes/admin/settings.php:1702
|
1956 |
+
msgid "Import Monitor"
|
1957 |
+
msgstr ""
|
1958 |
+
|
1959 |
+
#: includes/admin/settings.php:1739
|
1960 |
msgid "This screen provides access to all of the Forums settings."
|
1961 |
msgstr ""
|
1962 |
|
1963 |
+
#: includes/admin/settings.php:1740 includes/admin/tools/help.php:104
|
1964 |
msgid ""
|
1965 |
"Please see the additional help tabs for more information on each individual "
|
1966 |
"section."
|
1967 |
msgstr ""
|
1968 |
|
1969 |
+
#: includes/admin/settings.php:1746
|
1970 |
msgid "Main Settings"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
+
#: includes/admin/settings.php:1747
|
1974 |
+
msgid "The \"Main Settings\" section includes a number of options:"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: includes/admin/settings.php:1750
|
1978 |
msgid ""
|
1979 |
"You can choose to lock a post after a certain number of minutes. \"Locking "
|
1980 |
"post editing\" will prevent the author from editing some amount of time "
|
1981 |
"after saving a post."
|
1982 |
msgstr ""
|
1983 |
|
1984 |
+
#: includes/admin/settings.php:1751
|
1985 |
msgid ""
|
1986 |
"\"Throttle time\" is the amount of time required between posts from a "
|
1987 |
"single author. The higher the throttle time, the longer a user will need to "
|
1988 |
"wait between posting to the forum."
|
1989 |
msgstr ""
|
1990 |
|
1991 |
+
#: includes/admin/settings.php:1752
|
1992 |
msgid ""
|
1993 |
"Favorites are a way for users to save and later return to topics they "
|
1994 |
"favor. This is enabled by default."
|
1995 |
msgstr ""
|
1996 |
|
1997 |
+
#: includes/admin/settings.php:1753
|
1998 |
msgid ""
|
1999 |
"Subscriptions allow users to subscribe for notifications to topics that "
|
2000 |
"interest them. This is enabled by default."
|
2001 |
msgstr ""
|
2002 |
|
2003 |
+
#: includes/admin/settings.php:1754
|
2004 |
msgid ""
|
2005 |
"Topic-Tags allow users to filter topics between forums. This is enabled by "
|
2006 |
"default."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
+
#: includes/admin/settings.php:1755
|
2010 |
msgid ""
|
2011 |
"\"Anonymous Posting\" allows guest users who do not have accounts on your "
|
2012 |
"site to both create topics as well as replies."
|
2013 |
msgstr ""
|
2014 |
|
2015 |
+
#: includes/admin/settings.php:1756
|
2016 |
msgid ""
|
2017 |
"The Fancy Editor brings the luxury of the Visual editor and HTML editor "
|
2018 |
"from the traditional WordPress dashboard into your theme."
|
2019 |
msgstr ""
|
2020 |
|
2021 |
+
#: includes/admin/settings.php:1757
|
2022 |
msgid ""
|
2023 |
"Auto-embed will embed the media content from a URL directly into the "
|
2024 |
"replies. For example: links to Flickr and YouTube."
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: includes/admin/settings.php:1760
|
2028 |
msgid ""
|
2029 |
"You must click the Save Changes button at the bottom of the screen for new "
|
2030 |
"settings to take effect."
|
2031 |
msgstr ""
|
2032 |
|
2033 |
+
#: includes/admin/settings.php:1766
|
2034 |
+
msgid "Theme Packages"
|
2035 |
+
msgstr ""
|
2036 |
+
|
2037 |
+
#: includes/admin/settings.php:1767
|
2038 |
+
msgid ""
|
2039 |
+
"The \"Theme Packages\" section allows you to choose which theme package "
|
2040 |
+
"should be used."
|
2041 |
+
msgstr ""
|
2042 |
+
|
2043 |
+
#: includes/admin/settings.php:1770
|
2044 |
+
msgid "The \"bbPress Default\" package is installed by default."
|
2045 |
+
msgstr ""
|
2046 |
+
|
2047 |
+
#: includes/admin/settings.php:1771
|
2048 |
+
msgid "Some themes may choose to ignore this setting entirely."
|
2049 |
+
msgstr ""
|
2050 |
+
|
2051 |
+
#: includes/admin/settings.php:1772
|
2052 |
+
msgid "Packages can be stacked to allow for intelligent fallbacks."
|
2053 |
+
msgstr ""
|
2054 |
+
|
2055 |
+
#: includes/admin/settings.php:1780
|
2056 |
msgid "Per Page"
|
2057 |
msgstr ""
|
2058 |
|
2059 |
+
#: includes/admin/settings.php:1781
|
2060 |
msgid ""
|
2061 |
+
"The \"Per Page\" section allows you to control the number of topics and "
|
2062 |
+
"replies appear on each page."
|
2063 |
msgstr ""
|
2064 |
|
2065 |
+
#: includes/admin/settings.php:1783
|
2066 |
msgid ""
|
2067 |
"This is comparable to the WordPress \"Reading Settings\" page, where you "
|
2068 |
"can set the number of posts that should show on blog pages and in feeds."
|
2069 |
msgstr ""
|
2070 |
|
2071 |
+
#: includes/admin/settings.php:1784
|
2072 |
msgid ""
|
2073 |
"These are broken up into two separate groups: one for what appears in your "
|
2074 |
"theme, another for RSS feeds."
|
2075 |
msgstr ""
|
2076 |
|
2077 |
+
#: includes/admin/settings.php:1792
|
2078 |
msgid "Slugs"
|
2079 |
msgstr ""
|
2080 |
|
2081 |
+
#: includes/admin/settings.php:1793
|
2082 |
msgid ""
|
2083 |
+
"The \"Slugs\" section allows you to control the permalink structure for "
|
2084 |
+
"your forums."
|
2085 |
msgstr ""
|
2086 |
|
2087 |
+
#: includes/admin/settings.php:1795
|
2088 |
msgid ""
|
2089 |
"\"Archive Slugs\" are used as the \"root\" for your forums and topics. If "
|
2090 |
"you combine these values with existing page slugs, bbPress will attempt to "
|
2091 |
"output the most correct title and content."
|
2092 |
msgstr ""
|
2093 |
|
2094 |
+
#: includes/admin/settings.php:1796
|
2095 |
msgid ""
|
2096 |
"\"Single Slugs\" are used as a prefix when viewing an individual forum, "
|
2097 |
"topic, reply, user, or view."
|
2098 |
msgstr ""
|
2099 |
|
2100 |
+
#: includes/admin/settings.php:1797
|
2101 |
msgid ""
|
2102 |
"In the event of a slug collision with WordPress or BuddyPress, a warning "
|
2103 |
"will appear next to the problem slug(s)."
|
2104 |
msgstr ""
|
2105 |
|
2106 |
+
#: includes/admin/settings.php:1897
|
2107 |
+
#: templates/default/bbpress/loop-forums.php:24
|
2108 |
+
#: templates/default/bbpress/loop-replies.php:21
|
2109 |
+
#: templates/default/bbpress/loop-replies.php:47
|
2110 |
+
#: templates/default/bbpress/loop-topics.php:22
|
2111 |
msgid "Posts"
|
2112 |
msgstr ""
|
2113 |
|
2114 |
+
#: includes/admin/settings.php:1898
|
2115 |
msgid "Pages"
|
2116 |
msgstr ""
|
2117 |
|
2118 |
+
#: includes/admin/settings.php:1900
|
2119 |
msgid "Attachments"
|
2120 |
msgstr ""
|
2121 |
|
2122 |
+
#: includes/admin/settings.php:1901
|
2123 |
msgid "Menus"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
+
#: includes/admin/settings.php:1904
|
2127 |
msgid "Tag base"
|
2128 |
msgstr ""
|
2129 |
|
2130 |
+
#: includes/admin/settings.php:1907
|
2131 |
msgid "Category base"
|
2132 |
msgstr ""
|
2133 |
|
2134 |
+
#: includes/admin/settings.php:1912
|
2135 |
msgid "Forums base"
|
2136 |
msgstr ""
|
2137 |
|
2138 |
+
#: includes/admin/settings.php:1915
|
2139 |
msgid "Topics base"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
+
#: includes/admin/settings.php:1918
|
2143 |
msgid "Forum slug"
|
2144 |
msgstr ""
|
2145 |
|
2146 |
+
#: includes/admin/settings.php:1921
|
2147 |
msgid "Topic slug"
|
2148 |
msgstr ""
|
2149 |
|
2150 |
+
#: includes/admin/settings.php:1924
|
2151 |
msgid "Reply slug"
|
2152 |
msgstr ""
|
2153 |
|
2154 |
+
#: includes/admin/settings.php:1927
|
2155 |
msgid "User base"
|
2156 |
msgstr ""
|
2157 |
|
2158 |
+
#: includes/admin/settings.php:1930
|
2159 |
msgid "View base"
|
2160 |
msgstr ""
|
2161 |
|
2162 |
+
#: includes/admin/settings.php:1933
|
2163 |
msgid "Topic tag slug"
|
2164 |
msgstr ""
|
2165 |
|
2166 |
+
#: includes/admin/settings.php:1945
|
2167 |
msgid "%s page"
|
2168 |
msgstr ""
|
2169 |
|
2170 |
+
#: includes/admin/settings.php:1968
|
2171 |
msgid "Possible %1$s conflict: %2$s"
|
2172 |
msgstr ""
|
2173 |
|
2174 |
+
#: includes/admin/tools/common.php:56
|
2175 |
+
msgid "Dismiss this notice."
|
|
|
|
|
|
|
|
|
2176 |
msgstr ""
|
2177 |
|
2178 |
+
#: includes/admin/tools/common.php:215
|
2179 |
+
msgid "Search Tools:"
|
|
|
|
|
2180 |
msgstr ""
|
2181 |
|
2182 |
+
#: includes/admin/tools/common.php:217
|
2183 |
+
msgid "Search Tools"
|
2184 |
msgstr ""
|
2185 |
|
2186 |
+
#: includes/admin/tools/common.php:238
|
2187 |
+
msgid "Filter by Component"
|
|
|
2188 |
msgstr ""
|
2189 |
|
2190 |
+
#: includes/admin/tools/common.php:240
|
2191 |
+
msgid "All Components"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
+
#: includes/admin/tools/common.php:249
|
2195 |
+
msgid "Filter"
|
2196 |
msgstr ""
|
2197 |
|
2198 |
+
#: includes/admin/tools/common.php:267
|
2199 |
+
msgid "Low"
|
|
|
2200 |
msgstr ""
|
2201 |
|
2202 |
+
#: includes/admin/tools/common.php:270
|
2203 |
+
msgid "Medium"
|
|
|
2204 |
msgstr ""
|
2205 |
|
2206 |
+
#: includes/admin/tools/common.php:273
|
2207 |
+
msgid "High"
|
|
|
2208 |
msgstr ""
|
2209 |
|
2210 |
+
#: includes/admin/tools/common.php:296 includes/admin/tools/common.php:311
|
2211 |
+
msgid "Users"
|
2212 |
msgstr ""
|
2213 |
|
2214 |
+
#: includes/admin/tools/common.php:308 includes/topics/template.php:3740
|
2215 |
+
#: templates/default/bbpress/content-statistics.php:40
|
2216 |
+
msgid "Topic Tags"
|
2217 |
msgstr ""
|
2218 |
|
2219 |
+
#: includes/admin/tools/common.php:478
|
2220 |
+
msgid "All %s"
|
2221 |
+
msgstr ""
|
2222 |
+
|
2223 |
+
#: includes/admin/tools/help.php:32 includes/admin/tools/repair.php:34
|
2224 |
+
#: includes/admin/tools.php:467
|
2225 |
+
msgid "Repair Forums"
|
2226 |
msgstr ""
|
2227 |
|
2228 |
+
#: includes/admin/tools/help.php:33
|
2229 |
msgid ""
|
2230 |
"There is more detailed information available on the bbPress and BuddyPress "
|
2231 |
"codex for the following:"
|
2232 |
msgstr ""
|
2233 |
|
2234 |
+
#: includes/admin/tools/help.php:36
|
2235 |
msgid ""
|
2236 |
"BuddyPress Group Forums: <a "
|
2237 |
"href=\"https://codex.buddypress.org/getting-started/installing-group-and-"
|
2240 |
"old-forums-to-bbpress-2/\">Migrating from old forums to bbPress 2.2+</a>."
|
2241 |
msgstr ""
|
2242 |
|
2243 |
+
#: includes/admin/tools/help.php:37
|
2244 |
msgid ""
|
2245 |
"bbPress roles: <a "
|
2246 |
"href=\"https://codex.bbpress.org/bbpress-user-roles-and-capabilities/\" "
|
2247 |
"target=\"_blank\">bbPress User Roles and Capabilities</a>"
|
2248 |
msgstr ""
|
2249 |
|
2250 |
+
#: includes/admin/tools/help.php:40
|
2251 |
msgid ""
|
2252 |
"Also see <a href=\"https://codex.bbpress.org/repair-forums/\">bbPress: "
|
2253 |
"Repair Forums</a>."
|
2254 |
msgstr ""
|
2255 |
|
2256 |
+
#: includes/admin/tools/help.php:70 includes/admin/tools/reset.php:27
|
2257 |
+
#: includes/admin/tools.php:494
|
2258 |
+
msgid "Reset Forums"
|
2259 |
+
msgstr ""
|
2260 |
+
|
2261 |
+
#: includes/admin/tools/help.php:71
|
2262 |
msgid ""
|
2263 |
"Also see <a href=\"https://codex.bbpress.org/reset-forums/\">bbPress: Reset "
|
2264 |
"Forums</a>."
|
2265 |
msgstr ""
|
2266 |
|
2267 |
+
#: includes/admin/tools/help.php:103
|
2268 |
msgid ""
|
2269 |
"This screen provides access to all of the bbPress Import Forums settings "
|
2270 |
"and resources."
|
2271 |
msgstr ""
|
2272 |
|
2273 |
+
#: includes/admin/tools/help.php:105
|
2274 |
msgid ""
|
2275 |
"Also see the main article on the bbPress codex <a "
|
2276 |
"href=\"https://codex.bbpress.org/import-forums/\">bbPress: Import "
|
2277 |
"Forums</a>."
|
2278 |
msgstr ""
|
2279 |
|
2280 |
+
#: includes/admin/tools/help.php:112
|
2281 |
msgid "In the Database Settings you have a number of options:"
|
2282 |
msgstr ""
|
2283 |
|
2284 |
+
#: includes/admin/tools/help.php:115
|
2285 |
msgid ""
|
2286 |
"The settings in this section refer to the database connection strings used "
|
2287 |
"by your old forum software. The best way to determine the exact settings "
|
2289 |
"contact your web hosting provider."
|
2290 |
msgstr ""
|
2291 |
|
2292 |
+
#: includes/admin/tools/help.php:123
|
2293 |
msgid "Importer Options"
|
2294 |
msgstr ""
|
2295 |
|
2296 |
+
#: includes/admin/tools/help.php:124
|
2297 |
msgid "In the Options you have a number of options:"
|
2298 |
msgstr ""
|
2299 |
|
2300 |
+
#: includes/admin/tools/help.php:127
|
2301 |
msgid ""
|
2302 |
"Depending on your MySQL configuration you can tweak the \"Rows Limit\" and "
|
2303 |
"\"Delay Time\" that may help to improve the overall time it takes to "
|
2304 |
"perform a complete forum import."
|
2305 |
msgstr ""
|
2306 |
|
2307 |
+
#: includes/admin/tools/help.php:128
|
2308 |
msgid "\"Convert Users\" will import your legacy forum members as WordPress Users."
|
2309 |
msgstr ""
|
2310 |
|
2311 |
+
#: includes/admin/tools/help.php:129
|
2312 |
msgid ""
|
2313 |
"\"Start Over\" will start the importer fresh, if your import failed for any "
|
2314 |
"reason leaving this setting unchecked the importer will begin from where it "
|
2315 |
"left off."
|
2316 |
msgstr ""
|
2317 |
|
2318 |
+
#: includes/admin/tools/help.php:130
|
2319 |
msgid ""
|
2320 |
"\"Purge Previous Import\" will remove data imported from a failed import "
|
2321 |
"without removing your existing forum data."
|
2322 |
msgstr ""
|
2323 |
|
2324 |
+
#: includes/admin/tools/repair.php:36
|
2325 |
+
msgid ""
|
2326 |
+
"bbPress keeps track of relationships between forums, topics, replies, "
|
2327 |
+
"topic-tags, favorites, subscriptions, and users. Occasionally these "
|
2328 |
+
"relationships become out of sync, most often after an import or migration. "
|
2329 |
+
"Use the tools below to manually recalculate these relationships."
|
2330 |
msgstr ""
|
2331 |
|
2332 |
+
#: includes/admin/tools/repair.php:37
|
2333 |
+
msgid ""
|
2334 |
+
"Some of these tools create substantial database overhead. Use caution when "
|
2335 |
+
"running more than 1 repair at a time."
|
2336 |
msgstr ""
|
2337 |
|
2338 |
+
#: includes/admin/tools/repair.php:50 includes/admin/tools/repair.php:146
|
2339 |
+
#: includes/admin/tools/upgrades.php:47 includes/admin/tools/upgrades.php:143
|
2340 |
+
msgid "Select bulk action"
|
2341 |
msgstr ""
|
2342 |
|
2343 |
+
#: includes/admin/tools/repair.php:53 includes/admin/tools/repair.php:94
|
2344 |
+
#: includes/admin/tools/repair.php:149 includes/admin/tools/upgrades.php:50
|
2345 |
+
#: includes/admin/tools/upgrades.php:91 includes/admin/tools/upgrades.php:146
|
2346 |
+
msgid "Run"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
+
#: includes/admin/tools/repair.php:55 includes/admin/tools/repair.php:151
|
2350 |
+
#: includes/admin/tools/upgrades.php:52 includes/admin/tools/upgrades.php:148
|
2351 |
+
msgid "Apply"
|
2352 |
msgstr ""
|
2353 |
|
2354 |
+
#: includes/admin/tools/repair.php:69 includes/admin/tools/repair.php:134
|
2355 |
+
#: includes/admin/tools/upgrades.php:66 includes/admin/tools/upgrades.php:131
|
2356 |
+
msgid "Select All"
|
2357 |
msgstr ""
|
2358 |
|
2359 |
+
#: includes/admin/tools/repair.php:73 includes/admin/tools/repair.php:90
|
2360 |
+
#: includes/admin/tools/repair.php:138 includes/admin/tools/upgrades.php:70
|
2361 |
+
#: includes/admin/tools/upgrades.php:87 includes/admin/tools/upgrades.php:135
|
2362 |
+
msgid "Description"
|
2363 |
msgstr ""
|
2364 |
|
2365 |
+
#: includes/admin/tools/repair.php:74 includes/admin/tools/repair.php:101
|
2366 |
+
#: includes/admin/tools/repair.php:139 includes/admin/tools/upgrades.php:71
|
2367 |
+
#: includes/admin/tools/upgrades.php:98 includes/admin/tools/upgrades.php:136
|
2368 |
+
msgid "Components"
|
2369 |
msgstr ""
|
2370 |
|
2371 |
+
#: includes/admin/tools/repair.php:75 includes/admin/tools/repair.php:108
|
2372 |
+
#: includes/admin/tools/repair.php:140 includes/admin/tools/upgrades.php:72
|
2373 |
+
#: includes/admin/tools/upgrades.php:105 includes/admin/tools/upgrades.php:137
|
2374 |
+
msgid "Overhead"
|
2375 |
msgstr ""
|
2376 |
|
2377 |
+
#: includes/admin/tools/repair.php:94 includes/admin/tools/upgrades.php:91
|
2378 |
+
msgid "Run %s"
|
2379 |
msgstr ""
|
2380 |
|
2381 |
+
#: includes/admin/tools/repair.php:98 includes/admin/tools/upgrades.php:95
|
2382 |
+
msgid "Show more details"
|
2383 |
msgstr ""
|
2384 |
|
2385 |
+
#: includes/admin/tools/repair.php:123 includes/admin/tools/upgrades.php:120
|
2386 |
+
msgid "No repair tools match this criteria."
|
2387 |
msgstr ""
|
2388 |
|
2389 |
+
#: includes/admin/tools/repair.php:177
|
2390 |
+
msgid "Counting the number of replies in each topic… %s"
|
2391 |
msgstr ""
|
2392 |
|
2393 |
+
#: includes/admin/tools/repair.php:178 includes/admin/tools/repair.php:233
|
2394 |
+
#: includes/admin/tools/repair.php:291 includes/admin/tools/repair.php:329
|
2395 |
+
#: includes/admin/tools/repair.php:367 includes/admin/tools/repair.php:417
|
2396 |
+
#: includes/admin/tools/repair.php:462 includes/admin/tools/repair.php:514
|
2397 |
+
#: includes/admin/tools/repair.php:566 includes/admin/tools/repair.php:637
|
2398 |
+
#: includes/admin/tools/repair.php:706 includes/admin/tools/repair.php:781
|
2399 |
+
#: includes/admin/tools/repair.php:838 includes/admin/tools/repair.php:966
|
2400 |
+
#: includes/admin/tools/repair.php:1079 includes/admin/tools/repair.php:1103
|
2401 |
+
#: includes/admin/tools/repair.php:1158 includes/admin/tools/reset.php:108
|
2402 |
+
#: includes/admin/tools/upgrades.php:240
|
2403 |
+
msgid "Failed!"
|
2404 |
msgstr ""
|
2405 |
|
2406 |
+
#: includes/admin/tools/repair.php:212 includes/admin/tools/repair.php:270
|
2407 |
+
#: includes/admin/tools/repair.php:309 includes/admin/tools/repair.php:346
|
2408 |
+
#: includes/admin/tools/repair.php:397 includes/admin/tools/repair.php:443
|
2409 |
+
#: includes/admin/tools/repair.php:495 includes/admin/tools/repair.php:547
|
2410 |
+
#: includes/admin/tools/repair.php:618 includes/admin/tools/repair.php:687
|
2411 |
+
#: includes/admin/tools/repair.php:756 includes/admin/tools/repair.php:944
|
2412 |
+
#: includes/admin/tools/repair.php:1009 includes/admin/tools/repair.php:1083
|
2413 |
+
#: includes/admin/tools/repair.php:1139 includes/admin/tools/repair.php:1194
|
2414 |
+
#: includes/admin/tools/repair.php:1251
|
2415 |
+
msgid "Complete!"
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: includes/admin/tools/repair.php:232
|
2419 |
+
msgid "Counting the number of voices in each topic… %s"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
+
#: includes/admin/tools/repair.php:290
|
2423 |
+
msgid ""
|
2424 |
+
"Counting the number of pending, spammed, and trashed replies in each "
|
2425 |
+
"topic… %s"
|
2426 |
msgstr ""
|
2427 |
|
2428 |
+
#: includes/admin/tools/repair.php:328
|
2429 |
+
msgid "Counting the number of topics in each forum… %s"
|
2430 |
msgstr ""
|
2431 |
|
2432 |
+
#: includes/admin/tools/repair.php:366
|
2433 |
+
msgid "Counting the number of topics in each topic-tag… %s"
|
2434 |
msgstr ""
|
2435 |
|
2436 |
+
#: includes/admin/tools/repair.php:416
|
2437 |
+
msgid "Counting the number of replies in each forum… %s"
|
2438 |
msgstr ""
|
2439 |
|
2440 |
+
#: includes/admin/tools/repair.php:461
|
2441 |
+
msgid "Counting the number of topics each user has created… %s"
|
2442 |
msgstr ""
|
2443 |
|
2444 |
+
#: includes/admin/tools/repair.php:513
|
2445 |
+
msgid "Counting the number of topics to which each user has replied… %s"
|
2446 |
msgstr ""
|
2447 |
|
2448 |
+
#: includes/admin/tools/repair.php:565
|
2449 |
+
msgid "Removing unpublished topics from user favorites… %s"
|
2450 |
msgstr ""
|
2451 |
|
2452 |
+
#: includes/admin/tools/repair.php:601 includes/admin/tools/repair.php:670
|
2453 |
+
#: includes/admin/tools/repair.php:739
|
2454 |
+
msgid "Nothing to remove!"
|
2455 |
msgstr ""
|
2456 |
|
2457 |
+
#: includes/admin/tools/repair.php:636
|
2458 |
+
msgid "Removing trashed topics from user subscriptions… %s"
|
2459 |
msgstr ""
|
2460 |
|
2461 |
+
#: includes/admin/tools/repair.php:705
|
2462 |
+
msgid "Removing trashed forums from user subscriptions… %s"
|
2463 |
msgstr ""
|
2464 |
|
2465 |
+
#: includes/admin/tools/repair.php:774
|
2466 |
+
msgid "Remapping forum role for each user on this site… %s"
|
2467 |
msgstr ""
|
2468 |
|
2469 |
+
#: includes/admin/tools/repair.php:813
|
2470 |
+
msgid "Complete! %s users updated."
|
2471 |
msgstr ""
|
2472 |
|
2473 |
+
#: includes/admin/tools/repair.php:837
|
2474 |
+
msgid "Recomputing latest post in every topic and forum… %s"
|
2475 |
msgstr ""
|
2476 |
|
2477 |
+
#: includes/admin/tools/repair.php:965
|
2478 |
+
msgid "Repairing the sticky topic to the parent forum relationships… %s"
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: includes/admin/tools/repair.php:1033
|
2482 |
+
msgid "Repairing closed topics… %s"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: includes/admin/tools/repair.php:1034
|
2486 |
+
msgid "No closed topics to repair."
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: includes/admin/tools/repair.php:1061
|
2490 |
+
msgid "Complete! %d closed topic repaired."
|
2491 |
+
msgid_plural "Complete! %d closed topics repaired."
|
2492 |
+
msgstr[0] ""
|
2493 |
+
msgstr[1] ""
|
2494 |
+
|
2495 |
+
#: includes/admin/tools/repair.php:1075
|
2496 |
+
msgid "Recalculating forum visibility … %s"
|
2497 |
msgstr ""
|
2498 |
|
2499 |
+
#: includes/admin/tools/repair.php:1102
|
2500 |
+
msgid "Recalculating the forum for each post … %s"
|
2501 |
msgstr ""
|
2502 |
|
2503 |
+
#: includes/admin/tools/repair.php:1157
|
2504 |
+
msgid "Recalculating the topic for each post … %s"
|
2505 |
msgstr ""
|
2506 |
|
2507 |
+
#: includes/admin/tools/repair.php:1212
|
2508 |
+
msgid "Recalculating reply menu order … %s"
|
|
|
2509 |
msgstr ""
|
2510 |
|
2511 |
+
#: includes/admin/tools/repair.php:1213
|
2512 |
+
msgid "No reply positions to recalculate."
|
2513 |
msgstr ""
|
2514 |
|
2515 |
+
#: includes/admin/tools/reset.php:28
|
2516 |
+
msgid ""
|
2517 |
+
"Revert your forums back to a brand new installation, as if bbPress were "
|
2518 |
+
"never installed. This process cannot be undone."
|
2519 |
msgstr ""
|
2520 |
|
2521 |
+
#: includes/admin/tools/reset.php:34
|
2522 |
+
msgid "The following data will be removed:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2523 |
msgstr ""
|
2524 |
|
2525 |
+
#: includes/admin/tools/reset.php:36 includes/forums/template.php:55
|
2526 |
+
msgid "All Forums"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2527 |
msgstr ""
|
2528 |
|
2529 |
+
#: includes/admin/tools/reset.php:37 includes/topics/functions.php:4174
|
2530 |
+
#: includes/topics/template.php:54
|
2531 |
+
msgid "All Topics"
|
2532 |
+
msgstr ""
|
2533 |
+
|
2534 |
+
#: includes/admin/tools/reset.php:38 includes/replies/functions.php:2297
|
2535 |
+
#: includes/replies/template.php:54
|
2536 |
+
msgid "All Replies"
|
2537 |
msgstr ""
|
2538 |
|
2539 |
+
#: includes/admin/tools/reset.php:39
|
2540 |
+
msgid "All Topic Tags"
|
2541 |
+
msgstr ""
|
2542 |
+
|
2543 |
+
#: includes/admin/tools/reset.php:40
|
2544 |
+
msgid "All Meta Data"
|
2545 |
+
msgstr ""
|
2546 |
+
|
2547 |
+
#: includes/admin/tools/reset.php:41
|
2548 |
+
msgid "Forum Settings"
|
2549 |
+
msgstr ""
|
2550 |
+
|
2551 |
+
#: includes/admin/tools/reset.php:42
|
2552 |
+
msgid "Forum Activity"
|
2553 |
+
msgstr ""
|
2554 |
+
|
2555 |
+
#: includes/admin/tools/reset.php:43
|
2556 |
+
msgid "Forum User Roles"
|
2557 |
+
msgstr ""
|
2558 |
+
|
2559 |
+
#: includes/admin/tools/reset.php:45
|
2560 |
+
msgid "Importer Helper Data"
|
2561 |
+
msgstr ""
|
2562 |
+
|
2563 |
+
#: includes/admin/tools/reset.php:49
|
2564 |
+
msgid "Delete imported users?"
|
2565 |
+
msgstr ""
|
2566 |
+
|
2567 |
+
#: includes/admin/tools/reset.php:52 includes/admin/tools/reset.php:62
|
2568 |
+
msgid "Say it ain't so!"
|
2569 |
+
msgstr ""
|
2570 |
+
|
2571 |
+
#: includes/admin/tools/reset.php:53
|
2572 |
+
msgid "This option will delete all previously imported users, and cannot be undone."
|
2573 |
+
msgstr ""
|
2574 |
+
|
2575 |
+
#: includes/admin/tools/reset.php:54
|
2576 |
msgid ""
|
2577 |
+
"Proceeding without this checked removes the meta-data necessary to delete "
|
2578 |
+
"these users later."
|
2579 |
msgstr ""
|
2580 |
|
2581 |
+
#: includes/admin/tools/reset.php:59
|
2582 |
+
msgid "Do you really want to do this?"
|
2583 |
msgstr ""
|
2584 |
|
2585 |
+
#: includes/admin/tools/reset.php:63
|
2586 |
+
#: templates/default/bbpress/form-reply-move.php:76
|
2587 |
+
#: templates/default/bbpress/form-topic-merge.php:98
|
2588 |
+
#: templates/default/bbpress/form-topic-split.php:102
|
2589 |
+
msgid "This process cannot be undone."
|
2590 |
msgstr ""
|
2591 |
|
2592 |
+
#: includes/admin/tools/reset.php:64
|
2593 |
+
msgid "Backup your database before proceeding."
|
2594 |
msgstr ""
|
2595 |
|
2596 |
+
#: includes/admin/tools/reset.php:72
|
2597 |
+
msgid "Reset bbPress"
|
2598 |
msgstr ""
|
2599 |
|
2600 |
+
#: includes/admin/tools/reset.php:109
|
2601 |
+
msgid "Success!"
|
2602 |
msgstr ""
|
2603 |
|
2604 |
+
#: includes/admin/tools/reset.php:123
|
2605 |
+
msgid "Deleting Posts… %s"
|
2606 |
msgstr ""
|
2607 |
|
2608 |
+
#: includes/admin/tools/reset.php:137
|
2609 |
+
msgid "Deleting Post Meta… %s"
|
2610 |
msgstr ""
|
2611 |
|
2612 |
+
#: includes/admin/tools/reset.php:151
|
2613 |
+
msgid "Deleting Post Revisions… %s"
|
2614 |
msgstr ""
|
2615 |
|
2616 |
+
#: includes/admin/tools/reset.php:160
|
2617 |
+
msgid "Deleting Forum Moderators… %s"
|
2618 |
+
msgstr ""
|
2619 |
+
|
2620 |
+
#: includes/admin/tools/reset.php:167
|
2621 |
+
msgid "Deleting Topic Tags… %s"
|
2622 |
+
msgstr ""
|
2623 |
+
|
2624 |
+
#: includes/admin/tools/reset.php:182
|
2625 |
+
msgid "Deleting Imported Users… %s"
|
2626 |
msgstr ""
|
2627 |
|
2628 |
+
#: includes/admin/tools/reset.php:187
|
2629 |
+
msgid "Deleting Imported User Meta… %s"
|
2630 |
msgstr ""
|
2631 |
|
2632 |
+
#: includes/admin/tools/reset.php:195
|
2633 |
+
msgid "Deleting User Meta… %s"
|
|
|
2634 |
msgstr ""
|
2635 |
|
2636 |
+
#: includes/admin/tools/reset.php:202
|
2637 |
+
msgid "Deleting Conversion Table… %s"
|
2638 |
msgstr ""
|
2639 |
|
2640 |
+
#: includes/admin/tools/reset.php:214
|
2641 |
+
msgid "Deleting Settings… %s"
|
2642 |
msgstr ""
|
2643 |
|
2644 |
+
#: includes/admin/tools/reset.php:220
|
2645 |
+
msgid "Deleting Roles and Capabilities… %s"
|
2646 |
msgstr ""
|
2647 |
|
2648 |
+
#: includes/admin/tools/upgrades.php:31 includes/admin/tools.php:476
|
2649 |
+
msgid "Upgrade Forums"
|
2650 |
msgstr ""
|
2651 |
|
2652 |
+
#: includes/admin/tools/upgrades.php:33
|
2653 |
+
msgid ""
|
2654 |
+
"As bbPress improves, occasionally database upgrades are required but some "
|
2655 |
+
"forums are too large to upgrade automatically. Use the tools below to "
|
2656 |
+
"manually run upgrade routines."
|
2657 |
msgstr ""
|
2658 |
|
2659 |
+
#: includes/admin/tools/upgrades.php:34
|
2660 |
+
msgid ""
|
2661 |
+
"Some of these tools create substantial database overhead. Use caution when "
|
2662 |
+
"running more than 1 upgrade at a time."
|
2663 |
msgstr ""
|
2664 |
|
2665 |
+
#: includes/admin/tools/upgrades.php:168
|
2666 |
+
msgid "Upgrading user engagements … %s"
|
2667 |
msgstr ""
|
2668 |
|
2669 |
+
#: includes/admin/tools/upgrades.php:169
|
2670 |
+
msgid "No engagements to upgrade."
|
2671 |
msgstr ""
|
2672 |
|
2673 |
+
#: includes/admin/tools/upgrades.php:200
|
2674 |
+
msgid "Complete! %d engagements upgraded."
|
2675 |
+
msgid_plural "Complete! %d engagements upgraded."
|
2676 |
msgstr[0] ""
|
2677 |
msgstr[1] ""
|
2678 |
|
2679 |
+
#: includes/admin/tools/upgrades.php:219
|
2680 |
+
msgid "Upgrading BuddyPress group-forum relationships… %s"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2681 |
msgstr ""
|
2682 |
|
2683 |
+
#: includes/admin/tools/upgrades.php:324
|
2684 |
+
msgid "group-forums"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
+
#: includes/admin/tools/upgrades.php:340
|
2688 |
+
msgid "Complete! %s groups updated; %s forums updated; %s forum statuses synced."
|
2689 |
msgstr ""
|
2690 |
|
2691 |
+
#: includes/admin/tools/upgrades.php:355
|
2692 |
msgid "Upgrading user favorites … %s"
|
2693 |
msgstr ""
|
2694 |
|
2695 |
+
#: includes/admin/tools/upgrades.php:356
|
2696 |
msgid "No favorites to upgrade."
|
2697 |
msgstr ""
|
2698 |
|
2699 |
+
#: includes/admin/tools/upgrades.php:394
|
2700 |
msgid "Complete! %d favorite upgraded."
|
2701 |
msgid_plural "Complete! %d favorites upgraded."
|
2702 |
msgstr[0] ""
|
2703 |
msgstr[1] ""
|
2704 |
|
2705 |
+
#: includes/admin/tools/upgrades.php:410
|
2706 |
msgid "Upgrading user topic subscriptions … %s"
|
2707 |
msgstr ""
|
2708 |
|
2709 |
+
#: includes/admin/tools/upgrades.php:411
|
2710 |
msgid "No topic subscriptions to upgrade."
|
2711 |
msgstr ""
|
2712 |
|
2713 |
+
#: includes/admin/tools/upgrades.php:449 includes/admin/tools/upgrades.php:586
|
2714 |
msgid "Complete! %d topic subscription upgraded."
|
2715 |
msgid_plural "Complete! %d topic subscriptions upgraded."
|
2716 |
msgstr[0] ""
|
2717 |
msgstr[1] ""
|
2718 |
|
2719 |
+
#: includes/admin/tools/upgrades.php:465
|
2720 |
msgid "Upgrading user forum subscriptions … %s"
|
2721 |
msgstr ""
|
2722 |
|
2723 |
+
#: includes/admin/tools/upgrades.php:466
|
2724 |
msgid "No forum subscriptions to upgrade."
|
2725 |
msgstr ""
|
2726 |
|
2727 |
+
#: includes/admin/tools/upgrades.php:504 includes/admin/tools/upgrades.php:627
|
2728 |
msgid "Complete! %d forum subscription upgraded."
|
2729 |
msgid_plural "Complete! %d forum subscriptions upgraded."
|
2730 |
msgstr[0] ""
|
2731 |
msgstr[1] ""
|
2732 |
|
2733 |
+
#: includes/admin/tools/upgrades.php:520
|
2734 |
+
msgid "Remove favorites from usermeta … %s"
|
|
|
|
|
2735 |
msgstr ""
|
2736 |
|
2737 |
+
#: includes/admin/tools/upgrades.php:521
|
2738 |
+
msgid "No favorites to remove."
|
2739 |
msgstr ""
|
2740 |
|
2741 |
+
#: includes/admin/tools/upgrades.php:545
|
2742 |
+
msgid "Complete! %d favorites upgraded."
|
2743 |
+
msgid_plural "Complete! %d favorites upgraded."
|
2744 |
+
msgstr[0] ""
|
2745 |
+
msgstr[1] ""
|
2746 |
+
|
2747 |
+
#: includes/admin/tools/upgrades.php:561
|
2748 |
+
msgid "Remove topic subscriptions from usermeta … %s"
|
2749 |
msgstr ""
|
2750 |
|
2751 |
+
#: includes/admin/tools/upgrades.php:562
|
2752 |
+
msgid "No topic subscriptions to remove."
|
2753 |
msgstr ""
|
2754 |
|
2755 |
+
#: includes/admin/tools/upgrades.php:602
|
2756 |
+
msgid "Remove forum subscriptions from usermeta … %s"
|
|
|
2757 |
msgstr ""
|
2758 |
|
2759 |
+
#: includes/admin/tools/upgrades.php:603
|
2760 |
+
msgid "No forum subscriptions to remove."
|
|
|
2761 |
msgstr ""
|
2762 |
|
2763 |
+
#: includes/admin/tools.php:31
|
2764 |
+
msgid "bbPress provides the following tools to help you manage your forums:"
|
2765 |
msgstr ""
|
2766 |
|
2767 |
+
#: includes/admin/tools.php:76
|
2768 |
+
msgid "The repair was completed successfully"
|
2769 |
msgstr ""
|
2770 |
|
2771 |
+
#: includes/admin/tools.php:77
|
2772 |
+
msgid "The repair was not successful"
|
2773 |
msgstr ""
|
2774 |
|
2775 |
+
#: includes/admin/tools.php:111
|
2776 |
+
msgid "Recalculate parent topic for each reply"
|
2777 |
msgstr ""
|
2778 |
|
2779 |
+
#: includes/admin/tools.php:122
|
2780 |
+
msgid "Recalculate parent forum for each topic and reply"
|
2781 |
msgstr ""
|
2782 |
|
2783 |
+
#: includes/admin/tools.php:133
|
2784 |
+
msgid "Recalculate private and hidden forums"
|
2785 |
msgstr ""
|
2786 |
|
2787 |
+
#: includes/admin/tools.php:144
|
2788 |
+
msgid "Recalculate last activity in each topic and forum"
|
2789 |
msgstr ""
|
2790 |
|
2791 |
+
#: includes/admin/tools.php:155
|
2792 |
+
msgid "Recalculate sticky relationship of each topic"
|
2793 |
msgstr ""
|
2794 |
|
2795 |
+
#: includes/admin/tools.php:166
|
2796 |
+
msgid "Recalculate the position of each reply"
|
2797 |
msgstr ""
|
2798 |
|
2799 |
+
#: includes/admin/tools.php:177
|
2800 |
+
msgid "Repair closed topics"
|
|
|
|
|
2801 |
msgstr ""
|
2802 |
|
2803 |
+
#: includes/admin/tools.php:188
|
2804 |
+
msgid "Recount topics in each forum"
|
2805 |
msgstr ""
|
2806 |
|
2807 |
+
#: includes/admin/tools.php:199
|
2808 |
+
msgid "Recount topics in each topic-tag"
|
|
|
|
|
|
|
2809 |
msgstr ""
|
2810 |
|
2811 |
+
#: includes/admin/tools.php:210
|
2812 |
+
msgid "Recount replies in each forum"
|
2813 |
msgstr ""
|
2814 |
|
2815 |
+
#: includes/admin/tools.php:221
|
2816 |
+
msgid "Recount replies in each topic"
|
2817 |
msgstr ""
|
2818 |
|
2819 |
+
#: includes/admin/tools.php:232
|
2820 |
+
msgid "Recount engagements in each topic"
|
2821 |
msgstr ""
|
2822 |
|
2823 |
+
#: includes/admin/tools.php:243
|
2824 |
+
msgid "Recount pending, spammed, and trashed replies in each topic"
|
2825 |
msgstr ""
|
2826 |
|
2827 |
+
#: includes/admin/tools.php:254
|
2828 |
+
msgid "Recount topics for each user"
|
2829 |
msgstr ""
|
2830 |
|
2831 |
+
#: includes/admin/tools.php:265
|
2832 |
+
msgid "Recount replies for each user"
|
2833 |
msgstr ""
|
2834 |
|
2835 |
+
#: includes/admin/tools.php:276
|
2836 |
+
msgid "Remove unpublished topics from user favorites"
|
2837 |
msgstr ""
|
2838 |
|
2839 |
+
#: includes/admin/tools.php:287
|
2840 |
+
msgid "Remove unpublished topics from user subscriptions"
|
2841 |
msgstr ""
|
2842 |
|
2843 |
+
#: includes/admin/tools.php:298
|
2844 |
+
msgid "Remove unpublished forums from user subscriptions"
|
2845 |
msgstr ""
|
2846 |
|
2847 |
+
#: includes/admin/tools.php:309
|
2848 |
+
msgid "Remap existing users to default forum roles"
|
2849 |
msgstr ""
|
2850 |
|
2851 |
+
#: includes/admin/tools.php:320
|
2852 |
+
msgid "Upgrade user favorites"
|
2853 |
msgstr ""
|
2854 |
|
2855 |
+
#: includes/admin/tools.php:331
|
2856 |
+
msgid "Upgrade user topic subscriptions"
|
2857 |
msgstr ""
|
2858 |
|
2859 |
+
#: includes/admin/tools.php:342
|
2860 |
+
msgid "Upgrade user forum subscriptions"
|
2861 |
+
msgstr ""
|
2862 |
+
|
2863 |
+
#: includes/admin/tools.php:353
|
2864 |
+
msgid "Upgrade topic engagements"
|
2865 |
+
msgstr ""
|
2866 |
+
|
2867 |
+
#: includes/admin/tools.php:364
|
2868 |
+
msgid "Upgrade BuddyPress Group Forum relationships"
|
2869 |
+
msgstr ""
|
2870 |
+
|
2871 |
+
#: includes/admin/tools.php:375
|
2872 |
+
msgid "Remove favorites from user-meta"
|
2873 |
+
msgstr ""
|
2874 |
+
|
2875 |
+
#: includes/admin/tools.php:386
|
2876 |
+
msgid "Remove topic subscriptions from user-meta"
|
2877 |
+
msgstr ""
|
2878 |
+
|
2879 |
+
#: includes/admin/tools.php:397
|
2880 |
+
msgid "Remove forum subscriptions from user-meta"
|
2881 |
msgstr ""
|
2882 |
|
2883 |
+
#: includes/admin/topics.php:130
|
2884 |
msgid ""
|
2885 |
"This screen displays the individual topics on your site. You can customize "
|
2886 |
"the display of this screen to suit your workflow."
|
2887 |
msgstr ""
|
2888 |
|
2889 |
+
#: includes/admin/topics.php:140
|
2890 |
msgid ""
|
2891 |
"You can hide/display columns based on your needs and decide how many topics "
|
2892 |
"to list per screen using the Screen Options tab."
|
2893 |
msgstr ""
|
2894 |
|
2895 |
+
#: includes/admin/topics.php:141
|
2896 |
msgid ""
|
2897 |
"You can filter the list of topics by topic status using the text links in "
|
2898 |
"the upper left to show All, Published, Draft, Pending, Trashed, Closed, or "
|
2899 |
"Spam topics. The default view is to show all topics."
|
2900 |
msgstr ""
|
2901 |
|
2902 |
+
#: includes/admin/topics.php:142
|
2903 |
msgid ""
|
2904 |
"You can view topics in a simple title list or with an excerpt. Choose the "
|
2905 |
"view you prefer by clicking on the icons at the top of the list on the "
|
2906 |
"right."
|
2907 |
msgstr ""
|
2908 |
|
2909 |
+
#: includes/admin/topics.php:143
|
2910 |
msgid ""
|
2911 |
"You can refine the list to show only topics in a specific forum or from a "
|
2912 |
"specific month by using the dropdown menus above the topics list. Click the "
|
2913 |
"Filter button after making your selection."
|
2914 |
msgstr ""
|
2915 |
|
2916 |
+
#: includes/admin/topics.php:152
|
2917 |
msgid ""
|
2918 |
"Hovering over a row in the topics list will display action links that allow "
|
2919 |
"you to manage your topic. You can perform the following actions:"
|
2920 |
msgstr ""
|
2921 |
|
2922 |
+
#: includes/admin/topics.php:154
|
2923 |
msgid ""
|
2924 |
"<strong>Edit</strong> takes you to the editing screen for that topic. You "
|
2925 |
"can also reach that screen by clicking on the topic title."
|
2926 |
msgstr ""
|
2927 |
|
2928 |
+
#: includes/admin/topics.php:155
|
2929 |
msgid ""
|
2930 |
"<strong>Trash</strong> removes your topic from this list and places it in "
|
2931 |
"the trash, from which you can permanently delete it."
|
2932 |
msgstr ""
|
2933 |
|
2934 |
+
#: includes/admin/topics.php:156
|
2935 |
msgid ""
|
2936 |
"<strong>Spam</strong> removes your topic from this list and places it in "
|
2937 |
"the spam queue, from which you can permanently delete it."
|
2938 |
msgstr ""
|
2939 |
|
2940 |
+
#: includes/admin/topics.php:157
|
2941 |
msgid "<strong>View</strong> will take you to your live site to view the topic."
|
2942 |
msgstr ""
|
2943 |
|
2944 |
+
#: includes/admin/topics.php:159
|
2945 |
msgid ""
|
2946 |
"<strong>Close</strong> will mark the selected topic as ’closed’ "
|
2947 |
"and disable the option to post new replies to the topic."
|
2948 |
msgstr ""
|
2949 |
|
2950 |
+
#: includes/admin/topics.php:160
|
2951 |
msgid ""
|
2952 |
"<strong>Stick</strong> will keep the selected topic ’pinned’ to "
|
2953 |
"the top the parent forum topic list."
|
2954 |
msgstr ""
|
2955 |
|
2956 |
+
#: includes/admin/topics.php:161
|
2957 |
msgid ""
|
2958 |
"<strong>Stick <em>(to front)</em></strong> will keep the selected topic "
|
2959 |
"’pinned’ to the top of ALL forums and be visable in any forums "
|
2960 |
"topics list."
|
2961 |
msgstr ""
|
2962 |
|
2963 |
+
#: includes/admin/topics.php:170
|
2964 |
msgid ""
|
2965 |
"You can also edit, spam, or move multiple topics to the trash at once. "
|
2966 |
"Select the topics you want to act on using the checkboxes, then select the "
|
2967 |
"action you want to take from the Bulk Actions menu and click Apply."
|
2968 |
msgstr ""
|
2969 |
|
2970 |
+
#: includes/admin/topics.php:171
|
2971 |
msgid ""
|
2972 |
"When using Bulk Edit, you can change the metadata (categories, author, "
|
2973 |
"etc.) for all selected topics at once. To remove a topic from the grouping, "
|
2974 |
"just click the x next to its name in the Bulk Edit area that appears."
|
2975 |
msgstr ""
|
2976 |
|
2977 |
+
#: includes/admin/topics.php:191
|
2978 |
msgid ""
|
2979 |
"The title field and the big topic editing Area are fixed in place, but you "
|
2980 |
"can reposition all the other boxes using drag and drop, and can minimize or "
|
2984 |
"screen."
|
2985 |
msgstr ""
|
2986 |
|
2987 |
+
#: includes/admin/topics.php:201
|
2988 |
msgid "Title and Topic Editor"
|
2989 |
msgstr ""
|
2990 |
|
2991 |
+
#: includes/admin/topics.php:203
|
2992 |
msgid ""
|
2993 |
"<strong>Title</strong> - Enter a title for your topic. After you enter a "
|
2994 |
"title, you’ll see the permalink below, which you can edit."
|
2995 |
msgstr ""
|
2996 |
|
2997 |
+
#: includes/admin/topics.php:204
|
2998 |
msgid ""
|
2999 |
"<strong>Topic Editor</strong> - Enter the text for your topic. There are "
|
3000 |
"two modes of editing: Visual and HTML. Choose the mode by clicking on the "
|
3009 |
"editor."
|
3010 |
msgstr ""
|
3011 |
|
3012 |
+
#: includes/admin/topics.php:207
|
3013 |
msgid ""
|
3014 |
"<strong>Publish</strong> - You can set the terms of publishing your topic "
|
3015 |
"in the Publish box. For Status, Visibility, and Publish (immediately), "
|
3020 |
"future or backdate a topic."
|
3021 |
msgstr ""
|
3022 |
|
3023 |
+
#: includes/admin/topics.php:210
|
3024 |
msgid ""
|
3025 |
"<strong>Featured Image</strong> - This allows you to associate an image "
|
3026 |
"with your topic without inserting it. This is usually useful only if your "
|
3028 |
"page, a custom header, etc."
|
3029 |
msgstr ""
|
3030 |
|
3031 |
+
#: includes/admin/topics.php:215 includes/admin/topics.php:347
|
3032 |
msgid "Topic Attributes"
|
3033 |
msgstr ""
|
3034 |
|
3035 |
+
#: includes/admin/topics.php:217
|
3036 |
msgid "Select the attributes that your topic should have:"
|
3037 |
msgstr ""
|
3038 |
|
3039 |
+
#: includes/admin/topics.php:219
|
3040 |
msgid ""
|
3041 |
"<strong>Forum</strong> dropdown determines the parent forum that the topic "
|
3042 |
"belongs to. Select the forum or category from the dropdown, or leave the "
|
3043 |
"default \"No forum\" to post the topic without an assigned forum."
|
3044 |
msgstr ""
|
3045 |
|
3046 |
+
#: includes/admin/topics.php:220
|
3047 |
msgid ""
|
3048 |
"<strong>Topic Type</strong> dropdown indicates the sticky status of the "
|
3049 |
"topic. Selecting the super sticky option would stick the topic to the front "
|
3052 |
"anywhere."
|
3053 |
msgstr ""
|
3054 |
|
3055 |
+
#: includes/admin/topics.php:268
|
3056 |
msgid "%s topic updated."
|
3057 |
msgid_plural "%s topics updated."
|
3058 |
msgstr[0] ""
|
3059 |
msgstr[1] ""
|
3060 |
|
3061 |
+
#: includes/admin/topics.php:269
|
3062 |
msgid "1 topic not updated, somebody is editing it."
|
3063 |
msgstr ""
|
3064 |
|
3065 |
+
#: includes/admin/topics.php:270
|
3066 |
msgid "%s topic not updated, somebody is editing it."
|
3067 |
msgid_plural "%s topics not updated, somebody is editing them."
|
3068 |
msgstr[0] ""
|
3069 |
msgstr[1] ""
|
3070 |
|
3071 |
+
#: includes/admin/topics.php:302
|
3072 |
msgid "Error in spamming topic."
|
3073 |
msgstr ""
|
3074 |
|
3075 |
+
#: includes/admin/topics.php:314
|
3076 |
msgid "Sorry, you are not allowed to unspam this topic."
|
3077 |
msgstr ""
|
3078 |
|
3079 |
+
#: includes/admin/topics.php:323
|
3080 |
msgid "Error in unspamming topic."
|
3081 |
msgstr ""
|
3082 |
|
3083 |
+
#: includes/admin/topics.php:624
|
3084 |
msgid "The topic was not found."
|
3085 |
msgstr ""
|
3086 |
|
3087 |
+
#: includes/admin/topics.php:766
|
3088 |
msgid "There was a problem opening the topic \"%1$s\"."
|
3089 |
msgstr ""
|
3090 |
|
3091 |
+
#: includes/admin/topics.php:767
|
3092 |
msgid "Topic \"%1$s\" successfully opened."
|
3093 |
msgstr ""
|
3094 |
|
3095 |
+
#: includes/admin/topics.php:772
|
3096 |
msgid "There was a problem closing the topic \"%1$s\"."
|
3097 |
msgstr ""
|
3098 |
|
3099 |
+
#: includes/admin/topics.php:773
|
3100 |
msgid "Topic \"%1$s\" successfully closed."
|
3101 |
msgstr ""
|
3102 |
|
3103 |
+
#: includes/admin/topics.php:778
|
3104 |
msgid "There was a problem sticking the topic \"%1$s\" to front."
|
3105 |
msgstr ""
|
3106 |
|
3107 |
+
#: includes/admin/topics.php:779
|
3108 |
msgid "Topic \"%1$s\" successfully stuck to front."
|
3109 |
msgstr ""
|
3110 |
|
3111 |
+
#: includes/admin/topics.php:784
|
3112 |
msgid "There was a problem sticking the topic \"%1$s\"."
|
3113 |
msgstr ""
|
3114 |
|
3115 |
+
#: includes/admin/topics.php:785
|
3116 |
msgid "Topic \"%1$s\" successfully stuck."
|
3117 |
msgstr ""
|
3118 |
|
3119 |
+
#: includes/admin/topics.php:790
|
3120 |
msgid "There was a problem unsticking the topic \"%1$s\"."
|
3121 |
msgstr ""
|
3122 |
|
3123 |
+
#: includes/admin/topics.php:791
|
3124 |
msgid "Topic \"%1$s\" successfully unstuck."
|
3125 |
msgstr ""
|
3126 |
|
3127 |
+
#: includes/admin/topics.php:796
|
3128 |
msgid "There was a problem marking the topic \"%1$s\" as spam."
|
3129 |
msgstr ""
|
3130 |
|
3131 |
+
#: includes/admin/topics.php:797
|
3132 |
msgid "Topic \"%1$s\" successfully marked as spam."
|
3133 |
msgstr ""
|
3134 |
|
3135 |
+
#: includes/admin/topics.php:802
|
3136 |
msgid "There was a problem unmarking the topic \"%1$s\" as spam."
|
3137 |
msgstr ""
|
3138 |
|
3139 |
+
#: includes/admin/topics.php:803
|
3140 |
msgid "Topic \"%1$s\" successfully unmarked as spam."
|
3141 |
msgstr ""
|
3142 |
|
3143 |
+
#: includes/admin/topics.php:808
|
3144 |
msgid "There was a problem approving the topic \"%1$s\"."
|
3145 |
msgstr ""
|
3146 |
|
3147 |
+
#: includes/admin/topics.php:809
|
3148 |
msgid "Topic \"%1$s\" successfully approved."
|
3149 |
msgstr ""
|
3150 |
|
3151 |
+
#: includes/admin/topics.php:814
|
3152 |
msgid "There was a problem unapproving the topic \"%1$s\"."
|
3153 |
msgstr ""
|
3154 |
|
3155 |
+
#: includes/admin/topics.php:815
|
3156 |
msgid "Topic \"%1$s\" successfully unapproved."
|
3157 |
msgstr ""
|
3158 |
|
3159 |
+
#: includes/admin/topics.php:891 templates/default/bbpress/loop-topics.php:19
|
3160 |
msgid "Voices"
|
3161 |
msgstr ""
|
3162 |
|
3163 |
+
#: includes/admin/topics.php:985 includes/topics/template.php:2253
|
3164 |
msgid "No Replies"
|
3165 |
msgstr ""
|
3166 |
|
3167 |
+
#: includes/admin/topics.php:1048
|
3168 |
msgid "Unapprove this topic"
|
3169 |
msgstr ""
|
3170 |
|
3171 |
+
#: includes/admin/topics.php:1050
|
3172 |
msgid "Approve this topic"
|
3173 |
msgstr ""
|
3174 |
|
3175 |
+
#: includes/admin/topics.php:1059
|
3176 |
msgid "Close this topic"
|
3177 |
msgstr ""
|
3178 |
|
3179 |
+
#: includes/admin/topics.php:1061
|
3180 |
msgid "Open this topic"
|
3181 |
msgstr ""
|
3182 |
|
3183 |
+
#: includes/admin/topics.php:1070
|
3184 |
msgid "Unstick this topic"
|
3185 |
msgstr ""
|
3186 |
|
3187 |
+
#: includes/admin/topics.php:1070 includes/topics/template.php:3028
|
3188 |
msgid "Unstick"
|
3189 |
msgstr ""
|
3190 |
|
3191 |
+
#: includes/admin/topics.php:1073
|
3192 |
msgid "Stick this topic to its forum"
|
3193 |
msgstr ""
|
3194 |
|
3195 |
+
#: includes/admin/topics.php:1073 includes/topics/template.php:3027
|
3196 |
msgid "Stick"
|
3197 |
msgstr ""
|
3198 |
|
3199 |
+
#: includes/admin/topics.php:1073
|
3200 |
msgid "Stick this topic to front"
|
3201 |
msgstr ""
|
3202 |
|
3203 |
+
#: includes/admin/topics.php:1073 includes/topics/template.php:3029
|
3204 |
msgid "(to front)"
|
3205 |
msgstr ""
|
3206 |
|
3207 |
+
#: includes/admin/topics.php:1080
|
3208 |
msgid "Mark the topic as not spam"
|
3209 |
msgstr ""
|
3210 |
|
3211 |
+
#: includes/admin/topics.php:1082
|
3212 |
msgid "Mark this topic as spam"
|
3213 |
msgstr ""
|
3214 |
|
3215 |
+
#: includes/admin/topics.php:1197 includes/admin/topics.php:1209
|
3216 |
msgid "Topic updated."
|
3217 |
msgstr ""
|
3218 |
|
3219 |
+
#: includes/admin/topics.php:1214
|
3220 |
#. translators: %s: date and time of the revision
|
3221 |
msgid "Topic restored to revision from %s"
|
3222 |
msgstr ""
|
3223 |
|
3224 |
+
#: includes/admin/topics.php:1220
|
3225 |
msgid "Topic created."
|
3226 |
msgstr ""
|
3227 |
|
3228 |
+
#: includes/admin/topics.php:1226
|
3229 |
msgid "Topic saved."
|
3230 |
msgstr ""
|
3231 |
|
3232 |
+
#: includes/admin/topics.php:1231
|
3233 |
msgid "Topic submitted."
|
3234 |
msgstr ""
|
3235 |
|
3236 |
+
#: includes/admin/topics.php:1240
|
3237 |
msgid "Topic scheduled for: %s."
|
3238 |
msgstr ""
|
3239 |
|
3240 |
+
#: includes/admin/topics.php:1251
|
3241 |
msgid "Topic draft updated."
|
3242 |
msgstr ""
|
3243 |
|
3244 |
#: includes/admin/users.php:102 includes/admin/users.php:263
|
3245 |
+
#: templates/default/bbpress/form-user-roles.php:23
|
3246 |
msgid "Forum Role"
|
3247 |
msgstr ""
|
3248 |
|
3249 |
#: includes/admin/users.php:111 includes/admin/users.php:115
|
3250 |
+
#: includes/users/template.php:1676
|
3251 |
msgid "— No role for these forums —"
|
3252 |
msgstr ""
|
3253 |
|
3263 |
msgid "Site Role"
|
3264 |
msgstr ""
|
3265 |
|
3266 |
+
#: includes/common/classes.php:531 includes/replies/template.php:2782
|
3267 |
+
msgid "%1$s - %2$s"
|
3268 |
+
msgstr ""
|
3269 |
+
|
3270 |
+
#: includes/common/formatting.php:635
|
3271 |
msgid "sometime"
|
3272 |
msgstr ""
|
3273 |
|
3274 |
+
#: includes/common/formatting.php:636
|
3275 |
msgid "right now"
|
3276 |
msgstr ""
|
3277 |
|
3278 |
+
#: includes/common/formatting.php:637
|
3279 |
msgid "%s ago"
|
3280 |
msgstr ""
|
3281 |
|
3282 |
+
#: includes/common/formatting.php:641
|
3283 |
msgid "year"
|
3284 |
msgstr ""
|
3285 |
|
3286 |
+
#: includes/common/formatting.php:641
|
3287 |
msgid "years"
|
3288 |
msgstr ""
|
3289 |
|
3290 |
+
#: includes/common/formatting.php:642
|
3291 |
msgid "month"
|
3292 |
msgstr ""
|
3293 |
|
3294 |
+
#: includes/common/formatting.php:642
|
3295 |
msgid "months"
|
3296 |
msgstr ""
|
3297 |
|
3298 |
+
#: includes/common/formatting.php:643
|
3299 |
msgid "week"
|
3300 |
msgstr ""
|
3301 |
|
3302 |
+
#: includes/common/formatting.php:643
|
3303 |
msgid "weeks"
|
3304 |
msgstr ""
|
3305 |
|
3306 |
+
#: includes/common/formatting.php:644
|
3307 |
msgid "day"
|
3308 |
msgstr ""
|
3309 |
|
3310 |
+
#: includes/common/formatting.php:644
|
3311 |
msgid "days"
|
3312 |
msgstr ""
|
3313 |
|
3314 |
+
#: includes/common/formatting.php:645
|
3315 |
msgid "hour"
|
3316 |
msgstr ""
|
3317 |
|
3318 |
+
#: includes/common/formatting.php:645
|
3319 |
msgid "hours"
|
3320 |
msgstr ""
|
3321 |
|
3322 |
+
#: includes/common/formatting.php:646
|
3323 |
msgid "minute"
|
3324 |
msgstr ""
|
3325 |
|
3326 |
+
#: includes/common/formatting.php:646
|
3327 |
+
msgid "minutes"
|
3328 |
+
msgstr ""
|
3329 |
+
|
3330 |
+
#: includes/common/formatting.php:647
|
3331 |
msgid "second"
|
3332 |
msgstr ""
|
3333 |
|
3334 |
+
#: includes/common/formatting.php:647
|
3335 |
+
msgid "seconds"
|
3336 |
+
msgstr ""
|
3337 |
+
|
3338 |
+
#: includes/common/functions.php:379 includes/common/functions.php:418
|
3339 |
msgid "Pending: %s"
|
3340 |
msgstr ""
|
3341 |
|
3342 |
+
#: includes/common/functions.php:380 includes/common/functions.php:419
|
3343 |
msgid "Private: %s"
|
3344 |
msgstr ""
|
3345 |
|
3346 |
+
#: includes/common/functions.php:381 includes/common/functions.php:420
|
3347 |
msgid "Spammed: %s"
|
3348 |
msgstr ""
|
3349 |
|
3350 |
+
#: includes/common/functions.php:382 includes/common/functions.php:421
|
3351 |
msgid "Trashed: %s"
|
3352 |
msgstr ""
|
3353 |
|
3354 |
+
#: includes/common/functions.php:508
|
3355 |
msgid "<strong>ERROR</strong>: Invalid author name."
|
3356 |
msgstr ""
|
3357 |
|
3358 |
+
#: includes/common/functions.php:514
|
3359 |
msgid "<strong>ERROR</strong>: Invalid email address."
|
3360 |
msgstr ""
|
3361 |
|
3362 |
+
#: includes/common/functions.php:1137
|
3363 |
msgid ""
|
3364 |
"%1$s wrote:\n"
|
3365 |
"\n"
|
3374 |
"Login and visit the topic to unsubscribe from these emails."
|
3375 |
msgstr ""
|
3376 |
|
3377 |
+
#: includes/common/functions.php:1302
|
3378 |
msgid ""
|
3379 |
"%1$s wrote:\n"
|
3380 |
"\n"
|
3389 |
"Login and visit the topic to unsubscribe from these emails."
|
3390 |
msgstr ""
|
3391 |
|
3392 |
+
#: includes/common/functions.php:2126
|
3393 |
msgid ""
|
3394 |
"Conditional query tags do not work before the query is run. Before then, "
|
3395 |
"they always return false."
|
3396 |
msgstr ""
|
3397 |
|
3398 |
+
#: includes/common/template.php:1698
|
3399 |
msgid "No topics available"
|
3400 |
msgstr ""
|
3401 |
|
3402 |
+
#: includes/common/template.php:1703
|
3403 |
msgid "No forums available"
|
3404 |
msgstr ""
|
3405 |
|
3406 |
+
#: includes/common/template.php:1708
|
3407 |
msgid "None available"
|
3408 |
msgstr ""
|
3409 |
|
3410 |
+
#: includes/common/template.php:2382
|
3411 |
msgid "Home"
|
3412 |
msgstr ""
|
3413 |
|
3414 |
+
#: includes/common/template.php:2452
|
3415 |
msgid "(Edit)"
|
3416 |
msgstr ""
|
3417 |
|
3418 |
+
#: includes/common/template.php:2456 includes/common/template.php:2571
|
3419 |
+
#: includes/common/template.php:2846 includes/core/theme-compat.php:791
|
3420 |
#: templates/default/extras/taxonomy-topic-tag-edit.php:17
|
3421 |
#: templates/default/extras/taxonomy-topic-tag.php:17
|
3422 |
msgid "Topic Tag: %s"
|
3423 |
msgstr ""
|
3424 |
|
3425 |
+
#: includes/common/template.php:2477
|
3426 |
msgid "‹"
|
3427 |
msgstr ""
|
3428 |
|
3429 |
+
#: includes/common/template.php:2477
|
3430 |
msgid "›"
|
3431 |
msgstr ""
|
3432 |
|
3433 |
+
#: includes/common/template.php:2753
|
3434 |
msgid "Log Out"
|
3435 |
msgstr ""
|
3436 |
|
3437 |
+
#: includes/common/template.php:2810
|
3438 |
msgid "Forum Edit: %s"
|
3439 |
msgstr ""
|
3440 |
|
3441 |
+
#: includes/common/template.php:2815
|
3442 |
msgid "Topic Edit: %s"
|
3443 |
msgstr ""
|
3444 |
|
3445 |
+
#: includes/common/template.php:2820
|
3446 |
msgid "Reply Edit: %s"
|
3447 |
msgstr ""
|
3448 |
|
3449 |
+
#: includes/common/template.php:2825
|
3450 |
msgid "Topic Tag Edit: %s"
|
3451 |
msgstr ""
|
3452 |
|
3453 |
+
#: includes/common/template.php:2832
|
3454 |
msgid "Forum: %s"
|
3455 |
msgstr ""
|
3456 |
|
3457 |
+
#: includes/common/template.php:2837
|
3458 |
msgid "Topic: %s"
|
3459 |
msgstr ""
|
3460 |
|
3461 |
+
#: includes/common/template.php:2859
|
3462 |
msgid "Your Topics"
|
3463 |
msgstr ""
|
3464 |
|
3465 |
+
#: includes/common/template.php:2863
|
3466 |
#. translators: user's display name
|
3467 |
msgid "%s's Topics"
|
3468 |
msgstr ""
|
3469 |
|
3470 |
+
#: includes/common/template.php:2869
|
3471 |
msgid "Your Replies"
|
3472 |
msgstr ""
|
3473 |
|
3474 |
+
#: includes/common/template.php:2873
|
3475 |
#. translators: user's display name
|
3476 |
msgid "%s's Replies"
|
3477 |
msgstr ""
|
3478 |
|
3479 |
+
#: includes/common/template.php:2879
|
3480 |
msgid "Your Favorites"
|
3481 |
msgstr ""
|
3482 |
|
3483 |
+
#: includes/common/template.php:2883
|
3484 |
+
#: templates/default/bbpress/user-details.php:57
|
3485 |
#. translators: user's display name
|
3486 |
msgid "%s's Favorites"
|
3487 |
msgstr ""
|
3488 |
|
3489 |
+
#: includes/common/template.php:2889
|
3490 |
msgid "Your Subscriptions"
|
3491 |
msgstr ""
|
3492 |
|
3493 |
+
#: includes/common/template.php:2893
|
3494 |
+
#: templates/default/bbpress/user-details.php:67
|
3495 |
#. translators: user's display name
|
3496 |
msgid "%s's Subscriptions"
|
3497 |
msgstr ""
|
3498 |
|
3499 |
+
#: includes/common/template.php:2899
|
3500 |
msgid "Your Profile"
|
3501 |
msgstr ""
|
3502 |
|
3503 |
+
#: includes/common/template.php:2903
|
3504 |
+
#: templates/default/bbpress/user-details.php:30
|
3505 |
#. translators: user's display name
|
3506 |
msgid "%s's Profile"
|
3507 |
msgstr ""
|
3508 |
|
3509 |
+
#: includes/common/template.php:2912
|
3510 |
msgid "Edit Your Profile"
|
3511 |
msgstr ""
|
3512 |
|
3513 |
+
#: includes/common/template.php:2917
|
3514 |
+
#: templates/default/bbpress/user-details.php:74
|
3515 |
msgid "Edit %s's Profile"
|
3516 |
msgstr ""
|
3517 |
|
3518 |
+
#: includes/common/template.php:2925
|
3519 |
msgid "View: %s"
|
3520 |
msgstr ""
|
3521 |
|
3528 |
msgstr ""
|
3529 |
|
3530 |
#: includes/common/widgets.php:89 includes/common/widgets.php:110
|
3531 |
+
#: templates/default/bbpress/form-user-login.php:17
|
3532 |
+
#: templates/default/bbpress/form-user-login.php:38
|
3533 |
msgid "Log In"
|
3534 |
msgstr ""
|
3535 |
|
3536 |
#: includes/common/widgets.php:92
|
3537 |
+
#: templates/default/bbpress/form-user-edit.php:107
|
3538 |
+
#: templates/default/bbpress/form-user-login.php:20
|
3539 |
+
#: templates/default/bbpress/form-user-register.php:29
|
3540 |
msgid "Username"
|
3541 |
msgstr ""
|
3542 |
|
3543 |
#: includes/common/widgets.php:97
|
3544 |
+
#: templates/default/bbpress/form-user-login.php:25
|
3545 |
msgid "Password"
|
3546 |
msgstr ""
|
3547 |
|
3550 |
msgstr ""
|
3551 |
|
3552 |
#: includes/common/widgets.php:122
|
3553 |
+
#: templates/default/bbpress/form-user-register.php:42
|
3554 |
msgid "Register"
|
3555 |
msgstr ""
|
3556 |
|
3557 |
#: includes/common/widgets.php:128
|
3558 |
+
#: templates/default/bbpress/form-user-lost-pass.php:17
|
3559 |
msgid "Lost Password"
|
3560 |
msgstr ""
|
3561 |
|
3562 |
+
#: includes/common/widgets.php:185 includes/common/widgets.php:343
|
3563 |
+
#: includes/common/widgets.php:472 includes/common/widgets.php:654
|
3564 |
+
#: includes/common/widgets.php:936 includes/common/widgets.php:1090
|
3565 |
+
#: includes/common/widgets.php:1306
|
3566 |
msgid "Title:"
|
3567 |
msgstr ""
|
3568 |
|
3582 |
msgid "(bbPress) Topic Views List"
|
3583 |
msgstr ""
|
3584 |
|
3585 |
+
#: includes/common/widgets.php:390
|
3586 |
msgid "The bbPress forum search form."
|
3587 |
msgstr ""
|
3588 |
|
3589 |
+
#: includes/common/widgets.php:393
|
3590 |
msgid "(bbPress) Forum Search Form"
|
3591 |
msgstr ""
|
3592 |
|
3593 |
+
#: includes/common/widgets.php:490 includes/forums/template.php:64
|
3594 |
msgid "Search Forums"
|
3595 |
msgstr ""
|
3596 |
|
3597 |
+
#: includes/common/widgets.php:519
|
3598 |
msgid "A list of forums with an option to set the parent."
|
3599 |
msgstr ""
|
3600 |
|
3601 |
+
#: includes/common/widgets.php:522
|
3602 |
msgid "(bbPress) Forums List"
|
3603 |
msgstr ""
|
3604 |
|
3605 |
+
#: includes/common/widgets.php:660 includes/common/widgets.php:940
|
3606 |
msgid "Parent Forum ID:"
|
3607 |
msgstr ""
|
3608 |
|
3609 |
+
#: includes/common/widgets.php:666 includes/common/widgets.php:946
|
3610 |
msgid "\"0\" to show only root - \"any\" to show all"
|
3611 |
msgstr ""
|
3612 |
|
3613 |
+
#: includes/common/widgets.php:712
|
3614 |
msgid "A list of recent topics, sorted by: newness, popularity, or recent replies."
|
3615 |
msgstr ""
|
3616 |
|
3617 |
+
#: includes/common/widgets.php:715
|
3618 |
msgid "(bbPress) Recent Topics"
|
3619 |
msgstr ""
|
3620 |
|
3621 |
+
#: includes/common/widgets.php:937
|
3622 |
msgid "Maximum topics to show:"
|
3623 |
msgstr ""
|
3624 |
|
3625 |
+
#: includes/common/widgets.php:949 includes/common/widgets.php:1308
|
3626 |
msgid "Show post date:"
|
3627 |
msgstr ""
|
3628 |
|
3629 |
+
#: includes/common/widgets.php:950
|
3630 |
msgid "Show topic author:"
|
3631 |
msgstr ""
|
3632 |
|
3633 |
+
#: includes/common/widgets.php:953
|
3634 |
msgid "Order By:"
|
3635 |
msgstr ""
|
3636 |
|
3637 |
+
#: includes/common/widgets.php:955
|
3638 |
msgid "Newest Topics"
|
3639 |
msgstr ""
|
3640 |
|
3641 |
+
#: includes/common/widgets.php:956
|
3642 |
#: templates/default/extras/page-forum-statistics.php:34
|
3643 |
msgid "Popular Topics"
|
3644 |
msgstr ""
|
3645 |
|
3646 |
+
#: includes/common/widgets.php:957
|
3647 |
msgid "Topics With Recent Replies"
|
3648 |
msgstr ""
|
3649 |
|
3650 |
+
#: includes/common/widgets.php:974
|
3651 |
msgid "Recent Topics"
|
3652 |
msgstr ""
|
3653 |
|
3654 |
+
#: includes/common/widgets.php:1008
|
3655 |
msgid "Some statistics from your forum."
|
3656 |
msgstr ""
|
3657 |
|
3658 |
+
#: includes/common/widgets.php:1011
|
3659 |
msgid "(bbPress) Statistics"
|
3660 |
msgstr ""
|
3661 |
|
3662 |
+
#: includes/common/widgets.php:1108
|
3663 |
msgid "Forum Statistics"
|
3664 |
msgstr ""
|
3665 |
|
3666 |
+
#: includes/common/widgets.php:1137
|
3667 |
msgid "A list of the most recent replies."
|
3668 |
msgstr ""
|
3669 |
|
3670 |
+
#: includes/common/widgets.php:1140
|
3671 |
msgid "(bbPress) Recent Replies"
|
3672 |
msgstr ""
|
3673 |
|
3674 |
+
#: includes/common/widgets.php:1307
|
3675 |
msgid "Maximum replies to show:"
|
3676 |
msgstr ""
|
3677 |
|
3678 |
+
#: includes/common/widgets.php:1309
|
3679 |
msgid "Show reply author:"
|
3680 |
msgstr ""
|
3681 |
|
3682 |
+
#: includes/common/widgets.php:1324
|
3683 |
msgid "Recent Replies"
|
3684 |
msgstr ""
|
3685 |
|
3686 |
+
#: includes/core/capabilities.php:510
|
3687 |
msgid "Editable forum roles no longer exist."
|
3688 |
msgstr ""
|
3689 |
|
3690 |
+
#: includes/core/update.php:193
|
3691 |
msgid "General"
|
3692 |
msgstr ""
|
3693 |
|
3694 |
+
#: includes/core/update.php:194
|
3695 |
msgid "General chit-chat"
|
3696 |
msgstr ""
|
3697 |
|
3698 |
+
#: includes/core/update.php:197
|
3699 |
msgid "Hello World!"
|
3700 |
msgstr ""
|
3701 |
|
3702 |
+
#: includes/core/update.php:198
|
3703 |
msgid "I am the first topic in your new forums."
|
3704 |
msgstr ""
|
3705 |
|
3706 |
+
#: includes/core/update.php:201
|
3707 |
msgid "Oh, and this is what a reply looks like."
|
3708 |
msgstr ""
|
3709 |
|
3767 |
msgid "No recorded history. Akismet has not checked this post."
|
3768 |
msgstr ""
|
3769 |
|
3770 |
+
#: includes/extend/buddypress/activity.php:202
|
3771 |
msgid "New forum topic"
|
3772 |
msgstr ""
|
3773 |
|
3774 |
+
#: includes/extend/buddypress/activity.php:212
|
3775 |
msgid "New forum reply"
|
3776 |
msgstr ""
|
3777 |
|
3778 |
+
#: includes/extend/buddypress/activity.php:479
|
3779 |
+
#: includes/extend/buddypress/functions.php:828
|
3780 |
msgid "%1$s started the topic %2$s in the forum %3$s"
|
3781 |
msgstr ""
|
3782 |
|
3783 |
+
#: includes/extend/buddypress/activity.php:632
|
3784 |
+
#: includes/extend/buddypress/functions.php:829
|
3785 |
msgid "%1$s replied to the topic %2$s in the forum %3$s"
|
3786 |
msgstr ""
|
3787 |
|
3788 |
+
#: includes/extend/buddypress/groups.php:332
|
3789 |
+
#: includes/extend/buddypress/groups.php:335
|
3790 |
msgid "Group Forum Settings"
|
3791 |
msgstr ""
|
3792 |
|
3793 |
+
#: includes/extend/buddypress/groups.php:336
|
3794 |
+
#: includes/extend/buddypress/groups.php:542
|
3795 |
msgid ""
|
3796 |
"Create a discussion forum to allow members of this group to communicate in "
|
3797 |
"a structured, bulletin-board style fashion."
|
3798 |
msgstr ""
|
3799 |
|
3800 |
+
#: includes/extend/buddypress/groups.php:340
|
3801 |
+
#: includes/extend/buddypress/groups.php:545
|
3802 |
msgid "Yes. I want this group to have a forum."
|
3803 |
msgstr ""
|
3804 |
|
3805 |
+
#: includes/extend/buddypress/groups.php:343
|
3806 |
msgid "Saying no will not delete existing forum content."
|
3807 |
msgstr ""
|
3808 |
|
3809 |
+
#: includes/extend/buddypress/groups.php:348
|
3810 |
msgid "Group Forum:"
|
3811 |
msgstr ""
|
3812 |
|
3813 |
+
#: includes/extend/buddypress/groups.php:356
|
3814 |
msgid "Network administrators can reconfigure which forum belongs to this group."
|
3815 |
msgstr ""
|
3816 |
|
3817 |
+
#: includes/extend/buddypress/groups.php:361
|
3818 |
msgid "Save Settings"
|
3819 |
msgstr ""
|
3820 |
|
3821 |
+
#: includes/extend/buddypress/groups.php:398
|
3822 |
+
#: includes/extend/buddypress/groups.php:560
|
3823 |
+
#: includes/extend/buddypress/notifications.php:195
|
3824 |
+
#: includes/forums/functions.php:136 includes/forums/functions.php:424
|
3825 |
+
#: includes/replies/functions.php:161 includes/replies/functions.php:562
|
3826 |
+
#: includes/replies/functions.php:1355 includes/topics/functions.php:141
|
3827 |
+
#: includes/topics/functions.php:528 includes/topics/functions.php:1217
|
3828 |
+
#: includes/topics/functions.php:1530 includes/topics/functions.php:1886
|
3829 |
+
#: includes/topics/functions.php:1926 includes/topics/functions.php:1984
|
3830 |
+
#: includes/users/engagements.php:530 includes/users/engagements.php:1201
|
3831 |
+
#: includes/users/engagements.php:1311 includes/users/functions.php:233
|
3832 |
+
#: includes/users/functions.php:239 includes/users/functions.php:429
|
3833 |
msgid "<strong>ERROR</strong>: Are you sure you wanted to do that?"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
+
#: includes/extend/buddypress/groups.php:540
|
3837 |
msgid "Group Forum"
|
3838 |
msgstr ""
|
3839 |
|
3840 |
+
#: includes/extend/buddypress/groups.php:904
|
3841 |
msgid "This group does not currently have a forum."
|
3842 |
msgstr ""
|
3843 |
|
3845 |
msgid "Search Forums..."
|
3846 |
msgstr ""
|
3847 |
|
3848 |
+
#: includes/extend/buddypress/loader.php:346
|
3849 |
+
#: templates/default/bbpress/user-subscriptions.php:38
|
3850 |
msgid "Subscribed Topics"
|
3851 |
msgstr ""
|
3852 |
|
3853 |
+
#: includes/extend/buddypress/notifications.php:89
|
|
|
|
|
|
|
|
|
3854 |
msgid "You have %d new replies"
|
3855 |
msgstr ""
|
3856 |
|
3857 |
+
#: includes/extend/buddypress/notifications.php:95
|
3858 |
msgid "You have %d new reply to %2$s from %3$s"
|
3859 |
msgstr ""
|
3860 |
|
3861 |
+
#: includes/extend/buddypress/notifications.php:96
|
3862 |
msgid "You have %d new reply to %s"
|
3863 |
msgstr ""
|
3864 |
|
3865 |
+
#: includes/extend/buddypress/notifications.php:101
|
3866 |
+
msgid "Topic Replies"
|
3867 |
+
msgstr ""
|
3868 |
+
|
3869 |
+
#: includes/extend/buddypress/notifications.php:199
|
3870 |
msgid ""
|
3871 |
"<strong>ERROR</strong>: You do not have permission to mark notifications "
|
3872 |
"for that user."
|
3873 |
msgstr ""
|
3874 |
|
3875 |
+
#: includes/forums/functions.php:150
|
3876 |
msgid "<strong>ERROR</strong>: You do not have permission to create new forums."
|
3877 |
msgstr ""
|
3878 |
|
3879 |
+
#: includes/forums/functions.php:175 includes/forums/functions.php:485
|
3880 |
msgid "<strong>ERROR</strong>: Your forum needs a title."
|
3881 |
msgstr ""
|
3882 |
|
3883 |
+
#: includes/forums/functions.php:189 includes/forums/functions.php:499
|
3884 |
msgid "<strong>ERROR</strong>: Your forum description cannot be empty."
|
3885 |
msgstr ""
|
3886 |
|
3887 |
+
#: includes/forums/functions.php:204
|
3888 |
msgid "<strong>ERROR</strong>: Your forum must have a parent."
|
3889 |
msgstr ""
|
3890 |
|
3891 |
+
#: includes/forums/functions.php:211
|
3892 |
msgid ""
|
3893 |
"<strong>ERROR</strong>: This forum is a category. No forums can be created "
|
3894 |
"in this forum."
|
3895 |
msgstr ""
|
3896 |
|
3897 |
+
#: includes/forums/functions.php:216 includes/forums/functions.php:460
|
3898 |
msgid "<strong>ERROR</strong>: This forum has been closed to new forums."
|
3899 |
msgstr ""
|
3900 |
|
3901 |
+
#: includes/forums/functions.php:221 includes/forums/functions.php:465
|
3902 |
msgid ""
|
3903 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
3904 |
"capability to read or create new forums in it."
|
3905 |
msgstr ""
|
3906 |
|
3907 |
+
#: includes/forums/functions.php:226 includes/forums/functions.php:470
|
3908 |
msgid ""
|
3909 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
3910 |
"capability to read or create new forums in it."
|
3911 |
msgstr ""
|
3912 |
|
3913 |
+
#: includes/forums/functions.php:233 includes/replies/functions.php:326
|
3914 |
+
#: includes/topics/functions.php:278
|
3915 |
msgid "<strong>ERROR</strong>: Slow down; you move too fast."
|
3916 |
msgstr ""
|
3917 |
|
3918 |
+
#: includes/forums/functions.php:239
|
3919 |
msgid "<strong>ERROR</strong>: This forum already exists."
|
3920 |
msgstr ""
|
3921 |
|
3922 |
+
#: includes/forums/functions.php:245
|
3923 |
msgid "<strong>ERROR</strong>: Your forum cannot be created at this time."
|
3924 |
msgstr ""
|
3925 |
|
3926 |
+
#: includes/forums/functions.php:358 includes/replies/functions.php:496
|
3927 |
+
#: includes/topics/functions.php:431
|
3928 |
+
msgid "<strong>ERROR</strong>: The following problem(s) occurred: %s"
|
3929 |
+
msgstr ""
|
3930 |
+
|
3931 |
+
#: includes/forums/functions.php:362
|
3932 |
+
msgid "<strong>ERROR</strong>: The forum was not created."
|
3933 |
+
msgstr ""
|
3934 |
+
|
3935 |
+
#: includes/forums/functions.php:413
|
3936 |
msgid "<strong>ERROR</strong>: Forum ID not found."
|
3937 |
msgstr ""
|
3938 |
|
3939 |
+
#: includes/forums/functions.php:429
|
3940 |
msgid "<strong>ERROR</strong>: The forum you want to edit was not found."
|
3941 |
msgstr ""
|
3942 |
|
3943 |
+
#: includes/forums/functions.php:434
|
3944 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that forum."
|
3945 |
msgstr ""
|
3946 |
|
3947 |
+
#: includes/forums/functions.php:505
|
3948 |
msgid "<strong>ERROR</strong>: Your forum cannot be edited at this time."
|
3949 |
msgstr ""
|
3950 |
|
3951 |
+
#: includes/forums/template.php:56 includes/replies/template.php:55
|
3952 |
+
#: includes/topics/template.php:55
|
3953 |
msgid "Add New"
|
3954 |
msgstr ""
|
3955 |
|
3956 |
+
#: includes/forums/template.php:57 templates/default/bbpress/form-forum.php:40
|
3957 |
msgid "Create New Forum"
|
3958 |
msgstr ""
|
3959 |
|
3960 |
+
#: includes/forums/template.php:59
|
3961 |
msgid "Edit Forum"
|
3962 |
msgstr ""
|
3963 |
|
3964 |
+
#: includes/forums/template.php:60
|
3965 |
msgid "New Forum"
|
3966 |
msgstr ""
|
3967 |
|
3968 |
+
#: includes/forums/template.php:61 includes/forums/template.php:62
|
3969 |
msgid "View Forum"
|
3970 |
msgstr ""
|
3971 |
|
3972 |
+
#: includes/forums/template.php:63
|
3973 |
msgid "View Forums"
|
3974 |
msgstr ""
|
3975 |
|
3976 |
+
#: includes/forums/template.php:65
|
3977 |
msgid "No forums found"
|
3978 |
msgstr ""
|
3979 |
|
3980 |
+
#: includes/forums/template.php:66
|
3981 |
msgid "No forums found in Trash"
|
3982 |
msgstr ""
|
3983 |
|
3984 |
+
#: includes/forums/template.php:67
|
3985 |
+
msgid "Filter forums list"
|
3986 |
+
msgstr ""
|
3987 |
+
|
3988 |
+
#: includes/forums/template.php:68
|
3989 |
+
msgid "Forums list"
|
3990 |
+
msgstr ""
|
3991 |
+
|
3992 |
+
#: includes/forums/template.php:69
|
3993 |
+
msgid "Forums list navigation"
|
3994 |
+
msgstr ""
|
3995 |
+
|
3996 |
+
#: includes/forums/template.php:70 templates/default/bbpress/form-forum.php:139
|
3997 |
msgid "Parent Forum:"
|
3998 |
msgstr ""
|
3999 |
|
4000 |
+
#: includes/forums/template.php:901 includes/topics/template.php:2009
|
4001 |
+
#: includes/users/template.php:1362
|
4002 |
msgid "Subscribe"
|
4003 |
msgstr ""
|
4004 |
|
4005 |
+
#: includes/forums/template.php:902 includes/topics/template.php:2010
|
4006 |
+
#: includes/users/template.php:1363
|
4007 |
msgid "Unsubscribe"
|
4008 |
msgstr ""
|
4009 |
|
4010 |
+
#: includes/forums/template.php:1321 includes/forums/template.php:2183
|
4011 |
msgid "%s topic"
|
4012 |
msgid_plural "%s topics"
|
4013 |
msgstr[0] ""
|
4014 |
msgstr[1] ""
|
4015 |
|
4016 |
+
#: includes/forums/template.php:1336 includes/topics/template.php:2306
|
4017 |
+
msgid "(+%s hidden)"
|
4018 |
+
msgid_plural "(+%s hidden)"
|
4019 |
msgstr[0] ""
|
4020 |
msgstr[1] ""
|
4021 |
|
4022 |
+
#: includes/forums/template.php:2172 includes/topics/template.php:2291
|
4023 |
msgid "%s reply"
|
4024 |
msgid_plural "%s replies"
|
4025 |
msgstr[0] ""
|
4026 |
msgstr[1] ""
|
4027 |
|
4028 |
+
#: includes/forums/template.php:2192
|
4029 |
msgid "This category contains %1$s and %2$s, and was last updated by %3$s %4$s."
|
4030 |
msgstr ""
|
4031 |
|
4032 |
+
#: includes/forums/template.php:2194
|
4033 |
msgid "This forum contains %1$s and %2$s, and was last updated by %3$s %4$s."
|
4034 |
msgstr ""
|
4035 |
|
4036 |
+
#: includes/forums/template.php:2200
|
4037 |
msgid "This category contains %1$s, and was last updated by %2$s %3$s."
|
4038 |
msgstr ""
|
4039 |
|
4040 |
+
#: includes/forums/template.php:2202
|
4041 |
msgid "This forum contains %1$s, and was last updated by %2$s %3$s."
|
4042 |
msgstr ""
|
4043 |
|
4044 |
+
#: includes/forums/template.php:2212
|
4045 |
msgid "This category contains %1$s and %2$s."
|
4046 |
msgstr ""
|
4047 |
|
4048 |
+
#: includes/forums/template.php:2214
|
4049 |
msgid "This forum contains %1$s and %2$s."
|
4050 |
msgstr ""
|
4051 |
|
4052 |
+
#: includes/forums/template.php:2222
|
4053 |
msgid "This category contains %1$s."
|
4054 |
msgstr ""
|
4055 |
|
4056 |
+
#: includes/forums/template.php:2224
|
4057 |
msgid "This forum contains %1$s."
|
4058 |
msgstr ""
|
4059 |
|
4060 |
+
#: includes/forums/template.php:2228
|
4061 |
msgid "This forum is empty."
|
4062 |
msgstr ""
|
4063 |
|
4064 |
+
#: includes/replies/functions.php:186
|
4065 |
msgid "<strong>ERROR</strong>: You do not have permission to reply."
|
4066 |
msgstr ""
|
4067 |
|
4068 |
+
#: includes/replies/functions.php:197
|
4069 |
msgid "<strong>ERROR</strong>: Topic ID is missing."
|
4070 |
msgstr ""
|
4071 |
|
4072 |
+
#: includes/replies/functions.php:201
|
4073 |
msgid "<strong>ERROR</strong>: Topic ID must be a number."
|
4074 |
msgstr ""
|
4075 |
|
4076 |
+
#: includes/replies/functions.php:211
|
4077 |
msgid "<strong>ERROR</strong>: Topic ID cannot be a negative number."
|
4078 |
msgstr ""
|
4079 |
|
4080 |
+
#: includes/replies/functions.php:215
|
4081 |
msgid "<strong>ERROR</strong>: Topic does not exist."
|
4082 |
msgstr ""
|
4083 |
|
4084 |
+
#: includes/replies/functions.php:234 includes/replies/functions.php:248
|
4085 |
+
#: includes/topics/functions.php:218 includes/topics/functions.php:232
|
4086 |
+
#: includes/topics/functions.php:543
|
4087 |
msgid "<strong>ERROR</strong>: Forum ID is missing."
|
4088 |
msgstr ""
|
4089 |
|
4090 |
+
#: includes/replies/functions.php:238 includes/topics/functions.php:222
|
4091 |
msgid "<strong>ERROR</strong>: Forum ID must be a number."
|
4092 |
msgstr ""
|
4093 |
|
4094 |
+
#: includes/replies/functions.php:252 includes/topics/functions.php:236
|
4095 |
msgid "<strong>ERROR</strong>: Forum ID cannot be a negative number."
|
4096 |
msgstr ""
|
4097 |
|
4098 |
+
#: includes/replies/functions.php:256 includes/topics/functions.php:240
|
4099 |
msgid "<strong>ERROR</strong>: Forum does not exist."
|
4100 |
msgstr ""
|
4101 |
|
4102 |
+
#: includes/replies/functions.php:270 includes/replies/functions.php:614
|
4103 |
msgid ""
|
4104 |
"<strong>ERROR</strong>: This forum is a category. No replies can be created "
|
4105 |
"in this forum."
|
4106 |
msgstr ""
|
4107 |
|
4108 |
+
#: includes/replies/functions.php:277 includes/replies/functions.php:621
|
4109 |
msgid "<strong>ERROR</strong>: This forum has been closed to new replies."
|
4110 |
msgstr ""
|
4111 |
|
4112 |
+
#: includes/replies/functions.php:282 includes/replies/functions.php:626
|
4113 |
msgid ""
|
4114 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
4115 |
"capability to read or create new replies in it."
|
4116 |
msgstr ""
|
4117 |
|
4118 |
+
#: includes/replies/functions.php:286 includes/replies/functions.php:630
|
4119 |
msgid ""
|
4120 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
4121 |
"capability to read or create new replies in it."
|
4122 |
msgstr ""
|
4123 |
|
4124 |
+
#: includes/replies/functions.php:320 includes/replies/functions.php:655
|
4125 |
msgid "<strong>ERROR</strong>: Your reply cannot be empty."
|
4126 |
msgstr ""
|
4127 |
|
4128 |
+
#: includes/replies/functions.php:332
|
4129 |
msgid ""
|
4130 |
"<strong>ERROR</strong>: Duplicate reply detected; it looks as though "
|
4131 |
"you’ve already said that."
|
4132 |
msgstr ""
|
4133 |
|
4134 |
+
#: includes/replies/functions.php:338
|
4135 |
msgid "<strong>ERROR</strong>: Your reply cannot be created at this time."
|
4136 |
msgstr ""
|
4137 |
|
4138 |
+
#: includes/replies/functions.php:363
|
4139 |
msgid "<strong>ERROR</strong>: Topic is closed."
|
4140 |
msgstr ""
|
4141 |
|
4142 |
+
#: includes/replies/functions.php:423 includes/replies/functions.php:749
|
4143 |
msgid "<strong>ERROR</strong>: There was a problem adding the tags to the topic."
|
4144 |
msgstr ""
|
4145 |
|
4146 |
+
#: includes/replies/functions.php:500
|
4147 |
+
msgid "<strong>ERROR</strong>: The reply was not created."
|
4148 |
+
msgstr ""
|
4149 |
+
|
4150 |
+
#: includes/replies/functions.php:551
|
4151 |
msgid "<strong>ERROR</strong>: Reply ID not found."
|
4152 |
msgstr ""
|
4153 |
|
4154 |
+
#: includes/replies/functions.php:568
|
4155 |
msgid "<strong>ERROR</strong>: The reply you want to edit was not found."
|
4156 |
msgstr ""
|
4157 |
|
4158 |
+
#: includes/replies/functions.php:579
|
4159 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that reply."
|
4160 |
msgstr ""
|
4161 |
|
4163 |
msgid "<strong>ERROR</strong>: Your reply cannot be edited at this time."
|
4164 |
msgstr ""
|
4165 |
|
4166 |
+
#: includes/replies/functions.php:1331
|
4167 |
msgid "<strong>ERROR</strong>: A reply ID is required"
|
4168 |
msgstr ""
|
4169 |
|
4170 |
+
#: includes/replies/functions.php:1340
|
4171 |
msgid "<strong>ERROR</strong>: The reply you want to move was not found."
|
4172 |
msgstr ""
|
4173 |
|
4174 |
+
#: includes/replies/functions.php:1350
|
4175 |
msgid "<strong>ERROR</strong>: The topic you want to move from was not found."
|
4176 |
msgstr ""
|
4177 |
|
4178 |
+
#: includes/replies/functions.php:1361 includes/topics/functions.php:1228
|
4179 |
+
#: includes/topics/functions.php:1536
|
4180 |
msgid "<strong>ERROR</strong>: You do not have permission to edit the source topic."
|
4181 |
msgstr ""
|
4182 |
|
4183 |
+
#: includes/replies/functions.php:1371
|
4184 |
msgid "<strong>ERROR</strong>: You need to choose a valid move option."
|
4185 |
msgstr ""
|
4186 |
|
4187 |
+
#: includes/replies/functions.php:1384 includes/topics/functions.php:1559
|
4188 |
msgid "<strong>ERROR</strong>: A topic ID is required."
|
4189 |
msgstr ""
|
4190 |
|
4191 |
+
#: includes/replies/functions.php:1394
|
4192 |
msgid "<strong>ERROR</strong>: The topic you want to move to was not found."
|
4193 |
msgstr ""
|
4194 |
|
4195 |
+
#: includes/replies/functions.php:1399 includes/topics/functions.php:1248
|
4196 |
+
#: includes/topics/functions.php:1574
|
4197 |
msgid ""
|
4198 |
"<strong>ERROR</strong>: You do not have permission to edit the destination "
|
4199 |
"topic."
|
4200 |
msgstr ""
|
4201 |
|
4202 |
+
#: includes/replies/functions.php:1453 includes/topics/functions.php:1612
|
4203 |
msgid ""
|
4204 |
"<strong>ERROR</strong>: There was a problem converting the reply into the "
|
4205 |
"topic. Please try again."
|
4206 |
msgstr ""
|
4207 |
|
4208 |
+
#: includes/replies/functions.php:1458 includes/topics/functions.php:1617
|
4209 |
msgid ""
|
4210 |
"<strong>ERROR</strong>: You do not have permission to create new topics. "
|
4211 |
"The reply could not be converted into a topic."
|
4212 |
msgstr ""
|
4213 |
|
4214 |
+
#: includes/replies/functions.php:1630
|
4215 |
msgid "<strong>ERROR:</strong> This reply could not be found or no longer exists."
|
4216 |
msgstr ""
|
4217 |
|
4218 |
+
#: includes/replies/functions.php:1636 includes/topics/functions.php:2194
|
4219 |
msgid "<strong>ERROR:</strong> You do not have permission to do that."
|
4220 |
msgstr ""
|
4221 |
|
4222 |
+
#: includes/replies/functions.php:1712
|
4223 |
msgid "<strong>ERROR</strong>: There was a problem approving the reply."
|
4224 |
msgstr ""
|
4225 |
|
4226 |
+
#: includes/replies/functions.php:1712
|
4227 |
msgid "<strong>ERROR</strong>: There was a problem unapproving the reply."
|
4228 |
msgstr ""
|
4229 |
|
4230 |
+
#: includes/replies/functions.php:1723
|
4231 |
msgid "<strong>ERROR</strong>: There was a problem unmarking the reply as spam."
|
4232 |
msgstr ""
|
4233 |
|
4234 |
+
#: includes/replies/functions.php:1723
|
4235 |
msgid "<strong>ERROR</strong>: There was a problem marking the reply as spam."
|
4236 |
msgstr ""
|
4237 |
|
4238 |
+
#: includes/replies/functions.php:1738
|
4239 |
msgid "<strong>ERROR</strong>: There was a problem trashing the reply."
|
4240 |
msgstr ""
|
4241 |
|
4242 |
+
#: includes/replies/functions.php:1746
|
4243 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the reply."
|
4244 |
msgstr ""
|
4245 |
|
4246 |
+
#: includes/replies/functions.php:1754
|
4247 |
msgid "<strong>ERROR</strong>: There was a problem deleting the reply."
|
4248 |
msgstr ""
|
4249 |
|
4250 |
+
#: includes/replies/functions.php:2295
|
4251 |
msgid "All Posts"
|
4252 |
msgstr ""
|
4253 |
|
4254 |
+
#: includes/replies/functions.php:2341 includes/topics/functions.php:4218
|
4255 |
msgid "Replies: %s"
|
4256 |
msgstr ""
|
4257 |
|
4258 |
+
#: includes/replies/template.php:56
|
4259 |
msgid "Create New Reply"
|
4260 |
msgstr ""
|
4261 |
|
4262 |
+
#: includes/replies/template.php:58
|
4263 |
msgid "Edit Reply"
|
4264 |
msgstr ""
|
4265 |
|
4266 |
+
#: includes/replies/template.php:59
|
4267 |
msgid "New Reply"
|
4268 |
msgstr ""
|
4269 |
|
4270 |
+
#: includes/replies/template.php:60 includes/replies/template.php:61
|
4271 |
msgid "View Reply"
|
4272 |
msgstr ""
|
4273 |
|
4274 |
+
#: includes/replies/template.php:62
|
4275 |
msgid "View Replies"
|
4276 |
msgstr ""
|
4277 |
|
4278 |
+
#: includes/replies/template.php:63
|
4279 |
msgid "Search Replies"
|
4280 |
msgstr ""
|
4281 |
|
4282 |
+
#: includes/replies/template.php:64
|
4283 |
msgid "No replies found"
|
4284 |
msgstr ""
|
4285 |
|
4286 |
+
#: includes/replies/template.php:65
|
4287 |
msgid "No replies found in Trash"
|
4288 |
msgstr ""
|
4289 |
|
4290 |
+
#: includes/replies/template.php:66
|
4291 |
+
msgid "Filter replies list"
|
4292 |
+
msgstr ""
|
4293 |
+
|
4294 |
+
#: includes/replies/template.php:67
|
4295 |
+
msgid "Replies list"
|
4296 |
+
msgstr ""
|
4297 |
+
|
4298 |
+
#: includes/replies/template.php:68
|
4299 |
+
msgid "Replies list navigation"
|
4300 |
+
msgstr ""
|
4301 |
+
|
4302 |
+
#: includes/replies/template.php:595
|
4303 |
+
#: templates/default/bbpress/form-reply.php:30
|
4304 |
msgid "Reply To: %s"
|
4305 |
msgstr ""
|
4306 |
|
4307 |
+
#: includes/replies/template.php:837
|
4308 |
msgid "This reply was modified %1$s by %2$s. Reason: %3$s"
|
4309 |
msgstr ""
|
4310 |
|
4311 |
+
#: includes/replies/template.php:839
|
4312 |
msgid "This reply was modified %1$s by %2$s."
|
4313 |
msgstr ""
|
4314 |
|
4315 |
+
#: includes/replies/template.php:1313 includes/topics/template.php:1619
|
4316 |
+
#: includes/users/template.php:2175
|
|
|
|
|
|
|
|
|
|
|
4317 |
msgid "View %s's profile"
|
4318 |
msgstr ""
|
4319 |
|
4320 |
+
#: includes/replies/template.php:1313 includes/topics/template.php:1619
|
4321 |
+
#: includes/users/template.php:2175
|
4322 |
msgid "Visit %s's website"
|
4323 |
msgstr ""
|
4324 |
|
4325 |
+
#: includes/replies/template.php:1819
|
4326 |
msgid "Cancel"
|
4327 |
msgstr ""
|
4328 |
|
4329 |
+
#: includes/replies/template.php:2180 includes/topics/template.php:2826
|
4330 |
+
#: templates/default/bbpress/form-topic-tag.php:100
|
4331 |
+
#: templates/default/bbpress/form-topic-tag.php:117
|
4332 |
msgid "Delete"
|
4333 |
msgstr ""
|
4334 |
|
4335 |
+
#: includes/replies/template.php:2205 includes/topics/template.php:2847
|
4336 |
msgid "Are you sure you want to delete that permanently?"
|
4337 |
msgstr ""
|
4338 |
|
4339 |
+
#: includes/replies/template.php:2326
|
4340 |
msgid "Move"
|
4341 |
msgstr ""
|
4342 |
|
4343 |
+
#: includes/replies/template.php:2327
|
4344 |
msgid "Move this reply"
|
4345 |
msgstr ""
|
4346 |
|
4347 |
+
#: includes/replies/template.php:2397
|
4348 |
msgid "Split"
|
4349 |
msgstr ""
|
4350 |
|
4351 |
+
#: includes/replies/template.php:2398
|
4352 |
msgid "Split the topic from this reply"
|
4353 |
msgstr ""
|
4354 |
|
4355 |
+
#: includes/replies/template.php:2574
|
4356 |
msgid "Viewing %1$s reply thread"
|
4357 |
msgid_plural "Viewing %1$s reply threads"
|
4358 |
msgstr[0] ""
|
4359 |
msgstr[1] ""
|
4360 |
|
4361 |
+
#: includes/replies/template.php:2581
|
4362 |
msgid "Viewing %1$s reply"
|
4363 |
msgid_plural "Viewing %1$s replies"
|
4364 |
msgstr[0] ""
|
4365 |
msgstr[1] ""
|
4366 |
|
4367 |
+
#: includes/replies/template.php:2585
|
4368 |
msgid "Viewing %2$s replies (of %4$s total)"
|
4369 |
msgid_plural "Viewing %1$s replies - %2$s through %3$s (of %4$s total)"
|
4370 |
msgstr[0] ""
|
4371 |
msgstr[1] ""
|
4372 |
|
4373 |
+
#: includes/replies/template.php:2593
|
4374 |
msgid "Viewing %1$s post"
|
4375 |
msgid_plural "Viewing %1$s posts"
|
4376 |
msgstr[0] ""
|
4377 |
msgstr[1] ""
|
4378 |
|
4379 |
+
#: includes/replies/template.php:2597
|
4380 |
msgid "Viewing %2$s post (of %4$s total)"
|
4381 |
msgid_plural "Viewing %1$s posts - %2$s through %3$s (of %4$s total)"
|
4382 |
msgstr[0] ""
|
4386 |
msgid "Search Results for '%s'"
|
4387 |
msgstr ""
|
4388 |
|
4389 |
+
#: includes/search/template.php:422
|
4390 |
msgid "Viewing %1$s result"
|
4391 |
msgid_plural "Viewing %1$s results"
|
4392 |
msgstr[0] ""
|
4393 |
msgstr[1] ""
|
4394 |
|
4395 |
+
#: includes/search/template.php:426
|
4396 |
msgid "Viewing %2$s results (of %4$s total)"
|
4397 |
msgid_plural "Viewing %1$s results - %2$s through %3$s (of %4$s total)"
|
4398 |
msgstr[0] ""
|
4399 |
msgstr[1] ""
|
4400 |
|
4401 |
+
#: includes/topics/functions.php:168
|
4402 |
msgid "<strong>ERROR</strong>: You do not have permission to create new topics."
|
4403 |
msgstr ""
|
4404 |
|
4405 |
+
#: includes/topics/functions.php:194 includes/topics/functions.php:590
|
4406 |
msgid "<strong>ERROR</strong>: Your topic needs a title."
|
4407 |
msgstr ""
|
4408 |
|
4409 |
+
#: includes/topics/functions.php:208 includes/topics/functions.php:604
|
4410 |
msgid "<strong>ERROR</strong>: Your topic cannot be empty."
|
4411 |
msgstr ""
|
4412 |
|
4413 |
+
#: includes/topics/functions.php:254
|
4414 |
msgid ""
|
4415 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
4416 |
"in this forum."
|
4417 |
msgstr ""
|
4418 |
|
4419 |
+
#: includes/topics/functions.php:261 includes/topics/functions.php:565
|
4420 |
msgid "<strong>ERROR</strong>: This forum has been closed to new topics."
|
4421 |
msgstr ""
|
4422 |
|
4423 |
+
#: includes/topics/functions.php:266 includes/topics/functions.php:570
|
4424 |
msgid ""
|
4425 |
"<strong>ERROR</strong>: This forum is private and you do not have the "
|
4426 |
"capability to read or create new topics in it."
|
4427 |
msgstr ""
|
4428 |
|
4429 |
+
#: includes/topics/functions.php:270 includes/topics/functions.php:574
|
4430 |
msgid ""
|
4431 |
"<strong>ERROR</strong>: This forum is hidden and you do not have the "
|
4432 |
"capability to read or create new topics in it."
|
4433 |
msgstr ""
|
4434 |
|
4435 |
+
#: includes/topics/functions.php:284
|
4436 |
msgid ""
|
4437 |
"<strong>ERROR</strong>: Duplicate topic detected; it looks as though "
|
4438 |
"you’ve already said that."
|
4439 |
msgstr ""
|
4440 |
|
4441 |
+
#: includes/topics/functions.php:290
|
4442 |
msgid "<strong>ERROR</strong>: Your topic cannot be created at this time."
|
4443 |
msgstr ""
|
4444 |
|
4445 |
+
#: includes/topics/functions.php:435
|
4446 |
+
msgid "<strong>ERROR</strong>: The topic was not created."
|
4447 |
+
msgstr ""
|
4448 |
+
|
4449 |
+
#: includes/topics/functions.php:490 includes/topics/functions.php:1210
|
4450 |
msgid "<strong>ERROR</strong>: Topic ID not found."
|
4451 |
msgstr ""
|
4452 |
|
4453 |
+
#: includes/topics/functions.php:501
|
4454 |
msgid "<strong>ERROR</strong>: The topic you want to edit was not found."
|
4455 |
msgstr ""
|
4456 |
|
4457 |
+
#: includes/topics/functions.php:512
|
4458 |
msgid "<strong>ERROR</strong>: You do not have permission to edit that topic."
|
4459 |
msgstr ""
|
4460 |
|
4461 |
+
#: includes/topics/functions.php:558
|
4462 |
msgid ""
|
4463 |
"<strong>ERROR</strong>: This forum is a category. No topics can be created "
|
4464 |
"in it."
|
4465 |
msgstr ""
|
4466 |
|
4467 |
+
#: includes/topics/functions.php:610
|
4468 |
msgid "<strong>ERROR</strong>: Your topic cannot be edited at this time."
|
4469 |
msgstr ""
|
4470 |
|
4471 |
+
#: includes/topics/functions.php:1222
|
4472 |
msgid "<strong>ERROR</strong>: The topic you want to merge was not found."
|
4473 |
msgstr ""
|
4474 |
|
4475 |
+
#: includes/topics/functions.php:1236
|
4476 |
msgid "<strong>ERROR</strong>: Destination topic ID not found."
|
4477 |
msgstr ""
|
4478 |
|
4479 |
+
#: includes/topics/functions.php:1243
|
4480 |
msgid "<strong>ERROR</strong>: The topic you want to merge to was not found."
|
4481 |
msgstr ""
|
4482 |
|
4483 |
+
#: includes/topics/functions.php:1506
|
4484 |
msgid "<strong>ERROR</strong>: A reply ID is required."
|
4485 |
msgstr ""
|
4486 |
|
4487 |
+
#: includes/topics/functions.php:1515
|
4488 |
msgid "<strong>ERROR</strong>: The reply you want to split from was not found."
|
4489 |
msgstr ""
|
4490 |
|
4491 |
+
#: includes/topics/functions.php:1525
|
4492 |
msgid "<strong>ERROR</strong>: The topic you want to split was not found."
|
4493 |
msgstr ""
|
4494 |
|
4495 |
+
#: includes/topics/functions.php:1546
|
4496 |
msgid "<strong>ERROR</strong>: You need to choose a valid split option."
|
4497 |
msgstr ""
|
4498 |
|
4499 |
+
#: includes/topics/functions.php:1569
|
4500 |
msgid "<strong>ERROR</strong>: The topic you want to split to was not found."
|
4501 |
msgstr ""
|
4502 |
|
4503 |
+
#: includes/topics/functions.php:1874
|
4504 |
msgid ""
|
4505 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4506 |
"getting the tag: %s"
|
4507 |
msgstr ""
|
4508 |
|
4509 |
+
#: includes/topics/functions.php:1892 includes/topics/functions.php:1932
|
4510 |
msgid "<strong>ERROR</strong>: You do not have permission to edit the topic tags."
|
4511 |
msgstr ""
|
4512 |
|
4513 |
+
#: includes/topics/functions.php:1898 includes/topics/functions.php:1938
|
4514 |
msgid "<strong>ERROR</strong>: You need to enter a tag name."
|
4515 |
msgstr ""
|
4516 |
|
4517 |
+
#: includes/topics/functions.php:1909
|
4518 |
msgid ""
|
4519 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4520 |
"updating the tag: %s"
|
4521 |
msgstr ""
|
4522 |
|
4523 |
+
#: includes/topics/functions.php:1949 includes/topics/functions.php:1967
|
4524 |
msgid ""
|
4525 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4526 |
"merging the tags: %s"
|
4527 |
msgstr ""
|
4528 |
|
4529 |
+
#: includes/topics/functions.php:1958
|
4530 |
msgid "<strong>ERROR</strong>: The tags which are being merged can not be the same."
|
4531 |
msgstr ""
|
4532 |
|
4533 |
+
#: includes/topics/functions.php:1990
|
4534 |
msgid "<strong>ERROR</strong>: You do not have permission to delete the topic tags."
|
4535 |
msgstr ""
|
4536 |
|
4537 |
+
#: includes/topics/functions.php:1999
|
4538 |
msgid ""
|
4539 |
"<strong>ERROR</strong>: The following problem(s) have been found while "
|
4540 |
"deleting the tag: %s"
|
4541 |
msgstr ""
|
4542 |
|
4543 |
+
#: includes/topics/functions.php:2188
|
4544 |
msgid "<strong>ERROR:</strong> This topic could not be found or no longer exists."
|
4545 |
msgstr ""
|
4546 |
|
4547 |
+
#: includes/topics/functions.php:2278
|
4548 |
msgid "<strong>ERROR</strong>: There was a problem approving the topic."
|
4549 |
msgstr ""
|
4550 |
|
4551 |
+
#: includes/topics/functions.php:2279
|
4552 |
msgid "<strong>ERROR</strong>: There was a problem unapproving the topic."
|
4553 |
msgstr ""
|
4554 |
|
4555 |
+
#: includes/topics/functions.php:2296
|
4556 |
msgid "<strong>ERROR</strong>: There was a problem closing the topic."
|
4557 |
msgstr ""
|
4558 |
|
4559 |
+
#: includes/topics/functions.php:2297
|
4560 |
msgid "<strong>ERROR</strong>: There was a problem opening the topic."
|
4561 |
msgstr ""
|
4562 |
|
4563 |
+
#: includes/topics/functions.php:2315
|
4564 |
msgid "<strong>ERROR</strong>: There was a problem unsticking the topic."
|
4565 |
msgstr ""
|
4566 |
|
4567 |
+
#: includes/topics/functions.php:2316
|
4568 |
msgid "<strong>ERROR</strong>: There was a problem sticking the topic."
|
4569 |
msgstr ""
|
4570 |
|
4571 |
+
#: includes/topics/functions.php:2334
|
4572 |
msgid "<strong>ERROR</strong>: There was a problem unmarking the topic as spam."
|
4573 |
msgstr ""
|
4574 |
|
4575 |
+
#: includes/topics/functions.php:2335
|
4576 |
msgid "<strong>ERROR</strong>: There was a problem marking the topic as spam."
|
4577 |
msgstr ""
|
4578 |
|
4579 |
+
#: includes/topics/functions.php:2348
|
4580 |
msgid "<strong>ERROR</strong>: There was a problem trashing the topic."
|
4581 |
msgstr ""
|
4582 |
|
4583 |
+
#: includes/topics/functions.php:2359
|
4584 |
msgid "<strong>ERROR</strong>: There was a problem untrashing the topic."
|
4585 |
msgstr ""
|
4586 |
|
4587 |
+
#: includes/topics/functions.php:2368
|
4588 |
msgid "<strong>ERROR</strong>: There was a problem deleting the topic."
|
4589 |
msgstr ""
|
4590 |
|
4591 |
+
#: includes/topics/template.php:56 templates/default/bbpress/form-topic.php:48
|
4592 |
msgid "Create New Topic"
|
4593 |
msgstr ""
|
4594 |
|
4595 |
+
#: includes/topics/template.php:58
|
4596 |
msgid "Edit Topic"
|
4597 |
msgstr ""
|
4598 |
|
4599 |
+
#: includes/topics/template.php:59
|
4600 |
msgid "New Topic"
|
4601 |
msgstr ""
|
4602 |
|
4603 |
+
#: includes/topics/template.php:60 includes/topics/template.php:61
|
4604 |
msgid "View Topic"
|
4605 |
msgstr ""
|
4606 |
|
4607 |
+
#: includes/topics/template.php:62
|
4608 |
msgid "View Topics"
|
4609 |
msgstr ""
|
4610 |
|
4611 |
+
#: includes/topics/template.php:63
|
4612 |
msgid "Search Topics"
|
4613 |
msgstr ""
|
4614 |
|
4615 |
+
#: includes/topics/template.php:64
|
4616 |
msgid "No topics found"
|
4617 |
msgstr ""
|
4618 |
|
4619 |
+
#: includes/topics/template.php:65
|
4620 |
msgid "No topics found in Trash"
|
4621 |
msgstr ""
|
4622 |
|
4623 |
+
#: includes/topics/template.php:66
|
4624 |
+
msgid "Filter topics list"
|
4625 |
+
msgstr ""
|
4626 |
+
|
4627 |
+
#: includes/topics/template.php:67
|
4628 |
+
msgid "Topics list"
|
4629 |
+
msgstr ""
|
4630 |
+
|
4631 |
+
#: includes/topics/template.php:68
|
4632 |
+
msgid "Topics list navigation"
|
4633 |
msgstr ""
|
4634 |
|
4635 |
#: includes/topics/template.php:1011
|
4636 |
+
msgid "This topic was modified %1$s by %2$s. Reason: %3$s"
|
4637 |
+
msgstr ""
|
4638 |
+
|
4639 |
+
#: includes/topics/template.php:1013
|
4640 |
msgid "This topic was modified %1$s by %2$s."
|
4641 |
msgstr ""
|
4642 |
|
4643 |
+
#: includes/topics/template.php:2063 includes/users/template.php:1159
|
4644 |
msgid "Favorite"
|
4645 |
msgstr ""
|
4646 |
|
4647 |
+
#: includes/topics/template.php:2064 includes/users/template.php:1160
|
4648 |
msgid "Unfavorite"
|
4649 |
msgstr ""
|
4650 |
|
4651 |
+
#: includes/topics/template.php:2493
|
4652 |
msgid "Tagged:"
|
4653 |
msgstr ""
|
4654 |
|
4655 |
+
#: includes/topics/template.php:3102
|
4656 |
+
#: templates/default/bbpress/form-topic-tag.php:69
|
4657 |
+
#: templates/default/bbpress/form-topic-tag.php:85
|
4658 |
msgid "Merge"
|
4659 |
msgstr ""
|
4660 |
|
4661 |
+
#: includes/topics/template.php:3340
|
4662 |
msgid "Viewing %1$s topic"
|
4663 |
msgid_plural "Viewing %1$s topics"
|
4664 |
msgstr[0] ""
|
4665 |
msgstr[1] ""
|
4666 |
|
4667 |
+
#: includes/topics/template.php:3344
|
4668 |
msgid "Viewing topic %2$s (of %4$s total)"
|
4669 |
msgid_plural "Viewing %1$s topics - %2$s through %3$s (of %4$s total)"
|
4670 |
msgstr[0] ""
|
4671 |
msgstr[1] ""
|
4672 |
|
4673 |
+
#: includes/topics/template.php:3407
|
4674 |
msgid "This topic is marked as spam."
|
4675 |
msgstr ""
|
4676 |
|
4677 |
+
#: includes/topics/template.php:3412
|
4678 |
msgid "This topic is in the trash."
|
4679 |
msgstr ""
|
4680 |
|
4681 |
+
#: includes/topics/template.php:3676
|
4682 |
msgid "%s voice"
|
4683 |
msgid_plural "%s voices"
|
4684 |
msgstr[0] ""
|
4685 |
msgstr[1] ""
|
4686 |
|
4687 |
+
#: includes/topics/template.php:3682
|
4688 |
msgid "This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s."
|
4689 |
msgstr ""
|
4690 |
|
4691 |
+
#: includes/topics/template.php:3686
|
4692 |
msgid "This topic contains %1$s and has %2$s."
|
4693 |
msgstr ""
|
4694 |
|
4695 |
+
#: includes/topics/template.php:3690
|
4696 |
msgid "This topic has no replies."
|
4697 |
msgstr ""
|
4698 |
|
4699 |
+
#: includes/topics/template.php:3742
|
4700 |
msgid "Search Tags"
|
4701 |
msgstr ""
|
4702 |
|
4703 |
+
#: includes/topics/template.php:3743
|
4704 |
msgid "Popular Tags"
|
4705 |
msgstr ""
|
4706 |
|
4707 |
+
#: includes/topics/template.php:3744
|
4708 |
msgid "All Tags"
|
4709 |
msgstr ""
|
4710 |
|
4711 |
+
#: includes/topics/template.php:3745
|
4712 |
msgid "Edit Tag"
|
4713 |
msgstr ""
|
4714 |
|
4715 |
+
#: includes/topics/template.php:3746
|
4716 |
msgid "Update Tag"
|
4717 |
msgstr ""
|
4718 |
|
4719 |
+
#: includes/topics/template.php:3747
|
4720 |
msgid "Add New Tag"
|
4721 |
msgstr ""
|
4722 |
|
4723 |
+
#: includes/topics/template.php:3748
|
4724 |
msgid "New Tag Name"
|
4725 |
msgstr ""
|
4726 |
|
4727 |
+
#: includes/topics/template.php:3749
|
4728 |
msgid "View Topic Tag"
|
4729 |
msgstr ""
|
4730 |
|
4731 |
+
#: includes/topics/template.php:3750
|
4732 |
msgid "View Topic Tags"
|
4733 |
msgstr ""
|
4734 |
|
4735 |
+
#: includes/topics/template.php:3751
|
4736 |
+
msgid "Topic tags list"
|
4737 |
+
msgstr ""
|
4738 |
+
|
4739 |
+
#: includes/topics/template.php:3752
|
4740 |
+
msgid "Topic tags list navigation"
|
4741 |
+
msgstr ""
|
4742 |
+
|
4743 |
+
#: includes/topics/template.php:3753
|
4744 |
msgid "Separate topic tags with commas"
|
4745 |
msgstr ""
|
4746 |
|
4747 |
+
#: includes/topics/template.php:4452
|
4748 |
+
msgid "Nobody"
|
4749 |
+
msgstr ""
|
4750 |
+
|
4751 |
+
#: includes/topics/template.php:4456
|
4752 |
+
msgid "%1$s is currently editing this topic."
|
4753 |
+
msgstr ""
|
4754 |
+
|
4755 |
+
#: includes/users/engagements.php:526
|
4756 |
msgid ""
|
4757 |
"<strong>ERROR</strong>: No topic was found. Which topic are you "
|
4758 |
"marking/unmarking as favorite?"
|
4759 |
msgstr ""
|
4760 |
|
4761 |
+
#: includes/users/engagements.php:534
|
4762 |
msgid ""
|
4763 |
"<strong>ERROR</strong>: You do not have permission to edit favorites for "
|
4764 |
"that user!."
|
4765 |
msgstr ""
|
4766 |
|
4767 |
+
#: includes/users/engagements.php:575
|
4768 |
msgid ""
|
4769 |
"<strong>ERROR</strong>: There was a problem removing that topic from "
|
4770 |
"favorites."
|
4771 |
msgstr ""
|
4772 |
|
4773 |
+
#: includes/users/engagements.php:577
|
4774 |
msgid "<strong>ERROR</strong>: There was a problem favoriting that topic."
|
4775 |
msgstr ""
|
4776 |
|
4777 |
+
#: includes/users/engagements.php:1197
|
4778 |
msgid ""
|
4779 |
"<strong>ERROR</strong>: No forum was found. Which forum are you "
|
4780 |
"subscribing/unsubscribing to?"
|
4781 |
msgstr ""
|
4782 |
|
4783 |
+
#: includes/users/engagements.php:1205 includes/users/engagements.php:1315
|
4784 |
msgid ""
|
4785 |
"<strong>ERROR</strong>: You do not have permission to edit favorites of "
|
4786 |
"that user."
|
4787 |
msgstr ""
|
4788 |
|
4789 |
+
#: includes/users/engagements.php:1246
|
4790 |
msgid "<strong>ERROR</strong>: There was a problem unsubscribing from that forum."
|
4791 |
msgstr ""
|
4792 |
|
4793 |
+
#: includes/users/engagements.php:1248
|
4794 |
msgid "<strong>ERROR</strong>: There was a problem subscribing to that forum."
|
4795 |
msgstr ""
|
4796 |
|
4797 |
+
#: includes/users/engagements.php:1307
|
4798 |
msgid ""
|
4799 |
"<strong>ERROR</strong>: No topic was found. Which topic are you "
|
4800 |
"subscribing/unsubscribing to?"
|
4801 |
msgstr ""
|
4802 |
|
4803 |
+
#: includes/users/engagements.php:1356
|
4804 |
msgid "<strong>ERROR</strong>: There was a problem unsubscribing from that topic."
|
4805 |
msgstr ""
|
4806 |
|
4807 |
+
#: includes/users/engagements.php:1358
|
4808 |
msgid "<strong>ERROR</strong>: There was a problem subscribing to that topic."
|
4809 |
msgstr ""
|
4810 |
|
4811 |
+
#: includes/users/functions.php:245 includes/users/functions.php:257
|
4812 |
msgid "<strong>ERROR</strong>: That is not a valid email address."
|
4813 |
msgstr ""
|
4814 |
|
4815 |
+
#: includes/users/functions.php:263 includes/users/functions.php:392
|
4816 |
msgid "<strong>ERROR</strong>: That email address is already in use."
|
4817 |
msgstr ""
|
4818 |
|
4819 |
+
#: includes/users/functions.php:462
|
4820 |
msgid "<strong>ERROR</strong>: An error occurred while updating your email address."
|
4821 |
msgstr ""
|
4822 |
|
4823 |
+
#: includes/users/functions.php:474
|
4824 |
msgid ""
|
4825 |
"%1$s\n"
|
4826 |
"\n"
|
4839 |
"%5$s"
|
4840 |
msgstr ""
|
4841 |
|
4842 |
+
#: includes/users/functions.php:509
|
4843 |
msgid "[%s] New Email Address"
|
4844 |
msgstr ""
|
4845 |
|
4846 |
+
#: includes/users/template.php:735
|
4847 |
msgid "Guest"
|
4848 |
msgstr ""
|
4849 |
|
4850 |
+
#: includes/users/template.php:739
|
4851 |
msgid "Inactive"
|
4852 |
msgstr ""
|
4853 |
|
4854 |
+
#: includes/users/template.php:749
|
4855 |
msgid "Member"
|
4856 |
msgstr ""
|
4857 |
|
4858 |
+
#: includes/users/template.php:794
|
4859 |
msgid "Admin"
|
4860 |
msgstr ""
|
4861 |
|
4862 |
+
#: includes/users/template.php:1488
|
4863 |
msgid "User updated."
|
4864 |
msgstr ""
|
4865 |
|
4866 |
+
#: includes/users/template.php:1538
|
4867 |
msgid "There is a pending email address change to %1$s. %2$s"
|
4868 |
msgstr ""
|
4869 |
|
4870 |
+
#: includes/users/template.php:1565
|
4871 |
msgid "You have super admin privileges."
|
4872 |
msgstr ""
|
4873 |
|
4874 |
+
#: includes/users/template.php:1565
|
4875 |
msgid "This user has super admin privileges."
|
4876 |
msgstr ""
|
4877 |
|
4878 |
+
#: includes/users/template.php:1639
|
4879 |
msgid "— No role for this site —"
|
4880 |
msgstr ""
|
4881 |
|
4882 |
+
#: includes/users/template.php:1976
|
4883 |
msgid "You are now logged out."
|
4884 |
msgstr ""
|
4885 |
|
4886 |
+
#: includes/users/template.php:1980
|
4887 |
msgid "New user registration is currently not allowed."
|
4888 |
msgstr ""
|
4889 |
|
4890 |
+
#: includes/users/template.php:1989
|
4891 |
msgid "Check your e-mail for the confirmation link."
|
4892 |
msgstr ""
|
4893 |
|
4894 |
+
#: includes/users/template.php:1994
|
4895 |
msgid "Check your e-mail for your new password."
|
4896 |
msgstr ""
|
4897 |
|
4898 |
+
#: includes/users/template.php:1999
|
4899 |
msgid "Registration complete. Please check your e-mail."
|
4900 |
msgstr ""
|
4901 |
|
4902 |
+
#: includes/users/template.php:2596
|
4903 |
msgid "Moderators:"
|
4904 |
msgstr ""
|
4905 |
|
4906 |
+
#: templates/default/bbpress/alert-topic-lock.php:21
|
4907 |
+
msgid "Leave"
|
4908 |
+
msgstr ""
|
4909 |
+
|
4910 |
+
#: templates/default/bbpress/alert-topic-lock.php:22
|
4911 |
+
msgid "Stay"
|
4912 |
+
msgstr ""
|
4913 |
+
|
4914 |
+
#: templates/default/bbpress/content-statistics.php:20
|
4915 |
msgid "Registered Users"
|
4916 |
msgstr ""
|
4917 |
|
4918 |
+
#: templates/default/bbpress/content-statistics.php:47
|
4919 |
msgid "Empty Topic Tags"
|
4920 |
msgstr ""
|
4921 |
|
4922 |
+
#: templates/default/bbpress/content-statistics.php:56
|
4923 |
msgid "Hidden Topics"
|
4924 |
msgstr ""
|
4925 |
|
4926 |
+
#: templates/default/bbpress/content-statistics.php:67
|
4927 |
msgid "Hidden Replies"
|
4928 |
msgstr ""
|
4929 |
|
4930 |
+
#: templates/default/bbpress/feedback-logged-in.php:17
|
4931 |
msgid "You are already logged in."
|
4932 |
msgstr ""
|
4933 |
|
4934 |
+
#: templates/default/bbpress/feedback-no-access.php:16
|
4935 |
msgid "Private"
|
4936 |
msgstr ""
|
4937 |
|
4938 |
+
#: templates/default/bbpress/feedback-no-access.php:20
|
4939 |
msgid "You do not have permission to view this forum."
|
4940 |
msgstr ""
|
4941 |
|
4942 |
+
#: templates/default/bbpress/feedback-no-forums.php:17
|
4943 |
msgid "Oh, bother! No forums were found here."
|
4944 |
msgstr ""
|
4945 |
|
4946 |
+
#: templates/default/bbpress/feedback-no-replies.php:17
|
4947 |
msgid "Oh, bother! No replies were found here."
|
4948 |
msgstr ""
|
4949 |
|
4950 |
+
#: templates/default/bbpress/feedback-no-search.php:17
|
4951 |
msgid "Oh, bother! No search results were found here."
|
4952 |
msgstr ""
|
4953 |
|
4954 |
+
#: templates/default/bbpress/feedback-no-topics.php:17
|
4955 |
msgid "Oh, bother! No topics were found here."
|
4956 |
msgstr ""
|
4957 |
|
4958 |
+
#: templates/default/bbpress/form-anonymous.php:18
|
4959 |
msgid "Your information:"
|
4960 |
msgstr ""
|
4961 |
|
4962 |
+
#: templates/default/bbpress/form-anonymous.php:23
|
4963 |
msgid "Name (required):"
|
4964 |
msgstr ""
|
4965 |
|
4966 |
+
#: templates/default/bbpress/form-anonymous.php:28
|
4967 |
msgid "Mail (will not be published) (required):"
|
4968 |
msgstr ""
|
4969 |
|
4970 |
+
#: templates/default/bbpress/form-forum.php:36
|
4971 |
+
#: templates/default/bbpress/form-topic.php:44
|
4972 |
msgid "Now Editing “%s”"
|
4973 |
msgstr ""
|
4974 |
|
4975 |
+
#: templates/default/bbpress/form-forum.php:39
|
4976 |
msgid "Create New Forum in “%s”"
|
4977 |
msgstr ""
|
4978 |
|
4979 |
+
#: templates/default/bbpress/form-forum.php:52
|
4980 |
+
#: templates/default/bbpress/form-reply.php:48
|
4981 |
msgid ""
|
4982 |
+
"This forum is closed to new content, however your posting capabilities "
|
4983 |
+
"still allow you to post."
|
4984 |
msgstr ""
|
4985 |
|
4986 |
+
#: templates/default/bbpress/form-forum.php:62
|
4987 |
+
#: templates/default/bbpress/form-reply.php:58
|
4988 |
+
#: templates/default/bbpress/form-topic.php:70
|
4989 |
msgid "Your account has the ability to post unrestricted HTML content."
|
4990 |
msgstr ""
|
4991 |
|
4992 |
+
#: templates/default/bbpress/form-forum.php:75
|
4993 |
msgid "Forum Name (Maximum Length: %d):"
|
4994 |
msgstr ""
|
4995 |
|
4996 |
+
#: templates/default/bbpress/form-forum.php:90
|
4997 |
+
#: templates/default/bbpress/form-reply.php:79
|
4998 |
msgid ""
|
4999 |
"You may use these <abbr title=\"HyperText Markup Language\">HTML</abbr> "
|
5000 |
"tags and attributes:"
|
5001 |
msgstr ""
|
5002 |
|
5003 |
+
#: templates/default/bbpress/form-forum.php:101
|
5004 |
msgid "Forum Moderators:"
|
5005 |
msgstr ""
|
5006 |
|
5007 |
+
#: templates/default/bbpress/form-forum.php:112
|
5008 |
msgid "Forum Type:"
|
5009 |
msgstr ""
|
5010 |
|
5011 |
+
#: templates/default/bbpress/form-forum.php:159
|
5012 |
+
#: templates/default/bbpress/form-reply-move.php:81
|
5013 |
+
#: templates/default/bbpress/form-reply.php:176
|
5014 |
+
#: templates/default/bbpress/form-topic-merge.php:103
|
5015 |
+
#: templates/default/bbpress/form-topic-split.php:107
|
5016 |
+
#: templates/default/bbpress/form-topic.php:213
|
5017 |
msgid "Submit"
|
5018 |
msgstr ""
|
5019 |
|
5020 |
+
#: templates/default/bbpress/form-forum.php:183
|
5021 |
msgid "The forum ‘%s’ is closed to new content."
|
5022 |
msgstr ""
|
5023 |
|
5024 |
+
#: templates/default/bbpress/form-forum.php:194
|
5025 |
msgid "You cannot create new forums."
|
5026 |
msgstr ""
|
5027 |
|
5028 |
+
#: templates/default/bbpress/form-forum.php:195
|
5029 |
msgid "You must be logged in to create new forums."
|
5030 |
msgstr ""
|
5031 |
|
5032 |
+
#: templates/default/bbpress/form-protected.php:17
|
5033 |
msgid "Protected"
|
5034 |
msgstr ""
|
5035 |
|
5036 |
+
#: templates/default/bbpress/form-reply-move.php:27
|
5037 |
msgid "Move reply \"%s\""
|
5038 |
msgstr ""
|
5039 |
|
5040 |
+
#: templates/default/bbpress/form-reply-move.php:33
|
5041 |
msgid ""
|
5042 |
"You can either make this reply a new topic with a new title, or merge it "
|
5043 |
"into an existing topic."
|
5044 |
msgstr ""
|
5045 |
|
5046 |
+
#: templates/default/bbpress/form-reply-move.php:39
|
5047 |
msgid ""
|
5048 |
"If you choose an existing topic, replies will be ordered by the time and "
|
5049 |
"date they were created."
|
5050 |
msgstr ""
|
5051 |
|
5052 |
+
#: templates/default/bbpress/form-reply-move.php:44
|
5053 |
msgid "Move Method"
|
5054 |
msgstr ""
|
5055 |
|
5056 |
+
#: templates/default/bbpress/form-reply-move.php:48
|
5057 |
+
#: templates/default/bbpress/form-topic-split.php:48
|
5058 |
msgid "New topic in %s titled:"
|
5059 |
msgstr ""
|
5060 |
|
5061 |
+
#: templates/default/bbpress/form-reply-move.php:49
|
5062 |
msgid "Moved: %s"
|
5063 |
msgstr ""
|
5064 |
|
5065 |
+
#: templates/default/bbpress/form-reply-move.php:56
|
5066 |
+
#: templates/default/bbpress/form-topic-split.php:56
|
5067 |
msgid "Use an existing topic in this forum:"
|
5068 |
msgstr ""
|
5069 |
|
5070 |
+
#: templates/default/bbpress/form-reply-move.php:95
|
5071 |
msgid "You do not have permission to edit this reply."
|
5072 |
msgstr ""
|
5073 |
|
5074 |
+
#: templates/default/bbpress/form-reply-move.php:96
|
5075 |
msgid "You cannot edit this reply."
|
5076 |
msgstr ""
|
5077 |
|
5078 |
+
#: templates/default/bbpress/form-reply.php:30
|
5079 |
msgid "Reply #%1$s in %2$s"
|
5080 |
msgstr ""
|
5081 |
|
5082 |
+
#: templates/default/bbpress/form-reply.php:38
|
5083 |
msgid ""
|
5084 |
"This topic is marked as closed to new replies, however your posting "
|
5085 |
+
"capabilities still allow you to reply."
|
5086 |
msgstr ""
|
5087 |
|
5088 |
+
#: templates/default/bbpress/form-reply.php:90
|
5089 |
msgid "Tags:"
|
5090 |
msgstr ""
|
5091 |
|
5092 |
+
#: templates/default/bbpress/form-reply.php:108
|
5093 |
+
#: templates/default/bbpress/form-topic.php:174
|
5094 |
msgid "Notify the author of follow-up replies via email"
|
5095 |
msgstr ""
|
5096 |
|
5097 |
+
#: templates/default/bbpress/form-reply.php:112
|
5098 |
+
#: templates/default/bbpress/form-topic.php:178
|
5099 |
msgid "Notify me of follow-up replies via email"
|
5100 |
msgstr ""
|
5101 |
|
5102 |
+
#: templates/default/bbpress/form-reply.php:138
|
5103 |
msgid "Reply Status:"
|
5104 |
msgstr ""
|
5105 |
|
5106 |
+
#: templates/default/bbpress/form-reply.php:153
|
5107 |
+
#: templates/default/bbpress/form-topic.php:194
|
5108 |
msgid "Keep a log of this edit:"
|
5109 |
msgstr ""
|
5110 |
|
5111 |
+
#: templates/default/bbpress/form-reply.php:157
|
5112 |
+
#: templates/default/bbpress/form-topic.php:198
|
5113 |
msgid "Optional reason for editing:"
|
5114 |
msgstr ""
|
5115 |
|
5116 |
+
#: templates/default/bbpress/form-reply.php:200
|
5117 |
msgid "The topic ‘%s’ is closed to new replies."
|
5118 |
msgstr ""
|
5119 |
|
5120 |
+
#: templates/default/bbpress/form-reply.php:210
|
5121 |
+
#: templates/default/bbpress/form-topic.php:237
|
5122 |
msgid "The forum ‘%s’ is closed to new topics and replies."
|
5123 |
msgstr ""
|
5124 |
|
5125 |
+
#: templates/default/bbpress/form-reply.php:221
|
5126 |
msgid "You cannot reply to this topic."
|
5127 |
msgstr ""
|
5128 |
|
5129 |
+
#: templates/default/bbpress/form-reply.php:222
|
5130 |
msgid "You must be logged in to reply to this topic."
|
5131 |
msgstr ""
|
5132 |
|
5133 |
+
#: templates/default/bbpress/form-search.php:17
|
5134 |
msgid "Search for:"
|
5135 |
msgstr ""
|
5136 |
|
5137 |
+
#: templates/default/bbpress/form-topic-merge.php:27
|
5138 |
msgid "Merge topic \"%s\""
|
5139 |
msgstr ""
|
5140 |
|
5141 |
+
#: templates/default/bbpress/form-topic-merge.php:33
|
5142 |
msgid ""
|
5143 |
"Select the topic to merge this one into. The destination topic will remain "
|
5144 |
"the lead topic, and this one will change into a reply."
|
5145 |
msgstr ""
|
5146 |
|
5147 |
+
#: templates/default/bbpress/form-topic-merge.php:34
|
5148 |
msgid ""
|
5149 |
"To keep this topic as the lead, go to the other topic and use the merge "
|
5150 |
"tool from there instead."
|
5151 |
msgstr ""
|
5152 |
|
5153 |
+
#: templates/default/bbpress/form-topic-merge.php:40
|
5154 |
msgid ""
|
5155 |
"Replies to both topics are merged chronologically, ordered by the time and "
|
5156 |
"date they were published. Topics may be updated to a 1 second difference to "
|
5157 |
"maintain chronological order based on the merge direction."
|
5158 |
msgstr ""
|
5159 |
|
5160 |
+
#: templates/default/bbpress/form-topic-merge.php:45
|
5161 |
msgid "Destination"
|
5162 |
msgstr ""
|
5163 |
|
5164 |
+
#: templates/default/bbpress/form-topic-merge.php:49
|
5165 |
msgid "Merge with this topic:"
|
5166 |
msgstr ""
|
5167 |
|
5168 |
+
#: templates/default/bbpress/form-topic-merge.php:64
|
5169 |
msgid "There are no other topics in this forum to merge with."
|
5170 |
msgstr ""
|
5171 |
|
5172 |
+
#: templates/default/bbpress/form-topic-merge.php:72
|
5173 |
+
#: templates/default/bbpress/form-topic-split.php:76
|
5174 |
msgid "Topic Extras"
|
5175 |
msgstr ""
|
5176 |
|
5177 |
+
#: templates/default/bbpress/form-topic-merge.php:79
|
5178 |
msgid "Merge topic subscribers"
|
5179 |
msgstr ""
|
5180 |
|
5181 |
+
#: templates/default/bbpress/form-topic-merge.php:84
|
5182 |
msgid "Merge topic favoriters"
|
5183 |
msgstr ""
|
5184 |
|
5185 |
+
#: templates/default/bbpress/form-topic-merge.php:89
|
5186 |
msgid "Merge topic tags"
|
5187 |
msgstr ""
|
5188 |
|
5189 |
+
#: templates/default/bbpress/form-topic-merge.php:117
|
5190 |
+
#: templates/default/bbpress/form-topic-split.php:121
|
5191 |
msgid "You do not have permission to edit this topic."
|
5192 |
msgstr ""
|
5193 |
|
5194 |
+
#: templates/default/bbpress/form-topic-merge.php:118
|
5195 |
+
#: templates/default/bbpress/form-topic-split.php:122
|
5196 |
msgid "You cannot edit this topic."
|
5197 |
msgstr ""
|
5198 |
|
5199 |
+
#: templates/default/bbpress/form-topic-split.php:27
|
5200 |
msgid "Split topic \"%s\""
|
5201 |
msgstr ""
|
5202 |
|
5203 |
+
#: templates/default/bbpress/form-topic-split.php:33
|
5204 |
msgid ""
|
5205 |
"When you split a topic, you are slicing it in half starting with the reply "
|
5206 |
"you just selected. Choose to use that reply as a new topic with a new "
|
5207 |
"title, or merge those replies into an existing topic."
|
5208 |
msgstr ""
|
5209 |
|
5210 |
+
#: templates/default/bbpress/form-topic-split.php:39
|
5211 |
msgid ""
|
5212 |
"If you use the existing topic option, replies within both topics will be "
|
5213 |
"merged chronologically. The order of the merged replies is based on the "
|
5214 |
"time and date they were posted."
|
5215 |
msgstr ""
|
5216 |
|
5217 |
+
#: templates/default/bbpress/form-topic-split.php:44
|
5218 |
msgid "Split Method"
|
5219 |
msgstr ""
|
5220 |
|
5221 |
+
#: templates/default/bbpress/form-topic-split.php:49
|
5222 |
msgid "Split: %s"
|
5223 |
msgstr ""
|
5224 |
|
5225 |
+
#: templates/default/bbpress/form-topic-split.php:83
|
5226 |
msgid "Copy subscribers to the new topic"
|
5227 |
msgstr ""
|
5228 |
|
5229 |
+
#: templates/default/bbpress/form-topic-split.php:88
|
5230 |
msgid "Copy favoriters to the new topic"
|
5231 |
msgstr ""
|
5232 |
|
5233 |
+
#: templates/default/bbpress/form-topic-split.php:93
|
5234 |
msgid "Copy topic tags to the new topic"
|
5235 |
msgstr ""
|
5236 |
|
5237 |
+
#: templates/default/bbpress/form-topic-tag.php:19
|
5238 |
msgid "Manage Tag: \"%s\""
|
5239 |
msgstr ""
|
5240 |
|
5241 |
+
#: templates/default/bbpress/form-topic-tag.php:23
|
5242 |
msgid "Rename"
|
5243 |
msgstr ""
|
5244 |
|
5245 |
+
#: templates/default/bbpress/form-topic-tag.php:27
|
5246 |
msgid "Leave the slug empty to have one automatically generated."
|
5247 |
msgstr ""
|
5248 |
|
5249 |
+
#: templates/default/bbpress/form-topic-tag.php:33
|
5250 |
msgid ""
|
5251 |
"Changing the slug affects its permalink. Any links to the old slug will "
|
5252 |
"stop working."
|
5253 |
msgstr ""
|
5254 |
|
5255 |
+
#: templates/default/bbpress/form-topic-tag.php:45
|
5256 |
msgid "Slug:"
|
5257 |
msgstr ""
|
5258 |
|
5259 |
+
#: templates/default/bbpress/form-topic-tag.php:50
|
5260 |
msgid "Description:"
|
5261 |
msgstr ""
|
5262 |
|
5263 |
+
#: templates/default/bbpress/form-topic-tag.php:55
|
5264 |
msgid "Update"
|
5265 |
msgstr ""
|
5266 |
|
5267 |
+
#: templates/default/bbpress/form-topic-tag.php:73
|
5268 |
msgid "Merging tags together cannot be undone."
|
5269 |
msgstr ""
|
5270 |
|
5271 |
+
#: templates/default/bbpress/form-topic-tag.php:80
|
5272 |
msgid "Existing tag:"
|
5273 |
msgstr ""
|
5274 |
|
5275 |
+
#: templates/default/bbpress/form-topic-tag.php:85
|
5276 |
msgid "Are you sure you want to merge the \"%s\" tag into the tag you specified?"
|
5277 |
msgstr ""
|
5278 |
|
5279 |
+
#: templates/default/bbpress/form-topic-tag.php:104
|
5280 |
msgid "This does not delete your topics. Only the tag itself is deleted."
|
5281 |
msgstr ""
|
5282 |
|
5283 |
+
#: templates/default/bbpress/form-topic-tag.php:109
|
5284 |
msgid "Deleting a tag cannot be undone."
|
5285 |
msgstr ""
|
5286 |
|
5287 |
+
#: templates/default/bbpress/form-topic-tag.php:110
|
5288 |
msgid "Any links to this tag will no longer function."
|
5289 |
msgstr ""
|
5290 |
|
5291 |
+
#: templates/default/bbpress/form-topic-tag.php:117
|
5292 |
msgid ""
|
5293 |
"Are you sure you want to delete the \"%s\" tag? This is permanent and "
|
5294 |
"cannot be undone."
|
5295 |
msgstr ""
|
5296 |
|
5297 |
+
#: templates/default/bbpress/form-topic.php:47
|
5298 |
msgid "Create New Topic in “%s”"
|
5299 |
msgstr ""
|
5300 |
|
5301 |
+
#: templates/default/bbpress/form-topic.php:60
|
5302 |
msgid ""
|
5303 |
"This forum is marked as closed to new topics, however your posting "
|
5304 |
+
"capabilities still allow you to create a topic."
|
5305 |
msgstr ""
|
5306 |
|
5307 |
+
#: templates/default/bbpress/form-topic.php:85
|
5308 |
msgid "Topic Title (Maximum Length: %d):"
|
5309 |
msgstr ""
|
5310 |
|
5311 |
+
#: templates/default/bbpress/form-topic.php:100
|
5312 |
msgid "You may use these %s tags and attributes:"
|
5313 |
msgstr ""
|
5314 |
|
5315 |
+
#: templates/default/bbpress/form-topic.php:111
|
5316 |
msgid "Topic Tags:"
|
5317 |
msgstr ""
|
5318 |
|
5319 |
+
#: templates/default/bbpress/form-topic.php:143
|
5320 |
msgid "Topic Type:"
|
5321 |
msgstr ""
|
5322 |
|
5323 |
+
#: templates/default/bbpress/form-topic.php:155
|
5324 |
msgid "Topic Status:"
|
5325 |
msgstr ""
|
5326 |
|
5327 |
+
#: templates/default/bbpress/form-topic.php:248
|
5328 |
msgid "You cannot create new topics."
|
5329 |
msgstr ""
|
5330 |
|
5331 |
+
#: templates/default/bbpress/form-topic.php:249
|
5332 |
msgid "You must be logged in to create new topics."
|
5333 |
msgstr ""
|
5334 |
|
5335 |
+
#: templates/default/bbpress/form-user-edit.php:27
|
5336 |
msgid "First Name"
|
5337 |
msgstr ""
|
5338 |
|
5339 |
+
#: templates/default/bbpress/form-user-edit.php:32
|
5340 |
msgid "Last Name"
|
5341 |
msgstr ""
|
5342 |
|
5343 |
+
#: templates/default/bbpress/form-user-edit.php:37
|
5344 |
msgid "Nickname"
|
5345 |
msgstr ""
|
5346 |
|
5347 |
+
#: templates/default/bbpress/form-user-edit.php:42
|
5348 |
msgid "Display Name"
|
5349 |
msgstr ""
|
5350 |
|
|
|
5351 |
#: templates/default/bbpress/form-user-edit.php:52
|
5352 |
+
#: templates/default/bbpress/form-user-edit.php:55
|
5353 |
msgid "Contact Info"
|
5354 |
msgstr ""
|
5355 |
|
5356 |
+
#: templates/default/bbpress/form-user-edit.php:78
|
5357 |
+
#: templates/default/bbpress/form-user-edit.php:84
|
5358 |
msgid "About Yourself"
|
5359 |
msgstr ""
|
5360 |
|
5361 |
+
#: templates/default/bbpress/form-user-edit.php:79
|
5362 |
+
#: templates/default/bbpress/form-user-edit.php:85
|
5363 |
msgid "About the user"
|
5364 |
msgstr ""
|
5365 |
|
5366 |
+
#: templates/default/bbpress/form-user-edit.php:91
|
5367 |
msgid "Biographical Info"
|
5368 |
msgstr ""
|
5369 |
|
|
|
5370 |
#: templates/default/bbpress/form-user-edit.php:99
|
5371 |
+
#: templates/default/bbpress/form-user-edit.php:102
|
5372 |
msgid "Account"
|
5373 |
msgstr ""
|
5374 |
|
5375 |
+
#: templates/default/bbpress/form-user-edit.php:117
|
5376 |
msgid "New Password"
|
5377 |
msgstr ""
|
5378 |
|
5379 |
+
#: templates/default/bbpress/form-user-edit.php:120
|
5380 |
msgid ""
|
5381 |
"If you would like to change the password type a new one. Otherwise leave "
|
5382 |
"this blank."
|
5383 |
msgstr ""
|
5384 |
|
5385 |
+
#: templates/default/bbpress/form-user-edit.php:123
|
5386 |
msgid "Type your new password again."
|
5387 |
msgstr ""
|
5388 |
|
5389 |
+
#: templates/default/bbpress/form-user-edit.php:126
|
5390 |
msgid ""
|
5391 |
"Your password should be at least ten characters long. Use upper and lower "
|
5392 |
"case letters, numbers, and symbols to make it even stronger."
|
5393 |
msgstr ""
|
5394 |
|
5395 |
+
#: templates/default/bbpress/form-user-edit.php:131
|
5396 |
+
msgid "Language"
|
|
|
5397 |
msgstr ""
|
5398 |
|
5399 |
#: templates/default/bbpress/form-user-edit.php:143
|
5400 |
+
#: templates/default/bbpress/form-user-edit.php:146
|
5401 |
+
msgid "User Role"
|
5402 |
+
msgstr ""
|
5403 |
+
|
5404 |
+
#: templates/default/bbpress/form-user-edit.php:153
|
5405 |
msgid "Network Role"
|
5406 |
msgstr ""
|
5407 |
|
5408 |
+
#: templates/default/bbpress/form-user-edit.php:156
|
5409 |
msgid "Grant this user super admin privileges for the Network."
|
5410 |
msgstr ""
|
5411 |
|
5412 |
+
#: templates/default/bbpress/form-user-edit.php:179
|
5413 |
msgid "Update Profile"
|
5414 |
msgstr ""
|
5415 |
|
5416 |
+
#: templates/default/bbpress/form-user-edit.php:180
|
5417 |
msgid "Update User"
|
5418 |
msgstr ""
|
5419 |
|
5420 |
+
#: templates/default/bbpress/form-user-login.php:31
|
5421 |
msgid "Keep me signed in"
|
5422 |
msgstr ""
|
5423 |
|
5424 |
+
#: templates/default/bbpress/form-user-lost-pass.php:21
|
5425 |
msgid "Username or Email"
|
5426 |
msgstr ""
|
5427 |
|
5428 |
+
#: templates/default/bbpress/form-user-lost-pass.php:30
|
5429 |
msgid "Reset My Password"
|
5430 |
msgstr ""
|
5431 |
|
5432 |
+
#: templates/default/bbpress/form-user-register.php:17
|
5433 |
msgid "Create an Account"
|
5434 |
msgstr ""
|
5435 |
|
5436 |
+
#: templates/default/bbpress/form-user-register.php:23
|
5437 |
msgid "Your username must be unique, and cannot be changed later."
|
5438 |
msgstr ""
|
5439 |
|
5440 |
+
#: templates/default/bbpress/form-user-register.php:24
|
5441 |
msgid ""
|
5442 |
"We use your email address to email you a secure password and verify your "
|
5443 |
"account."
|
5444 |
msgstr ""
|
5445 |
|
5446 |
+
#: templates/default/bbpress/form-user-roles.php:16
|
5447 |
msgid "Blog Role"
|
5448 |
msgstr ""
|
5449 |
|
5450 |
+
#: templates/default/bbpress/loop-search-forum.php:17
|
5451 |
msgid "Last updated %s"
|
5452 |
msgstr ""
|
5453 |
|
5454 |
+
#: templates/default/bbpress/loop-search-reply.php:22
|
5455 |
msgid "In reply to: "
|
5456 |
msgstr ""
|
5457 |
|
5458 |
+
#: templates/default/bbpress/loop-search-topic.php:32
|
5459 |
msgid "in group forum "
|
5460 |
msgstr ""
|
5461 |
|
5462 |
+
#: templates/default/bbpress/loop-search-topic.php:36
|
5463 |
msgid "in forum "
|
5464 |
msgstr ""
|
5465 |
|
5466 |
+
#: templates/default/bbpress/loop-search.php:23
|
5467 |
+
#: templates/default/bbpress/loop-search.php:45
|
5468 |
msgid "Search Results"
|
5469 |
msgstr ""
|
5470 |
|
5471 |
+
#: templates/default/bbpress/loop-single-reply.php:22
|
5472 |
msgid "in reply to: "
|
5473 |
msgstr ""
|
5474 |
|
5475 |
+
#: templates/default/bbpress/loop-single-topic.php:62
|
5476 |
msgid "Started by: %1$s"
|
5477 |
msgstr ""
|
5478 |
|
5479 |
+
#: templates/default/bbpress/loop-single-topic.php:70
|
5480 |
msgid "in: %1$s"
|
5481 |
msgstr ""
|
5482 |
|
5483 |
+
#: templates/default/bbpress/user-details.php:30
|
5484 |
+
#: templates/default/bbpress/user-profile.php:16
|
5485 |
msgid "Profile"
|
5486 |
msgstr ""
|
5487 |
|
5488 |
+
#: templates/default/bbpress/user-details.php:36
|
5489 |
msgid "%s's Topics Started"
|
5490 |
msgstr ""
|
5491 |
|
5492 |
+
#: templates/default/bbpress/user-details.php:42
|
5493 |
msgid "%s's Replies Created"
|
5494 |
msgstr ""
|
5495 |
|
5496 |
+
#: templates/default/bbpress/user-details.php:49
|
5497 |
+
msgid "%s's Engagements"
|
5498 |
+
msgstr ""
|
5499 |
+
|
5500 |
+
#: templates/default/bbpress/user-engagements.php:16
|
5501 |
+
msgid "Topics Engaged In"
|
5502 |
+
msgstr ""
|
5503 |
+
|
5504 |
+
#: templates/default/bbpress/user-engagements.php:30
|
5505 |
+
msgid "You have not engaged in any topics."
|
5506 |
+
msgstr ""
|
5507 |
+
|
5508 |
+
#: templates/default/bbpress/user-engagements.php:31
|
5509 |
+
msgid "This user has not engaged in any topics."
|
5510 |
+
msgstr ""
|
5511 |
+
|
5512 |
+
#: templates/default/bbpress/user-favorites.php:16
|
5513 |
msgid "Favorite Forum Topics"
|
5514 |
msgstr ""
|
5515 |
|
5516 |
+
#: templates/default/bbpress/user-favorites.php:30
|
5517 |
msgid "You currently have no favorite topics."
|
5518 |
msgstr ""
|
5519 |
|
5520 |
+
#: templates/default/bbpress/user-favorites.php:31
|
5521 |
msgid "This user has no favorite topics."
|
5522 |
msgstr ""
|
5523 |
|
5524 |
+
#: templates/default/bbpress/user-profile.php:25
|
5525 |
msgid "Forum Role: %s"
|
5526 |
msgstr ""
|
5527 |
|
5528 |
+
#: templates/default/bbpress/user-profile.php:26
|
5529 |
msgid "Topics Started: %s"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
+
#: templates/default/bbpress/user-profile.php:27
|
5533 |
msgid "Replies Created: %s"
|
5534 |
msgstr ""
|
5535 |
|
5536 |
+
#: templates/default/bbpress/user-replies-created.php:16
|
5537 |
msgid "Forum Replies Created"
|
5538 |
msgstr ""
|
5539 |
|
5540 |
+
#: templates/default/bbpress/user-replies-created.php:30
|
5541 |
msgid "You have not replied to any topics."
|
5542 |
msgstr ""
|
5543 |
|
5544 |
+
#: templates/default/bbpress/user-replies-created.php:31
|
5545 |
msgid "This user has not replied to any topics."
|
5546 |
msgstr ""
|
5547 |
|
5548 |
+
#: templates/default/bbpress/user-subscriptions.php:20
|
5549 |
msgid "Subscribed Forums"
|
5550 |
msgstr ""
|
5551 |
|
5552 |
+
#: templates/default/bbpress/user-subscriptions.php:30
|
5553 |
msgid "You are not currently subscribed to any forums."
|
5554 |
msgstr ""
|
5555 |
|
5556 |
+
#: templates/default/bbpress/user-subscriptions.php:31
|
5557 |
msgid "This user is not currently subscribed to any forums."
|
5558 |
msgstr ""
|
5559 |
|
5560 |
+
#: templates/default/bbpress/user-subscriptions.php:52
|
5561 |
msgid "You are not currently subscribed to any topics."
|
5562 |
msgstr ""
|
5563 |
|
5564 |
+
#: templates/default/bbpress/user-subscriptions.php:53
|
5565 |
msgid "This user is not currently subscribed to any topics."
|
5566 |
msgstr ""
|
5567 |
|
5568 |
+
#: templates/default/bbpress/user-topics-created.php:16
|
5569 |
msgid "Forum Topics Started"
|
5570 |
msgstr ""
|
5571 |
|
5572 |
+
#: templates/default/bbpress/user-topics-created.php:30
|
5573 |
msgid "You have not created any topics."
|
5574 |
msgstr ""
|
5575 |
|
5576 |
+
#: templates/default/bbpress/user-topics-created.php:31
|
5577 |
msgid "This user has not created any topics."
|
5578 |
msgstr ""
|
5579 |
|
5580 |
+
#: templates/default/bbpress-functions.php:245
|
5581 |
+
#: templates/default/bbpress-functions.php:255
|
5582 |
msgid "Something went wrong. Refresh your browser and try again."
|
5583 |
msgstr ""
|
5584 |
|
5585 |
+
#: templates/default/bbpress-functions.php:283
|
5586 |
+
#: templates/default/bbpress-functions.php:419
|
5587 |
msgid "Subscriptions are no longer active."
|
5588 |
msgstr ""
|
5589 |
|
5590 |
+
#: templates/default/bbpress-functions.php:288
|
5591 |
msgid "Please login to subscribe to this forum."
|
5592 |
msgstr ""
|
5593 |
|
5594 |
+
#: templates/default/bbpress-functions.php:297
|
5595 |
+
#: templates/default/bbpress-functions.php:365
|
5596 |
+
#: templates/default/bbpress-functions.php:433
|
5597 |
msgid "You do not have permission to do this."
|
5598 |
msgstr ""
|
5599 |
|
5600 |
+
#: templates/default/bbpress-functions.php:305
|
5601 |
msgid "The forum could not be found."
|
5602 |
msgstr ""
|
5603 |
|
5604 |
+
#: templates/default/bbpress-functions.php:310
|
5605 |
+
#: templates/default/bbpress-functions.php:378
|
5606 |
+
#: templates/default/bbpress-functions.php:446
|
5607 |
msgid "Are you sure you meant to do that?"
|
5608 |
msgstr ""
|
5609 |
|
5610 |
+
#: templates/default/bbpress-functions.php:318
|
5611 |
+
#: templates/default/bbpress-functions.php:386
|
5612 |
+
#: templates/default/bbpress-functions.php:454
|
5613 |
msgid "The request was unsuccessful. Please try again."
|
5614 |
msgstr ""
|
5615 |
|
5616 |
+
#: templates/default/bbpress-functions.php:351
|
5617 |
msgid "Favorites are no longer active."
|
5618 |
msgstr ""
|
5619 |
|
5620 |
+
#: templates/default/bbpress-functions.php:356
|
5621 |
msgid "Please login to make this topic a favorite."
|
5622 |
msgstr ""
|
5623 |
|
5624 |
+
#: templates/default/bbpress-functions.php:373
|
5625 |
+
#: templates/default/bbpress-functions.php:441
|
5626 |
msgid "The topic could not be found."
|
5627 |
msgstr ""
|
5628 |
|
5629 |
+
#: templates/default/bbpress-functions.php:424
|
5630 |
msgid "Please login to subscribe to this topic."
|
5631 |
msgstr ""
|
5632 |
|
5654 |
msgid "The bbPress Contributors"
|
5655 |
msgstr ""
|
5656 |
|
5657 |
+
#: bbpress.php:615
|
5658 |
msgctxt "post"
|
5659 |
msgid "Closed"
|
5660 |
msgstr ""
|
5661 |
|
5662 |
+
#: bbpress.php:616
|
5663 |
msgctxt "post"
|
5664 |
msgid "Closed <span class=\"count\">(%s)</span>"
|
5665 |
msgid_plural "Closed <span class=\"count\">(%s)</span>"
|
5666 |
msgstr[0] ""
|
5667 |
msgstr[1] ""
|
5668 |
|
5669 |
+
#: bbpress.php:626
|
5670 |
msgctxt "post"
|
5671 |
msgid "Spam"
|
5672 |
msgstr ""
|
5673 |
|
5674 |
+
#: bbpress.php:627
|
5675 |
msgctxt "post"
|
5676 |
msgid "Spam <span class=\"count\">(%s)</span>"
|
5677 |
msgid_plural "Spam <span class=\"count\">(%s)</span>"
|
5678 |
msgstr[0] ""
|
5679 |
msgstr[1] ""
|
5680 |
|
5681 |
+
#: bbpress.php:639
|
5682 |
msgctxt "post"
|
5683 |
msgid "Orphan"
|
5684 |
msgstr ""
|
5685 |
|
5686 |
+
#: bbpress.php:640
|
5687 |
msgctxt "post"
|
5688 |
msgid "Orphan <span class=\"count\">(%s)</span>"
|
5689 |
msgid_plural "Orphans <span class=\"count\">(%s)</span>"
|
5690 |
msgstr[0] ""
|
5691 |
msgstr[1] ""
|
5692 |
|
5693 |
+
#: bbpress.php:652
|
5694 |
msgctxt "post"
|
5695 |
msgid "Hidden"
|
5696 |
msgstr ""
|
5697 |
|
5698 |
+
#: bbpress.php:653
|
5699 |
msgctxt "post"
|
5700 |
msgid "Hidden <span class=\"count\">(%s)</span>"
|
5701 |
msgid_plural "Hidden <span class=\"count\">(%s)</span>"
|
5702 |
msgstr[0] ""
|
5703 |
msgstr[1] ""
|
5704 |
|
5705 |
+
#: includes/admin/admin.php:658
|
5706 |
msgctxt "admin color scheme"
|
5707 |
msgid "Mint"
|
5708 |
msgstr ""
|
5709 |
|
5710 |
+
#: includes/admin/admin.php:667
|
5711 |
msgctxt "admin color scheme"
|
5712 |
msgid "Evergreen"
|
5713 |
msgstr ""
|
5714 |
|
5715 |
+
#: includes/admin/forums.php:688
|
5716 |
msgctxt "Close a Forum"
|
5717 |
msgid "Close"
|
5718 |
msgstr ""
|
5719 |
|
5720 |
+
#: includes/admin/forums.php:690
|
5721 |
msgctxt "Open a Forum"
|
5722 |
msgid "Open"
|
5723 |
msgstr ""
|
5724 |
|
5725 |
+
#: includes/admin/replies.php:857
|
|
|
|
|
|
|
|
|
|
|
|
|
5726 |
msgctxt "Unapprove reply"
|
5727 |
msgid "Unapprove"
|
5728 |
msgstr ""
|
5729 |
|
5730 |
+
#: includes/admin/replies.php:859
|
5731 |
msgctxt "Approve reply"
|
5732 |
msgid "Approve"
|
5733 |
msgstr ""
|
5734 |
|
5735 |
+
#: includes/admin/settings.php:359 includes/replies/template.php:53
|
5736 |
+
msgctxt "noun"
|
5737 |
+
msgid "Reply"
|
5738 |
+
msgstr ""
|
5739 |
+
|
5740 |
+
#: includes/admin/topics.php:1048
|
5741 |
msgctxt "Unapprove Topic"
|
5742 |
msgid "Unapprove"
|
5743 |
msgstr ""
|
5744 |
|
5745 |
+
#: includes/admin/topics.php:1050
|
5746 |
msgctxt "Approve Topic"
|
5747 |
msgid "Approve"
|
5748 |
msgstr ""
|
5749 |
|
5750 |
+
#: includes/admin/topics.php:1059
|
5751 |
msgctxt "Close a Topic"
|
5752 |
msgid "Close"
|
5753 |
msgstr ""
|
5754 |
|
5755 |
+
#: includes/admin/topics.php:1061
|
5756 |
msgctxt "Open a Topic"
|
5757 |
msgid "Open"
|
5758 |
msgstr ""
|
5759 |
|
5760 |
+
#: includes/common/formatting.php:702
|
5761 |
msgctxt "Separator in time since"
|
5762 |
msgid ","
|
5763 |
msgstr ""
|
5792 |
msgid "Blocked"
|
5793 |
msgstr ""
|
5794 |
|
5795 |
+
#: includes/common/widgets.php:872
|
5796 |
msgctxt "widgets"
|
5797 |
msgid "by %1$s"
|
5798 |
msgstr ""
|
5799 |
|
5800 |
+
#: includes/common/widgets.php:1235
|
5801 |
#. translators: 1: reply author, 2: reply link, 3: reply timestamp
|
5802 |
msgctxt "widgets"
|
5803 |
msgid "%1$s on %2$s %3$s"
|
5804 |
msgstr ""
|
5805 |
|
5806 |
+
#: includes/common/widgets.php:1241
|
5807 |
#. translators: 1: reply link, 2: reply timestamp
|
5808 |
msgctxt "widgets"
|
5809 |
msgid "%1$s %2$s"
|
5810 |
msgstr ""
|
5811 |
|
5812 |
+
#: includes/common/widgets.php:1247
|
5813 |
#. translators: 1: reply author, 2: reply link
|
5814 |
msgctxt "widgets"
|
5815 |
msgid "%1$s on %2$s"
|
5816 |
msgstr ""
|
5817 |
|
5818 |
+
#: includes/common/widgets.php:1253
|
5819 |
#. translators: 1: reply link
|
5820 |
msgctxt "widgets"
|
5821 |
msgid "%1$s"
|
5822 |
msgstr ""
|
5823 |
|
5824 |
+
#: includes/extend/buddypress/groups.php:498
|
5825 |
msgctxt "group admin edit screen"
|
5826 |
msgid "Discussion Forum"
|
5827 |
msgstr ""
|
5828 |
|
5829 |
+
#: includes/forums/functions.php:2022
|
5830 |
msgctxt "Open the forum"
|
5831 |
msgid "Open"
|
5832 |
msgstr ""
|
5833 |
|
5834 |
+
#: includes/forums/functions.php:2023
|
5835 |
msgctxt "Close the forum"
|
5836 |
msgid "Closed"
|
5837 |
msgstr ""
|
5838 |
|
5839 |
+
#: includes/forums/functions.php:2040
|
5840 |
msgctxt "Forum accepts new topics"
|
5841 |
msgid "Forum"
|
5842 |
msgstr ""
|
5843 |
|
5844 |
+
#: includes/forums/functions.php:2041
|
5845 |
msgctxt "Forum is a category"
|
5846 |
msgid "Category"
|
5847 |
msgstr ""
|
5848 |
|
5849 |
+
#: includes/forums/functions.php:2058
|
5850 |
msgctxt "Make forum public"
|
5851 |
msgid "Public"
|
5852 |
msgstr ""
|
5853 |
|
5854 |
+
#: includes/forums/functions.php:2059
|
5855 |
msgctxt "Make forum private"
|
5856 |
msgid "Private"
|
5857 |
msgstr ""
|
5858 |
|
5859 |
+
#: includes/forums/functions.php:2060
|
5860 |
msgctxt "Make forum hidden"
|
5861 |
msgid "Hidden"
|
5862 |
msgstr ""
|
5881 |
msgid "Pending"
|
5882 |
msgstr ""
|
5883 |
|
5884 |
+
#: includes/replies/template.php:734 includes/topics/template.php:820
|
5885 |
msgctxt "date at time"
|
5886 |
msgid "%1$s at %2$s"
|
5887 |
msgstr ""
|
5888 |
|
5889 |
+
#: includes/replies/template.php:1742 includes/topics/template.php:3213
|
5890 |
msgctxt "verb"
|
5891 |
msgid "Reply"
|
5892 |
msgstr ""
|
5893 |
|
5894 |
+
#: includes/replies/template.php:2464
|
5895 |
msgctxt "Pending Status"
|
5896 |
msgid "Approve"
|
5897 |
msgstr ""
|
5898 |
|
5899 |
+
#: includes/replies/template.php:2465
|
5900 |
msgctxt "Pending Status"
|
5901 |
msgid "Unapprove"
|
5902 |
msgstr ""
|
5903 |
|
5904 |
+
#: includes/replies/template.php:2781
|
5905 |
+
msgctxt "Default reply to dropdown text"
|
5906 |
+
msgid "None"
|
5907 |
+
msgstr ""
|
5908 |
+
|
5909 |
+
#: includes/topics/functions.php:2034 includes/topics/template.php:2900
|
5910 |
msgctxt "Open the topic"
|
5911 |
msgid "Open"
|
5912 |
msgstr ""
|
5913 |
|
5914 |
+
#: includes/topics/functions.php:2035
|
5915 |
msgctxt "Close the topic"
|
5916 |
msgid "Closed"
|
5917 |
msgstr ""
|
5918 |
|
5919 |
+
#: includes/topics/template.php:2899
|
5920 |
+
msgctxt "Close the topic"
|
5921 |
+
msgid "Close"
|
5922 |
+
msgstr ""
|
5923 |
+
|
5924 |
+
#: includes/topics/functions.php:2036
|
5925 |
msgctxt "Spam the topic"
|
5926 |
msgid "Spam"
|
5927 |
msgstr ""
|
5928 |
|
5929 |
+
#: includes/topics/functions.php:2037
|
5930 |
msgctxt "Trash the topic"
|
5931 |
msgid "Trash"
|
5932 |
msgstr ""
|
5933 |
|
5934 |
+
#: includes/topics/functions.php:2038
|
5935 |
msgctxt "Mark topic as pending"
|
5936 |
msgid "Pending"
|
5937 |
msgstr ""
|
5938 |
|
5939 |
+
#: includes/topics/functions.php:2055
|
5940 |
msgctxt "Unstick a topic"
|
5941 |
msgid "Normal"
|
5942 |
msgstr ""
|
5943 |
|
5944 |
+
#: includes/topics/functions.php:2056
|
5945 |
msgctxt "Make topic sticky"
|
5946 |
msgid "Sticky"
|
5947 |
msgstr ""
|
5948 |
|
5949 |
+
#: includes/topics/functions.php:2057
|
5950 |
msgctxt "Make topic super sticky"
|
5951 |
msgid "Super Sticky"
|
5952 |
msgstr ""
|
5953 |
|
5954 |
+
#: includes/topics/template.php:2963
|
5955 |
+
msgctxt "Approve the topic"
|
5956 |
+
msgid "Approve"
|
5957 |
msgstr ""
|
5958 |
|
5959 |
+
#: includes/topics/template.php:2964
|
5960 |
+
msgctxt "Unapprove the topic"
|
5961 |
+
msgid "Unapprove"
|
5962 |
msgstr ""
|
5963 |
|
5964 |
+
#: includes/users/template.php:1533
|
5965 |
msgctxt "Dismiss pending user email address change"
|
5966 |
msgid "Cancel"
|
5967 |
msgstr ""
|
includes/admin/actions.php
CHANGED
@@ -46,6 +46,7 @@ add_action( 'menu_order', 'bbp_admin_menu_order' );
|
|
46 |
add_action( 'custom_menu_order', 'bbp_admin_custom_menu_order' );
|
47 |
add_action( 'current_screen', 'bbp_current_screen' );
|
48 |
add_action( 'wpmu_new_blog', 'bbp_new_site', 10, 6 );
|
|
|
49 |
|
50 |
// Hook on to admin_init
|
51 |
add_action( 'bbp_admin_init', 'bbp_setup_updater', 999 );
|
@@ -77,17 +78,21 @@ add_action( 'bbp_deactivation', 'bbp_delete_rewrite_rules' );
|
|
77 |
add_action( 'bbp_new_site', 'bbp_create_initial_content', 8 );
|
78 |
|
79 |
// Load the default repair tools
|
80 |
-
add_action( 'load-tools_page_bbp-repair',
|
|
|
81 |
|
82 |
// Contextual Helpers
|
83 |
-
add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help'
|
84 |
-
add_action( 'load-tools_page_bbp-repair', 'bbp_admin_tools_repair_help'
|
|
|
85 |
add_action( 'load-tools_page_bbp-converter', 'bbp_admin_tools_converter_help' );
|
86 |
-
add_action( 'load-tools_page_bbp-reset', 'bbp_admin_tools_reset_help'
|
87 |
|
88 |
// Handle submission of Tools pages
|
89 |
-
add_action( 'load-tools_page_bbp-repair',
|
90 |
-
add_action( 'load-tools_page_bbp-
|
|
|
|
|
91 |
|
92 |
// Add sample permalink filter
|
93 |
add_filter( 'post_type_link', 'bbp_filter_sample_permalink', 10, 4 );
|
@@ -264,6 +269,17 @@ function bbp_register_admin_settings() {
|
|
264 |
do_action( 'bbp_register_admin_settings' );
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
/**
|
268 |
* Dedicated action to hook into the current screen
|
269 |
*
|
46 |
add_action( 'custom_menu_order', 'bbp_admin_custom_menu_order' );
|
47 |
add_action( 'current_screen', 'bbp_current_screen' );
|
48 |
add_action( 'wpmu_new_blog', 'bbp_new_site', 10, 6 );
|
49 |
+
add_action( 'tool_box', 'bbp_admin_tool_box' );
|
50 |
|
51 |
// Hook on to admin_init
|
52 |
add_action( 'bbp_admin_init', 'bbp_setup_updater', 999 );
|
78 |
add_action( 'bbp_new_site', 'bbp_create_initial_content', 8 );
|
79 |
|
80 |
// Load the default repair tools
|
81 |
+
add_action( 'load-tools_page_bbp-repair', 'bbp_register_default_repair_tools' );
|
82 |
+
add_action( 'load-tools_page_bbp-upgrade', 'bbp_register_default_repair_tools' );
|
83 |
|
84 |
// Contextual Helpers
|
85 |
+
add_action( 'load-settings_page_bbpress', 'bbp_admin_settings_help' );
|
86 |
+
add_action( 'load-tools_page_bbp-repair', 'bbp_admin_tools_repair_help' );
|
87 |
+
add_action( 'load-tools_page_bbp-upgrade', 'bbp_admin_tools_repair_help' );
|
88 |
add_action( 'load-tools_page_bbp-converter', 'bbp_admin_tools_converter_help' );
|
89 |
+
add_action( 'load-tools_page_bbp-reset', 'bbp_admin_tools_reset_help' );
|
90 |
|
91 |
// Handle submission of Tools pages
|
92 |
+
add_action( 'load-tools_page_bbp-repair', 'bbp_admin_repair_handler' );
|
93 |
+
add_action( 'load-tools_page_bbp-upgrade', 'bbp_admin_repair_handler' );
|
94 |
+
add_action( 'load-tools_page_bbp-reset', 'bbp_admin_reset_handler' );
|
95 |
+
add_action( 'bbp_admin_tool_box', 'bbp_admin_tools_box' );
|
96 |
|
97 |
// Add sample permalink filter
|
98 |
add_filter( 'post_type_link', 'bbp_filter_sample_permalink', 10, 4 );
|
269 |
do_action( 'bbp_register_admin_settings' );
|
270 |
}
|
271 |
|
272 |
+
/**
|
273 |
+
* Dedicated action to output admin tools.php sections
|
274 |
+
*
|
275 |
+
* @since 2.6.0 bbPress (r6273)
|
276 |
+
*
|
277 |
+
* @uses do_action() Calls 'bbp_admin_tool_box'
|
278 |
+
*/
|
279 |
+
function bbp_admin_tool_box() {
|
280 |
+
do_action( 'bbp_admin_tool_box' );
|
281 |
+
}
|
282 |
+
|
283 |
/**
|
284 |
* Dedicated action to hook into the current screen
|
285 |
*
|
includes/admin/admin.php
CHANGED
@@ -100,13 +100,13 @@ class BBP_Admin {
|
|
100 |
* @access private
|
101 |
*/
|
102 |
private function setup_globals() {
|
103 |
-
$bbp
|
104 |
-
$this->admin_dir = trailingslashit( $bbp->includes_dir . 'admin'
|
105 |
-
$this->admin_url = trailingslashit( $bbp->includes_url . 'admin'
|
106 |
-
$this->images_url = trailingslashit( $this->admin_url . 'images'
|
107 |
-
$this->styles_url = trailingslashit( $this->admin_url . 'styles'
|
108 |
-
$this->css_url = trailingslashit( $this->admin_url . 'css'
|
109 |
-
$this->js_url = trailingslashit( $this->admin_url . 'js'
|
110 |
}
|
111 |
|
112 |
/**
|
@@ -117,15 +117,28 @@ class BBP_Admin {
|
|
117 |
* @access private
|
118 |
*/
|
119 |
private function includes() {
|
120 |
-
|
121 |
-
|
122 |
-
require
|
123 |
-
require
|
124 |
-
require
|
125 |
-
require
|
126 |
-
require
|
127 |
-
require
|
128 |
-
require
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
130 |
|
131 |
/**
|
@@ -165,15 +178,12 @@ class BBP_Admin {
|
|
165 |
|
166 |
/** Filters ***********************************************************/
|
167 |
|
168 |
-
// Modify
|
169 |
add_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );
|
170 |
|
171 |
// Map settings capabilities
|
172 |
add_filter( 'bbp_map_meta_caps', array( $this, 'map_settings_meta_caps' ), 10, 4 );
|
173 |
|
174 |
-
// Hide the theme compat package selection
|
175 |
-
add_filter( 'bbp_admin_get_settings_sections', array( $this, 'hide_theme_compat_packages' ) );
|
176 |
-
|
177 |
// Allow keymasters to save forums settings
|
178 |
add_filter( 'option_page_capability_bbpress', array( $this, 'option_page_capability_bbpress' ) );
|
179 |
|
@@ -201,59 +211,47 @@ class BBP_Admin {
|
|
201 |
|
202 |
$hooks = array();
|
203 |
|
204 |
-
//
|
205 |
-
|
206 |
-
if ( current_user_can( 'bbp_tools_repair_page' ) ) {
|
207 |
-
$hooks[] = add_management_page(
|
208 |
-
__( 'Repair Forums', 'bbpress' ),
|
209 |
-
__( 'Forum Repair', 'bbpress' ),
|
210 |
-
$this->minimum_capability,
|
211 |
-
'bbp-repair',
|
212 |
-
'bbp_admin_repair'
|
213 |
-
);
|
214 |
-
}
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
__( 'Import Forums', 'bbpress' ),
|
219 |
-
__( 'Forum Import', 'bbpress' ),
|
220 |
-
$this->minimum_capability,
|
221 |
-
'bbp-converter',
|
222 |
-
'bbp_converter_settings'
|
223 |
-
);
|
224 |
-
}
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
}
|
235 |
|
236 |
-
//
|
237 |
-
|
238 |
-
|
239 |
}
|
|
|
240 |
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
__( 'Forums', 'bbpress' ),
|
245 |
-
$this->minimum_capability,
|
246 |
-
'bbp-repair',
|
247 |
-
'bbp_admin_repair'
|
248 |
-
);
|
249 |
}
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
// Are settings enabled?
|
252 |
-
if (
|
253 |
add_options_page(
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
'bbpress',
|
258 |
'bbp_admin_settings'
|
259 |
);
|
@@ -264,18 +262,18 @@ class BBP_Admin {
|
|
264 |
|
265 |
// About
|
266 |
add_dashboard_page(
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
'bbp-about',
|
271 |
array( $this, 'about_screen' )
|
272 |
);
|
273 |
|
274 |
// Credits
|
275 |
add_dashboard_page(
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
'bbp-credits',
|
280 |
array( $this, 'credits_screen' )
|
281 |
);
|
@@ -288,8 +286,8 @@ class BBP_Admin {
|
|
288 |
|
289 |
add_submenu_page(
|
290 |
'index.php',
|
291 |
-
|
292 |
-
|
293 |
'manage_network',
|
294 |
'bbp-update',
|
295 |
array( $this, 'update_screen' )
|
@@ -312,8 +310,8 @@ class BBP_Admin {
|
|
312 |
|
313 |
add_submenu_page(
|
314 |
'upgrade.php',
|
315 |
-
|
316 |
-
|
317 |
'manage_network',
|
318 |
'bbpress-update',
|
319 |
array( $this, 'network_update_screen' )
|
@@ -371,7 +369,7 @@ class BBP_Admin {
|
|
371 |
}
|
372 |
|
373 |
// Toggle the section if core integration is on
|
374 |
-
if ( (
|
375 |
$page = $section['page'];
|
376 |
} else {
|
377 |
$page = 'bbpress';
|
@@ -437,6 +435,7 @@ class BBP_Admin {
|
|
437 |
case 'bbp_about_page' : // About and Credits
|
438 |
case 'bbp_tools_page' : // Tools Page
|
439 |
case 'bbp_tools_repair_page' : // Tools - Repair Page
|
|
|
440 |
case 'bbp_tools_import_page' : // Tools - Import Page
|
441 |
case 'bbp_tools_reset_page' : // Tools - Reset Page
|
442 |
case 'bbp_settings_page' : // Settings Page
|
@@ -452,7 +451,8 @@ class BBP_Admin {
|
|
452 |
break;
|
453 |
}
|
454 |
|
455 |
-
|
|
|
456 |
}
|
457 |
|
458 |
/**
|
@@ -466,12 +466,12 @@ class BBP_Admin {
|
|
466 |
public function register_importers() {
|
467 |
|
468 |
// Leave if we're not in the import section
|
469 |
-
if ( !defined( 'WP_LOAD_IMPORTERS' ) ) {
|
470 |
return;
|
471 |
}
|
472 |
|
473 |
// Load Importer API
|
474 |
-
require_once
|
475 |
|
476 |
// Load our importers
|
477 |
$importers = apply_filters( 'bbp_importers', array( 'bbpress' ) );
|
@@ -487,7 +487,7 @@ class BBP_Admin {
|
|
487 |
|
488 |
// If the file exists, include it
|
489 |
if ( file_exists( $import_file ) ) {
|
490 |
-
require
|
491 |
}
|
492 |
}
|
493 |
}
|
@@ -616,14 +616,18 @@ class BBP_Admin {
|
|
616 |
*
|
617 |
* @since 2.0.0 bbPress (r2464)
|
618 |
*
|
619 |
-
* @uses remove_submenu_page() To remove menu items with
|
620 |
*/
|
621 |
public function admin_head() {
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
|
|
|
|
|
|
|
|
627 |
}
|
628 |
|
629 |
/**
|
@@ -667,22 +671,6 @@ class BBP_Admin {
|
|
667 |
);
|
668 |
}
|
669 |
|
670 |
-
/**
|
671 |
-
* Hide theme compat package selection if only 1 package is registered
|
672 |
-
*
|
673 |
-
* @since 2.2.0 bbPress (r4315)
|
674 |
-
*
|
675 |
-
* @param array $sections Forums settings sections
|
676 |
-
* @return array
|
677 |
-
*/
|
678 |
-
public function hide_theme_compat_packages( $sections = array() ) {
|
679 |
-
if ( count( bbpress()->theme_compat->packages ) <= 1 ) {
|
680 |
-
unset( $sections['bbp_settings_theme_compat'] );
|
681 |
-
}
|
682 |
-
|
683 |
-
return $sections;
|
684 |
-
}
|
685 |
-
|
686 |
/**
|
687 |
* Allow keymaster role to save Forums settings
|
688 |
*
|
@@ -788,7 +776,7 @@ class BBP_Admin {
|
|
788 |
|
789 |
<div class="wrap about-wrap">
|
790 |
<h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
|
791 |
-
<div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is
|
792 |
<div class="bbp-badge"></div>
|
793 |
|
794 |
<h2 class="nav-tab-wrapper">
|
@@ -865,7 +853,7 @@ class BBP_Admin {
|
|
865 |
|
866 |
<div class="wrap about-wrap">
|
867 |
<h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
|
868 |
-
<div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is
|
869 |
<div class="bbp-badge"></div>
|
870 |
|
871 |
<h2 class="nav-tab-wrapper">
|
@@ -881,39 +869,45 @@ class BBP_Admin {
|
|
881 |
<h3 class="wp-people-group"><?php esc_html_e( 'Project Leaders', 'bbpress' ); ?></h3>
|
882 |
<ul class="wp-people-group " id="wp-people-group-project-leaders">
|
883 |
<li class="wp-person" id="wp-person-matt">
|
884 |
-
<a href="https://profiles.wordpress.org/matt"><img src="http://0.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=
|
885 |
-
<a class="web" href="https://profiles.wordpress.org/matt">Matt Mullenweg</a>
|
886 |
<span class="title"><?php esc_html_e( 'Founding Developer', 'bbpress' ); ?></span>
|
887 |
</li>
|
888 |
<li class="wp-person" id="wp-person-johnjamesjacoby">
|
889 |
-
<a href="https://profiles.wordpress.org/johnjamesjacoby"><img src="http://0.gravatar.com/avatar/
|
890 |
-
<a class="web" href="https://profiles.wordpress.org/johnjamesjacoby">John James Jacoby</a>
|
891 |
<span class="title"><?php esc_html_e( 'Lead Developer', 'bbpress' ); ?></span>
|
892 |
</li>
|
893 |
<li class="wp-person" id="wp-person-jmdodd">
|
894 |
-
<a href="https://profiles.wordpress.org/jmdodd"><img src="http://0.gravatar.com/avatar/6a7c997edea340616bcc6d0fe03f65dd?s=
|
895 |
-
<a class="web" href="https://profiles.wordpress.org/jmdodd">Jennifer M. Dodd</a>
|
896 |
<span class="title"><?php esc_html_e( 'Feature Developer', 'bbpress' ); ?></span>
|
897 |
</li>
|
898 |
<li class="wp-person" id="wp-person-netweb">
|
899 |
-
<a href="https://profiles.wordpress.org/netweb"><img src="http://0.gravatar.com/avatar/97e1620b501da675315ba7cfb740e80f?s=
|
900 |
-
<a class="web" href="https://profiles.wordpress.org/netweb">Stephen Edgar</a>
|
901 |
<span class="title"><?php esc_html_e( 'Converter Specialist', 'bbpress' ); ?></span>
|
902 |
</li>
|
903 |
</ul>
|
904 |
|
905 |
<h3 class="wp-people-group"><?php esc_html_e( 'Contributing Developers', 'bbpress' ); ?></h3>
|
906 |
<ul class="wp-people-group " id="wp-people-group-contributing-developers">
|
907 |
-
<li class="wp-person" id="wp-person-
|
908 |
-
<a href="https://profiles.wordpress.org/
|
909 |
-
<
|
910 |
-
<span class="title"><?php esc_html_e( 'Bug Testing', 'bbpress' ); ?></span>
|
911 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
<li class="wp-person" id="wp-person-gautamgupta">
|
913 |
-
<a href="https://profiles.wordpress.org/gautamgupta"><img src="http://0.gravatar.com/avatar/b0810422cbe6e4eead4def5ae7a90b34?s=
|
914 |
-
<a class="web" href="https://profiles.wordpress.org/gautamgupta">Gautam Gupta</a>
|
915 |
<span class="title"><?php esc_html_e( 'Feature Developer', 'bbpress' ); ?></span>
|
916 |
</li>
|
|
|
|
|
|
|
|
|
917 |
</ul>
|
918 |
|
919 |
<h3 class="wp-people-group"><?php esc_html_e( 'Core Contributors to bbPress 2.6', 'bbpress' ); ?></h3>
|
@@ -976,7 +970,7 @@ class BBP_Admin {
|
|
976 |
<a href="https://profiles.wordpress.org/tonyrix">tonyrix</a>,
|
977 |
<a href="https://profiles.wordpress.org/treyhunner">treyhunner</a>,
|
978 |
<a href="https://profiles.wordpress.org/tw2113">tw2113</a>,
|
979 |
-
<a href="https://profiles.wordpress.org/xknown">xknown</a
|
980 |
</p>
|
981 |
|
982 |
<div class="return-to-dashboard">
|
@@ -1079,21 +1073,30 @@ class BBP_Admin {
|
|
1079 |
|
1080 |
<?php foreach ( (array) $blogs as $details ) :
|
1081 |
|
1082 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1083 |
|
1084 |
-
<li><?php echo $
|
1085 |
|
1086 |
<?php
|
1087 |
|
1088 |
// Get the response of the bbPress update on this site
|
1089 |
$response = wp_remote_get(
|
1090 |
-
|
1091 |
-
array(
|
|
|
|
|
|
|
1092 |
);
|
1093 |
|
1094 |
// Site errored out, no response?
|
1095 |
if ( is_wp_error( $response ) ) {
|
1096 |
-
wp_die( sprintf(
|
1097 |
}
|
1098 |
|
1099 |
// Switch to the new blog
|
100 |
* @access private
|
101 |
*/
|
102 |
private function setup_globals() {
|
103 |
+
$bbp = bbpress();
|
104 |
+
$this->admin_dir = trailingslashit( $bbp->includes_dir . 'admin' ); // Admin path
|
105 |
+
$this->admin_url = trailingslashit( $bbp->includes_url . 'admin' ); // Admin url
|
106 |
+
$this->images_url = trailingslashit( $this->admin_url . 'images' ); // Admin images URL
|
107 |
+
$this->styles_url = trailingslashit( $this->admin_url . 'styles' ); // Admin styles URL
|
108 |
+
$this->css_url = trailingslashit( $this->admin_url . 'assets/css' ); // Admin css URL
|
109 |
+
$this->js_url = trailingslashit( $this->admin_url . 'assets/js' ); // Admin js URL
|
110 |
}
|
111 |
|
112 |
/**
|
117 |
* @access private
|
118 |
*/
|
119 |
private function includes() {
|
120 |
+
|
121 |
+
// Tools
|
122 |
+
require $this->admin_dir . 'tools.php';
|
123 |
+
require $this->admin_dir . 'tools/common.php';
|
124 |
+
require $this->admin_dir . 'tools/converter.php';
|
125 |
+
require $this->admin_dir . 'tools/repair.php';
|
126 |
+
require $this->admin_dir . 'tools/upgrades.php';
|
127 |
+
require $this->admin_dir . 'tools/reset.php';
|
128 |
+
require $this->admin_dir . 'tools/help.php';
|
129 |
+
|
130 |
+
// Components
|
131 |
+
require $this->admin_dir . 'settings.php';
|
132 |
+
require $this->admin_dir . 'common.php';
|
133 |
+
require $this->admin_dir . 'metaboxes.php';
|
134 |
+
require $this->admin_dir . 'forums.php';
|
135 |
+
require $this->admin_dir . 'topics.php';
|
136 |
+
require $this->admin_dir . 'replies.php';
|
137 |
+
require $this->admin_dir . 'users.php';
|
138 |
+
|
139 |
+
// Converter
|
140 |
+
require $this->admin_dir . 'classes/class-bbp-converter-base.php';
|
141 |
+
require $this->admin_dir . 'classes/class-bbp-converter.php';
|
142 |
}
|
143 |
|
144 |
/**
|
178 |
|
179 |
/** Filters ***********************************************************/
|
180 |
|
181 |
+
// Modify admin links
|
182 |
add_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );
|
183 |
|
184 |
// Map settings capabilities
|
185 |
add_filter( 'bbp_map_meta_caps', array( $this, 'map_settings_meta_caps' ), 10, 4 );
|
186 |
|
|
|
|
|
|
|
187 |
// Allow keymasters to save forums settings
|
188 |
add_filter( 'option_page_capability_bbpress', array( $this, 'option_page_capability_bbpress' ) );
|
189 |
|
211 |
|
212 |
$hooks = array();
|
213 |
|
214 |
+
// Get the tools pages
|
215 |
+
$tools = bbp_get_tools_admin_pages();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
+
// Loop through tools and check
|
218 |
+
foreach ( $tools as $tool ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
+
// Try to add the admin page
|
221 |
+
$page = add_management_page(
|
222 |
+
$tool['name'],
|
223 |
+
$tool['name'],
|
224 |
+
$tool['cap'],
|
225 |
+
$tool['page'],
|
226 |
+
$tool['func']
|
227 |
+
);
|
|
|
228 |
|
229 |
+
// Add page to hook if user can view it
|
230 |
+
if ( false !== $page ) {
|
231 |
+
$hooks[] = $page;
|
232 |
}
|
233 |
+
}
|
234 |
|
235 |
+
// Fudge the highlighted subnav item when on a bbPress admin page
|
236 |
+
foreach ( $hooks as $hook ) {
|
237 |
+
add_action( "admin_head-{$hook}", 'bbp_tools_modify_menu_highlight' );
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
+
// Forums Tools Root
|
241 |
+
add_management_page(
|
242 |
+
esc_html__( 'Forums', 'bbpress' ),
|
243 |
+
esc_html__( 'Forums', 'bbpress' ),
|
244 |
+
'bbp_tools_page',
|
245 |
+
'bbp-repair',
|
246 |
+
'bbp_admin_repair_page'
|
247 |
+
);
|
248 |
+
|
249 |
// Are settings enabled?
|
250 |
+
if ( 'basic' === bbp_settings_integration() ) {
|
251 |
add_options_page(
|
252 |
+
esc_html__( 'Forums', 'bbpress' ),
|
253 |
+
esc_html__( 'Forums', 'bbpress' ),
|
254 |
+
'bbp_settings_page',
|
255 |
'bbpress',
|
256 |
'bbp_admin_settings'
|
257 |
);
|
262 |
|
263 |
// About
|
264 |
add_dashboard_page(
|
265 |
+
esc_html__( 'Welcome to bbPress', 'bbpress' ),
|
266 |
+
esc_html__( 'Welcome to bbPress', 'bbpress' ),
|
267 |
+
'bbp_about_page',
|
268 |
'bbp-about',
|
269 |
array( $this, 'about_screen' )
|
270 |
);
|
271 |
|
272 |
// Credits
|
273 |
add_dashboard_page(
|
274 |
+
esc_html__( 'Welcome to bbPress', 'bbpress' ),
|
275 |
+
esc_html__( 'Welcome to bbPress', 'bbpress' ),
|
276 |
+
'bbp_about_page',
|
277 |
'bbp-credits',
|
278 |
array( $this, 'credits_screen' )
|
279 |
);
|
286 |
|
287 |
add_submenu_page(
|
288 |
'index.php',
|
289 |
+
esc_html__( 'Update Forums', 'bbpress' ),
|
290 |
+
esc_html__( 'Update Forums', 'bbpress' ),
|
291 |
'manage_network',
|
292 |
'bbp-update',
|
293 |
array( $this, 'update_screen' )
|
310 |
|
311 |
add_submenu_page(
|
312 |
'upgrade.php',
|
313 |
+
esc_html__( 'Update Forums', 'bbpress' ),
|
314 |
+
esc_html__( 'Update Forums', 'bbpress' ),
|
315 |
'manage_network',
|
316 |
'bbpress-update',
|
317 |
array( $this, 'network_update_screen' )
|
369 |
}
|
370 |
|
371 |
// Toggle the section if core integration is on
|
372 |
+
if ( ( 'deep' === $settings_integration ) && ! empty( $section['page'] ) ) {
|
373 |
$page = $section['page'];
|
374 |
} else {
|
375 |
$page = 'bbpress';
|
435 |
case 'bbp_about_page' : // About and Credits
|
436 |
case 'bbp_tools_page' : // Tools Page
|
437 |
case 'bbp_tools_repair_page' : // Tools - Repair Page
|
438 |
+
case 'bbp_tools_upgrade_page' : // Tools - Upgrade Page
|
439 |
case 'bbp_tools_import_page' : // Tools - Import Page
|
440 |
case 'bbp_tools_reset_page' : // Tools - Reset Page
|
441 |
case 'bbp_settings_page' : // Settings Page
|
451 |
break;
|
452 |
}
|
453 |
|
454 |
+
// Filter & return
|
455 |
+
return (array) apply_filters( 'bbp_map_settings_meta_caps', $caps, $cap, $user_id, $args );
|
456 |
}
|
457 |
|
458 |
/**
|
466 |
public function register_importers() {
|
467 |
|
468 |
// Leave if we're not in the import section
|
469 |
+
if ( ! defined( 'WP_LOAD_IMPORTERS' ) ) {
|
470 |
return;
|
471 |
}
|
472 |
|
473 |
// Load Importer API
|
474 |
+
require_once ABSPATH . 'wp-admin/includes/import.php';
|
475 |
|
476 |
// Load our importers
|
477 |
$importers = apply_filters( 'bbp_importers', array( 'bbpress' ) );
|
487 |
|
488 |
// If the file exists, include it
|
489 |
if ( file_exists( $import_file ) ) {
|
490 |
+
require $import_file;
|
491 |
}
|
492 |
}
|
493 |
}
|
616 |
*
|
617 |
* @since 2.0.0 bbPress (r2464)
|
618 |
*
|
619 |
+
* @uses remove_submenu_page() To remove menu items with alternate navigation
|
620 |
*/
|
621 |
public function admin_head() {
|
622 |
+
|
623 |
+
// Tools
|
624 |
+
foreach ( bbp_get_tools_admin_pages() as $tool ) {
|
625 |
+
remove_submenu_page( 'tools.php', $tool['page'] );
|
626 |
+
}
|
627 |
+
|
628 |
+
// About
|
629 |
+
remove_submenu_page( 'index.php', 'bbp-about' );
|
630 |
+
remove_submenu_page( 'index.php', 'bbp-credits' );
|
631 |
}
|
632 |
|
633 |
/**
|
671 |
);
|
672 |
}
|
673 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
/**
|
675 |
* Allow keymaster role to save Forums settings
|
676 |
*
|
776 |
|
777 |
<div class="wrap about-wrap">
|
778 |
<h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
|
779 |
+
<div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is sweet and savory, contains no artificial flavors or preservatives, is environmentally friendly, and is a great compliment to your site.', 'bbpress' ), $display_version ); ?></div>
|
780 |
<div class="bbp-badge"></div>
|
781 |
|
782 |
<h2 class="nav-tab-wrapper">
|
853 |
|
854 |
<div class="wrap about-wrap">
|
855 |
<h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1>
|
856 |
+
<div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is sweet and savory, contains no artificial flavors or preservatives, is environmentally friendly, and is a great compliment to your site.', 'bbpress' ), $display_version ); ?></div>
|
857 |
<div class="bbp-badge"></div>
|
858 |
|
859 |
<h2 class="nav-tab-wrapper">
|
869 |
<h3 class="wp-people-group"><?php esc_html_e( 'Project Leaders', 'bbpress' ); ?></h3>
|
870 |
<ul class="wp-people-group " id="wp-people-group-project-leaders">
|
871 |
<li class="wp-person" id="wp-person-matt">
|
872 |
+
<a href="https://profiles.wordpress.org/matt" class="web"><img src="http://0.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=120" class="gravatar" alt="" />Matt Mullenweg</a>
|
|
|
873 |
<span class="title"><?php esc_html_e( 'Founding Developer', 'bbpress' ); ?></span>
|
874 |
</li>
|
875 |
<li class="wp-person" id="wp-person-johnjamesjacoby">
|
876 |
+
<a href="https://profiles.wordpress.org/johnjamesjacoby" class="web"><img src="http://0.gravatar.com/avatar/7a2644fb53ae2f7bfd7143b504af396c?s=120" class="gravatar" alt="" />John James Jacoby</a>
|
|
|
877 |
<span class="title"><?php esc_html_e( 'Lead Developer', 'bbpress' ); ?></span>
|
878 |
</li>
|
879 |
<li class="wp-person" id="wp-person-jmdodd">
|
880 |
+
<a href="https://profiles.wordpress.org/jmdodd" class="web"><img src="http://0.gravatar.com/avatar/6a7c997edea340616bcc6d0fe03f65dd?s=120" class="gravatar" alt="" />Jennifer M. Dodd</a>
|
|
|
881 |
<span class="title"><?php esc_html_e( 'Feature Developer', 'bbpress' ); ?></span>
|
882 |
</li>
|
883 |
<li class="wp-person" id="wp-person-netweb">
|
884 |
+
<a href="https://profiles.wordpress.org/netweb" class="web"><img src="http://0.gravatar.com/avatar/97e1620b501da675315ba7cfb740e80f?s=120" class="gravatar" alt="" />Stephen Edgar</a>
|
|
|
885 |
<span class="title"><?php esc_html_e( 'Converter Specialist', 'bbpress' ); ?></span>
|
886 |
</li>
|
887 |
</ul>
|
888 |
|
889 |
<h3 class="wp-people-group"><?php esc_html_e( 'Contributing Developers', 'bbpress' ); ?></h3>
|
890 |
<ul class="wp-people-group " id="wp-people-group-contributing-developers">
|
891 |
+
<li class="wp-person" id="wp-person-sergeybiryukov">
|
892 |
+
<a href="https://profiles.wordpress.org/SergeyBiryukov" class="web"><img src="http://0.gravatar.com/avatar/750b7b0fcd855389264c2b1294d61bd6?s?s=120" class="gravatar" alt="" />Sergey Biryukov</a>
|
893 |
+
<span class="title"><?php esc_html_e( 'Core Developer', 'bbpress' ); ?></span>
|
|
|
894 |
</li>
|
895 |
+
<li class="wp-person" id="wp-person-thebrandonallen">
|
896 |
+
<a href="https://profiles.wordpress.org/thebrandonallen" class="web"><img src="http://0.gravatar.com/avatar/6d3f77bf3c9ca94c406dea401b566950?s?s=120" class="gravatar" alt="" />Brandon Allen</a>
|
897 |
+
<span class="title"><?php esc_html_e( 'Core Developer', 'bbpress' ); ?></span>
|
898 |
+
</li>
|
899 |
+
</ul>
|
900 |
+
|
901 |
+
<h3 class="wp-people-group"><?php esc_html_e( 'Project Emeriti', 'bbpress' ); ?></h3>
|
902 |
+
<ul class="wp-people-group " id="wp-people-group-project-emeriti">
|
903 |
<li class="wp-person" id="wp-person-gautamgupta">
|
904 |
+
<a href="https://profiles.wordpress.org/gautamgupta" class="web"><img src="http://0.gravatar.com/avatar/b0810422cbe6e4eead4def5ae7a90b34?s=120" class="gravatar" alt="" />Gautam Gupta</a>
|
|
|
905 |
<span class="title"><?php esc_html_e( 'Feature Developer', 'bbpress' ); ?></span>
|
906 |
</li>
|
907 |
+
<li class="wp-person" id="wp-person-jaredatch">
|
908 |
+
<a href="https://profiles.wordpress.org/jaredatch" class="web"><img src="http://0.gravatar.com/avatar/e341eca9e1a85dcae7127044301b4363?s=120" class="gravatar" alt="" />Jared Atchison</a>
|
909 |
+
<span class="title"><?php esc_html_e( 'Integration Testing', 'bbpress' ); ?></span>
|
910 |
+
</li>
|
911 |
</ul>
|
912 |
|
913 |
<h3 class="wp-people-group"><?php esc_html_e( 'Core Contributors to bbPress 2.6', 'bbpress' ); ?></h3>
|
970 |
<a href="https://profiles.wordpress.org/tonyrix">tonyrix</a>,
|
971 |
<a href="https://profiles.wordpress.org/treyhunner">treyhunner</a>,
|
972 |
<a href="https://profiles.wordpress.org/tw2113">tw2113</a>,
|
973 |
+
<a href="https://profiles.wordpress.org/xknown">xknown</a>
|
974 |
</p>
|
975 |
|
976 |
<div class="return-to-dashboard">
|
1073 |
|
1074 |
<?php foreach ( (array) $blogs as $details ) :
|
1075 |
|
1076 |
+
// Get site URLs
|
1077 |
+
$site_url = get_site_url( $details['blog_id'] );
|
1078 |
+
$admin_url = get_site_url( $details['blog_id'], 'wp-admin.php', 'admin' );
|
1079 |
+
$remote_url = add_query_arg( array(
|
1080 |
+
'page' => 'bbp-update',
|
1081 |
+
'action' => 'bbp-update'
|
1082 |
+
), $admin_url ); ?>
|
1083 |
|
1084 |
+
<li><?php echo esc_html( $site_url ); ?></li>
|
1085 |
|
1086 |
<?php
|
1087 |
|
1088 |
// Get the response of the bbPress update on this site
|
1089 |
$response = wp_remote_get(
|
1090 |
+
$remote_url,
|
1091 |
+
array(
|
1092 |
+
'timeout' => 30,
|
1093 |
+
'httpversion' => '1.1'
|
1094 |
+
)
|
1095 |
);
|
1096 |
|
1097 |
// Site errored out, no response?
|
1098 |
if ( is_wp_error( $response ) ) {
|
1099 |
+
wp_die( sprintf( esc_html__( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s', 'bbpress' ), $site_url, '<em>' . $response->get_error_message() . '</em>' ) );
|
1100 |
}
|
1101 |
|
1102 |
// Switch to the new blog
|
includes/admin/{css → assets/css}/admin-rtl.css
RENAMED
@@ -305,3 +305,58 @@ body.post-type-reply strong.label {
|
|
305 |
#the-list .status-spam td {
|
306 |
color: #999;
|
307 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
#the-list .status-spam td {
|
306 |
color: #999;
|
307 |
}
|
308 |
+
|
309 |
+
/* User Relationships */
|
310 |
+
|
311 |
+
#bbp_topic_engagements_metabox .avatar,
|
312 |
+
#bbp_topic_favorites_metabox .avatar,
|
313 |
+
#bbp_topic_subscriptions_metabox .avatar {
|
314 |
+
margin: 3px;
|
315 |
+
}
|
316 |
+
|
317 |
+
/* Converter */
|
318 |
+
|
319 |
+
#bbp-converter-monitor .inside {
|
320 |
+
margin-bottom: 0;
|
321 |
+
}
|
322 |
+
|
323 |
+
div.bbp-converter-log,
|
324 |
+
div.bbp-converter-warning {
|
325 |
+
padding: 5px 5px 5px 0;
|
326 |
+
}
|
327 |
+
|
328 |
+
div.bbp-converter-log.started {
|
329 |
+
height: 300px;
|
330 |
+
overflow: auto;
|
331 |
+
}
|
332 |
+
|
333 |
+
div.bbp-converter-log p {
|
334 |
+
margin: 0;
|
335 |
+
padding: 2px;
|
336 |
+
}
|
337 |
+
|
338 |
+
div.bbp-converter-log p:only-child {
|
339 |
+
float: none;
|
340 |
+
margin-bottom: 0;
|
341 |
+
}
|
342 |
+
|
343 |
+
div.bbp-converter-log div {
|
344 |
+
padding: 10px;
|
345 |
+
margin: 5px;
|
346 |
+
background: #f4f4f4;
|
347 |
+
border: 1px solid #ddd;
|
348 |
+
}
|
349 |
+
|
350 |
+
div.bbp-converter-log div code {
|
351 |
+
margin-top: 5px;
|
352 |
+
display: block;
|
353 |
+
}
|
354 |
+
|
355 |
+
div.bbp-converter-log .step {
|
356 |
+
text-align: left;
|
357 |
+
font-weight: 600;
|
358 |
+
}
|
359 |
+
|
360 |
+
#bbp-converter-stop {
|
361 |
+
display: none;
|
362 |
+
}
|
includes/admin/{css → assets/css}/admin-rtl.min.css
RENAMED
@@ -1 +1 @@
|
|
1 |
-
#poststuff #bbp_forum_attributes select#parent_id,#poststuff #bbp_reply_attributes select#bbp_forum_id,#poststuff #bbp_reply_attributes select#bbp_reply_to,#poststuff #bbp_topic_attributes select#parent_id{max-width:170px}.bbp-badge{font:400 150px/1 dashicons!important;color:#000;display:inline-block}.bbp-badge:before{content:"\f451"}.about-wrap .bbp-badge{position:absolute;top:0;left:0}body.rtl .about-wrap .bbp-badge{left:auto;right:0}#adminmenu #menu-posts-forum .wp-menu-image:before,#dashboard_right_now a.bbp-glance-forums:before,th .bbp_forums_column:before{content:"\f449"}#adminmenu #menu-posts-topic .wp-menu-image:before,#dashboard_right_now a.bbp-glance-topics:before,th .bbp_topics_column:before{content:"\f450"}#adminmenu #menu-posts-reply .wp-menu-image:before,#dashboard_right_now a.bbp-glance-replies:before,th .bbp_replies_column:before{content:"\f451"}#dashboard_right_now a.bbp-glance-topic-tags:before{content:"\f323"}th .bbp_forums_column,th .bbp_replies_column,th .bbp_topics_column{height:16px;width:16px}th .bbp_forums_column:before,th .bbp_replies_column:before,th .bbp_topics_column:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}#bbp-dashboard-right-now .table,#bbp-dashboard-right-now .versions,#bbp-dashboard-right-now p.sub{margin:-12px}#bbp-dashboard-right-now .inside{font-size:12px;padding-top:20px;margin-bottom:0}#bbp-dashboard-right-now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;right:15px}body.rtl #bbp-dashboard-right-now p.sub{left:15px;right:0}#bbp-dashboard-right-now .table{margin:0;padding:0;position:relative}#bbp-dashboard-right-now .table_content{float:right;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_content{float:left}#bbp-dashboard-right-now .table_discussion{float:left;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_discussion{float:right}#bbp-dashboard-right-now table td{padding:3px 0;white-space:nowrap}#bbp-dashboard-right-now table tr.first td{border-top:none}#bbp-dashboard-right-now td.b{padding-left:6px;text-align:left;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;width:1%}body.rtl #bbp-dashboard-right-now td.b{padding-right:6px;padding-left:0}#bbp-dashboard-right-now td.b a{font-size:18px}#bbp-dashboard-right-now td.b a:hover{color:#d54e21}#bbp-dashboard-right-now .t{font-size:12px;padding-left:12px;padding-top:6px;color:#777}body.rtl #bbp-dashboard-right-now .t{padding-right:12px;padding-left:0}#bbp-dashboard-right-now .t a{white-space:nowrap}#bbp-dashboard-right-now .spam{color:red}#bbp-dashboard-right-now .waiting{color:#e66f00}#bbp-dashboard-right-now .approved{color:#0f0}#bbp-dashboard-right-now .versions{padding:6px 10px 12px;clear:both}#bbp-dashboard-right-now .versions .b{font-weight:700}#bbp-dashboard-right-now a.button{float:left;clear:left;position:relative;top:-5px}body.rtl #bbp-dashboard-right-now a.button{float:right;clear:right}body.post-type-forum #minor-publishing,body.post-type-forum #save-post{display:none}body.post-type-forum strong.label,body.post-type-reply strong.label,body.post-type-topic strong.label{display:inline-block;width:60px}.column-bbp_forum_reply_count,.column-bbp_forum_topic_count,.column-bbp_topic_reply_count,.column-bbp_topic_voice_count{width:8%!important}.column-author,.column-
|
1 |
+
#poststuff #bbp_forum_attributes select#parent_id,#poststuff #bbp_reply_attributes select#bbp_forum_id,#poststuff #bbp_reply_attributes select#bbp_reply_to,#poststuff #bbp_topic_attributes select#parent_id{max-width:170px}.bbp-badge{font:400 150px/1 dashicons!important;color:#000;display:inline-block}.bbp-badge:before{content:"\f451"}.about-wrap .bbp-badge{position:absolute;top:0;left:0}body.rtl .about-wrap .bbp-badge{left:auto;right:0}#adminmenu #menu-posts-forum .wp-menu-image:before,#dashboard_right_now a.bbp-glance-forums:before,th .bbp_forums_column:before{content:"\f449"}#adminmenu #menu-posts-topic .wp-menu-image:before,#dashboard_right_now a.bbp-glance-topics:before,th .bbp_topics_column:before{content:"\f450"}#adminmenu #menu-posts-reply .wp-menu-image:before,#dashboard_right_now a.bbp-glance-replies:before,th .bbp_replies_column:before{content:"\f451"}#dashboard_right_now a.bbp-glance-topic-tags:before{content:"\f323"}th .bbp_forums_column,th .bbp_replies_column,th .bbp_topics_column{height:16px;width:16px}th .bbp_forums_column:before,th .bbp_replies_column:before,th .bbp_topics_column:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}#bbp-dashboard-right-now .table,#bbp-dashboard-right-now .versions,#bbp-dashboard-right-now p.sub{margin:-12px}#bbp-dashboard-right-now .inside{font-size:12px;padding-top:20px;margin-bottom:0}#bbp-dashboard-right-now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;right:15px}body.rtl #bbp-dashboard-right-now p.sub{left:15px;right:0}#bbp-dashboard-right-now .table{margin:0;padding:0;position:relative}#bbp-dashboard-right-now .table_content{float:right;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_content{float:left}#bbp-dashboard-right-now .table_discussion{float:left;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_discussion{float:right}#bbp-dashboard-right-now table td{padding:3px 0;white-space:nowrap}#bbp-dashboard-right-now table tr.first td{border-top:none}#bbp-dashboard-right-now td.b{padding-left:6px;text-align:left;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;width:1%}body.rtl #bbp-dashboard-right-now td.b{padding-right:6px;padding-left:0}#bbp-dashboard-right-now td.b a{font-size:18px}#bbp-dashboard-right-now td.b a:hover{color:#d54e21}#bbp-dashboard-right-now .t{font-size:12px;padding-left:12px;padding-top:6px;color:#777}body.rtl #bbp-dashboard-right-now .t{padding-right:12px;padding-left:0}#bbp-dashboard-right-now .t a{white-space:nowrap}#bbp-dashboard-right-now .spam{color:red}#bbp-dashboard-right-now .waiting{color:#e66f00}#bbp-dashboard-right-now .approved{color:#0f0}#bbp-dashboard-right-now .versions{padding:6px 10px 12px;clear:both}#bbp-dashboard-right-now .versions .b{font-weight:700}#bbp-dashboard-right-now a.button{float:left;clear:left;position:relative;top:-5px}body.rtl #bbp-dashboard-right-now a.button{float:right;clear:right}body.post-type-forum #minor-publishing,body.post-type-forum #save-post{display:none}body.post-type-forum strong.label,body.post-type-reply strong.label,body.post-type-topic strong.label{display:inline-block;width:60px}.column-bbp_forum_reply_count,.column-bbp_forum_topic_count,.column-bbp_topic_reply_count,.column-bbp_topic_voice_count{width:8%!important}.column-author,.column-bbp_forum_mods,.column-bbp_reply_author,.column-bbp_topic_author{width:10%!important}.column-bbp_reply_forum,.column-bbp_reply_topic,.column-bbp_topic_forum{width:10%!important}.column-bbp_forum_freshness,.column-bbp_topic_freshness{width:10%!important}.column-bbp_forum_created,.column-bbp_reply_created,.column-bbp_topic_created{width:15%!important}.column-bbp_forum_topic_author,.column-bbp_topic_reply_author{width:25%!important}.column-bbp_forum_topic_author .avatar,.column-bbp_topic_reply_author .avatar{float:right;margin-left:10px}#bbp_moderators{width:100%}#bbp_forum_attributes hr{border-style:solid;border-width:1px;border-color:#ccc #ccc #fff #fff}#the-list .status-closed{background-color:#f5f5f5}#the-list .status-closed:nth-child(odd){background-color:#f0f0f0}#the-list .status-spam{background-color:#fee}#the-list .status-spam:nth-child(odd){background-color:#fdd}#the-list .status-pending{background-color:#fff2e8}#the-list .status-pending:nth-child(odd){background-color:#fff7f1}#the-list .status-closed td,#the-list .status-spam td{color:#999}#bbp_topic_engagements_metabox .avatar,#bbp_topic_favorites_metabox .avatar,#bbp_topic_subscriptions_metabox .avatar{margin:3px}#bbp-converter-monitor .inside{margin-bottom:0}div.bbp-converter-log,div.bbp-converter-warning{padding:5px 5px 5px 0}div.bbp-converter-log.started{height:300px;overflow:auto}div.bbp-converter-log p{margin:0;padding:2px}div.bbp-converter-log p:only-child{float:none;margin-bottom:0}div.bbp-converter-log div{padding:10px;margin:5px;background:#f4f4f4;border:1px solid #ddd}div.bbp-converter-log div code{margin-top:5px;display:block}div.bbp-converter-log .step{text-align:left;font-weight:600}#bbp-converter-stop{display:none}
|
includes/admin/{css → assets/css}/admin.css
RENAMED
@@ -305,3 +305,58 @@ body.post-type-reply strong.label {
|
|
305 |
#the-list .status-spam td {
|
306 |
color: #999;
|
307 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
#the-list .status-spam td {
|
306 |
color: #999;
|
307 |
}
|
308 |
+
|
309 |
+
/* User Relationships */
|
310 |
+
|
311 |
+
#bbp_topic_engagements_metabox .avatar,
|
312 |
+
#bbp_topic_favorites_metabox .avatar,
|
313 |
+
#bbp_topic_subscriptions_metabox .avatar {
|
314 |
+
margin: 3px;
|
315 |
+
}
|
316 |
+
|
317 |
+
/* Converter */
|
318 |
+
|
319 |
+
#bbp-converter-monitor .inside {
|
320 |
+
margin-bottom: 0;
|
321 |
+
}
|
322 |
+
|
323 |
+
div.bbp-converter-log,
|
324 |
+
div.bbp-converter-warning {
|
325 |
+
padding: 5px 0 5px 5px;
|
326 |
+
}
|
327 |
+
|
328 |
+
div.bbp-converter-log.started {
|
329 |
+
height: 300px;
|
330 |
+
overflow: auto;
|
331 |
+
}
|
332 |
+
|
333 |
+
div.bbp-converter-log p {
|
334 |
+
margin: 0;
|
335 |
+
padding: 2px;
|
336 |
+
}
|
337 |
+
|
338 |
+
div.bbp-converter-log p:only-child {
|
339 |
+
float: none;
|
340 |
+
margin-bottom: 0;
|
341 |
+
}
|
342 |
+
|
343 |
+
div.bbp-converter-log div {
|
344 |
+
padding: 10px;
|
345 |
+
margin: 5px;
|
346 |
+
background: #f4f4f4;
|
347 |
+
border: 1px solid #ddd;
|
348 |
+
}
|
349 |
+
|
350 |
+
div.bbp-converter-log div code {
|
351 |
+
margin-top: 5px;
|
352 |
+
display: block;
|
353 |
+
}
|
354 |
+
|
355 |
+
div.bbp-converter-log .step {
|
356 |
+
text-align: right;
|
357 |
+
font-weight: 600;
|
358 |
+
}
|
359 |
+
|
360 |
+
#bbp-converter-stop {
|
361 |
+
display: none;
|
362 |
+
}
|
includes/admin/{css → assets/css}/admin.min.css
RENAMED
@@ -1 +1 @@
|
|
1 |
-
#poststuff #bbp_forum_attributes select#parent_id,#poststuff #bbp_reply_attributes select#bbp_forum_id,#poststuff #bbp_reply_attributes select#bbp_reply_to,#poststuff #bbp_topic_attributes select#parent_id{max-width:170px}.bbp-badge{font:400 150px/1 dashicons!important;color:#000;display:inline-block}.bbp-badge:before{content:"\f451"}.about-wrap .bbp-badge{position:absolute;top:0;right:0}body.rtl .about-wrap .bbp-badge{right:auto;left:0}#adminmenu #menu-posts-forum .wp-menu-image:before,#dashboard_right_now a.bbp-glance-forums:before,th .bbp_forums_column:before{content:"\f449"}#adminmenu #menu-posts-topic .wp-menu-image:before,#dashboard_right_now a.bbp-glance-topics:before,th .bbp_topics_column:before{content:"\f450"}#adminmenu #menu-posts-reply .wp-menu-image:before,#dashboard_right_now a.bbp-glance-replies:before,th .bbp_replies_column:before{content:"\f451"}#dashboard_right_now a.bbp-glance-topic-tags:before{content:"\f323"}th .bbp_forums_column,th .bbp_replies_column,th .bbp_topics_column{height:16px;width:16px}th .bbp_forums_column:before,th .bbp_replies_column:before,th .bbp_topics_column:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}#bbp-dashboard-right-now .table,#bbp-dashboard-right-now .versions,#bbp-dashboard-right-now p.sub{margin:-12px}#bbp-dashboard-right-now .inside{font-size:12px;padding-top:20px;margin-bottom:0}#bbp-dashboard-right-now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;left:15px}body.rtl #bbp-dashboard-right-now p.sub{right:15px;left:0}#bbp-dashboard-right-now .table{margin:0;padding:0;position:relative}#bbp-dashboard-right-now .table_content{float:left;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_content{float:right}#bbp-dashboard-right-now .table_discussion{float:right;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_discussion{float:left}#bbp-dashboard-right-now table td{padding:3px 0;white-space:nowrap}#bbp-dashboard-right-now table tr.first td{border-top:none}#bbp-dashboard-right-now td.b{padding-right:6px;text-align:right;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;width:1%}body.rtl #bbp-dashboard-right-now td.b{padding-left:6px;padding-right:0}#bbp-dashboard-right-now td.b a{font-size:18px}#bbp-dashboard-right-now td.b a:hover{color:#d54e21}#bbp-dashboard-right-now .t{font-size:12px;padding-right:12px;padding-top:6px;color:#777}body.rtl #bbp-dashboard-right-now .t{padding-left:12px;padding-right:0}#bbp-dashboard-right-now .t a{white-space:nowrap}#bbp-dashboard-right-now .spam{color:red}#bbp-dashboard-right-now .waiting{color:#e66f00}#bbp-dashboard-right-now .approved{color:#0f0}#bbp-dashboard-right-now .versions{padding:6px 10px 12px;clear:both}#bbp-dashboard-right-now .versions .b{font-weight:700}#bbp-dashboard-right-now a.button{float:right;clear:right;position:relative;top:-5px}body.rtl #bbp-dashboard-right-now a.button{float:left;clear:left}body.post-type-forum #minor-publishing,body.post-type-forum #save-post{display:none}body.post-type-forum strong.label,body.post-type-reply strong.label,body.post-type-topic strong.label{display:inline-block;width:60px}.column-bbp_forum_reply_count,.column-bbp_forum_topic_count,.column-bbp_topic_reply_count,.column-bbp_topic_voice_count{width:8%!important}.column-author,.column-
|
1 |
+
#poststuff #bbp_forum_attributes select#parent_id,#poststuff #bbp_reply_attributes select#bbp_forum_id,#poststuff #bbp_reply_attributes select#bbp_reply_to,#poststuff #bbp_topic_attributes select#parent_id{max-width:170px}.bbp-badge{font:400 150px/1 dashicons!important;color:#000;display:inline-block}.bbp-badge:before{content:"\f451"}.about-wrap .bbp-badge{position:absolute;top:0;right:0}body.rtl .about-wrap .bbp-badge{right:auto;left:0}#adminmenu #menu-posts-forum .wp-menu-image:before,#dashboard_right_now a.bbp-glance-forums:before,th .bbp_forums_column:before{content:"\f449"}#adminmenu #menu-posts-topic .wp-menu-image:before,#dashboard_right_now a.bbp-glance-topics:before,th .bbp_topics_column:before{content:"\f450"}#adminmenu #menu-posts-reply .wp-menu-image:before,#dashboard_right_now a.bbp-glance-replies:before,th .bbp_replies_column:before{content:"\f451"}#dashboard_right_now a.bbp-glance-topic-tags:before{content:"\f323"}th .bbp_forums_column,th .bbp_replies_column,th .bbp_topics_column{height:16px;width:16px}th .bbp_forums_column:before,th .bbp_replies_column:before,th .bbp_topics_column:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}#bbp-dashboard-right-now .table,#bbp-dashboard-right-now .versions,#bbp-dashboard-right-now p.sub{margin:-12px}#bbp-dashboard-right-now .inside{font-size:12px;padding-top:20px;margin-bottom:0}#bbp-dashboard-right-now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;left:15px}body.rtl #bbp-dashboard-right-now p.sub{right:15px;left:0}#bbp-dashboard-right-now .table{margin:0;padding:0;position:relative}#bbp-dashboard-right-now .table_content{float:left;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_content{float:right}#bbp-dashboard-right-now .table_discussion{float:right;border-top:#ececec 1px solid;width:45%}body.rtl #bbp-dashboard-right-now .table_discussion{float:left}#bbp-dashboard-right-now table td{padding:3px 0;white-space:nowrap}#bbp-dashboard-right-now table tr.first td{border-top:none}#bbp-dashboard-right-now td.b{padding-right:6px;text-align:right;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;width:1%}body.rtl #bbp-dashboard-right-now td.b{padding-left:6px;padding-right:0}#bbp-dashboard-right-now td.b a{font-size:18px}#bbp-dashboard-right-now td.b a:hover{color:#d54e21}#bbp-dashboard-right-now .t{font-size:12px;padding-right:12px;padding-top:6px;color:#777}body.rtl #bbp-dashboard-right-now .t{padding-left:12px;padding-right:0}#bbp-dashboard-right-now .t a{white-space:nowrap}#bbp-dashboard-right-now .spam{color:red}#bbp-dashboard-right-now .waiting{color:#e66f00}#bbp-dashboard-right-now .approved{color:#0f0}#bbp-dashboard-right-now .versions{padding:6px 10px 12px;clear:both}#bbp-dashboard-right-now .versions .b{font-weight:700}#bbp-dashboard-right-now a.button{float:right;clear:right;position:relative;top:-5px}body.rtl #bbp-dashboard-right-now a.button{float:left;clear:left}body.post-type-forum #minor-publishing,body.post-type-forum #save-post{display:none}body.post-type-forum strong.label,body.post-type-reply strong.label,body.post-type-topic strong.label{display:inline-block;width:60px}.column-bbp_forum_reply_count,.column-bbp_forum_topic_count,.column-bbp_topic_reply_count,.column-bbp_topic_voice_count{width:8%!important}.column-author,.column-bbp_forum_mods,.column-bbp_reply_author,.column-bbp_topic_author{width:10%!important}.column-bbp_reply_forum,.column-bbp_reply_topic,.column-bbp_topic_forum{width:10%!important}.column-bbp_forum_freshness,.column-bbp_topic_freshness{width:10%!important}.column-bbp_forum_created,.column-bbp_reply_created,.column-bbp_topic_created{width:15%!important}.column-bbp_forum_topic_author,.column-bbp_topic_reply_author{width:25%!important}.column-bbp_forum_topic_author .avatar,.column-bbp_topic_reply_author .avatar{float:left;margin-right:10px}#bbp_moderators{width:100%}#bbp_forum_attributes hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}#the-list .status-closed{background-color:#f5f5f5}#the-list .status-closed:nth-child(odd){background-color:#f0f0f0}#the-list .status-spam{background-color:#fee}#the-list .status-spam:nth-child(odd){background-color:#fdd}#the-list .status-pending{background-color:#fff2e8}#the-list .status-pending:nth-child(odd){background-color:#fff7f1}#the-list .status-closed td,#the-list .status-spam td{color:#999}#bbp_topic_engagements_metabox .avatar,#bbp_topic_favorites_metabox .avatar,#bbp_topic_subscriptions_metabox .avatar{margin:3px}#bbp-converter-monitor .inside{margin-bottom:0}div.bbp-converter-log,div.bbp-converter-warning{padding:5px 0 5px 5px}div.bbp-converter-log.started{height:300px;overflow:auto}div.bbp-converter-log p{margin:0;padding:2px}div.bbp-converter-log p:only-child{float:none;margin-bottom:0}div.bbp-converter-log div{padding:10px;margin:5px;background:#f4f4f4;border:1px solid #ddd}div.bbp-converter-log div code{margin-top:5px;display:block}div.bbp-converter-log .step{text-align:right;font-weight:600}#bbp-converter-stop{display:none}
|
includes/admin/{js → assets/js}/common.js
RENAMED
File without changes
|
includes/admin/{js → assets/js}/common.min.js
RENAMED
@@ -1,2 +1,3 @@
|
|
1 |
/*! This file is automatically generated. */
|
2 |
-
|
|
1 |
/*! This file is automatically generated. */
|
2 |
+
|
3 |
+
jQuery(document).ready(function(){var a=jQuery("#bbp_author_id");a.suggest(a.data("ajax-url"),{onSelect:function(){var u=this.value;a.val(u.substr(0,u.indexOf(" ")))}})});
|
includes/admin/assets/js/converter.js
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*jshint sub:true*/
|
2 |
+
/* global document, jQuery, ajaxurl, BBP_Converter */
|
3 |
+
jQuery( document ).ready( function ( $ ) {
|
4 |
+
'use strict';
|
5 |
+
|
6 |
+
// Variables
|
7 |
+
var message = $( '#bbp-converter-message' ),
|
8 |
+
stop = $( '#bbp-converter-stop' ),
|
9 |
+
start = $( '#bbp-converter-start' ),
|
10 |
+
restart = $( '#_bbp_converter_restart' ),
|
11 |
+
settings = $( '#bbp-converter-settings' );
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Start button click
|
15 |
+
*
|
16 |
+
* @since 2.6.0 bbPress (r6470)
|
17 |
+
*
|
18 |
+
* @param {element} e
|
19 |
+
*/
|
20 |
+
start.on( 'click', function( e ) {
|
21 |
+
bbp_converter_user_start();
|
22 |
+
|
23 |
+
e.preventDefault();
|
24 |
+
} );
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Stop button click
|
28 |
+
*
|
29 |
+
* @since 2.6.0 bbPress (r6470)
|
30 |
+
*
|
31 |
+
* @param {element} e
|
32 |
+
*/
|
33 |
+
$( stop ).on( 'click', function( e ) {
|
34 |
+
bbp_converter_user_stop();
|
35 |
+
|
36 |
+
e.preventDefault();
|
37 |
+
} );
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Start the converter
|
41 |
+
*
|
42 |
+
* @since 2.6.0 bbPress (r6470)
|
43 |
+
*
|
44 |
+
* @returns {void}
|
45 |
+
*/
|
46 |
+
function bbp_converter_user_start() {
|
47 |
+
if ( ! BBP_Converter.running ) {
|
48 |
+
message.addClass( 'started' );
|
49 |
+
start.hide();
|
50 |
+
stop.show();
|
51 |
+
|
52 |
+
if ( BBP_Converter.started ) {
|
53 |
+
bbp_converter_log( BBP_Converter.strings.start_continue );
|
54 |
+
} else {
|
55 |
+
bbp_converter_log( BBP_Converter.strings.start_start );
|
56 |
+
}
|
57 |
+
|
58 |
+
bbp_converter_next();
|
59 |
+
}
|
60 |
+
|
61 |
+
BBP_Converter.started = true;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Stop the converter
|
66 |
+
*
|
67 |
+
* @since 2.6.0 bbPress (r6470)
|
68 |
+
*
|
69 |
+
* @returns {void}
|
70 |
+
*/
|
71 |
+
function bbp_converter_user_stop() {
|
72 |
+
bbp_converter_stop(
|
73 |
+
BBP_Converter.strings.button_continue,
|
74 |
+
BBP_Converter.strings.import_stopped_user
|
75 |
+
);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Database error
|
80 |
+
*
|
81 |
+
* @since 2.6.0 bbPress (r6470)
|
82 |
+
*
|
83 |
+
* @returns {void}
|
84 |
+
*/
|
85 |
+
function bbp_converter_error_db() {
|
86 |
+
bbp_converter_stop(
|
87 |
+
BBP_Converter.strings.button_start,
|
88 |
+
BBP_Converter.strings.import_error_db
|
89 |
+
);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Converter error
|
94 |
+
*
|
95 |
+
* @since 2.6.0 bbPress (r6470)
|
96 |
+
*
|
97 |
+
* @returns {void}
|
98 |
+
*/
|
99 |
+
function bbp_converter_halt() {
|
100 |
+
bbp_converter_stop(
|
101 |
+
BBP_Converter.strings.button_continue,
|
102 |
+
BBP_Converter.strings.import_error_halt
|
103 |
+
);
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Converter complete
|
108 |
+
*
|
109 |
+
* @since 2.6.0 bbPress (r6470)
|
110 |
+
*
|
111 |
+
* @returns {void}
|
112 |
+
*/
|
113 |
+
function bbp_converter_complete() {
|
114 |
+
bbp_converter_stop(
|
115 |
+
BBP_Converter.strings.button_start,
|
116 |
+
BBP_Converter.strings.import_comelete
|
117 |
+
);
|
118 |
+
|
119 |
+
BBP_Converter.started = false;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Handle successful ajax response
|
124 |
+
*
|
125 |
+
* @since 2.6.0 bbPress (r6470)
|
126 |
+
*
|
127 |
+
* @param {object} response Ajax response
|
128 |
+
*
|
129 |
+
* @returns {void}
|
130 |
+
*/
|
131 |
+
function bbp_converter_process( response ) {
|
132 |
+
bbp_converter_log( response );
|
133 |
+
|
134 |
+
if ( response === BBP_Converter.strings.import_complete ) {
|
135 |
+
bbp_converter_complete();
|
136 |
+
|
137 |
+
} else if ( BBP_Converter.running ) {
|
138 |
+
bbp_converter_next();
|
139 |
+
|
140 |
+
} else if ( BBP_Converter.halt ) {
|
141 |
+
bbp_converter_halt();
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Return values of converter settings
|
147 |
+
*
|
148 |
+
* @since 2.6.0 bbPress (r6470)
|
149 |
+
*
|
150 |
+
* @returns {converterL#2.bbp_converter_settings.values}
|
151 |
+
*/
|
152 |
+
function bbp_converter_settings() {
|
153 |
+
var values = {};
|
154 |
+
|
155 |
+
$.each( settings.serializeArray(), function( i, field ) {
|
156 |
+
values[ field.name ] = field.value;
|
157 |
+
} );
|
158 |
+
|
159 |
+
if ( values['_bbp_converter_restart'] ) {
|
160 |
+
restart.removeAttr( 'checked' );
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( values['_bbp_converter_delay_time'] ) {
|
164 |
+
BBP_Converter.delay = values['_bbp_converter_delay_time'] * 1000;
|
165 |
+
}
|
166 |
+
|
167 |
+
values['action'] = 'bbp_converter_process';
|
168 |
+
values['_ajax_nonce'] = BBP_Converter.ajax_nonce;
|
169 |
+
|
170 |
+
return values;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Run the converter step
|
175 |
+
*
|
176 |
+
* @since 2.6.0 bbPress (r6470)
|
177 |
+
*
|
178 |
+
* @returns {void}
|
179 |
+
*/
|
180 |
+
function bbp_converter_step() {
|
181 |
+
|
182 |
+
if ( ! BBP_Converter.running ) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
+
|
186 |
+
$.post( ajaxurl, bbp_converter_settings(), function( response ) {
|
187 |
+
|
188 |
+
if ( 'bbp_converter_db_connection_failed' === response ) {
|
189 |
+
bbp_converter_error_db();
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
bbp_converter_process( response.substring( 0, response.length - 1 ) );
|
194 |
+
} );
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Proceed to the next converter step
|
199 |
+
*
|
200 |
+
* @since 2.6.0 bbPress (r6470)
|
201 |
+
*
|
202 |
+
* @returns {void}
|
203 |
+
*/
|
204 |
+
function bbp_converter_next() {
|
205 |
+
clearTimeout( BBP_Converter.running );
|
206 |
+
|
207 |
+
BBP_Converter.running = setTimeout( function() {
|
208 |
+
bbp_converter_step();
|
209 |
+
}, BBP_Converter.delay );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Stop the converter, and update the UI
|
214 |
+
*
|
215 |
+
* @since 2.6.0 bbPress (r6470)
|
216 |
+
*
|
217 |
+
* @param {string} button New text for button
|
218 |
+
* @param {string} log New text to add to import monitor
|
219 |
+
*
|
220 |
+
* @returns {void}
|
221 |
+
*/
|
222 |
+
function bbp_converter_stop( button, log ) {
|
223 |
+
start.val( button ).show();
|
224 |
+
stop.hide();
|
225 |
+
|
226 |
+
if ( log ) {
|
227 |
+
bbp_converter_log( log );
|
228 |
+
}
|
229 |
+
|
230 |
+
clearTimeout( BBP_Converter.running );
|
231 |
+
|
232 |
+
BBP_Converter.running = false;
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Prepend some text to the import monitor
|
237 |
+
*
|
238 |
+
* @since 2.6.0 bbPress (r6470)
|
239 |
+
*
|
240 |
+
* @param {string} text Text to prepend to the import monitor
|
241 |
+
*
|
242 |
+
* @returns {void}
|
243 |
+
*/
|
244 |
+
function bbp_converter_log( text ) {
|
245 |
+
|
246 |
+
if ( '<div' !== text.substring( 0, 3 ) ) {
|
247 |
+
text = '<p>' + text + '</p>';
|
248 |
+
}
|
249 |
+
|
250 |
+
message.prepend( text );
|
251 |
+
}
|
252 |
+
} );
|
includes/admin/assets/js/converter.min.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! This file is automatically generated. */
|
2 |
+
|
3 |
+
jQuery(document).ready(function(r){"use strict";function e(){BBP_Converter.running||(a.addClass("started"),p.hide(),b.show(),v(BBP_Converter.started?BBP_Converter.strings.start_continue:BBP_Converter.strings.start_start),c()),BBP_Converter.started=!0}function t(){u(BBP_Converter.strings.button_continue,BBP_Converter.strings.import_stopped_user)}function n(){u(BBP_Converter.strings.button_start,BBP_Converter.strings.import_error_db)}function o(){u(BBP_Converter.strings.button_continue,BBP_Converter.strings.import_error_halt)}function i(){u(BBP_Converter.strings.button_start,BBP_Converter.strings.import_comelete),BBP_Converter.started=!1}function _(r){v(r),r===BBP_Converter.strings.import_complete?i():BBP_Converter.running?c():BBP_Converter.halt&&o()}function s(){var e={};return r.each(P.serializeArray(),function(r,t){e[t.name]=t.value}),e._bbp_converter_restart&&C.removeAttr("checked"),e._bbp_converter_delay_time&&(BBP_Converter.delay=1e3*e._bbp_converter_delay_time),e.action="bbp_converter_process",e._ajax_nonce=BBP_Converter.ajax_nonce,e}function B(){BBP_Converter.running&&r.post(ajaxurl,s(),function(r){"bbp_converter_db_connection_failed"!==r?_(r.substring(0,r.length-1)):n()})}function c(){clearTimeout(BBP_Converter.running),BBP_Converter.running=setTimeout(function(){B()},BBP_Converter.delay)}function u(r,e){p.val(r).show(),b.hide(),e&&v(e),clearTimeout(BBP_Converter.running),BBP_Converter.running=!1}function v(r){"<div"!==r.substring(0,3)&&(r="<p>"+r+"</p>"),a.prepend(r)}var a=r("#bbp-converter-message"),b=r("#bbp-converter-stop"),p=r("#bbp-converter-start"),C=r("#_bbp_converter_restart"),P=r("#bbp-converter-settings");p.on("click",function(r){e(),r.preventDefault()}),r(b).on("click",function(r){t(),r.preventDefault()})});
|
includes/admin/{js → assets/js}/replies.js
RENAMED
File without changes
|
includes/admin/{js → assets/js}/replies.min.js
RENAMED
@@ -1,2 +1,3 @@
|
|
1 |
/*! This file is automatically generated. */
|
2 |
-
|
|
1 |
/*! This file is automatically generated. */
|
2 |
+
|
3 |
+
jQuery(document).ready(function(){jQuery("#misc-publishing-actions").find(".misc-pub-section").first().remove(),jQuery("#save-action").remove();var e=jQuery("#bbp_topic_id");e.suggest(e.data("ajax-url"),{onSelect:function(){var i=this.value;e.val(i.substr(0,i.indexOf(" ")))}})});
|
includes/admin/{js → assets/js}/topics.js
RENAMED
File without changes
|
includes/admin/{js → assets/js}/topics.min.js
RENAMED
@@ -1,2 +1,3 @@
|
|
1 |
/*! This file is automatically generated. */
|
|
|
2 |
jQuery(document).ready(function(){jQuery("#misc-publishing-actions").find(".misc-pub-section").first().remove(),jQuery("#save-action").remove()});
|
1 |
/*! This file is automatically generated. */
|
2 |
+
|
3 |
jQuery(document).ready(function(){jQuery("#misc-publishing-actions").find(".misc-pub-section").first().remove(),jQuery("#save-action").remove()});
|
includes/admin/{converter.php → classes/class-bbp-converter-base.php}
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* bbPress Converter
|
5 |
*
|
6 |
* Based on the hard work of Adam Ellis
|
7 |
*
|
@@ -12,663 +12,6 @@
|
|
12 |
// Exit if accessed directly
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
15 |
-
/**
|
16 |
-
* Main BBP_Converter Class
|
17 |
-
*/
|
18 |
-
class BBP_Converter {
|
19 |
-
|
20 |
-
/**
|
21 |
-
* The main bbPress Converter loader
|
22 |
-
*
|
23 |
-
* @since 2.1.0 bbPress (r3813)
|
24 |
-
*
|
25 |
-
* @uses BBP_Converter::includes() Include the required files
|
26 |
-
* @uses BBP_Converter::setup_actions() Setup the actions
|
27 |
-
*/
|
28 |
-
public function __construct() {
|
29 |
-
|
30 |
-
// "I wonder where I'll float next."
|
31 |
-
if ( empty( $_SERVER['REQUEST_METHOD'] ) ) {
|
32 |
-
return;
|
33 |
-
}
|
34 |
-
|
35 |
-
// Bail if request is not correct
|
36 |
-
switch ( strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
37 |
-
|
38 |
-
// Converter is converting
|
39 |
-
case 'POST' :
|
40 |
-
if ( ( empty( $_POST['action'] ) || ( 'bbconverter_process' != $_POST['action'] ) ) ) {
|
41 |
-
return;
|
42 |
-
}
|
43 |
-
|
44 |
-
break;
|
45 |
-
|
46 |
-
// Some other admin page
|
47 |
-
case 'GET' :
|
48 |
-
if ( ( empty( $_GET['page'] ) || ( 'bbp-converter' != $_GET['page'] ) ) ) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
|
52 |
-
break;
|
53 |
-
}
|
54 |
-
|
55 |
-
// Proceed with the actions
|
56 |
-
$this->setup_actions();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Setup the default actions
|
61 |
-
*
|
62 |
-
* @since 2.1.0 bbPress (r3813)
|
63 |
-
*
|
64 |
-
* @uses add_action() To add various actions
|
65 |
-
*/
|
66 |
-
private function setup_actions() {
|
67 |
-
|
68 |
-
// Attach to the admin head with our ajax requests cycle and css
|
69 |
-
add_action( 'bbp_admin_head', array( $this, 'admin_head' ) );
|
70 |
-
|
71 |
-
// Attach the bbConverter admin settings action to the WordPress admin init action.
|
72 |
-
add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) );
|
73 |
-
|
74 |
-
// Attach to the admin ajax request to process cycles
|
75 |
-
add_action( 'wp_ajax_bbconverter_process', array( $this, 'process_callback' ) );
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Register the settings
|
80 |
-
*
|
81 |
-
* @since 2.1.0 bbPress (r3813)
|
82 |
-
*
|
83 |
-
* @uses add_settings_section() To add our own settings section
|
84 |
-
* @uses add_settings_field() To add various settings fields
|
85 |
-
* @uses register_setting() To register various settings
|
86 |
-
*/
|
87 |
-
public function register_admin_settings() {
|
88 |
-
|
89 |
-
// Add the main section
|
90 |
-
add_settings_section( 'bbpress_converter_main', __( 'Database Settings', 'bbpress' ), 'bbp_converter_setting_callback_main_section', 'bbpress_converter' );
|
91 |
-
|
92 |
-
// System Select
|
93 |
-
add_settings_field( '_bbp_converter_platform', __( 'Select Platform', 'bbpress' ), 'bbp_converter_setting_callback_platform', 'bbpress_converter', 'bbpress_converter_main' );
|
94 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_platform', 'sanitize_title' );
|
95 |
-
|
96 |
-
// Database Server
|
97 |
-
add_settings_field( '_bbp_converter_db_server', __( 'Database Server', 'bbpress' ), 'bbp_converter_setting_callback_dbserver', 'bbpress_converter', 'bbpress_converter_main' );
|
98 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_server', 'sanitize_title' );
|
99 |
-
|
100 |
-
// Database Server Port
|
101 |
-
add_settings_field( '_bbp_converter_db_port', __( 'Database Port', 'bbpress' ), 'bbp_converter_setting_callback_dbport', 'bbpress_converter', 'bbpress_converter_main' );
|
102 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_port', 'sanitize_title' );
|
103 |
-
|
104 |
-
// Database Name
|
105 |
-
add_settings_field( '_bbp_converter_db_name', __( 'Database Name', 'bbpress' ), 'bbp_converter_setting_callback_dbname', 'bbpress_converter', 'bbpress_converter_main' );
|
106 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_name', 'sanitize_title' );
|
107 |
-
|
108 |
-
// Database User
|
109 |
-
add_settings_field( '_bbp_converter_db_user', __( 'Database User', 'bbpress' ), 'bbp_converter_setting_callback_dbuser', 'bbpress_converter', 'bbpress_converter_main' );
|
110 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_user', 'sanitize_title' );
|
111 |
-
|
112 |
-
// Database Pass
|
113 |
-
add_settings_field( '_bbp_converter_db_pass', __( 'Database Password', 'bbpress' ), 'bbp_converter_setting_callback_dbpass', 'bbpress_converter', 'bbpress_converter_main' );
|
114 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_pass', 'sanitize_title' );
|
115 |
-
|
116 |
-
// Database Prefix
|
117 |
-
add_settings_field( '_bbp_converter_db_prefix', __( 'Table Prefix', 'bbpress' ), 'bbp_converter_setting_callback_dbprefix', 'bbpress_converter', 'bbpress_converter_main' );
|
118 |
-
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_prefix', 'sanitize_title' );
|
119 |
-
|
120 |
-
// Add the options section
|
121 |
-
add_settings_section( 'bbpress_converter_opt', __( 'Options', 'bbpress' ), 'bbp_converter_setting_callback_options_section', 'bbpress_converter' );
|
122 |
-
|
123 |
-
// Rows Limit
|
124 |
-
add_settings_field( '_bbp_converter_rows', __( 'Rows Limit', 'bbpress' ), 'bbp_converter_setting_callback_rows', 'bbpress_converter', 'bbpress_converter_opt' );
|
125 |
-
register_setting ( 'bbpress_converter_opt', '_bbp_converter_rows', 'intval' );
|
126 |
-
|
127 |
-
// Delay Time
|
128 |
-
add_settings_field( '_bbp_converter_delay_time', __( 'Delay Time', 'bbpress' ), 'bbp_converter_setting_callback_delay_time', 'bbpress_converter', 'bbpress_converter_opt' );
|
129 |
-
register_setting ( 'bbpress_converter_opt', '_bbp_converter_delay_time', 'intval' );
|
130 |
-
|
131 |
-
// Convert Users ?
|
132 |
-
add_settings_field( '_bbp_converter_convert_users', __( 'Convert Users', 'bbpress' ), 'bbp_converter_setting_callback_convert_users', 'bbpress_converter', 'bbpress_converter_opt' );
|
133 |
-
register_setting ( 'bbpress_converter_opt', '_bbp_converter_convert_users', 'intval' );
|
134 |
-
|
135 |
-
// Restart
|
136 |
-
add_settings_field( '_bbp_converter_restart', __( 'Start Over', 'bbpress' ), 'bbp_converter_setting_callback_restart', 'bbpress_converter', 'bbpress_converter_opt' );
|
137 |
-
register_setting ( 'bbpress_converter_opt', '_bbp_converter_restart', 'intval' );
|
138 |
-
|
139 |
-
// Clean
|
140 |
-
add_settings_field( '_bbp_converter_clean', __( 'Purge Previous Import', 'bbpress' ), 'bbp_converter_setting_callback_clean', 'bbpress_converter', 'bbpress_converter_opt' );
|
141 |
-
register_setting ( 'bbpress_converter_opt', '_bbp_converter_clean', 'intval' );
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Admin scripts
|
146 |
-
*
|
147 |
-
* @since 2.1.0 bbPress (r3813)
|
148 |
-
*/
|
149 |
-
public function admin_head() { ?>
|
150 |
-
|
151 |
-
<style type="text/css" media="screen">
|
152 |
-
/*<![CDATA[*/
|
153 |
-
|
154 |
-
div.bbp-converter-updated,
|
155 |
-
div.bbp-converter-warning {
|
156 |
-
border-radius: 3px 3px 3px 3px;
|
157 |
-
border-style: solid;
|
158 |
-
border-width: 1px;
|
159 |
-
padding: 5px 5px 5px 5px;
|
160 |
-
}
|
161 |
-
|
162 |
-
div.bbp-converter-updated {
|
163 |
-
height: 300px;
|
164 |
-
overflow: auto;
|
165 |
-
display: none;
|
166 |
-
background-color: #FFFFE0;
|
167 |
-
border-color: #E6DB55;
|
168 |
-
font-family: monospace;
|
169 |
-
font-weight: bold;
|
170 |
-
}
|
171 |
-
|
172 |
-
div.bbp-converter-updated p {
|
173 |
-
margin: 0.5em 0;
|
174 |
-
padding: 2px;
|
175 |
-
float: left;
|
176 |
-
clear: left;
|
177 |
-
}
|
178 |
-
|
179 |
-
div.bbp-converter-updated p.loading {
|
180 |
-
padding: 2px 20px 2px 2px;
|
181 |
-
background-image: url('<?php echo admin_url(); ?>images/wpspin_light.gif');
|
182 |
-
background-repeat: no-repeat;
|
183 |
-
background-position: center right;
|
184 |
-
}
|
185 |
-
|
186 |
-
#bbp-converter-stop {
|
187 |
-
display:none;
|
188 |
-
}
|
189 |
-
|
190 |
-
#bbp-converter-progress {
|
191 |
-
display:none;
|
192 |
-
}
|
193 |
-
|
194 |
-
/*]]>*/
|
195 |
-
</style>
|
196 |
-
|
197 |
-
<script language="javascript">
|
198 |
-
|
199 |
-
var bbconverter_is_running = false;
|
200 |
-
var bbconverter_run_timer;
|
201 |
-
var bbconverter_delay_time = 0;
|
202 |
-
|
203 |
-
function bbconverter_grab_data() {
|
204 |
-
var values = {};
|
205 |
-
jQuery.each(jQuery('#bbp-converter-settings').serializeArray(), function(i, field) {
|
206 |
-
values[field.name] = field.value;
|
207 |
-
});
|
208 |
-
|
209 |
-
if( values['_bbp_converter_restart'] ) {
|
210 |
-
jQuery('#_bbp_converter_restart').removeAttr("checked");
|
211 |
-
}
|
212 |
-
|
213 |
-
if( values['_bbp_converter_delay_time'] ) {
|
214 |
-
bbconverter_delay_time = values['_bbp_converter_delay_time'] * 1000;
|
215 |
-
}
|
216 |
-
|
217 |
-
values['action'] = 'bbconverter_process';
|
218 |
-
values['_ajax_nonce'] = '<?php echo wp_create_nonce( 'bbp_converter_process' ); ?>';
|
219 |
-
|
220 |
-
return values;
|
221 |
-
}
|
222 |
-
|
223 |
-
function bbconverter_start() {
|
224 |
-
if( false === bbconverter_is_running ) {
|
225 |
-
bbconverter_is_running = true;
|
226 |
-
jQuery('#bbp-converter-start').hide();
|
227 |
-
jQuery('#bbp-converter-stop').show();
|
228 |
-
jQuery('#bbp-converter-progress').show();
|
229 |
-
bbconverter_log( '<p class="loading"><?php esc_html_e( 'Starting Conversion', 'bbpress' ); ?></p>' );
|
230 |
-
bbconverter_run();
|
231 |
-
}
|
232 |
-
}
|
233 |
-
|
234 |
-
function bbconverter_run() {
|
235 |
-
jQuery.post(ajaxurl, bbconverter_grab_data(), function(response) {
|
236 |
-
var response_length = response.length - 1;
|
237 |
-
response = response.substring(0,response_length);
|
238 |
-
bbconverter_success(response);
|
239 |
-
});
|
240 |
-
}
|
241 |
-
|
242 |
-
function bbconverter_stop() {
|
243 |
-
jQuery('#bbp-converter-start').show();
|
244 |
-
jQuery('#bbp-converter-stop').hide();
|
245 |
-
jQuery('#bbp-converter-progress').hide();
|
246 |
-
jQuery('#bbp-converter-message p').removeClass( 'loading' );
|
247 |
-
bbconverter_is_running = false;
|
248 |
-
clearTimeout( bbconverter_run_timer );
|
249 |
-
}
|
250 |
-
|
251 |
-
function bbconverter_success(response) {
|
252 |
-
bbconverter_log(response);
|
253 |
-
|
254 |
-
if ( response === '<p class="loading"><?php esc_html_e( 'Conversion Complete', 'bbpress' ); ?></p>' || response.indexOf('error') > -1 ) {
|
255 |
-
bbconverter_log('<p>Repair any missing information: <a href="<?php echo admin_url(); ?>tools.php?page=bbp-repair">Continue</a></p>');
|
256 |
-
bbconverter_stop();
|
257 |
-
} else if( bbconverter_is_running ) { // keep going
|
258 |
-
jQuery('#bbp-converter-progress').show();
|
259 |
-
clearTimeout( bbconverter_run_timer );
|
260 |
-
bbconverter_run_timer = setTimeout( 'bbconverter_run()', bbconverter_delay_time );
|
261 |
-
} else {
|
262 |
-
bbconverter_stop();
|
263 |
-
}
|
264 |
-
}
|
265 |
-
|
266 |
-
function bbconverter_log(text) {
|
267 |
-
if ( jQuery('#bbp-converter-message').css('display') === 'none' ) {
|
268 |
-
jQuery('#bbp-converter-message').show();
|
269 |
-
}
|
270 |
-
if ( text ) {
|
271 |
-
jQuery('#bbp-converter-message p').removeClass( 'loading' );
|
272 |
-
jQuery('#bbp-converter-message').prepend( text );
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
</script>
|
277 |
-
|
278 |
-
<?php
|
279 |
-
}
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Wrap the converter output in paragraph tags, so styling can be applied
|
283 |
-
*
|
284 |
-
* @since 2.1.0 bbPress (r4052)
|
285 |
-
*
|
286 |
-
* @param string $output
|
287 |
-
*/
|
288 |
-
private static function converter_output( $output = '' ) {
|
289 |
-
|
290 |
-
// Get the last query
|
291 |
-
$before = '<p class="loading">';
|
292 |
-
$after = '</p>';
|
293 |
-
$query = get_option( '_bbp_converter_query' );
|
294 |
-
|
295 |
-
if ( ! empty( $query ) ) {
|
296 |
-
$before = '<p class="loading" title="' . esc_attr( $query ) . '">';
|
297 |
-
}
|
298 |
-
|
299 |
-
echo $before . $output . $after;
|
300 |
-
}
|
301 |
-
|
302 |
-
/**
|
303 |
-
* Callback processor
|
304 |
-
*
|
305 |
-
* @since 2.1.0 bbPress (r3813)
|
306 |
-
*/
|
307 |
-
public function process_callback() {
|
308 |
-
|
309 |
-
// Bail if user cannot view import page
|
310 |
-
if ( ! current_user_can( 'bbp_tools_import_page' ) ) {
|
311 |
-
wp_die( '0' );
|
312 |
-
}
|
313 |
-
|
314 |
-
// Verify intent
|
315 |
-
check_ajax_referer( 'bbp_converter_process' );
|
316 |
-
|
317 |
-
if ( ! ini_get( 'safe_mode' ) ) {
|
318 |
-
set_time_limit( 0 );
|
319 |
-
ini_set( 'memory_limit', '256M' );
|
320 |
-
ini_set( 'implicit_flush', '1' );
|
321 |
-
ignore_user_abort( true );
|
322 |
-
}
|
323 |
-
|
324 |
-
// Save step and count so that it can be restarted.
|
325 |
-
if ( ! get_option( '_bbp_converter_step' ) || ( ! empty( $_POST['_bbp_converter_restart'] ) ) ) {
|
326 |
-
update_option( '_bbp_converter_step', 1 );
|
327 |
-
update_option( '_bbp_converter_start', 0 );
|
328 |
-
}
|
329 |
-
|
330 |
-
$step = (int) get_option( '_bbp_converter_step', 1 );
|
331 |
-
$min = (int) get_option( '_bbp_converter_start', 0 );
|
332 |
-
$count = (int) ! empty( $_POST['_bbp_converter_rows'] ) ? $_POST['_bbp_converter_rows'] : 100;
|
333 |
-
$max = ( $min + $count ) - 1;
|
334 |
-
$start = $min;
|
335 |
-
|
336 |
-
// Bail if platform did not get saved
|
337 |
-
$platform = ! empty( $_POST['_bbp_converter_platform' ] ) ? $_POST['_bbp_converter_platform' ] : get_option( '_bbp_converter_platform' );
|
338 |
-
if ( empty( $platform ) ) {
|
339 |
-
return;
|
340 |
-
}
|
341 |
-
|
342 |
-
// Include the appropriate converter.
|
343 |
-
$converter = bbp_new_converter( $platform );
|
344 |
-
|
345 |
-
switch ( $step ) {
|
346 |
-
|
347 |
-
// STEP 1. Clean all tables.
|
348 |
-
case 1 :
|
349 |
-
if ( ! empty( $_POST['_bbp_converter_clean'] ) ) {
|
350 |
-
if ( $converter->clean( $start ) ) {
|
351 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
352 |
-
update_option( '_bbp_converter_start', 0 );
|
353 |
-
$this->sync_table( true );
|
354 |
-
if ( empty( $start ) ) {
|
355 |
-
$this->converter_output( __( 'No data to clean', 'bbpress' ) );
|
356 |
-
}
|
357 |
-
} else {
|
358 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
359 |
-
$this->converter_output( sprintf( __( 'Deleting previously converted data (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
360 |
-
}
|
361 |
-
} else {
|
362 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
363 |
-
update_option( '_bbp_converter_start', 0 );
|
364 |
-
}
|
365 |
-
|
366 |
-
break;
|
367 |
-
|
368 |
-
// STEP 2. Convert users.
|
369 |
-
case 2 :
|
370 |
-
if ( ! empty( $_POST['_bbp_converter_convert_users'] ) ) {
|
371 |
-
if ( $converter->convert_users( $start ) ) {
|
372 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
373 |
-
update_option( '_bbp_converter_start', 0 );
|
374 |
-
if ( empty( $start ) ) {
|
375 |
-
$this->converter_output( __( 'No users to convert', 'bbpress' ) );
|
376 |
-
}
|
377 |
-
} else {
|
378 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
379 |
-
$this->converter_output( sprintf( __( 'Converting users (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
380 |
-
}
|
381 |
-
} else {
|
382 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
383 |
-
update_option( '_bbp_converter_start', 0 );
|
384 |
-
}
|
385 |
-
|
386 |
-
break;
|
387 |
-
|
388 |
-
// STEP 3. Clean passwords.
|
389 |
-
case 3 :
|
390 |
-
if ( ! empty( $_POST['_bbp_converter_convert_users'] ) ) {
|
391 |
-
if ( $converter->clean_passwords( $start ) ) {
|
392 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
393 |
-
update_option( '_bbp_converter_start', 0 );
|
394 |
-
if ( empty( $start ) ) {
|
395 |
-
$this->converter_output( __( 'No passwords to clear', 'bbpress' ) );
|
396 |
-
}
|
397 |
-
} else {
|
398 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
399 |
-
$this->converter_output( sprintf( __( 'Delete users WordPress default passwords (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
400 |
-
}
|
401 |
-
} else {
|
402 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
403 |
-
update_option( '_bbp_converter_start', 0 );
|
404 |
-
}
|
405 |
-
|
406 |
-
break;
|
407 |
-
|
408 |
-
// STEP 4. Convert forums.
|
409 |
-
case 4 :
|
410 |
-
if ( $converter->convert_forums( $start ) ) {
|
411 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
412 |
-
update_option( '_bbp_converter_start', 0 );
|
413 |
-
if ( empty( $start ) ) {
|
414 |
-
$this->converter_output( __( 'No forums to convert', 'bbpress' ) );
|
415 |
-
}
|
416 |
-
} else {
|
417 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
418 |
-
$this->converter_output( sprintf( __( 'Converting forums (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
419 |
-
}
|
420 |
-
|
421 |
-
break;
|
422 |
-
|
423 |
-
// STEP 5. Convert forum parents.
|
424 |
-
case 5 :
|
425 |
-
if ( $converter->convert_forum_parents( $start ) ) {
|
426 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
427 |
-
update_option( '_bbp_converter_start', 0 );
|
428 |
-
if ( empty( $start ) ) {
|
429 |
-
$this->converter_output( __( 'No forum parents to convert', 'bbpress' ) );
|
430 |
-
}
|
431 |
-
} else {
|
432 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
433 |
-
$this->converter_output( sprintf( __( 'Calculating forum hierarchy (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
434 |
-
}
|
435 |
-
|
436 |
-
break;
|
437 |
-
|
438 |
-
// STEP 6. Convert forum subscriptions.
|
439 |
-
case 6 :
|
440 |
-
if ( $converter->convert_forum_subscriptions( $start ) ) {
|
441 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
442 |
-
update_option( '_bbp_converter_start', 0 );
|
443 |
-
if ( empty( $start ) ) {
|
444 |
-
$this->converter_output( __( 'No forum subscriptions to convert', 'bbpress' ) );
|
445 |
-
}
|
446 |
-
} else {
|
447 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
448 |
-
$this->converter_output( sprintf( __( 'Converting forum subscriptions (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
449 |
-
}
|
450 |
-
|
451 |
-
break;
|
452 |
-
|
453 |
-
// STEP 7. Convert topics.
|
454 |
-
case 7 :
|
455 |
-
if ( $converter->convert_topics( $start ) ) {
|
456 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
457 |
-
update_option( '_bbp_converter_start', 0 );
|
458 |
-
if ( empty( $start ) ) {
|
459 |
-
$this->converter_output( __( 'No topics to convert', 'bbpress' ) );
|
460 |
-
}
|
461 |
-
} else {
|
462 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
463 |
-
$this->converter_output( sprintf( __( 'Converting topics (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
464 |
-
}
|
465 |
-
|
466 |
-
break;
|
467 |
-
|
468 |
-
// STEP 8. Convert anonymous topic authors.
|
469 |
-
case 8 :
|
470 |
-
if ( $converter->convert_anonymous_topic_authors( $start ) ) {
|
471 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
472 |
-
update_option( '_bbp_converter_start', 0 );
|
473 |
-
if ( empty( $start ) ) {
|
474 |
-
$this->converter_output( __( 'No anonymous topic authors to convert', 'bbpress' ) );
|
475 |
-
}
|
476 |
-
} else {
|
477 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
478 |
-
$this->converter_output( sprintf( __( 'Converting anonymous topic authors (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
479 |
-
}
|
480 |
-
|
481 |
-
break;
|
482 |
-
|
483 |
-
// STEP 9. Stick topics.
|
484 |
-
case 9 :
|
485 |
-
if ( $converter->convert_topic_stickies( $start ) ) {
|
486 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
487 |
-
update_option( '_bbp_converter_start', 0 );
|
488 |
-
if ( empty( $start ) ) {
|
489 |
-
$this->converter_output( __( 'No stickies to stick', 'bbpress' ) );
|
490 |
-
}
|
491 |
-
} else {
|
492 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
493 |
-
$this->converter_output( sprintf( __( 'Calculating topic stickies (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
494 |
-
}
|
495 |
-
|
496 |
-
break;
|
497 |
-
|
498 |
-
// STEP 10. Stick to front topics (Super Sicky).
|
499 |
-
case 10 :
|
500 |
-
if ( $converter->convert_topic_super_stickies( $start ) ) {
|
501 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
502 |
-
update_option( '_bbp_converter_start', 0 );
|
503 |
-
if ( empty( $start ) ) {
|
504 |
-
$this->converter_output( __( 'No super stickies to stick', 'bbpress' ) );
|
505 |
-
}
|
506 |
-
} else {
|
507 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
508 |
-
$this->converter_output( sprintf( __( 'Calculating topic super stickies (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
509 |
-
}
|
510 |
-
|
511 |
-
break;
|
512 |
-
|
513 |
-
// STEP 11. Closed topics.
|
514 |
-
case 11 :
|
515 |
-
if ( $converter->convert_topic_closed_topics( $start ) ) {
|
516 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
517 |
-
update_option( '_bbp_converter_start', 0 );
|
518 |
-
if ( empty( $start ) ) {
|
519 |
-
$this->converter_output( __( 'No closed topics to close', 'bbpress' ) );
|
520 |
-
}
|
521 |
-
} else {
|
522 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
523 |
-
$this->converter_output( sprintf( __( 'Calculating closed topics (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
524 |
-
}
|
525 |
-
|
526 |
-
break;
|
527 |
-
|
528 |
-
// STEP 12. Convert topic tags.
|
529 |
-
case 12 :
|
530 |
-
if ( $converter->convert_tags( $start ) ) {
|
531 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
532 |
-
update_option( '_bbp_converter_start', 0 );
|
533 |
-
if ( empty( $start ) ) {
|
534 |
-
$this->converter_output( __( 'No topic tags to convert', 'bbpress' ) );
|
535 |
-
}
|
536 |
-
} else {
|
537 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
538 |
-
$this->converter_output( sprintf( __( 'Converting topic tags (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
539 |
-
}
|
540 |
-
|
541 |
-
break;
|
542 |
-
|
543 |
-
// STEP 13. Convert topic subscriptions.
|
544 |
-
case 13 :
|
545 |
-
if ( $converter->convert_topic_subscriptions( $start ) ) {
|
546 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
547 |
-
update_option( '_bbp_converter_start', 0 );
|
548 |
-
if ( empty( $start ) ) {
|
549 |
-
$this->converter_output( __( 'No topic subscriptions to convert', 'bbpress' ) );
|
550 |
-
}
|
551 |
-
} else {
|
552 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
553 |
-
$this->converter_output( sprintf( __( 'Converting topic subscriptions (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
554 |
-
}
|
555 |
-
|
556 |
-
break;
|
557 |
-
|
558 |
-
// STEP 14. Convert topic favorites.
|
559 |
-
case 14 :
|
560 |
-
if ( $converter->convert_favorites( $start ) ) {
|
561 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
562 |
-
update_option( '_bbp_converter_start', 0 );
|
563 |
-
if ( empty( $start ) ) {
|
564 |
-
$this->converter_output( __( 'No favorites to convert', 'bbpress' ) );
|
565 |
-
}
|
566 |
-
} else {
|
567 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
568 |
-
$this->converter_output( sprintf( __( 'Converting favorites (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
569 |
-
}
|
570 |
-
|
571 |
-
break;
|
572 |
-
|
573 |
-
// STEP 15. Convert replies.
|
574 |
-
case 15 :
|
575 |
-
if ( $converter->convert_replies( $start ) ) {
|
576 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
577 |
-
update_option( '_bbp_converter_start', 0 );
|
578 |
-
if ( empty( $start ) ) {
|
579 |
-
$this->converter_output( __( 'No replies to convert', 'bbpress' ) );
|
580 |
-
}
|
581 |
-
} else {
|
582 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
583 |
-
$this->converter_output( sprintf( __( 'Converting replies (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
584 |
-
}
|
585 |
-
|
586 |
-
break;
|
587 |
-
|
588 |
-
// STEP 16. Convert anonymous reply authors.
|
589 |
-
case 16 :
|
590 |
-
if ( $converter->convert_anonymous_reply_authors( $start ) ) {
|
591 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
592 |
-
update_option( '_bbp_converter_start', 0 );
|
593 |
-
if ( empty( $start ) ) {
|
594 |
-
$this->converter_output( __( 'No anonymous reply authors to convert', 'bbpress' ) );
|
595 |
-
}
|
596 |
-
} else {
|
597 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
598 |
-
$this->converter_output( sprintf( __( 'Converting anonymous reply authors (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
599 |
-
}
|
600 |
-
|
601 |
-
break;
|
602 |
-
|
603 |
-
// STEP 17. Convert threaded replies parents.
|
604 |
-
case 17 :
|
605 |
-
if ( $converter->convert_reply_to_parents( $start ) ) {
|
606 |
-
update_option( '_bbp_converter_step', $step + 1 );
|
607 |
-
update_option( '_bbp_converter_start', 0 );
|
608 |
-
if ( empty( $start ) ) {
|
609 |
-
$this->converter_output( __( 'No threaded replies to convert', 'bbpress' ) );
|
610 |
-
}
|
611 |
-
} else {
|
612 |
-
update_option( '_bbp_converter_start', $max + 1 );
|
613 |
-
$this->converter_output( sprintf( __( 'Calculating threaded replies parents (%1$s - %2$s)', 'bbpress' ), $min, $max ) );
|
614 |
-
}
|
615 |
-
|
616 |
-
break;
|
617 |
-
|
618 |
-
default :
|
619 |
-
delete_option( '_bbp_converter_step' );
|
620 |
-
delete_option( '_bbp_converter_start' );
|
621 |
-
delete_option( '_bbp_converter_query' );
|
622 |
-
|
623 |
-
$this->converter_output( __( 'Conversion Complete', 'bbpress' ) );
|
624 |
-
|
625 |
-
break;
|
626 |
-
}
|
627 |
-
}
|
628 |
-
|
629 |
-
/**
|
630 |
-
* Create Tables for fast syncing
|
631 |
-
*
|
632 |
-
* @since 2.1.0 bbPress (r3813)
|
633 |
-
*/
|
634 |
-
public function sync_table( $drop = false ) {
|
635 |
-
|
636 |
-
$bbp_db = bbp_db();
|
637 |
-
$table_name = $bbp_db->prefix . 'bbp_converter_translator';
|
638 |
-
if ( ! empty( $drop ) && $bbp_db->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) {
|
639 |
-
$bbp_db->query( "DROP TABLE {$table_name}" );
|
640 |
-
}
|
641 |
-
|
642 |
-
require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );
|
643 |
-
|
644 |
-
if ( ! empty( $bbp_db->charset ) ) {
|
645 |
-
$charset_collate = "DEFAULT CHARACTER SET $bbp_db->charset";
|
646 |
-
}
|
647 |
-
|
648 |
-
if ( ! empty( $bbp_db->collate ) ) {
|
649 |
-
$charset_collate .= " COLLATE $bbp_db->collate";
|
650 |
-
}
|
651 |
-
|
652 |
-
$sql = array();
|
653 |
-
$max_index_length = 191;
|
654 |
-
|
655 |
-
/** Translator ********************************************************/
|
656 |
-
|
657 |
-
$sql[] = "CREATE TABLE {$table_name} (
|
658 |
-
meta_id mediumint(8) unsigned not null auto_increment,
|
659 |
-
value_type varchar(25) null,
|
660 |
-
value_id bigint(20) unsigned not null default '0',
|
661 |
-
meta_key varchar(255) null,
|
662 |
-
meta_value varchar(255) null,
|
663 |
-
PRIMARY KEY (meta_id),
|
664 |
-
KEY value_id (value_id),
|
665 |
-
KEY meta_join (meta_key({$max_index_length}), meta_value({$max_index_length}))
|
666 |
-
) {$charset_collate}";
|
667 |
-
|
668 |
-
dbDelta( $sql );
|
669 |
-
}
|
670 |
-
}
|
671 |
-
|
672 |
/**
|
673 |
* Base class to be extended by specific individual importers
|
674 |
*
|
@@ -692,9 +35,9 @@ abstract class BBP_Converter_Base {
|
|
692 |
protected $opdb;
|
693 |
|
694 |
/**
|
695 |
-
* @var int
|
696 |
*/
|
697 |
-
|
698 |
|
699 |
/**
|
700 |
* @var array() Map of topic to forum. It is for optimization.
|
@@ -736,23 +79,87 @@ abstract class BBP_Converter_Base {
|
|
736 |
*/
|
737 |
public $sync_table_name;
|
738 |
|
|
|
|
|
|
|
|
|
|
|
739 |
/** Methods ***************************************************************/
|
740 |
|
741 |
/**
|
742 |
* This is the constructor and it connects to the platform databases.
|
743 |
*/
|
744 |
public function __construct() {
|
745 |
-
$this->
|
746 |
}
|
747 |
|
748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
|
750 |
/** Get database connections ******************************************/
|
751 |
|
752 |
-
|
753 |
-
$this->
|
754 |
-
$this->
|
755 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
756 |
|
757 |
/**
|
758 |
* Error Reporting
|
@@ -925,13 +332,6 @@ abstract class BBP_Converter_Base {
|
|
925 |
*/
|
926 |
public function convert_table( $to_type, $start ) {
|
927 |
|
928 |
-
// Are we usig a sync table, or postmeta?
|
929 |
-
if ( $this->wpdb->get_var( "SHOW TABLES LIKE '" . $this->sync_table_name . "'" ) === $this->sync_table_name ) {
|
930 |
-
$this->sync_table = true;
|
931 |
-
} else {
|
932 |
-
$this->sync_table = false;
|
933 |
-
}
|
934 |
-
|
935 |
// Set some defaults
|
936 |
$has_insert = false;
|
937 |
$from_tablename = '';
|
@@ -980,7 +380,7 @@ abstract class BBP_Converter_Base {
|
|
980 |
if ( ! empty( $from_tablename ) ) {
|
981 |
|
982 |
// Doing some joining
|
983 |
-
if ( ! in_array( $item['from_tablename'], $from_tables ) && in_array( $item['join_tablename'], $from_tables ) ) {
|
984 |
$from_tablename .= ' ' . $item['join_type'] . ' JOIN ' . $this->opdb->prefix . $item['from_tablename'] . ' AS ' . $item['from_tablename'] . ' ' . $item['join_expression'];
|
985 |
}
|
986 |
|
@@ -1040,7 +440,7 @@ abstract class BBP_Converter_Base {
|
|
1040 |
|
1041 |
// This row has a destination that matches one of the
|
1042 |
// columns in this table.
|
1043 |
-
if ( in_array( $row['to_fieldname'], $tablefield_array ) ) {
|
1044 |
|
1045 |
// Allows us to set default fields.
|
1046 |
if ( isset( $row['default'] ) ) {
|
@@ -1048,7 +448,7 @@ abstract class BBP_Converter_Base {
|
|
1048 |
|
1049 |
// Translates a field from the old forum.
|
1050 |
} elseif ( isset( $row['callback_method'] ) ) {
|
1051 |
-
if ( ( 'callback_userid' === $row['callback_method'] ) &&
|
1052 |
$insert_post[ $row['to_fieldname'] ] = $forum[ $row['from_fieldname'] ];
|
1053 |
} else {
|
1054 |
$insert_post[ $row['to_fieldname'] ] = call_user_func_array( array( $this, $row['callback_method'] ), array( $forum[ $row['from_fieldname'] ], $forum ) );
|
@@ -1069,7 +469,7 @@ abstract class BBP_Converter_Base {
|
|
1069 |
|
1070 |
// Translates a field from the old forum.
|
1071 |
} elseif ( isset( $row['callback_method'] ) ) {
|
1072 |
-
if ( ( $row['callback_method'] === 'callback_userid' ) && (
|
1073 |
$insert_postmeta[ $row['to_fieldname'] ] = $forum[ $row['from_fieldname'] ];
|
1074 |
} else {
|
1075 |
$insert_postmeta[ $row['to_fieldname'] ] = call_user_func_array( array( $this, $row['callback_method'] ), array( $forum[ $row['from_fieldname'] ], $forum ) );
|
@@ -1195,7 +595,7 @@ abstract class BBP_Converter_Base {
|
|
1195 |
/** Forum, Topic, Reply ***************************/
|
1196 |
|
1197 |
default:
|
1198 |
-
$post_id = wp_insert_post( $insert_post );
|
1199 |
|
1200 |
if ( is_numeric( $post_id ) ) {
|
1201 |
|
@@ -1247,9 +647,9 @@ abstract class BBP_Converter_Base {
|
|
1247 |
}
|
1248 |
|
1249 |
/**
|
1250 |
-
* This method converts old forum
|
1251 |
*/
|
1252 |
-
public function convert_forum_parents( $start ) {
|
1253 |
|
1254 |
$has_update = false;
|
1255 |
|
@@ -1281,7 +681,7 @@ abstract class BBP_Converter_Base {
|
|
1281 |
* @uses bbp_stick_topic() to set the imported topic as sticky
|
1282 |
*
|
1283 |
*/
|
1284 |
-
public function convert_topic_stickies( $start ) {
|
1285 |
|
1286 |
$has_update = false;
|
1287 |
|
@@ -1312,7 +712,7 @@ abstract class BBP_Converter_Base {
|
|
1312 |
* @uses bbp_stick_topic() to set the imported topic as super sticky
|
1313 |
*
|
1314 |
*/
|
1315 |
-
public function convert_topic_super_stickies( $start ) {
|
1316 |
|
1317 |
$has_update = false;
|
1318 |
|
@@ -1343,7 +743,7 @@ abstract class BBP_Converter_Base {
|
|
1343 |
* @uses bbp_close_topic() to close topics properly
|
1344 |
*
|
1345 |
*/
|
1346 |
-
public function convert_topic_closed_topics( $start ) {
|
1347 |
|
1348 |
$has_update = false;
|
1349 |
|
@@ -1370,7 +770,7 @@ abstract class BBP_Converter_Base {
|
|
1370 |
*
|
1371 |
* @since 2.4.0 bbPress (r5093)
|
1372 |
*/
|
1373 |
-
public function convert_reply_to_parents( $start ) {
|
1374 |
|
1375 |
$has_update = false;
|
1376 |
|
@@ -1400,7 +800,7 @@ abstract class BBP_Converter_Base {
|
|
1400 |
*
|
1401 |
* @uses add_post_meta() To add _bbp_anonymous_name topic meta key
|
1402 |
*/
|
1403 |
-
public function convert_anonymous_topic_authors( $start ) {
|
1404 |
|
1405 |
$has_update = false;
|
1406 |
|
@@ -1446,7 +846,7 @@ abstract class BBP_Converter_Base {
|
|
1446 |
*
|
1447 |
* @uses add_post_meta() To add _bbp_anonymous_name reply meta key
|
1448 |
*/
|
1449 |
-
public function convert_anonymous_reply_authors( $start ) {
|
1450 |
|
1451 |
$has_update = false;
|
1452 |
|
@@ -1466,7 +866,6 @@ abstract class BBP_Converter_Base {
|
|
1466 |
WHERE wp_postmeta1.meta_value = %s
|
1467 |
AND wp_postmeta2.meta_key = %s
|
1468 |
LIMIT {$start}, {$this->max_rows}", 'true', '_bbp_old_reply_author_name_id' );
|
1469 |
-
|
1470 |
}
|
1471 |
|
1472 |
update_option( '_bbp_converter_query', $query );
|
@@ -1488,12 +887,12 @@ abstract class BBP_Converter_Base {
|
|
1488 |
/**
|
1489 |
* This method deletes data from the wp database.
|
1490 |
*/
|
1491 |
-
public function clean( $start ) {
|
1492 |
|
1493 |
-
|
1494 |
$has_delete = false;
|
1495 |
|
1496 |
-
/** Delete
|
1497 |
|
1498 |
if ( true === $this->sync_table ) {
|
1499 |
$query = $this->wpdb->prepare( "SELECT value_id FROM {$this->sync_table_name} INNER JOIN {$this->wpdb->posts} ON(value_id = ID) WHERE meta_key LIKE '_bbp_%' AND value_type = %s GROUP BY value_id ORDER BY value_id DESC LIMIT {$this->max_rows}", 'post' );
|
@@ -1512,7 +911,7 @@ abstract class BBP_Converter_Base {
|
|
1512 |
$has_delete = true;
|
1513 |
}
|
1514 |
|
1515 |
-
/** Delete
|
1516 |
|
1517 |
if ( true === $this->sync_table ) {
|
1518 |
$query = $this->wpdb->prepare( "SELECT value_id FROM {$this->sync_table_name} INNER JOIN {$this->wpdb->users} ON(value_id = ID) WHERE meta_key = %s AND value_type = %s LIMIT {$this->max_rows}", '_bbp_old_user_id', 'user' );
|
@@ -1542,20 +941,18 @@ abstract class BBP_Converter_Base {
|
|
1542 |
*
|
1543 |
* @param int Start row
|
1544 |
*/
|
1545 |
-
public function clean_passwords( $start ) {
|
1546 |
|
1547 |
$has_delete = false;
|
|
|
1548 |
|
1549 |
-
/** Delete bbconverter passwords **************************************/
|
1550 |
-
|
1551 |
-
$query = $this->wpdb->prepare( "SELECT user_id, meta_value FROM {$this->wpdb->usermeta} WHERE meta_key = %s LIMIT {$start}, {$this->max_rows}", '_bbp_password' );
|
1552 |
update_option( '_bbp_converter_query', $query );
|
1553 |
|
1554 |
-
$
|
1555 |
|
1556 |
-
if ( ! empty( $
|
1557 |
|
1558 |
-
foreach ( $
|
1559 |
if ( is_serialized( $value['meta_value'] ) ) {
|
1560 |
$this->wpdb->query( $this->wpdb->prepare( "UPDATE {$this->wpdb->users} SET user_pass = '' WHERE ID = %d", $value['user_id'] ) );
|
1561 |
} else {
|
@@ -1572,7 +969,7 @@ abstract class BBP_Converter_Base {
|
|
1572 |
/**
|
1573 |
* This method implements the authentication for the different forums.
|
1574 |
*
|
1575 |
-
* @param string
|
1576 |
*/
|
1577 |
abstract protected function authenticate_pass( $password, $hash );
|
1578 |
|
@@ -1714,7 +1111,7 @@ abstract class BBP_Converter_Base {
|
|
1714 |
if ( ! is_null( $row ) ) {
|
1715 |
$this->map_userid[ $field ] = $row->value_id;
|
1716 |
} else {
|
1717 |
-
if (
|
1718 |
$this->map_userid[ $field ] = 0;
|
1719 |
} else {
|
1720 |
$this->map_userid[ $field ] = $field;
|
@@ -1771,63 +1168,26 @@ abstract class BBP_Converter_Base {
|
|
1771 |
}
|
1772 |
|
1773 |
protected function callback_negative( $field ) {
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
return $field;
|
1778 |
-
}
|
1779 |
}
|
1780 |
|
1781 |
protected function callback_html( $field ) {
|
1782 |
-
require_once
|
1783 |
$bbcode = BBCode::getInstance();
|
1784 |
return html_entity_decode( $bbcode->Parse( $field ) );
|
1785 |
}
|
1786 |
|
1787 |
protected function callback_null( $field ) {
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
return $field;
|
1792 |
-
}
|
1793 |
}
|
1794 |
|
1795 |
protected function callback_datetime( $field ) {
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
return date( 'Y-m-d H:i:s', strtotime( $field ) );
|
1800 |
-
}
|
1801 |
-
}
|
1802 |
-
}
|
1803 |
-
|
1804 |
-
/**
|
1805 |
-
* This is a function that is purposely written to look like a "new" statement.
|
1806 |
-
* It is basically a dynamic loader that will load in the platform conversion
|
1807 |
-
* of your choice.
|
1808 |
-
*
|
1809 |
-
* @param string $platform Name of valid platform class.
|
1810 |
-
*/
|
1811 |
-
function bbp_new_converter( $platform ) {
|
1812 |
-
$found = false;
|
1813 |
-
|
1814 |
-
if ( $curdir = opendir( bbpress()->admin->admin_dir . 'converters/' ) ) {
|
1815 |
-
while ( $file = readdir( $curdir ) ) {
|
1816 |
-
if ( stristr( $file, '.php' ) && stristr( $file, 'index' ) === FALSE ) {
|
1817 |
-
$file = preg_replace( '/.php/', '', $file );
|
1818 |
-
if ( $platform === $file ) {
|
1819 |
-
$found = true;
|
1820 |
-
continue;
|
1821 |
-
}
|
1822 |
-
}
|
1823 |
-
}
|
1824 |
-
closedir( $curdir );
|
1825 |
-
}
|
1826 |
-
|
1827 |
-
if ( true === $found ) {
|
1828 |
-
require_once( bbpress()->admin->admin_dir . 'converters/' . $platform . '.php' );
|
1829 |
-
return new $platform;
|
1830 |
-
} else {
|
1831 |
-
return null;
|
1832 |
}
|
1833 |
}
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* bbPress Converter Base Class
|
5 |
*
|
6 |
* Based on the hard work of Adam Ellis
|
7 |
*
|
12 |
// Exit if accessed directly
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
* Base class to be extended by specific individual importers
|
17 |
*
|
35 |
protected $opdb;
|
36 |
|
37 |
/**
|
38 |
+
* @var int Maximum number of rows to convert at 1 time. Default 100.
|
39 |
*/
|
40 |
+
protected $max_rows = 100;
|
41 |
|
42 |
/**
|
43 |
* @var array() Map of topic to forum. It is for optimization.
|
79 |
*/
|
80 |
public $sync_table_name;
|
81 |
|
82 |
+
/**
|
83 |
+
* @var bool Whether users should be converted or not. Default false.
|
84 |
+
*/
|
85 |
+
public $convert_users = false;
|
86 |
+
|
87 |
/** Methods ***************************************************************/
|
88 |
|
89 |
/**
|
90 |
* This is the constructor and it connects to the platform databases.
|
91 |
*/
|
92 |
public function __construct() {
|
93 |
+
$this->init();
|
94 |
}
|
95 |
|
96 |
+
/**
|
97 |
+
* Initialize the converter
|
98 |
+
*
|
99 |
+
* @since 2.1.0
|
100 |
+
*/
|
101 |
+
private function init() {
|
102 |
+
|
103 |
+
/** Sanitize Options **************************************************/
|
104 |
+
|
105 |
+
$this->convert_users = ! empty( $_POST['_bbp_converter_convert_users'] )
|
106 |
+
? true
|
107 |
+
: false;
|
108 |
+
|
109 |
+
/** Sanitize Connection ***********************************************/
|
110 |
+
|
111 |
+
$db_user = ! empty( $_POST['_bbp_converter_db_user'] )
|
112 |
+
? sanitize_text_field( $_POST['_bbp_converter_db_user'] )
|
113 |
+
: DB_USER;
|
114 |
+
|
115 |
+
$db_pass = ! empty( $_POST['_bbp_converter_db_pass'] )
|
116 |
+
? sanitize_text_field( $_POST['_bbp_converter_db_pass'] )
|
117 |
+
: DB_PASSWORD;
|
118 |
+
|
119 |
+
$db_name = ! empty( $_POST['_bbp_converter_db_name'] )
|
120 |
+
? sanitize_text_field( $_POST['_bbp_converter_db_name'] )
|
121 |
+
: DB_NAME;
|
122 |
+
|
123 |
+
$db_port = ! empty( $_POST['_bbp_converter_db_port'] )
|
124 |
+
? (int) sanitize_text_field( $_POST['_bbp_converter_db_port'] )
|
125 |
+
: '';
|
126 |
+
|
127 |
+
$db_server = ! empty( $_POST['_bbp_converter_db_server'] )
|
128 |
+
? sanitize_text_field( $_POST['_bbp_converter_db_server'] )
|
129 |
+
: DB_HOST;
|
130 |
+
|
131 |
+
$db_prefix = ! empty( $_POST['_bbp_converter_db_prefix'] )
|
132 |
+
? sanitize_text_field( $_POST['_bbp_converter_db_prefix'] )
|
133 |
+
: '';
|
134 |
+
|
135 |
+
$db_rows = ! empty( $_POST['_bbp_converter_rows'] )
|
136 |
+
? (int) $_POST['_bbp_converter_rows']
|
137 |
+
: 100;
|
138 |
+
|
139 |
+
// Maybe add port to server
|
140 |
+
if ( ! empty( $db_port ) && ! empty( $db_server ) && ! strstr( $db_server, ':' ) ) {
|
141 |
+
$db_server = $db_server . ':' . $db_port;
|
142 |
+
}
|
143 |
|
144 |
/** Get database connections ******************************************/
|
145 |
|
146 |
+
// Setup WordPress Database
|
147 |
+
$this->wpdb = bbp_db();
|
148 |
+
$this->max_rows = $db_rows;
|
149 |
+
|
150 |
+
// Control WPDB db_connect() bailing
|
151 |
+
define( 'WP_SETUP_CONFIG', true );
|
152 |
+
|
153 |
+
// Setup old forum Database
|
154 |
+
$this->opdb = new wpdb( $db_user, $db_pass, $db_name, $db_server );
|
155 |
+
|
156 |
+
// Connection failed
|
157 |
+
if ( ! $this->opdb->db_connect( false ) ) {
|
158 |
+
wp_die( 'bbp_converter_db_connection_failed', esc_html__( 'Database connection failed.', 'bbpress' ) );
|
159 |
+
}
|
160 |
+
|
161 |
+
// Maybe setup the database prefix
|
162 |
+
$this->opdb->prefix = $db_prefix;
|
163 |
|
164 |
/**
|
165 |
* Error Reporting
|
332 |
*/
|
333 |
public function convert_table( $to_type, $start ) {
|
334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
// Set some defaults
|
336 |
$has_insert = false;
|
337 |
$from_tablename = '';
|
380 |
if ( ! empty( $from_tablename ) ) {
|
381 |
|
382 |
// Doing some joining
|
383 |
+
if ( ! in_array( $item['from_tablename'], $from_tables, true ) && in_array( $item['join_tablename'], $from_tables, true ) ) {
|
384 |
$from_tablename .= ' ' . $item['join_type'] . ' JOIN ' . $this->opdb->prefix . $item['from_tablename'] . ' AS ' . $item['from_tablename'] . ' ' . $item['join_expression'];
|
385 |
}
|
386 |
|
440 |
|
441 |
// This row has a destination that matches one of the
|
442 |
// columns in this table.
|
443 |
+
if ( in_array( $row['to_fieldname'], $tablefield_array, true ) ) {
|
444 |
|
445 |
// Allows us to set default fields.
|
446 |
if ( isset( $row['default'] ) ) {
|
448 |
|
449 |
// Translates a field from the old forum.
|
450 |
} elseif ( isset( $row['callback_method'] ) ) {
|
451 |
+
if ( ( 'callback_userid' === $row['callback_method'] ) && ( false === $this->convert_users ) ) {
|
452 |
$insert_post[ $row['to_fieldname'] ] = $forum[ $row['from_fieldname'] ];
|
453 |
} else {
|
454 |
$insert_post[ $row['to_fieldname'] ] = call_user_func_array( array( $this, $row['callback_method'] ), array( $forum[ $row['from_fieldname'] ], $forum ) );
|
469 |
|
470 |
// Translates a field from the old forum.
|
471 |
} elseif ( isset( $row['callback_method'] ) ) {
|
472 |
+
if ( ( $row['callback_method'] === 'callback_userid' ) && ( false === $this->convert_users ) ) {
|
473 |
$insert_postmeta[ $row['to_fieldname'] ] = $forum[ $row['from_fieldname'] ];
|
474 |
} else {
|
475 |
$insert_postmeta[ $row['to_fieldname'] ] = call_user_func_array( array( $this, $row['callback_method'] ), array( $forum[ $row['from_fieldname'] ], $forum ) );
|
595 |
/** Forum, Topic, Reply ***************************/
|
596 |
|
597 |
default:
|
598 |
+
$post_id = wp_insert_post( $insert_post, true );
|
599 |
|
600 |
if ( is_numeric( $post_id ) ) {
|
601 |
|
647 |
}
|
648 |
|
649 |
/**
|
650 |
+
* This method converts old forum hierarchy to new bbPress hierarchy.
|
651 |
*/
|
652 |
+
public function convert_forum_parents( $start = 1 ) {
|
653 |
|
654 |
$has_update = false;
|
655 |
|
681 |
* @uses bbp_stick_topic() to set the imported topic as sticky
|
682 |
*
|
683 |
*/
|
684 |
+
public function convert_topic_stickies( $start = 1 ) {
|
685 |
|
686 |
$has_update = false;
|
687 |
|
712 |
* @uses bbp_stick_topic() to set the imported topic as super sticky
|
713 |
*
|
714 |
*/
|
715 |
+
public function convert_topic_super_stickies( $start = 1 ) {
|
716 |
|
717 |
$has_update = false;
|
718 |
|
743 |
* @uses bbp_close_topic() to close topics properly
|
744 |
*
|
745 |
*/
|
746 |
+
public function convert_topic_closed_topics( $start = 1 ) {
|
747 |
|
748 |
$has_update = false;
|
749 |
|
770 |
*
|
771 |
* @since 2.4.0 bbPress (r5093)
|
772 |
*/
|
773 |
+
public function convert_reply_to_parents( $start = 1 ) {
|
774 |
|
775 |
$has_update = false;
|
776 |
|
800 |
*
|
801 |
* @uses add_post_meta() To add _bbp_anonymous_name topic meta key
|
802 |
*/
|
803 |
+
public function convert_anonymous_topic_authors( $start = 1 ) {
|
804 |
|
805 |
$has_update = false;
|
806 |
|
846 |
*
|
847 |
* @uses add_post_meta() To add _bbp_anonymous_name reply meta key
|
848 |
*/
|
849 |
+
public function convert_anonymous_reply_authors( $start = 1 ) {
|
850 |
|
851 |
$has_update = false;
|
852 |
|
866 |
WHERE wp_postmeta1.meta_value = %s
|
867 |
AND wp_postmeta2.meta_key = %s
|
868 |
LIMIT {$start}, {$this->max_rows}", 'true', '_bbp_old_reply_author_name_id' );
|
|
|
869 |
}
|
870 |
|
871 |
update_option( '_bbp_converter_query', $query );
|
887 |
/**
|
888 |
* This method deletes data from the wp database.
|
889 |
*/
|
890 |
+
public function clean( $start = 1 ) {
|
891 |
|
892 |
+
// Defaults
|
893 |
$has_delete = false;
|
894 |
|
895 |
+
/** Delete topics/forums/posts ****************************************/
|
896 |
|
897 |
if ( true === $this->sync_table ) {
|
898 |
$query = $this->wpdb->prepare( "SELECT value_id FROM {$this->sync_table_name} INNER JOIN {$this->wpdb->posts} ON(value_id = ID) WHERE meta_key LIKE '_bbp_%' AND value_type = %s GROUP BY value_id ORDER BY value_id DESC LIMIT {$this->max_rows}", 'post' );
|
911 |
$has_delete = true;
|
912 |
}
|
913 |
|
914 |
+
/** Delete users ******************************************************/
|
915 |
|
916 |
if ( true === $this->sync_table ) {
|
917 |
$query = $this->wpdb->prepare( "SELECT value_id FROM {$this->sync_table_name} INNER JOIN {$this->wpdb->users} ON(value_id = ID) WHERE meta_key = %s AND value_type = %s LIMIT {$this->max_rows}", '_bbp_old_user_id', 'user' );
|
941 |
*
|
942 |
* @param int Start row
|
943 |
*/
|
944 |
+
public function clean_passwords( $start = 1 ) {
|
945 |
|
946 |
$has_delete = false;
|
947 |
+
$query = $this->wpdb->prepare( "SELECT user_id, meta_value FROM {$this->wpdb->usermeta} WHERE meta_key = %s LIMIT {$start}, {$this->max_rows}", '_bbp_password' );
|
948 |
|
|
|
|
|
|
|
949 |
update_option( '_bbp_converter_query', $query );
|
950 |
|
951 |
+
$converted = $this->wpdb->get_results( $query, ARRAY_A );
|
952 |
|
953 |
+
if ( ! empty( $converted ) ) {
|
954 |
|
955 |
+
foreach ( $converted as $value ) {
|
956 |
if ( is_serialized( $value['meta_value'] ) ) {
|
957 |
$this->wpdb->query( $this->wpdb->prepare( "UPDATE {$this->wpdb->users} SET user_pass = '' WHERE ID = %d", $value['user_id'] ) );
|
958 |
} else {
|
969 |
/**
|
970 |
* This method implements the authentication for the different forums.
|
971 |
*
|
972 |
+
* @param string Un-encoded password.
|
973 |
*/
|
974 |
abstract protected function authenticate_pass( $password, $hash );
|
975 |
|
1111 |
if ( ! is_null( $row ) ) {
|
1112 |
$this->map_userid[ $field ] = $row->value_id;
|
1113 |
} else {
|
1114 |
+
if ( true === $this->convert_users ) {
|
1115 |
$this->map_userid[ $field ] = 0;
|
1116 |
} else {
|
1117 |
$this->map_userid[ $field ] = $field;
|
1168 |
}
|
1169 |
|
1170 |
protected function callback_negative( $field ) {
|
1171 |
+
return ( $field < 0 )
|
1172 |
+
? 0
|
1173 |
+
: $field;
|
|
|
|
|
1174 |
}
|
1175 |
|
1176 |
protected function callback_html( $field ) {
|
1177 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
1178 |
$bbcode = BBCode::getInstance();
|
1179 |
return html_entity_decode( $bbcode->Parse( $field ) );
|
1180 |
}
|
1181 |
|
1182 |
protected function callback_null( $field ) {
|
1183 |
+
return is_null( $field )
|
1184 |
+
? ''
|
1185 |
+
: $field;
|
|
|
|
|
1186 |
}
|
1187 |
|
1188 |
protected function callback_datetime( $field ) {
|
1189 |
+
return is_numeric( $field )
|
1190 |
+
? date( 'Y-m-d H:i:s', $field )
|
1191 |
+
: date( 'Y-m-d H:i:s', strtotime( $field ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1192 |
}
|
1193 |
}
|
includes/admin/classes/class-bbp-converter.php
ADDED
@@ -0,0 +1,689 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Converter
|
5 |
+
*
|
6 |
+
* Based on the hard work of Adam Ellis
|
7 |
+
*
|
8 |
+
* @package bbPress
|
9 |
+
* @subpackage Administration
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
defined( 'ABSPATH' ) || exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Main BBP_Converter Class
|
17 |
+
*/
|
18 |
+
class BBP_Converter {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var int Number of rows
|
22 |
+
*/
|
23 |
+
public $max = 0;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var int Start
|
27 |
+
*/
|
28 |
+
public $min = 0;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var int Step in converter process
|
32 |
+
*/
|
33 |
+
public $step = 0;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var int Number of rows
|
37 |
+
*/
|
38 |
+
public $rows = 0;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var BBP_Converter_Base Type of converter to use
|
42 |
+
*/
|
43 |
+
public $converter = null;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* The main bbPress Converter loader
|
47 |
+
*
|
48 |
+
* @since 2.1.0 bbPress (r3813)
|
49 |
+
*
|
50 |
+
* @uses BBP_Converter::includes() Include the required files
|
51 |
+
* @uses BBP_Converter::setup_actions() Setup the actions
|
52 |
+
*/
|
53 |
+
public function __construct() {
|
54 |
+
$this->setup_actions();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Setup the default actions
|
59 |
+
*
|
60 |
+
* @since 2.1.0 bbPress (r3813)
|
61 |
+
*
|
62 |
+
* @uses add_action() To add various actions
|
63 |
+
*/
|
64 |
+
public function setup_actions() {
|
65 |
+
|
66 |
+
// Attach to the admin head with our ajax requests cycle and css
|
67 |
+
add_action( 'admin_head-tools_page_bbp-converter', array( $this, 'admin_head' ) );
|
68 |
+
|
69 |
+
// Attach the bbConverter admin settings action to the WordPress admin init action.
|
70 |
+
add_action( 'load-tools_page_bbp-converter', array( $this, 'register_admin_settings' ) );
|
71 |
+
|
72 |
+
// Attach to the admin ajax request to process cycles
|
73 |
+
add_action( 'wp_ajax_bbp_converter_process', array( $this, 'process_callback' ) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Register the settings
|
78 |
+
*
|
79 |
+
* @since 2.1.0 bbPress (r3813)
|
80 |
+
*
|
81 |
+
* @uses add_settings_section() To add our own settings section
|
82 |
+
* @uses add_settings_field() To add various settings fields
|
83 |
+
* @uses register_setting() To register various settings
|
84 |
+
*/
|
85 |
+
public function register_admin_settings() {
|
86 |
+
|
87 |
+
// Add the main section
|
88 |
+
add_settings_section( 'bbpress_converter_main', esc_html__( 'Database Settings', 'bbpress' ), 'bbp_converter_setting_callback_main_section', 'bbpress_converter' );
|
89 |
+
|
90 |
+
// System Select
|
91 |
+
add_settings_field( '_bbp_converter_platform', esc_html__( 'Select Platform', 'bbpress' ), 'bbp_converter_setting_callback_platform', 'bbpress_converter', 'bbpress_converter_main' );
|
92 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_platform', 'sanitize_title' );
|
93 |
+
|
94 |
+
// Database Server
|
95 |
+
add_settings_field( '_bbp_converter_db_server', esc_html__( 'Database Server', 'bbpress' ), 'bbp_converter_setting_callback_dbserver', 'bbpress_converter', 'bbpress_converter_main' );
|
96 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_server', 'sanitize_title' );
|
97 |
+
|
98 |
+
// Database Server Port
|
99 |
+
add_settings_field( '_bbp_converter_db_port', esc_html__( 'Database Port', 'bbpress' ), 'bbp_converter_setting_callback_dbport', 'bbpress_converter', 'bbpress_converter_main' );
|
100 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_port', 'sanitize_title' );
|
101 |
+
|
102 |
+
// Database Name
|
103 |
+
add_settings_field( '_bbp_converter_db_name', esc_html__( 'Database Name', 'bbpress' ), 'bbp_converter_setting_callback_dbname', 'bbpress_converter', 'bbpress_converter_main' );
|
104 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_name', 'sanitize_title' );
|
105 |
+
|
106 |
+
// Database User
|
107 |
+
add_settings_field( '_bbp_converter_db_user', esc_html__( 'Database User', 'bbpress' ), 'bbp_converter_setting_callback_dbuser', 'bbpress_converter', 'bbpress_converter_main' );
|
108 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_user', 'sanitize_title' );
|
109 |
+
|
110 |
+
// Database Pass
|
111 |
+
add_settings_field( '_bbp_converter_db_pass', esc_html__( 'Database Password', 'bbpress' ), 'bbp_converter_setting_callback_dbpass', 'bbpress_converter', 'bbpress_converter_main' );
|
112 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_pass', 'sanitize_title' );
|
113 |
+
|
114 |
+
// Database Prefix
|
115 |
+
add_settings_field( '_bbp_converter_db_prefix', esc_html__( 'Table Prefix', 'bbpress' ), 'bbp_converter_setting_callback_dbprefix', 'bbpress_converter', 'bbpress_converter_main' );
|
116 |
+
register_setting ( 'bbpress_converter_main', '_bbp_converter_db_prefix', 'sanitize_title' );
|
117 |
+
|
118 |
+
// Add the options section
|
119 |
+
add_settings_section( 'bbpress_converter_opt', esc_html__( 'Options', 'bbpress' ), 'bbp_converter_setting_callback_options_section', 'bbpress_converter' );
|
120 |
+
|
121 |
+
// Rows Limit
|
122 |
+
add_settings_field( '_bbp_converter_rows', esc_html__( 'Rows Limit', 'bbpress' ), 'bbp_converter_setting_callback_rows', 'bbpress_converter', 'bbpress_converter_opt' );
|
123 |
+
register_setting ( 'bbpress_converter_opt', '_bbp_converter_rows', 'intval' );
|
124 |
+
|
125 |
+
// Delay Time
|
126 |
+
add_settings_field( '_bbp_converter_delay_time', esc_html__( 'Delay Time', 'bbpress' ), 'bbp_converter_setting_callback_delay_time', 'bbpress_converter', 'bbpress_converter_opt' );
|
127 |
+
register_setting ( 'bbpress_converter_opt', '_bbp_converter_delay_time', 'intval' );
|
128 |
+
|
129 |
+
// Convert Users ?
|
130 |
+
add_settings_field( '_bbp_converter_convert_users', esc_html__( 'Convert Users', 'bbpress' ), 'bbp_converter_setting_callback_convert_users', 'bbpress_converter', 'bbpress_converter_opt' );
|
131 |
+
register_setting ( 'bbpress_converter_opt', '_bbp_converter_convert_users', 'intval' );
|
132 |
+
|
133 |
+
// Restart
|
134 |
+
add_settings_field( '_bbp_converter_restart', esc_html__( 'Start Over', 'bbpress' ), 'bbp_converter_setting_callback_restart', 'bbpress_converter', 'bbpress_converter_opt' );
|
135 |
+
register_setting ( 'bbpress_converter_opt', '_bbp_converter_restart', 'intval' );
|
136 |
+
|
137 |
+
// Clean
|
138 |
+
add_settings_field( '_bbp_converter_clean', esc_html__( 'Purge Previous Import', 'bbpress' ), 'bbp_converter_setting_callback_clean', 'bbpress_converter', 'bbpress_converter_opt' );
|
139 |
+
register_setting ( 'bbpress_converter_opt', '_bbp_converter_clean', 'intval' );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Admin scripts
|
144 |
+
*
|
145 |
+
* @since 2.1.0 bbPress (r3813)
|
146 |
+
*/
|
147 |
+
public function admin_head() {
|
148 |
+
|
149 |
+
// Variables
|
150 |
+
$bbp = bbpress();
|
151 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
152 |
+
$repair_url = add_query_arg( array(
|
153 |
+
'page' => 'bbp-repair'
|
154 |
+
), admin_url() );
|
155 |
+
|
156 |
+
// Enqueue scripts
|
157 |
+
wp_enqueue_script( 'postbox' );
|
158 |
+
wp_enqueue_script( 'dashboard' );
|
159 |
+
wp_enqueue_script( 'bbp-converter', $bbp->admin->js_url . 'converter' . $suffix . '.js', array( 'jquery', 'postbox' ), $bbp->asset_version );
|
160 |
+
|
161 |
+
// Localize JS
|
162 |
+
wp_localize_script( 'bbp-converter', 'BBP_Converter', array(
|
163 |
+
|
164 |
+
// Vars
|
165 |
+
'ajax_nonce' => wp_create_nonce( 'bbp_converter_process' ),
|
166 |
+
'halt' => (bool) defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY,
|
167 |
+
'started' => (bool) get_option( '_bbp_converter_step', false ),
|
168 |
+
'running' => false,
|
169 |
+
'complete' => false,
|
170 |
+
'delay' => 0,
|
171 |
+
|
172 |
+
// Strings
|
173 |
+
'strings' => array(
|
174 |
+
|
175 |
+
// Button text
|
176 |
+
'button_start' => esc_html__( 'Start', 'bbpress' ),
|
177 |
+
'button_continue' => esc_html__( 'Continue', 'bbpress' ),
|
178 |
+
|
179 |
+
// Start button clicked
|
180 |
+
'start_start' => esc_html__( 'Starting Import', 'bbpress' ),
|
181 |
+
'start_continue' => esc_html__( 'Continuing Import', 'bbpress' ),
|
182 |
+
|
183 |
+
// Import
|
184 |
+
'import_success' => sprintf( esc_html__( 'Repair any missing information: %s', 'bbpress' ), '<a href="' . esc_url( $repair_url ) . '">' . esc_html__( 'Continue', 'bbpress' ) . '</a>' ),
|
185 |
+
'import_complete' => esc_html__( 'Import Finished', 'bbpress' ),
|
186 |
+
'import_stopped_user' => esc_html__( 'Import Stopped (by User)', 'bbpress' ),
|
187 |
+
'import_error_db' => esc_html__( 'Database Connection Failed', 'bbpress' ),
|
188 |
+
'import_error_halt' => esc_html__( 'Import Halted (Error)', 'bbpress' ),
|
189 |
+
)
|
190 |
+
) );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Callback processor
|
195 |
+
*
|
196 |
+
* @since 2.1.0 bbPress (r3813)
|
197 |
+
*/
|
198 |
+
public function process_callback() {
|
199 |
+
|
200 |
+
// Ready the converter
|
201 |
+
$this->check_access();
|
202 |
+
$this->maybe_set_memory();
|
203 |
+
$this->maybe_restart();
|
204 |
+
$this->setup_options();
|
205 |
+
|
206 |
+
// Bail if no converter
|
207 |
+
if ( ! empty( $this->converter ) ) {
|
208 |
+
$this->do_steps();
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Wrap the converter output in paragraph tags, so styling can be applied
|
214 |
+
*
|
215 |
+
* @since 2.1.0 bbPress (r4052)
|
216 |
+
*
|
217 |
+
* @param string $output
|
218 |
+
*/
|
219 |
+
private function converter_output( $output = '' ) {
|
220 |
+
|
221 |
+
// Maybe include last query
|
222 |
+
$query = get_option( '_bbp_converter_query' );
|
223 |
+
if ( ! empty( $query ) ) {
|
224 |
+
$output = $output . '<span class="query">' . esc_attr( $query ) . '</span>';
|
225 |
+
}
|
226 |
+
|
227 |
+
// Maybe prepend the step
|
228 |
+
$step = ! empty( $this->step )
|
229 |
+
? sprintf( '<span class="step">%s:</span> ', $this->step )
|
230 |
+
: '';
|
231 |
+
|
232 |
+
// Output
|
233 |
+
echo $step . $output;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Attempt to increase memory and set other system settings
|
238 |
+
*
|
239 |
+
* @since 2.6.0 bbPress (r6460)
|
240 |
+
*/
|
241 |
+
private function maybe_set_memory() {
|
242 |
+
if ( ! ini_get( 'safe_mode' ) ) {
|
243 |
+
set_time_limit( 0 );
|
244 |
+
ini_set( 'memory_limit', '256M' );
|
245 |
+
ini_set( 'implicit_flush', '1' );
|
246 |
+
ignore_user_abort( true );
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Maybe restart the converter
|
252 |
+
*
|
253 |
+
* @since 2.6.0 bbPress (r6460)
|
254 |
+
*/
|
255 |
+
private function maybe_restart() {
|
256 |
+
|
257 |
+
// Save step and count so that it can be restarted.
|
258 |
+
if ( ! get_option( '_bbp_converter_step' ) || ! empty( $_POST['_bbp_converter_restart'] ) ) {
|
259 |
+
update_option( '_bbp_converter_step', 0 );
|
260 |
+
update_option( '_bbp_converter_start', 0 );
|
261 |
+
|
262 |
+
$this->step = 0;
|
263 |
+
$this->start = 0;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Setup converter options
|
269 |
+
*
|
270 |
+
* @since 2.6.0 bbPress (r6460)
|
271 |
+
*/
|
272 |
+
private function setup_options() {
|
273 |
+
|
274 |
+
// Get starting point
|
275 |
+
$this->step = (int) get_option( '_bbp_converter_step', 1 );
|
276 |
+
$this->min = (int) get_option( '_bbp_converter_start', 0 );
|
277 |
+
|
278 |
+
// Number of rows
|
279 |
+
$this->rows = ! empty( $_POST['_bbp_converter_rows'] )
|
280 |
+
? (int) $_POST['_bbp_converter_rows']
|
281 |
+
: 100;
|
282 |
+
|
283 |
+
// Get boundaries
|
284 |
+
$this->max = ( $this->min + $this->rows ) - 1;
|
285 |
+
$this->start = $this->min;
|
286 |
+
|
287 |
+
// Look for platform
|
288 |
+
$platform = ! empty( $_POST['_bbp_converter_platform' ] )
|
289 |
+
? sanitize_text_field( $_POST['_bbp_converter_platform' ] )
|
290 |
+
: get_option( '_bbp_converter_platform' );
|
291 |
+
|
292 |
+
// Maybe include the appropriate converter.
|
293 |
+
if ( ! empty( $platform ) ) {
|
294 |
+
$this->converter = bbp_new_converter( $platform );
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Check that user can access the converter
|
300 |
+
*
|
301 |
+
* @since 2.6.0 bbPress (r6460)
|
302 |
+
*/
|
303 |
+
private function check_access() {
|
304 |
+
|
305 |
+
// Bail if user cannot view import page
|
306 |
+
if ( ! current_user_can( 'bbp_tools_import_page' ) ) {
|
307 |
+
wp_die( '0' );
|
308 |
+
}
|
309 |
+
|
310 |
+
// Verify intent
|
311 |
+
check_ajax_referer( 'bbp_converter_process' );
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Reset the converter
|
316 |
+
*
|
317 |
+
* @since 2.6.0 bbPress (r6460)
|
318 |
+
*/
|
319 |
+
private function reset() {
|
320 |
+
delete_option( '_bbp_converter_step' );
|
321 |
+
delete_option( '_bbp_converter_start' );
|
322 |
+
delete_option( '_bbp_converter_query' );
|
323 |
+
|
324 |
+
$this->start = 0;
|
325 |
+
$this->step = 0;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Bump the step and reset the start
|
330 |
+
*
|
331 |
+
* @since 2.6.0 bbPress (r6460)
|
332 |
+
*/
|
333 |
+
private function bump_step() {
|
334 |
+
update_option( '_bbp_converter_step', $this->step + 1 );
|
335 |
+
update_option( '_bbp_converter_start', 0 );
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Bump the start within the current step
|
340 |
+
*
|
341 |
+
* @since 2.6.0 bbPress (r6460)
|
342 |
+
*/
|
343 |
+
private function bump_start() {
|
344 |
+
update_option( '_bbp_converter_start', $this->max + 1 );
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Do the converter step
|
349 |
+
*
|
350 |
+
* @since 2.6.0 bbPress (r6460)
|
351 |
+
*/
|
352 |
+
private function do_steps() {
|
353 |
+
|
354 |
+
switch ( $this->step ) {
|
355 |
+
|
356 |
+
// STEP 1. Clean all tables.
|
357 |
+
case 1 :
|
358 |
+
if ( ! empty( $_POST['_bbp_converter_clean'] ) ) {
|
359 |
+
if ( $this->converter->clean( $this->start ) ) {
|
360 |
+
$this->sync_table( true );
|
361 |
+
$this->bump_step();
|
362 |
+
|
363 |
+
if ( empty( $this->start ) ) {
|
364 |
+
$this->converter_output( esc_html__( 'Recreating sync-table', 'bbpress' ) );
|
365 |
+
}
|
366 |
+
} else {
|
367 |
+
$this->converter_output( sprintf( esc_html__( 'Deleting previously converted data (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
368 |
+
$this->bump_start();
|
369 |
+
}
|
370 |
+
} else {
|
371 |
+
$this->converter_output( esc_html__( 'Skipping sync-table clean-up', 'bbpress' ) );
|
372 |
+
$this->sync_table( false );
|
373 |
+
$this->bump_step();
|
374 |
+
}
|
375 |
+
|
376 |
+
break;
|
377 |
+
|
378 |
+
// STEP 2. Convert users.
|
379 |
+
case 2 :
|
380 |
+
if ( true === $this->converter->convert_users ) {
|
381 |
+
if ( $this->converter->convert_users( $this->start ) ) {
|
382 |
+
$this->bump_step();
|
383 |
+
|
384 |
+
if ( empty( $this->start ) ) {
|
385 |
+
$this->converter_output( esc_html__( 'No users to import', 'bbpress' ) );
|
386 |
+
}
|
387 |
+
} else {
|
388 |
+
$this->bump_start();
|
389 |
+
$this->converter_output( sprintf( esc_html__( 'Converting users (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
390 |
+
}
|
391 |
+
} else {
|
392 |
+
$this->bump_step();
|
393 |
+
$this->converter_output( esc_html__( 'Skipping user clean-up', 'bbpress' ) );
|
394 |
+
}
|
395 |
+
|
396 |
+
break;
|
397 |
+
|
398 |
+
// STEP 3. Clean passwords.
|
399 |
+
case 3 :
|
400 |
+
if ( true === $this->converter->convert_users ) {
|
401 |
+
if ( $this->converter->clean_passwords( $this->start ) ) {
|
402 |
+
$this->bump_step();
|
403 |
+
|
404 |
+
if ( empty( $this->start ) ) {
|
405 |
+
$this->converter_output( esc_html__( 'No passwords to clear', 'bbpress' ) );
|
406 |
+
}
|
407 |
+
} else {
|
408 |
+
$this->bump_start();
|
409 |
+
$this->converter_output( sprintf( esc_html__( 'Delete users WordPress default passwords (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
410 |
+
}
|
411 |
+
} else {
|
412 |
+
$this->bump_step();
|
413 |
+
$this->converter_output( esc_html__( 'Skipping password clean-up', 'bbpress' ) );
|
414 |
+
}
|
415 |
+
|
416 |
+
break;
|
417 |
+
|
418 |
+
// STEP 4. Convert forums.
|
419 |
+
case 4 :
|
420 |
+
if ( $this->converter->convert_forums( $this->start ) ) {
|
421 |
+
$this->bump_step();
|
422 |
+
|
423 |
+
if ( empty( $this->start ) ) {
|
424 |
+
$this->converter_output( esc_html__( 'No forums to import', 'bbpress' ) );
|
425 |
+
}
|
426 |
+
} else {
|
427 |
+
$this->bump_start();
|
428 |
+
$this->converter_output( sprintf( esc_html__( 'Converting forums (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
429 |
+
}
|
430 |
+
|
431 |
+
break;
|
432 |
+
|
433 |
+
// STEP 5. Convert forum parents.
|
434 |
+
case 5 :
|
435 |
+
if ( $this->converter->convert_forum_parents( $this->start ) ) {
|
436 |
+
$this->bump_step();
|
437 |
+
|
438 |
+
if ( empty( $this->start ) ) {
|
439 |
+
$this->converter_output( esc_html__( 'No forum parents to import', 'bbpress' ) );
|
440 |
+
}
|
441 |
+
} else {
|
442 |
+
$this->bump_start();
|
443 |
+
$this->converter_output( sprintf( esc_html__( 'Calculating forum hierarchy (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
444 |
+
}
|
445 |
+
|
446 |
+
break;
|
447 |
+
|
448 |
+
// STEP 6. Convert forum subscriptions.
|
449 |
+
case 6 :
|
450 |
+
if ( $this->converter->convert_forum_subscriptions( $this->start ) ) {
|
451 |
+
$this->bump_step();
|
452 |
+
|
453 |
+
if ( empty( $this->start ) ) {
|
454 |
+
$this->converter_output( esc_html__( 'No forum subscriptions to import', 'bbpress' ) );
|
455 |
+
}
|
456 |
+
} else {
|
457 |
+
$this->bump_start();
|
458 |
+
$this->converter_output( sprintf( esc_html__( 'Converting forum subscriptions (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
459 |
+
}
|
460 |
+
|
461 |
+
break;
|
462 |
+
|
463 |
+
// STEP 7. Convert topics.
|
464 |
+
case 7 :
|
465 |
+
if ( $this->converter->convert_topics( $this->start ) ) {
|
466 |
+
$this->bump_step();
|
467 |
+
|
468 |
+
if ( empty( $this->start ) ) {
|
469 |
+
$this->converter_output( esc_html__( 'No topics to import', 'bbpress' ) );
|
470 |
+
}
|
471 |
+
} else {
|
472 |
+
$this->bump_start();
|
473 |
+
$this->converter_output( sprintf( esc_html__( 'Converting topics (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
474 |
+
}
|
475 |
+
|
476 |
+
break;
|
477 |
+
|
478 |
+
// STEP 8. Convert anonymous topic authors.
|
479 |
+
case 8 :
|
480 |
+
if ( $this->converter->convert_anonymous_topic_authors( $this->start ) ) {
|
481 |
+
$this->bump_step();
|
482 |
+
|
483 |
+
if ( empty( $this->start ) ) {
|
484 |
+
$this->converter_output( esc_html__( 'No anonymous topic authors to import', 'bbpress' ) );
|
485 |
+
}
|
486 |
+
} else {
|
487 |
+
$this->bump_start();
|
488 |
+
$this->converter_output( sprintf( esc_html__( 'Converting anonymous topic authors (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
489 |
+
}
|
490 |
+
|
491 |
+
break;
|
492 |
+
|
493 |
+
// STEP 9. Stick topics.
|
494 |
+
case 9 :
|
495 |
+
if ( $this->converter->convert_topic_stickies( $this->start ) ) {
|
496 |
+
$this->bump_step();
|
497 |
+
|
498 |
+
if ( empty( $this->start ) ) {
|
499 |
+
$this->converter_output( esc_html__( 'No stickies to stick', 'bbpress' ) );
|
500 |
+
}
|
501 |
+
} else {
|
502 |
+
$this->bump_start();
|
503 |
+
$this->converter_output( sprintf( esc_html__( 'Calculating topic stickies (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
504 |
+
}
|
505 |
+
|
506 |
+
break;
|
507 |
+
|
508 |
+
// STEP 10. Stick to front topics (Super Sicky).
|
509 |
+
case 10 :
|
510 |
+
if ( $this->converter->convert_topic_super_stickies( $this->start ) ) {
|
511 |
+
$this->bump_step();
|
512 |
+
|
513 |
+
if ( empty( $this->start ) ) {
|
514 |
+
$this->converter_output( esc_html__( 'No super stickies to stick', 'bbpress' ) );
|
515 |
+
}
|
516 |
+
} else {
|
517 |
+
$this->bump_start();
|
518 |
+
$this->converter_output( sprintf( esc_html__( 'Calculating topic super stickies (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
519 |
+
}
|
520 |
+
|
521 |
+
break;
|
522 |
+
|
523 |
+
// STEP 11. Closed topics.
|
524 |
+
case 11 :
|
525 |
+
if ( $this->converter->convert_topic_closed_topics( $this->start ) ) {
|
526 |
+
$this->bump_step();
|
527 |
+
|
528 |
+
if ( empty( $this->start ) ) {
|
529 |
+
$this->converter_output( esc_html__( 'No closed topics to close', 'bbpress' ) );
|
530 |
+
}
|
531 |
+
} else {
|
532 |
+
$this->bump_start();
|
533 |
+
$this->converter_output( sprintf( esc_html__( 'Calculating closed topics (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
534 |
+
}
|
535 |
+
|
536 |
+
break;
|
537 |
+
|
538 |
+
// STEP 12. Convert topic tags.
|
539 |
+
case 12 :
|
540 |
+
if ( $this->converter->convert_tags( $this->start ) ) {
|
541 |
+
$this->bump_step();
|
542 |
+
|
543 |
+
if ( empty( $this->start ) ) {
|
544 |
+
$this->converter_output( esc_html__( 'No topic tags to import', 'bbpress' ) );
|
545 |
+
}
|
546 |
+
} else {
|
547 |
+
$this->bump_start();
|
548 |
+
$this->converter_output( sprintf( esc_html__( 'Converting topic tags (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
549 |
+
}
|
550 |
+
|
551 |
+
break;
|
552 |
+
|
553 |
+
// STEP 13. Convert topic subscriptions.
|
554 |
+
case 13 :
|
555 |
+
if ( $this->converter->convert_topic_subscriptions( $this->start ) ) {
|
556 |
+
$this->bump_step();
|
557 |
+
|
558 |
+
if ( empty( $this->start ) ) {
|
559 |
+
$this->converter_output( esc_html__( 'No topic subscriptions to import', 'bbpress' ) );
|
560 |
+
}
|
561 |
+
} else {
|
562 |
+
$this->bump_start();
|
563 |
+
$this->converter_output( sprintf( esc_html__( 'Converting topic subscriptions (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
564 |
+
}
|
565 |
+
|
566 |
+
break;
|
567 |
+
|
568 |
+
// STEP 14. Convert topic favorites.
|
569 |
+
case 14 :
|
570 |
+
if ( $this->converter->convert_favorites( $this->start ) ) {
|
571 |
+
$this->bump_step();
|
572 |
+
|
573 |
+
if ( empty( $this->start ) ) {
|
574 |
+
$this->converter_output( esc_html__( 'No favorites to import', 'bbpress' ) );
|
575 |
+
}
|
576 |
+
} else {
|
577 |
+
$this->bump_start();
|
578 |
+
$this->converter_output( sprintf( esc_html__( 'Converting favorites (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
579 |
+
}
|
580 |
+
|
581 |
+
break;
|
582 |
+
|
583 |
+
// STEP 15. Convert replies.
|
584 |
+
case 15 :
|
585 |
+
if ( $this->converter->convert_replies( $this->start ) ) {
|
586 |
+
$this->bump_step();
|
587 |
+
|
588 |
+
if ( empty( $this->start ) ) {
|
589 |
+
$this->converter_output( esc_html__( 'No replies to import', 'bbpress' ) );
|
590 |
+
}
|
591 |
+
} else {
|
592 |
+
$this->bump_start();
|
593 |
+
$this->converter_output( sprintf( esc_html__( 'Converting replies (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
594 |
+
}
|
595 |
+
|
596 |
+
break;
|
597 |
+
|
598 |
+
// STEP 16. Convert anonymous reply authors.
|
599 |
+
case 16 :
|
600 |
+
if ( $this->converter->convert_anonymous_reply_authors( $this->start ) ) {
|
601 |
+
$this->bump_step();
|
602 |
+
|
603 |
+
if ( empty( $this->start ) ) {
|
604 |
+
$this->converter_output( esc_html__( 'No anonymous reply authors to import', 'bbpress' ) );
|
605 |
+
}
|
606 |
+
} else {
|
607 |
+
$this->bump_start();
|
608 |
+
$this->converter_output( sprintf( esc_html__( 'Converting anonymous reply authors (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
609 |
+
}
|
610 |
+
|
611 |
+
break;
|
612 |
+
|
613 |
+
// STEP 17. Convert threaded replies parents.
|
614 |
+
case 17 :
|
615 |
+
if ( $this->converter->convert_reply_to_parents( $this->start ) ) {
|
616 |
+
$this->bump_step();
|
617 |
+
|
618 |
+
if ( empty( $this->start ) ) {
|
619 |
+
$this->converter_output( esc_html__( 'No threaded replies to import', 'bbpress' ) );
|
620 |
+
}
|
621 |
+
} else {
|
622 |
+
$this->bump_start();
|
623 |
+
$this->converter_output( sprintf( esc_html__( 'Calculating threaded replies parents (%1$s - %2$s)', 'bbpress' ), $this->min, $this->max ) );
|
624 |
+
}
|
625 |
+
|
626 |
+
break;
|
627 |
+
|
628 |
+
// Done
|
629 |
+
default :
|
630 |
+
$this->reset();
|
631 |
+
$this->converter_output( esc_html__( 'Import Finished', 'bbpress' ) );
|
632 |
+
|
633 |
+
break;
|
634 |
+
}
|
635 |
+
}
|
636 |
+
|
637 |
+
/**
|
638 |
+
* Create Tables for fast syncing
|
639 |
+
*
|
640 |
+
* @since 2.1.0 bbPress (r3813)
|
641 |
+
*/
|
642 |
+
public function sync_table( $drop = false ) {
|
643 |
+
|
644 |
+
// Setup DB
|
645 |
+
$bbp_db = bbp_db();
|
646 |
+
$table_name = $bbp_db->prefix . 'bbp_converter_translator';
|
647 |
+
$table_exists = $bbp_db->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name;
|
648 |
+
|
649 |
+
// Maybe drop the sync table
|
650 |
+
if ( ( true === $drop ) && ( true === $table_exists ) ) {
|
651 |
+
$bbp_db->query( "DROP TABLE {$table_name}" );
|
652 |
+
}
|
653 |
+
|
654 |
+
// Maybe include the upgrade functions, for dbDelta()
|
655 |
+
if ( ! function_exists( 'dbDelta' ) ) {
|
656 |
+
require_once ABSPATH . '/wp-admin/includes/upgrade.php';
|
657 |
+
}
|
658 |
+
|
659 |
+
// Defaults
|
660 |
+
$sql = array();
|
661 |
+
$max_index_length = 191;
|
662 |
+
$charset_collate = '';
|
663 |
+
|
664 |
+
// Maybe override the character set
|
665 |
+
if ( ! empty( $bbp_db->charset ) ) {
|
666 |
+
$charset_collate .= "DEFAULT CHARACTER SET {$bbp_db->charset}";
|
667 |
+
}
|
668 |
+
|
669 |
+
// Maybe override the collation
|
670 |
+
if ( ! empty( $bbp_db->collate ) ) {
|
671 |
+
$charset_collate .= " COLLATE {$bbp_db->collate}";
|
672 |
+
}
|
673 |
+
|
674 |
+
/** Translator ********************************************************/
|
675 |
+
|
676 |
+
$sql[] = "CREATE TABLE {$table_name} (
|
677 |
+
meta_id mediumint(8) unsigned not null auto_increment,
|
678 |
+
value_type varchar(25) null,
|
679 |
+
value_id bigint(20) unsigned not null default '0',
|
680 |
+
meta_key varchar({$max_index_length}) null,
|
681 |
+
meta_value varchar({$max_index_length}) null,
|
682 |
+
PRIMARY KEY (meta_id),
|
683 |
+
KEY value_id (value_id),
|
684 |
+
KEY meta_join (meta_key({$max_index_length}), meta_value({$max_index_length}))
|
685 |
+
) {$charset_collate}";
|
686 |
+
|
687 |
+
dbDelta( $sql );
|
688 |
+
}
|
689 |
+
}
|
includes/admin/{list-tables/topic-replies.php → classes/class-bbp-topic-replies-list-table.php}
RENAMED
@@ -13,7 +13,7 @@
|
|
13 |
|
14 |
// Include the main list table class if it's not included yet
|
15 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
16 |
-
require_once
|
17 |
}
|
18 |
|
19 |
if ( class_exists( 'WP_List_Table' ) ) :
|
@@ -21,7 +21,7 @@ if ( class_exists( 'WP_List_Table' ) ) :
|
|
21 |
* Topic replies list table
|
22 |
*
|
23 |
* This list table is responsible for showing the replies to a topic in a
|
24 |
-
*
|
25 |
*
|
26 |
* @since 2.6.0 bbPress (r5886)
|
27 |
*/
|
@@ -34,15 +34,15 @@ class BBP_Topic_Replies_List_Table extends WP_List_Table {
|
|
34 |
*/
|
35 |
public function __construct( $args = array() ) {
|
36 |
$args = array(
|
37 |
-
'singular' =>
|
38 |
-
'plural' =>
|
39 |
-
'ajax' =>
|
40 |
);
|
41 |
parent::__construct( $args );
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
* Setup the list-table
|
46 |
*
|
47 |
* @since 2.6.0 bbPress (r5886)
|
48 |
*
|
@@ -55,7 +55,7 @@ class BBP_Topic_Replies_List_Table extends WP_List_Table {
|
|
55 |
//'cb' => '<input type="checkbox" />',
|
56 |
'bbp_topic_reply_author' => esc_html__( 'Author', 'bbpress' ),
|
57 |
'bbp_reply_content' => esc_html__( 'Content', 'bbpress' ),
|
58 |
-
'bbp_reply_created' => esc_html__( 'Replied',
|
59 |
);
|
60 |
}
|
61 |
|
@@ -91,7 +91,7 @@ class BBP_Topic_Replies_List_Table extends WP_List_Table {
|
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
-
* Output the
|
95 |
*
|
96 |
* @since 2.6.0 bbPress (r5886)
|
97 |
*/
|
@@ -201,8 +201,8 @@ class BBP_Topic_Replies_List_Table extends WP_List_Table {
|
|
201 |
// Query parameters
|
202 |
$per_page = 5;
|
203 |
$current_page = $this->get_pagenum();
|
204 |
-
$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'date';
|
205 |
-
$order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc';
|
206 |
|
207 |
// Query for replies
|
208 |
$reply_query = new WP_Query( array(
|
13 |
|
14 |
// Include the main list table class if it's not included yet
|
15 |
if ( ! class_exists( 'WP_List_Table' ) ) {
|
16 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
17 |
}
|
18 |
|
19 |
if ( class_exists( 'WP_List_Table' ) ) :
|
21 |
* Topic replies list table
|
22 |
*
|
23 |
* This list table is responsible for showing the replies to a topic in a
|
24 |
+
* meta-box, similar to comments in posts and pages.
|
25 |
*
|
26 |
* @since 2.6.0 bbPress (r5886)
|
27 |
*/
|
34 |
*/
|
35 |
public function __construct( $args = array() ) {
|
36 |
$args = array(
|
37 |
+
'singular' => 'reply',
|
38 |
+
'plural' => 'replies',
|
39 |
+
'ajax' => false
|
40 |
);
|
41 |
parent::__construct( $args );
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
+
* Setup the list-table columns
|
46 |
*
|
47 |
* @since 2.6.0 bbPress (r5886)
|
48 |
*
|
55 |
//'cb' => '<input type="checkbox" />',
|
56 |
'bbp_topic_reply_author' => esc_html__( 'Author', 'bbpress' ),
|
57 |
'bbp_reply_content' => esc_html__( 'Content', 'bbpress' ),
|
58 |
+
'bbp_reply_created' => esc_html__( 'Replied', 'bbpress' ),
|
59 |
);
|
60 |
}
|
61 |
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* Output the check-box column for bulk actions (if we implement them)
|
95 |
*
|
96 |
* @since 2.6.0 bbPress (r5886)
|
97 |
*/
|
201 |
// Query parameters
|
202 |
$per_page = 5;
|
203 |
$current_page = $this->get_pagenum();
|
204 |
+
$orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? sanitize_key( $_REQUEST['orderby'] ) : 'date';
|
205 |
+
$order = ( ! empty( $_REQUEST['order'] ) ) ? sanitize_key( $_REQUEST['order'] ) : 'asc';
|
206 |
|
207 |
// Query for replies
|
208 |
$reply_query = new WP_Query( array(
|
includes/admin/{functions.php → common.php}
RENAMED
@@ -105,7 +105,7 @@ function bbp_admin_menu_order( $menu_order ) {
|
|
105 |
$bbp_menu_order[] = $second_sep;
|
106 |
|
107 |
// Skip our menu items
|
108 |
-
} elseif ( ! in_array( $item, $custom_menus ) ) {
|
109 |
$bbp_menu_order[] = $item;
|
110 |
}
|
111 |
}
|
@@ -166,7 +166,7 @@ function bbp_sanitize_slug( $slug = '' ) {
|
|
166 |
$value = ltrim( $value, '/' );
|
167 |
$value = rtrim( $value, '/' );
|
168 |
|
169 |
-
// Filter
|
170 |
return apply_filters( 'bbp_sanitize_slug', $value, $slug );
|
171 |
}
|
172 |
|
@@ -191,7 +191,7 @@ function bbp_do_uninstall( $site_id = 0 ) {
|
|
191 |
}
|
192 |
|
193 |
/**
|
194 |
-
* Redirect user to
|
195 |
*
|
196 |
* @since 2.2.0 bbPress (r4389)
|
197 |
*
|
@@ -246,59 +246,7 @@ function bbp_tools_modify_menu_highlight() {
|
|
246 |
global $plugin_page, $submenu_file;
|
247 |
|
248 |
// This tweaks the Tools subnav menu to only show one bbPress menu item
|
249 |
-
if ( ! in_array( $plugin_page, array( 'bbp-settings' ) ) ) {
|
250 |
$submenu_file = 'bbp-repair';
|
251 |
}
|
252 |
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Output the tabs in the admin area
|
256 |
-
*
|
257 |
-
* @since 2.1.0 bbPress (r3872)
|
258 |
-
*
|
259 |
-
* @param string $active_tab Name of the tab that is active
|
260 |
-
*/
|
261 |
-
function bbp_tools_admin_tabs( $active_tab = '' ) {
|
262 |
-
echo bbp_get_tools_admin_tabs( $active_tab );
|
263 |
-
}
|
264 |
-
|
265 |
-
/**
|
266 |
-
* Output the tabs in the admin area
|
267 |
-
*
|
268 |
-
* @since 2.1.0 bbPress (r3872)
|
269 |
-
*
|
270 |
-
* @param string $active_tab Name of the tab that is active
|
271 |
-
*/
|
272 |
-
function bbp_get_tools_admin_tabs( $active_tab = '' ) {
|
273 |
-
|
274 |
-
// Declare local variables
|
275 |
-
$tabs_html = '';
|
276 |
-
$idle_class = 'nav-tab';
|
277 |
-
$active_class = 'nav-tab nav-tab-active';
|
278 |
-
|
279 |
-
// Setup core admin tabs
|
280 |
-
$tabs = apply_filters( 'bbp_tools_admin_tabs', array(
|
281 |
-
'0' => array(
|
282 |
-
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-repair' ), 'tools.php' ) ),
|
283 |
-
'name' => __( 'Repair Forums', 'bbpress' )
|
284 |
-
),
|
285 |
-
'1' => array(
|
286 |
-
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-converter' ), 'tools.php' ) ),
|
287 |
-
'name' => __( 'Import Forums', 'bbpress' )
|
288 |
-
),
|
289 |
-
'2' => array(
|
290 |
-
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-reset' ), 'tools.php' ) ),
|
291 |
-
'name' => __( 'Reset Forums', 'bbpress' )
|
292 |
-
)
|
293 |
-
) );
|
294 |
-
|
295 |
-
// Loop through tabs and build navigation
|
296 |
-
foreach ( array_values( $tabs ) as $tab_data ) {
|
297 |
-
$is_current = (bool) ( $tab_data['name'] == $active_tab );
|
298 |
-
$tab_class = $is_current ? $active_class : $idle_class;
|
299 |
-
$tabs_html .= '<a href="' . esc_url( $tab_data['href'] ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab_data['name'] ) . '</a>';
|
300 |
-
}
|
301 |
-
|
302 |
-
// Output the tabs
|
303 |
-
return $tabs_html;
|
304 |
-
}
|
105 |
$bbp_menu_order[] = $second_sep;
|
106 |
|
107 |
// Skip our menu items
|
108 |
+
} elseif ( ! in_array( $item, $custom_menus, true ) ) {
|
109 |
$bbp_menu_order[] = $item;
|
110 |
}
|
111 |
}
|
166 |
$value = ltrim( $value, '/' );
|
167 |
$value = rtrim( $value, '/' );
|
168 |
|
169 |
+
// Filter & return
|
170 |
return apply_filters( 'bbp_sanitize_slug', $value, $slug );
|
171 |
}
|
172 |
|
191 |
}
|
192 |
|
193 |
/**
|
194 |
+
* Redirect user to "What's New" page on activation
|
195 |
*
|
196 |
* @since 2.2.0 bbPress (r4389)
|
197 |
*
|
246 |
global $plugin_page, $submenu_file;
|
247 |
|
248 |
// This tweaks the Tools subnav menu to only show one bbPress menu item
|
249 |
+
if ( ! in_array( $plugin_page, array( 'bbp-settings' ), true ) ) {
|
250 |
$submenu_file = 'bbp-repair';
|
251 |
}
|
252 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/converters/AEF.php
CHANGED
@@ -570,8 +570,7 @@ class AEF extends BBP_Converter_Base {
|
|
570 |
* This method allows us to indicates what is or is not converted for each
|
571 |
* converter.
|
572 |
*/
|
573 |
-
public function info()
|
574 |
-
{
|
575 |
return '';
|
576 |
}
|
577 |
|
@@ -580,8 +579,7 @@ class AEF extends BBP_Converter_Base {
|
|
580 |
* way when we authenticate it we can get it out of the database
|
581 |
* as one value. Array values are auto sanitized by WordPress.
|
582 |
*/
|
583 |
-
public function callback_savepass( $field, $row )
|
584 |
-
{
|
585 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
586 |
return $pass_array;
|
587 |
}
|
@@ -590,8 +588,7 @@ class AEF extends BBP_Converter_Base {
|
|
590 |
* This method is to take the pass out of the database and compare
|
591 |
* to a pass the user has typed in.
|
592 |
*/
|
593 |
-
public function authenticate_pass( $password, $serialized_pass )
|
594 |
-
{
|
595 |
$pass_array = unserialize( $serialized_pass );
|
596 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
597 |
}
|
570 |
* This method allows us to indicates what is or is not converted for each
|
571 |
* converter.
|
572 |
*/
|
573 |
+
public function info() {
|
|
|
574 |
return '';
|
575 |
}
|
576 |
|
579 |
* way when we authenticate it we can get it out of the database
|
580 |
* as one value. Array values are auto sanitized by WordPress.
|
581 |
*/
|
582 |
+
public function callback_savepass( $field, $row ) {
|
|
|
583 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
584 |
return $pass_array;
|
585 |
}
|
588 |
* This method is to take the pass out of the database and compare
|
589 |
* to a pass the user has typed in.
|
590 |
*/
|
591 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
592 |
$pass_array = unserialize( $serialized_pass );
|
593 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
594 |
}
|
includes/admin/converters/Drupal7.php
CHANGED
@@ -568,8 +568,7 @@ class Drupal7 extends BBP_Converter_Base {
|
|
568 |
* This method allows us to indicates what is or is not converted for each
|
569 |
* converter.
|
570 |
*/
|
571 |
-
public function info()
|
572 |
-
{
|
573 |
return '';
|
574 |
}
|
575 |
|
@@ -578,8 +577,7 @@ class Drupal7 extends BBP_Converter_Base {
|
|
578 |
* way when we authenticate it we can get it out of the database
|
579 |
* as one value. Array values are auto sanitized by WordPress.
|
580 |
*/
|
581 |
-
public function callback_savepass( $field, $row )
|
582 |
-
{
|
583 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
584 |
return $pass_array;
|
585 |
}
|
@@ -588,8 +586,7 @@ class Drupal7 extends BBP_Converter_Base {
|
|
588 |
* This method is to take the pass out of the database and compare
|
589 |
* to a pass the user has typed in.
|
590 |
*/
|
591 |
-
public function authenticate_pass( $password, $serialized_pass )
|
592 |
-
{
|
593 |
$pass_array = unserialize( $serialized_pass );
|
594 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
595 |
}
|
568 |
* This method allows us to indicates what is or is not converted for each
|
569 |
* converter.
|
570 |
*/
|
571 |
+
public function info() {
|
|
|
572 |
return '';
|
573 |
}
|
574 |
|
577 |
* way when we authenticate it we can get it out of the database
|
578 |
* as one value. Array values are auto sanitized by WordPress.
|
579 |
*/
|
580 |
+
public function callback_savepass( $field, $row ) {
|
|
|
581 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
582 |
return $pass_array;
|
583 |
}
|
586 |
* This method is to take the pass out of the database and compare
|
587 |
* to a pass the user has typed in.
|
588 |
*/
|
589 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
590 |
$pass_array = unserialize( $serialized_pass );
|
591 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
592 |
}
|
includes/admin/converters/FluxBB.php
CHANGED
@@ -590,8 +590,7 @@ class FluxBB extends BBP_Converter_Base {
|
|
590 |
* This method allows us to indicates what is or is not converted for each
|
591 |
* converter.
|
592 |
*/
|
593 |
-
public function info()
|
594 |
-
{
|
595 |
return '';
|
596 |
}
|
597 |
|
@@ -600,8 +599,7 @@ class FluxBB extends BBP_Converter_Base {
|
|
600 |
* way when we authenticate it we can get it out of the database
|
601 |
* as one value. Array values are auto sanitized by WordPress.
|
602 |
*/
|
603 |
-
public function callback_savepass( $field, $row )
|
604 |
-
{
|
605 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
606 |
return $pass_array;
|
607 |
}
|
@@ -610,8 +608,7 @@ class FluxBB extends BBP_Converter_Base {
|
|
610 |
* This method is to take the pass out of the database and compare
|
611 |
* to a pass the user has typed in.
|
612 |
*/
|
613 |
-
public function authenticate_pass( $password, $serialized_pass )
|
614 |
-
{
|
615 |
$pass_array = unserialize( $serialized_pass );
|
616 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
617 |
}
|
590 |
* This method allows us to indicates what is or is not converted for each
|
591 |
* converter.
|
592 |
*/
|
593 |
+
public function info() {
|
|
|
594 |
return '';
|
595 |
}
|
596 |
|
599 |
* way when we authenticate it we can get it out of the database
|
600 |
* as one value. Array values are auto sanitized by WordPress.
|
601 |
*/
|
602 |
+
public function callback_savepass( $field, $row ) {
|
|
|
603 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
604 |
return $pass_array;
|
605 |
}
|
608 |
* This method is to take the pass out of the database and compare
|
609 |
* to a pass the user has typed in.
|
610 |
*/
|
611 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
612 |
$pass_array = unserialize( $serialized_pass );
|
613 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
614 |
}
|
includes/admin/converters/Invision.php
CHANGED
@@ -29,7 +29,7 @@ class Invision extends BBP_Converter_Base {
|
|
29 |
/**
|
30 |
* Sets up the field mappings
|
31 |
*/
|
32 |
-
public function setup_globals()
|
33 |
|
34 |
/** Forum Section *****************************************************/
|
35 |
|
@@ -552,8 +552,8 @@ class Invision extends BBP_Converter_Base {
|
|
552 |
}
|
553 |
|
554 |
/**
|
555 |
-
|
556 |
-
|
557 |
protected function callback_html( $field ) {
|
558 |
|
559 |
// Strips Invision custom HTML first from $field before parsing $field to parser.php
|
@@ -628,7 +628,7 @@ class Invision extends BBP_Converter_Base {
|
|
628 |
// Now that Invision custom HTML has been stripped put the cleaned HTML back in $field
|
629 |
$field = $invision_markup;
|
630 |
|
631 |
-
require_once
|
632 |
$bbcode = BBCode::getInstance();
|
633 |
$bbcode->enable_smileys = false;
|
634 |
$bbcode->smiley_regex = false;
|
29 |
/**
|
30 |
* Sets up the field mappings
|
31 |
*/
|
32 |
+
public function setup_globals() {
|
33 |
|
34 |
/** Forum Section *****************************************************/
|
35 |
|
552 |
}
|
553 |
|
554 |
/**
|
555 |
+
* This callback processes any custom BBCodes with parser.php
|
556 |
+
*/
|
557 |
protected function callback_html( $field ) {
|
558 |
|
559 |
// Strips Invision custom HTML first from $field before parsing $field to parser.php
|
628 |
// Now that Invision custom HTML has been stripped put the cleaned HTML back in $field
|
629 |
$field = $invision_markup;
|
630 |
|
631 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
632 |
$bbcode = BBCode::getInstance();
|
633 |
$bbcode->enable_smileys = false;
|
634 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/Kunena3.php
CHANGED
@@ -700,8 +700,7 @@ class Kunena3 extends BBP_Converter_Base {
|
|
700 |
* This method allows us to indicates what is or is not converted for each
|
701 |
* converter.
|
702 |
*/
|
703 |
-
public function info()
|
704 |
-
{
|
705 |
return '';
|
706 |
}
|
707 |
|
@@ -710,8 +709,7 @@ class Kunena3 extends BBP_Converter_Base {
|
|
710 |
* way when we authenticate it we can get it out of the database
|
711 |
* as one value. Array values are auto sanitized by WordPress.
|
712 |
*/
|
713 |
-
public function callback_savepass( $field, $row )
|
714 |
-
{
|
715 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
716 |
return $pass_array;
|
717 |
}
|
@@ -720,8 +718,7 @@ class Kunena3 extends BBP_Converter_Base {
|
|
720 |
* This method is to take the pass out of the database and compare
|
721 |
* to a pass the user has typed in.
|
722 |
*/
|
723 |
-
public function authenticate_pass( $password, $serialized_pass )
|
724 |
-
{
|
725 |
$pass_array = unserialize( $serialized_pass );
|
726 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
727 |
}
|
700 |
* This method allows us to indicates what is or is not converted for each
|
701 |
* converter.
|
702 |
*/
|
703 |
+
public function info() {
|
|
|
704 |
return '';
|
705 |
}
|
706 |
|
709 |
* way when we authenticate it we can get it out of the database
|
710 |
* as one value. Array values are auto sanitized by WordPress.
|
711 |
*/
|
712 |
+
public function callback_savepass( $field, $row ) {
|
|
|
713 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
714 |
return $pass_array;
|
715 |
}
|
718 |
* This method is to take the pass out of the database and compare
|
719 |
* to a pass the user has typed in.
|
720 |
*/
|
721 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
722 |
$pass_array = unserialize( $serialized_pass );
|
723 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
724 |
}
|
includes/admin/converters/Mingle.php
CHANGED
@@ -478,7 +478,7 @@ class Mingle extends BBP_Converter_Base {
|
|
478 |
* This callback processes any custom BBCodes with parser.php
|
479 |
*/
|
480 |
protected function callback_html( $field ) {
|
481 |
-
require_once
|
482 |
$bbcode = BBCode::getInstance();
|
483 |
$bbcode->enable_smileys = false;
|
484 |
$bbcode->smiley_regex = false;
|
478 |
* This callback processes any custom BBCodes with parser.php
|
479 |
*/
|
480 |
protected function callback_html( $field ) {
|
481 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
482 |
$bbcode = BBCode::getInstance();
|
483 |
$bbcode->enable_smileys = false;
|
484 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/MyBB.php
CHANGED
@@ -516,8 +516,7 @@ class MyBB extends BBP_Converter_Base {
|
|
516 |
* This method allows us to indicates what is or is not converted for each
|
517 |
* converter.
|
518 |
*/
|
519 |
-
public function info()
|
520 |
-
{
|
521 |
return '';
|
522 |
}
|
523 |
|
@@ -526,8 +525,7 @@ class MyBB extends BBP_Converter_Base {
|
|
526 |
* way when we authenticate it we can get it out of the database
|
527 |
* as one value. Array values are auto sanitized by WordPress.
|
528 |
*/
|
529 |
-
public function callback_savepass( $field, $row )
|
530 |
-
{
|
531 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
532 |
return $pass_array;
|
533 |
}
|
@@ -536,8 +534,7 @@ class MyBB extends BBP_Converter_Base {
|
|
536 |
* This method is to take the pass out of the database and compare
|
537 |
* to a pass the user has typed in.
|
538 |
*/
|
539 |
-
public function authenticate_pass( $password, $serialized_pass )
|
540 |
-
{
|
541 |
$pass_array = unserialize( $serialized_pass );
|
542 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
543 |
}
|
516 |
* This method allows us to indicates what is or is not converted for each
|
517 |
* converter.
|
518 |
*/
|
519 |
+
public function info() {
|
|
|
520 |
return '';
|
521 |
}
|
522 |
|
525 |
* way when we authenticate it we can get it out of the database
|
526 |
* as one value. Array values are auto sanitized by WordPress.
|
527 |
*/
|
528 |
+
public function callback_savepass( $field, $row ) {
|
|
|
529 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
530 |
return $pass_array;
|
531 |
}
|
534 |
* This method is to take the pass out of the database and compare
|
535 |
* to a pass the user has typed in.
|
536 |
*/
|
537 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
538 |
$pass_array = unserialize( $serialized_pass );
|
539 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
540 |
}
|
includes/admin/converters/PHPFox3.php
CHANGED
@@ -506,8 +506,7 @@ class PHPFox3 extends BBP_Converter_Base {
|
|
506 |
* This method allows us to indicates what is or is not converted for each
|
507 |
* converter.
|
508 |
*/
|
509 |
-
public function info()
|
510 |
-
{
|
511 |
return '';
|
512 |
}
|
513 |
|
@@ -516,8 +515,7 @@ class PHPFox3 extends BBP_Converter_Base {
|
|
516 |
* way when we authenticate it we can get it out of the database
|
517 |
* as one value. Array values are auto sanitized by WordPress.
|
518 |
*/
|
519 |
-
public function callback_savepass( $field, $row )
|
520 |
-
{
|
521 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
522 |
return $pass_array;
|
523 |
}
|
@@ -526,8 +524,7 @@ class PHPFox3 extends BBP_Converter_Base {
|
|
526 |
* This method is to take the pass out of the database and compare
|
527 |
* to a pass the user has typed in.
|
528 |
*/
|
529 |
-
public function authenticate_pass( $password, $serialized_pass )
|
530 |
-
{
|
531 |
$pass_array = unserialize( $serialized_pass );
|
532 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
533 |
}
|
506 |
* This method allows us to indicates what is or is not converted for each
|
507 |
* converter.
|
508 |
*/
|
509 |
+
public function info() {
|
|
|
510 |
return '';
|
511 |
}
|
512 |
|
515 |
* way when we authenticate it we can get it out of the database
|
516 |
* as one value. Array values are auto sanitized by WordPress.
|
517 |
*/
|
518 |
+
public function callback_savepass( $field, $row ) {
|
|
|
519 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
520 |
return $pass_array;
|
521 |
}
|
524 |
* This method is to take the pass out of the database and compare
|
525 |
* to a pass the user has typed in.
|
526 |
*/
|
527 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
528 |
$pass_array = unserialize( $serialized_pass );
|
529 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
530 |
}
|
includes/admin/converters/PHPWind.php
CHANGED
@@ -486,8 +486,7 @@ class PHPWind extends BBP_Converter_Base {
|
|
486 |
* This method allows us to indicates what is or is not converted for each
|
487 |
* converter.
|
488 |
*/
|
489 |
-
public function info()
|
490 |
-
{
|
491 |
return '';
|
492 |
}
|
493 |
|
@@ -496,8 +495,7 @@ class PHPWind extends BBP_Converter_Base {
|
|
496 |
* way when we authenticate it we can get it out of the database
|
497 |
* as one value. Array values are auto sanitized by WordPress.
|
498 |
*/
|
499 |
-
public function callback_savepass( $field, $row )
|
500 |
-
{
|
501 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
502 |
return $pass_array;
|
503 |
}
|
@@ -506,8 +504,7 @@ class PHPWind extends BBP_Converter_Base {
|
|
506 |
* This method is to take the pass out of the database and compare
|
507 |
* to a pass the user has typed in.
|
508 |
*/
|
509 |
-
public function authenticate_pass( $password, $serialized_pass )
|
510 |
-
{
|
511 |
$pass_array = unserialize( $serialized_pass );
|
512 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
513 |
}
|
486 |
* This method allows us to indicates what is or is not converted for each
|
487 |
* converter.
|
488 |
*/
|
489 |
+
public function info() {
|
|
|
490 |
return '';
|
491 |
}
|
492 |
|
495 |
* way when we authenticate it we can get it out of the database
|
496 |
* as one value. Array values are auto sanitized by WordPress.
|
497 |
*/
|
498 |
+
public function callback_savepass( $field, $row ) {
|
|
|
499 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
500 |
return $pass_array;
|
501 |
}
|
504 |
* This method is to take the pass out of the database and compare
|
505 |
* to a pass the user has typed in.
|
506 |
*/
|
507 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
508 |
$pass_array = unserialize( $serialized_pass );
|
509 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
510 |
}
|
includes/admin/converters/Phorum.php
CHANGED
@@ -516,8 +516,7 @@ class Phorum extends BBP_Converter_Base {
|
|
516 |
* This method allows us to indicates what is or is not converted for each
|
517 |
* converter.
|
518 |
*/
|
519 |
-
public function info()
|
520 |
-
{
|
521 |
return '';
|
522 |
}
|
523 |
|
@@ -526,8 +525,7 @@ class Phorum extends BBP_Converter_Base {
|
|
526 |
* way when we authenticate it we can get it out of the database
|
527 |
* as one value. Array values are auto sanitized by WordPress.
|
528 |
*/
|
529 |
-
public function callback_savepass( $field, $row )
|
530 |
-
{
|
531 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
532 |
return $pass_array;
|
533 |
}
|
@@ -536,8 +534,7 @@ class Phorum extends BBP_Converter_Base {
|
|
536 |
* This method is to take the pass out of the database and compare
|
537 |
* to a pass the user has typed in.
|
538 |
*/
|
539 |
-
public function authenticate_pass( $password, $serialized_pass )
|
540 |
-
{
|
541 |
$pass_array = unserialize( $serialized_pass );
|
542 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
543 |
}
|
516 |
* This method allows us to indicates what is or is not converted for each
|
517 |
* converter.
|
518 |
*/
|
519 |
+
public function info() {
|
|
|
520 |
return '';
|
521 |
}
|
522 |
|
525 |
* way when we authenticate it we can get it out of the database
|
526 |
* as one value. Array values are auto sanitized by WordPress.
|
527 |
*/
|
528 |
+
public function callback_savepass( $field, $row ) {
|
|
|
529 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
530 |
return $pass_array;
|
531 |
}
|
534 |
* This method is to take the pass out of the database and compare
|
535 |
* to a pass the user has typed in.
|
536 |
*/
|
537 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
538 |
$pass_array = unserialize( $serialized_pass );
|
539 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
540 |
}
|
includes/admin/converters/PunBB.php
CHANGED
@@ -663,8 +663,7 @@ class PunBB extends BBP_Converter_Base {
|
|
663 |
* This method allows us to indicates what is or is not converted for each
|
664 |
* converter.
|
665 |
*/
|
666 |
-
public function info()
|
667 |
-
{
|
668 |
return '';
|
669 |
}
|
670 |
|
@@ -673,8 +672,7 @@ class PunBB extends BBP_Converter_Base {
|
|
673 |
* way when we authenticate it we can get it out of the database
|
674 |
* as one value. Array values are auto sanitized by WordPress.
|
675 |
*/
|
676 |
-
public function callback_savepass( $field, $row )
|
677 |
-
{
|
678 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
679 |
return $pass_array;
|
680 |
}
|
@@ -683,8 +681,7 @@ class PunBB extends BBP_Converter_Base {
|
|
683 |
* This method is to take the pass out of the database and compare
|
684 |
* to a pass the user has typed in.
|
685 |
*/
|
686 |
-
public function authenticate_pass( $password, $serialized_pass )
|
687 |
-
{
|
688 |
$pass_array = unserialize( $serialized_pass );
|
689 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
690 |
}
|
663 |
* This method allows us to indicates what is or is not converted for each
|
664 |
* converter.
|
665 |
*/
|
666 |
+
public function info() {
|
|
|
667 |
return '';
|
668 |
}
|
669 |
|
672 |
* way when we authenticate it we can get it out of the database
|
673 |
* as one value. Array values are auto sanitized by WordPress.
|
674 |
*/
|
675 |
+
public function callback_savepass( $field, $row ) {
|
|
|
676 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
677 |
return $pass_array;
|
678 |
}
|
681 |
* This method is to take the pass out of the database and compare
|
682 |
* to a pass the user has typed in.
|
683 |
*/
|
684 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
685 |
$pass_array = unserialize( $serialized_pass );
|
686 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
687 |
}
|
includes/admin/converters/SMF.php
CHANGED
@@ -652,8 +652,7 @@ class SMF extends BBP_Converter_Base {
|
|
652 |
* This method allows us to indicates what is or is not converted for each
|
653 |
* converter.
|
654 |
*/
|
655 |
-
public function info()
|
656 |
-
{
|
657 |
return '';
|
658 |
}
|
659 |
|
@@ -662,8 +661,7 @@ class SMF extends BBP_Converter_Base {
|
|
662 |
* way when we authenticate it we can get it out of the database
|
663 |
* as one value. Array values are auto sanitized by WordPress.
|
664 |
*/
|
665 |
-
public function callback_savepass( $field, $row )
|
666 |
-
{
|
667 |
$pass_array = array( 'hash' => $field, 'username' => $row['member_name'] );
|
668 |
return $pass_array;
|
669 |
}
|
@@ -672,8 +670,7 @@ class SMF extends BBP_Converter_Base {
|
|
672 |
* This method is to take the pass out of the database and compare
|
673 |
* to a pass the user has typed in.
|
674 |
*/
|
675 |
-
public function authenticate_pass( $password, $serialized_pass )
|
676 |
-
{
|
677 |
$pass_array = unserialize( $serialized_pass );
|
678 |
return ( $pass_array['hash'] === sha1( strtolower( $pass_array['username'] ) . $password ) ? true : false );
|
679 |
}
|
@@ -806,7 +803,7 @@ class SMF extends BBP_Converter_Base {
|
|
806 |
$field = $SMF_markup;
|
807 |
|
808 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
809 |
-
require_once
|
810 |
$bbcode = BBCode::getInstance();
|
811 |
$bbcode->enable_smileys = false;
|
812 |
$bbcode->smiley_regex = false;
|
652 |
* This method allows us to indicates what is or is not converted for each
|
653 |
* converter.
|
654 |
*/
|
655 |
+
public function info() {
|
|
|
656 |
return '';
|
657 |
}
|
658 |
|
661 |
* way when we authenticate it we can get it out of the database
|
662 |
* as one value. Array values are auto sanitized by WordPress.
|
663 |
*/
|
664 |
+
public function callback_savepass( $field, $row ) {
|
|
|
665 |
$pass_array = array( 'hash' => $field, 'username' => $row['member_name'] );
|
666 |
return $pass_array;
|
667 |
}
|
670 |
* This method is to take the pass out of the database and compare
|
671 |
* to a pass the user has typed in.
|
672 |
*/
|
673 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
674 |
$pass_array = unserialize( $serialized_pass );
|
675 |
return ( $pass_array['hash'] === sha1( strtolower( $pass_array['username'] ) . $password ) ? true : false );
|
676 |
}
|
803 |
$field = $SMF_markup;
|
804 |
|
805 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
806 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
807 |
$bbcode = BBCode::getInstance();
|
808 |
$bbcode->enable_smileys = false;
|
809 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/SimplePress5.php
CHANGED
@@ -607,7 +607,7 @@ class SimplePress5 extends BBP_Converter_Base {
|
|
607 |
$field = $simplepress_markup;
|
608 |
|
609 |
// Parse out any bbCodes with the BBCode 'parser.php'
|
610 |
-
require_once
|
611 |
$bbcode = BBCode::getInstance();
|
612 |
$bbcode->enable_smileys = false;
|
613 |
$bbcode->smiley_regex = false;
|
607 |
$field = $simplepress_markup;
|
608 |
|
609 |
// Parse out any bbCodes with the BBCode 'parser.php'
|
610 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
611 |
$bbcode = BBCode::getInstance();
|
612 |
$bbcode->enable_smileys = false;
|
613 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/Vanilla.php
CHANGED
@@ -606,7 +606,7 @@ class Vanilla extends BBP_Converter_Base {
|
|
606 |
* This callback processes any custom BBCodes with parser.php
|
607 |
*/
|
608 |
protected function callback_html( $field ) {
|
609 |
-
require_once
|
610 |
$bbcode = BBCode::getInstance();
|
611 |
$bbcode->enable_smileys = false;
|
612 |
$bbcode->smiley_regex = false;
|
606 |
* This callback processes any custom BBCodes with parser.php
|
607 |
*/
|
608 |
protected function callback_html( $field ) {
|
609 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
610 |
$bbcode = BBCode::getInstance();
|
611 |
$bbcode->enable_smileys = false;
|
612 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/XMB.php
CHANGED
@@ -623,8 +623,7 @@ class XMB extends BBP_Converter_Base {
|
|
623 |
* This method allows us to indicates what is or is not converted for each
|
624 |
* converter.
|
625 |
*/
|
626 |
-
public function info()
|
627 |
-
{
|
628 |
return '';
|
629 |
}
|
630 |
|
@@ -633,8 +632,7 @@ class XMB extends BBP_Converter_Base {
|
|
633 |
* way when we authenticate it we can get it out of the database
|
634 |
* as one value. Array values are auto sanitized by WordPress.
|
635 |
*/
|
636 |
-
public function callback_savepass( $field, $row )
|
637 |
-
{
|
638 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
639 |
return $pass_array;
|
640 |
}
|
@@ -643,8 +641,7 @@ class XMB extends BBP_Converter_Base {
|
|
643 |
* This method is to take the pass out of the database and compare
|
644 |
* to a pass the user has typed in.
|
645 |
*/
|
646 |
-
public function authenticate_pass( $password, $serialized_pass )
|
647 |
-
{
|
648 |
$pass_array = unserialize( $serialized_pass );
|
649 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
650 |
}
|
623 |
* This method allows us to indicates what is or is not converted for each
|
624 |
* converter.
|
625 |
*/
|
626 |
+
public function info() {
|
|
|
627 |
return '';
|
628 |
}
|
629 |
|
632 |
* way when we authenticate it we can get it out of the database
|
633 |
* as one value. Array values are auto sanitized by WordPress.
|
634 |
*/
|
635 |
+
public function callback_savepass( $field, $row ) {
|
|
|
636 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
637 |
return $pass_array;
|
638 |
}
|
641 |
* This method is to take the pass out of the database and compare
|
642 |
* to a pass the user has typed in.
|
643 |
*/
|
644 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
645 |
$pass_array = unserialize( $serialized_pass );
|
646 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
647 |
}
|
includes/admin/converters/XenForo.php
CHANGED
@@ -682,8 +682,7 @@ class XenForo extends BBP_Converter_Base {
|
|
682 |
* way when we authenticate it we can get it out of the database
|
683 |
* as one value. Array values are auto sanitized by wordpress.
|
684 |
*/
|
685 |
-
public function translate_savepass( $field, $row )
|
686 |
-
{
|
687 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
688 |
return $pass_array;
|
689 |
}
|
@@ -692,11 +691,9 @@ class XenForo extends BBP_Converter_Base {
|
|
692 |
* This method is to take the pass out of the database and compare
|
693 |
* to a pass the user has typed in.
|
694 |
*/
|
695 |
-
public function authenticate_pass( $password, $serialized_pass )
|
696 |
-
{
|
697 |
$pass_array = unserialize( $serialized_pass );
|
698 |
-
switch( $pass_array['hashFunc'] )
|
699 |
-
{
|
700 |
case 'sha256':
|
701 |
return ( $pass_array['hash'] == hash( 'sha256', hash( 'sha256', $password ) . $pass_array['salt'] ) );
|
702 |
case 'sha1':
|
@@ -844,7 +841,7 @@ class XenForo extends BBP_Converter_Base {
|
|
844 |
$field = $xenforo_markup;
|
845 |
|
846 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
847 |
-
require_once
|
848 |
$bbcode = BBCode::getInstance();
|
849 |
$bbcode->enable_smileys = false;
|
850 |
$bbcode->smiley_regex = false;
|
682 |
* way when we authenticate it we can get it out of the database
|
683 |
* as one value. Array values are auto sanitized by wordpress.
|
684 |
*/
|
685 |
+
public function translate_savepass( $field, $row ) {
|
|
|
686 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
687 |
return $pass_array;
|
688 |
}
|
691 |
* This method is to take the pass out of the database and compare
|
692 |
* to a pass the user has typed in.
|
693 |
*/
|
694 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
695 |
$pass_array = unserialize( $serialized_pass );
|
696 |
+
switch( $pass_array['hashFunc'] ) {
|
|
|
697 |
case 'sha256':
|
698 |
return ( $pass_array['hash'] == hash( 'sha256', hash( 'sha256', $password ) . $pass_array['salt'] ) );
|
699 |
case 'sha1':
|
841 |
$field = $xenforo_markup;
|
842 |
|
843 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
844 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
845 |
$bbcode = BBCode::getInstance();
|
846 |
$bbcode->enable_smileys = false;
|
847 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/bbPress1.php
CHANGED
@@ -761,7 +761,7 @@ class bbPress1 extends BBP_Converter_Base {
|
|
761 |
* - decodes necessary HTML entities
|
762 |
*/
|
763 |
protected function callback_html( $field ) {
|
764 |
-
require_once
|
765 |
$bbcode = BBCode::getInstance();
|
766 |
$bbcode->enable_smileys = false;
|
767 |
$bbcode->smiley_regex = false;
|
761 |
* - decodes necessary HTML entities
|
762 |
*/
|
763 |
protected function callback_html( $field ) {
|
764 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
765 |
$bbcode = BBCode::getInstance();
|
766 |
$bbcode->enable_smileys = false;
|
767 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/e107v1.php
CHANGED
@@ -465,8 +465,7 @@ class e107v1 extends BBP_Converter_Base {
|
|
465 |
* This method allows us to indicates what is or is not converted for each
|
466 |
* converter.
|
467 |
*/
|
468 |
-
public function info()
|
469 |
-
{
|
470 |
return '';
|
471 |
}
|
472 |
|
@@ -475,8 +474,7 @@ class e107v1 extends BBP_Converter_Base {
|
|
475 |
* way when we authenticate it we can get it out of the database
|
476 |
* as one value. Array values are auto sanitized by WordPress.
|
477 |
*/
|
478 |
-
public function callback_savepass( $field, $row )
|
479 |
-
{
|
480 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
481 |
return $pass_array;
|
482 |
}
|
@@ -485,8 +483,7 @@ class e107v1 extends BBP_Converter_Base {
|
|
485 |
* This method is to take the pass out of the database and compare
|
486 |
* to a pass the user has typed in.
|
487 |
*/
|
488 |
-
public function authenticate_pass( $password, $serialized_pass )
|
489 |
-
{
|
490 |
$pass_array = unserialize( $serialized_pass );
|
491 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
492 |
}
|
@@ -584,7 +581,7 @@ class e107v1 extends BBP_Converter_Base {
|
|
584 |
if ( ! is_null( $row ) ) {
|
585 |
$this->map_userid[ $field ] = $row->value_id;
|
586 |
} else {
|
587 |
-
if (
|
588 |
$this->map_userid[ $field ] = 0;
|
589 |
} else {
|
590 |
$this->map_userid[ $field ] = $field;
|
@@ -631,7 +628,7 @@ class e107v1 extends BBP_Converter_Base {
|
|
631 |
$field = $e107v1_markup;
|
632 |
|
633 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
634 |
-
require_once
|
635 |
$bbcode = BBCode::getInstance();
|
636 |
$bbcode->enable_smileys = false;
|
637 |
$bbcode->smiley_regex = false;
|
465 |
* This method allows us to indicates what is or is not converted for each
|
466 |
* converter.
|
467 |
*/
|
468 |
+
public function info() {
|
|
|
469 |
return '';
|
470 |
}
|
471 |
|
474 |
* way when we authenticate it we can get it out of the database
|
475 |
* as one value. Array values are auto sanitized by WordPress.
|
476 |
*/
|
477 |
+
public function callback_savepass( $field, $row ) {
|
|
|
478 |
$pass_array = array( 'hash' => $field, 'salt' => $row['salt'] );
|
479 |
return $pass_array;
|
480 |
}
|
483 |
* This method is to take the pass out of the database and compare
|
484 |
* to a pass the user has typed in.
|
485 |
*/
|
486 |
+
public function authenticate_pass( $password, $serialized_pass ) {
|
|
|
487 |
$pass_array = unserialize( $serialized_pass );
|
488 |
return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) );
|
489 |
}
|
581 |
if ( ! is_null( $row ) ) {
|
582 |
$this->map_userid[ $field ] = $row->value_id;
|
583 |
} else {
|
584 |
+
if ( true === $this->convert_users ) {
|
585 |
$this->map_userid[ $field ] = 0;
|
586 |
} else {
|
587 |
$this->map_userid[ $field ] = $field;
|
628 |
$field = $e107v1_markup;
|
629 |
|
630 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
631 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
632 |
$bbcode = BBCode::getInstance();
|
633 |
$bbcode->enable_smileys = false;
|
634 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/phpBB.php
CHANGED
@@ -776,8 +776,7 @@ class phpBB extends BBP_Converter_Base {
|
|
776 |
*/
|
777 |
if ( floatval( phpversion() ) >= 5 ) {
|
778 |
$hash = md5( $salt . $password, true );
|
779 |
-
do
|
780 |
-
{
|
781 |
$hash = md5( $hash . $password, true );
|
782 |
}
|
783 |
while ( --$count );
|
@@ -1019,7 +1018,7 @@ class phpBB extends BBP_Converter_Base {
|
|
1019 |
$field = $phpbb_uid;
|
1020 |
|
1021 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
1022 |
-
require_once
|
1023 |
$bbcode = BBCode::getInstance();
|
1024 |
$bbcode->enable_smileys = false;
|
1025 |
$bbcode->smiley_regex = false;
|
776 |
*/
|
777 |
if ( floatval( phpversion() ) >= 5 ) {
|
778 |
$hash = md5( $salt . $password, true );
|
779 |
+
do {
|
|
|
780 |
$hash = md5( $hash . $password, true );
|
781 |
}
|
782 |
while ( --$count );
|
1018 |
$field = $phpbb_uid;
|
1019 |
|
1020 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
1021 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
1022 |
$bbcode = BBCode::getInstance();
|
1023 |
$bbcode->enable_smileys = false;
|
1024 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/vBulletin.php
CHANGED
@@ -747,7 +747,7 @@ class vBulletin extends BBP_Converter_Base {
|
|
747 |
$field = $vbulletin_markup;
|
748 |
|
749 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
750 |
-
require_once
|
751 |
$bbcode = BBCode::getInstance();
|
752 |
$bbcode->enable_smileys = false;
|
753 |
$bbcode->smiley_regex = false;
|
747 |
$field = $vbulletin_markup;
|
748 |
|
749 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
750 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
751 |
$bbcode = BBCode::getInstance();
|
752 |
$bbcode->enable_smileys = false;
|
753 |
$bbcode->smiley_regex = false;
|
includes/admin/converters/vBulletin3.php
CHANGED
@@ -745,7 +745,7 @@ class vBulletin3 extends BBP_Converter_Base {
|
|
745 |
$field = $vbulletin_markup;
|
746 |
|
747 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
748 |
-
require_once
|
749 |
$bbcode = BBCode::getInstance();
|
750 |
$bbcode->enable_smileys = false;
|
751 |
$bbcode->smiley_regex = false;
|
745 |
$field = $vbulletin_markup;
|
746 |
|
747 |
// Parse out any bbCodes in $field with the BBCode 'parser.php'
|
748 |
+
require_once bbpress()->admin->admin_dir . 'parser.php';
|
749 |
$bbcode = BBCode::getInstance();
|
750 |
$bbcode->enable_smileys = false;
|
751 |
$bbcode->smiley_regex = false;
|
includes/admin/forums.php
CHANGED
@@ -217,12 +217,12 @@ class BBP_Forums_Admin {
|
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
-
* Add the forum attributes
|
221 |
*
|
222 |
* @since 2.0.0 bbPress (r2746)
|
223 |
*
|
224 |
* @uses bbp_get_forum_post_type() To get the forum post type
|
225 |
-
* @uses add_meta_box() To add the
|
226 |
* @uses do_action() Calls 'bbp_forum_attributes_metabox'
|
227 |
*/
|
228 |
public function attributes_metabox() {
|
@@ -237,12 +237,12 @@ class BBP_Forums_Admin {
|
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
-
* Add the forum moderators
|
241 |
*
|
242 |
* @since 2.6.0 bbPress
|
243 |
*
|
244 |
* @uses bbp_get_forum_post_type() To get the forum post type
|
245 |
-
* @uses add_meta_box() To add the
|
246 |
* @uses do_action() Calls 'bbp_forum_attributes_metabox'
|
247 |
*/
|
248 |
public function moderators_metabox() {
|
@@ -264,13 +264,13 @@ class BBP_Forums_Admin {
|
|
264 |
}
|
265 |
|
266 |
/**
|
267 |
-
* Add the subscriptions
|
268 |
*
|
269 |
* Allows viewing of users who have subscribed to a forum.
|
270 |
*
|
271 |
* @since 2.6.0 bbPress (r6197)
|
272 |
*
|
273 |
-
* @uses add_meta_box() To add the
|
274 |
*/
|
275 |
public function subscriptions_metabox() {
|
276 |
|
@@ -284,7 +284,7 @@ class BBP_Forums_Admin {
|
|
284 |
return;
|
285 |
}
|
286 |
|
287 |
-
// Add the
|
288 |
add_meta_box(
|
289 |
'bbp_forum_subscriptions_metabox',
|
290 |
__( 'Subscriptions', 'bbpress' ),
|
@@ -296,7 +296,7 @@ class BBP_Forums_Admin {
|
|
296 |
}
|
297 |
|
298 |
/**
|
299 |
-
* Remove comments & discussion
|
300 |
*
|
301 |
* @since 2.6.0 bbPress (r6186)
|
302 |
*/
|
@@ -395,52 +395,68 @@ class BBP_Forums_Admin {
|
|
395 |
*/
|
396 |
public function toggle_forum() {
|
397 |
|
398 |
-
//
|
399 |
-
if (
|
400 |
-
|
401 |
-
|
402 |
-
$success = false; // Flag
|
403 |
-
$post_data = array( 'ID' => $forum_id ); // Prelim array
|
404 |
-
$forum = bbp_get_forum( $forum_id );
|
405 |
-
|
406 |
-
// Bail if forum is missing
|
407 |
-
if ( empty( $forum ) ) {
|
408 |
-
wp_die( __( 'The forum was not found.', 'bbpress' ) );
|
409 |
-
}
|
410 |
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
|
|
415 |
|
416 |
-
|
417 |
-
|
418 |
-
|
|
|
|
|
419 |
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
$success = ( true === $is_open )
|
425 |
-
? bbp_close_forum( $forum_id )
|
426 |
-
: bbp_open_forum( $forum_id );
|
427 |
|
428 |
-
|
429 |
-
|
|
|
|
|
430 |
|
431 |
-
|
|
|
|
|
432 |
|
433 |
-
|
434 |
-
$message
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
-
|
438 |
-
|
|
|
|
|
|
|
439 |
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
}
|
445 |
|
446 |
/**
|
@@ -459,50 +475,91 @@ class BBP_Forums_Admin {
|
|
459 |
*/
|
460 |
public function toggle_forum_notice() {
|
461 |
|
462 |
-
//
|
463 |
-
if ( bbp_is_get_request()
|
464 |
-
|
465 |
-
|
466 |
-
$is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
|
467 |
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
|
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
|
479 |
-
|
|
|
|
|
|
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
: sprintf( __( 'Forum "%1$s" successfully opened.', 'bbpress' ), $forum_title );
|
486 |
-
break;
|
487 |
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
|
495 |
-
|
496 |
-
|
|
|
|
|
|
|
|
|
497 |
|
498 |
-
|
|
|
|
|
|
|
|
|
499 |
|
500 |
-
|
501 |
-
<p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
|
502 |
-
</div>
|
503 |
|
504 |
-
|
505 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
}
|
507 |
|
508 |
/**
|
@@ -534,6 +591,7 @@ class BBP_Forums_Admin {
|
|
534 |
unset( $columns['bbp_forum_mods'] );
|
535 |
}
|
536 |
|
|
|
537 |
return apply_filters( 'bbp_admin_forums_column_headers', $columns );
|
538 |
}
|
539 |
|
@@ -624,7 +682,7 @@ class BBP_Forums_Admin {
|
|
624 |
if ( current_user_can( 'keep_gate', $forum->ID ) ) {
|
625 |
|
626 |
// Show the 'close' and 'open' link on published, private, hidden and closed posts only
|
627 |
-
if ( in_array( $forum->post_status, array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id(), bbp_get_closed_status_id() ) ) ) {
|
628 |
$close_uri = wp_nonce_url( add_query_arg( array( 'forum_id' => $forum->ID, 'action' => 'bbp_toggle_forum_close' ), remove_query_arg( array( 'bbp_forum_toggle_notice', 'forum_id', 'failed', 'super' ) ) ), 'close-forum_' . $forum->ID );
|
629 |
if ( bbp_is_forum_open( $forum->ID ) ) {
|
630 |
$actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this forum', 'bbpress' ) . '">' . _x( 'Close', 'Close a Forum', 'bbpress' ) . '</a>';
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
+
* Add the forum attributes meta-box
|
221 |
*
|
222 |
* @since 2.0.0 bbPress (r2746)
|
223 |
*
|
224 |
* @uses bbp_get_forum_post_type() To get the forum post type
|
225 |
+
* @uses add_meta_box() To add the meta-box
|
226 |
* @uses do_action() Calls 'bbp_forum_attributes_metabox'
|
227 |
*/
|
228 |
public function attributes_metabox() {
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
+
* Add the forum moderators meta-box
|
241 |
*
|
242 |
* @since 2.6.0 bbPress
|
243 |
*
|
244 |
* @uses bbp_get_forum_post_type() To get the forum post type
|
245 |
+
* @uses add_meta_box() To add the meta-box
|
246 |
* @uses do_action() Calls 'bbp_forum_attributes_metabox'
|
247 |
*/
|
248 |
public function moderators_metabox() {
|
264 |
}
|
265 |
|
266 |
/**
|
267 |
+
* Add the subscriptions meta-box
|
268 |
*
|
269 |
* Allows viewing of users who have subscribed to a forum.
|
270 |
*
|
271 |
* @since 2.6.0 bbPress (r6197)
|
272 |
*
|
273 |
+
* @uses add_meta_box() To add the meta-box
|
274 |
*/
|
275 |
public function subscriptions_metabox() {
|
276 |
|
284 |
return;
|
285 |
}
|
286 |
|
287 |
+
// Add the meta-box
|
288 |
add_meta_box(
|
289 |
'bbp_forum_subscriptions_metabox',
|
290 |
__( 'Subscriptions', 'bbpress' ),
|
296 |
}
|
297 |
|
298 |
/**
|
299 |
+
* Remove comments & discussion meta-boxes if comments are not supported
|
300 |
*
|
301 |
* @since 2.6.0 bbPress (r6186)
|
302 |
*/
|
395 |
*/
|
396 |
public function toggle_forum() {
|
397 |
|
398 |
+
// Bail if not a forum toggle action
|
399 |
+
if ( ! bbp_is_get_request() || empty( $_GET['action'] ) || empty( $_GET['forum_id'] ) ) {
|
400 |
+
return;
|
401 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
|
403 |
+
// Bail if not an allowed action
|
404 |
+
$action = sanitize_key( $_GET['action'] );
|
405 |
+
if ( empty( $action ) || ! in_array( $action, $this->get_allowed_action_toggles(), true ) ) {
|
406 |
+
return;
|
407 |
+
}
|
408 |
|
409 |
+
// Bail if forum is missing
|
410 |
+
$forum_id = bbp_get_forum_id( $_GET['forum_id'] );
|
411 |
+
if ( ! bbp_get_forum( $forum_id ) ) {
|
412 |
+
wp_die( __( 'The forum was not found.', 'bbpress' ) );
|
413 |
+
}
|
414 |
|
415 |
+
// What is the user doing here?
|
416 |
+
if ( ! current_user_can( 'keep_gate', $forum_id ) ) {
|
417 |
+
wp_die( __( 'You do not have permission to do that.', 'bbpress' ) );
|
418 |
+
}
|
|
|
|
|
|
|
419 |
|
420 |
+
// Defaults
|
421 |
+
$post_data = array( 'ID' => $forum_id );
|
422 |
+
$message = '';
|
423 |
+
$success = false;
|
424 |
|
425 |
+
switch ( $action ) {
|
426 |
+
case 'bbp_toggle_forum_close' :
|
427 |
+
check_admin_referer( 'close-forum_' . $forum_id );
|
428 |
|
429 |
+
$is_open = bbp_is_forum_open( $forum_id );
|
430 |
+
$message = ( true === $is_open )
|
431 |
+
? 'closed'
|
432 |
+
: 'opened';
|
433 |
+
$success = ( true === $is_open )
|
434 |
+
? bbp_close_forum( $forum_id )
|
435 |
+
: bbp_open_forum( $forum_id );
|
436 |
+
|
437 |
+
break;
|
438 |
+
}
|
439 |
|
440 |
+
// Setup the message
|
441 |
+
$retval = array(
|
442 |
+
'bbp_forum_toggle_notice' => $message,
|
443 |
+
'forum_id' => $forum_id
|
444 |
+
);
|
445 |
|
446 |
+
// Prepare for failure
|
447 |
+
if ( ( false === $success ) || is_wp_error( $success ) ) {
|
448 |
+
$retval['failed'] = '1';
|
449 |
}
|
450 |
+
|
451 |
+
// Filter all message args
|
452 |
+
$retval = apply_filters( 'bbp_toggle_forum_action_admin', $retval, $forum_id, $action );
|
453 |
+
|
454 |
+
// Do additional forum toggle actions (admin side)
|
455 |
+
do_action( 'bbp_toggle_forum_admin', $success, $post_data, $action, $retval );
|
456 |
+
|
457 |
+
// Redirect back to the forum
|
458 |
+
$redirect = add_query_arg( $retval, remove_query_arg( array( 'action', 'forum_id' ) ) );
|
459 |
+
bbp_redirect( $redirect );
|
460 |
}
|
461 |
|
462 |
/**
|
475 |
*/
|
476 |
public function toggle_forum_notice() {
|
477 |
|
478 |
+
// Bail if missing topic toggle action
|
479 |
+
if ( ! bbp_is_get_request() || empty( $_GET['forum_id'] ) || empty( $_GET['bbp_forum_toggle_notice'] ) ) {
|
480 |
+
return;
|
481 |
+
}
|
|
|
482 |
|
483 |
+
// Bail if not an allowed notice
|
484 |
+
$notice = sanitize_key( $_GET['bbp_forum_toggle_notice'] );
|
485 |
+
if ( empty( $notice ) || ! in_array( $notice, $this->get_allowed_notice_toggles(), true ) ) {
|
486 |
+
return;
|
487 |
+
}
|
488 |
|
489 |
+
// Bail if no forum_id or notice
|
490 |
+
$forum_id = bbp_get_forum_id( $_GET['forum_id'] );
|
491 |
+
if ( empty( $forum_id ) ) {
|
492 |
+
return;
|
493 |
+
}
|
494 |
|
495 |
+
// Bail if forum is missing
|
496 |
+
if ( ! bbp_get_forum( $forum_id ) ) {
|
497 |
+
return;
|
498 |
+
}
|
499 |
|
500 |
+
// Use the title in the responses
|
501 |
+
$forum_title = bbp_get_forum_title( $forum_id );
|
502 |
+
$is_failure = ! empty( $_GET['failed'] );
|
503 |
+
$message = '';
|
|
|
|
|
504 |
|
505 |
+
switch ( $notice ) {
|
506 |
+
case 'opened' :
|
507 |
+
$message = ( $is_failure === true )
|
508 |
+
? sprintf( __( 'There was a problem opening the forum "%1$s".', 'bbpress' ), $forum_title )
|
509 |
+
: sprintf( __( 'Forum "%1$s" successfully opened.', 'bbpress' ), $forum_title );
|
510 |
+
break;
|
511 |
|
512 |
+
case 'closed' :
|
513 |
+
$message = ( $is_failure === true )
|
514 |
+
? sprintf( __( 'There was a problem closing the forum "%1$s".', 'bbpress' ), $forum_title )
|
515 |
+
: sprintf( __( 'Forum "%1$s" successfully closed.', 'bbpress' ), $forum_title );
|
516 |
+
break;
|
517 |
+
}
|
518 |
|
519 |
+
// Do additional forum toggle notice filters (admin side)
|
520 |
+
$message = apply_filters( 'bbp_toggle_forum_notice_admin', $message, $forum_id, $notice, $is_failure );
|
521 |
+
$class = ( $is_failure === true )
|
522 |
+
? 'error'
|
523 |
+
: 'updated';
|
524 |
|
525 |
+
?>
|
|
|
|
|
526 |
|
527 |
+
<div id="message" class="<?php echo esc_html( $class ); ?> fade">
|
528 |
+
<p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
|
529 |
+
</div>
|
530 |
+
|
531 |
+
<?php
|
532 |
+
}
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Returns an array of notice toggles
|
536 |
+
*
|
537 |
+
* @since 2.6.0 bbPress (r6396)
|
538 |
+
*
|
539 |
+
* @return array
|
540 |
+
*/
|
541 |
+
private function get_allowed_notice_toggles() {
|
542 |
+
|
543 |
+
// Filter & return
|
544 |
+
return apply_filters( 'bbp_admin_forums_allowed_notice_toggles', array(
|
545 |
+
'opened',
|
546 |
+
'closed'
|
547 |
+
) );
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Returns an array of notice toggles
|
552 |
+
*
|
553 |
+
* @since 2.6.0 bbPress (r6396)
|
554 |
+
*
|
555 |
+
* @return array
|
556 |
+
*/
|
557 |
+
private function get_allowed_action_toggles() {
|
558 |
+
|
559 |
+
// Filter & return
|
560 |
+
return apply_filters( 'bbp_admin_forums_allowed_action_toggles', array(
|
561 |
+
'bbp_toggle_forum_close'
|
562 |
+
) );
|
563 |
}
|
564 |
|
565 |
/**
|
591 |
unset( $columns['bbp_forum_mods'] );
|
592 |
}
|
593 |
|
594 |
+
// Filter & return
|
595 |
return apply_filters( 'bbp_admin_forums_column_headers', $columns );
|
596 |
}
|
597 |
|
682 |
if ( current_user_can( 'keep_gate', $forum->ID ) ) {
|
683 |
|
684 |
// Show the 'close' and 'open' link on published, private, hidden and closed posts only
|
685 |
+
if ( in_array( $forum->post_status, array( bbp_get_public_status_id(), bbp_get_private_status_id(), bbp_get_hidden_status_id(), bbp_get_closed_status_id() ), true ) ) {
|
686 |
$close_uri = wp_nonce_url( add_query_arg( array( 'forum_id' => $forum->ID, 'action' => 'bbp_toggle_forum_close' ), remove_query_arg( array( 'bbp_forum_toggle_notice', 'forum_id', 'failed', 'super' ) ) ), 'close-forum_' . $forum->ID );
|
687 |
if ( bbp_is_forum_open( $forum->ID ) ) {
|
688 |
$actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this forum', 'bbpress' ) . '">' . _x( 'Close', 'Close a Forum', 'bbpress' ) . '</a>';
|
includes/admin/metaboxes.php
CHANGED
@@ -50,7 +50,7 @@ function bbp_filter_dashboard_glance_items( $elements = array() ) {
|
|
50 |
$elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>';
|
51 |
}
|
52 |
|
53 |
-
// Filter
|
54 |
return apply_filters( 'bbp_dashboard_at_a_glance', $elements, $r );
|
55 |
}
|
56 |
|
@@ -281,9 +281,9 @@ function bbp_dashboard_widget_right_now() {
|
|
281 |
/** Forums ********************************************************************/
|
282 |
|
283 |
/**
|
284 |
-
* Forum
|
285 |
*
|
286 |
-
* The
|
287 |
*
|
288 |
* @since 2.0.0 bbPress (r2744)
|
289 |
*
|
@@ -356,7 +356,7 @@ function bbp_forum_metabox( $post ) {
|
|
356 |
// Output-related
|
357 |
'select_id' => 'parent_id',
|
358 |
'options_only' => false,
|
359 |
-
'show_none' =>
|
360 |
'disable_categories' => false,
|
361 |
'disabled' => ''
|
362 |
) ); ?>
|
@@ -378,9 +378,9 @@ function bbp_forum_metabox( $post ) {
|
|
378 |
/** Topics ********************************************************************/
|
379 |
|
380 |
/**
|
381 |
-
* Topic
|
382 |
*
|
383 |
-
* The
|
384 |
*
|
385 |
* @since 2.0.0 bbPress (r2464)
|
386 |
*
|
@@ -435,7 +435,7 @@ function bbp_topic_metabox( $post ) {
|
|
435 |
// Output-related
|
436 |
'select_id' => 'parent_id',
|
437 |
'options_only' => false,
|
438 |
-
'show_none' =>
|
439 |
'disable_categories' => current_user_can( 'edit_forums' ),
|
440 |
'disabled' => ''
|
441 |
) ); ?>
|
@@ -451,9 +451,9 @@ function bbp_topic_metabox( $post ) {
|
|
451 |
/** Replies *******************************************************************/
|
452 |
|
453 |
/**
|
454 |
-
* Reply
|
455 |
*
|
456 |
-
* The
|
457 |
*
|
458 |
* @since 2.0.0 bbPress (r2464)
|
459 |
*
|
@@ -502,7 +502,7 @@ function bbp_reply_metabox( $post ) {
|
|
502 |
// Output-related
|
503 |
'select_id' => 'bbp_forum_id',
|
504 |
'options_only' => false,
|
505 |
-
'show_none' =>
|
506 |
'disable_categories' => current_user_can( 'edit_forums' ),
|
507 |
'disabled' => ''
|
508 |
) ); ?>
|
@@ -547,7 +547,7 @@ function bbp_reply_metabox( $post ) {
|
|
547 |
}
|
548 |
|
549 |
/**
|
550 |
-
* Output the topic replies
|
551 |
*
|
552 |
* @since 2.6.0 bbPress (r5886)
|
553 |
*
|
@@ -564,7 +564,7 @@ function bbp_topic_replies_metabox( $topic = false ) {
|
|
564 |
|
565 |
// Pull in the list table class
|
566 |
if ( ! class_exists( 'BBP_Topic_Replies_List_Table' ) ) {
|
567 |
-
require_once bbpress()->admin->admin_dir . '/
|
568 |
}
|
569 |
|
570 |
// Look for pagination value
|
@@ -588,7 +588,7 @@ function bbp_topic_replies_metabox( $topic = false ) {
|
|
588 |
/** Users *********************************************************************/
|
589 |
|
590 |
/**
|
591 |
-
* Anonymous user information
|
592 |
*
|
593 |
* @since 2.0.0 bbPress (r2828)
|
594 |
*
|
@@ -642,7 +642,7 @@ function bbp_author_metabox( $post ) {
|
|
642 |
}
|
643 |
|
644 |
/**
|
645 |
-
* Moderator assignment
|
646 |
*
|
647 |
* @since 2.6.0 bbPress (r2828)
|
648 |
*
|
@@ -658,20 +658,55 @@ function bbp_moderator_assignment_metabox( $post ) {
|
|
658 |
? implode( ', ', array_map( 'esc_attr', $user_nicenames ) )
|
659 |
: ''; ?>
|
660 |
|
661 |
-
<
|
662 |
-
|
663 |
-
|
664 |
-
</p>
|
665 |
|
666 |
<?php
|
667 |
|
668 |
do_action( 'bbp_moderator_assignment_metabox', $post );
|
669 |
}
|
670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
/**
|
672 |
* See who marked a topic as a favorite
|
673 |
*
|
674 |
* @since 2.6.0 bbPress (r6197)
|
|
|
675 |
*/
|
676 |
function bbp_topic_favorites_metabox( $post ) {
|
677 |
|
@@ -681,12 +716,17 @@ function bbp_topic_favorites_metabox( $post ) {
|
|
681 |
// Output
|
682 |
?><p><?php
|
683 |
|
|
|
|
|
|
|
|
|
|
|
684 |
// Users were found
|
685 |
-
if ( ! empty( $user_ids ) ) :
|
686 |
|
687 |
-
|
688 |
-
echo get_avatar(
|
689 |
-
|
690 |
|
691 |
// No users
|
692 |
else :
|
@@ -702,6 +742,7 @@ function bbp_topic_favorites_metabox( $post ) {
|
|
702 |
* See who subscribed to a topic
|
703 |
*
|
704 |
* @since 2.6.0 bbPress (r6197)
|
|
|
705 |
*/
|
706 |
function bbp_topic_subscriptions_metabox( $post ) {
|
707 |
|
@@ -711,12 +752,17 @@ function bbp_topic_subscriptions_metabox( $post ) {
|
|
711 |
// Output
|
712 |
?><p><?php
|
713 |
|
|
|
|
|
|
|
|
|
|
|
714 |
// Users were found
|
715 |
-
if ( ! empty( $user_ids ) ) :
|
716 |
|
717 |
-
|
718 |
-
echo get_avatar(
|
719 |
-
|
720 |
|
721 |
// No users
|
722 |
else :
|
@@ -732,6 +778,7 @@ function bbp_topic_subscriptions_metabox( $post ) {
|
|
732 |
* See who subscribed to a forum
|
733 |
*
|
734 |
* @since 2.6.0 bbPress (r6197)
|
|
|
735 |
*/
|
736 |
function bbp_forum_subscriptions_metabox( $post ) {
|
737 |
|
@@ -741,12 +788,17 @@ function bbp_forum_subscriptions_metabox( $post ) {
|
|
741 |
// Output
|
742 |
?><p><?php
|
743 |
|
|
|
|
|
|
|
|
|
|
|
744 |
// Users were found
|
745 |
-
if ( ! empty( $user_ids ) ) :
|
746 |
|
747 |
-
|
748 |
-
echo get_avatar(
|
749 |
-
|
750 |
|
751 |
// No users
|
752 |
else :
|
50 |
$elements[] = '<a href="' . esc_url( $link ) . '" class="bbp-glance-topic-tags">' . esc_html( $text ) . '</a>';
|
51 |
}
|
52 |
|
53 |
+
// Filter & return
|
54 |
return apply_filters( 'bbp_dashboard_at_a_glance', $elements, $r );
|
55 |
}
|
56 |
|
281 |
/** Forums ********************************************************************/
|
282 |
|
283 |
/**
|
284 |
+
* Forum meta-box
|
285 |
*
|
286 |
+
* The meta-box that holds all of the additional forum information
|
287 |
*
|
288 |
* @since 2.0.0 bbPress (r2744)
|
289 |
*
|
356 |
// Output-related
|
357 |
'select_id' => 'parent_id',
|
358 |
'options_only' => false,
|
359 |
+
'show_none' => esc_html__( '— No parent —', 'bbpress' ),
|
360 |
'disable_categories' => false,
|
361 |
'disabled' => ''
|
362 |
) ); ?>
|
378 |
/** Topics ********************************************************************/
|
379 |
|
380 |
/**
|
381 |
+
* Topic meta-box
|
382 |
*
|
383 |
+
* The meta-box that holds all of the additional topic information
|
384 |
*
|
385 |
* @since 2.0.0 bbPress (r2464)
|
386 |
*
|
435 |
// Output-related
|
436 |
'select_id' => 'parent_id',
|
437 |
'options_only' => false,
|
438 |
+
'show_none' => esc_html__( '— No forum —', 'bbpress' ),
|
439 |
'disable_categories' => current_user_can( 'edit_forums' ),
|
440 |
'disabled' => ''
|
441 |
) ); ?>
|
451 |
/** Replies *******************************************************************/
|
452 |
|
453 |
/**
|
454 |
+
* Reply meta-box
|
455 |
*
|
456 |
+
* The meta-box that holds all of the additional reply information
|
457 |
*
|
458 |
* @since 2.0.0 bbPress (r2464)
|
459 |
*
|
502 |
// Output-related
|
503 |
'select_id' => 'bbp_forum_id',
|
504 |
'options_only' => false,
|
505 |
+
'show_none' => esc_html__( '— No reply —', 'bbpress' ),
|
506 |
'disable_categories' => current_user_can( 'edit_forums' ),
|
507 |
'disabled' => ''
|
508 |
) ); ?>
|
547 |
}
|
548 |
|
549 |
/**
|
550 |
+
* Output the topic replies meta-box
|
551 |
*
|
552 |
* @since 2.6.0 bbPress (r5886)
|
553 |
*
|
564 |
|
565 |
// Pull in the list table class
|
566 |
if ( ! class_exists( 'BBP_Topic_Replies_List_Table' ) ) {
|
567 |
+
require_once bbpress()->admin->admin_dir . '/classes/class-bbp-topic-replies-list-table.php';
|
568 |
}
|
569 |
|
570 |
// Look for pagination value
|
588 |
/** Users *********************************************************************/
|
589 |
|
590 |
/**
|
591 |
+
* Anonymous user information meta-box
|
592 |
*
|
593 |
* @since 2.0.0 bbPress (r2828)
|
594 |
*
|
642 |
}
|
643 |
|
644 |
/**
|
645 |
+
* Moderator assignment meta-box
|
646 |
*
|
647 |
* @since 2.6.0 bbPress (r2828)
|
648 |
*
|
658 |
? implode( ', ', array_map( 'esc_attr', $user_nicenames ) )
|
659 |
: ''; ?>
|
660 |
|
661 |
+
<label class="screen-reader-text" for="bbp_moderators"><?php esc_html_e( 'Moderators', 'bbpress' ); ?></label>
|
662 |
+
<input type="text" id="bbp_moderators" name="bbp_moderators" value="<?php echo esc_attr( $moderators ); ?>" />
|
663 |
+
<p class="howto"><?php esc_html_e( 'Separate user-names with commas', 'bbpress' ); ?></p>
|
|
|
664 |
|
665 |
<?php
|
666 |
|
667 |
do_action( 'bbp_moderator_assignment_metabox', $post );
|
668 |
}
|
669 |
|
670 |
+
/**
|
671 |
+
* See who engaged with a topic
|
672 |
+
*
|
673 |
+
* @since 2.6.0 bbPress (r6333)
|
674 |
+
*/
|
675 |
+
function bbp_topic_engagements_metabox( $post ) {
|
676 |
+
|
677 |
+
// Get user IDs
|
678 |
+
$user_ids = bbp_get_topic_engagements( $post->ID );
|
679 |
+
|
680 |
+
// Output
|
681 |
+
?><p><?php
|
682 |
+
|
683 |
+
// Relationships
|
684 |
+
$args = array(
|
685 |
+
'include' => $user_ids
|
686 |
+
);
|
687 |
+
|
688 |
+
// Users were found
|
689 |
+
if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) :
|
690 |
+
|
691 |
+
while ( bbp_users() ) : bbp_the_user();
|
692 |
+
echo get_avatar( bbp_get_user_id(), 32 );
|
693 |
+
endwhile;
|
694 |
+
|
695 |
+
// No users
|
696 |
+
else :
|
697 |
+
esc_html_e( 'No users have engaged to this topic.', 'bbpress' );
|
698 |
+
endif;
|
699 |
+
|
700 |
+
?></p><?php
|
701 |
+
|
702 |
+
do_action( 'bbp_topic_engagements_metabox', $post );
|
703 |
+
}
|
704 |
+
|
705 |
/**
|
706 |
* See who marked a topic as a favorite
|
707 |
*
|
708 |
* @since 2.6.0 bbPress (r6197)
|
709 |
+
* @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query
|
710 |
*/
|
711 |
function bbp_topic_favorites_metabox( $post ) {
|
712 |
|
716 |
// Output
|
717 |
?><p><?php
|
718 |
|
719 |
+
// Relationships
|
720 |
+
$args = array(
|
721 |
+
'include' => $user_ids
|
722 |
+
);
|
723 |
+
|
724 |
// Users were found
|
725 |
+
if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) :
|
726 |
|
727 |
+
while ( bbp_users() ) : bbp_the_user();
|
728 |
+
echo get_avatar( bbp_get_user_id(), 32 );
|
729 |
+
endwhile;
|
730 |
|
731 |
// No users
|
732 |
else :
|
742 |
* See who subscribed to a topic
|
743 |
*
|
744 |
* @since 2.6.0 bbPress (r6197)
|
745 |
+
* @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query
|
746 |
*/
|
747 |
function bbp_topic_subscriptions_metabox( $post ) {
|
748 |
|
752 |
// Output
|
753 |
?><p><?php
|
754 |
|
755 |
+
// Relationships
|
756 |
+
$args = array(
|
757 |
+
'include' => $user_ids
|
758 |
+
);
|
759 |
+
|
760 |
// Users were found
|
761 |
+
if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) :
|
762 |
|
763 |
+
while ( bbp_users() ) : bbp_the_user();
|
764 |
+
echo get_avatar( bbp_get_user_id(), 32 );
|
765 |
+
endwhile;
|
766 |
|
767 |
// No users
|
768 |
else :
|
778 |
* See who subscribed to a forum
|
779 |
*
|
780 |
* @since 2.6.0 bbPress (r6197)
|
781 |
+
* @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query
|
782 |
*/
|
783 |
function bbp_forum_subscriptions_metabox( $post ) {
|
784 |
|
788 |
// Output
|
789 |
?><p><?php
|
790 |
|
791 |
+
// Relationships
|
792 |
+
$args = array(
|
793 |
+
'include' => $user_ids
|
794 |
+
);
|
795 |
+
|
796 |
// Users were found
|
797 |
+
if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) :
|
798 |
|
799 |
+
while ( bbp_users() ) : bbp_the_user();
|
800 |
+
echo get_avatar( bbp_get_user_id(), 32 );
|
801 |
+
endwhile;
|
802 |
|
803 |
// No users
|
804 |
else :
|
includes/admin/replies.php
CHANGED
@@ -76,7 +76,7 @@ class BBP_Replies_Admin {
|
|
76 |
add_action( 'manage_' . $this->post_type . '_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
|
77 |
add_filter( 'post_row_actions', array( $this, 'row_actions' ), 10, 2 );
|
78 |
|
79 |
-
// Reply
|
80 |
add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) );
|
81 |
add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
|
82 |
add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) );
|
@@ -328,12 +328,12 @@ class BBP_Replies_Admin {
|
|
328 |
}
|
329 |
|
330 |
/**
|
331 |
-
* Add the reply attributes
|
332 |
*
|
333 |
* @since 2.0.0 bbPress (r2746)
|
334 |
*
|
335 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
336 |
-
* @uses add_meta_box() To add the
|
337 |
* @uses do_action() Calls 'bbp_reply_attributes_metabox'
|
338 |
*/
|
339 |
public function attributes_metabox() {
|
@@ -348,7 +348,7 @@ class BBP_Replies_Admin {
|
|
348 |
}
|
349 |
|
350 |
/**
|
351 |
-
* Add the author info
|
352 |
*
|
353 |
* Allows editing of information about an author
|
354 |
*
|
@@ -358,7 +358,7 @@ class BBP_Replies_Admin {
|
|
358 |
* @uses bbp_get_reply() To get the reply
|
359 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
360 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
361 |
-
* @uses add_meta_box() To add the
|
362 |
*/
|
363 |
public function author_metabox() {
|
364 |
|
@@ -367,7 +367,7 @@ class BBP_Replies_Admin {
|
|
367 |
return;
|
368 |
}
|
369 |
|
370 |
-
// Add the
|
371 |
add_meta_box(
|
372 |
'bbp_author_metabox',
|
373 |
__( 'Author Information', 'bbpress' ),
|
@@ -379,7 +379,7 @@ class BBP_Replies_Admin {
|
|
379 |
}
|
380 |
|
381 |
/**
|
382 |
-
* Remove comments & discussion
|
383 |
*
|
384 |
* @since 2.6.0 bbPress (r6186)
|
385 |
*/
|
@@ -424,8 +424,8 @@ class BBP_Replies_Admin {
|
|
424 |
return $reply_id;
|
425 |
}
|
426 |
|
427 |
-
//
|
428 |
-
if ( !current_user_can( 'edit_reply', $reply_id ) ) {
|
429 |
return $reply_id;
|
430 |
}
|
431 |
|
@@ -472,57 +472,81 @@ class BBP_Replies_Admin {
|
|
472 |
*/
|
473 |
public function toggle_reply() {
|
474 |
|
475 |
-
//
|
476 |
-
if ( bbp_is_get_request()
|
477 |
-
|
478 |
-
|
479 |
-
$success = false; // Flag
|
480 |
-
$post_data = array( 'ID' => $reply_id ); // Prelim array
|
481 |
-
|
482 |
-
// Get reply and die if empty
|
483 |
-
$reply = bbp_get_reply( $reply_id );
|
484 |
-
if ( empty( $reply ) ) {
|
485 |
-
wp_die( __( 'The reply was not found.', 'bbpress' ) );
|
486 |
-
}
|
487 |
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
492 |
|
493 |
-
|
494 |
-
|
495 |
-
|
|
|
|
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
|
|
|
500 |
|
501 |
-
|
|
|
|
|
|
|
502 |
|
503 |
-
|
504 |
-
|
|
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
|
|
|
|
|
|
|
|
509 |
|
510 |
-
|
511 |
-
}
|
512 |
|
513 |
-
|
|
|
514 |
|
515 |
-
|
516 |
-
$message
|
517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
|
519 |
-
|
520 |
-
|
|
|
|
|
|
|
521 |
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
}
|
527 |
|
528 |
/**
|
@@ -541,62 +565,106 @@ class BBP_Replies_Admin {
|
|
541 |
*/
|
542 |
public function toggle_reply_notice() {
|
543 |
|
544 |
-
//
|
545 |
-
if ( bbp_is_get_request()
|
546 |
-
|
547 |
-
|
548 |
-
$is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
|
549 |
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
|
|
554 |
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
case 'unspammed' :
|
571 |
-
$message = ( $is_failure === true )
|
572 |
-
? sprintf( __( 'There was a problem unmarking the reply "%1$s" as spam.', 'bbpress' ), $reply_title )
|
573 |
-
: sprintf( __( 'Reply "%1$s" successfully unmarked as spam.', 'bbpress' ), $reply_title );
|
574 |
-
break;
|
575 |
-
|
576 |
-
case 'approved' :
|
577 |
-
$message = ( $is_failure === true )
|
578 |
-
? sprintf( __( 'There was a problem approving the reply "%1$s".', 'bbpress' ), $reply_title )
|
579 |
-
: sprintf( __( 'Reply "%1$s" successfully approved.', 'bbpress' ), $reply_title );
|
580 |
-
break;
|
581 |
-
|
582 |
-
case 'unapproved' :
|
583 |
-
$message = ( $is_failure === true )
|
584 |
-
? sprintf( __( 'There was a problem unapproving the reply "%1$s".', 'bbpress' ), $reply_title )
|
585 |
-
: sprintf( __( 'Reply "%1$s" successfully unapproved.', 'bbpress' ), $reply_title );
|
586 |
-
break;
|
587 |
-
}
|
588 |
|
589 |
-
|
590 |
-
|
|
|
|
|
|
|
|
|
591 |
|
592 |
-
|
|
|
|
|
|
|
|
|
593 |
|
594 |
-
|
595 |
-
|
596 |
-
|
|
|
|
|
597 |
|
598 |
-
|
|
|
|
|
|
|
|
|
599 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
}
|
601 |
|
602 |
/**
|
@@ -619,6 +687,7 @@ class BBP_Replies_Admin {
|
|
619 |
'bbp_reply_created' => __( 'Created', 'bbpress' ),
|
620 |
);
|
621 |
|
|
|
622 |
return apply_filters( 'bbp_admin_replies_column_headers', $columns );
|
623 |
}
|
624 |
|
@@ -660,21 +729,21 @@ class BBP_Replies_Admin {
|
|
660 |
// Topic
|
661 |
case 'bbp_reply_topic' :
|
662 |
|
663 |
-
//
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
$topic_title = bbp_get_topic_title( $topic_id );
|
668 |
-
if ( empty( $topic_title ) ) {
|
669 |
-
$topic_title = esc_html__( 'No Topic', 'bbpress' );
|
670 |
-
}
|
671 |
|
672 |
-
|
|
|
673 |
echo $topic_title;
|
674 |
|
675 |
-
//
|
676 |
} else {
|
677 |
-
|
|
|
|
|
|
|
678 |
}
|
679 |
|
680 |
break;
|
@@ -686,35 +755,35 @@ class BBP_Replies_Admin {
|
|
686 |
$reply_forum_id = bbp_get_reply_forum_id( $reply_id );
|
687 |
$topic_forum_id = bbp_get_topic_forum_id( $topic_id );
|
688 |
|
689 |
-
//
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
$forum_title = bbp_get_forum_title( $reply_forum_id );
|
694 |
-
if ( empty( $forum_title ) ) {
|
695 |
-
$forum_title = esc_html__( 'No Forum', 'bbpress' );
|
696 |
-
}
|
697 |
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
}
|
703 |
}
|
|
|
704 |
|
705 |
-
|
|
|
706 |
echo $forum_title;
|
707 |
|
708 |
// Reply has no forum
|
709 |
} else {
|
710 |
-
|
|
|
|
|
|
|
711 |
}
|
712 |
|
713 |
break;
|
714 |
|
715 |
// Author
|
716 |
case 'bbp_reply_author' :
|
717 |
-
bbp_reply_author_display_name
|
718 |
break;
|
719 |
|
720 |
// Freshness
|
@@ -763,11 +832,19 @@ class BBP_Replies_Admin {
|
|
763 |
|
764 |
unset( $actions['inline hide-if-no-js'] );
|
765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
// Reply view links to topic
|
767 |
-
$actions['view'] = '<a href="' . esc_url(
|
768 |
|
769 |
// User cannot view replies in trash
|
770 |
-
if ( ( bbp_get_trash_status_id() === $reply->post_status ) && !current_user_can( 'view_trash' ) ) {
|
771 |
unset( $actions['view'] );
|
772 |
}
|
773 |
|
@@ -783,7 +860,7 @@ class BBP_Replies_Admin {
|
|
783 |
}
|
784 |
|
785 |
// Show the 'spam' link on published and pending replies and 'not spam' on spammed replies
|
786 |
-
if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_pending_status_id(), bbp_get_spam_status_id() ) ) ) {
|
787 |
$spam_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID );
|
788 |
if ( bbp_is_reply_spam( $reply->ID ) ) {
|
789 |
$actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';
|
@@ -795,15 +872,17 @@ class BBP_Replies_Admin {
|
|
795 |
|
796 |
// Trash
|
797 |
if ( current_user_can( 'delete_reply', $reply->ID ) ) {
|
|
|
|
|
798 |
if ( bbp_get_trash_status_id() === $reply->post_status ) {
|
799 |
$post_type_object = get_post_type_object( bbp_get_reply_post_type() );
|
800 |
-
$actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url(
|
801 |
-
} elseif (
|
802 |
-
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url(
|
803 |
}
|
804 |
|
805 |
-
if ( bbp_get_trash_status_id() === $reply->post_status ||
|
806 |
-
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url(
|
807 |
} elseif ( bbp_get_spam_status_id() === $reply->post_status ) {
|
808 |
unset( $actions['trash'] );
|
809 |
}
|
@@ -843,7 +922,7 @@ class BBP_Replies_Admin {
|
|
843 |
// Show the forums dropdown
|
844 |
bbp_dropdown( array(
|
845 |
'selected' => $selected,
|
846 |
-
'show_none' =>
|
847 |
) );
|
848 |
}
|
849 |
|
76 |
add_action( 'manage_' . $this->post_type . '_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
|
77 |
add_filter( 'post_row_actions', array( $this, 'row_actions' ), 10, 2 );
|
78 |
|
79 |
+
// Reply meta-box actions
|
80 |
add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) );
|
81 |
add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
|
82 |
add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) );
|
328 |
}
|
329 |
|
330 |
/**
|
331 |
+
* Add the reply attributes meta-box
|
332 |
*
|
333 |
* @since 2.0.0 bbPress (r2746)
|
334 |
*
|
335 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
336 |
+
* @uses add_meta_box() To add the meta-box
|
337 |
* @uses do_action() Calls 'bbp_reply_attributes_metabox'
|
338 |
*/
|
339 |
public function attributes_metabox() {
|
348 |
}
|
349 |
|
350 |
/**
|
351 |
+
* Add the author info meta-box
|
352 |
*
|
353 |
* Allows editing of information about an author
|
354 |
*
|
358 |
* @uses bbp_get_reply() To get the reply
|
359 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
360 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
361 |
+
* @uses add_meta_box() To add the meta-box
|
362 |
*/
|
363 |
public function author_metabox() {
|
364 |
|
367 |
return;
|
368 |
}
|
369 |
|
370 |
+
// Add the meta-box
|
371 |
add_meta_box(
|
372 |
'bbp_author_metabox',
|
373 |
__( 'Author Information', 'bbpress' ),
|
379 |
}
|
380 |
|
381 |
/**
|
382 |
+
* Remove comments & discussion meta-boxes if comments are not supported
|
383 |
*
|
384 |
* @since 2.6.0 bbPress (r6186)
|
385 |
*/
|
424 |
return $reply_id;
|
425 |
}
|
426 |
|
427 |
+
// Bail if current user cannot edit this reply
|
428 |
+
if ( ! current_user_can( 'edit_reply', $reply_id ) ) {
|
429 |
return $reply_id;
|
430 |
}
|
431 |
|
472 |
*/
|
473 |
public function toggle_reply() {
|
474 |
|
475 |
+
// Bail if not a topic toggle action
|
476 |
+
if ( ! bbp_is_get_request() || empty( $_GET['action'] ) || empty( $_GET['reply_id'] ) ) {
|
477 |
+
return;
|
478 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
|
480 |
+
// Bail if not an allowed action
|
481 |
+
$action = sanitize_key( $_GET['action'] );
|
482 |
+
if ( empty( $action ) || ! in_array( $action, $this->get_allowed_action_toggles(), true ) ) {
|
483 |
+
return;
|
484 |
+
}
|
485 |
|
486 |
+
// Get reply and die if empty
|
487 |
+
$reply_id = bbp_get_reply_id( $_GET['reply_id'] );
|
488 |
+
if ( ! bbp_get_reply( $reply_id ) ) {
|
489 |
+
wp_die( __( 'The reply was not found.', 'bbpress' ) );
|
490 |
+
}
|
491 |
|
492 |
+
// What is the user doing here?
|
493 |
+
if ( ! current_user_can( 'moderate', $reply_id ) ) {
|
494 |
+
wp_die( __( 'You do not have permission to do that.', 'bbpress' ) );
|
495 |
+
}
|
496 |
|
497 |
+
// Defaults
|
498 |
+
$post_data = array( 'ID' => $reply_id );
|
499 |
+
$message = '';
|
500 |
+
$success = false;
|
501 |
|
502 |
+
switch ( $action ) {
|
503 |
+
case 'bbp_toggle_reply_approve' :
|
504 |
+
check_admin_referer( 'approve-reply_' . $reply_id );
|
505 |
|
506 |
+
$is_approve = bbp_is_reply_pending( $reply_id );
|
507 |
+
$message = ( true === $is_approve )
|
508 |
+
? 'approved'
|
509 |
+
: 'unapproved';
|
510 |
+
$success = ( true === $is_approve )
|
511 |
+
? bbp_approve_reply( $reply_id )
|
512 |
+
: bbp_unapprove_reply( $reply_id );
|
513 |
|
514 |
+
break;
|
|
|
515 |
|
516 |
+
case 'bbp_toggle_reply_spam' :
|
517 |
+
check_admin_referer( 'spam-reply_' . $reply_id );
|
518 |
|
519 |
+
$is_spam = bbp_is_reply_spam( $reply_id );
|
520 |
+
$message = ( true === $is_spam )
|
521 |
+
? 'unspammed'
|
522 |
+
: 'spammed';
|
523 |
+
$success = ( true === $is_spam )
|
524 |
+
? bbp_unspam_reply( $reply_id )
|
525 |
+
: bbp_spam_reply( $reply_id );
|
526 |
+
|
527 |
+
break;
|
528 |
+
}
|
529 |
|
530 |
+
// Setup the message
|
531 |
+
$retval = array(
|
532 |
+
'bbp_reply_toggle_notice' => $message,
|
533 |
+
'reply_id' => $reply_id
|
534 |
+
);
|
535 |
|
536 |
+
// Prepare for failure
|
537 |
+
if ( ( false === $success ) || is_wp_error( $success ) ) {
|
538 |
+
$retval['failed'] = '1';
|
539 |
}
|
540 |
+
|
541 |
+
// Filter all message args
|
542 |
+
$retval = apply_filters( 'bbp_toggle_reply_action_admin', $retval, $reply_id, $action );
|
543 |
+
|
544 |
+
// Do additional reply toggle actions (admin side)
|
545 |
+
do_action( 'bbp_toggle_reply_admin', $success, $post_data, $action, $retval );
|
546 |
+
|
547 |
+
// Redirect back to the reply
|
548 |
+
$redirect = add_query_arg( $retval, remove_query_arg( array( 'action', 'reply_id' ) ) );
|
549 |
+
bbp_redirect( $redirect );
|
550 |
}
|
551 |
|
552 |
/**
|
565 |
*/
|
566 |
public function toggle_reply_notice() {
|
567 |
|
568 |
+
// Bail if missing reply toggle action
|
569 |
+
if ( ! bbp_is_get_request() || empty( $_GET['reply_id'] ) || empty( $_GET['bbp_reply_toggle_notice'] ) ) {
|
570 |
+
return;
|
571 |
+
}
|
|
|
572 |
|
573 |
+
// Bail if not an allowed notice
|
574 |
+
$notice = sanitize_key( $_GET['bbp_reply_toggle_notice'] );
|
575 |
+
if ( empty( $notice ) || ! in_array( $notice, $this->get_allowed_notice_toggles(), true ) ) {
|
576 |
+
return;
|
577 |
+
}
|
578 |
|
579 |
+
// Bail if no reply_id or notice
|
580 |
+
$reply_id = bbp_get_reply_id( $_GET['reply_id'] );
|
581 |
+
if ( empty( $reply_id ) ) {
|
582 |
+
return;
|
583 |
+
}
|
584 |
|
585 |
+
// Bail if reply is missing
|
586 |
+
if ( ! bbp_get_reply( $reply_id ) ) {
|
587 |
+
return;
|
588 |
+
}
|
589 |
+
|
590 |
+
// Use the title in the responses
|
591 |
+
$reply_title = bbp_get_reply_title( $reply_id );
|
592 |
+
$is_failure = ! empty( $_GET['failed'] );
|
593 |
+
$message = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
|
595 |
+
switch ( $notice ) {
|
596 |
+
case 'spammed' :
|
597 |
+
$message = ( $is_failure === true )
|
598 |
+
? sprintf( __( 'There was a problem marking the reply "%1$s" as spam.', 'bbpress' ), $reply_title )
|
599 |
+
: sprintf( __( 'Reply "%1$s" successfully marked as spam.', 'bbpress' ), $reply_title );
|
600 |
+
break;
|
601 |
|
602 |
+
case 'unspammed' :
|
603 |
+
$message = ( $is_failure === true )
|
604 |
+
? sprintf( __( 'There was a problem unmarking the reply "%1$s" as spam.', 'bbpress' ), $reply_title )
|
605 |
+
: sprintf( __( 'Reply "%1$s" successfully unmarked as spam.', 'bbpress' ), $reply_title );
|
606 |
+
break;
|
607 |
|
608 |
+
case 'approved' :
|
609 |
+
$message = ( $is_failure === true )
|
610 |
+
? sprintf( __( 'There was a problem approving the reply "%1$s".', 'bbpress' ), $reply_title )
|
611 |
+
: sprintf( __( 'Reply "%1$s" successfully approved.', 'bbpress' ), $reply_title );
|
612 |
+
break;
|
613 |
|
614 |
+
case 'unapproved' :
|
615 |
+
$message = ( $is_failure === true )
|
616 |
+
? sprintf( __( 'There was a problem unapproving the reply "%1$s".', 'bbpress' ), $reply_title )
|
617 |
+
: sprintf( __( 'Reply "%1$s" successfully unapproved.', 'bbpress' ), $reply_title );
|
618 |
+
break;
|
619 |
}
|
620 |
+
|
621 |
+
// Do additional reply toggle notice filters (admin side)
|
622 |
+
$message = apply_filters( 'bbp_toggle_reply_notice_admin', $message, $reply_id, $notice, $is_failure );
|
623 |
+
$class = ( $is_failure === true )
|
624 |
+
? 'error'
|
625 |
+
: 'updated';
|
626 |
+
|
627 |
+
?>
|
628 |
+
|
629 |
+
<div id="message" class="<?php echo esc_html( $class ); ?> fade">
|
630 |
+
<p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
|
631 |
+
</div>
|
632 |
+
|
633 |
+
<?php
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Returns an array of notice toggles
|
638 |
+
*
|
639 |
+
* @since 2.6.0 bbPress (r6396)
|
640 |
+
*
|
641 |
+
* @return array
|
642 |
+
*/
|
643 |
+
private function get_allowed_notice_toggles() {
|
644 |
+
|
645 |
+
// Filter & return
|
646 |
+
return apply_filters( 'bbp_admin_replies_allowed_notice_toggles', array(
|
647 |
+
'spammed',
|
648 |
+
'unspammed',
|
649 |
+
'approved',
|
650 |
+
'unapproved'
|
651 |
+
) );
|
652 |
+
}
|
653 |
+
|
654 |
+
/**
|
655 |
+
* Returns an array of notice toggles
|
656 |
+
*
|
657 |
+
* @since 2.6.0 bbPress (r6396)
|
658 |
+
*
|
659 |
+
* @return array
|
660 |
+
*/
|
661 |
+
private function get_allowed_action_toggles() {
|
662 |
+
|
663 |
+
// Filter & return
|
664 |
+
return apply_filters( 'bbp_admin_replies_allowed_action_toggles', array(
|
665 |
+
'bbp_toggle_reply_spam',
|
666 |
+
'bbp_toggle_reply_approve'
|
667 |
+
) );
|
668 |
}
|
669 |
|
670 |
/**
|
687 |
'bbp_reply_created' => __( 'Created', 'bbpress' ),
|
688 |
);
|
689 |
|
690 |
+
// Filter & return
|
691 |
return apply_filters( 'bbp_admin_replies_column_headers', $columns );
|
692 |
}
|
693 |
|
729 |
// Topic
|
730 |
case 'bbp_reply_topic' :
|
731 |
|
732 |
+
// Get title
|
733 |
+
$topic_title = ! empty( $topic_id )
|
734 |
+
? bbp_get_topic_title( $topic_id )
|
735 |
+
: '';
|
|
|
|
|
|
|
|
|
736 |
|
737 |
+
// Output topic name
|
738 |
+
if ( ! empty( $topic_title ) ) {
|
739 |
echo $topic_title;
|
740 |
|
741 |
+
// Output dash
|
742 |
} else {
|
743 |
+
?>
|
744 |
+
<span aria-hidden="true">—</span>
|
745 |
+
<span class="screen-reader-text"><?php esc_html_e( 'No topic', 'bbpress' ); ?></span>
|
746 |
+
<?php
|
747 |
}
|
748 |
|
749 |
break;
|
755 |
$reply_forum_id = bbp_get_reply_forum_id( $reply_id );
|
756 |
$topic_forum_id = bbp_get_topic_forum_id( $topic_id );
|
757 |
|
758 |
+
// Forum Title
|
759 |
+
$forum_title = ! empty( $reply_forum_id )
|
760 |
+
? bbp_get_forum_title( $reply_forum_id )
|
761 |
+
: '';
|
|
|
|
|
|
|
|
|
762 |
|
763 |
+
// Alert capable users of reply forum mismatch
|
764 |
+
if ( $reply_forum_id !== $topic_forum_id ) {
|
765 |
+
if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate', $reply_id ) ) {
|
766 |
+
$forum_title .= '<div class="attention">' . esc_html__( '(Mismatch)', 'bbpress' ) . '</div>';
|
|
|
767 |
}
|
768 |
+
}
|
769 |
|
770 |
+
// Output forum name
|
771 |
+
if ( ! empty( $forum_title ) ) {
|
772 |
echo $forum_title;
|
773 |
|
774 |
// Reply has no forum
|
775 |
} else {
|
776 |
+
?>
|
777 |
+
<span aria-hidden="true">—</span>
|
778 |
+
<span class="screen-reader-text"><?php esc_html_e( 'No forum', 'bbpress' ); ?></span>
|
779 |
+
<?php
|
780 |
}
|
781 |
|
782 |
break;
|
783 |
|
784 |
// Author
|
785 |
case 'bbp_reply_author' :
|
786 |
+
bbp_reply_author_display_name( $reply_id );
|
787 |
break;
|
788 |
|
789 |
// Freshness
|
832 |
|
833 |
unset( $actions['inline hide-if-no-js'] );
|
834 |
|
835 |
+
// View link
|
836 |
+
$view_link = bbp_get_reply_url( $reply->ID );
|
837 |
+
|
838 |
+
// Maybe add view=all
|
839 |
+
if ( ! in_array( $reply->post_status, array( bbp_get_closed_status_id(), bbp_get_public_status_id() ), true ) ) {
|
840 |
+
$view_link = bbp_add_view_all( $view_link, true );
|
841 |
+
}
|
842 |
+
|
843 |
// Reply view links to topic
|
844 |
+
$actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';
|
845 |
|
846 |
// User cannot view replies in trash
|
847 |
+
if ( ( bbp_get_trash_status_id() === $reply->post_status ) && ! current_user_can( 'view_trash' ) ) {
|
848 |
unset( $actions['view'] );
|
849 |
}
|
850 |
|
860 |
}
|
861 |
|
862 |
// Show the 'spam' link on published and pending replies and 'not spam' on spammed replies
|
863 |
+
if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_pending_status_id(), bbp_get_spam_status_id() ), true ) ) {
|
864 |
$spam_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID );
|
865 |
if ( bbp_is_reply_spam( $reply->ID ) ) {
|
866 |
$actions['spam'] = '<a href="' . esc_url( $spam_uri ) . '" title="' . esc_attr__( 'Mark the reply as not spam', 'bbpress' ) . '">' . esc_html__( 'Not spam', 'bbpress' ) . '</a>';
|
872 |
|
873 |
// Trash
|
874 |
if ( current_user_can( 'delete_reply', $reply->ID ) ) {
|
875 |
+
$trash_days = bbp_get_trash_days( bbp_get_reply_post_type() );
|
876 |
+
|
877 |
if ( bbp_get_trash_status_id() === $reply->post_status ) {
|
878 |
$post_type_object = get_post_type_object( bbp_get_reply_post_type() );
|
879 |
+
$actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $reply->ID ) ), 'untrash-post_' . $reply->ID ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>";
|
880 |
+
} elseif ( ! empty( $trash_days ) ) {
|
881 |
+
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $reply->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";
|
882 |
}
|
883 |
|
884 |
+
if ( ( bbp_get_trash_status_id() === $reply->post_status ) || empty( $trash_days ) ) {
|
885 |
+
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $reply->ID, '', true ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";
|
886 |
} elseif ( bbp_get_spam_status_id() === $reply->post_status ) {
|
887 |
unset( $actions['trash'] );
|
888 |
}
|
922 |
// Show the forums dropdown
|
923 |
bbp_dropdown( array(
|
924 |
'selected' => $selected,
|
925 |
+
'show_none' => esc_html__( 'In all forums', 'bbpress' )
|
926 |
) );
|
927 |
}
|
928 |
|
includes/admin/settings.php
CHANGED
@@ -20,54 +20,56 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
* @return array
|
21 |
*/
|
22 |
function bbp_admin_get_settings_sections() {
|
|
|
|
|
23 |
return (array) apply_filters( 'bbp_admin_get_settings_sections', array(
|
24 |
'bbp_settings_users' => array(
|
25 |
-
'title' =>
|
26 |
'callback' => 'bbp_admin_setting_callback_user_section',
|
27 |
'page' => 'discussion'
|
28 |
),
|
29 |
'bbp_settings_features' => array(
|
30 |
-
'title' =>
|
31 |
'callback' => 'bbp_admin_setting_callback_features_section',
|
32 |
'page' => 'discussion'
|
33 |
),
|
34 |
'bbp_settings_theme_compat' => array(
|
35 |
-
'title' =>
|
36 |
'callback' => 'bbp_admin_setting_callback_subtheme_section',
|
37 |
'page' => 'general'
|
38 |
),
|
39 |
'bbp_settings_per_page' => array(
|
40 |
-
'title' =>
|
41 |
'callback' => 'bbp_admin_setting_callback_per_page_section',
|
42 |
'page' => 'reading'
|
43 |
),
|
44 |
'bbp_settings_per_rss_page' => array(
|
45 |
-
'title' =>
|
46 |
'callback' => 'bbp_admin_setting_callback_per_rss_page_section',
|
47 |
'page' => 'reading',
|
48 |
),
|
49 |
'bbp_settings_root_slugs' => array(
|
50 |
-
'title' =>
|
51 |
'callback' => 'bbp_admin_setting_callback_root_slug_section',
|
52 |
'page' => 'permalink'
|
53 |
),
|
54 |
'bbp_settings_single_slugs' => array(
|
55 |
-
'title' =>
|
56 |
'callback' => 'bbp_admin_setting_callback_single_slug_section',
|
57 |
'page' => 'permalink',
|
58 |
),
|
59 |
'bbp_settings_user_slugs' => array(
|
60 |
-
'title' =>
|
61 |
'callback' => 'bbp_admin_setting_callback_user_slug_section',
|
62 |
'page' => 'permalink',
|
63 |
),
|
64 |
'bbp_settings_buddypress' => array(
|
65 |
-
'title' =>
|
66 |
'callback' => 'bbp_admin_setting_callback_buddypress_section',
|
67 |
'page' => 'buddypress',
|
68 |
),
|
69 |
'bbp_settings_akismet' => array(
|
70 |
-
'title' =>
|
71 |
'callback' => 'bbp_admin_setting_callback_akismet_section',
|
72 |
'page' => 'discussion'
|
73 |
)
|
@@ -82,47 +84,61 @@ function bbp_admin_get_settings_sections() {
|
|
82 |
* @return type
|
83 |
*/
|
84 |
function bbp_admin_get_settings_fields() {
|
|
|
|
|
85 |
return (array) apply_filters( 'bbp_admin_get_settings_fields', array(
|
86 |
|
87 |
/** User Section ******************************************************/
|
88 |
|
89 |
'bbp_settings_users' => array(
|
90 |
|
91 |
-
//
|
92 |
-
'
|
93 |
-
'
|
94 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
'sanitize_callback' => 'intval',
|
96 |
-
'args' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
),
|
98 |
|
99 |
// Throttle setting
|
100 |
'_bbp_throttle_time' => array(
|
101 |
-
'title' =>
|
102 |
'callback' => 'bbp_admin_setting_callback_throttle',
|
103 |
'sanitize_callback' => 'intval',
|
104 |
-
'args' => array(
|
105 |
),
|
106 |
|
107 |
-
// Allow
|
108 |
-
'
|
109 |
-
'title' => __( 'Anonymous posting', 'bbpress' ),
|
110 |
-
'callback' => 'bbp_admin_setting_callback_anonymous',
|
111 |
'sanitize_callback' => 'intval',
|
112 |
'args' => array()
|
113 |
),
|
114 |
|
115 |
-
//
|
116 |
-
'
|
117 |
-
'title' =>
|
118 |
-
'callback' => '
|
119 |
'sanitize_callback' => 'intval',
|
120 |
'args' => array()
|
121 |
),
|
122 |
|
123 |
-
// Allow
|
124 |
-
'
|
125 |
-
'
|
|
|
|
|
126 |
'args' => array()
|
127 |
)
|
128 |
),
|
@@ -133,7 +149,7 @@ function bbp_admin_get_settings_fields() {
|
|
133 |
|
134 |
// Allow topic and reply revisions
|
135 |
'_bbp_allow_revisions' => array(
|
136 |
-
'title' =>
|
137 |
'callback' => 'bbp_admin_setting_callback_revisions',
|
138 |
'sanitize_callback' => 'intval',
|
139 |
'args' => array()
|
@@ -141,7 +157,7 @@ function bbp_admin_get_settings_fields() {
|
|
141 |
|
142 |
// Allow favorites setting
|
143 |
'_bbp_enable_favorites' => array(
|
144 |
-
'title' =>
|
145 |
'callback' => 'bbp_admin_setting_callback_favorites',
|
146 |
'sanitize_callback' => 'intval',
|
147 |
'args' => array()
|
@@ -149,15 +165,23 @@ function bbp_admin_get_settings_fields() {
|
|
149 |
|
150 |
// Allow subscriptions setting
|
151 |
'_bbp_enable_subscriptions' => array(
|
152 |
-
'title' =>
|
153 |
'callback' => 'bbp_admin_setting_callback_subscriptions',
|
154 |
'sanitize_callback' => 'intval',
|
155 |
'args' => array()
|
156 |
),
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
// Allow topic tags
|
159 |
'_bbp_allow_topic_tags' => array(
|
160 |
-
'title' =>
|
161 |
'callback' => 'bbp_admin_setting_callback_topic_tags',
|
162 |
'sanitize_callback' => 'intval',
|
163 |
'args' => array()
|
@@ -165,7 +189,7 @@ function bbp_admin_get_settings_fields() {
|
|
165 |
|
166 |
// Allow per-forum moderators
|
167 |
'_bbp_allow_forum_mods' => array(
|
168 |
-
'title' =>
|
169 |
'callback' => 'bbp_admin_setting_callback_forum_mods',
|
170 |
'sanitize_callback' => 'intval',
|
171 |
'args' => array()
|
@@ -173,7 +197,7 @@ function bbp_admin_get_settings_fields() {
|
|
173 |
|
174 |
// Allow topic tags
|
175 |
'_bbp_allow_search' => array(
|
176 |
-
'title' =>
|
177 |
'callback' => 'bbp_admin_setting_callback_search',
|
178 |
'sanitize_callback' => 'intval',
|
179 |
'args' => array()
|
@@ -181,7 +205,7 @@ function bbp_admin_get_settings_fields() {
|
|
181 |
|
182 |
// Allow fancy editor setting
|
183 |
'_bbp_use_wp_editor' => array(
|
184 |
-
'title' =>
|
185 |
'callback' => 'bbp_admin_setting_callback_use_wp_editor',
|
186 |
'args' => array(),
|
187 |
'sanitize_callback' => 'intval'
|
@@ -189,7 +213,7 @@ function bbp_admin_get_settings_fields() {
|
|
189 |
|
190 |
// Allow auto embedding setting
|
191 |
'_bbp_use_autoembed' => array(
|
192 |
-
'title' =>
|
193 |
'callback' => 'bbp_admin_setting_callback_use_autoembed',
|
194 |
'sanitize_callback' => 'intval',
|
195 |
'args' => array()
|
@@ -197,7 +221,7 @@ function bbp_admin_get_settings_fields() {
|
|
197 |
|
198 |
// Set reply threading level
|
199 |
'_bbp_thread_replies_depth' => array(
|
200 |
-
'title' =>
|
201 |
'callback' => 'bbp_admin_setting_callback_thread_replies_depth',
|
202 |
'sanitize_callback' => 'intval',
|
203 |
'args' => array()
|
@@ -216,7 +240,7 @@ function bbp_admin_get_settings_fields() {
|
|
216 |
|
217 |
// Theme package setting
|
218 |
'_bbp_theme_package_id' => array(
|
219 |
-
'title' =>
|
220 |
'callback' => 'bbp_admin_setting_callback_subtheme_id',
|
221 |
'sanitize_callback' => 'esc_sql',
|
222 |
'args' => array()
|
@@ -229,7 +253,7 @@ function bbp_admin_get_settings_fields() {
|
|
229 |
|
230 |
// Replies per page setting
|
231 |
'_bbp_topics_per_page' => array(
|
232 |
-
'title' =>
|
233 |
'callback' => 'bbp_admin_setting_callback_topics_per_page',
|
234 |
'sanitize_callback' => 'intval',
|
235 |
'args' => array( 'label_for' => '_bbp_topics_per_page' )
|
@@ -237,7 +261,7 @@ function bbp_admin_get_settings_fields() {
|
|
237 |
|
238 |
// Replies per page setting
|
239 |
'_bbp_replies_per_page' => array(
|
240 |
-
'title' =>
|
241 |
'callback' => 'bbp_admin_setting_callback_replies_per_page',
|
242 |
'sanitize_callback' => 'intval',
|
243 |
'args' => array( 'label_for' => '_bbp_replies_per_page' )
|
@@ -250,7 +274,7 @@ function bbp_admin_get_settings_fields() {
|
|
250 |
|
251 |
// Replies per page setting
|
252 |
'_bbp_topics_per_rss_page' => array(
|
253 |
-
'title' =>
|
254 |
'callback' => 'bbp_admin_setting_callback_topics_per_rss_page',
|
255 |
'sanitize_callback' => 'intval',
|
256 |
'args' => array( 'label_for' => '_bbp_topics_per_rss_page' )
|
@@ -258,7 +282,7 @@ function bbp_admin_get_settings_fields() {
|
|
258 |
|
259 |
// Replies per page setting
|
260 |
'_bbp_replies_per_rss_page' => array(
|
261 |
-
'title' =>
|
262 |
'callback' => 'bbp_admin_setting_callback_replies_per_rss_page',
|
263 |
'sanitize_callback' => 'intval',
|
264 |
'args' => array( 'label_for' => '_bbp_replies_per_rss_page' )
|
@@ -271,7 +295,7 @@ function bbp_admin_get_settings_fields() {
|
|
271 |
|
272 |
// Root slug setting
|
273 |
'_bbp_root_slug' => array(
|
274 |
-
'title' =>
|
275 |
'callback' => 'bbp_admin_setting_callback_root_slug',
|
276 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
277 |
'args' => array( 'label_for' => '_bbp_root_slug' )
|
@@ -279,7 +303,7 @@ function bbp_admin_get_settings_fields() {
|
|
279 |
|
280 |
// Include root setting
|
281 |
'_bbp_include_root' => array(
|
282 |
-
'title' =>
|
283 |
'callback' => 'bbp_admin_setting_callback_include_root',
|
284 |
'sanitize_callback' => 'intval',
|
285 |
'args' => array()
|
@@ -287,7 +311,7 @@ function bbp_admin_get_settings_fields() {
|
|
287 |
|
288 |
// What to show on Forum Root
|
289 |
'_bbp_show_on_root' => array(
|
290 |
-
'title' =>
|
291 |
'callback' => 'bbp_admin_setting_callback_show_on_root',
|
292 |
'sanitize_callback' => 'sanitize_text_field',
|
293 |
'args' => array( 'label_for'=>'_bbp_show_on_root' )
|
@@ -300,7 +324,7 @@ function bbp_admin_get_settings_fields() {
|
|
300 |
|
301 |
// Forum slug setting
|
302 |
'_bbp_forum_slug' => array(
|
303 |
-
'title' =>
|
304 |
'callback' => 'bbp_admin_setting_callback_forum_slug',
|
305 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
306 |
'args' => array( 'label_for'=>'_bbp_forum_slug' )
|
@@ -308,7 +332,7 @@ function bbp_admin_get_settings_fields() {
|
|
308 |
|
309 |
// Topic slug setting
|
310 |
'_bbp_topic_slug' => array(
|
311 |
-
'title' =>
|
312 |
'callback' => 'bbp_admin_setting_callback_topic_slug',
|
313 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
314 |
'args' => array( 'label_for'=>'_bbp_topic_slug' )
|
@@ -316,7 +340,7 @@ function bbp_admin_get_settings_fields() {
|
|
316 |
|
317 |
// Topic tag slug setting
|
318 |
'_bbp_topic_tag_slug' => array(
|
319 |
-
'title' =>
|
320 |
'callback' => 'bbp_admin_setting_callback_topic_tag_slug',
|
321 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
322 |
'args' => array( 'label_for'=>'_bbp_topic_tag_slug' )
|
@@ -324,7 +348,7 @@ function bbp_admin_get_settings_fields() {
|
|
324 |
|
325 |
// View slug setting
|
326 |
'_bbp_view_slug' => array(
|
327 |
-
'title' =>
|
328 |
'callback' => 'bbp_admin_setting_callback_view_slug',
|
329 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
330 |
'args' => array( 'label_for'=>'_bbp_view_slug' )
|
@@ -340,7 +364,7 @@ function bbp_admin_get_settings_fields() {
|
|
340 |
|
341 |
// Search slug setting
|
342 |
'_bbp_search_slug' => array(
|
343 |
-
'title' =>
|
344 |
'callback' => 'bbp_admin_setting_callback_search_slug',
|
345 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
346 |
'args' => array( 'label_for'=>'_bbp_search_slug' )
|
@@ -353,7 +377,7 @@ function bbp_admin_get_settings_fields() {
|
|
353 |
|
354 |
// User slug setting
|
355 |
'_bbp_user_slug' => array(
|
356 |
-
'title' =>
|
357 |
'callback' => 'bbp_admin_setting_callback_user_slug',
|
358 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
359 |
'args' => array( 'label_for'=>'_bbp_user_slug' )
|
@@ -361,7 +385,7 @@ function bbp_admin_get_settings_fields() {
|
|
361 |
|
362 |
// Topics slug setting
|
363 |
'_bbp_topic_archive_slug' => array(
|
364 |
-
'title' =>
|
365 |
'callback' => 'bbp_admin_setting_callback_topic_archive_slug',
|
366 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
367 |
'args' => array( 'label_for'=>'_bbp_topic_archive_slug' )
|
@@ -369,7 +393,7 @@ function bbp_admin_get_settings_fields() {
|
|
369 |
|
370 |
// Replies slug setting
|
371 |
'_bbp_reply_archive_slug' => array(
|
372 |
-
'title' =>
|
373 |
'callback' => 'bbp_admin_setting_callback_reply_archive_slug',
|
374 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
375 |
'args' => array( 'label_for'=>'_bbp_reply_archive_slug' )
|
@@ -377,7 +401,7 @@ function bbp_admin_get_settings_fields() {
|
|
377 |
|
378 |
// Favorites slug setting
|
379 |
'_bbp_user_favs_slug' => array(
|
380 |
-
'title' =>
|
381 |
'callback' => 'bbp_admin_setting_callback_user_favs_slug',
|
382 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
383 |
'args' => array( 'label_for'=>'_bbp_user_favs_slug' )
|
@@ -385,10 +409,18 @@ function bbp_admin_get_settings_fields() {
|
|
385 |
|
386 |
// Subscriptions slug setting
|
387 |
'_bbp_user_subs_slug' => array(
|
388 |
-
'title' =>
|
389 |
'callback' => 'bbp_admin_setting_callback_user_subs_slug',
|
390 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
391 |
'args' => array( 'label_for'=>'_bbp_user_subs_slug' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
)
|
393 |
),
|
394 |
|
@@ -398,7 +430,7 @@ function bbp_admin_get_settings_fields() {
|
|
398 |
|
399 |
// Are group forums enabled?
|
400 |
'_bbp_enable_group_forums' => array(
|
401 |
-
'title' =>
|
402 |
'callback' => 'bbp_admin_setting_callback_group_forums',
|
403 |
'sanitize_callback' => 'intval',
|
404 |
'args' => array()
|
@@ -406,7 +438,7 @@ function bbp_admin_get_settings_fields() {
|
|
406 |
|
407 |
// Group forums parent forum ID
|
408 |
'_bbp_group_forums_root_id' => array(
|
409 |
-
'title' =>
|
410 |
'callback' => 'bbp_admin_setting_callback_group_forums_root_id',
|
411 |
'sanitize_callback' => 'intval',
|
412 |
'args' => array( 'label_for'=>'_bbp_group_forums_root_id' )
|
@@ -419,7 +451,7 @@ function bbp_admin_get_settings_fields() {
|
|
419 |
|
420 |
// Should we use Akismet
|
421 |
'_bbp_enable_akismet' => array(
|
422 |
-
'title' =>
|
423 |
'callback' => 'bbp_admin_setting_callback_akismet',
|
424 |
'sanitize_callback' => 'intval',
|
425 |
'args' => array()
|
@@ -433,21 +465,32 @@ function bbp_admin_get_settings_fields() {
|
|
433 |
*
|
434 |
* @since 2.1.0 bbPress (r4001)
|
435 |
*
|
436 |
-
* @param string $section_id
|
|
|
437 |
* @return mixed False if section is invalid, array of fields otherwise.
|
438 |
*/
|
439 |
function bbp_admin_get_settings_fields_for_section( $section_id = '' ) {
|
|
|
|
|
|
|
|
|
440 |
|
441 |
// Bail if section is empty
|
442 |
if ( empty( $section_id ) ) {
|
443 |
return false;
|
444 |
}
|
445 |
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
450 |
|
|
|
451 |
return (array) apply_filters( 'bbp_admin_get_settings_fields_for_section', $retval, $section_id );
|
452 |
}
|
453 |
|
@@ -475,10 +518,21 @@ function bbp_admin_setting_callback_user_section() {
|
|
475 |
* @uses bbp_form_option() To output the option value
|
476 |
*/
|
477 |
function bbp_admin_setting_callback_editlock() {
|
478 |
-
?>
|
479 |
|
480 |
-
|
481 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
|
483 |
<?php
|
484 |
}
|
@@ -491,10 +545,21 @@ function bbp_admin_setting_callback_editlock() {
|
|
491 |
* @uses bbp_form_option() To output the option value
|
492 |
*/
|
493 |
function bbp_admin_setting_callback_throttle() {
|
494 |
-
?>
|
495 |
|
496 |
-
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
|
499 |
<?php
|
500 |
}
|
@@ -511,6 +576,7 @@ function bbp_admin_setting_callback_anonymous() {
|
|
511 |
|
512 |
<input name="_bbp_allow_anonymous" id="_bbp_allow_anonymous" type="checkbox" value="1" <?php checked( bbp_allow_anonymous( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_anonymous' ); ?> />
|
513 |
<label for="_bbp_allow_anonymous"><?php esc_html_e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
|
|
|
514 |
|
515 |
<?php
|
516 |
}
|
@@ -526,6 +592,7 @@ function bbp_admin_setting_callback_global_access() {
|
|
526 |
|
527 |
// Get the default role once rather than loop repeatedly below
|
528 |
$default_role = bbp_get_default_role();
|
|
|
529 |
|
530 |
// Start the output buffer for the select dropdown
|
531 |
ob_start(); ?>
|
@@ -533,7 +600,7 @@ function bbp_admin_setting_callback_global_access() {
|
|
533 |
</label>
|
534 |
<label for="_bbp_default_role">
|
535 |
<select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
|
536 |
-
<?php foreach (
|
537 |
|
538 |
<option <?php selected( $default_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo bbp_translate_user_role( $details['name'] ); ?></option>
|
539 |
|
@@ -546,6 +613,7 @@ function bbp_admin_setting_callback_global_access() {
|
|
546 |
<input name="_bbp_allow_global_access" id="_bbp_allow_global_access" type="checkbox" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> />
|
547 |
<?php printf( esc_html__( 'Automatically give registered visitors the %s forum role', 'bbpress' ), $select ); ?>
|
548 |
</label>
|
|
|
549 |
|
550 |
<?php
|
551 |
}
|
@@ -597,6 +665,22 @@ function bbp_admin_setting_callback_subscriptions() {
|
|
597 |
<?php
|
598 |
}
|
599 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
/**
|
601 |
* Allow topic tags setting field
|
602 |
*
|
@@ -749,7 +833,7 @@ function bbp_admin_setting_callback_subtheme_id() {
|
|
749 |
//
|
750 |
// @see bbPress::register_theme_packages()
|
751 |
foreach ( (array) bbpress()->theme_compat->packages as $id => $theme ) {
|
752 |
-
$theme_options .= '<option value="' . esc_attr( $id ) . '"' . selected( $theme->id, $current_package, false ) . '>' .
|
753 |
}
|
754 |
|
755 |
if ( ! empty( $theme_options ) ) : ?>
|
@@ -941,10 +1025,10 @@ function bbp_admin_setting_callback_show_on_root() {
|
|
941 |
// Options for forum root output
|
942 |
$root_options = array(
|
943 |
'forums' => array(
|
944 |
-
'name' =>
|
945 |
),
|
946 |
'topics' => array(
|
947 |
-
'name' =>
|
948 |
)
|
949 |
); ?>
|
950 |
|
@@ -958,7 +1042,17 @@ function bbp_admin_setting_callback_show_on_root() {
|
|
958 |
|
959 |
</select>
|
960 |
|
961 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
962 |
}
|
963 |
|
964 |
/** User Slug Section *********************************************************/
|
@@ -1061,6 +1155,23 @@ function bbp_admin_setting_callback_user_subs_slug() {
|
|
1061 |
bbp_form_slug_conflict_check( '_bbp_user_subs_slug', 'subscriptions' );
|
1062 |
}
|
1063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
/** Single Slugs **************************************************************/
|
1065 |
|
1066 |
/**
|
@@ -1189,7 +1300,7 @@ function bbp_admin_setting_callback_search_slug() {
|
|
1189 |
function bbp_admin_setting_callback_buddypress_section() {
|
1190 |
?>
|
1191 |
|
1192 |
-
<p><?php esc_html_e( 'Forum settings for BuddyPress', 'bbpress' ); ?></p>
|
1193 |
|
1194 |
<?php
|
1195 |
}
|
@@ -1219,19 +1330,47 @@ function bbp_admin_setting_callback_group_forums() {
|
|
1219 |
*/
|
1220 |
function bbp_admin_setting_callback_group_forums_root_id() {
|
1221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1222 |
// Output the dropdown for all forums
|
1223 |
-
|
1224 |
-
'selected' =>
|
1225 |
-
'show_none' =>
|
1226 |
'orderby' => 'title',
|
1227 |
'order' => 'ASC',
|
1228 |
'select_id' => '_bbp_group_forums_root_id',
|
1229 |
'disable_categories' => false,
|
1230 |
'disabled' => '_bbp_group_forums_root_id'
|
1231 |
-
) );
|
1232 |
|
1233 |
-
|
1234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1235 |
|
1236 |
<?php
|
1237 |
}
|
@@ -1282,8 +1421,8 @@ function bbp_admin_settings() {
|
|
1282 |
?>
|
1283 |
|
1284 |
<div class="wrap">
|
1285 |
-
|
1286 |
<h1><?php esc_html_e( 'Forums Settings', 'bbpress' ) ?></h1>
|
|
|
1287 |
|
1288 |
<form action="options.php" method="post">
|
1289 |
|
@@ -1323,25 +1462,16 @@ function bbp_converter_setting_callback_main_section() {
|
|
1323 |
*/
|
1324 |
function bbp_converter_setting_callback_platform() {
|
1325 |
|
1326 |
-
|
1327 |
-
$
|
|
|
1328 |
|
1329 |
-
//
|
1330 |
-
|
1331 |
-
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
// Loop through files in the converters folder and assemble some options
|
1335 |
-
while ( $file = readdir( $curdir ) ) {
|
1336 |
-
if ( ( stristr( $file, '.php' ) ) && ( stristr( $file, 'index' ) === false ) ) {
|
1337 |
-
$file = preg_replace( '/.php/', '', $file );
|
1338 |
-
$platform_options .= '<option value="' . esc_attr( $file ) . '">' . esc_html( $file ) . '</option>';
|
1339 |
-
}
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
closedir( $curdir ); ?>
|
1343 |
|
1344 |
-
<select name="_bbp_converter_platform" id="_bbp_converter_platform"
|
1345 |
<label for="_bbp_converter_platform"><?php esc_html_e( 'is the previous forum software', 'bbpress' ); ?></label>
|
1346 |
|
1347 |
<?php
|
@@ -1355,8 +1485,8 @@ function bbp_converter_setting_callback_platform() {
|
|
1355 |
function bbp_converter_setting_callback_dbserver() {
|
1356 |
?>
|
1357 |
|
1358 |
-
<input name="_bbp_converter_db_server" id="_bbp_converter_db_server" type="text" value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" class="medium-text" />
|
1359 |
-
<label for="_bbp_converter_db_server"><?php esc_html_e( 'IP or hostname', 'bbpress' ); ?></label>
|
1360 |
|
1361 |
<?php
|
1362 |
}
|
@@ -1369,8 +1499,8 @@ function bbp_converter_setting_callback_dbserver() {
|
|
1369 |
function bbp_converter_setting_callback_dbport() {
|
1370 |
?>
|
1371 |
|
1372 |
-
<input name="_bbp_converter_db_port" id="_bbp_converter_db_port" type="text" value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" class="small-text" />
|
1373 |
-
<label for="_bbp_converter_db_port"><?php esc_html_e( 'Use default 3306 if unsure', 'bbpress' ); ?></label>
|
1374 |
|
1375 |
<?php
|
1376 |
}
|
@@ -1383,8 +1513,8 @@ function bbp_converter_setting_callback_dbport() {
|
|
1383 |
function bbp_converter_setting_callback_dbuser() {
|
1384 |
?>
|
1385 |
|
1386 |
-
<input name="_bbp_converter_db_user" id="_bbp_converter_db_user" type="text" value="<?php bbp_form_option( '_bbp_converter_db_user' ); ?>" class="medium-text" />
|
1387 |
-
<label for="_bbp_converter_db_user"><?php esc_html_e( 'User
|
1388 |
|
1389 |
<?php
|
1390 |
}
|
@@ -1397,8 +1527,8 @@ function bbp_converter_setting_callback_dbuser() {
|
|
1397 |
function bbp_converter_setting_callback_dbpass() {
|
1398 |
?>
|
1399 |
|
1400 |
-
<input name="_bbp_converter_db_pass" id="_bbp_converter_db_pass" type="password" value="<?php bbp_form_option( '_bbp_converter_db_pass' ); ?>" class="medium-text" autocomplete="off" />
|
1401 |
-
<label for="_bbp_converter_db_pass"><?php esc_html_e( 'Password
|
1402 |
|
1403 |
<?php
|
1404 |
}
|
@@ -1411,7 +1541,7 @@ function bbp_converter_setting_callback_dbpass() {
|
|
1411 |
function bbp_converter_setting_callback_dbname() {
|
1412 |
?>
|
1413 |
|
1414 |
-
<input name="_bbp_converter_db_name" id="_bbp_converter_db_name" type="text" value="<?php bbp_form_option( '_bbp_converter_db_name' ); ?>" class="medium-text" />
|
1415 |
<label for="_bbp_converter_db_name"><?php esc_html_e( 'Name of the database with your old forum data', 'bbpress' ); ?></label>
|
1416 |
|
1417 |
<?php
|
@@ -1438,7 +1568,7 @@ function bbp_converter_setting_callback_options_section() {
|
|
1438 |
function bbp_converter_setting_callback_dbprefix() {
|
1439 |
?>
|
1440 |
|
1441 |
-
<input name="_bbp_converter_db_prefix" id="_bbp_converter_db_prefix" type="text" value="<?php bbp_form_option( '_bbp_converter_db_prefix' ); ?>" class="medium-text" />
|
1442 |
<label for="_bbp_converter_db_prefix"><?php esc_html_e( '(If converting from BuddyPress Forums, use "wp_bb_" or your custom prefix)', 'bbpress' ); ?></label>
|
1443 |
|
1444 |
<?php
|
@@ -1452,7 +1582,7 @@ function bbp_converter_setting_callback_dbprefix() {
|
|
1452 |
function bbp_converter_setting_callback_rows() {
|
1453 |
?>
|
1454 |
|
1455 |
-
<input name="_bbp_converter_rows" id="_bbp_converter_rows" type="
|
1456 |
<label for="_bbp_converter_rows"><?php esc_html_e( 'rows to process at a time', 'bbpress' ); ?></label>
|
1457 |
<p class="description"><?php esc_html_e( 'Keep this low if you experience out-of-memory issues.', 'bbpress' ); ?></p>
|
1458 |
|
@@ -1467,7 +1597,7 @@ function bbp_converter_setting_callback_rows() {
|
|
1467 |
function bbp_converter_setting_callback_delay_time() {
|
1468 |
?>
|
1469 |
|
1470 |
-
<input name="_bbp_converter_delay_time" id="_bbp_converter_delay_time" type="
|
1471 |
<label for="_bbp_converter_delay_time"><?php esc_html_e( 'second(s) delay between each group of rows', 'bbpress' ); ?></label>
|
1472 |
<p class="description"><?php esc_html_e( 'Keep this high to prevent too-many-connection issues.', 'bbpress' ); ?></p>
|
1473 |
|
@@ -1527,11 +1657,25 @@ function bbp_converter_setting_callback_convert_users() {
|
|
1527 |
* @uses settings_fields() To output the hidden fields for the form
|
1528 |
* @uses do_settings_sections() To output the settings sections
|
1529 |
*/
|
1530 |
-
function
|
1531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1532 |
|
1533 |
<div class="wrap">
|
1534 |
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
|
|
1535 |
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( esc_html__( 'Import Forums', 'bbpress' ) ); ?></h2>
|
1536 |
|
1537 |
<form action="#" method="post" id="bbp-converter-settings">
|
@@ -1541,15 +1685,32 @@ function bbp_converter_settings() {
|
|
1541 |
<?php do_settings_sections( 'bbpress_converter' ); ?>
|
1542 |
|
1543 |
<p class="submit">
|
1544 |
-
<input type="button" name="submit" class="button-primary" id="bbp-converter-start" value="<?php
|
1545 |
-
<input type="button" name="submit" class="button-primary" id="bbp-converter-stop" value="<?php esc_attr_e( 'Stop', 'bbpress' ); ?>"
|
1546 |
-
<img id="bbp-converter-progress" src="">
|
1547 |
</p>
|
1548 |
-
|
1549 |
-
<div class="bbp-converter-updated" id="bbp-converter-message"></div>
|
1550 |
</form>
|
1551 |
-
</div>
|
1552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
<?php
|
1554 |
}
|
1555 |
|
@@ -1574,61 +1735,80 @@ function bbp_admin_settings_help() {
|
|
1574 |
// Overview
|
1575 |
$current_screen->add_help_tab( array(
|
1576 |
'id' => 'overview',
|
1577 |
-
'title' =>
|
1578 |
-
'content' => '<p>' .
|
1579 |
-
'<p>' .
|
1580 |
) );
|
1581 |
|
1582 |
// Main Settings
|
1583 |
$current_screen->add_help_tab( array(
|
1584 |
'id' => 'main_settings',
|
1585 |
-
'title' =>
|
1586 |
-
'content' => '<p>' .
|
1587 |
'<p>' .
|
1588 |
'<ul>' .
|
1589 |
-
'<li>' .
|
1590 |
-
'<li>' .
|
1591 |
-
'<li>' .
|
1592 |
-
'<li>' .
|
1593 |
-
'<li>' .
|
1594 |
-
'<li>' .
|
1595 |
-
'<li>' .
|
1596 |
-
'<li>' .
|
1597 |
'</ul>' .
|
1598 |
'</p>' .
|
1599 |
-
'<p>' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1600 |
) );
|
1601 |
|
1602 |
// Per Page
|
1603 |
$current_screen->add_help_tab( array(
|
1604 |
'id' => 'per_page',
|
1605 |
-
'title' =>
|
1606 |
-
'content' => '<p>' .
|
1607 |
-
|
1608 |
-
|
|
|
|
|
|
|
1609 |
) );
|
1610 |
|
1611 |
// Slugs
|
1612 |
$current_screen->add_help_tab( array(
|
1613 |
-
'id' => '
|
1614 |
-
'title' =>
|
1615 |
-
'content' => '<p>' .
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
|
|
|
|
|
|
1619 |
) );
|
1620 |
|
1621 |
// Help Sidebar
|
1622 |
$current_screen->set_help_sidebar(
|
1623 |
-
'<p><strong>' .
|
1624 |
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
1625 |
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
1626 |
);
|
1627 |
}
|
1628 |
|
1629 |
/**
|
1630 |
-
* Disable a settings field if
|
1631 |
-
* options array.
|
1632 |
*
|
1633 |
* @since 2.2.0 bbPress (r4347)
|
1634 |
*
|
@@ -1684,7 +1864,7 @@ function bbp_form_option( $option, $default = '' , $slug = false ) {
|
|
1684 |
$value = $default;
|
1685 |
}
|
1686 |
|
1687 |
-
//
|
1688 |
return apply_filters( 'bbp_get_form_option', $value, $option );
|
1689 |
}
|
1690 |
|
@@ -1714,43 +1894,43 @@ function bbp_form_slug_conflict_check( $slug, $default ) {
|
|
1714 |
/** WordPress Core ****************************************************/
|
1715 |
|
1716 |
// Core Post Types
|
1717 |
-
'post_base' => array( 'name' =>
|
1718 |
-
'page_base' => array( 'name' =>
|
1719 |
-
'revision_base' => array( 'name' =>
|
1720 |
-
'attachment_base' => array( 'name' =>
|
1721 |
-
'nav_menu_base' => array( 'name' =>
|
1722 |
|
1723 |
// Post Tags
|
1724 |
-
'tag_base' => array( 'name' =>
|
1725 |
|
1726 |
// Post Categories
|
1727 |
-
'category_base' => array( 'name' =>
|
1728 |
|
1729 |
/** bbPress Core ******************************************************/
|
1730 |
|
1731 |
// Forum archive slug
|
1732 |
-
'_bbp_root_slug' => array( 'name' =>
|
1733 |
|
1734 |
// Topic archive slug
|
1735 |
-
'_bbp_topic_archive_slug' => array( 'name' =>
|
1736 |
|
1737 |
// Forum slug
|
1738 |
-
'_bbp_forum_slug' => array( 'name' =>
|
1739 |
|
1740 |
// Topic slug
|
1741 |
-
'_bbp_topic_slug' => array( 'name' =>
|
1742 |
|
1743 |
// Reply slug
|
1744 |
-
'_bbp_reply_slug' => array( 'name' =>
|
1745 |
|
1746 |
// User profile slug
|
1747 |
-
'_bbp_user_slug' => array( 'name' =>
|
1748 |
|
1749 |
// View slug
|
1750 |
-
'_bbp_view_slug' => array( 'name' =>
|
1751 |
|
1752 |
// Topic tag slug
|
1753 |
-
'_bbp_topic_tag_slug' => array( 'name' =>
|
1754 |
) );
|
1755 |
|
1756 |
/** BuddyPress Core *******************************************************/
|
@@ -1762,7 +1942,7 @@ function bbp_form_slug_conflict_check( $slug, $default ) {
|
|
1762 |
if ( ! empty( $bp->pages ) ) {
|
1763 |
foreach ( $bp->pages as $page => $page_data ) {
|
1764 |
$page_base = $page . '_base';
|
1765 |
-
$page_title = sprintf(
|
1766 |
$core_slugs[ $page_base ] = array(
|
1767 |
'name' => $page_title,
|
1768 |
'default' => $page_data->slug,
|
20 |
* @return array
|
21 |
*/
|
22 |
function bbp_admin_get_settings_sections() {
|
23 |
+
|
24 |
+
// Filter & return
|
25 |
return (array) apply_filters( 'bbp_admin_get_settings_sections', array(
|
26 |
'bbp_settings_users' => array(
|
27 |
+
'title' => esc_html__( 'Forum User Settings', 'bbpress' ),
|
28 |
'callback' => 'bbp_admin_setting_callback_user_section',
|
29 |
'page' => 'discussion'
|
30 |
),
|
31 |
'bbp_settings_features' => array(
|
32 |
+
'title' => esc_html__( 'Forum Features', 'bbpress' ),
|
33 |
'callback' => 'bbp_admin_setting_callback_features_section',
|
34 |
'page' => 'discussion'
|
35 |
),
|
36 |
'bbp_settings_theme_compat' => array(
|
37 |
+
'title' => esc_html__( 'Forum Theme Packages', 'bbpress' ),
|
38 |
'callback' => 'bbp_admin_setting_callback_subtheme_section',
|
39 |
'page' => 'general'
|
40 |
),
|
41 |
'bbp_settings_per_page' => array(
|
42 |
+
'title' => esc_html__( 'Topics and Replies Per Page', 'bbpress' ),
|
43 |
'callback' => 'bbp_admin_setting_callback_per_page_section',
|
44 |
'page' => 'reading'
|
45 |
),
|
46 |
'bbp_settings_per_rss_page' => array(
|
47 |
+
'title' => esc_html__( 'Topics and Replies Per RSS Page', 'bbpress' ),
|
48 |
'callback' => 'bbp_admin_setting_callback_per_rss_page_section',
|
49 |
'page' => 'reading',
|
50 |
),
|
51 |
'bbp_settings_root_slugs' => array(
|
52 |
+
'title' => esc_html__( 'Forum Root Slug', 'bbpress' ),
|
53 |
'callback' => 'bbp_admin_setting_callback_root_slug_section',
|
54 |
'page' => 'permalink'
|
55 |
),
|
56 |
'bbp_settings_single_slugs' => array(
|
57 |
+
'title' => esc_html__( 'Forum Single Slugs', 'bbpress' ),
|
58 |
'callback' => 'bbp_admin_setting_callback_single_slug_section',
|
59 |
'page' => 'permalink',
|
60 |
),
|
61 |
'bbp_settings_user_slugs' => array(
|
62 |
+
'title' => esc_html__( 'Forum User Slugs', 'bbpress' ),
|
63 |
'callback' => 'bbp_admin_setting_callback_user_slug_section',
|
64 |
'page' => 'permalink',
|
65 |
),
|
66 |
'bbp_settings_buddypress' => array(
|
67 |
+
'title' => esc_html__( 'Forum Integration for BuddyPress', 'bbpress' ),
|
68 |
'callback' => 'bbp_admin_setting_callback_buddypress_section',
|
69 |
'page' => 'buddypress',
|
70 |
),
|
71 |
'bbp_settings_akismet' => array(
|
72 |
+
'title' => esc_html__( 'Forum Integration for Akismet', 'bbpress' ),
|
73 |
'callback' => 'bbp_admin_setting_callback_akismet_section',
|
74 |
'page' => 'discussion'
|
75 |
)
|
84 |
* @return type
|
85 |
*/
|
86 |
function bbp_admin_get_settings_fields() {
|
87 |
+
|
88 |
+
// Filter & return
|
89 |
return (array) apply_filters( 'bbp_admin_get_settings_fields', array(
|
90 |
|
91 |
/** User Section ******************************************************/
|
92 |
|
93 |
'bbp_settings_users' => array(
|
94 |
|
95 |
+
// Allow global access
|
96 |
+
'_bbp_default_role' => array(
|
97 |
+
'sanitize_callback' => 'sanitize_text_field',
|
98 |
+
'args' => array()
|
99 |
+
),
|
100 |
+
|
101 |
+
// Allow global access
|
102 |
+
'_bbp_allow_global_access' => array(
|
103 |
+
'title' => esc_html__( 'Roles', 'bbpress' ),
|
104 |
+
'callback' => 'bbp_admin_setting_callback_global_access',
|
105 |
'sanitize_callback' => 'intval',
|
106 |
+
'args' => array()
|
107 |
+
),
|
108 |
+
|
109 |
+
// Allow content throttling
|
110 |
+
'_bbp_allow_content_throttle' => array(
|
111 |
+
'sanitize_callback' => 'intval',
|
112 |
+
'args' => array()
|
113 |
),
|
114 |
|
115 |
// Throttle setting
|
116 |
'_bbp_throttle_time' => array(
|
117 |
+
'title' => esc_html__( 'Flooding', 'bbpress' ),
|
118 |
'callback' => 'bbp_admin_setting_callback_throttle',
|
119 |
'sanitize_callback' => 'intval',
|
120 |
+
'args' => array()
|
121 |
),
|
122 |
|
123 |
+
// Allow content editing
|
124 |
+
'_bbp_allow_content_edit' => array(
|
|
|
|
|
125 |
'sanitize_callback' => 'intval',
|
126 |
'args' => array()
|
127 |
),
|
128 |
|
129 |
+
// Edit lock setting
|
130 |
+
'_bbp_edit_lock' => array(
|
131 |
+
'title' => esc_html__( 'Editing', 'bbpress' ),
|
132 |
+
'callback' => 'bbp_admin_setting_callback_editlock',
|
133 |
'sanitize_callback' => 'intval',
|
134 |
'args' => array()
|
135 |
),
|
136 |
|
137 |
+
// Allow anonymous posting setting
|
138 |
+
'_bbp_allow_anonymous' => array(
|
139 |
+
'title' => esc_html__( 'Anonymous', 'bbpress' ),
|
140 |
+
'callback' => 'bbp_admin_setting_callback_anonymous',
|
141 |
+
'sanitize_callback' => 'intval',
|
142 |
'args' => array()
|
143 |
)
|
144 |
),
|
149 |
|
150 |
// Allow topic and reply revisions
|
151 |
'_bbp_allow_revisions' => array(
|
152 |
+
'title' => esc_html__( 'Revisions', 'bbpress' ),
|
153 |
'callback' => 'bbp_admin_setting_callback_revisions',
|
154 |
'sanitize_callback' => 'intval',
|
155 |
'args' => array()
|
157 |
|
158 |
// Allow favorites setting
|
159 |
'_bbp_enable_favorites' => array(
|
160 |
+
'title' => esc_html__( 'Favorites', 'bbpress' ),
|
161 |
'callback' => 'bbp_admin_setting_callback_favorites',
|
162 |
'sanitize_callback' => 'intval',
|
163 |
'args' => array()
|
165 |
|
166 |
// Allow subscriptions setting
|
167 |
'_bbp_enable_subscriptions' => array(
|
168 |
+
'title' => esc_html__( 'Subscriptions', 'bbpress' ),
|
169 |
'callback' => 'bbp_admin_setting_callback_subscriptions',
|
170 |
'sanitize_callback' => 'intval',
|
171 |
'args' => array()
|
172 |
),
|
173 |
|
174 |
+
// Allow engagements setting
|
175 |
+
'_bbp_enable_engagements' => array(
|
176 |
+
'title' => esc_html__( 'Engagements', 'bbpress' ),
|
177 |
+
'callback' => 'bbp_admin_setting_callback_engagements',
|
178 |
+
'sanitize_callback' => 'intval',
|
179 |
+
'args' => array()
|
180 |
+
),
|
181 |
+
|
182 |
// Allow topic tags
|
183 |
'_bbp_allow_topic_tags' => array(
|
184 |
+
'title' => esc_html__( 'Topic tags', 'bbpress' ),
|
185 |
'callback' => 'bbp_admin_setting_callback_topic_tags',
|
186 |
'sanitize_callback' => 'intval',
|
187 |
'args' => array()
|
189 |
|
190 |
// Allow per-forum moderators
|
191 |
'_bbp_allow_forum_mods' => array(
|
192 |
+
'title' => esc_html__( 'Forum Moderators', 'bbpress' ),
|
193 |
'callback' => 'bbp_admin_setting_callback_forum_mods',
|
194 |
'sanitize_callback' => 'intval',
|
195 |
'args' => array()
|
197 |
|
198 |
// Allow topic tags
|
199 |
'_bbp_allow_search' => array(
|
200 |
+
'title' => esc_html__( 'Search', 'bbpress' ),
|
201 |
'callback' => 'bbp_admin_setting_callback_search',
|
202 |
'sanitize_callback' => 'intval',
|
203 |
'args' => array()
|
205 |
|
206 |
// Allow fancy editor setting
|
207 |
'_bbp_use_wp_editor' => array(
|
208 |
+
'title' => esc_html__( 'Post Formatting', 'bbpress' ),
|
209 |
'callback' => 'bbp_admin_setting_callback_use_wp_editor',
|
210 |
'args' => array(),
|
211 |
'sanitize_callback' => 'intval'
|
213 |
|
214 |
// Allow auto embedding setting
|
215 |
'_bbp_use_autoembed' => array(
|
216 |
+
'title' => esc_html__( 'Auto-embed links', 'bbpress' ),
|
217 |
'callback' => 'bbp_admin_setting_callback_use_autoembed',
|
218 |
'sanitize_callback' => 'intval',
|
219 |
'args' => array()
|
221 |
|
222 |
// Set reply threading level
|
223 |
'_bbp_thread_replies_depth' => array(
|
224 |
+
'title' => esc_html__( 'Reply Threading', 'bbpress' ),
|
225 |
'callback' => 'bbp_admin_setting_callback_thread_replies_depth',
|
226 |
'sanitize_callback' => 'intval',
|
227 |
'args' => array()
|
240 |
|
241 |
// Theme package setting
|
242 |
'_bbp_theme_package_id' => array(
|
243 |
+
'title' => esc_html__( 'Current Package', 'bbpress' ),
|
244 |
'callback' => 'bbp_admin_setting_callback_subtheme_id',
|
245 |
'sanitize_callback' => 'esc_sql',
|
246 |
'args' => array()
|
253 |
|
254 |
// Replies per page setting
|
255 |
'_bbp_topics_per_page' => array(
|
256 |
+
'title' => esc_html__( 'Topics', 'bbpress' ),
|
257 |
'callback' => 'bbp_admin_setting_callback_topics_per_page',
|
258 |
'sanitize_callback' => 'intval',
|
259 |
'args' => array( 'label_for' => '_bbp_topics_per_page' )
|
261 |
|
262 |
// Replies per page setting
|
263 |
'_bbp_replies_per_page' => array(
|
264 |
+
'title' => esc_html__( 'Replies', 'bbpress' ),
|
265 |
'callback' => 'bbp_admin_setting_callback_replies_per_page',
|
266 |
'sanitize_callback' => 'intval',
|
267 |
'args' => array( 'label_for' => '_bbp_replies_per_page' )
|
274 |
|
275 |
// Replies per page setting
|
276 |
'_bbp_topics_per_rss_page' => array(
|
277 |
+
'title' => esc_html__( 'Topics', 'bbpress' ),
|
278 |
'callback' => 'bbp_admin_setting_callback_topics_per_rss_page',
|
279 |
'sanitize_callback' => 'intval',
|
280 |
'args' => array( 'label_for' => '_bbp_topics_per_rss_page' )
|
282 |
|
283 |
// Replies per page setting
|
284 |
'_bbp_replies_per_rss_page' => array(
|
285 |
+
'title' => esc_html__( 'Replies', 'bbpress' ),
|
286 |
'callback' => 'bbp_admin_setting_callback_replies_per_rss_page',
|
287 |
'sanitize_callback' => 'intval',
|
288 |
'args' => array( 'label_for' => '_bbp_replies_per_rss_page' )
|
295 |
|
296 |
// Root slug setting
|
297 |
'_bbp_root_slug' => array(
|
298 |
+
'title' => esc_html__( 'Forum Root', 'bbpress' ),
|
299 |
'callback' => 'bbp_admin_setting_callback_root_slug',
|
300 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
301 |
'args' => array( 'label_for' => '_bbp_root_slug' )
|
303 |
|
304 |
// Include root setting
|
305 |
'_bbp_include_root' => array(
|
306 |
+
'title' => esc_html__( 'Forum Prefix', 'bbpress' ),
|
307 |
'callback' => 'bbp_admin_setting_callback_include_root',
|
308 |
'sanitize_callback' => 'intval',
|
309 |
'args' => array()
|
311 |
|
312 |
// What to show on Forum Root
|
313 |
'_bbp_show_on_root' => array(
|
314 |
+
'title' => esc_html__( 'Forum root should show', 'bbpress' ),
|
315 |
'callback' => 'bbp_admin_setting_callback_show_on_root',
|
316 |
'sanitize_callback' => 'sanitize_text_field',
|
317 |
'args' => array( 'label_for'=>'_bbp_show_on_root' )
|
324 |
|
325 |
// Forum slug setting
|
326 |
'_bbp_forum_slug' => array(
|
327 |
+
'title' => esc_html__( 'Forum', 'bbpress' ),
|
328 |
'callback' => 'bbp_admin_setting_callback_forum_slug',
|
329 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
330 |
'args' => array( 'label_for'=>'_bbp_forum_slug' )
|
332 |
|
333 |
// Topic slug setting
|
334 |
'_bbp_topic_slug' => array(
|
335 |
+
'title' => esc_html__( 'Topic', 'bbpress' ),
|
336 |
'callback' => 'bbp_admin_setting_callback_topic_slug',
|
337 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
338 |
'args' => array( 'label_for'=>'_bbp_topic_slug' )
|
340 |
|
341 |
// Topic tag slug setting
|
342 |
'_bbp_topic_tag_slug' => array(
|
343 |
+
'title' => esc_html__( 'Topic Tag', 'bbpress' ),
|
344 |
'callback' => 'bbp_admin_setting_callback_topic_tag_slug',
|
345 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
346 |
'args' => array( 'label_for'=>'_bbp_topic_tag_slug' )
|
348 |
|
349 |
// View slug setting
|
350 |
'_bbp_view_slug' => array(
|
351 |
+
'title' => esc_html__( 'Topic View', 'bbpress' ),
|
352 |
'callback' => 'bbp_admin_setting_callback_view_slug',
|
353 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
354 |
'args' => array( 'label_for'=>'_bbp_view_slug' )
|
364 |
|
365 |
// Search slug setting
|
366 |
'_bbp_search_slug' => array(
|
367 |
+
'title' => esc_html__( 'Search', 'bbpress' ),
|
368 |
'callback' => 'bbp_admin_setting_callback_search_slug',
|
369 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
370 |
'args' => array( 'label_for'=>'_bbp_search_slug' )
|
377 |
|
378 |
// User slug setting
|
379 |
'_bbp_user_slug' => array(
|
380 |
+
'title' => esc_html__( 'User Base', 'bbpress' ),
|
381 |
'callback' => 'bbp_admin_setting_callback_user_slug',
|
382 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
383 |
'args' => array( 'label_for'=>'_bbp_user_slug' )
|
385 |
|
386 |
// Topics slug setting
|
387 |
'_bbp_topic_archive_slug' => array(
|
388 |
+
'title' => esc_html__( 'Topics Started', 'bbpress' ),
|
389 |
'callback' => 'bbp_admin_setting_callback_topic_archive_slug',
|
390 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
391 |
'args' => array( 'label_for'=>'_bbp_topic_archive_slug' )
|
393 |
|
394 |
// Replies slug setting
|
395 |
'_bbp_reply_archive_slug' => array(
|
396 |
+
'title' => esc_html__( 'Replies Created', 'bbpress' ),
|
397 |
'callback' => 'bbp_admin_setting_callback_reply_archive_slug',
|
398 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
399 |
'args' => array( 'label_for'=>'_bbp_reply_archive_slug' )
|
401 |
|
402 |
// Favorites slug setting
|
403 |
'_bbp_user_favs_slug' => array(
|
404 |
+
'title' => esc_html__( 'Favorite Topics', 'bbpress' ),
|
405 |
'callback' => 'bbp_admin_setting_callback_user_favs_slug',
|
406 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
407 |
'args' => array( 'label_for'=>'_bbp_user_favs_slug' )
|
409 |
|
410 |
// Subscriptions slug setting
|
411 |
'_bbp_user_subs_slug' => array(
|
412 |
+
'title' => esc_html__( 'Subscriptions', 'bbpress' ),
|
413 |
'callback' => 'bbp_admin_setting_callback_user_subs_slug',
|
414 |
'sanitize_callback' => 'bbp_sanitize_slug',
|
415 |
'args' => array( 'label_for'=>'_bbp_user_subs_slug' )
|
416 |
+
),
|
417 |
+
|
418 |
+
// Engagements slug setting
|
419 |
+
'_bbp_user_engagements_slug' => array(
|
420 |
+
'title' => esc_html__( 'Engagements', 'bbpress' ),
|
421 |
+
'callback' => 'bbp_admin_setting_callback_user_engagements_slug',
|
422 |
+
'sanitize_callback' => 'bbp_sanitize_slug',
|
423 |
+
'args' => array( 'label_for'=>'_bbp_user_engagements_slug' )
|
424 |
)
|
425 |
),
|
426 |
|
430 |
|
431 |
// Are group forums enabled?
|
432 |
'_bbp_enable_group_forums' => array(
|
433 |
+
'title' => esc_html__( 'Group Forums', 'bbpress' ),
|
434 |
'callback' => 'bbp_admin_setting_callback_group_forums',
|
435 |
'sanitize_callback' => 'intval',
|
436 |
'args' => array()
|
438 |
|
439 |
// Group forums parent forum ID
|
440 |
'_bbp_group_forums_root_id' => array(
|
441 |
+
'title' => esc_html__( 'Primary Forum', 'bbpress' ),
|
442 |
'callback' => 'bbp_admin_setting_callback_group_forums_root_id',
|
443 |
'sanitize_callback' => 'intval',
|
444 |
'args' => array( 'label_for'=>'_bbp_group_forums_root_id' )
|
451 |
|
452 |
// Should we use Akismet
|
453 |
'_bbp_enable_akismet' => array(
|
454 |
+
'title' => esc_html__( 'Use Akismet', 'bbpress' ),
|
455 |
'callback' => 'bbp_admin_setting_callback_akismet',
|
456 |
'sanitize_callback' => 'intval',
|
457 |
'args' => array()
|
465 |
*
|
466 |
* @since 2.1.0 bbPress (r4001)
|
467 |
*
|
468 |
+
* @param string $section_id ID of the section to get fields for
|
469 |
+
* @staticvar array $fields All of the available fields
|
470 |
* @return mixed False if section is invalid, array of fields otherwise.
|
471 |
*/
|
472 |
function bbp_admin_get_settings_fields_for_section( $section_id = '' ) {
|
473 |
+
static $fields = array();
|
474 |
+
|
475 |
+
// Default return value
|
476 |
+
$retval = array();
|
477 |
|
478 |
// Bail if section is empty
|
479 |
if ( empty( $section_id ) ) {
|
480 |
return false;
|
481 |
}
|
482 |
|
483 |
+
// Get all of the fields (so we can snag one section of them)
|
484 |
+
if ( empty( $fields ) ) {
|
485 |
+
$fields = bbp_admin_get_settings_fields();
|
486 |
+
}
|
487 |
+
|
488 |
+
// Get the field by section
|
489 |
+
if ( isset( $fields[ $section_id ] ) ) {
|
490 |
+
$retval = $fields[ $section_id ];
|
491 |
+
}
|
492 |
|
493 |
+
// Filter & return
|
494 |
return (array) apply_filters( 'bbp_admin_get_settings_fields_for_section', $retval, $section_id );
|
495 |
}
|
496 |
|
518 |
* @uses bbp_form_option() To output the option value
|
519 |
*/
|
520 |
function bbp_admin_setting_callback_editlock() {
|
|
|
521 |
|
522 |
+
// Start the output buffer for the second option
|
523 |
+
ob_start(); ?>
|
524 |
+
|
525 |
+
</label>
|
526 |
+
<label for="_bbp_edit_lock">
|
527 |
+
<input name="_bbp_edit_lock" id="_bbp_edit_lock" type="number" min="0" step="1" value="<?php bbp_form_option( '_bbp_edit_lock', '0' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_edit_lock' ); ?> />
|
528 |
+
|
529 |
+
<?php $select = ob_get_clean(); ?>
|
530 |
+
|
531 |
+
<label for="_bbp_allow_content_edit">
|
532 |
+
<input name="_bbp_allow_content_edit" id="_bbp_allow_content_edit" type="checkbox" value="1" <?php checked( bbp_allow_content_edit( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_content_edit' ); ?> />
|
533 |
+
<?php printf( esc_html__( 'Allow users to edit their content for %s minutes after posting', 'bbpress' ), $select ); ?>
|
534 |
+
</label>
|
535 |
+
<p class="description"><?php esc_html_e( 'If checked, setting to "0 minutes" allows editing forever.', 'bbpress' ); ?></p>
|
536 |
|
537 |
<?php
|
538 |
}
|
545 |
* @uses bbp_form_option() To output the option value
|
546 |
*/
|
547 |
function bbp_admin_setting_callback_throttle() {
|
|
|
548 |
|
549 |
+
// Start the output buffer for the second option
|
550 |
+
ob_start(); ?>
|
551 |
+
|
552 |
+
</label>
|
553 |
+
<label for="_bbp_throttle_time">
|
554 |
+
<input name="_bbp_throttle_time" id="_bbp_throttle_time" type="number" min="0" step="1" value="<?php bbp_form_option( '_bbp_throttle_time', '10' ); ?>" class="small-text"<?php bbp_maybe_admin_setting_disabled( '_bbp_throttle_time' ); ?> />
|
555 |
+
|
556 |
+
<?php $select = ob_get_clean(); ?>
|
557 |
+
|
558 |
+
<label for="_bbp_allow_content_throttle">
|
559 |
+
<input name="_bbp_allow_content_throttle" id="_bbp_allow_content_throttle" type="checkbox" value="1" <?php checked( bbp_allow_content_throttle( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_content_throttle' ); ?> />
|
560 |
+
<?php printf( esc_html__( 'Allow flood protection by throttling users for %s seconds after posting', 'bbpress' ), $select ); ?>
|
561 |
+
</label>
|
562 |
+
<p class="description"><?php esc_html_e( 'Use this to discourage users from spamming your forums.', 'bbpress' ); ?></p>
|
563 |
|
564 |
<?php
|
565 |
}
|
576 |
|
577 |
<input name="_bbp_allow_anonymous" id="_bbp_allow_anonymous" type="checkbox" value="1" <?php checked( bbp_allow_anonymous( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_anonymous' ); ?> />
|
578 |
<label for="_bbp_allow_anonymous"><?php esc_html_e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
|
579 |
+
<p class="description"><?php esc_html_e( 'Works best on intranets or paired with antispam measures like Akismet.', 'bbpress' ); ?></p>
|
580 |
|
581 |
<?php
|
582 |
}
|
592 |
|
593 |
// Get the default role once rather than loop repeatedly below
|
594 |
$default_role = bbp_get_default_role();
|
595 |
+
$roles = bbp_get_dynamic_roles();
|
596 |
|
597 |
// Start the output buffer for the select dropdown
|
598 |
ob_start(); ?>
|
600 |
</label>
|
601 |
<label for="_bbp_default_role">
|
602 |
<select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
|
603 |
+
<?php foreach ( $roles as $role => $details ) : ?>
|
604 |
|
605 |
<option <?php selected( $default_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo bbp_translate_user_role( $details['name'] ); ?></option>
|
606 |
|
613 |
<input name="_bbp_allow_global_access" id="_bbp_allow_global_access" type="checkbox" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> />
|
614 |
<?php printf( esc_html__( 'Automatically give registered visitors the %s forum role', 'bbpress' ), $select ); ?>
|
615 |
</label>
|
616 |
+
<p class="description"><?php esc_html_e( 'Uncheck this to manually assign all user access to your forums.', 'bbpress' ); ?></p>
|
617 |
|
618 |
<?php
|
619 |
}
|
665 |
<?php
|
666 |
}
|
667 |
|
668 |
+
/**
|
669 |
+
* Allow engagements setting field
|
670 |
+
*
|
671 |
+
* @since 2.0.0 bbPress (r2737)
|
672 |
+
*
|
673 |
+
* @uses checked() To display the checked attribute
|
674 |
+
*/
|
675 |
+
function bbp_admin_setting_callback_engagements() {
|
676 |
+
?>
|
677 |
+
|
678 |
+
<input name="_bbp_enable_engagements" id="_bbp_enable_engagements" type="checkbox" value="1" <?php checked( bbp_is_engagements_active( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_enable_engagements' ); ?> />
|
679 |
+
<label for="_bbp_enable_engagements"><?php esc_html_e( 'Allow tracking of topics each user engages in', 'bbpress' ); ?></label>
|
680 |
+
|
681 |
+
<?php
|
682 |
+
}
|
683 |
+
|
684 |
/**
|
685 |
* Allow topic tags setting field
|
686 |
*
|
833 |
//
|
834 |
// @see bbPress::register_theme_packages()
|
835 |
foreach ( (array) bbpress()->theme_compat->packages as $id => $theme ) {
|
836 |
+
$theme_options .= '<option value="' . esc_attr( $id ) . '"' . selected( $theme->id, $current_package, false ) . '>' . esc_html( $theme->name ) . '</option>';
|
837 |
}
|
838 |
|
839 |
if ( ! empty( $theme_options ) ) : ?>
|
1025 |
// Options for forum root output
|
1026 |
$root_options = array(
|
1027 |
'forums' => array(
|
1028 |
+
'name' => esc_attr__( 'Forum Index', 'bbpress' )
|
1029 |
),
|
1030 |
'topics' => array(
|
1031 |
+
'name' => esc_attr__( 'Topics by Last Post', 'bbpress' )
|
1032 |
)
|
1033 |
); ?>
|
1034 |
|
1042 |
|
1043 |
</select>
|
1044 |
|
1045 |
+
<?php
|
1046 |
+
|
1047 |
+
// Look for theme support
|
1048 |
+
$forum_archive = basename( bbp_get_forum_archive_template() );
|
1049 |
+
|
1050 |
+
// This setting doesn't work if the theme has an archive-forum.php template.
|
1051 |
+
if ( ! empty( $forum_archive ) ) : ?>
|
1052 |
+
|
1053 |
+
<p class="description"><?php printf( esc_html__( 'This setting will be ignored because %s was found in your theme.', 'bbpress' ), '<code>' . $forum_archive . '</code>' ); ?></p>
|
1054 |
+
|
1055 |
+
<?php endif;
|
1056 |
}
|
1057 |
|
1058 |
/** User Slug Section *********************************************************/
|
1155 |
bbp_form_slug_conflict_check( '_bbp_user_subs_slug', 'subscriptions' );
|
1156 |
}
|
1157 |
|
1158 |
+
/**
|
1159 |
+
* Engagements slug setting field
|
1160 |
+
*
|
1161 |
+
* @since 2.6.0 bbPress (r6320)
|
1162 |
+
*
|
1163 |
+
* @uses bbp_form_option() To output the option value
|
1164 |
+
*/
|
1165 |
+
function bbp_admin_setting_callback_user_engagements_slug() {
|
1166 |
+
?>
|
1167 |
+
|
1168 |
+
<input name="_bbp_user_engagements_slug" id="_bbp_user_engagements_slug" type="text" class="regular-text code" value="<?php bbp_form_option( '_bbp_user_engagements_slug', 'engagements', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_user_engagements_slug' ); ?> />
|
1169 |
+
|
1170 |
+
<?php
|
1171 |
+
// Slug Check
|
1172 |
+
bbp_form_slug_conflict_check( '_bbp_user_engagements_slug', 'engagements' );
|
1173 |
+
}
|
1174 |
+
|
1175 |
/** Single Slugs **************************************************************/
|
1176 |
|
1177 |
/**
|
1300 |
function bbp_admin_setting_callback_buddypress_section() {
|
1301 |
?>
|
1302 |
|
1303 |
+
<p><?php esc_html_e( 'Configure how Forum settings for BuddyPress', 'bbpress' ); ?></p>
|
1304 |
|
1305 |
<?php
|
1306 |
}
|
1330 |
*/
|
1331 |
function bbp_admin_setting_callback_group_forums_root_id() {
|
1332 |
|
1333 |
+
// Group root ID
|
1334 |
+
$group_root = bbp_get_group_forums_root_id();
|
1335 |
+
if ( ! bbp_get_forum( $group_root ) ) {
|
1336 |
+
delete_option( '_bbp_group_forums_root_id' );
|
1337 |
+
$group_root = 0;
|
1338 |
+
}
|
1339 |
+
|
1340 |
// Output the dropdown for all forums
|
1341 |
+
$select = bbp_get_dropdown( array(
|
1342 |
+
'selected' => $group_root,
|
1343 |
+
'show_none' => esc_html__( '— No parent —', 'bbpress' ),
|
1344 |
'orderby' => 'title',
|
1345 |
'order' => 'ASC',
|
1346 |
'select_id' => '_bbp_group_forums_root_id',
|
1347 |
'disable_categories' => false,
|
1348 |
'disabled' => '_bbp_group_forums_root_id'
|
1349 |
+
) );
|
1350 |
|
1351 |
+
// Check cap one time
|
1352 |
+
$can_add_new = current_user_can( 'publish_forums' );
|
1353 |
+
$button = '';
|
1354 |
+
|
1355 |
+
// Text variations based on configuration
|
1356 |
+
if ( empty( $group_root ) && ( true === $can_add_new ) ) {
|
1357 |
+
|
1358 |
+
// New URL
|
1359 |
+
$new_url = wp_nonce_url( add_query_arg( array(
|
1360 |
+
'page' => 'bbpress',
|
1361 |
+
'create' => 'bbp-group-forum-root'
|
1362 |
+
), admin_url( 'options-general.php' ) ), '_bbp_group_forums_root_id' );
|
1363 |
+
|
1364 |
+
// Button & text
|
1365 |
+
$button = '<a href="' . esc_url( $new_url ) . '">' . esc_html__( 'create a new one', 'bbpress' ) . '</a>';
|
1366 |
+
$text = esc_html__( 'Use %s to contain your group forums, or %s', 'bbpress' );
|
1367 |
+
} else {
|
1368 |
+
$text = esc_html__( 'Use %s to contain your group forums', 'bbpress' );
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
// Output
|
1372 |
+
printf( $text, $select, $button ); ?>
|
1373 |
+
<p class="description"><?php esc_html_e( 'Changing this will not move existing forums.', 'bbpress' ); ?></p>
|
1374 |
|
1375 |
<?php
|
1376 |
}
|
1421 |
?>
|
1422 |
|
1423 |
<div class="wrap">
|
|
|
1424 |
<h1><?php esc_html_e( 'Forums Settings', 'bbpress' ) ?></h1>
|
1425 |
+
<hr class="wp-header-end">
|
1426 |
|
1427 |
<form action="options.php" method="post">
|
1428 |
|
1462 |
*/
|
1463 |
function bbp_converter_setting_callback_platform() {
|
1464 |
|
1465 |
+
// Converters
|
1466 |
+
$converters = bbp_get_converters();
|
1467 |
+
$options = '';
|
1468 |
|
1469 |
+
// Put options together
|
1470 |
+
foreach ( $converters as $name => $file ) {
|
1471 |
+
$options .= '<option value="' . esc_attr( $name ) . '">' . esc_html( $name ) . '</option>';
|
1472 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1473 |
|
1474 |
+
<select name="_bbp_converter_platform" id="_bbp_converter_platform"><?php echo $options ?></select>
|
1475 |
<label for="_bbp_converter_platform"><?php esc_html_e( 'is the previous forum software', 'bbpress' ); ?></label>
|
1476 |
|
1477 |
<?php
|
1485 |
function bbp_converter_setting_callback_dbserver() {
|
1486 |
?>
|
1487 |
|
1488 |
+
<input name="_bbp_converter_db_server" id="_bbp_converter_db_server" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" class="medium-text" />
|
1489 |
+
<label for="_bbp_converter_db_server"><?php esc_html_e( 'Use default "localhost" if on the same server, otherwise IP or hostname', 'bbpress' ); ?></label>
|
1490 |
|
1491 |
<?php
|
1492 |
}
|
1499 |
function bbp_converter_setting_callback_dbport() {
|
1500 |
?>
|
1501 |
|
1502 |
+
<input name="_bbp_converter_db_port" id="_bbp_converter_db_port" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" class="small-text" />
|
1503 |
+
<label for="_bbp_converter_db_port"><?php esc_html_e( 'Use default "3306" if unsure', 'bbpress' ); ?></label>
|
1504 |
|
1505 |
<?php
|
1506 |
}
|
1513 |
function bbp_converter_setting_callback_dbuser() {
|
1514 |
?>
|
1515 |
|
1516 |
+
<input name="_bbp_converter_db_user" id="_bbp_converter_db_user" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_user' ); ?>" class="medium-text" />
|
1517 |
+
<label for="_bbp_converter_db_user"><?php esc_html_e( 'User to acces the database', 'bbpress' ); ?></label>
|
1518 |
|
1519 |
<?php
|
1520 |
}
|
1527 |
function bbp_converter_setting_callback_dbpass() {
|
1528 |
?>
|
1529 |
|
1530 |
+
<input name="_bbp_converter_db_pass" id="_bbp_converter_db_pass" type="password" class="code" value="<?php bbp_form_option( '_bbp_converter_db_pass' ); ?>" class="medium-text" autocomplete="off" />
|
1531 |
+
<label for="_bbp_converter_db_pass"><?php esc_html_e( 'Password of the above database user', 'bbpress' ); ?></label>
|
1532 |
|
1533 |
<?php
|
1534 |
}
|
1541 |
function bbp_converter_setting_callback_dbname() {
|
1542 |
?>
|
1543 |
|
1544 |
+
<input name="_bbp_converter_db_name" id="_bbp_converter_db_name" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_name' ); ?>" class="medium-text" />
|
1545 |
<label for="_bbp_converter_db_name"><?php esc_html_e( 'Name of the database with your old forum data', 'bbpress' ); ?></label>
|
1546 |
|
1547 |
<?php
|
1568 |
function bbp_converter_setting_callback_dbprefix() {
|
1569 |
?>
|
1570 |
|
1571 |
+
<input name="_bbp_converter_db_prefix" id="_bbp_converter_db_prefix" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_prefix' ); ?>" class="medium-text" />
|
1572 |
<label for="_bbp_converter_db_prefix"><?php esc_html_e( '(If converting from BuddyPress Forums, use "wp_bb_" or your custom prefix)', 'bbpress' ); ?></label>
|
1573 |
|
1574 |
<?php
|
1582 |
function bbp_converter_setting_callback_rows() {
|
1583 |
?>
|
1584 |
|
1585 |
+
<input name="_bbp_converter_rows" id="_bbp_converter_rows" type="number" min="1" max="5000" value="<?php bbp_form_option( '_bbp_converter_rows', '100' ); ?>" class="small-text" />
|
1586 |
<label for="_bbp_converter_rows"><?php esc_html_e( 'rows to process at a time', 'bbpress' ); ?></label>
|
1587 |
<p class="description"><?php esc_html_e( 'Keep this low if you experience out-of-memory issues.', 'bbpress' ); ?></p>
|
1588 |
|
1597 |
function bbp_converter_setting_callback_delay_time() {
|
1598 |
?>
|
1599 |
|
1600 |
+
<input name="_bbp_converter_delay_time" id="_bbp_converter_delay_time" type="number" min="1" max="3600" value="<?php bbp_form_option( '_bbp_converter_delay_time', '1' ); ?>" class="small-text" />
|
1601 |
<label for="_bbp_converter_delay_time"><?php esc_html_e( 'second(s) delay between each group of rows', 'bbpress' ); ?></label>
|
1602 |
<p class="description"><?php esc_html_e( 'Keep this high to prevent too-many-connection issues.', 'bbpress' ); ?></p>
|
1603 |
|
1657 |
* @uses settings_fields() To output the hidden fields for the form
|
1658 |
* @uses do_settings_sections() To output the settings sections
|
1659 |
*/
|
1660 |
+
function bbp_converter_settings_page() {
|
1661 |
+
|
1662 |
+
// Status
|
1663 |
+
$step = (int) get_option( '_bbp_converter_step', 0 );
|
1664 |
+
$max = 17; // Filter?
|
1665 |
+
|
1666 |
+
// Starting or continuing?
|
1667 |
+
$start_text = ! empty( $step )
|
1668 |
+
? esc_html__( 'Continue', 'bbpress' )
|
1669 |
+
: esc_html__( 'Start', 'bbpress' );
|
1670 |
+
|
1671 |
+
// Starting or continuing?
|
1672 |
+
$status_text = ! empty( $step )
|
1673 |
+
? sprintf( esc_html__( 'Previously stopped at step %d of %d', 'bbpress' ), $step, $max )
|
1674 |
+
: esc_html__( 'Ready to go.', 'bbpress' ); ?>
|
1675 |
|
1676 |
<div class="wrap">
|
1677 |
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
1678 |
+
<hr class="wp-header-end">
|
1679 |
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( esc_html__( 'Import Forums', 'bbpress' ) ); ?></h2>
|
1680 |
|
1681 |
<form action="#" method="post" id="bbp-converter-settings">
|
1685 |
<?php do_settings_sections( 'bbpress_converter' ); ?>
|
1686 |
|
1687 |
<p class="submit">
|
1688 |
+
<input type="button" name="submit" class="button-primary" id="bbp-converter-start" value="<?php echo esc_attr( $start_text ); ?>" />
|
1689 |
+
<input type="button" name="submit" class="button-primary" id="bbp-converter-stop" value="<?php esc_attr_e( 'Stop', 'bbpress' ); ?>" />
|
|
|
1690 |
</p>
|
|
|
|
|
1691 |
</form>
|
|
|
1692 |
|
1693 |
+
<div id="poststuff">
|
1694 |
+
<div id="post-body" class="metabox-holder columns-1">
|
1695 |
+
<div id="postbox-container-1" class="postbox-container">
|
1696 |
+
<div id="normal-sortables" class="meta-box-sortables ui-sortable">
|
1697 |
+
<div id="bbp-converter-monitor" class="postbox">
|
1698 |
+
<button type="button" class="handlediv" aria-expanded="true">
|
1699 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Toggle panel: Import Status', 'bbpress' ); ?></span>
|
1700 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
1701 |
+
</button>
|
1702 |
+
<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e( 'Import Monitor', 'bbpress' ); ?></span></h2>
|
1703 |
+
<div class="inside">
|
1704 |
+
<div id="bbp-converter-message" class="bbp-converter-log">
|
1705 |
+
<p><?php echo esc_html( $status_text ); ?></p>
|
1706 |
+
</div>
|
1707 |
+
</div>
|
1708 |
+
</div>
|
1709 |
+
</div>
|
1710 |
+
</div>
|
1711 |
+
</div>
|
1712 |
+
</div>
|
1713 |
+
</div>
|
1714 |
<?php
|
1715 |
}
|
1716 |
|
1735 |
// Overview
|
1736 |
$current_screen->add_help_tab( array(
|
1737 |
'id' => 'overview',
|
1738 |
+
'title' => esc_html__( 'Overview', 'bbpress' ),
|
1739 |
+
'content' => '<p>' . esc_html__( 'This screen provides access to all of the Forums settings.', 'bbpress' ) . '</p>' .
|
1740 |
+
'<p>' . esc_html__( 'Please see the additional help tabs for more information on each individual section.', 'bbpress' ) . '</p>'
|
1741 |
) );
|
1742 |
|
1743 |
// Main Settings
|
1744 |
$current_screen->add_help_tab( array(
|
1745 |
'id' => 'main_settings',
|
1746 |
+
'title' => esc_html__( 'Main Settings', 'bbpress' ),
|
1747 |
+
'content' => '<p>' . esc_html__( 'The "Main Settings" section includes a number of options:', 'bbpress' ) . '</p>' .
|
1748 |
'<p>' .
|
1749 |
'<ul>' .
|
1750 |
+
'<li>' . esc_html__( 'You can choose to lock a post after a certain number of minutes. "Locking post editing" will prevent the author from editing some amount of time after saving a post.', 'bbpress' ) . '</li>' .
|
1751 |
+
'<li>' . esc_html__( '"Throttle time" is the amount of time required between posts from a single author. The higher the throttle time, the longer a user will need to wait between posting to the forum.', 'bbpress' ) . '</li>' .
|
1752 |
+
'<li>' . esc_html__( 'Favorites are a way for users to save and later return to topics they favor. This is enabled by default.', 'bbpress' ) . '</li>' .
|
1753 |
+
'<li>' . esc_html__( 'Subscriptions allow users to subscribe for notifications to topics that interest them. This is enabled by default.', 'bbpress' ) . '</li>' .
|
1754 |
+
'<li>' . esc_html__( 'Topic-Tags allow users to filter topics between forums. This is enabled by default.', 'bbpress' ) . '</li>' .
|
1755 |
+
'<li>' . esc_html__( '"Anonymous Posting" allows guest users who do not have accounts on your site to both create topics as well as replies.', 'bbpress' ) . '</li>' .
|
1756 |
+
'<li>' . esc_html__( 'The Fancy Editor brings the luxury of the Visual editor and HTML editor from the traditional WordPress dashboard into your theme.', 'bbpress' ) . '</li>' .
|
1757 |
+
'<li>' . esc_html__( 'Auto-embed will embed the media content from a URL directly into the replies. For example: links to Flickr and YouTube.', 'bbpress' ) . '</li>' .
|
1758 |
'</ul>' .
|
1759 |
'</p>' .
|
1760 |
+
'<p>' . esc_html__( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.', 'bbpress' ) . '</p>'
|
1761 |
+
) );
|
1762 |
+
|
1763 |
+
// Theme Package
|
1764 |
+
$current_screen->add_help_tab( array(
|
1765 |
+
'id' => 'theme_packages',
|
1766 |
+
'title' => esc_html__( 'Theme Packages', 'bbpress' ),
|
1767 |
+
'content' => '<p>' . esc_html__( 'The "Theme Packages" section allows you to choose which theme package should be used.', 'bbpress' ) . '</p>' .
|
1768 |
+
'<p>' .
|
1769 |
+
'<ul>' .
|
1770 |
+
'<li>' . esc_html__( 'The "bbPress Default" package is installed by default.', 'bbpress' ) . '</li>' .
|
1771 |
+
'<li>' . esc_html__( 'Some themes may choose to ignore this setting entirely.', 'bbpress' ) . '</li>' .
|
1772 |
+
'<li>' . esc_html__( 'Packages can be stacked to allow for intelligent fallbacks.', 'bbpress' ) . '</li>' .
|
1773 |
+
'</ul>' .
|
1774 |
+
'</p>'
|
1775 |
) );
|
1776 |
|
1777 |
// Per Page
|
1778 |
$current_screen->add_help_tab( array(
|
1779 |
'id' => 'per_page',
|
1780 |
+
'title' => esc_html__( 'Per Page', 'bbpress' ),
|
1781 |
+
'content' => '<p>' . esc_html__( 'The "Per Page" section allows you to control the number of topics and replies appear on each page.', 'bbpress' ) . '</p>' .
|
1782 |
+
'<ul>' .
|
1783 |
+
'<li>' . esc_html__( 'This is comparable to the WordPress "Reading Settings" page, where you can set the number of posts that should show on blog pages and in feeds.', 'bbpress' ) . '</li>' .
|
1784 |
+
'<li>' . esc_html__( 'These are broken up into two separate groups: one for what appears in your theme, another for RSS feeds.', 'bbpress' ) . '</li>' .
|
1785 |
+
'</ul>' .
|
1786 |
+
'<p>'
|
1787 |
) );
|
1788 |
|
1789 |
// Slugs
|
1790 |
$current_screen->add_help_tab( array(
|
1791 |
+
'id' => 'slugs',
|
1792 |
+
'title' => esc_html__( 'Slugs', 'bbpress' ),
|
1793 |
+
'content' => '<p>' . esc_html__( 'The "Slugs" section allows you to control the permalink structure for your forums.', 'bbpress' ) . '</p>' .
|
1794 |
+
'<ul>' .
|
1795 |
+
'<li>' . esc_html__( '"Archive Slugs" are used as the "root" for your forums and topics. If you combine these values with existing page slugs, bbPress will attempt to output the most correct title and content.', 'bbpress' ) . '</li>' .
|
1796 |
+
'<li>' . esc_html__( '"Single Slugs" are used as a prefix when viewing an individual forum, topic, reply, user, or view.', 'bbpress' ) . '</li>' .
|
1797 |
+
'<li>' . esc_html__( 'In the event of a slug collision with WordPress or BuddyPress, a warning will appear next to the problem slug(s).', 'bbpress' ) . '</li>' .
|
1798 |
+
'</ul>' .
|
1799 |
+
'<p>'
|
1800 |
) );
|
1801 |
|
1802 |
// Help Sidebar
|
1803 |
$current_screen->set_help_sidebar(
|
1804 |
+
'<p><strong>' . esc_html__( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
1805 |
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
1806 |
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
1807 |
);
|
1808 |
}
|
1809 |
|
1810 |
/**
|
1811 |
+
* Disable a settings field if it is forcibly set in the global options array.
|
|
|
1812 |
*
|
1813 |
* @since 2.2.0 bbPress (r4347)
|
1814 |
*
|
1864 |
$value = $default;
|
1865 |
}
|
1866 |
|
1867 |
+
// Filter & return
|
1868 |
return apply_filters( 'bbp_get_form_option', $value, $option );
|
1869 |
}
|
1870 |
|
1894 |
/** WordPress Core ****************************************************/
|
1895 |
|
1896 |
// Core Post Types
|
1897 |
+
'post_base' => array( 'name' => esc_html__( 'Posts', 'bbpress' ), 'default' => 'post', 'context' => 'WordPress' ),
|
1898 |
+
'page_base' => array( 'name' => esc_html__( 'Pages', 'bbpress' ), 'default' => 'page', 'context' => 'WordPress' ),
|
1899 |
+
'revision_base' => array( 'name' => esc_html__( 'Revisions', 'bbpress' ), 'default' => 'revision', 'context' => 'WordPress' ),
|
1900 |
+
'attachment_base' => array( 'name' => esc_html__( 'Attachments', 'bbpress' ), 'default' => 'attachment', 'context' => 'WordPress' ),
|
1901 |
+
'nav_menu_base' => array( 'name' => esc_html__( 'Menus', 'bbpress' ), 'default' => 'nav_menu_item', 'context' => 'WordPress' ),
|
1902 |
|
1903 |
// Post Tags
|
1904 |
+
'tag_base' => array( 'name' => esc_html__( 'Tag base', 'bbpress' ), 'default' => 'tag', 'context' => 'WordPress' ),
|
1905 |
|
1906 |
// Post Categories
|
1907 |
+
'category_base' => array( 'name' => esc_html__( 'Category base', 'bbpress' ), 'default' => 'category', 'context' => 'WordPress' ),
|
1908 |
|
1909 |
/** bbPress Core ******************************************************/
|
1910 |
|
1911 |
// Forum archive slug
|
1912 |
+
'_bbp_root_slug' => array( 'name' => esc_html__( 'Forums base', 'bbpress' ), 'default' => 'forums', 'context' => 'bbPress' ),
|
1913 |
|
1914 |
// Topic archive slug
|
1915 |
+
'_bbp_topic_archive_slug' => array( 'name' => esc_html__( 'Topics base', 'bbpress' ), 'default' => 'topics', 'context' => 'bbPress' ),
|
1916 |
|
1917 |
// Forum slug
|
1918 |
+
'_bbp_forum_slug' => array( 'name' => esc_html__( 'Forum slug', 'bbpress' ), 'default' => 'forum', 'context' => 'bbPress' ),
|
1919 |
|
1920 |
// Topic slug
|
1921 |
+
'_bbp_topic_slug' => array( 'name' => esc_html__( 'Topic slug', 'bbpress' ), 'default' => 'topic', 'context' => 'bbPress' ),
|
1922 |
|
1923 |
// Reply slug
|
1924 |
+
'_bbp_reply_slug' => array( 'name' => esc_html__( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ),
|
1925 |
|
1926 |
// User profile slug
|
1927 |
+
'_bbp_user_slug' => array( 'name' => esc_html__( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ),
|
1928 |
|
1929 |
// View slug
|
1930 |
+
'_bbp_view_slug' => array( 'name' => esc_html__( 'View base', 'bbpress' ), 'default' => 'view', 'context' => 'bbPress' ),
|
1931 |
|
1932 |
// Topic tag slug
|
1933 |
+
'_bbp_topic_tag_slug' => array( 'name' => esc_html__( 'Topic tag slug', 'bbpress' ), 'default' => 'topic-tag', 'context' => 'bbPress' ),
|
1934 |
) );
|
1935 |
|
1936 |
/** BuddyPress Core *******************************************************/
|
1942 |
if ( ! empty( $bp->pages ) ) {
|
1943 |
foreach ( $bp->pages as $page => $page_data ) {
|
1944 |
$page_base = $page . '_base';
|
1945 |
+
$page_title = sprintf( esc_html__( '%s page', 'bbpress' ), $page_data->title );
|
1946 |
$core_slugs[ $page_base ] = array(
|
1947 |
'name' => $page_title,
|
1948 |
'default' => $page_data->slug,
|
includes/admin/styles/evergreen/colors-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{background:#f1f1f1}a{color:#0073aa}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#56b274}input[type=radio]:checked:before{background:#56b274}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#56b274;border-color:#43925d #3b8152 #3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152;text-shadow:0 -1px 1px #3b8152,-1px 0 1px #3b8152,0 1px 1px #3b8152,1px 0 1px #3b8152}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#61b77d;border-color:#3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#43925d;border-color:#3b8152;-webkit-box-shadow:inset 0 2px 0 #3b8152;box-shadow:inset 0 2px 0 #3b8152}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#469961!important;border-color:#3b8152!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #3b8152!important;box-shadow:0 2px 0 #3b8152!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #3b8152!important;box-shadow:inset 0 3px 0 #3b8152!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#446950}.wp-core-ui .wp-ui-text-primary{color:#446950}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#56b274}.wp-core-ui .wp-ui-text-highlight{color:#56b274}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#36b360}.wp-core-ui .wp-ui-text-notification{color:#36b360}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#446950}.view-switch a.current:before{color:#446950}.view-switch a:hover:before{color:#36b360}#adminmenu,#adminmenuback,#adminmenuwrap{background:#446950}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#56b274}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#36533f}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#36533f}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#56b274}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#56b274}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#56b274}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#36b360}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#36533f}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#56b274}#wpadminbar{color:#fff;background:#446950}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#56b274;background:#36533f}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#56b274}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#36533f}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#597763}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c7d2cb}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#56b274}#wpadminbar #adminbarsearch:before,#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#527f61}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#527f61;background-color:#527f61}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#56b274}#wpadminbar #wp-admin-bar-user-info .username{color:#c7d2cb}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after,.wp-pointer .wp-pointer-content h3:before{color:#56b274}.wp-pointer .wp-pointer-content h3{background-color:#56b274;border-color:#4ba468}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#56b274}.media-item .bar,.media-progress-bar div{background-color:#56b274}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274}.attachment.details .check{background-color:#56b274;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#56b274}.theme-filter.current,.theme-section.current{border-bottom-color:#446950}body.more-filters-opened .more-filters{color:#fff;background-color:#446950}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#56b274;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before,div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#56b274}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#36533f}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#56b274}
|
1 |
+
body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#56b274}input[type=radio]:checked:before{background:#56b274}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#56b274;border-color:#43925d #3b8152 #3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152;text-shadow:0 -1px 1px #3b8152,-1px 0 1px #3b8152,0 1px 1px #3b8152,1px 0 1px #3b8152}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#61b77d;border-color:#3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#43925d;border-color:#3b8152;-webkit-box-shadow:inset 0 2px 0 #3b8152;box-shadow:inset 0 2px 0 #3b8152}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#469961!important;border-color:#3b8152!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #3b8152!important;box-shadow:0 2px 0 #3b8152!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #3b8152!important;box-shadow:inset 0 3px 0 #3b8152!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#446950}.wp-core-ui .wp-ui-text-primary{color:#446950}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#56b274}.wp-core-ui .wp-ui-text-highlight{color:#56b274}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#36b360}.wp-core-ui .wp-ui-text-notification{color:#36b360}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#446950}.view-switch a.current:before{color:#446950}.view-switch a:hover:before{color:#36b360}#adminmenu,#adminmenuback,#adminmenuwrap{background:#446950}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#56b274}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#36533f}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#36533f}#adminmenu .wp-submenu .wp-submenu-head{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#56b274}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#56b274}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#56b274}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#36b360}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#36533f}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#56b274}#wpadminbar{color:#fff;background:#446950}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#56b274;background:#36533f}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#56b274}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#36533f}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#597763}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c7d2cb}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#56b274}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#56b274}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar #adminbarsearch:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#527f61}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#527f61;background-color:#527f61}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#56b274}#wpadminbar #wp-admin-bar-user-info .username{color:#c7d2cb}.wp-pointer .wp-pointer-content h3{background-color:#56b274;border-color:#4ba468}.wp-pointer .wp-pointer-content h3:before{color:#56b274}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#56b274}.media-item .bar,.media-progress-bar div{background-color:#56b274}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274}.attachment.details .check{background-color:#56b274;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#56b274}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#56b274}.theme-filter.current,.theme-section.current{border-bottom-color:#446950}body.more-filters-opened .more-filters{color:#fff;background-color:#446950}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#56b274;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#56b274;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#56b274}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#36533f}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f3f2}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#56b274}
|
includes/admin/styles/evergreen/colors.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{background:#f1f1f1}a{color:#0073aa}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#56b274}input[type=radio]:checked:before{background:#56b274}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#56b274;border-color:#43925d #3b8152 #3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152;text-shadow:0 -1px 1px #3b8152,1px 0 1px #3b8152,0 1px 1px #3b8152,-1px 0 1px #3b8152}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#61b77d;border-color:#3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#43925d;border-color:#3b8152;-webkit-box-shadow:inset 0 2px 0 #3b8152;box-shadow:inset 0 2px 0 #3b8152}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#469961!important;border-color:#3b8152!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #3b8152!important;box-shadow:0 2px 0 #3b8152!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #3b8152!important;box-shadow:inset 0 3px 0 #3b8152!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#446950}.wp-core-ui .wp-ui-text-primary{color:#446950}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#56b274}.wp-core-ui .wp-ui-text-highlight{color:#56b274}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#36b360}.wp-core-ui .wp-ui-text-notification{color:#36b360}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#446950}.view-switch a.current:before{color:#446950}.view-switch a:hover:before{color:#36b360}#adminmenu,#adminmenuback,#adminmenuwrap{background:#446950}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#56b274}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#36533f}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#36533f}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#56b274}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#56b274}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#56b274}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#36b360}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#36533f}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#56b274}#wpadminbar{color:#fff;background:#446950}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#56b274;background:#36533f}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#56b274}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#36533f}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#597763}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c7d2cb}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#56b274}#wpadminbar #adminbarsearch:before,#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#527f61}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#527f61;background-color:#527f61}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#56b274}#wpadminbar #wp-admin-bar-user-info .username{color:#c7d2cb}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after,.wp-pointer .wp-pointer-content h3:before{color:#56b274}.wp-pointer .wp-pointer-content h3{background-color:#56b274;border-color:#4ba468}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#56b274}.media-item .bar,.media-progress-bar div{background-color:#56b274}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274}.attachment.details .check{background-color:#56b274;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#56b274}.theme-filter.current,.theme-section.current{border-bottom-color:#446950}body.more-filters-opened .more-filters{color:#fff;background-color:#446950}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#56b274;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before,div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#56b274}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#36533f}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#56b274}
|
1 |
+
body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#56b274}input[type=radio]:checked:before{background:#56b274}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#56b274;border-color:#43925d #3b8152 #3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152;text-shadow:0 -1px 1px #3b8152,1px 0 1px #3b8152,0 1px 1px #3b8152,-1px 0 1px #3b8152}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#61b77d;border-color:#3b8152;color:#fff;-webkit-box-shadow:0 1px 0 #3b8152;box-shadow:0 1px 0 #3b8152}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #43925d,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#43925d;border-color:#3b8152;-webkit-box-shadow:inset 0 2px 0 #3b8152;box-shadow:inset 0 2px 0 #3b8152}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#469961!important;border-color:#3b8152!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #3b8152!important;box-shadow:0 2px 0 #3b8152!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #3b8152!important;box-shadow:inset 0 3px 0 #3b8152!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#446950}.wp-core-ui .wp-ui-text-primary{color:#446950}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#56b274}.wp-core-ui .wp-ui-text-highlight{color:#56b274}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#36b360}.wp-core-ui .wp-ui-text-notification{color:#36b360}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#446950}.view-switch a.current:before{color:#446950}.view-switch a:hover:before{color:#36b360}#adminmenu,#adminmenuback,#adminmenuwrap{background:#446950}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#56b274}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#36533f}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#36533f}#adminmenu .wp-submenu .wp-submenu-head{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#c7d2cb}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#56b274}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#56b274}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#56b274}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#36b360}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#36533f}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#56b274}#wpadminbar{color:#fff;background:#446950}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#56b274;background:#36533f}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#56b274}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#36533f}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#597763}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#c7d2cb}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#56b274}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#56b274}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar #adminbarsearch:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#527f61}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#527f61;background-color:#527f61}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#56b274}#wpadminbar #wp-admin-bar-user-info .username{color:#c7d2cb}.wp-pointer .wp-pointer-content h3{background-color:#56b274;border-color:#4ba468}.wp-pointer .wp-pointer-content h3:before{color:#56b274}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#56b274}.media-item .bar,.media-progress-bar div{background-color:#56b274}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #56b274}.attachment.details .check{background-color:#56b274;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 2px #56b274}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274;box-shadow:0 0 0 1px #fff,0 0 0 3px #56b274}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#56b274}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#56b274}.theme-filter.current,.theme-section.current{border-bottom-color:#446950}body.more-filters-opened .more-filters{color:#fff;background-color:#446950}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#56b274;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#56b274;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#56b274}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#36533f}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f3f2}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#56b274}
|
includes/admin/styles/mint/colors-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{background:#f1f1f1}a{color:#0073aa}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#4f6d59}input[type=radio]:checked:before{background:#4f6d59}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#4f6d59;border-color:#3a4f41 #2f4035 #2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035;text-shadow:0 -1px 1px #2f4035,-1px 0 1px #2f4035,0 1px 1px #2f4035,1px 0 1px #2f4035}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#567560;border-color:#2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#3a4f41;border-color:#2f4035;-webkit-box-shadow:inset 0 2px 0 #2f4035;box-shadow:inset 0 2px 0 #2f4035}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#3e5546!important;border-color:#2f4035!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #2f4035!important;box-shadow:0 2px 0 #2f4035!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #2f4035!important;box-shadow:inset 0 3px 0 #2f4035!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#5fb37c}.wp-core-ui .wp-ui-text-primary{color:#5fb37c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#4f6d59}.wp-core-ui .wp-ui-text-highlight{color:#4f6d59}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#33834e}.wp-core-ui .wp-ui-text-notification{color:#33834e}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#5fb37c}.view-switch a.current:before{color:#5fb37c}.view-switch a:hover:before{color:#33834e}#adminmenu,#adminmenuback,#adminmenuwrap{background:#5fb37c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#4f6d59}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4ca26a}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#4ca26a}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#4f6d59}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#4f6d59}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#4f6d59}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#33834e}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4ca26a}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#4f6d59}#wpadminbar{color:#fff;background:#5fb37c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#4f6d59;background:#4ca26a}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#4f6d59}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4ca26a}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#7eb892}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cfe8d8}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#4f6d59}#wpadminbar #adminbarsearch:before,#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#77bf8f}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#77bf8f;background-color:#77bf8f}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#4f6d59}#wpadminbar #wp-admin-bar-user-info .username{color:#cfe8d8}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after,.wp-pointer .wp-pointer-content h3:before{color:#4f6d59}.wp-pointer .wp-pointer-content h3{background-color:#4f6d59;border-color:#455e4d}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#4f6d59}.media-item .bar,.media-progress-bar div{background-color:#4f6d59}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59}.attachment.details .check{background-color:#4f6d59;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#4f6d59}.theme-filter.current,.theme-section.current{border-bottom-color:#5fb37c}body.more-filters-opened .more-filters{color:#fff;background-color:#5fb37c}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#4f6d59;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before,div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#4f6d59}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4ca26a}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#4f6d59}
|
1 |
+
body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#4f6d59}input[type=radio]:checked:before{background:#4f6d59}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#4f6d59;border-color:#3a4f41 #2f4035 #2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035;text-shadow:0 -1px 1px #2f4035,-1px 0 1px #2f4035,0 1px 1px #2f4035,1px 0 1px #2f4035}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#567560;border-color:#2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#3a4f41;border-color:#2f4035;-webkit-box-shadow:inset 0 2px 0 #2f4035;box-shadow:inset 0 2px 0 #2f4035}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#3e5546!important;border-color:#2f4035!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #2f4035!important;box-shadow:0 2px 0 #2f4035!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #2f4035!important;box-shadow:inset 0 3px 0 #2f4035!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#5fb37c}.wp-core-ui .wp-ui-text-primary{color:#5fb37c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#4f6d59}.wp-core-ui .wp-ui-text-highlight{color:#4f6d59}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#33834e}.wp-core-ui .wp-ui-text-notification{color:#33834e}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#5fb37c}.view-switch a.current:before{color:#5fb37c}.view-switch a:hover:before{color:#33834e}#adminmenu,#adminmenuback,#adminmenuwrap{background:#5fb37c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#4f6d59}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4ca26a}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#4ca26a}#adminmenu .wp-submenu .wp-submenu-head{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#4f6d59}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#4f6d59}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-left-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#4f6d59}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#33834e}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4ca26a}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#4f6d59}#wpadminbar{color:#fff;background:#5fb37c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#4f6d59;background:#4ca26a}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#4f6d59}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4ca26a}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#7eb892}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cfe8d8}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#4f6d59}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#4f6d59}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar #adminbarsearch:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#77bf8f}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#77bf8f;background-color:#77bf8f}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#4f6d59}#wpadminbar #wp-admin-bar-user-info .username{color:#cfe8d8}.wp-pointer .wp-pointer-content h3{background-color:#4f6d59;border-color:#455e4d}.wp-pointer .wp-pointer-content h3:before{color:#4f6d59}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#4f6d59}.media-item .bar,.media-progress-bar div{background-color:#4f6d59}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59}.attachment.details .check{background-color:#4f6d59;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#4f6d59}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#4f6d59}.theme-filter.current,.theme-section.current{border-bottom-color:#5fb37c}body.more-filters-opened .more-filters{color:#fff;background-color:#5fb37c}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#4f6d59;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#4f6d59;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#4f6d59}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4ca26a}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f3f2}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#4f6d59}
|
includes/admin/styles/mint/colors.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body{background:#f1f1f1}a{color:#0073aa}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,a:active,a:focus,a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#4f6d59}input[type=radio]:checked:before{background:#4f6d59}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#4f6d59;border-color:#3a4f41 #2f4035 #2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035;text-shadow:0 -1px 1px #2f4035,1px 0 1px #2f4035,0 1px 1px #2f4035,-1px 0 1px #2f4035}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#567560;border-color:#2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#3a4f41;border-color:#2f4035;-webkit-box-shadow:inset 0 2px 0 #2f4035;box-shadow:inset 0 2px 0 #2f4035}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#3e5546!important;border-color:#2f4035!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #2f4035!important;box-shadow:0 2px 0 #2f4035!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #2f4035!important;box-shadow:inset 0 3px 0 #2f4035!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#5fb37c}.wp-core-ui .wp-ui-text-primary{color:#5fb37c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#4f6d59}.wp-core-ui .wp-ui-text-highlight{color:#4f6d59}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#33834e}.wp-core-ui .wp-ui-text-notification{color:#33834e}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#5fb37c}.view-switch a.current:before{color:#5fb37c}.view-switch a:hover:before{color:#33834e}#adminmenu,#adminmenuback,#adminmenuwrap{background:#5fb37c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#4f6d59}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4ca26a}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#4ca26a}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu .wp-submenu-head,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#4f6d59}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#4f6d59}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#4f6d59}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#33834e}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4ca26a}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#4f6d59}#wpadminbar{color:#fff;background:#5fb37c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#4f6d59;background:#4ca26a}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#4f6d59}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4ca26a}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#7eb892}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cfe8d8}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#4f6d59}#wpadminbar #adminbarsearch:before,#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#77bf8f}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#77bf8f;background-color:#77bf8f}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#4f6d59}#wpadminbar #wp-admin-bar-user-info .username{color:#cfe8d8}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after,.wp-pointer .wp-pointer-content h3:before{color:#4f6d59}.wp-pointer .wp-pointer-content h3{background-color:#4f6d59;border-color:#455e4d}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#4f6d59}.media-item .bar,.media-progress-bar div{background-color:#4f6d59}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59}.attachment.details .check{background-color:#4f6d59;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#4f6d59}.theme-filter.current,.theme-section.current{border-bottom-color:#5fb37c}body.more-filters-opened .more-filters{color:#fff;background-color:#5fb37c}.widgets-chooser li.widgets-chooser-selected,body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#4f6d59;color:#fff}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before,div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#4f6d59}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4ca26a}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#4f6d59}
|
1 |
+
body{background:#f1f1f1}a{color:#0073aa}a:active,a:focus,a:hover{color:#0096dd}#media-upload a.del-link:hover,.subsubsub a.current:hover,.subsubsub a:hover,div.dashboard-widget-submit input:hover{color:#0096dd}input[type=checkbox]:checked:before{color:#4f6d59}input[type=radio]:checked:before{background:#4f6d59}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#0096dd}.wp-core-ui .button-primary{background:#4f6d59;border-color:#3a4f41 #2f4035 #2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035;text-shadow:0 -1px 1px #2f4035,1px 0 1px #2f4035,0 1px 1px #2f4035,-1px 0 1px #2f4035}.wp-core-ui .button-primary:focus,.wp-core-ui .button-primary:hover{background:#567560;border-color:#2f4035;color:#fff;-webkit-box-shadow:0 1px 0 #2f4035;box-shadow:0 1px 0 #2f4035}.wp-core-ui .button-primary:focus{-webkit-box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db;box-shadow:inset 0 1px 0 #3a4f41,0 0 2px 1px #33b3db}.wp-core-ui .button-primary:active{background:#3a4f41;border-color:#2f4035;-webkit-box-shadow:inset 0 2px 0 #2f4035;box-shadow:inset 0 2px 0 #2f4035}.wp-core-ui .button-primary.button-primary-disabled,.wp-core-ui .button-primary.disabled,.wp-core-ui .button-primary:disabled,.wp-core-ui .button-primary[disabled]{color:#c7d1ca!important;background:#3e5546!important;border-color:#2f4035!important;text-shadow:none!important}.wp-core-ui .button-primary.button-hero{-webkit-box-shadow:0 2px 0 #2f4035!important;box-shadow:0 2px 0 #2f4035!important}.wp-core-ui .button-primary.button-hero:active{-webkit-box-shadow:inset 0 3px 0 #2f4035!important;box-shadow:inset 0 3px 0 #2f4035!important}.wp-core-ui .wp-ui-primary{color:#fff;background-color:#5fb37c}.wp-core-ui .wp-ui-text-primary{color:#5fb37c}.wp-core-ui .wp-ui-highlight{color:#fff;background-color:#4f6d59}.wp-core-ui .wp-ui-text-highlight{color:#4f6d59}.wp-core-ui .wp-ui-notification{color:#fff;background-color:#33834e}.wp-core-ui .wp-ui-text-notification{color:#33834e}.wp-core-ui .wp-ui-text-icon{color:#f1f3f2}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover,.wrap .add-new-h2:hover,.wrap .page-title-action:hover{color:#fff;background-color:#5fb37c}.view-switch a.current:before{color:#5fb37c}.view-switch a:hover:before{color:#33834e}#adminmenu,#adminmenuback,#adminmenuwrap{background:#5fb37c}#adminmenu a{color:#fff}#adminmenu div.wp-menu-image:before{color:#f1f3f2}#adminmenu a:hover,#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{color:#fff;background-color:#4f6d59}#adminmenu li.menu-top:hover div.wp-menu-image:before,#adminmenu li.opensub>a.menu-top div.wp-menu-image:before{color:#fff}.about-wrap h2 .nav-tab-active,.nav-tab-active,.nav-tab-active:hover{background-color:#f1f1f1;border-bottom-color:#f1f1f1}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{background:#4ca26a}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#4ca26a}#adminmenu .wp-submenu .wp-submenu-head{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a,#adminmenu .wp-submenu a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a,.folded #adminmenu .wp-has-current-submenu .wp-submenu a{color:#cfe8d8}#adminmenu .wp-has-current-submenu .wp-submenu a:focus,#adminmenu .wp-has-current-submenu .wp-submenu a:hover,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu a:hover,#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu a:hover,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:focus,.folded #adminmenu .wp-has-current-submenu .wp-submenu a:hover{color:#4f6d59}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current a,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:focus,#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a:hover,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:focus,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a:hover{color:#4f6d59}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{border-right-color:#f1f1f1}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{color:#fff;background:#4f6d59}#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before,.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#fff}#adminmenu .awaiting-mod,#adminmenu .update-plugins{color:#fff;background:#33834e}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod,#adminmenu li.menu-top:hover>a .update-plugins,#adminmenu li:hover a .awaiting-mod{color:#fff;background:#4ca26a}#collapse-button{color:#f1f3f2}#collapse-button:focus,#collapse-button:hover{color:#4f6d59}#wpadminbar{color:#fff;background:#5fb37c}#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#fff}#wpadminbar .ab-icon,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:after,#wpadminbar .ab-item:before{color:#f1f3f2}#wpadminbar .ab-top-menu>li.menupop.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojs .ab-top-menu>li.menupop:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{color:#4f6d59;background:#4ca26a}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li.hover span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label{color:#4f6d59}#wpadminbar:not(.mobile) li:hover #adminbarsearch:before,#wpadminbar:not(.mobile) li:hover .ab-icon:before,#wpadminbar:not(.mobile) li:hover .ab-item:after,#wpadminbar:not(.mobile) li:hover .ab-item:before{color:#fff}#wpadminbar .menupop .ab-sub-wrapper{background:#4ca26a}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#7eb892}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#cfe8d8}#wpadminbar .menupop .menupop>.ab-item:before,#wpadminbar .quicklinks li .blavatar{color:#f1f3f2}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus .ab-icon:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#4f6d59}#wpadminbar .menupop .menupop>.ab-item:hover:before,#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar,#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#4f6d59}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#f1f3f2}#wpadminbar #adminbarsearch:before{color:#f1f3f2}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{color:#fff;background:#77bf8f}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{border-color:#77bf8f;background-color:#77bf8f}#wpadminbar #wp-admin-bar-user-info .display-name{color:#fff}#wpadminbar #wp-admin-bar-user-info a:hover .display-name{color:#4f6d59}#wpadminbar #wp-admin-bar-user-info .username{color:#cfe8d8}.wp-pointer .wp-pointer-content h3{background-color:#4f6d59;border-color:#455e4d}.wp-pointer .wp-pointer-content h3:before{color:#4f6d59}.wp-pointer.wp-pointer-top .wp-pointer-arrow,.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner{border-bottom-color:#4f6d59}.media-item .bar,.media-progress-bar div{background-color:#4f6d59}.details.attachment{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #4f6d59}.attachment.details .check{background-color:#4f6d59;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 2px #4f6d59}.media-selection .attachment.selection.details .thumbnail{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59;box-shadow:0 0 0 1px #fff,0 0 0 3px #4f6d59}.theme-browser .theme.active .theme-name,.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{background:#4f6d59}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{color:#4f6d59}.theme-filter.current,.theme-section.current{border-bottom-color:#5fb37c}body.more-filters-opened .more-filters{color:#fff;background-color:#5fb37c}body.more-filters-opened .more-filters:before{color:#fff}body.more-filters-opened .more-filters:focus,body.more-filters-opened .more-filters:hover{background-color:#4f6d59;color:#fff}body.more-filters-opened .more-filters:focus:before,body.more-filters-opened .more-filters:hover:before{color:#fff}.widgets-chooser li.widgets-chooser-selected{background-color:#4f6d59;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{color:#fff}div#wp-responsive-toggle a:before{color:#f1f3f2}.wp-responsive-open div#wp-responsive-toggle a{border-color:transparent;background:#4f6d59}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#4ca26a}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#f1f3f2}.mce-container.mce-menu .mce-menu-item-normal.mce-active,.mce-container.mce-menu .mce-menu-item-preview.mce-active,.mce-container.mce-menu .mce-menu-item.mce-selected,.mce-container.mce-menu .mce-menu-item:focus,.mce-container.mce-menu .mce-menu-item:hover{background:#4f6d59}
|
includes/admin/tools.php
CHANGED
@@ -10,425 +10,46 @@
|
|
10 |
// Exit if accessed directly
|
11 |
defined( 'ABSPATH' ) || exit;
|
12 |
|
13 |
-
/** Repair ********************************************************************/
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Admin repair page
|
17 |
-
*
|
18 |
-
* @since 2.0.0 bbPress (r2613) Converted from bbPress 1.2
|
19 |
-
* @since 2.6.0 bbPress (r5885) Upgraded to list-table UI
|
20 |
-
*
|
21 |
-
* @todo Use a real list table
|
22 |
-
*
|
23 |
-
* @uses bbp_admin_repair_list() To get the recount list
|
24 |
-
* @uses check_admin_referer() To verify the nonce and the referer
|
25 |
-
* @uses wp_cache_flush() To flush the cache
|
26 |
-
* @uses do_action() Calls 'admin_notices' to display the notices
|
27 |
-
* @uses wp_nonce_field() To add a hidden nonce field
|
28 |
-
*/
|
29 |
-
function bbp_admin_repair() {
|
30 |
-
|
31 |
-
// Get the registered repair tools
|
32 |
-
$tools = bbp_admin_repair_list(); ?>
|
33 |
-
|
34 |
-
<div class="wrap">
|
35 |
-
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
36 |
-
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Repair Forums', 'bbpress' ) ); ?></h2>
|
37 |
-
|
38 |
-
<p><?php esc_html_e( 'bbPress keeps track of relationships between forums, topics, replies, topic-tags, favorites, subscriptions, and users. Occasionally these relationships become out of sync, most often after an import or migration. Use the tools below to manually recalculate these relationships.', 'bbpress' ); ?></p>
|
39 |
-
<p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Use caution when running more than 1 repair at a time.', 'bbpress' ); ?></p>
|
40 |
-
|
41 |
-
<?php bbp_admin_repair_tool_overhead_filters(); ?>
|
42 |
-
|
43 |
-
<form class="settings" method="get" action="">
|
44 |
-
|
45 |
-
<?php bbp_admin_repair_list_search_form(); ?>
|
46 |
-
|
47 |
-
<input type="hidden" name="page" value="bbp-repair" />
|
48 |
-
<?php wp_nonce_field( 'bbpress-do-counts' ); ?>
|
49 |
-
|
50 |
-
<div class="tablenav top">
|
51 |
-
<div class="alignleft actions bulkactions">
|
52 |
-
<label for="bulk-action-selector-top" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
53 |
-
<select name="action" id="bulk-action-selector-top">
|
54 |
-
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
55 |
-
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
56 |
-
</select>
|
57 |
-
<input type="submit" id="doaction" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
58 |
-
</div>
|
59 |
-
<div class="alignleft actions">
|
60 |
-
|
61 |
-
<?php bbp_admin_repair_list_components_filter(); ?>
|
62 |
-
|
63 |
-
</div>
|
64 |
-
<br class="clear">
|
65 |
-
</div>
|
66 |
-
<table class="wp-list-table widefat striped posts">
|
67 |
-
<thead>
|
68 |
-
<tr>
|
69 |
-
<td id="cb" class="manage-column column-cb check-column">
|
70 |
-
<label class="screen-reader-text" for="cb-select-all-1">
|
71 |
-
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
72 |
-
</label>
|
73 |
-
<input id="cb-select-all-1" type="checkbox">
|
74 |
-
</td>
|
75 |
-
<th scope="col" id="description" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
76 |
-
<th scope="col" id="components" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
77 |
-
<th scope="col" id="overhead" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
78 |
-
</tr>
|
79 |
-
</thead>
|
80 |
-
|
81 |
-
<tbody id="the-list">
|
82 |
-
|
83 |
-
<?php if ( ! empty( $tools ) ) : ?>
|
84 |
-
|
85 |
-
<?php foreach ( $tools as $item ) : ?>
|
86 |
-
|
87 |
-
<tr id="bbp-repair-tools" class="inactive">
|
88 |
-
<th scope="row" class="check-column">
|
89 |
-
<label class="screen-reader-text" for="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>"></label>
|
90 |
-
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $item['id'] ); ?>" id="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>">
|
91 |
-
</th>
|
92 |
-
<td class="bbp-tool-title column-primary column-description" data-colname="<?php esc_html_e( 'Description', 'bbpress' ); ?>">
|
93 |
-
<strong><?php echo esc_html( $item['description'] ); ?></strong>
|
94 |
-
<div class="row-actions hide-if-no-js">
|
95 |
-
<span class="run">
|
96 |
-
<a href="<?php bbp_admin_repair_tool_run_url( $item['id'] ); ?>" aria-label="<?php printf( esc_html__( 'Run %s', 'bbpress' ), $item['description'] ); ?>" id="<?php echo esc_attr( $item['id'] ); ?>" ><?php esc_html_e( 'Run', 'bbpress' ); ?></a>
|
97 |
-
</span>
|
98 |
-
</div>
|
99 |
-
<button type="button" class="toggle-row">
|
100 |
-
<span class="screen-reader-text"><?php esc_html_e( 'Show more details', 'bbpress' ); ?></span>
|
101 |
-
</button>
|
102 |
-
</td>
|
103 |
-
<td class="column-components desc" data-colname="<?php esc_html_e( 'Components', 'bbpress' ); ?>">
|
104 |
-
<div class="bbp-tool-overhead">
|
105 |
-
|
106 |
-
<?php echo implode( ', ', bbp_get_admin_repair_tool_components( $item ) ); ?>
|
107 |
-
|
108 |
-
</div>
|
109 |
-
</td>
|
110 |
-
<td class="column-overhead desc" data-colname="<?php esc_html_e( 'Overhead', 'bbpress' ); ?>">
|
111 |
-
<div class="bbp-tool-overhead">
|
112 |
-
|
113 |
-
<?php echo implode( ', ', bbp_get_admin_repair_tool_overhead( $item ) ); ?>
|
114 |
-
|
115 |
-
</div>
|
116 |
-
</td>
|
117 |
-
</tr>
|
118 |
-
|
119 |
-
<?php endforeach; ?>
|
120 |
-
|
121 |
-
<?php else : ?>
|
122 |
-
|
123 |
-
<tr>
|
124 |
-
<td colspan="4">
|
125 |
-
<?php esc_html_e( 'No repair tools match this criteria.', 'bbpress' ); ?>
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
|
129 |
-
<?php endif; ?>
|
130 |
-
|
131 |
-
</tbody>
|
132 |
-
<tfoot>
|
133 |
-
<tr>
|
134 |
-
<td class="manage-column column-cb check-column">
|
135 |
-
<label class="screen-reader-text" for="cb-select-all-2">
|
136 |
-
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
137 |
-
</label>
|
138 |
-
<input id="cb-select-all-2" type="checkbox">
|
139 |
-
</td>
|
140 |
-
<th scope="col" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
141 |
-
<th scope="col" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
142 |
-
<th scope="col" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
143 |
-
</tr>
|
144 |
-
</tfoot>
|
145 |
-
</table>
|
146 |
-
<div class="tablenav bottom">
|
147 |
-
<div class="alignleft actions bulkactions">
|
148 |
-
<label for="bulk-action-selector-bottom" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
149 |
-
<select name="action2" id="bulk-action-selector-bottom">
|
150 |
-
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
151 |
-
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
152 |
-
</select>
|
153 |
-
<input type="submit" id="doaction2" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
154 |
-
</div>
|
155 |
-
</div>
|
156 |
-
</form>
|
157 |
-
</div>
|
158 |
-
|
159 |
-
<?php
|
160 |
-
}
|
161 |
-
|
162 |
/**
|
163 |
-
*
|
164 |
-
*
|
165 |
-
* @since 2.0.0 bbPress (r2613)
|
166 |
*
|
167 |
-
* @
|
168 |
-
* @uses check_admin_referer() To verify the nonce and the referer
|
169 |
-
* @uses wp_cache_flush() To flush the cache
|
170 |
-
* @uses do_action() Calls 'admin_notices' to display the notices
|
171 |
*/
|
172 |
-
function
|
173 |
-
|
174 |
-
if ( ! bbp_is_get_request() ) {
|
175 |
-
return;
|
176 |
-
}
|
177 |
-
|
178 |
-
// Get the current action or bail
|
179 |
-
if ( ! empty( $_GET['action'] ) ) {
|
180 |
-
$action = sanitize_key( $_GET['action'] );
|
181 |
-
} elseif ( ! empty( $_GET['action2'] ) ) {
|
182 |
-
$action = sanitize_key( $_GET['action2'] );
|
183 |
-
} else {
|
184 |
-
return;
|
185 |
-
}
|
186 |
|
187 |
-
// Bail if
|
188 |
-
if ( '
|
189 |
return;
|
190 |
}
|
191 |
|
192 |
-
|
|
|
|
|
193 |
|
194 |
-
|
195 |
-
|
|
|
196 |
|
197 |
-
|
198 |
-
wp_cache_flush();
|
199 |
|
200 |
-
|
201 |
-
|
202 |
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
if ( isset( $list[ $item_id ] ) && is_callable( $list[ $item_id ]['callback'] ) ) {
|
207 |
-
$messages[] = call_user_func( $list[ $item_id ]['callback'] );
|
208 |
}
|
209 |
-
}
|
210 |
-
}
|
211 |
-
|
212 |
-
// Feedback
|
213 |
-
if ( count( $messages ) ) {
|
214 |
-
foreach ( $messages as $message ) {
|
215 |
-
bbp_admin_tools_feedback( $message[1] );
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
// @todo Redirect away from here
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Output the URL to run a specific repair tool
|
224 |
-
*
|
225 |
-
* @since 2.6.0 bbPress (r5885)
|
226 |
-
*
|
227 |
-
* @param string $component
|
228 |
-
*/
|
229 |
-
function bbp_admin_repair_tool_run_url( $component = '' ) {
|
230 |
-
echo esc_url( bbp_get_admin_repair_tool_run_url( $component ) );
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Return the URL to run a specific repair tool
|
235 |
-
*
|
236 |
-
* @since 2.6.0 bbPress (r5885)
|
237 |
-
*
|
238 |
-
* @param string $component
|
239 |
-
*/
|
240 |
-
function bbp_get_admin_repair_tool_run_url( $component = '' ) {
|
241 |
-
$tools = admin_url( 'tools.php' );
|
242 |
-
$args = array( 'page' => 'bbp-repair', 'action' => 'run', 'checked' => array( $component ) );
|
243 |
-
$url = add_query_arg( $args, $tools );
|
244 |
-
$nonced = wp_nonce_url( $url, 'bbpress-do-counts' );
|
245 |
-
|
246 |
-
return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component );
|
247 |
-
}
|
248 |
|
249 |
-
|
250 |
-
|
251 |
-
*
|
252 |
-
* @since 2.6.0 bbPress (r5314)
|
253 |
-
*
|
254 |
-
* @uses get_current_screen()
|
255 |
-
*/
|
256 |
-
|
257 |
-
function bbp_admin_tools_repair_help() {
|
258 |
-
|
259 |
-
$current_screen = get_current_screen();
|
260 |
-
|
261 |
-
// Bail if current screen could not be found
|
262 |
-
if ( empty( $current_screen ) ) {
|
263 |
-
return;
|
264 |
-
}
|
265 |
-
|
266 |
-
// Repair Forums
|
267 |
-
$current_screen->add_help_tab( array(
|
268 |
-
'id' => 'repair_forums',
|
269 |
-
'title' => __( 'Repair Forums', 'bbpress' ),
|
270 |
-
'content' => '<p>' . __( 'There is more detailed information available on the bbPress and BuddyPress codex for the following:', 'bbpress' ) . '</p>' .
|
271 |
-
'<p>' .
|
272 |
-
'<ul>' .
|
273 |
-
'<li>' . __( 'BuddyPress Group Forums: <a href="https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/">Installing Group and Sitewide Forums</a> and <a href="https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/">Migrating from old forums to bbPress 2.2+</a>.', 'bbpress' ) . '</li>' .
|
274 |
-
'<li>' . __( 'bbPress roles: <a href="https://codex.bbpress.org/bbpress-user-roles-and-capabilities/" target="_blank">bbPress User Roles and Capabilities</a>', 'bbpress' ) . '</li>' .
|
275 |
-
'</ul>' .
|
276 |
-
'</p>' .
|
277 |
-
'<p>' . __( 'Also see <a href="https://codex.bbpress.org/repair-forums/">bbPress: Repair Forums</a>.', 'bbpress' ) . '</p>'
|
278 |
-
) );
|
279 |
-
|
280 |
-
// Help Sidebar
|
281 |
-
$current_screen->set_help_sidebar(
|
282 |
-
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
283 |
-
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
284 |
-
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
285 |
-
);
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Contextual help for Reset Forums tools page
|
290 |
-
*
|
291 |
-
* @since 2.6.0 bbPress (r5314)
|
292 |
-
*
|
293 |
-
* @uses get_current_screen()
|
294 |
-
*/
|
295 |
-
|
296 |
-
function bbp_admin_tools_reset_help() {
|
297 |
-
|
298 |
-
$current_screen = get_current_screen();
|
299 |
-
|
300 |
-
// Bail if current screen could not be found
|
301 |
-
if ( empty( $current_screen ) ) {
|
302 |
-
return;
|
303 |
-
}
|
304 |
-
|
305 |
-
// Reset Forums
|
306 |
-
$current_screen->add_help_tab( array(
|
307 |
-
'id' => 'reset_forums',
|
308 |
-
'title' => __( 'Reset Forums', 'bbpress' ),
|
309 |
-
'content' => '<p>' . __( 'Also see <a href="https://codex.bbpress.org/reset-forums/">bbPress: Reset Forums</a>.', 'bbpress' ) . '</p>'
|
310 |
-
) );
|
311 |
-
|
312 |
-
// Help Sidebar
|
313 |
-
$current_screen->set_help_sidebar(
|
314 |
-
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
315 |
-
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
316 |
-
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
317 |
-
);
|
318 |
-
}
|
319 |
-
|
320 |
-
/**
|
321 |
-
* Contextual help for Import Forums tools page
|
322 |
-
*
|
323 |
-
* @since 2.6.0 bbPress (r5314)
|
324 |
-
*
|
325 |
-
* @uses get_current_screen()
|
326 |
-
*/
|
327 |
-
|
328 |
-
function bbp_admin_tools_converter_help() {
|
329 |
-
|
330 |
-
$current_screen = get_current_screen();
|
331 |
-
|
332 |
-
// Bail if current screen could not be found
|
333 |
-
if ( empty( $current_screen ) ) {
|
334 |
-
return;
|
335 |
-
}
|
336 |
-
|
337 |
-
// Overview
|
338 |
-
$current_screen->add_help_tab( array(
|
339 |
-
'id' => 'overview',
|
340 |
-
'title' => __( 'Overview', 'bbpress' ),
|
341 |
-
'content' => '<p>' . __( 'This screen provides access to all of the bbPress Import Forums settings and resources.', 'bbpress' ) . '</p>' .
|
342 |
-
'<p>' . __( 'Please see the additional help tabs for more information on each individual section.', 'bbpress' ) . '</p>' .
|
343 |
-
'<p>' . __( 'Also see the main article on the bbPress codex <a href="https://codex.bbpress.org/import-forums/">bbPress: Import Forums</a>.', 'bbpress' ) . '</p>'
|
344 |
-
) );
|
345 |
-
|
346 |
-
// Database Settings
|
347 |
-
$current_screen->add_help_tab( array(
|
348 |
-
'id' => 'database_settings',
|
349 |
-
'title' => __( 'Database Settings', 'bbpress' ),
|
350 |
-
'content' => '<p>' . __( 'In the Database Settings you have a number of options:', 'bbpress' ) . '</p>' .
|
351 |
-
'<p>' .
|
352 |
-
'<ul>' .
|
353 |
-
'<li>' . __( 'The settings in this section refer to the database connection strings used by your old forum software. The best way to determine the exact settings you need is to copy them from your legacy forums configuration file or contact your web hosting provider.', 'bbpress' ) . '</li>' .
|
354 |
-
'</ul>' .
|
355 |
-
'</p>'
|
356 |
-
) );
|
357 |
-
|
358 |
-
// Importer Options
|
359 |
-
$current_screen->add_help_tab( array(
|
360 |
-
'id' => 'importer_options',
|
361 |
-
'title' => __( 'Importer Options', 'bbpress' ),
|
362 |
-
'content' => '<p>' . __( 'In the Options you have a number of options:', 'bbpress' ) . '</p>' .
|
363 |
-
'<p>' .
|
364 |
-
'<ul>' .
|
365 |
-
'<li>' . __( 'Depending on your MySQL configuration you can tweak the "Rows Limit" and "Delay Time" that may help to improve the overall time it takes to perform a complete forum import.', 'bbpress' ) . '</li>' .
|
366 |
-
'<li>' . __( '"Convert Users" will import your legacy forum members as WordPress Users.', 'bbpress' ) . '</li>' .
|
367 |
-
'<li>' . __( '"Start Over" will start the importer fresh, if your import failed for any reason leaving this setting unchecked the importer will begin from where it left off.', 'bbpress' ) . '</li>' .
|
368 |
-
'<li>' . __( '"Purge Previous Import" will remove data imported from a failed import without removing your existing forum data.', 'bbpress' ) . '</li>' .
|
369 |
-
'</ul>' .
|
370 |
-
'</p>'
|
371 |
-
) );
|
372 |
-
// Help Sidebar
|
373 |
-
$current_screen->set_help_sidebar(
|
374 |
-
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
375 |
-
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
376 |
-
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
377 |
-
);
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Assemble the admin notices
|
382 |
-
*
|
383 |
-
* @since 2.0.0 bbPress (r2613)
|
384 |
-
*
|
385 |
-
* @param string|WP_Error $message A message to be displayed or {@link WP_Error}
|
386 |
-
* @param string $class Optional. A class to be added to the message div
|
387 |
-
* @uses WP_Error::get_error_messages() To get the error messages of $message
|
388 |
-
* @uses add_action() Adds the admin notice action with the message HTML
|
389 |
-
* @return string The message HTML
|
390 |
-
*/
|
391 |
-
function bbp_admin_tools_feedback( $message, $class = false ) {
|
392 |
-
|
393 |
-
// Dismiss button
|
394 |
-
$dismiss = '<button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice.', 'bbpress' ) . '</span></button>';
|
395 |
-
|
396 |
-
// One message as string
|
397 |
-
if ( is_string( $message ) ) {
|
398 |
-
$message = '<p>' . $message . '</p>';
|
399 |
-
$class = $class ? $class : 'updated';
|
400 |
-
|
401 |
-
// Messages as objects
|
402 |
-
} elseif ( is_wp_error( $message ) ) {
|
403 |
-
$errors = $message->get_error_messages();
|
404 |
-
|
405 |
-
switch ( count( $errors ) ) {
|
406 |
-
case 0:
|
407 |
-
return false;
|
408 |
-
|
409 |
-
case 1:
|
410 |
-
$message = '<p>' . $errors[0] . '</p>';
|
411 |
-
break;
|
412 |
-
|
413 |
-
default:
|
414 |
-
$message = '<ul>' . "\n\t" . '<li>' . implode( '</li>' . "\n\t" . '<li>', $errors ) . '</li>' . "\n" . '</ul>';
|
415 |
-
break;
|
416 |
}
|
417 |
|
418 |
-
|
419 |
-
|
420 |
-
return false;
|
421 |
-
}
|
422 |
-
|
423 |
-
// Assemble the message
|
424 |
-
$message = '<div id="message" class="is-dismissible notice ' . esc_attr( $class ) . '">' . $message . $dismiss . '</div>';
|
425 |
-
$message = str_replace( "'", "\'", $message );
|
426 |
|
427 |
-
|
428 |
-
$lambda = create_function( '', "echo '$message';" );
|
429 |
-
add_action( 'admin_notices', $lambda );
|
430 |
|
431 |
-
|
432 |
}
|
433 |
|
434 |
/**
|
@@ -444,6 +65,7 @@ function bbp_register_repair_tool( $args = array() ) {
|
|
444 |
// Parse arguments
|
445 |
$r = bbp_parse_args( $args, array(
|
446 |
'id' => '',
|
|
|
447 |
'description' => '',
|
448 |
'callback' => '',
|
449 |
'priority' => 0,
|
@@ -462,6 +84,7 @@ function bbp_register_repair_tool( $args = array() ) {
|
|
462 |
|
463 |
// Add tool to the registered tools array
|
464 |
bbpress()->admin->tools[ $r['id'] ] = array(
|
|
|
465 |
'description' => $r['description'],
|
466 |
'priority' => $r['priority'],
|
467 |
'callback' => $r['callback'],
|
@@ -484,6 +107,7 @@ function bbp_register_default_repair_tools() {
|
|
484 |
// Topic meta
|
485 |
bbp_register_repair_tool( array(
|
486 |
'id' => 'bbp-sync-topic-meta',
|
|
|
487 |
'description' => __( 'Recalculate parent topic for each reply', 'bbpress' ),
|
488 |
'callback' => 'bbp_admin_repair_topic_meta',
|
489 |
'priority' => 5,
|
@@ -494,6 +118,7 @@ function bbp_register_default_repair_tools() {
|
|
494 |
// Forum meta
|
495 |
bbp_register_repair_tool( array(
|
496 |
'id' => 'bbp-sync-forum-meta',
|
|
|
497 |
'description' => __( 'Recalculate parent forum for each topic and reply', 'bbpress' ),
|
498 |
'callback' => 'bbp_admin_repair_forum_meta',
|
499 |
'priority' => 10,
|
@@ -504,6 +129,7 @@ function bbp_register_default_repair_tools() {
|
|
504 |
// Forum visibility
|
505 |
bbp_register_repair_tool( array(
|
506 |
'id' => 'bbp-sync-forum-visibility',
|
|
|
507 |
'description' => __( 'Recalculate private and hidden forums', 'bbpress' ),
|
508 |
'callback' => 'bbp_admin_repair_forum_visibility',
|
509 |
'priority' => 15,
|
@@ -514,6 +140,7 @@ function bbp_register_default_repair_tools() {
|
|
514 |
// Sync all topics in all forums
|
515 |
bbp_register_repair_tool( array(
|
516 |
'id' => 'bbp-sync-all-topics-forums',
|
|
|
517 |
'description' => __( 'Recalculate last activity in each topic and forum', 'bbpress' ),
|
518 |
'callback' => 'bbp_admin_repair_freshness',
|
519 |
'priority' => 20,
|
@@ -524,6 +151,7 @@ function bbp_register_default_repair_tools() {
|
|
524 |
// Sync all sticky topics in all forums
|
525 |
bbp_register_repair_tool( array(
|
526 |
'id' => 'bbp-sync-all-topics-sticky',
|
|
|
527 |
'description' => __( 'Recalculate sticky relationship of each topic', 'bbpress' ),
|
528 |
'callback' => 'bbp_admin_repair_sticky',
|
529 |
'priority' => 25,
|
@@ -534,6 +162,7 @@ function bbp_register_default_repair_tools() {
|
|
534 |
// Sync all hierarchical reply positions
|
535 |
bbp_register_repair_tool( array(
|
536 |
'id' => 'bbp-sync-all-reply-positions',
|
|
|
537 |
'description' => __( 'Recalculate the position of each reply', 'bbpress' ),
|
538 |
'callback' => 'bbp_admin_repair_reply_menu_order',
|
539 |
'priority' => 30,
|
@@ -541,22 +170,13 @@ function bbp_register_default_repair_tools() {
|
|
541 |
'components' => array( bbp_get_reply_post_type() )
|
542 |
) );
|
543 |
|
544 |
-
// Sync all BuddyPress group forum relationships
|
545 |
-
bbp_register_repair_tool( array(
|
546 |
-
'id' => 'bbp-group-forums',
|
547 |
-
'description' => __( 'Repair BuddyPress Group Forum relationships', 'bbpress' ),
|
548 |
-
'callback' => 'bbp_admin_repair_group_forum_relationship',
|
549 |
-
'priority' => 35,
|
550 |
-
'overhead' => 'low',
|
551 |
-
'components' => array( bbp_get_forum_post_type() )
|
552 |
-
) );
|
553 |
-
|
554 |
// Update closed topic counts
|
555 |
bbp_register_repair_tool( array(
|
556 |
'id' => 'bbp-sync-closed-topics',
|
|
|
557 |
'description' => __( 'Repair closed topics', 'bbpress' ),
|
558 |
'callback' => 'bbp_admin_repair_closed_topics',
|
559 |
-
'priority' =>
|
560 |
'overhead' => 'medium',
|
561 |
'components' => array( bbp_get_topic_post_type() )
|
562 |
) );
|
@@ -564,9 +184,10 @@ function bbp_register_default_repair_tools() {
|
|
564 |
// Count topics
|
565 |
bbp_register_repair_tool( array(
|
566 |
'id' => 'bbp-forum-topics',
|
|
|
567 |
'description' => __( 'Recount topics in each forum', 'bbpress' ),
|
568 |
'callback' => 'bbp_admin_repair_forum_topic_count',
|
569 |
-
'priority' =>
|
570 |
'overhead' => 'medium',
|
571 |
'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type() )
|
572 |
) );
|
@@ -574,9 +195,10 @@ function bbp_register_default_repair_tools() {
|
|
574 |
// Count topic tags
|
575 |
bbp_register_repair_tool( array(
|
576 |
'id' => 'bbp-topic-tags',
|
|
|
577 |
'description' => __( 'Recount topics in each topic-tag', 'bbpress' ),
|
578 |
'callback' => 'bbp_admin_repair_topic_tag_count',
|
579 |
-
'priority' =>
|
580 |
'overhead' => 'medium',
|
581 |
'components' => array( bbp_get_topic_post_type(), bbp_get_topic_tag_tax_id() )
|
582 |
) );
|
@@ -584,9 +206,10 @@ function bbp_register_default_repair_tools() {
|
|
584 |
// Count forum replies
|
585 |
bbp_register_repair_tool( array(
|
586 |
'id' => 'bbp-forum-replies',
|
|
|
587 |
'description' => __( 'Recount replies in each forum', 'bbpress' ),
|
588 |
'callback' => 'bbp_admin_repair_forum_reply_count',
|
589 |
-
'priority' =>
|
590 |
'overhead' => 'high',
|
591 |
'components' => array( bbp_get_forum_post_type(), bbp_get_reply_post_type() )
|
592 |
) );
|
@@ -594,29 +217,32 @@ function bbp_register_default_repair_tools() {
|
|
594 |
// Count topic replies
|
595 |
bbp_register_repair_tool( array(
|
596 |
'id' => 'bbp-topic-replies',
|
|
|
597 |
'description' => __( 'Recount replies in each topic', 'bbpress' ),
|
598 |
'callback' => 'bbp_admin_repair_topic_reply_count',
|
599 |
-
'priority' =>
|
600 |
'overhead' => 'high',
|
601 |
'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
|
602 |
) );
|
603 |
|
604 |
-
// Count topic
|
605 |
bbp_register_repair_tool( array(
|
606 |
-
'id' => 'bbp-topic-
|
607 |
-
'
|
|
|
608 |
'callback' => 'bbp_admin_repair_topic_voice_count',
|
609 |
-
'priority' =>
|
610 |
-
'overhead' => '
|
611 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
612 |
) );
|
613 |
|
614 |
// Count non-published replies to each topic
|
615 |
bbp_register_repair_tool( array(
|
616 |
'id' => 'bbp-topic-hidden-replies',
|
617 |
-
'
|
|
|
618 |
'callback' => 'bbp_admin_repair_topic_hidden_reply_count',
|
619 |
-
'priority' =>
|
620 |
'overhead' => 'high',
|
621 |
'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
|
622 |
) );
|
@@ -624,9 +250,10 @@ function bbp_register_default_repair_tools() {
|
|
624 |
// Recount topics for each user
|
625 |
bbp_register_repair_tool( array(
|
626 |
'id' => 'bbp-user-topics',
|
|
|
627 |
'description' => __( 'Recount topics for each user', 'bbpress' ),
|
628 |
'callback' => 'bbp_admin_repair_user_topic_count',
|
629 |
-
'priority' =>
|
630 |
'overhead' => 'medium',
|
631 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
632 |
) );
|
@@ -634,9 +261,10 @@ function bbp_register_default_repair_tools() {
|
|
634 |
// Recount topics for each user
|
635 |
bbp_register_repair_tool( array(
|
636 |
'id' => 'bbp-user-replies',
|
|
|
637 |
'description' => __( 'Recount replies for each user', 'bbpress' ),
|
638 |
'callback' => 'bbp_admin_repair_user_reply_count',
|
639 |
-
'priority' =>
|
640 |
'overhead' => 'medium',
|
641 |
'components' => array( bbp_get_reply_post_type(), bbp_get_user_rewrite_id() )
|
642 |
) );
|
@@ -644,9 +272,10 @@ function bbp_register_default_repair_tools() {
|
|
644 |
// Remove unpublished topics from user favorites
|
645 |
bbp_register_repair_tool( array(
|
646 |
'id' => 'bbp-user-favorites',
|
|
|
647 |
'description' => __( 'Remove unpublished topics from user favorites', 'bbpress' ),
|
648 |
'callback' => 'bbp_admin_repair_user_favorites',
|
649 |
-
'priority' =>
|
650 |
'overhead' => 'medium',
|
651 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
652 |
) );
|
@@ -654,9 +283,10 @@ function bbp_register_default_repair_tools() {
|
|
654 |
// Remove unpublished topics from user subscriptions
|
655 |
bbp_register_repair_tool( array(
|
656 |
'id' => 'bbp-user-topic-subscriptions',
|
|
|
657 |
'description' => __( 'Remove unpublished topics from user subscriptions', 'bbpress' ),
|
658 |
'callback' => 'bbp_admin_repair_user_topic_subscriptions',
|
659 |
-
'priority' =>
|
660 |
'overhead' => 'medium',
|
661 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
662 |
) );
|
@@ -664,9 +294,10 @@ function bbp_register_default_repair_tools() {
|
|
664 |
// Remove unpublished forums from user subscriptions
|
665 |
bbp_register_repair_tool( array(
|
666 |
'id' => 'bbp-user-forum-subscriptions',
|
|
|
667 |
'description' => __( 'Remove unpublished forums from user subscriptions', 'bbpress' ),
|
668 |
'callback' => 'bbp_admin_repair_user_forum_subscriptions',
|
669 |
-
'priority' =>
|
670 |
'overhead' => 'medium',
|
671 |
'components' => array( bbp_get_forum_post_type(), bbp_get_user_rewrite_id() )
|
672 |
) );
|
@@ -674,9 +305,10 @@ function bbp_register_default_repair_tools() {
|
|
674 |
// Remove unpublished forums from user subscriptions
|
675 |
bbp_register_repair_tool( array(
|
676 |
'id' => 'bbp-user-role-map',
|
|
|
677 |
'description' => __( 'Remap existing users to default forum roles', 'bbpress' ),
|
678 |
'callback' => 'bbp_admin_repair_user_roles',
|
679 |
-
'priority' =>
|
680 |
'overhead' => 'low',
|
681 |
'components' => array( bbp_get_user_rewrite_id() )
|
682 |
) );
|
@@ -684,2017 +316,185 @@ function bbp_register_default_repair_tools() {
|
|
684 |
// Migrate favorites from user-meta to post-meta
|
685 |
bbp_register_repair_tool( array(
|
686 |
'id' => 'bbp-user-favorites-move',
|
|
|
687 |
'description' => __( 'Upgrade user favorites', 'bbpress' ),
|
688 |
'callback' => 'bbp_admin_upgrade_user_favorites',
|
689 |
-
'priority' =>
|
690 |
'overhead' => 'high',
|
691 |
-
'components' => array( bbp_get_user_rewrite_id() )
|
692 |
) );
|
693 |
|
694 |
// Migrate topic subscriptions from user-meta to post-meta
|
695 |
bbp_register_repair_tool( array(
|
696 |
'id' => 'bbp-user-topic-subscriptions-move',
|
|
|
697 |
'description' => __( 'Upgrade user topic subscriptions', 'bbpress' ),
|
698 |
'callback' => 'bbp_admin_upgrade_user_topic_subscriptions',
|
699 |
-
'priority' =>
|
700 |
'overhead' => 'high',
|
701 |
-
'components' => array( bbp_get_user_rewrite_id() )
|
702 |
) );
|
703 |
|
704 |
// Migrate forum subscriptions from user-meta to post-meta
|
705 |
bbp_register_repair_tool( array(
|
706 |
'id' => 'bbp-user-forum-subscriptions-move',
|
|
|
707 |
'description' => __( 'Upgrade user forum subscriptions', 'bbpress' ),
|
708 |
'callback' => 'bbp_admin_upgrade_user_forum_subscriptions',
|
709 |
-
'priority' =>
|
710 |
'overhead' => 'high',
|
711 |
-
'components' => array( bbp_get_user_rewrite_id() )
|
712 |
) );
|
713 |
-
}
|
714 |
-
|
715 |
-
/**
|
716 |
-
* Get the array of available repair tools
|
717 |
-
*
|
718 |
-
* @since 2.6.0 bbPress (r5885)
|
719 |
-
*
|
720 |
-
* @return array
|
721 |
-
*/
|
722 |
-
function bbp_get_admin_repair_tools() {
|
723 |
-
|
724 |
-
// Get tools array
|
725 |
-
$tools = ! empty( bbpress()->admin->tools )
|
726 |
-
? bbpress()->admin->tools
|
727 |
-
: array();
|
728 |
-
|
729 |
-
return apply_filters( 'bbp_get_admin_repair_tools', $tools );
|
730 |
-
}
|
731 |
-
|
732 |
-
function bbp_get_admin_repair_tool_registered_components() {
|
733 |
-
$tools = bbp_get_admin_repair_tools();
|
734 |
-
$plucked = wp_list_pluck( $tools, 'components' );
|
735 |
-
$retval = array();
|
736 |
-
|
737 |
-
foreach ( $plucked as $components ) {
|
738 |
-
foreach ( $components as $component ) {
|
739 |
-
if ( in_array( $component, $retval ) ) {
|
740 |
-
continue;
|
741 |
-
}
|
742 |
-
$retval[] = $component;
|
743 |
-
}
|
744 |
-
}
|
745 |
-
|
746 |
-
return apply_filters( 'bbp_get_admin_repair_tool_registered_components', $retval );
|
747 |
-
}
|
748 |
-
|
749 |
-
/**
|
750 |
-
* Output the repair list search form
|
751 |
-
*
|
752 |
-
* @since 2.6.0 bbPress (r5885)
|
753 |
-
*/
|
754 |
-
function bbp_admin_repair_list_search_form() {
|
755 |
-
?>
|
756 |
-
|
757 |
-
<p class="search-box">
|
758 |
-
<label class="screen-reader-text" for="bbp-repair-search-input"><?php esc_html_e( 'Search Tools:', 'bbpress' ); ?></label>
|
759 |
-
<input type="search" id="bbp-repair-search-input" name="s" value="<?php _admin_search_query(); ?>">
|
760 |
-
<input type="submit" id="search-submit" class="button" value="<?php esc_html_e( 'Search Tools', 'bbpress' ); ?>">
|
761 |
-
</p>
|
762 |
-
|
763 |
-
<?php
|
764 |
-
}
|
765 |
-
|
766 |
-
/**
|
767 |
-
* Output a select drop-down of components to filter by
|
768 |
-
*
|
769 |
-
* @since 2.5.0 bbPress (r5885)
|
770 |
-
*/
|
771 |
-
function bbp_admin_repair_list_components_filter() {
|
772 |
-
|
773 |
-
// Sanitize component value, if exists
|
774 |
-
$selected = ! empty( $_GET['components'] )
|
775 |
-
? sanitize_key( $_GET['components'] )
|
776 |
-
: '';
|
777 |
-
|
778 |
-
// Get registered components
|
779 |
-
$components = bbp_get_admin_repair_tool_registered_components(); ?>
|
780 |
-
|
781 |
-
<label class="screen-reader-text" for="cat"><?php esc_html_e( 'Filter by Component', 'bbpress' ); ?></label>
|
782 |
-
<select name="components" id="components" class="postform">
|
783 |
-
<option value="" <?php selected( $selected, false ); ?>><?php esc_html_e( 'All Components', 'bbpress' ); ?></option>
|
784 |
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
|
|
|
|
793 |
|
794 |
-
|
795 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
|
|
806 |
|
807 |
-
//
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
break;
|
818 |
-
default :
|
819 |
-
$name = ucwords( $overhead );
|
820 |
-
break;
|
821 |
-
}
|
822 |
|
823 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
}
|
825 |
|
826 |
/**
|
827 |
-
*
|
828 |
*
|
829 |
-
* @since 2.
|
830 |
*
|
831 |
-
* @param string $
|
832 |
-
* @return string
|
833 |
*/
|
834 |
-
function
|
835 |
-
|
836 |
-
// Get the name of the component
|
837 |
-
switch ( $component ) {
|
838 |
-
case 'bbp_user' :
|
839 |
-
$name = esc_html__( 'Users', 'bbpress' );
|
840 |
-
break;
|
841 |
-
case bbp_get_forum_post_type() :
|
842 |
-
$name = esc_html__( 'Forums', 'bbpress' );
|
843 |
-
break;
|
844 |
-
case bbp_get_topic_post_type() :
|
845 |
-
$name = esc_html__( 'Topics', 'bbpress' );
|
846 |
-
break;
|
847 |
-
case bbp_get_reply_post_type() :
|
848 |
-
$name = esc_html__( 'Replies', 'bbpress' );
|
849 |
-
break;
|
850 |
-
case bbp_get_topic_tag_tax_id() :
|
851 |
-
$name = esc_html__( 'Topic Tags', 'bbpress' );
|
852 |
-
break;
|
853 |
-
default :
|
854 |
-
$name = ucwords( $component );
|
855 |
-
break;
|
856 |
-
}
|
857 |
-
|
858 |
-
return $name;
|
859 |
}
|
860 |
|
861 |
-
/**
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
function bbp_admin_repair_list() {
|
870 |
-
|
871 |
-
// Define empty array
|
872 |
-
$repair_list = array();
|
873 |
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
$component = ! empty( $_GET['components'] ) ? sanitize_key( $_GET['components'] ) : '';
|
879 |
|
880 |
-
|
881 |
-
|
882 |
-
$list = wp_list_filter( $list, array( 'overhead' => $overhead ) );
|
883 |
-
}
|
884 |
|
885 |
-
|
886 |
-
|
887 |
|
888 |
-
|
889 |
-
|
890 |
-
if ( ! in_array( $component, $tool['components'] ) ) {
|
891 |
continue;
|
892 |
}
|
893 |
-
}
|
894 |
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
}
|
901 |
|
902 |
-
//
|
903 |
-
|
904 |
-
'id' => sanitize_key( $id ),
|
905 |
-
'description' => $tool['description'],
|
906 |
-
'callback' => $tool['callback'],
|
907 |
-
'overhead' => $tool['overhead'],
|
908 |
-
'components' => $tool['components'],
|
909 |
-
);
|
910 |
}
|
911 |
|
912 |
-
// Sort
|
913 |
-
ksort( $repair_list );
|
914 |
-
|
915 |
-
return (array) apply_filters( 'bbp_repair_list', $repair_list );
|
916 |
-
}
|
917 |
-
|
918 |
/**
|
919 |
-
*
|
920 |
*
|
921 |
-
* @since 2.6.0
|
922 |
*
|
923 |
-
* @param array $item
|
924 |
* @return array
|
925 |
*/
|
926 |
-
function
|
927 |
-
|
928 |
-
// Get the tools URL
|
929 |
-
$tools_url = add_query_arg( array( 'page' => 'bbp-repair' ), admin_url( 'tools.php' ) );
|
930 |
-
|
931 |
-
// Define links array
|
932 |
-
$links = array();
|
933 |
-
|
934 |
-
// Loop through tool components and build links
|
935 |
-
foreach ( $item['components'] as $component ) {
|
936 |
-
$args = array( 'components' => $component );
|
937 |
-
$filter_url = add_query_arg( $args, $tools_url );
|
938 |
-
$name = bbp_admin_repair_tool_translate_component( $component );
|
939 |
-
$links[] = '<a href="' . esc_url( $filter_url ) . '">' . esc_html( $name ) . '</a>';
|
940 |
-
}
|
941 |
|
942 |
// Filter & return
|
943 |
-
return apply_filters( '
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
}
|
981 |
-
|
982 |
-
// Filter & return
|
983 |
-
return apply_filters( 'bbp_get_admin_repair_tool_overhead', $links, $item );
|
984 |
-
}
|
985 |
-
|
986 |
-
/**
|
987 |
-
* Get filter links for components for a specific admin repair tool
|
988 |
-
*
|
989 |
-
* @since 2.6.0 bbPress (r5885)
|
990 |
-
*
|
991 |
-
* @param array $args
|
992 |
-
* @return array
|
993 |
-
*/
|
994 |
-
function bbp_get_admin_repair_tool_overhead_filters( $args = array() ) {
|
995 |
-
|
996 |
-
// Parse args
|
997 |
-
$r = bbp_parse_args( $args, array(
|
998 |
-
'before' => '<ul class="subsubsub">',
|
999 |
-
'after' => '</ul>',
|
1000 |
-
'link_before' => '<li>',
|
1001 |
-
'link_after' => '</li>',
|
1002 |
-
'count_before' => ' <span class="count">(',
|
1003 |
-
'count_after' => ')</span>',
|
1004 |
-
'separator' => ' | ',
|
1005 |
-
), 'get_admin_repair_tool_overhead_filters' );
|
1006 |
-
|
1007 |
-
// Count the tools
|
1008 |
-
$tools = bbp_get_admin_repair_tools();
|
1009 |
-
|
1010 |
-
// Get the tools URL
|
1011 |
-
$tools_url = add_query_arg( array( 'page' => 'bbp-repair' ), admin_url( 'tools.php' ) );
|
1012 |
-
|
1013 |
-
// Define arrays
|
1014 |
-
$overheads = array();
|
1015 |
-
|
1016 |
-
// Loop through tools and count overheads
|
1017 |
-
foreach ( $tools as $id => $tool ) {
|
1018 |
-
|
1019 |
-
// Get the overhead level
|
1020 |
-
$overhead = $tool['overhead'];
|
1021 |
-
|
1022 |
-
// Set an empty count
|
1023 |
-
if ( empty( $overheads[ $overhead ] ) ) {
|
1024 |
-
$overheads[ $overhead ] = 0;
|
1025 |
-
}
|
1026 |
-
|
1027 |
-
// Bump the overhead count
|
1028 |
-
$overheads[ $overhead ]++;
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
// Create the "All" link
|
1032 |
-
$current = empty( $_GET['overhead'] ) ? 'current' : '';
|
1033 |
-
$output = $r['link_before']. '<a href="' . esc_url( $tools_url ) . '" class="' . esc_attr( $current ) . '">' . sprintf( esc_html__( 'All %s', 'bbpress' ), $r['count_before'] . count( $tools ) . $r['count_after'] ) . '</a>' . $r['separator'] . $r['link_after'];
|
1034 |
-
|
1035 |
-
// Default ticker
|
1036 |
-
$i = 0;
|
1037 |
-
|
1038 |
-
// Loop through overheads and build filter
|
1039 |
-
foreach ( $overheads as $overhead => $count ) {
|
1040 |
-
|
1041 |
-
// Separator count
|
1042 |
-
$i++;
|
1043 |
-
|
1044 |
-
// Build the filter URL
|
1045 |
-
$key = sanitize_key( $overhead );
|
1046 |
-
$args = array( 'overhead' => $key );
|
1047 |
-
$filter_url = add_query_arg( $args, $tools_url );
|
1048 |
-
|
1049 |
-
// Figure out separator and active class
|
1050 |
-
$show_sep = count( $overheads ) > $i ? $r['separator'] : '';
|
1051 |
-
$current = ! empty( $_GET['overhead'] ) && ( sanitize_key( $_GET['overhead'] ) === $key ) ? 'current' : '';
|
1052 |
-
|
1053 |
-
// Counts to show
|
1054 |
-
if ( ! empty( $count ) ) {
|
1055 |
-
$overhead_count = $r['count_before'] . $count . $r['count_after'];
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
// Build the link
|
1059 |
-
$output .= $r['link_before'] . '<a href="' . esc_url( $filter_url ) . '" class="' . esc_attr( $current ) . '">' . bbp_admin_repair_tool_translate_overhead( $overhead ) . $overhead_count . '</a>' . $show_sep . $r['link_after'];
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
// Surround output with before & after strings
|
1063 |
-
$output = $r['before'] . $output . $r['after'];
|
1064 |
-
|
1065 |
-
// Filter & return
|
1066 |
-
return apply_filters( 'bbp_get_admin_repair_tool_components', $output, $r, $args );
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
/**
|
1070 |
-
* Recount topic replies
|
1071 |
-
*
|
1072 |
-
* @since 2.0.0 bbPress (r2613)
|
1073 |
-
*
|
1074 |
-
* @uses wpdb::query() To run our recount sql queries
|
1075 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1076 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1077 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
1078 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1079 |
-
* @uses bbp_get_closed_status_id() To get the closed status id
|
1080 |
-
* @return array An array of the status code and the message
|
1081 |
-
*/
|
1082 |
-
function bbp_admin_repair_topic_reply_count() {
|
1083 |
-
|
1084 |
-
// Define variables
|
1085 |
-
$bbp_db = bbp_db();
|
1086 |
-
$statement = __( 'Counting the number of replies in each topic… %s', 'bbpress' );
|
1087 |
-
$result = __( 'Failed!', 'bbpress' );
|
1088 |
-
|
1089 |
-
// Post types and status
|
1090 |
-
$tpt = bbp_get_topic_post_type();
|
1091 |
-
$rpt = bbp_get_reply_post_type();
|
1092 |
-
$pps = bbp_get_public_status_id();
|
1093 |
-
$cps = bbp_get_closed_status_id();
|
1094 |
-
|
1095 |
-
// Delete the meta key _bbp_reply_count for each topic
|
1096 |
-
$sql_delete = "DELETE `postmeta` FROM `{$bbp_db->postmeta}` AS `postmeta`
|
1097 |
-
LEFT JOIN `{$bbp_db->posts}` AS `posts` ON `posts`.`ID` = `postmeta`.`post_id`
|
1098 |
-
WHERE `posts`.`post_type` = '{$tpt}'
|
1099 |
-
AND `postmeta`.`meta_key` = '_bbp_reply_count'";
|
1100 |
-
|
1101 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1102 |
-
return array( 1, sprintf( $statement, $result ) );
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
// Recalculate the meta key _bbp_reply_count for each topic
|
1106 |
-
$sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
1107 |
-
SELECT `topics`.`ID` AS `post_id`, '_bbp_reply_count' AS `meta_key`, COUNT(`replies`.`ID`) As `meta_value`
|
1108 |
-
FROM `{$bbp_db->posts}` AS `topics`
|
1109 |
-
LEFT JOIN `{$bbp_db->posts}` as `replies`
|
1110 |
-
ON `replies`.`post_parent` = `topics`.`ID`
|
1111 |
-
AND `replies`.`post_status` = '{$pps}'
|
1112 |
-
AND `replies`.`post_type` = '{$rpt}'
|
1113 |
-
WHERE `topics`.`post_type` = '{$tpt}'
|
1114 |
-
AND `topics`.`post_status` IN ( '{$pps}', '{$cps}' )
|
1115 |
-
GROUP BY `topics`.`ID`)";
|
1116 |
-
|
1117 |
-
if ( is_wp_error( $bbp_db->query( $sql ) ) ) {
|
1118 |
-
return array( 2, sprintf( $statement, $result ) );
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
/**
|
1125 |
-
* Recount topic voices
|
1126 |
-
*
|
1127 |
-
* @since 2.0.0 bbPress (r2613)
|
1128 |
-
*
|
1129 |
-
* @uses wpdb::query() To run our recount sql queries
|
1130 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1131 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1132 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
1133 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1134 |
-
* @uses bbp_get_closed_status_id() To get the closed status id
|
1135 |
-
* @return array An array of the status code and the message
|
1136 |
-
*/
|
1137 |
-
function bbp_admin_repair_topic_voice_count() {
|
1138 |
-
|
1139 |
-
// Define variables
|
1140 |
-
$bbp_db = bbp_db();
|
1141 |
-
$statement = __( 'Counting the number of voices in each topic… %s', 'bbpress' );
|
1142 |
-
$result = __( 'Failed!', 'bbpress' );
|
1143 |
-
|
1144 |
-
$sql_delete = "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_voice_count'";
|
1145 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1146 |
-
return array( 1, sprintf( $statement, $result ) );
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
// Post types and status
|
1150 |
-
$tpt = bbp_get_topic_post_type();
|
1151 |
-
$rpt = bbp_get_reply_post_type();
|
1152 |
-
$pps = bbp_get_public_status_id();
|
1153 |
-
$cps = bbp_get_closed_status_id();
|
1154 |
-
|
1155 |
-
$sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
1156 |
-
SELECT `postmeta`.`meta_value`, '_bbp_voice_count', COUNT(DISTINCT `post_author`) as `meta_value`
|
1157 |
-
FROM `{$bbp_db->posts}` AS `posts`
|
1158 |
-
LEFT JOIN `{$bbp_db->postmeta}` AS `postmeta`
|
1159 |
-
ON `posts`.`ID` = `postmeta`.`post_id`
|
1160 |
-
AND `postmeta`.`meta_key` = '_bbp_topic_id'
|
1161 |
-
WHERE `posts`.`post_type` IN ( '{$tpt}', '{$rpt}' )
|
1162 |
-
AND `posts`.`post_status` IN ( '{$pps}', '{$cps}' )
|
1163 |
-
AND `posts`.`post_author` != '0'
|
1164 |
-
GROUP BY `postmeta`.`meta_value`)";
|
1165 |
-
|
1166 |
-
if ( is_wp_error( $bbp_db->query( $sql ) ) ) {
|
1167 |
-
return array( 2, sprintf( $statement, $result ) );
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
/**
|
1174 |
-
* Recount topic hidden replies (spammed/trashed)
|
1175 |
-
*
|
1176 |
-
* @since 2.0.0 bbPress (r2747)
|
1177 |
-
*
|
1178 |
-
* @uses wpdb::query() To run our recount sql queries
|
1179 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1180 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
1181 |
-
* @uses bbp_get_trash_status_id() To get the trash status id
|
1182 |
-
* @uses bbp_get_spam_status_id() To get the spam status id
|
1183 |
-
* @uses bbp_get_pending_status_id() To get the pending status id
|
1184 |
-
* @return array An array of the status code and the message
|
1185 |
-
*/
|
1186 |
-
function bbp_admin_repair_topic_hidden_reply_count() {
|
1187 |
-
|
1188 |
-
// Define variables
|
1189 |
-
$bbp_db = bbp_db();
|
1190 |
-
$statement = __( 'Counting the number of pending, spammed, and trashed replies in each topic… %s', 'bbpress' );
|
1191 |
-
$result = __( 'Failed!', 'bbpress' );
|
1192 |
-
|
1193 |
-
$sql_delete = "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_reply_count_hidden'";
|
1194 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1195 |
-
return array( 1, sprintf( $statement, $result ) );
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
// Post types and status
|
1199 |
-
$rpt = bbp_get_reply_post_type();
|
1200 |
-
$tps = bbp_get_trash_status_id();
|
1201 |
-
$sps = bbp_get_spam_status_id();
|
1202 |
-
$pps = bbp_get_pending_status_id();
|
1203 |
-
|
1204 |
-
$sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$rpt}' AND `post_status` IN ( '{$tps}', '{$sps}', '{$pps}' ) GROUP BY `post_parent`)";
|
1205 |
-
if ( is_wp_error( $bbp_db->query( $sql ) ) ) {
|
1206 |
-
return array( 2, sprintf( $statement, $result ) );
|
1207 |
-
}
|
1208 |
-
|
1209 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
/**
|
1213 |
-
* Repair group forum ID mappings after a bbPress 1.1 to bbPress 2.2 conversion
|
1214 |
-
*
|
1215 |
-
* @since 2.2.0 bbPress (r4395)
|
1216 |
-
*
|
1217 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1218 |
-
* @return If a wp_error() occurs and no converted forums are found
|
1219 |
-
*/
|
1220 |
-
function bbp_admin_repair_group_forum_relationship() {
|
1221 |
-
|
1222 |
-
// Define variables
|
1223 |
-
$bbp_db = bbp_db();
|
1224 |
-
$statement = __( 'Repairing BuddyPress group-forum relationships… %s', 'bbpress' );
|
1225 |
-
$g_count = 0;
|
1226 |
-
$f_count = 0;
|
1227 |
-
$s_count = 0;
|
1228 |
-
|
1229 |
-
// Copy the BuddyPress filter here, incase BuddyPress is not active
|
1230 |
-
$prefix = apply_filters( 'bp_core_get_table_prefix', $bbp_db->base_prefix );
|
1231 |
-
$groups_table = $prefix . 'bp_groups';
|
1232 |
-
$groups_meta_table = $prefix . 'bp_groups_groupmeta';
|
1233 |
-
|
1234 |
-
// Get the converted forum IDs
|
1235 |
-
$forum_ids = $bbp_db->query( "SELECT `forum`.`ID`, `forummeta`.`meta_value`
|
1236 |
-
FROM `{$bbp_db->posts}` AS `forum`
|
1237 |
-
LEFT JOIN `{$bbp_db->postmeta}` AS `forummeta`
|
1238 |
-
ON `forum`.`ID` = `forummeta`.`post_id`
|
1239 |
-
AND `forummeta`.`meta_key` = '_bbp_old_forum_id'
|
1240 |
-
WHERE `forum`.`post_type` = '" . bbp_get_forum_post_type() . "'
|
1241 |
-
GROUP BY `forum`.`ID`" );
|
1242 |
-
|
1243 |
-
// Bail if forum IDs returned an error
|
1244 |
-
if ( is_wp_error( $forum_ids ) || empty( $bbp_db->last_result ) ) {
|
1245 |
-
return array( 2, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
// Stash the last results
|
1249 |
-
$results = $bbp_db->last_result;
|
1250 |
-
|
1251 |
-
// Update each group forum
|
1252 |
-
foreach ( $results as $group_forums ) {
|
1253 |
-
|
1254 |
-
// Only update if is a converted forum
|
1255 |
-
if ( ! isset( $group_forums->meta_value ) ) {
|
1256 |
-
continue;
|
1257 |
-
}
|
1258 |
-
|
1259 |
-
// Attempt to update group meta
|
1260 |
-
$updated = $bbp_db->query( "UPDATE `{$groups_meta_table}` SET `meta_value` = '{$group_forums->ID}' WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->meta_value}'" );
|
1261 |
-
|
1262 |
-
// Bump the count
|
1263 |
-
if ( ! empty( $updated ) && ! is_wp_error( $updated ) ) {
|
1264 |
-
++$g_count;
|
1265 |
-
}
|
1266 |
-
|
1267 |
-
// Update group to forum relationship data
|
1268 |
-
$group_id = (int) $bbp_db->get_var( "SELECT `group_id` FROM `{$groups_meta_table}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}'" );
|
1269 |
-
if ( ! empty( $group_id ) ) {
|
1270 |
-
|
1271 |
-
// Update the group to forum meta connection in forums
|
1272 |
-
update_post_meta( $group_forums->ID, '_bbp_group_ids', array( $group_id ) );
|
1273 |
-
|
1274 |
-
// Get the group status
|
1275 |
-
$group_status = $bbp_db->get_var( "SELECT `status` FROM `{$groups_table}` WHERE `id` = '{$group_id}'" );
|
1276 |
-
|
1277 |
-
// Sync up forum visibility based on group status
|
1278 |
-
switch ( $group_status ) {
|
1279 |
-
|
1280 |
-
// Public groups have public forums
|
1281 |
-
case 'public' :
|
1282 |
-
bbp_publicize_forum( $group_forums->ID );
|
1283 |
-
|
1284 |
-
// Bump the count for output later
|
1285 |
-
++$s_count;
|
1286 |
-
break;
|
1287 |
-
|
1288 |
-
// Private/hidden groups have hidden forums
|
1289 |
-
case 'private' :
|
1290 |
-
case 'hidden' :
|
1291 |
-
bbp_hide_forum( $group_forums->ID );
|
1292 |
-
|
1293 |
-
// Bump the count for output later
|
1294 |
-
++$s_count;
|
1295 |
-
break;
|
1296 |
-
}
|
1297 |
-
|
1298 |
-
// Bump the count for output later
|
1299 |
-
++$f_count;
|
1300 |
-
}
|
1301 |
-
}
|
1302 |
-
|
1303 |
-
// Make some logical guesses at the old group root forum
|
1304 |
-
if ( function_exists( 'bp_forums_parent_forum_id' ) ) {
|
1305 |
-
$old_default_forum_id = bp_forums_parent_forum_id();
|
1306 |
-
} elseif ( defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) {
|
1307 |
-
$old_default_forum_id = (int) BP_FORUMS_PARENT_FORUM_ID;
|
1308 |
-
} else {
|
1309 |
-
$old_default_forum_id = 1;
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
// Try to get the group root forum
|
1313 |
-
$posts = get_posts( array(
|
1314 |
-
'post_type' => bbp_get_forum_post_type(),
|
1315 |
-
'meta_key' => '_bbp_old_forum_id',
|
1316 |
-
'meta_type' => 'NUMERIC',
|
1317 |
-
'meta_value' => $old_default_forum_id,
|
1318 |
-
'numberposts' => 1
|
1319 |
) );
|
1320 |
-
|
1321 |
-
// Found the group root forum
|
1322 |
-
if ( ! empty( $posts ) ) {
|
1323 |
-
|
1324 |
-
// Rename 'Default Forum' since it's now visible in sitewide forums
|
1325 |
-
if ( 'Default Forum' === $posts[0]->post_title ) {
|
1326 |
-
wp_update_post( array(
|
1327 |
-
'ID' => $posts[0]->ID,
|
1328 |
-
'post_title' => __( 'Group Forums', 'bbpress' ),
|
1329 |
-
'post_name' => __( 'group-forums', 'bbpress' ),
|
1330 |
-
) );
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
// Update the group forums root metadata
|
1334 |
-
update_option( '_bbp_group_forums_root_id', $posts[0]->ID );
|
1335 |
-
}
|
1336 |
-
|
1337 |
-
// Remove old bbPress 1.1 roles (BuddyPress)
|
1338 |
-
remove_role( 'member' );
|
1339 |
-
remove_role( 'inactive' );
|
1340 |
-
remove_role( 'blocked' );
|
1341 |
-
remove_role( 'moderator' );
|
1342 |
-
remove_role( 'keymaster' );
|
1343 |
-
|
1344 |
-
// Complete results
|
1345 |
-
$result = sprintf( __( 'Complete! %s groups updated; %s forums updated; %s forum statuses synced.', 'bbpress' ), bbp_number_format( $g_count ), bbp_number_format( $f_count ), bbp_number_format( $s_count ) );
|
1346 |
-
return array( 0, sprintf( $statement, $result ) );
|
1347 |
-
}
|
1348 |
-
|
1349 |
-
/**
|
1350 |
-
* Recount forum topics
|
1351 |
-
*
|
1352 |
-
* @since 2.0.0 bbPress (r2613)
|
1353 |
-
*
|
1354 |
-
* @uses wpdb::query() To run our recount sql queries
|
1355 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1356 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1357 |
-
* @uses get_posts() To get the forums
|
1358 |
-
* @uses bbp_update_forum_topic_count() To update the forum topic count
|
1359 |
-
* @return array An array of the status code and the message
|
1360 |
-
*/
|
1361 |
-
function bbp_admin_repair_forum_topic_count() {
|
1362 |
-
|
1363 |
-
// Define variables
|
1364 |
-
$bbp_db = bbp_db();
|
1365 |
-
$statement = __( 'Counting the number of topics in each forum… %s', 'bbpress' );
|
1366 |
-
$result = __( 'Failed!', 'bbpress' );
|
1367 |
-
|
1368 |
-
$sql_delete = "DELETE FROM {$bbp_db->postmeta} WHERE meta_key IN ( '_bbp_topic_count', '_bbp_total_topic_count', '_bbp_topic_count_hidden' )";
|
1369 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1370 |
-
return array( 1, sprintf( $statement, $result ) );
|
1371 |
-
}
|
1372 |
-
|
1373 |
-
$forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
|
1374 |
-
if ( ! empty( $forums ) ) {
|
1375 |
-
foreach ( $forums as $forum ) {
|
1376 |
-
bbp_update_forum_topic_count( $forum->ID );
|
1377 |
-
bbp_update_forum_topic_count_hidden( $forum->ID );
|
1378 |
-
}
|
1379 |
-
} else {
|
1380 |
-
return array( 2, sprintf( $statement, $result ) );
|
1381 |
-
}
|
1382 |
-
|
1383 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1384 |
-
}
|
1385 |
-
|
1386 |
-
/**
|
1387 |
-
* Recount topic in each topic-tag
|
1388 |
-
*
|
1389 |
-
* @since 2.6.0 bbPress (r6256)
|
1390 |
-
*
|
1391 |
-
* @uses bbp_get_topic_tag_tax_id() To get the topic-tag taxonomy
|
1392 |
-
* @uses get_terms() To get the terms
|
1393 |
-
* @uses wp_list_pluck() To get term taxonomy IDs
|
1394 |
-
* @uses get_taxonomy() To get term taxonomy object
|
1395 |
-
* @uses _update_post_term_count() To update generic counts
|
1396 |
-
* @uses bbp_update_topic_tag_count() To update topic-tag counts
|
1397 |
-
* @uses clean_term_cache() To bust the terms cache
|
1398 |
-
* @return array An array of the status code and the message
|
1399 |
-
*/
|
1400 |
-
function bbp_admin_repair_topic_tag_count() {
|
1401 |
-
|
1402 |
-
// Define variables
|
1403 |
-
$statement = __( 'Counting the number of topics in each topic-tag… %s', 'bbpress' );
|
1404 |
-
$result = __( 'Failed!', 'bbpress' );
|
1405 |
-
$tax_id = bbp_get_topic_tag_tax_id();
|
1406 |
-
$terms = get_terms( $tax_id, array( 'hide_empty' => false ) );
|
1407 |
-
$tt_ids = wp_list_pluck( $terms, 'term_taxonomy_id' );
|
1408 |
-
$ints = array_map( 'intval', $tt_ids );
|
1409 |
-
$taxonomy = get_taxonomy( $tax_id );
|
1410 |
-
|
1411 |
-
// Bail if taxonomy does not exist
|
1412 |
-
if ( empty( $taxonomy ) ) {
|
1413 |
-
return array( 1, sprintf( $statement, $result ) );
|
1414 |
-
}
|
1415 |
-
|
1416 |
-
// Custom callback
|
1417 |
-
if ( ! empty( $taxonomy->update_count_callback ) ) {
|
1418 |
-
|
1419 |
-
// Bail if callback is not callable
|
1420 |
-
if ( ! is_callable( $taxonomy->update_count_callback ) ) {
|
1421 |
-
return array( 1, sprintf( $statement, $result ) );
|
1422 |
-
}
|
1423 |
-
|
1424 |
-
call_user_func( $taxonomy->update_count_callback, $ints, $taxonomy );
|
1425 |
-
|
1426 |
-
// Generic callback fallback
|
1427 |
-
} else {
|
1428 |
-
_update_post_term_count( $ints, $taxonomy );
|
1429 |
-
}
|
1430 |
-
|
1431 |
-
// Bust the cache
|
1432 |
-
clean_term_cache( $ints, '', false );
|
1433 |
-
|
1434 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1435 |
-
}
|
1436 |
-
|
1437 |
-
/**
|
1438 |
-
* Recount forum replies
|
1439 |
-
*
|
1440 |
-
* @since 2.0.0 bbPress (r2613)
|
1441 |
-
*
|
1442 |
-
* @uses wpdb::query() To run our recount sql queries
|
1443 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1444 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1445 |
-
* @uses get_posts() To get the forums
|
1446 |
-
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
1447 |
-
* @return array An array of the status code and the message
|
1448 |
-
*/
|
1449 |
-
function bbp_admin_repair_forum_reply_count() {
|
1450 |
-
|
1451 |
-
// Define variables
|
1452 |
-
$bbp_db = bbp_db();
|
1453 |
-
$statement = __( 'Counting the number of replies in each forum… %s', 'bbpress' );
|
1454 |
-
$result = __( 'Failed!', 'bbpress' );
|
1455 |
-
|
1456 |
-
// Post type
|
1457 |
-
$fpt = bbp_get_forum_post_type();
|
1458 |
-
|
1459 |
-
// Delete the meta keys _bbp_reply_count and _bbp_total_reply_count for each forum
|
1460 |
-
$sql_delete = "DELETE `postmeta` FROM `{$bbp_db->postmeta}` AS `postmeta`
|
1461 |
-
LEFT JOIN `{$bbp_db->posts}` AS `posts` ON `posts`.`ID` = `postmeta`.`post_id`
|
1462 |
-
WHERE `posts`.`post_type` = '{$fpt}'
|
1463 |
-
AND `postmeta`.`meta_key` = '_bbp_reply_count'
|
1464 |
-
OR `postmeta`.`meta_key` = '_bbp_total_reply_count'";
|
1465 |
-
|
1466 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1467 |
-
return array( 1, sprintf( $statement, $result ) );
|
1468 |
-
}
|
1469 |
-
|
1470 |
-
// Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
|
1471 |
-
$forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
|
1472 |
-
if ( ! empty( $forums ) ) {
|
1473 |
-
foreach ( $forums as $forum ) {
|
1474 |
-
bbp_update_forum_reply_count( $forum->ID );
|
1475 |
-
}
|
1476 |
-
} else {
|
1477 |
-
return array( 2, sprintf( $statement, $result ) );
|
1478 |
-
}
|
1479 |
-
|
1480 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1481 |
-
}
|
1482 |
-
|
1483 |
-
/**
|
1484 |
-
* Recount topics by the users
|
1485 |
-
*
|
1486 |
-
* @since 2.1.0 bbPress (r3889)
|
1487 |
-
*
|
1488 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1489 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1490 |
-
* @uses wpdb::query() To run our recount sql queries
|
1491 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1492 |
-
* @return array An array of the status code and the message
|
1493 |
-
*/
|
1494 |
-
function bbp_admin_repair_user_topic_count() {
|
1495 |
-
|
1496 |
-
// Define variables
|
1497 |
-
$bbp_db = bbp_db();
|
1498 |
-
$statement = __( 'Counting the number of topics each user has created… %s', 'bbpress' );
|
1499 |
-
$result = __( 'Failed!', 'bbpress' );
|
1500 |
-
|
1501 |
-
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
|
1502 |
-
$insert_rows = $bbp_db->get_results( $sql_select );
|
1503 |
-
|
1504 |
-
if ( is_wp_error( $insert_rows ) ) {
|
1505 |
-
return array( 1, sprintf( $statement, $result ) );
|
1506 |
-
}
|
1507 |
-
|
1508 |
-
$key = $bbp_db->prefix . '_bbp_topic_count';
|
1509 |
-
$insert_values = array();
|
1510 |
-
foreach ( $insert_rows as $insert_row ) {
|
1511 |
-
$insert_values[] = "('{$insert_row->post_author}', '{$key}', '{$insert_row->_count}')";
|
1512 |
-
}
|
1513 |
-
|
1514 |
-
if ( !count( $insert_values ) ) {
|
1515 |
-
return array( 2, sprintf( $statement, $result ) );
|
1516 |
-
}
|
1517 |
-
|
1518 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
1519 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1520 |
-
return array( 3, sprintf( $statement, $result ) );
|
1521 |
-
}
|
1522 |
-
|
1523 |
-
foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
|
1524 |
-
$chunk = "\n" . implode( ",\n", $chunk );
|
1525 |
-
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
1526 |
-
|
1527 |
-
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
1528 |
-
return array( 4, sprintf( $statement, $result ) );
|
1529 |
-
}
|
1530 |
-
}
|
1531 |
-
|
1532 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1533 |
-
}
|
1534 |
-
|
1535 |
-
/**
|
1536 |
-
* Recount topic replied by the users
|
1537 |
-
*
|
1538 |
-
* @since 2.0.0 bbPress (r2613)
|
1539 |
-
*
|
1540 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
1541 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1542 |
-
* @uses wpdb::query() To run our recount sql queries
|
1543 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1544 |
-
* @return array An array of the status code and the message
|
1545 |
-
*/
|
1546 |
-
function bbp_admin_repair_user_reply_count() {
|
1547 |
-
|
1548 |
-
// Define variables
|
1549 |
-
$bbp_db = bbp_db();
|
1550 |
-
$statement = __( 'Counting the number of topics to which each user has replied… %s', 'bbpress' );
|
1551 |
-
$result = __( 'Failed!', 'bbpress' );
|
1552 |
-
|
1553 |
-
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
|
1554 |
-
$insert_rows = $bbp_db->get_results( $sql_select );
|
1555 |
-
|
1556 |
-
if ( is_wp_error( $insert_rows ) ) {
|
1557 |
-
return array( 1, sprintf( $statement, $result ) );
|
1558 |
-
}
|
1559 |
-
|
1560 |
-
$key = $bbp_db->prefix . '_bbp_reply_count';
|
1561 |
-
$insert_values = array();
|
1562 |
-
foreach ( $insert_rows as $insert_row ) {
|
1563 |
-
$insert_values[] = "('{$insert_row->post_author}', '{$key}', '{$insert_row->_count}')";
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
if ( !count( $insert_values ) ) {
|
1567 |
-
return array( 2, sprintf( $statement, $result ) );
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
1571 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1572 |
-
return array( 3, sprintf( $statement, $result ) );
|
1573 |
-
}
|
1574 |
-
|
1575 |
-
foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
|
1576 |
-
$chunk = "\n" . implode( ",\n", $chunk );
|
1577 |
-
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
1578 |
-
|
1579 |
-
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
1580 |
-
return array( 4, sprintf( $statement, $result ) );
|
1581 |
-
}
|
1582 |
-
}
|
1583 |
-
|
1584 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1585 |
-
}
|
1586 |
-
|
1587 |
-
/**
|
1588 |
-
* Clean the users' favorites
|
1589 |
-
*
|
1590 |
-
* @since 2.0.0 bbPress (r2613)
|
1591 |
-
*
|
1592 |
-
* @uses wpdb::query() To run our recount sql queries
|
1593 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1594 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1595 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1596 |
-
* @return array An array of the status code and the message
|
1597 |
-
*/
|
1598 |
-
function bbp_admin_repair_user_favorites() {
|
1599 |
-
|
1600 |
-
// Define variables
|
1601 |
-
$bbp_db = bbp_db();
|
1602 |
-
$statement = __( 'Removing trashed topics from user favorites… %s', 'bbpress' );
|
1603 |
-
$result = __( 'Failed!', 'bbpress' );
|
1604 |
-
|
1605 |
-
$key = $bbp_db->prefix . '_bbp_favorites';
|
1606 |
-
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `favorites` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
1607 |
-
|
1608 |
-
if ( is_wp_error( $users ) ) {
|
1609 |
-
return array( 1, sprintf( $statement, $result ) );
|
1610 |
-
}
|
1611 |
-
|
1612 |
-
$topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
1613 |
-
|
1614 |
-
if ( is_wp_error( $topics ) ) {
|
1615 |
-
return array( 2, sprintf( $statement, $result ) );
|
1616 |
-
}
|
1617 |
-
|
1618 |
-
$values = array();
|
1619 |
-
foreach ( $users as $user ) {
|
1620 |
-
if ( empty( $user->favorites ) || ! is_string( $user->favorites ) ) {
|
1621 |
-
continue;
|
1622 |
-
}
|
1623 |
-
|
1624 |
-
$favorites = array_intersect( $topics, explode( ',', $user->favorites ) );
|
1625 |
-
if ( empty( $favorites ) || ! is_array( $favorites ) ) {
|
1626 |
-
continue;
|
1627 |
-
}
|
1628 |
-
|
1629 |
-
$favorites_joined = implode( ',', $favorites );
|
1630 |
-
$values[] = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";
|
1631 |
-
|
1632 |
-
// Cleanup
|
1633 |
-
unset( $favorites, $favorites_joined );
|
1634 |
-
}
|
1635 |
-
|
1636 |
-
if ( !count( $values ) ) {
|
1637 |
-
$result = __( 'Nothing to remove!', 'bbpress' );
|
1638 |
-
return array( 0, sprintf( $statement, $result ) );
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
1642 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1643 |
-
return array( 4, sprintf( $statement, $result ) );
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
1647 |
-
$chunk = "\n" . implode( ",\n", $chunk );
|
1648 |
-
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
1649 |
-
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
1650 |
-
return array( 5, sprintf( $statement, $result ) );
|
1651 |
-
}
|
1652 |
-
}
|
1653 |
-
|
1654 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
/**
|
1658 |
-
* Clean the users' topic subscriptions
|
1659 |
-
*
|
1660 |
-
* @since 2.0.0 bbPress (r2668)
|
1661 |
-
*
|
1662 |
-
* @uses wpdb::query() To run our recount sql queries
|
1663 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1664 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1665 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1666 |
-
* @return array An array of the status code and the message
|
1667 |
-
*/
|
1668 |
-
function bbp_admin_repair_user_topic_subscriptions() {
|
1669 |
-
|
1670 |
-
// Define variables
|
1671 |
-
$bbp_db = bbp_db();
|
1672 |
-
$statement = __( 'Removing trashed topics from user subscriptions… %s', 'bbpress' );
|
1673 |
-
$result = __( 'Failed!', 'bbpress' );
|
1674 |
-
|
1675 |
-
$key = $bbp_db->prefix . '_bbp_subscriptions';
|
1676 |
-
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `subscriptions` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
1677 |
-
|
1678 |
-
if ( is_wp_error( $users ) ) {
|
1679 |
-
return array( 1, sprintf( $statement, $result ) );
|
1680 |
-
}
|
1681 |
-
|
1682 |
-
$topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
1683 |
-
if ( is_wp_error( $topics ) ) {
|
1684 |
-
return array( 2, sprintf( $statement, $result ) );
|
1685 |
-
}
|
1686 |
-
|
1687 |
-
$values = array();
|
1688 |
-
foreach ( $users as $user ) {
|
1689 |
-
if ( empty( $user->subscriptions ) || ! is_string( $user->subscriptions ) ) {
|
1690 |
-
continue;
|
1691 |
-
}
|
1692 |
-
|
1693 |
-
$subscriptions = array_intersect( $topics, explode( ',', $user->subscriptions ) );
|
1694 |
-
if ( empty( $subscriptions ) || ! is_array( $subscriptions ) ) {
|
1695 |
-
continue;
|
1696 |
-
}
|
1697 |
-
|
1698 |
-
$subscriptions_joined = implode( ',', $subscriptions );
|
1699 |
-
$values[] = "('{$user->user_id}', '{$key}', '{$subscriptions_joined}')";
|
1700 |
-
|
1701 |
-
// Cleanup
|
1702 |
-
unset( $subscriptions, $subscriptions_joined );
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
if ( !count( $values ) ) {
|
1706 |
-
$result = __( 'Nothing to remove!', 'bbpress' );
|
1707 |
-
return array( 0, sprintf( $statement, $result ) );
|
1708 |
-
}
|
1709 |
-
|
1710 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
1711 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1712 |
-
return array( 4, sprintf( $statement, $result ) );
|
1713 |
-
}
|
1714 |
-
|
1715 |
-
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
1716 |
-
$chunk = "\n" . implode( ",\n", $chunk );
|
1717 |
-
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
1718 |
-
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
1719 |
-
return array( 5, sprintf( $statement, $result ) );
|
1720 |
-
}
|
1721 |
-
}
|
1722 |
-
|
1723 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1724 |
-
}
|
1725 |
-
|
1726 |
-
/**
|
1727 |
-
* Clean the users' forum subscriptions
|
1728 |
-
*
|
1729 |
-
* @since 2.5.0 bbPress (r5155)
|
1730 |
-
*
|
1731 |
-
* @uses wpdb::query() To run our recount sql queries
|
1732 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1733 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1734 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1735 |
-
* @return array An array of the status code and the message
|
1736 |
-
*/
|
1737 |
-
function bbp_admin_repair_user_forum_subscriptions() {
|
1738 |
-
|
1739 |
-
// Define variables
|
1740 |
-
$bbp_db = bbp_db();
|
1741 |
-
$statement = __( 'Removing trashed forums from user subscriptions… %s', 'bbpress' );
|
1742 |
-
$result = __( 'Failed!', 'bbpress' );
|
1743 |
-
|
1744 |
-
$key = $bbp_db->prefix . '_bbp_forum_subscriptions';
|
1745 |
-
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `subscriptions` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
1746 |
-
|
1747 |
-
if ( is_wp_error( $users ) ) {
|
1748 |
-
return array( 1, sprintf( $statement, $result ) );
|
1749 |
-
}
|
1750 |
-
|
1751 |
-
$forums = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_forum_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
1752 |
-
if ( is_wp_error( $forums ) ) {
|
1753 |
-
return array( 2, sprintf( $statement, $result ) );
|
1754 |
-
}
|
1755 |
-
|
1756 |
-
$values = array();
|
1757 |
-
foreach ( $users as $user ) {
|
1758 |
-
if ( empty( $user->subscriptions ) || ! is_string( $user->subscriptions ) ) {
|
1759 |
-
continue;
|
1760 |
-
}
|
1761 |
-
|
1762 |
-
$subscriptions = array_intersect( $forums, explode( ',', $user->subscriptions ) );
|
1763 |
-
if ( empty( $subscriptions ) || ! is_array( $subscriptions ) ) {
|
1764 |
-
continue;
|
1765 |
-
}
|
1766 |
-
|
1767 |
-
$subscriptions_joined = implode( ',', $subscriptions );
|
1768 |
-
$values[] = "('{$user->user_id}', '{$key}', '{$subscriptions_joined}')";
|
1769 |
-
|
1770 |
-
// Cleanup
|
1771 |
-
unset( $subscriptions, $subscriptions_joined );
|
1772 |
-
}
|
1773 |
-
|
1774 |
-
if ( !count( $values ) ) {
|
1775 |
-
$result = __( 'Nothing to remove!', 'bbpress' );
|
1776 |
-
return array( 0, sprintf( $statement, $result ) );
|
1777 |
-
}
|
1778 |
-
|
1779 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
1780 |
-
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
1781 |
-
return array( 4, sprintf( $statement, $result ) );
|
1782 |
-
}
|
1783 |
-
|
1784 |
-
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
1785 |
-
$chunk = "\n" . implode( ",\n", $chunk );
|
1786 |
-
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
1787 |
-
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
1788 |
-
return array( 5, sprintf( $statement, $result ) );
|
1789 |
-
}
|
1790 |
-
}
|
1791 |
-
|
1792 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1793 |
-
}
|
1794 |
-
|
1795 |
-
/**
|
1796 |
-
* This repair tool will map each user of the current site to their respective
|
1797 |
-
* forums role. By default, Admins will be Key Masters, and every other role
|
1798 |
-
* will be the default role defined in Settings > Forums (Participant).
|
1799 |
-
*
|
1800 |
-
* @since 2.2.0 bbPress (r4340)
|
1801 |
-
*
|
1802 |
-
* @uses bbp_get_user_role_map() To get the map of user roles
|
1803 |
-
* @uses bbp_get_default_role() To get the default bbPress user role
|
1804 |
-
* @uses bbp_get_blog_roles() To get the current WordPress roles
|
1805 |
-
* @uses get_users() To get the users of each role (limited to ID field)
|
1806 |
-
* @uses bbp_set_user_role() To set each user's forums role
|
1807 |
-
*/
|
1808 |
-
function bbp_admin_repair_user_roles() {
|
1809 |
-
|
1810 |
-
$statement = __( 'Remapping forum role for each user on this site… %s', 'bbpress' );
|
1811 |
-
$changed = 0;
|
1812 |
-
$role_map = bbp_get_user_role_map();
|
1813 |
-
$default_role = bbp_get_default_role();
|
1814 |
-
|
1815 |
-
// Bail if no role map exists
|
1816 |
-
if ( empty( $role_map ) ) {
|
1817 |
-
return array( 1, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
1818 |
-
}
|
1819 |
-
|
1820 |
-
// Iterate through each role...
|
1821 |
-
foreach ( array_keys( bbp_get_blog_roles() ) as $role ) {
|
1822 |
-
|
1823 |
-
// Reset the offset
|
1824 |
-
$offset = 0;
|
1825 |
-
|
1826 |
-
// If no role map exists, give the default forum role (bbp-participant)
|
1827 |
-
$new_role = isset( $role_map[ $role ] ) ? $role_map[ $role ] : $default_role;
|
1828 |
-
|
1829 |
-
// Get users of this site, limited to 1000
|
1830 |
-
while ( $users = get_users( array(
|
1831 |
-
'role' => $role,
|
1832 |
-
'fields' => 'ID',
|
1833 |
-
'number' => 1000,
|
1834 |
-
'offset' => $offset
|
1835 |
-
) ) ) {
|
1836 |
-
|
1837 |
-
// Iterate through each user of $role and try to set it
|
1838 |
-
foreach ( (array) $users as $user_id ) {
|
1839 |
-
if ( bbp_set_user_role( $user_id, $new_role ) ) {
|
1840 |
-
++$changed; // Keep a count to display at the end
|
1841 |
-
}
|
1842 |
-
}
|
1843 |
-
|
1844 |
-
// Bump the offset for the next query iteration
|
1845 |
-
$offset = $offset + 1000;
|
1846 |
-
}
|
1847 |
-
}
|
1848 |
-
|
1849 |
-
$result = sprintf( __( 'Complete! %s users updated.', 'bbpress' ), bbp_number_format( $changed ) );
|
1850 |
-
|
1851 |
-
return array( 0, sprintf( $statement, $result ) );
|
1852 |
-
}
|
1853 |
-
|
1854 |
-
/**
|
1855 |
-
* Recaches the last post in every topic and forum
|
1856 |
-
*
|
1857 |
-
* @since 2.0.0 bbPress (r3040)
|
1858 |
-
*
|
1859 |
-
* @uses wpdb::query() To run our recount sql queries
|
1860 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1861 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1862 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
1863 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
1864 |
-
* @uses bbp_get_public_status_id() To get the public status id
|
1865 |
-
* @uses bbp_is_forum_category() To check if the forum is a ategory
|
1866 |
-
* @uses bbp_update_forum() To update the forums forum id
|
1867 |
-
* @return array An array of the status code and the message
|
1868 |
-
*/
|
1869 |
-
function bbp_admin_repair_freshness() {
|
1870 |
-
|
1871 |
-
// Define variables
|
1872 |
-
$bbp_db = bbp_db();
|
1873 |
-
$statement = __( 'Recomputing latest post in every topic and forum… %s', 'bbpress' );
|
1874 |
-
$result = __( 'Failed!', 'bbpress' );
|
1875 |
-
|
1876 |
-
// First, delete everything.
|
1877 |
-
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` IN ( '_bbp_last_reply_id', '_bbp_last_topic_id', '_bbp_last_active_id', '_bbp_last_active_time' )" ) ) ) {
|
1878 |
-
return array( 1, sprintf( $statement, $result ) );
|
1879 |
-
}
|
1880 |
-
|
1881 |
-
// Post types and status
|
1882 |
-
$fpt = bbp_get_forum_post_type();
|
1883 |
-
$tpt = bbp_get_topic_post_type();
|
1884 |
-
$rpt = bbp_get_reply_post_type();
|
1885 |
-
$pps = bbp_get_public_status_id();
|
1886 |
-
|
1887 |
-
// Next, give all the topics with replies the ID their last reply.
|
1888 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1889 |
-
( SELECT `topic`.`ID`, '_bbp_last_reply_id', MAX( `reply`.`ID` )
|
1890 |
-
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
1891 |
-
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
1892 |
-
GROUP BY `topic`.`ID` )" ) ) ) {
|
1893 |
-
return array( 2, sprintf( $statement, $result ) );
|
1894 |
-
}
|
1895 |
-
|
1896 |
-
// For any remaining topics, give a reply ID of 0.
|
1897 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1898 |
-
( SELECT `ID`, '_bbp_last_reply_id', 0
|
1899 |
-
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
1900 |
-
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_reply_id'
|
1901 |
-
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
1902 |
-
return array( 3, sprintf( $statement, $result ) );
|
1903 |
-
}
|
1904 |
-
|
1905 |
-
// Now we give all the forums with topics the ID their last topic.
|
1906 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1907 |
-
( SELECT `forum`.`ID`, '_bbp_last_topic_id', `topic`.`ID`
|
1908 |
-
FROM `{$bbp_db->posts}` AS `forum` INNER JOIN `{$bbp_db->posts}` AS `topic` ON `forum`.`ID` = `topic`.`post_parent`
|
1909 |
-
WHERE `topic`.`post_status` = '{$pps}' AND `forum`.`post_type` = '{$fpt}' AND `topic`.`post_type` = '{$tpt}'
|
1910 |
-
GROUP BY `forum`.`ID` )" ) ) ) {
|
1911 |
-
return array( 4, sprintf( $statement, $result ) );
|
1912 |
-
}
|
1913 |
-
|
1914 |
-
// For any remaining forums, give a topic ID of 0.
|
1915 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1916 |
-
( SELECT `ID`, '_bbp_last_topic_id', 0
|
1917 |
-
FROM `{$bbp_db->posts}` AS `forum` LEFT JOIN `{$bbp_db->postmeta}` AS `topic`
|
1918 |
-
ON `forum`.`ID` = `topic`.`post_id` AND `topic`.`meta_key` = '_bbp_last_topic_id'
|
1919 |
-
WHERE `topic`.`meta_id` IS NULL AND `forum`.`post_type` = '{$fpt}' )" ) ) ) {
|
1920 |
-
return array( 5, sprintf( $statement, $result ) );
|
1921 |
-
}
|
1922 |
-
|
1923 |
-
// After that, we give all the topics with replies the ID their last reply (again, this time for a different reason).
|
1924 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1925 |
-
( SELECT `topic`.`ID`, '_bbp_last_active_id', MAX( `reply`.`ID` )
|
1926 |
-
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
1927 |
-
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
1928 |
-
GROUP BY `topic`.`ID` )" ) ) ) {
|
1929 |
-
return array( 6, sprintf( $statement, $result ) );
|
1930 |
-
}
|
1931 |
-
|
1932 |
-
// For any remaining topics, give a reply ID of themself.
|
1933 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1934 |
-
( SELECT `ID`, '_bbp_last_active_id', `ID`
|
1935 |
-
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
1936 |
-
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_active_id'
|
1937 |
-
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
1938 |
-
return array( 7, sprintf( $statement, $result ) );
|
1939 |
-
}
|
1940 |
-
|
1941 |
-
// Give topics with replies their last update time.
|
1942 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1943 |
-
( SELECT `topic`.`ID`, '_bbp_last_active_time', MAX( `reply`.`post_date` )
|
1944 |
-
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
1945 |
-
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
1946 |
-
GROUP BY `topic`.`ID` )" ) ) ) {
|
1947 |
-
return array( 8, sprintf( $statement, $result ) );
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
// Give topics without replies their last update time.
|
1951 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1952 |
-
( SELECT `ID`, '_bbp_last_active_time', `post_date`
|
1953 |
-
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
1954 |
-
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_active_time'
|
1955 |
-
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
1956 |
-
return array( 9, sprintf( $statement, $result ) );
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
// Forums need to know what their last active item is as well. Now it gets a bit more complex to do in the database.
|
1960 |
-
$forums = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$fpt}' and `post_status` != 'auto-draft'" );
|
1961 |
-
if ( is_wp_error( $forums ) ) {
|
1962 |
-
return array( 10, sprintf( $statement, $result ) );
|
1963 |
-
}
|
1964 |
-
|
1965 |
-
// Loop through forums
|
1966 |
-
foreach ( $forums as $forum_id ) {
|
1967 |
-
if ( ! bbp_is_forum_category( $forum_id ) ) {
|
1968 |
-
bbp_update_forum( array( 'forum_id' => $forum_id ) );
|
1969 |
-
}
|
1970 |
-
}
|
1971 |
-
|
1972 |
-
// Loop through categories when forums are done
|
1973 |
-
foreach ( $forums as $forum_id ) {
|
1974 |
-
if ( bbp_is_forum_category( $forum_id ) ) {
|
1975 |
-
bbp_update_forum( array( 'forum_id' => $forum_id ) );
|
1976 |
-
}
|
1977 |
-
}
|
1978 |
-
|
1979 |
-
// Complete results
|
1980 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1981 |
-
}
|
1982 |
-
|
1983 |
-
/**
|
1984 |
-
* Repairs the relationship of sticky topics to the actual parent forum
|
1985 |
-
*
|
1986 |
-
* @since 2.3.0 bbPress (r4695)
|
1987 |
-
*
|
1988 |
-
* @uses wpdb::get_col() To run our recount sql queries
|
1989 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1990 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
1991 |
-
* @uses get_post_meta() To get the sticky topics
|
1992 |
-
* @uses bbp_is_topic_super_sticky() To check if the topic is super sticky
|
1993 |
-
* @uses bbp_get_topic_forum_id() To get the topics forum id
|
1994 |
-
* @uses update_post_meta To update the topics sticky post meta
|
1995 |
-
* @return array An array of the status code and the message
|
1996 |
-
*/
|
1997 |
-
function bbp_admin_repair_sticky() {
|
1998 |
-
|
1999 |
-
// Define variables
|
2000 |
-
$bbp_db = bbp_db();
|
2001 |
-
$statement = __( 'Repairing the sticky topic to the parent forum relationships… %s', 'bbpress' );
|
2002 |
-
$result = __( 'Failed!', 'bbpress' );
|
2003 |
-
|
2004 |
-
$forums = $bbp_db->get_col( "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_forum_post_type() . "'" );
|
2005 |
-
|
2006 |
-
// Bail if no forums found
|
2007 |
-
if ( empty( $forums ) || is_wp_error( $forums ) ) {
|
2008 |
-
return array( 1, sprintf( $statement, $result ) );
|
2009 |
-
}
|
2010 |
-
|
2011 |
-
// Loop through forums and get their sticky topics
|
2012 |
-
foreach ( $forums as $forum ) {
|
2013 |
-
$forum_stickies[ $forum ] = get_post_meta( $forum, '_bbp_sticky_topics', true );
|
2014 |
-
}
|
2015 |
-
|
2016 |
-
// Cleanup
|
2017 |
-
unset( $forums, $forum );
|
2018 |
-
|
2019 |
-
// Loop through each forum with sticky topics
|
2020 |
-
foreach ( $forum_stickies as $forum_id => $stickies ) {
|
2021 |
-
|
2022 |
-
// Skip if no stickies
|
2023 |
-
if ( empty( $stickies ) ) {
|
2024 |
-
continue;
|
2025 |
-
}
|
2026 |
-
|
2027 |
-
// Loop through each sticky topic
|
2028 |
-
foreach ( $stickies as $id => $topic_id ) {
|
2029 |
-
|
2030 |
-
// If the topic is not a super sticky, and the forum ID does not
|
2031 |
-
// match the topic's forum ID, unset the forum's sticky meta.
|
2032 |
-
if ( ! bbp_is_topic_super_sticky( $topic_id ) && $forum_id !== bbp_get_topic_forum_id( $topic_id ) ) {
|
2033 |
-
unset( $forum_stickies[ $forum_id ][ $id ] );
|
2034 |
-
}
|
2035 |
-
}
|
2036 |
-
|
2037 |
-
// Get sticky topic ID's, or use empty string
|
2038 |
-
$stickers = empty( $forum_stickies[ $forum_id ] ) ? '' : array_values( $forum_stickies[ $forum_id ] );
|
2039 |
-
|
2040 |
-
// Update the forum's sticky topics meta
|
2041 |
-
update_post_meta( $forum_id, '_bbp_sticky_topics', $stickers );
|
2042 |
-
}
|
2043 |
-
|
2044 |
-
// Complete results
|
2045 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
2046 |
-
}
|
2047 |
-
|
2048 |
-
/**
|
2049 |
-
* Repair closed topics
|
2050 |
-
*
|
2051 |
-
* Closed topics that are missing the postmeta "_bbp_status" key value "publish"
|
2052 |
-
* result in unexpected behaviour, primarily this would have only occured if you
|
2053 |
-
* had imported forums from another forum package previous to bbPress v2.6,
|
2054 |
-
* https://bbpress.trac.wordpress.org/ticket/2577
|
2055 |
-
*
|
2056 |
-
* @since 2.6.0 bbPress (r5668)
|
2057 |
-
*
|
2058 |
-
* @uses wpdb::get_col() To run our recount sql queries
|
2059 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
2060 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
2061 |
-
* @uses get_post_meta() To get the closed topic status meta
|
2062 |
-
* @uses update_post_meta To update the topics closed status post meta
|
2063 |
-
* @return array An array of the status code and the message
|
2064 |
-
*/
|
2065 |
-
function bbp_admin_repair_closed_topics() {
|
2066 |
-
|
2067 |
-
// Define variables
|
2068 |
-
$bbp_db = bbp_db();
|
2069 |
-
$statement = __( 'Repairing closed topics… %s', 'bbpress' );
|
2070 |
-
$result = __( 'No closed topics to repair.', 'bbpress' );
|
2071 |
-
$changed = 0;
|
2072 |
-
|
2073 |
-
$closed_topics = $bbp_db->get_col( "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = 'closed'" );
|
2074 |
-
|
2075 |
-
// Bail if no closed topics found
|
2076 |
-
if ( empty( $closed_topics ) || is_wp_error( $closed_topics ) ) {
|
2077 |
-
return array( 1, sprintf( $statement, $result ) );
|
2078 |
-
}
|
2079 |
-
|
2080 |
-
// Loop through each closed topic
|
2081 |
-
foreach ( $closed_topics as $closed_topic ) {
|
2082 |
-
|
2083 |
-
// Check if the closed topic already has a postmeta _bbp_status value
|
2084 |
-
$topic_status = get_post_meta( $closed_topic, '_bbp_status', true );
|
2085 |
-
|
2086 |
-
// If we don't have a postmeta _bbp_status value
|
2087 |
-
if( empty( $topic_status ) ) {
|
2088 |
-
update_post_meta( $closed_topic, '_bbp_status', 'publish' );
|
2089 |
-
++$changed; // Keep a count to display at the end
|
2090 |
-
}
|
2091 |
-
}
|
2092 |
-
|
2093 |
-
// Cleanup
|
2094 |
-
unset( $closed_topics, $closed_topic, $topic_status );
|
2095 |
-
|
2096 |
-
// Complete results
|
2097 |
-
$result = sprintf( _n( 'Complete! %d closed topic repaired.', 'Complete! %d closed topics repaired.', $changed, 'bbpress' ), $changed );
|
2098 |
-
|
2099 |
-
return array( 0, sprintf( $statement, $result ) );
|
2100 |
-
}
|
2101 |
-
|
2102 |
-
/**
|
2103 |
-
* Recaches the private and hidden forums
|
2104 |
-
*
|
2105 |
-
* @since 2.2.0 bbPress (r4104)
|
2106 |
-
*
|
2107 |
-
* @uses bbp_repair_forum_visibility() To update private and hidden forum ids
|
2108 |
-
* @return array An array of the status code and the message
|
2109 |
-
*/
|
2110 |
-
function bbp_admin_repair_forum_visibility() {
|
2111 |
-
$statement = __( 'Recalculating forum visibility … %s', 'bbpress' );
|
2112 |
-
|
2113 |
-
// Bail if queries returned errors
|
2114 |
-
if ( ! bbp_repair_forum_visibility() ) {
|
2115 |
-
return array( 2, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
2116 |
-
|
2117 |
-
// Complete results
|
2118 |
-
} else {
|
2119 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
2120 |
-
}
|
2121 |
-
}
|
2122 |
-
|
2123 |
-
/**
|
2124 |
-
* Recaches the parent forum meta for each topic and reply
|
2125 |
-
*
|
2126 |
-
* @since 2.1.0 bbPress (r3876)
|
2127 |
-
*
|
2128 |
-
* @uses wpdb::query() To run our recount sql queries
|
2129 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
2130 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
2131 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
2132 |
-
* @return array An array of the status code and the message
|
2133 |
-
*/
|
2134 |
-
function bbp_admin_repair_forum_meta() {
|
2135 |
-
|
2136 |
-
// Define variables
|
2137 |
-
$bbp_db = bbp_db();
|
2138 |
-
$statement = __( 'Recalculating the forum for each post … %s', 'bbpress' );
|
2139 |
-
$result = __( 'Failed!', 'bbpress' );
|
2140 |
-
|
2141 |
-
// First, delete everything.
|
2142 |
-
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_forum_id'" ) ) ) {
|
2143 |
-
return array( 1, sprintf( $statement, $result ) );
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
// Post types and status
|
2147 |
-
$tpt = bbp_get_topic_post_type();
|
2148 |
-
$rpt = bbp_get_reply_post_type();
|
2149 |
-
|
2150 |
-
// Next, give all the topics their parent forum id.
|
2151 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
2152 |
-
( SELECT `topic`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
|
2153 |
-
FROM `$bbp_db->posts`
|
2154 |
-
AS `topic`
|
2155 |
-
WHERE `topic`.`post_type` = '{$tpt}'
|
2156 |
-
GROUP BY `topic`.`ID` )" ) ) ) {
|
2157 |
-
return array( 2, sprintf( $statement, $result ) );
|
2158 |
-
}
|
2159 |
-
|
2160 |
-
// Next, give all the replies their parent forum id.
|
2161 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
2162 |
-
( SELECT `reply`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
|
2163 |
-
FROM `$bbp_db->posts`
|
2164 |
-
AS `reply`
|
2165 |
-
INNER JOIN `$bbp_db->posts`
|
2166 |
-
AS `topic`
|
2167 |
-
ON `reply`.`post_parent` = `topic`.`ID`
|
2168 |
-
WHERE `topic`.`post_type` = '{$tpt}'
|
2169 |
-
AND `reply`.`post_type` = '{$rpt}'
|
2170 |
-
GROUP BY `reply`.`ID` )" ) ) ) {
|
2171 |
-
return array( 3, sprintf( $statement, $result ) );
|
2172 |
-
}
|
2173 |
-
|
2174 |
-
// Complete results
|
2175 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
2176 |
-
}
|
2177 |
-
|
2178 |
-
/**
|
2179 |
-
* Recaches the topic for each post
|
2180 |
-
*
|
2181 |
-
* @since 2.1.0 bbPress (r3876)
|
2182 |
-
*
|
2183 |
-
* @uses wpdb::query() To run our recount sql queries
|
2184 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
2185 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
2186 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
2187 |
-
* @return array An array of the status code and the message
|
2188 |
-
*/
|
2189 |
-
function bbp_admin_repair_topic_meta() {
|
2190 |
-
|
2191 |
-
// Define variables
|
2192 |
-
$bbp_db = bbp_db();
|
2193 |
-
$statement = __( 'Recalculating the topic for each post … %s', 'bbpress' );
|
2194 |
-
$result = __( 'Failed!', 'bbpress' );
|
2195 |
-
|
2196 |
-
// First, delete everything.
|
2197 |
-
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_topic_id'" ) ) ) {
|
2198 |
-
return array( 1, sprintf( $statement, $result ) );
|
2199 |
-
}
|
2200 |
-
|
2201 |
-
// Post types and status
|
2202 |
-
$tpt = bbp_get_topic_post_type();
|
2203 |
-
$rpt = bbp_get_reply_post_type();
|
2204 |
-
|
2205 |
-
// Next, give all the topics with replies the ID their last reply.
|
2206 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
2207 |
-
( SELECT `topic`.`ID`, '_bbp_topic_id', `topic`.`ID`
|
2208 |
-
FROM `$bbp_db->posts`
|
2209 |
-
AS `topic`
|
2210 |
-
WHERE `topic`.`post_type` = '{$tpt}'
|
2211 |
-
GROUP BY `topic`.`ID` )" ) ) ) {
|
2212 |
-
return array( 3, sprintf( $statement, $result ) );
|
2213 |
-
}
|
2214 |
-
|
2215 |
-
// Next, give all the topics with replies the ID their last reply.
|
2216 |
-
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
2217 |
-
( SELECT `reply`.`ID`, '_bbp_topic_id', `topic`.`ID`
|
2218 |
-
FROM `$bbp_db->posts`
|
2219 |
-
AS `reply`
|
2220 |
-
INNER JOIN `$bbp_db->posts`
|
2221 |
-
AS `topic`
|
2222 |
-
ON `reply`.`post_parent` = `topic`.`ID`
|
2223 |
-
WHERE `topic`.`post_type` = '{$tpt}'
|
2224 |
-
AND `reply`.`post_type` = '{$rpt}'
|
2225 |
-
GROUP BY `reply`.`ID` )" ) ) ) {
|
2226 |
-
return array( 4, sprintf( $statement, $result ) );
|
2227 |
-
}
|
2228 |
-
|
2229 |
-
// Complete results
|
2230 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
2231 |
-
}
|
2232 |
-
|
2233 |
-
/**
|
2234 |
-
* Recalculate reply menu order
|
2235 |
-
*
|
2236 |
-
* @since 2.5.4 bbPress (r5367)
|
2237 |
-
*
|
2238 |
-
* @uses wpdb::query() To run our recount sql queries
|
2239 |
-
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
2240 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
2241 |
-
* @uses bbp_update_reply_position() To update the reply position
|
2242 |
-
* @return array An array of the status code and the message
|
2243 |
-
*/
|
2244 |
-
function bbp_admin_repair_reply_menu_order() {
|
2245 |
-
|
2246 |
-
// Define variables
|
2247 |
-
$bbp_db = bbp_db();
|
2248 |
-
$statement = __( 'Recalculating reply menu order … %s', 'bbpress' );
|
2249 |
-
$result = __( 'No reply positions to recalculate.', 'bbpress' );
|
2250 |
-
|
2251 |
-
// Delete cases where `_bbp_reply_to` was accidentally set to itself
|
2252 |
-
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_reply_to' AND `post_id` = `meta_value`" ) ) ) {
|
2253 |
-
return array( 1, sprintf( $statement, $result ) );
|
2254 |
-
}
|
2255 |
-
|
2256 |
-
// Post type
|
2257 |
-
$rpt = bbp_get_reply_post_type();
|
2258 |
-
|
2259 |
-
// Get an array of reply id's to update the menu oder for each reply
|
2260 |
-
$replies = $bbp_db->get_results( "SELECT `a`.`ID` FROM `{$bbp_db->posts}` AS `a`
|
2261 |
-
INNER JOIN (
|
2262 |
-
SELECT `menu_order`, `post_parent`
|
2263 |
-
FROM `{$bbp_db->posts}`
|
2264 |
-
GROUP BY `menu_order`, `post_parent`
|
2265 |
-
HAVING COUNT( * ) >1
|
2266 |
-
)`b`
|
2267 |
-
ON `a`.`menu_order` = `b`.`menu_order`
|
2268 |
-
AND `a`.`post_parent` = `b`.`post_parent`
|
2269 |
-
WHERE `post_type` = '{$rpt}'", OBJECT_K );
|
2270 |
-
|
2271 |
-
// Bail if no replies returned
|
2272 |
-
if ( empty( $replies ) ) {
|
2273 |
-
return array( 1, sprintf( $statement, $result ) );
|
2274 |
-
}
|
2275 |
-
|
2276 |
-
// Recalculate the menu order position for each reply
|
2277 |
-
foreach ( $replies as $reply ) {
|
2278 |
-
bbp_update_reply_position( $reply->ID );
|
2279 |
-
}
|
2280 |
-
|
2281 |
-
// Cleanup
|
2282 |
-
unset( $replies, $reply );
|
2283 |
-
|
2284 |
-
// Flush the cache; things are about to get ugly.
|
2285 |
-
wp_cache_flush();
|
2286 |
-
|
2287 |
-
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
2288 |
-
}
|
2289 |
-
|
2290 |
-
/**
|
2291 |
-
* Upgrade user favorites for bbPress 2.6 and higher
|
2292 |
-
*
|
2293 |
-
* @since 2.6.0 bbPress (r6174)
|
2294 |
-
*
|
2295 |
-
* @return array An array of the status code and the message
|
2296 |
-
*/
|
2297 |
-
function bbp_admin_upgrade_user_favorites() {
|
2298 |
-
|
2299 |
-
// Define variables
|
2300 |
-
$bbp_db = bbp_db();
|
2301 |
-
$statement = __( 'Upgrading user favorites … %s', 'bbpress' );
|
2302 |
-
$result = __( 'No favorites to upgrade.', 'bbpress' );
|
2303 |
-
$changed = $total = 0;
|
2304 |
-
$key = $bbp_db->prefix . '_bbp_favorites';
|
2305 |
-
$favorites = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s", $key ) );
|
2306 |
-
|
2307 |
-
// Bail if no closed topics found
|
2308 |
-
if ( empty( $favorites ) || is_wp_error( $favorites ) ) {
|
2309 |
-
return array( 1, sprintf( $statement, $result ) );
|
2310 |
-
}
|
2311 |
-
|
2312 |
-
// Loop through each user's favorites
|
2313 |
-
foreach ( $favorites as $meta ) {
|
2314 |
-
|
2315 |
-
// Get post IDs
|
2316 |
-
$post_ids = explode( ',', $meta->meta_value );
|
2317 |
-
$to_change = count( $post_ids );
|
2318 |
-
$changed = 0;
|
2319 |
-
|
2320 |
-
// Add user ID to all favorited posts
|
2321 |
-
foreach ( $post_ids as $post_id ) {
|
2322 |
-
|
2323 |
-
// Skip if already exists
|
2324 |
-
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, '_bbp_favorite', $meta->user_id ) ) ) {
|
2325 |
-
continue;
|
2326 |
-
}
|
2327 |
-
|
2328 |
-
// Add the post meta
|
2329 |
-
$added = add_post_meta( $post_id, '_bbp_favorite', $meta->user_id, false );
|
2330 |
-
|
2331 |
-
// Bump counts if successfully added
|
2332 |
-
if ( ! empty( $added ) ) {
|
2333 |
-
++$changed;
|
2334 |
-
++$total;
|
2335 |
-
}
|
2336 |
-
}
|
2337 |
-
|
2338 |
-
// Delete user meta if everything was copied successfully
|
2339 |
-
if ( $changed === $to_change ) {
|
2340 |
-
//delete_metadata_by_mid( 'user', $meta->umeta_id );
|
2341 |
-
}
|
2342 |
-
}
|
2343 |
-
|
2344 |
-
// Cleanup
|
2345 |
-
unset( $favorites, $added, $post_ids );
|
2346 |
-
|
2347 |
-
// Complete results
|
2348 |
-
$result = sprintf( _n( 'Complete! %d favorite upgraded.', 'Complete! %d favorites upgraded.', $total, 'bbpress' ), $total );
|
2349 |
-
|
2350 |
-
return array( 0, sprintf( $statement, $result ) );
|
2351 |
-
}
|
2352 |
-
|
2353 |
-
/**
|
2354 |
-
* Upgrade user topic subscriptions for bbPress 2.6 and higher
|
2355 |
-
*
|
2356 |
-
* @since 2.6.0 bbPress (r6174)
|
2357 |
-
*
|
2358 |
-
* @return array An array of the status code and the message
|
2359 |
-
*/
|
2360 |
-
function bbp_admin_upgrade_user_topic_subscriptions() {
|
2361 |
-
|
2362 |
-
// Define variables
|
2363 |
-
$bbp_db = bbp_db();
|
2364 |
-
$statement = __( 'Upgrading user topic subscriptions … %s', 'bbpress' );
|
2365 |
-
$result = __( 'No topic subscriptions to upgrade.', 'bbpress' );
|
2366 |
-
$changed = $total = 0;
|
2367 |
-
$key = $bbp_db->prefix . '_bbp_subscriptions';
|
2368 |
-
$subscriptions = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
2369 |
-
|
2370 |
-
// Bail if no topic subscriptions found
|
2371 |
-
if ( empty( $subscriptions ) || is_wp_error( $subscriptions ) ) {
|
2372 |
-
return array( 1, sprintf( $statement, $result ) );
|
2373 |
-
}
|
2374 |
-
|
2375 |
-
// Loop through each user's topic subscriptions
|
2376 |
-
foreach ( $subscriptions as $meta ) {
|
2377 |
-
|
2378 |
-
// Get post IDs
|
2379 |
-
$post_ids = explode( ',', $meta->meta_value );
|
2380 |
-
$to_change = count( $post_ids );
|
2381 |
-
$changed = 0;
|
2382 |
-
|
2383 |
-
// Add user ID to all subscribed topics
|
2384 |
-
foreach ( $post_ids as $post_id ) {
|
2385 |
-
|
2386 |
-
// Skip if already exists
|
2387 |
-
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, '_bbp_subscription', $meta->user_id ) ) ) {
|
2388 |
-
continue;
|
2389 |
-
}
|
2390 |
-
|
2391 |
-
// Add the post meta
|
2392 |
-
$added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false );
|
2393 |
-
|
2394 |
-
// Bump counts if successfully added
|
2395 |
-
if ( ! empty( $added ) ) {
|
2396 |
-
++$changed;
|
2397 |
-
++$total;
|
2398 |
-
}
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
// Delete user meta if everything was copied successfully
|
2402 |
-
if ( $changed === $to_change ) {
|
2403 |
-
//delete_metadata_by_mid( 'user', $meta->umeta_id );
|
2404 |
-
}
|
2405 |
-
}
|
2406 |
-
|
2407 |
-
// Cleanup
|
2408 |
-
unset( $subscriptions, $added, $post_ids );
|
2409 |
-
|
2410 |
-
// Complete results
|
2411 |
-
$result = sprintf( _n( 'Complete! %d topic subscription upgraded.', 'Complete! %d topic subscriptions upgraded.', $total, 'bbpress' ), $total );
|
2412 |
-
|
2413 |
-
return array( 0, sprintf( $statement, $result ) );
|
2414 |
-
}
|
2415 |
-
|
2416 |
-
/**
|
2417 |
-
* Upgrade user forum subscriptions for bbPress 2.6 and higher
|
2418 |
-
*
|
2419 |
-
* @since 2.6.0 bbPress (r6193)
|
2420 |
-
*
|
2421 |
-
* @return array An array of the status code and the message
|
2422 |
-
*/
|
2423 |
-
function bbp_admin_upgrade_user_forum_subscriptions() {
|
2424 |
-
|
2425 |
-
// Define variables
|
2426 |
-
$bbp_db = bbp_db();
|
2427 |
-
$statement = __( 'Upgrading user forum subscriptions … %s', 'bbpress' );
|
2428 |
-
$result = __( 'No forum subscriptions to upgrade.', 'bbpress' );
|
2429 |
-
$changed = $total = 0;
|
2430 |
-
$key = $bbp_db->prefix . '_bbp_forum_subscriptions';
|
2431 |
-
$subscriptions = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
2432 |
-
|
2433 |
-
// Bail if no forum subscriptions found
|
2434 |
-
if ( empty( $subscriptions ) || is_wp_error( $subscriptions ) ) {
|
2435 |
-
return array( 1, sprintf( $statement, $result ) );
|
2436 |
-
}
|
2437 |
-
|
2438 |
-
// Loop through each user's forum subscriptions
|
2439 |
-
foreach ( $subscriptions as $meta ) {
|
2440 |
-
|
2441 |
-
// Get post IDs
|
2442 |
-
$post_ids = explode( ',', $meta->meta_value );
|
2443 |
-
$to_change = count( $post_ids );
|
2444 |
-
$changed = 0;
|
2445 |
-
|
2446 |
-
// Add user ID to all subscribed forums
|
2447 |
-
foreach ( $post_ids as $post_id ) {
|
2448 |
-
|
2449 |
-
// Skip if already exists
|
2450 |
-
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, '_bbp_forum_subscription', $meta->user_id ) ) ) {
|
2451 |
-
continue;
|
2452 |
-
}
|
2453 |
-
|
2454 |
-
// Add the post meta
|
2455 |
-
$added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false );
|
2456 |
-
|
2457 |
-
// Bump counts if successfully added
|
2458 |
-
if ( ! empty( $added ) ) {
|
2459 |
-
++$changed;
|
2460 |
-
++$total;
|
2461 |
-
}
|
2462 |
-
}
|
2463 |
-
|
2464 |
-
// Delete user meta if everything was copied successfully
|
2465 |
-
if ( $changed === $to_change ) {
|
2466 |
-
//delete_metadata_by_mid( 'user', $meta->umeta_id );
|
2467 |
-
}
|
2468 |
-
}
|
2469 |
-
|
2470 |
-
// Cleanup
|
2471 |
-
unset( $subscriptions, $added, $post_ids );
|
2472 |
-
|
2473 |
-
// Complete results
|
2474 |
-
$result = sprintf( _n( 'Complete! %d forum subscription upgraded.', 'Complete! %d forum subscriptions upgraded.', $total, 'bbpress' ), $total );
|
2475 |
-
|
2476 |
-
return array( 0, sprintf( $statement, $result ) );
|
2477 |
-
}
|
2478 |
-
|
2479 |
-
/** Reset ********************************************************************/
|
2480 |
-
|
2481 |
-
/**
|
2482 |
-
* Admin reset page
|
2483 |
-
*
|
2484 |
-
* @since 2.0.0 bbPress (r2613)
|
2485 |
-
*
|
2486 |
-
* @uses check_admin_referer() To verify the nonce and the referer
|
2487 |
-
* @uses do_action() Calls 'admin_notices' to display the notices
|
2488 |
-
* @uses wp_nonce_field() To add a hidden nonce field
|
2489 |
-
*/
|
2490 |
-
function bbp_admin_reset() {
|
2491 |
-
?>
|
2492 |
-
|
2493 |
-
<div class="wrap">
|
2494 |
-
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
2495 |
-
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Reset Forums', 'bbpress' ) ); ?></h2>
|
2496 |
-
<p><?php esc_html_e( 'Revert your forums back to a brand new installation. This process cannot be undone.', 'bbpress' ); ?></p>
|
2497 |
-
<p><strong><?php esc_html_e( 'Backup your database before proceeding.', 'bbpress' ); ?></strong></p>
|
2498 |
-
|
2499 |
-
<form class="settings" method="post" action="">
|
2500 |
-
<table class="form-table">
|
2501 |
-
<tbody>
|
2502 |
-
<tr valign="top">
|
2503 |
-
<th scope="row"><?php esc_html_e( 'The following data will be removed:', 'bbpress' ) ?></th>
|
2504 |
-
<td>
|
2505 |
-
<?php esc_html_e( 'All Forums', 'bbpress' ); ?><br />
|
2506 |
-
<?php esc_html_e( 'All Topics', 'bbpress' ); ?><br />
|
2507 |
-
<?php esc_html_e( 'All Replies', 'bbpress' ); ?><br />
|
2508 |
-
<?php esc_html_e( 'All Topic Tags', 'bbpress' ); ?><br />
|
2509 |
-
<?php esc_html_e( 'Related Meta Data', 'bbpress' ); ?><br />
|
2510 |
-
<?php esc_html_e( 'Forum Settings', 'bbpress' ); ?><br />
|
2511 |
-
<?php esc_html_e( 'Forum Activity', 'bbpress' ); ?><br />
|
2512 |
-
<?php esc_html_e( 'Forum User Roles', 'bbpress' ); ?><br />
|
2513 |
-
<?php esc_html_e( 'Forum Moderators', 'bbpress' ); ?><br />
|
2514 |
-
<?php esc_html_e( 'Importer Helper Data', 'bbpress' ); ?><br />
|
2515 |
-
</td>
|
2516 |
-
</tr>
|
2517 |
-
<tr valign="top">
|
2518 |
-
<th scope="row"><?php esc_html_e( 'Delete imported users?', 'bbpress' ); ?></th>
|
2519 |
-
<td>
|
2520 |
-
<fieldset>
|
2521 |
-
<legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ); ?></span></legend>
|
2522 |
-
<label><input type="checkbox" class="checkbox" name="bbpress-delete-imported-users" id="bbpress-delete-imported-users" value="1" /> <?php esc_html_e( 'This option will delete all previously imported users, and cannot be undone.', 'bbpress' ); ?></label>
|
2523 |
-
<p class="description"><?php esc_html_e( 'Note: Resetting without this checked will delete the meta-data necessary to delete these users.', 'bbpress' ); ?></p>
|
2524 |
-
</fieldset>
|
2525 |
-
</td>
|
2526 |
-
</tr>
|
2527 |
-
<tr valign="top">
|
2528 |
-
<th scope="row"><?php esc_html_e( 'Do you really want to do this?', 'bbpress' ); ?></th>
|
2529 |
-
<td>
|
2530 |
-
<fieldset>
|
2531 |
-
<legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ); ?></span></legend>
|
2532 |
-
<label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></label>
|
2533 |
-
</fieldset>
|
2534 |
-
</td>
|
2535 |
-
</tr>
|
2536 |
-
</tbody>
|
2537 |
-
</table>
|
2538 |
-
|
2539 |
-
<fieldset class="submit">
|
2540 |
-
<input class="button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Reset bbPress', 'bbpress' ); ?>" />
|
2541 |
-
<?php wp_nonce_field( 'bbpress-reset' ); ?>
|
2542 |
-
</fieldset>
|
2543 |
-
</form>
|
2544 |
-
</div>
|
2545 |
-
|
2546 |
-
<?php
|
2547 |
-
}
|
2548 |
-
|
2549 |
-
/**
|
2550 |
-
* Handle the processing and feedback of the admin tools page
|
2551 |
-
*
|
2552 |
-
* @since 2.0.0 bbPress (r2613)
|
2553 |
-
*
|
2554 |
-
* @uses check_admin_referer() To verify the nonce and the referer
|
2555 |
-
* @uses wp_cache_flush() To flush the cache
|
2556 |
-
* @uses bbp_get_forum_post_type() To get the forum post type
|
2557 |
-
* @uses bbp_get_topic_post_type() To get the topic post type
|
2558 |
-
* @uses bbp_get_reply_post_type() To get the reply post type
|
2559 |
-
*/
|
2560 |
-
function bbp_admin_reset_handler() {
|
2561 |
-
|
2562 |
-
// Bail if not resetting
|
2563 |
-
if ( ! bbp_is_post_request() || empty( $_POST['bbpress-are-you-sure'] ) ) {
|
2564 |
-
return;
|
2565 |
-
}
|
2566 |
-
|
2567 |
-
// Only keymasters can proceed
|
2568 |
-
if ( ! bbp_is_user_keymaster() ) {
|
2569 |
-
return;
|
2570 |
-
}
|
2571 |
-
|
2572 |
-
check_admin_referer( 'bbpress-reset' );
|
2573 |
-
|
2574 |
-
// Stores messages
|
2575 |
-
$messages = array();
|
2576 |
-
$failed = __( 'Failed!', 'bbpress' );
|
2577 |
-
$success = __( 'Success!', 'bbpress' );
|
2578 |
-
|
2579 |
-
// Flush the cache; things are about to get ugly.
|
2580 |
-
wp_cache_flush();
|
2581 |
-
|
2582 |
-
/** Posts *****************************************************************/
|
2583 |
-
|
2584 |
-
// Post types and status
|
2585 |
-
$fpt = bbp_get_forum_post_type();
|
2586 |
-
$tpt = bbp_get_topic_post_type();
|
2587 |
-
$rpt = bbp_get_reply_post_type();
|
2588 |
-
|
2589 |
-
// Define variables
|
2590 |
-
$bbp_db = bbp_db();
|
2591 |
-
$statement = __( 'Deleting Posts… %s', 'bbpress' );
|
2592 |
-
|
2593 |
-
$sql_posts = $bbp_db->get_results( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` IN ('{$fpt}', '{$tpt}', '{$rpt}')", OBJECT_K );
|
2594 |
-
$sql_delete = "DELETE FROM `{$bbp_db->posts}` WHERE `post_type` IN ('{$fpt}', '{$tpt}', '{$rpt}')";
|
2595 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2596 |
-
$messages[] = sprintf( $statement, $result );
|
2597 |
-
|
2598 |
-
/** Post Meta *************************************************************/
|
2599 |
-
|
2600 |
-
if ( ! empty( $sql_posts ) ) {
|
2601 |
-
$sql_meta = array();
|
2602 |
-
foreach ( $sql_posts as $key => $value ) {
|
2603 |
-
$sql_meta[] = $key;
|
2604 |
-
}
|
2605 |
-
$statement = __( 'Deleting Post Meta… %s', 'bbpress' );
|
2606 |
-
$sql_meta = implode( "', '", $sql_meta );
|
2607 |
-
$sql_delete = "DELETE FROM `{$bbp_db->postmeta}` WHERE `post_id` IN ('{$sql_meta}')";
|
2608 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2609 |
-
$messages[] = sprintf( $statement, $result );
|
2610 |
-
}
|
2611 |
-
|
2612 |
-
/** Post Revisions ********************************************************/
|
2613 |
-
|
2614 |
-
if ( ! empty( $sql_posts ) ) {
|
2615 |
-
$sql_meta = array();
|
2616 |
-
foreach ( $sql_posts as $key => $value ) {
|
2617 |
-
$sql_meta[] = $key;
|
2618 |
-
}
|
2619 |
-
$statement = __( 'Deleting Post Revisions… %s', 'bbpress' );
|
2620 |
-
$sql_meta = implode( "', '", $sql_meta );
|
2621 |
-
$sql_delete = "DELETE FROM `{$bbp_db->posts}` WHERE `post_parent` IN ('{$sql_meta}') AND `post_type` = 'revision'";
|
2622 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2623 |
-
$messages[] = sprintf( $statement, $result );
|
2624 |
-
}
|
2625 |
-
|
2626 |
-
/** Forum moderators ******************************************************/
|
2627 |
-
|
2628 |
-
$statement = __( 'Deleting Forum Moderators… %s', 'bbpress' );
|
2629 |
-
$sql_delete = "DELETE a,b,c FROM `{$bbp_db->terms}` AS a LEFT JOIN `{$bbp_db->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$bbp_db->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'forum-mod'";
|
2630 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2631 |
-
$messages[] = sprintf( $statement, $result );
|
2632 |
-
|
2633 |
-
/** Topic Tags ************************************************************/
|
2634 |
-
|
2635 |
-
$statement = __( 'Deleting Topic Tags… %s', 'bbpress' );
|
2636 |
-
$sql_delete = "DELETE a,b,c FROM `{$bbp_db->terms}` AS a LEFT JOIN `{$bbp_db->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$bbp_db->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'topic-tag'";
|
2637 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2638 |
-
$messages[] = sprintf( $statement, $result );
|
2639 |
-
|
2640 |
-
/** User ******************************************************************/
|
2641 |
-
|
2642 |
-
// First, if we're deleting previously imported users, delete them now
|
2643 |
-
if ( ! empty( $_POST['bbpress-delete-imported-users'] ) ) {
|
2644 |
-
$sql_users = $bbp_db->get_results( "SELECT `user_id` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '_bbp_old_user_id'", OBJECT_K );
|
2645 |
-
if ( ! empty( $sql_users ) ) {
|
2646 |
-
$sql_meta = array();
|
2647 |
-
foreach ( $sql_users as $key => $value ) {
|
2648 |
-
$sql_meta[] = $key;
|
2649 |
-
}
|
2650 |
-
$statement = __( 'Deleting Imported Users… %s', 'bbpress' );
|
2651 |
-
$sql_meta = implode( "', '", $sql_meta );
|
2652 |
-
$sql_delete = "DELETE FROM `{$bbp_db->users}` WHERE `ID` IN ('{$sql_meta}')";
|
2653 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2654 |
-
$messages[] = sprintf( $statement, $result );
|
2655 |
-
$statement = __( 'Deleting Imported User Meta… %s', 'bbpress' );
|
2656 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `user_id` IN ('{$sql_meta}')";
|
2657 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2658 |
-
$messages[] = sprintf( $statement, $result );
|
2659 |
-
}
|
2660 |
-
}
|
2661 |
-
|
2662 |
-
// Next, if we still have users that were not imported delete that meta data
|
2663 |
-
$statement = __( 'Deleting User Meta… %s', 'bbpress' );
|
2664 |
-
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` LIKE '%%_bbp_%%'";
|
2665 |
-
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
2666 |
-
$messages[] = sprintf( $statement, $result );
|
2667 |
-
|
2668 |
-
/** Converter *************************************************************/
|
2669 |
-
|
2670 |
-
$statement = __( 'Deleting Conversion Table… %s', 'bbpress' );
|
2671 |
-
$table_name = $bbp_db->prefix . 'bbp_converter_translator';
|
2672 |
-
if ( $bbp_db->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) {
|
2673 |
-
$bbp_db->query( "DROP TABLE {$table_name}" );
|
2674 |
-
$result = $success;
|
2675 |
-
} else {
|
2676 |
-
$result = $failed;
|
2677 |
-
}
|
2678 |
-
$messages[] = sprintf( $statement, $result );
|
2679 |
-
|
2680 |
-
/** Options ***************************************************************/
|
2681 |
-
|
2682 |
-
$statement = __( 'Deleting Settings… %s', 'bbpress' );
|
2683 |
-
bbp_delete_options();
|
2684 |
-
$messages[] = sprintf( $statement, $success );
|
2685 |
-
|
2686 |
-
/** Roles *****************************************************************/
|
2687 |
-
|
2688 |
-
$statement = __( 'Deleting Roles and Capabilities… %s', 'bbpress' );
|
2689 |
-
bbp_remove_roles();
|
2690 |
-
bbp_remove_caps();
|
2691 |
-
$messages[] = sprintf( $statement, $success );
|
2692 |
-
|
2693 |
-
/** Output ****************************************************************/
|
2694 |
-
|
2695 |
-
if ( count( $messages ) ) {
|
2696 |
-
foreach ( $messages as $message ) {
|
2697 |
-
bbp_admin_tools_feedback( $message );
|
2698 |
-
}
|
2699 |
-
}
|
2700 |
}
|
10 |
// Exit if accessed directly
|
11 |
defined( 'ABSPATH' ) || exit;
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
+
* Output a bbPress specific tools box
|
|
|
|
|
15 |
*
|
16 |
+
* @since 2.6.0 bbPress (r6273)
|
|
|
|
|
|
|
17 |
*/
|
18 |
+
function bbp_admin_tools_box() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
// Bail if user cannot access tools page
|
21 |
+
if ( ! current_user_can( 'bbp_tools_page' ) ) {
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
+
// Get the tools pages
|
26 |
+
$links = array();
|
27 |
+
$tools = bbp_get_tools_admin_pages(); ?>
|
28 |
|
29 |
+
<div class="card">
|
30 |
+
<h3 class="title"><?php _e( 'Forums', 'bbpress' ) ?></h3>
|
31 |
+
<p><?php esc_html_e( 'bbPress provides the following tools to help you manage your forums:', 'bbpress' ); ?></p>
|
32 |
|
33 |
+
<?php
|
|
|
34 |
|
35 |
+
// Loop through tools and create links
|
36 |
+
foreach ( $tools as $tool ) {
|
37 |
|
38 |
+
// Skip if user cannot see this page
|
39 |
+
if ( ! current_user_can( $tool['cap'] ) ) {
|
40 |
+
continue;
|
|
|
|
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
// Add link to array
|
44 |
+
$links[] = sprintf( '<a href="%s">%s</a>', get_admin_url( '', add_query_arg( array( 'page' => $tool['page'] ), 'tools.php' ) ), $tool['name'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
+
// Output links
|
48 |
+
echo '<p class="bbp-tools-links">' . implode( ' · ', $links ) . '</p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
?></div>
|
|
|
|
|
51 |
|
52 |
+
<?php
|
53 |
}
|
54 |
|
55 |
/**
|
65 |
// Parse arguments
|
66 |
$r = bbp_parse_args( $args, array(
|
67 |
'id' => '',
|
68 |
+
'type' => '',
|
69 |
'description' => '',
|
70 |
'callback' => '',
|
71 |
'priority' => 0,
|
84 |
|
85 |
// Add tool to the registered tools array
|
86 |
bbpress()->admin->tools[ $r['id'] ] = array(
|
87 |
+
'type' => $r['type'],
|
88 |
'description' => $r['description'],
|
89 |
'priority' => $r['priority'],
|
90 |
'callback' => $r['callback'],
|
107 |
// Topic meta
|
108 |
bbp_register_repair_tool( array(
|
109 |
'id' => 'bbp-sync-topic-meta',
|
110 |
+
'type' => 'repair',
|
111 |
'description' => __( 'Recalculate parent topic for each reply', 'bbpress' ),
|
112 |
'callback' => 'bbp_admin_repair_topic_meta',
|
113 |
'priority' => 5,
|
118 |
// Forum meta
|
119 |
bbp_register_repair_tool( array(
|
120 |
'id' => 'bbp-sync-forum-meta',
|
121 |
+
'type' => 'repair',
|
122 |
'description' => __( 'Recalculate parent forum for each topic and reply', 'bbpress' ),
|
123 |
'callback' => 'bbp_admin_repair_forum_meta',
|
124 |
'priority' => 10,
|
129 |
// Forum visibility
|
130 |
bbp_register_repair_tool( array(
|
131 |
'id' => 'bbp-sync-forum-visibility',
|
132 |
+
'type' => 'repair',
|
133 |
'description' => __( 'Recalculate private and hidden forums', 'bbpress' ),
|
134 |
'callback' => 'bbp_admin_repair_forum_visibility',
|
135 |
'priority' => 15,
|
140 |
// Sync all topics in all forums
|
141 |
bbp_register_repair_tool( array(
|
142 |
'id' => 'bbp-sync-all-topics-forums',
|
143 |
+
'type' => 'repair',
|
144 |
'description' => __( 'Recalculate last activity in each topic and forum', 'bbpress' ),
|
145 |
'callback' => 'bbp_admin_repair_freshness',
|
146 |
'priority' => 20,
|
151 |
// Sync all sticky topics in all forums
|
152 |
bbp_register_repair_tool( array(
|
153 |
'id' => 'bbp-sync-all-topics-sticky',
|
154 |
+
'type' => 'repair',
|
155 |
'description' => __( 'Recalculate sticky relationship of each topic', 'bbpress' ),
|
156 |
'callback' => 'bbp_admin_repair_sticky',
|
157 |
'priority' => 25,
|
162 |
// Sync all hierarchical reply positions
|
163 |
bbp_register_repair_tool( array(
|
164 |
'id' => 'bbp-sync-all-reply-positions',
|
165 |
+
'type' => 'repair',
|
166 |
'description' => __( 'Recalculate the position of each reply', 'bbpress' ),
|
167 |
'callback' => 'bbp_admin_repair_reply_menu_order',
|
168 |
'priority' => 30,
|
170 |
'components' => array( bbp_get_reply_post_type() )
|
171 |
) );
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
// Update closed topic counts
|
174 |
bbp_register_repair_tool( array(
|
175 |
'id' => 'bbp-sync-closed-topics',
|
176 |
+
'type' => 'repair',
|
177 |
'description' => __( 'Repair closed topics', 'bbpress' ),
|
178 |
'callback' => 'bbp_admin_repair_closed_topics',
|
179 |
+
'priority' => 35,
|
180 |
'overhead' => 'medium',
|
181 |
'components' => array( bbp_get_topic_post_type() )
|
182 |
) );
|
184 |
// Count topics
|
185 |
bbp_register_repair_tool( array(
|
186 |
'id' => 'bbp-forum-topics',
|
187 |
+
'type' => 'repair',
|
188 |
'description' => __( 'Recount topics in each forum', 'bbpress' ),
|
189 |
'callback' => 'bbp_admin_repair_forum_topic_count',
|
190 |
+
'priority' => 40,
|
191 |
'overhead' => 'medium',
|
192 |
'components' => array( bbp_get_forum_post_type(), bbp_get_topic_post_type() )
|
193 |
) );
|
195 |
// Count topic tags
|
196 |
bbp_register_repair_tool( array(
|
197 |
'id' => 'bbp-topic-tags',
|
198 |
+
'type' => 'repair',
|
199 |
'description' => __( 'Recount topics in each topic-tag', 'bbpress' ),
|
200 |
'callback' => 'bbp_admin_repair_topic_tag_count',
|
201 |
+
'priority' => 45,
|
202 |
'overhead' => 'medium',
|
203 |
'components' => array( bbp_get_topic_post_type(), bbp_get_topic_tag_tax_id() )
|
204 |
) );
|
206 |
// Count forum replies
|
207 |
bbp_register_repair_tool( array(
|
208 |
'id' => 'bbp-forum-replies',
|
209 |
+
'type' => 'repair',
|
210 |
'description' => __( 'Recount replies in each forum', 'bbpress' ),
|
211 |
'callback' => 'bbp_admin_repair_forum_reply_count',
|
212 |
+
'priority' => 50,
|
213 |
'overhead' => 'high',
|
214 |
'components' => array( bbp_get_forum_post_type(), bbp_get_reply_post_type() )
|
215 |
) );
|
217 |
// Count topic replies
|
218 |
bbp_register_repair_tool( array(
|
219 |
'id' => 'bbp-topic-replies',
|
220 |
+
'type' => 'repair',
|
221 |
'description' => __( 'Recount replies in each topic', 'bbpress' ),
|
222 |
'callback' => 'bbp_admin_repair_topic_reply_count',
|
223 |
+
'priority' => 55,
|
224 |
'overhead' => 'high',
|
225 |
'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
|
226 |
) );
|
227 |
|
228 |
+
// Count topic engagements
|
229 |
bbp_register_repair_tool( array(
|
230 |
+
'id' => 'bbp-topic-engagements',
|
231 |
+
'type' => 'repair',
|
232 |
+
'description' => __( 'Recount engagements in each topic', 'bbpress' ),
|
233 |
'callback' => 'bbp_admin_repair_topic_voice_count',
|
234 |
+
'priority' => 60,
|
235 |
+
'overhead' => 'high',
|
236 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
237 |
) );
|
238 |
|
239 |
// Count non-published replies to each topic
|
240 |
bbp_register_repair_tool( array(
|
241 |
'id' => 'bbp-topic-hidden-replies',
|
242 |
+
'type' => 'repair',
|
243 |
+
'description' => __( 'Recount pending, spammed, and trashed replies in each topic', 'bbpress' ),
|
244 |
'callback' => 'bbp_admin_repair_topic_hidden_reply_count',
|
245 |
+
'priority' => 65,
|
246 |
'overhead' => 'high',
|
247 |
'components' => array( bbp_get_topic_post_type(), bbp_get_reply_post_type() )
|
248 |
) );
|
250 |
// Recount topics for each user
|
251 |
bbp_register_repair_tool( array(
|
252 |
'id' => 'bbp-user-topics',
|
253 |
+
'type' => 'repair',
|
254 |
'description' => __( 'Recount topics for each user', 'bbpress' ),
|
255 |
'callback' => 'bbp_admin_repair_user_topic_count',
|
256 |
+
'priority' => 70,
|
257 |
'overhead' => 'medium',
|
258 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
259 |
) );
|
261 |
// Recount topics for each user
|
262 |
bbp_register_repair_tool( array(
|
263 |
'id' => 'bbp-user-replies',
|
264 |
+
'type' => 'repair',
|
265 |
'description' => __( 'Recount replies for each user', 'bbpress' ),
|
266 |
'callback' => 'bbp_admin_repair_user_reply_count',
|
267 |
+
'priority' => 75,
|
268 |
'overhead' => 'medium',
|
269 |
'components' => array( bbp_get_reply_post_type(), bbp_get_user_rewrite_id() )
|
270 |
) );
|
272 |
// Remove unpublished topics from user favorites
|
273 |
bbp_register_repair_tool( array(
|
274 |
'id' => 'bbp-user-favorites',
|
275 |
+
'type' => 'repair',
|
276 |
'description' => __( 'Remove unpublished topics from user favorites', 'bbpress' ),
|
277 |
'callback' => 'bbp_admin_repair_user_favorites',
|
278 |
+
'priority' => 80,
|
279 |
'overhead' => 'medium',
|
280 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
281 |
) );
|
283 |
// Remove unpublished topics from user subscriptions
|
284 |
bbp_register_repair_tool( array(
|
285 |
'id' => 'bbp-user-topic-subscriptions',
|
286 |
+
'type' => 'repair',
|
287 |
'description' => __( 'Remove unpublished topics from user subscriptions', 'bbpress' ),
|
288 |
'callback' => 'bbp_admin_repair_user_topic_subscriptions',
|
289 |
+
'priority' => 85,
|
290 |
'overhead' => 'medium',
|
291 |
'components' => array( bbp_get_topic_post_type(), bbp_get_user_rewrite_id() )
|
292 |
) );
|
294 |
// Remove unpublished forums from user subscriptions
|
295 |
bbp_register_repair_tool( array(
|
296 |
'id' => 'bbp-user-forum-subscriptions',
|
297 |
+
'type' => 'repair',
|
298 |
'description' => __( 'Remove unpublished forums from user subscriptions', 'bbpress' ),
|
299 |
'callback' => 'bbp_admin_repair_user_forum_subscriptions',
|
300 |
+
'priority' => 90,
|
301 |
'overhead' => 'medium',
|
302 |
'components' => array( bbp_get_forum_post_type(), bbp_get_user_rewrite_id() )
|
303 |
) );
|
305 |
// Remove unpublished forums from user subscriptions
|
306 |
bbp_register_repair_tool( array(
|
307 |
'id' => 'bbp-user-role-map',
|
308 |
+
'type' => 'repair',
|
309 |
'description' => __( 'Remap existing users to default forum roles', 'bbpress' ),
|
310 |
'callback' => 'bbp_admin_repair_user_roles',
|
311 |
+
'priority' => 95,
|
312 |
'overhead' => 'low',
|
313 |
'components' => array( bbp_get_user_rewrite_id() )
|
314 |
) );
|
316 |
// Migrate favorites from user-meta to post-meta
|
317 |
bbp_register_repair_tool( array(
|
318 |
'id' => 'bbp-user-favorites-move',
|
319 |
+
'type' => 'upgrade',
|
320 |
'description' => __( 'Upgrade user favorites', 'bbpress' ),
|
321 |
'callback' => 'bbp_admin_upgrade_user_favorites',
|
322 |
+
'priority' => 100,
|
323 |
'overhead' => 'high',
|
324 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
|
325 |
) );
|
326 |
|
327 |
// Migrate topic subscriptions from user-meta to post-meta
|
328 |
bbp_register_repair_tool( array(
|
329 |
'id' => 'bbp-user-topic-subscriptions-move',
|
330 |
+
'type' => 'upgrade',
|
331 |
'description' => __( 'Upgrade user topic subscriptions', 'bbpress' ),
|
332 |
'callback' => 'bbp_admin_upgrade_user_topic_subscriptions',
|
333 |
+
'priority' => 105,
|
334 |
'overhead' => 'high',
|
335 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
|
336 |
) );
|
337 |
|
338 |
// Migrate forum subscriptions from user-meta to post-meta
|
339 |
bbp_register_repair_tool( array(
|
340 |
'id' => 'bbp-user-forum-subscriptions-move',
|
341 |
+
'type' => 'upgrade',
|
342 |
'description' => __( 'Upgrade user forum subscriptions', 'bbpress' ),
|
343 |
'callback' => 'bbp_admin_upgrade_user_forum_subscriptions',
|
344 |
+
'priority' => 110,
|
345 |
'overhead' => 'high',
|
346 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
|
347 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
|
349 |
+
// Migrate topic engagements to post-meta
|
350 |
+
bbp_register_repair_tool( array(
|
351 |
+
'id' => 'bbp-user-topic-engagements-move',
|
352 |
+
'type' => 'upgrade',
|
353 |
+
'description' => __( 'Upgrade topic engagements', 'bbpress' ),
|
354 |
+
'callback' => 'bbp_admin_upgrade_user_engagements',
|
355 |
+
'priority' => 115,
|
356 |
+
'overhead' => 'medium',
|
357 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_engagements_rewrite_id() )
|
358 |
+
) );
|
359 |
|
360 |
+
// Sync all BuddyPress group forum relationships
|
361 |
+
bbp_register_repair_tool( array(
|
362 |
+
'id' => 'bbp-group-forums',
|
363 |
+
'type' => 'upgrade',
|
364 |
+
'description' => __( 'Upgrade BuddyPress Group Forum relationships', 'bbpress' ),
|
365 |
+
'callback' => 'bbp_admin_upgrade_group_forum_relationship',
|
366 |
+
'priority' => 120,
|
367 |
+
'overhead' => 'low',
|
368 |
+
'components' => array( bbp_get_forum_post_type() )
|
369 |
+
) );
|
370 |
|
371 |
+
// Remove favorites from user-meta
|
372 |
+
bbp_register_repair_tool( array(
|
373 |
+
'id' => 'bbp-user-favorites-delete',
|
374 |
+
'type' => 'upgrade',
|
375 |
+
'description' => __( 'Remove favorites from user-meta', 'bbpress' ),
|
376 |
+
'callback' => 'bbp_admin_upgrade_remove_favorites_from_usermeta',
|
377 |
+
'priority' => 125,
|
378 |
+
'overhead' => 'medium',
|
379 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
|
380 |
+
) );
|
381 |
|
382 |
+
// Remove topic subscriptions from user-meta
|
383 |
+
bbp_register_repair_tool( array(
|
384 |
+
'id' => 'bbp-user-topic-subscriptions-delete',
|
385 |
+
'type' => 'upgrade',
|
386 |
+
'description' => __( 'Remove topic subscriptions from user-meta', 'bbpress' ),
|
387 |
+
'callback' => 'bbp_admin_upgrade_remove_topic_subscriptions_from_usermeta',
|
388 |
+
'priority' => 130,
|
389 |
+
'overhead' => 'medium',
|
390 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
|
391 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
+
// Remove forum subscriptions from user-meta
|
394 |
+
bbp_register_repair_tool( array(
|
395 |
+
'id' => 'bbp-user-forum-subscriptions-delete',
|
396 |
+
'type' => 'upgrade',
|
397 |
+
'description' => __( 'Remove forum subscriptions from user-meta', 'bbpress' ),
|
398 |
+
'callback' => 'bbp_admin_upgrade_remove_forum_subscriptions_from_usermeta',
|
399 |
+
'priority' => 135,
|
400 |
+
'overhead' => 'medium',
|
401 |
+
'components' => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
|
402 |
+
) );
|
403 |
}
|
404 |
|
405 |
/**
|
406 |
+
* Output the tabs in the admin area
|
407 |
*
|
408 |
+
* @since 2.1.0 bbPress (r3872)
|
409 |
*
|
410 |
+
* @param string $active_tab Name of the tab that is active
|
|
|
411 |
*/
|
412 |
+
function bbp_tools_admin_tabs( $active_tab = '' ) {
|
413 |
+
echo bbp_get_tools_admin_tabs( $active_tab );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
}
|
415 |
|
416 |
+
/**
|
417 |
+
* Output the tabs in the admin area
|
418 |
+
*
|
419 |
+
* @since 2.1.0 bbPress (r3872)
|
420 |
+
*
|
421 |
+
* @param string $active_tab Name of the tab that is active
|
422 |
+
*/
|
423 |
+
function bbp_get_tools_admin_tabs( $active_tab = '' ) {
|
|
|
|
|
|
|
|
|
424 |
|
425 |
+
// Declare local variables
|
426 |
+
$tabs_html = '';
|
427 |
+
$idle_class = 'nav-tab';
|
428 |
+
$active_class = 'nav-tab nav-tab-active';
|
|
|
429 |
|
430 |
+
// Setup core admin tabs
|
431 |
+
$tabs = bbp_get_tools_admin_pages();
|
|
|
|
|
432 |
|
433 |
+
// Loop through tabs and build navigation
|
434 |
+
foreach ( $tabs as $tab ) {
|
435 |
|
436 |
+
// Skip if user cannot visit page
|
437 |
+
if ( ! current_user_can( $tab['cap'] ) ) {
|
|
|
438 |
continue;
|
439 |
}
|
|
|
440 |
|
441 |
+
// Setup tab HTML
|
442 |
+
$is_current = (bool) ( $tab['name'] == $active_tab );
|
443 |
+
$tab_class = $is_current ? $active_class : $idle_class;
|
444 |
+
$tab_url = get_admin_url( '', add_query_arg( array( 'page' => $tab['page'] ), 'tools.php' ) );
|
445 |
+
$tabs_html .= '<a href="' . esc_url( $tab_url ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab['name'] ) . '</a>';
|
446 |
}
|
447 |
|
448 |
+
// Output the tabs
|
449 |
+
return $tabs_html;
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
/**
|
453 |
+
* Return possible tools pages
|
454 |
*
|
455 |
+
* @since 2.6.0 (r6273)
|
456 |
*
|
|
|
457 |
* @return array
|
458 |
*/
|
459 |
+
function bbp_get_tools_admin_pages() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
|
461 |
// Filter & return
|
462 |
+
return (array) apply_filters( 'bbp_tools_admin_tabs', array(
|
463 |
+
array(
|
464 |
+
'page' => 'bbp-repair',
|
465 |
+
'func' => 'bbp_admin_repair_page',
|
466 |
+
'cap' => 'bbp_tools_repair_page',
|
467 |
+
'name' => esc_html__( 'Repair Forums', 'bbpress' ),
|
468 |
+
|
469 |
+
// Deprecated 2.6.0
|
470 |
+
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-repair' ), 'tools.php' ) )
|
471 |
+
),
|
472 |
+
array(
|
473 |
+
'page' => 'bbp-upgrade',
|
474 |
+
'func' => 'bbp_admin_upgrade_page',
|
475 |
+
'cap' => 'bbp_tools_upgrade_page',
|
476 |
+
'name' => esc_html__( 'Upgrade Forums', 'bbpress' ),
|
477 |
+
|
478 |
+
// Deprecated 2.6.0
|
479 |
+
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-upgrade' ), 'tools.php' ) )
|
480 |
+
),
|
481 |
+
array(
|
482 |
+
'page' => 'bbp-converter',
|
483 |
+
'func' => 'bbp_converter_settings_page',
|
484 |
+
'cap' => 'bbp_tools_import_page',
|
485 |
+
'name' => esc_html__( 'Import Forums', 'bbpress' ),
|
486 |
+
|
487 |
+
// Deprecated 2.6.0
|
488 |
+
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-converter' ), 'tools.php' ) )
|
489 |
+
),
|
490 |
+
array(
|
491 |
+
'page' => 'bbp-reset',
|
492 |
+
'func' => 'bbp_admin_reset_page',
|
493 |
+
'cap' => 'bbp_tools_reset_page',
|
494 |
+
'name' => esc_html__( 'Reset Forums', 'bbpress' ),
|
495 |
+
|
496 |
+
// Deprecated 2.6.0
|
497 |
+
'href' => get_admin_url( '', add_query_arg( array( 'page' => 'bbp-reset' ), 'tools.php' ) )
|
498 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
}
|
includes/admin/tools/common.php
ADDED
@@ -0,0 +1,540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Admin Tools Common
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Administration
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Output the URL to run a specific repair tool
|
15 |
+
*
|
16 |
+
* @since 2.6.0 bbPress (r5885)
|
17 |
+
*
|
18 |
+
* @param string $component
|
19 |
+
*/
|
20 |
+
function bbp_admin_repair_tool_run_url( $component = array() ) {
|
21 |
+
echo esc_url( bbp_get_admin_repair_tool_run_url( $component ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Return the URL to run a specific repair tool
|
26 |
+
*
|
27 |
+
* @since 2.6.0 bbPress (r5885)
|
28 |
+
*
|
29 |
+
* @param string $component
|
30 |
+
*/
|
31 |
+
function bbp_get_admin_repair_tool_run_url( $component = array() ) {
|
32 |
+
$tools = admin_url( 'tools.php' );
|
33 |
+
$page = ( 'repair' === $component['type'] ) ? 'bbp-repair' : 'bbp-upgrade';
|
34 |
+
$args = array( 'page' => $page, 'action' => 'run', 'checked' => array( $component['id'] ) );
|
35 |
+
$url = add_query_arg( $args, $tools );
|
36 |
+
$nonced = wp_nonce_url( $url, 'bbpress-do-counts' );
|
37 |
+
|
38 |
+
// Filter & return
|
39 |
+
return apply_filters( 'bbp_get_admin_repair_tool_run_url', $nonced, $component );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Assemble the admin notices
|
44 |
+
*
|
45 |
+
* @since 2.0.0 bbPress (r2613)
|
46 |
+
*
|
47 |
+
* @param string|WP_Error $message A message to be displayed or {@link WP_Error}
|
48 |
+
* @param string $class Optional. A class to be added to the message div
|
49 |
+
* @uses WP_Error::get_error_messages() To get the error messages of $message
|
50 |
+
* @uses add_action() Adds the admin notice action with the message HTML
|
51 |
+
* @return string The message HTML
|
52 |
+
*/
|
53 |
+
function bbp_admin_tools_feedback( $message, $class = false ) {
|
54 |
+
|
55 |
+
// Dismiss button
|
56 |
+
$dismiss = '<button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice.', 'bbpress' ) . '</span></button>';
|
57 |
+
|
58 |
+
// One message as string
|
59 |
+
if ( is_string( $message ) ) {
|
60 |
+
$message = '<p>' . $message . '</p>';
|
61 |
+
$class = $class ? $class : 'updated';
|
62 |
+
|
63 |
+
// Messages as objects
|
64 |
+
} elseif ( is_wp_error( $message ) ) {
|
65 |
+
$errors = $message->get_error_messages();
|
66 |
+
|
67 |
+
switch ( count( $errors ) ) {
|
68 |
+
case 0:
|
69 |
+
return false;
|
70 |
+
|
71 |
+
case 1:
|
72 |
+
$message = '<p>' . $errors[0] . '</p>';
|
73 |
+
break;
|
74 |
+
|
75 |
+
default:
|
76 |
+
$message = '<ul>' . "\n\t" . '<li>' . implode( '</li>' . "\n\t" . '<li>', $errors ) . '</li>' . "\n" . '</ul>';
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
|
80 |
+
$class = $class ? $class : 'is-error';
|
81 |
+
} else {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Assemble the message
|
86 |
+
$message = '<div id="message" class="is-dismissible notice ' . esc_attr( $class ) . '">' . $message . $dismiss . '</div>';
|
87 |
+
$message = str_replace( "'", "\'", $message );
|
88 |
+
|
89 |
+
// Ugh
|
90 |
+
$lambda = create_function( '', "echo '$message';" );
|
91 |
+
add_action( 'admin_notices', $lambda );
|
92 |
+
|
93 |
+
return $lambda;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Handle the processing and feedback of the admin tools page
|
98 |
+
*
|
99 |
+
* @since 2.0.0 bbPress (r2613)
|
100 |
+
*
|
101 |
+
* @uses bbp_admin_repair_list() To get the recount list
|
102 |
+
* @uses check_admin_referer() To verify the nonce and the referer
|
103 |
+
* @uses wp_cache_flush() To flush the cache
|
104 |
+
* @uses do_action() Calls 'admin_notices' to display the notices
|
105 |
+
*/
|
106 |
+
function bbp_admin_repair_handler() {
|
107 |
+
|
108 |
+
// Bail if not an actionable request
|
109 |
+
if ( ! bbp_is_get_request() ) {
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
|
113 |
+
// Get the current action or bail
|
114 |
+
if ( ! empty( $_GET['action'] ) ) {
|
115 |
+
$action = sanitize_key( $_GET['action'] );
|
116 |
+
} elseif ( ! empty( $_GET['action2'] ) ) {
|
117 |
+
$action = sanitize_key( $_GET['action2'] );
|
118 |
+
} else {
|
119 |
+
return;
|
120 |
+
}
|
121 |
+
|
122 |
+
// Bail if not running an action
|
123 |
+
if ( 'run' !== $action ) {
|
124 |
+
return;
|
125 |
+
}
|
126 |
+
|
127 |
+
check_admin_referer( 'bbpress-do-counts' );
|
128 |
+
|
129 |
+
// Stores messages
|
130 |
+
$messages = array();
|
131 |
+
|
132 |
+
// Kill all the caches, because we don't know what's where anymore
|
133 |
+
wp_cache_flush();
|
134 |
+
|
135 |
+
// Get the list
|
136 |
+
$list = bbp_get_admin_repair_tools();
|
137 |
+
|
138 |
+
// Run through checked repair tools
|
139 |
+
if ( ! empty( $_GET['checked'] ) ) {
|
140 |
+
foreach ( $_GET['checked'] as $item_id ) {
|
141 |
+
if ( isset( $list[ $item_id ] ) && is_callable( $list[ $item_id ]['callback'] ) ) {
|
142 |
+
$messages[] = call_user_func( $list[ $item_id ]['callback'] );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
// Feedback
|
148 |
+
if ( count( $messages ) ) {
|
149 |
+
foreach ( $messages as $message ) {
|
150 |
+
bbp_admin_tools_feedback( $message[1] );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
// @todo Redirect away from here
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Get the array of available repair tools
|
159 |
+
*
|
160 |
+
* @since 2.6.0 bbPress (r5885)
|
161 |
+
*
|
162 |
+
* @param string $type repair|upgrade The type of tools to get. Default to 'repair'
|
163 |
+
* @return array
|
164 |
+
*/
|
165 |
+
function bbp_get_admin_repair_tools( $type = '' ) {
|
166 |
+
|
167 |
+
// Get tools array
|
168 |
+
$tools = ! empty( bbpress()->admin->tools )
|
169 |
+
? bbpress()->admin->tools
|
170 |
+
: array();
|
171 |
+
|
172 |
+
// Maybe limit to type (otherwise return all tools)
|
173 |
+
if ( ! empty( $type ) ) {
|
174 |
+
$tools = wp_list_filter( bbpress()->admin->tools, array( 'type' => $type ) );
|
175 |
+
}
|
176 |
+
|
177 |
+
// Filter & return
|
178 |
+
return apply_filters( 'bbp_get_admin_repair_tools', $tools, $type );
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Return array of components from the array of registered tools
|
183 |
+
*
|
184 |
+
* @since 2.5.0 bbPress (r5885)
|
185 |
+
*
|
186 |
+
* @return array
|
187 |
+
*/
|
188 |
+
function bbp_get_admin_repair_tool_registered_components() {
|
189 |
+
$tools = bbp_get_admin_repair_tools( str_replace( 'bbp-', '', sanitize_key( $_GET['page'] ) ) );
|
190 |
+
$plucked = wp_list_pluck( $tools, 'components' );
|
191 |
+
$retval = array();
|
192 |
+
|
193 |
+
foreach ( $plucked as $components ) {
|
194 |
+
foreach ( $components as $component ) {
|
195 |
+
if ( in_array( $component, $retval, true ) ) {
|
196 |
+
continue;
|
197 |
+
}
|
198 |
+
$retval[] = $component;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
// Filter & return
|
203 |
+
return apply_filters( 'bbp_get_admin_repair_tool_registered_components', $retval );
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Output the repair list search form
|
208 |
+
*
|
209 |
+
* @since 2.6.0 bbPress (r5885)
|
210 |
+
*/
|
211 |
+
function bbp_admin_repair_list_search_form() {
|
212 |
+
?>
|
213 |
+
|
214 |
+
<p class="search-box">
|
215 |
+
<label class="screen-reader-text" for="bbp-repair-search-input"><?php esc_html_e( 'Search Tools:', 'bbpress' ); ?></label>
|
216 |
+
<input type="search" id="bbp-repair-search-input" name="s" value="<?php _admin_search_query(); ?>">
|
217 |
+
<input type="submit" id="search-submit" class="button" value="<?php esc_html_e( 'Search Tools', 'bbpress' ); ?>">
|
218 |
+
</p>
|
219 |
+
|
220 |
+
<?php
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Output a select drop-down of components to filter by
|
225 |
+
*
|
226 |
+
* @since 2.5.0 bbPress (r5885)
|
227 |
+
*/
|
228 |
+
function bbp_admin_repair_list_components_filter() {
|
229 |
+
|
230 |
+
// Sanitize component value, if exists
|
231 |
+
$selected = ! empty( $_GET['components'] )
|
232 |
+
? sanitize_key( $_GET['components'] )
|
233 |
+
: '';
|
234 |
+
|
235 |
+
// Get registered components
|
236 |
+
$components = bbp_get_admin_repair_tool_registered_components(); ?>
|
237 |
+
|
238 |
+
<label class="screen-reader-text" for="cat"><?php esc_html_e( 'Filter by Component', 'bbpress' ); ?></label>
|
239 |
+
<select name="components" id="components" class="postform">
|
240 |
+
<option value="" <?php selected( $selected, false ); ?>><?php esc_html_e( 'All Components', 'bbpress' ); ?></option>
|
241 |
+
|
242 |
+
<?php foreach ( $components as $component ) : ?>
|
243 |
+
|
244 |
+
<option class="level-0" value="<?php echo esc_attr( $component ); ?>" <?php selected( $selected, $component ); ?>><?php echo esc_html( bbp_admin_repair_tool_translate_component( $component ) ); ?></option>
|
245 |
+
|
246 |
+
<?php endforeach; ?>
|
247 |
+
|
248 |
+
</select>
|
249 |
+
<input type="submit" name="filter_action" id="components-submit" class="button" value="<?php esc_html_e( 'Filter', 'bbpress' ); ?>">
|
250 |
+
|
251 |
+
<?php
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Maybe translate a repair tool overhead name
|
256 |
+
*
|
257 |
+
* @since 2.6.0 bbPress (r6177)
|
258 |
+
*
|
259 |
+
* @param string $overhead
|
260 |
+
* @return string
|
261 |
+
*/
|
262 |
+
function bbp_admin_repair_tool_translate_overhead( $overhead = '' ) {
|
263 |
+
|
264 |
+
// Get the name of the component
|
265 |
+
switch ( $overhead ) {
|
266 |
+
case 'low' :
|
267 |
+
$name = esc_html__( 'Low', 'bbpress' );
|
268 |
+
break;
|
269 |
+
case 'medium' :
|
270 |
+
$name = esc_html__( 'Medium', 'bbpress' );
|
271 |
+
break;
|
272 |
+
case 'high' :
|
273 |
+
$name = esc_html__( 'High', 'bbpress' );
|
274 |
+
break;
|
275 |
+
default :
|
276 |
+
$name = ucwords( $overhead );
|
277 |
+
break;
|
278 |
+
}
|
279 |
+
|
280 |
+
return $name;
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Maybe translate a repair tool component name
|
285 |
+
*
|
286 |
+
* @since 2.6.0 bbPress (r5885)
|
287 |
+
*
|
288 |
+
* @param string $component
|
289 |
+
* @return string
|
290 |
+
*/
|
291 |
+
function bbp_admin_repair_tool_translate_component( $component = '' ) {
|
292 |
+
|
293 |
+
// Get the name of the component
|
294 |
+
switch ( $component ) {
|
295 |
+
case 'bbp_user' :
|
296 |
+
$name = esc_html__( 'Users', 'bbpress' );
|
297 |
+
break;
|
298 |
+
case bbp_get_forum_post_type() :
|
299 |
+
$name = esc_html__( 'Forums', 'bbpress' );
|
300 |
+
break;
|
301 |
+
case bbp_get_topic_post_type() :
|
302 |
+
$name = esc_html__( 'Topics', 'bbpress' );
|
303 |
+
break;
|
304 |
+
case bbp_get_reply_post_type() :
|
305 |
+
$name = esc_html__( 'Replies', 'bbpress' );
|
306 |
+
break;
|
307 |
+
case bbp_get_topic_tag_tax_id() :
|
308 |
+
$name = esc_html__( 'Topic Tags', 'bbpress' );
|
309 |
+
break;
|
310 |
+
case bbp_get_user_rewrite_id() :
|
311 |
+
$name = esc_html__( 'Users', 'bbpress' );
|
312 |
+
break;
|
313 |
+
case bbp_get_user_favorites_rewrite_id() :
|
314 |
+
$name = esc_html__( 'Favorites', 'bbpress' );
|
315 |
+
break;
|
316 |
+
case bbp_get_user_subscriptions_rewrite_id() :
|
317 |
+
$name = esc_html__( 'Subscriptions', 'bbpress' );
|
318 |
+
break;
|
319 |
+
case bbp_get_user_engagements_rewrite_id() :
|
320 |
+
$name = esc_html__( 'Engagements', 'bbpress' );
|
321 |
+
break;
|
322 |
+
default :
|
323 |
+
$name = ucwords( $component );
|
324 |
+
break;
|
325 |
+
}
|
326 |
+
|
327 |
+
return $name;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Get the array of the repair list
|
332 |
+
*
|
333 |
+
* @since 2.0.0 bbPress (r2613)
|
334 |
+
*
|
335 |
+
* @uses apply_filters() Calls 'bbp_repair_list' with the list array
|
336 |
+
* @return array Repair list of options
|
337 |
+
*/
|
338 |
+
function bbp_admin_repair_list( $type = 'repair' ) {
|
339 |
+
|
340 |
+
// Define empty array
|
341 |
+
$repair_list = array();
|
342 |
+
|
343 |
+
// Get the available tools
|
344 |
+
$list = bbp_get_admin_repair_tools( $type );
|
345 |
+
$search = ! empty( $_GET['s'] ) ? stripslashes( $_GET['s'] ) : '';
|
346 |
+
$overhead = ! empty( $_GET['overhead'] ) ? sanitize_key( $_GET['overhead'] ) : '';
|
347 |
+
$component = ! empty( $_GET['components'] ) ? sanitize_key( $_GET['components'] ) : '';
|
348 |
+
|
349 |
+
// Overhead filter
|
350 |
+
if ( ! empty( $overhead ) ) {
|
351 |
+
$list = wp_list_filter( $list, array( 'overhead' => $overhead ) );
|
352 |
+
}
|
353 |
+
|
354 |
+
// Loop through and key by priority for sorting
|
355 |
+
foreach ( $list as $id => $tool ) {
|
356 |
+
|
357 |
+
// Component filter
|
358 |
+
if ( ! empty( $component ) ) {
|
359 |
+
if ( ! in_array( $component, $tool['components'], true ) ) {
|
360 |
+
continue;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
// Search
|
365 |
+
if ( ! empty( $search ) ) {
|
366 |
+
if ( ! strstr( strtolower( $tool['description'] ), strtolower( $search ) ) ) {
|
367 |
+
continue;
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
// Add to repair list
|
372 |
+
$repair_list[ $tool['priority'] ] = array(
|
373 |
+
'id' => sanitize_key( $id ),
|
374 |
+
'type' => $tool['type'],
|
375 |
+
'description' => $tool['description'],
|
376 |
+
'callback' => $tool['callback'],
|
377 |
+
'overhead' => $tool['overhead'],
|
378 |
+
'components' => $tool['components'],
|
379 |
+
);
|
380 |
+
}
|
381 |
+
|
382 |
+
// Sort
|
383 |
+
ksort( $repair_list );
|
384 |
+
|
385 |
+
// Filter & return
|
386 |
+
return (array) apply_filters( 'bbp_repair_list', $repair_list );
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Get filter links for components for a specific admin repair tool
|
391 |
+
*
|
392 |
+
* @since 2.6.0 bbPress (r5885)
|
393 |
+
*
|
394 |
+
* @param array $item
|
395 |
+
* @return array
|
396 |
+
*/
|
397 |
+
function bbp_get_admin_repair_tool_components( $item = array() ) {
|
398 |
+
|
399 |
+
// Get the tools URL
|
400 |
+
$tools_url = add_query_arg( array( 'page' => sanitize_key( $_GET['page'] ) ), admin_url( 'tools.php' ) );
|
401 |
+
|
402 |
+
// Define links array
|
403 |
+
$links = array();
|
404 |
+
|
405 |
+
// Loop through tool components and build links
|
406 |
+
foreach ( $item['components'] as $component ) {
|
407 |
+
$args = array( 'components' => $component );
|
408 |
+
$filter_url = add_query_arg( $args, $tools_url );
|
409 |
+
$name = bbp_admin_repair_tool_translate_component( $component );
|
410 |
+
$links[] = '<a href="' . esc_url( $filter_url ) . '">' . esc_html( $name ) . '</a>';
|
411 |
+
}
|
412 |
+
|
413 |
+
// Filter & return
|
414 |
+
return apply_filters( 'bbp_get_admin_repair_tool_components', $links, $item );
|
415 |
+
}
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Output filter links for components for a specific admin repair tool
|
419 |
+
*
|
420 |
+
* @since 2.6.0 bbPress (r5885)
|
421 |
+
*
|
422 |
+
* @param type array
|
423 |
+
*/
|
424 |
+
function bbp_admin_repair_tool_overhead_filters( $args = array() ) {
|
425 |
+
echo bbp_get_admin_repair_tool_overhead_filters( $args );
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Get filter links for components for a specific admin repair tool
|
430 |
+
*
|
431 |
+
* @since 2.6.0 bbPress (r5885)
|
432 |
+
*
|
433 |
+
* @param array $args
|
434 |
+
* @return array
|
435 |
+
*/
|
436 |
+
function bbp_get_admin_repair_tool_overhead_filters( $args = array() ) {
|
437 |
+
|
438 |
+
// Parse args
|
439 |
+
$r = bbp_parse_args( $args, array(
|
440 |
+
'before' => '<ul class="subsubsub">',
|
441 |
+
'after' => '</ul>',
|
442 |
+
'link_before' => '<li>',
|
443 |
+
'link_after' => '</li>',
|
444 |
+
'count_before' => ' <span class="count">(',
|
445 |
+
'count_after' => ')</span>',
|
446 |
+
'separator' => ' | ',
|
447 |
+
), 'get_admin_repair_tool_overhead_filters' );
|
448 |
+
|
449 |
+
// Get page
|
450 |
+
$page = sanitize_key( $_GET['page'] );
|
451 |
+
|
452 |
+
// Count the tools
|
453 |
+
$tools = bbp_get_admin_repair_tools( str_replace( 'bbp-', '', $page ) );
|
454 |
+
|
455 |
+
// Get the tools URL
|
456 |
+
$tools_url = add_query_arg( array( 'page' => $page ), admin_url( 'tools.php' ) );
|
457 |
+
|
458 |
+
// Define arrays
|
459 |
+
$overheads = $links = array();
|
460 |
+
|
461 |
+
// Loop through tools and count overheads
|
462 |
+
foreach ( $tools as $id => $tool ) {
|
463 |
+
|
464 |
+
// Get the overhead level
|
465 |
+
$overhead = $tool['overhead'];
|
466 |
+
|
467 |
+
// Set an empty count
|
468 |
+
if ( empty( $overheads[ $overhead ] ) ) {
|
469 |
+
$overheads[ $overhead ] = 0;
|
470 |
+
}
|
471 |
+
|
472 |
+
// Bump the overhead count
|
473 |
+
$overheads[ $overhead ]++;
|
474 |
+
}
|
475 |
+
|
476 |
+
// Create the "All" link
|
477 |
+
$current = empty( $_GET['overhead'] ) ? 'current' : '';
|
478 |
+
$links[] = $r['link_before']. '<a href="' . esc_url( $tools_url ) . '" class="' . esc_attr( $current ) . '">' . sprintf( esc_html__( 'All %s', 'bbpress' ), $r['count_before'] . count( $tools ) . $r['count_after'] ) . '</a>' . $r['link_after'];
|
479 |
+
|
480 |
+
// Default ticker
|
481 |
+
$i = 0;
|
482 |
+
|
483 |
+
// Loop through overheads and build filter
|
484 |
+
foreach ( $overheads as $overhead => $count ) {
|
485 |
+
|
486 |
+
// Separator count
|
487 |
+
$i++;
|
488 |
+
|
489 |
+
// Build the filter URL
|
490 |
+
$key = sanitize_key( $overhead );
|
491 |
+
$args = array( 'overhead' => $key );
|
492 |
+
$filter_url = add_query_arg( $args, $tools_url );
|
493 |
+
|
494 |
+
// Figure out separator and active class
|
495 |
+
$current = ! empty( $_GET['overhead'] ) && ( sanitize_key( $_GET['overhead'] ) === $key ) ? 'current' : '';
|
496 |
+
|
497 |
+
// Counts to show
|
498 |
+
if ( ! empty( $count ) ) {
|
499 |
+
$overhead_count = $r['count_before'] . $count . $r['count_after'];
|
500 |
+
}
|
501 |
+
|
502 |
+
// Build the link
|
503 |
+
$links[] = $r['link_before'] . '<a href="' . esc_url( $filter_url ) . '" class="' . esc_attr( $current ) . '">' . bbp_admin_repair_tool_translate_overhead( $overhead ) . $overhead_count . '</a>' . $r['link_after'];
|
504 |
+
}
|
505 |
+
|
506 |
+
// Surround output with before & after strings
|
507 |
+
$output = $r['before'] . implode( $r['separator'], $links ) . $r['after'];
|
508 |
+
|
509 |
+
// Filter & return
|
510 |
+
return apply_filters( 'bbp_get_admin_repair_tool_components', $output, $r, $args );
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Get filter links for overhead for a specific admin repair tool
|
515 |
+
*
|
516 |
+
* @since 2.6.0 bbPress (r5885)
|
517 |
+
*
|
518 |
+
* @param array $item
|
519 |
+
* @return array
|
520 |
+
*/
|
521 |
+
function bbp_get_admin_repair_tool_overhead( $item = array() ) {
|
522 |
+
|
523 |
+
// Get the tools URL
|
524 |
+
$tools_url = add_query_arg( array( 'page' => sanitize_key( $_GET['page'] ) ), admin_url( 'tools.php' ) );
|
525 |
+
|
526 |
+
// Define links array
|
527 |
+
$links = array();
|
528 |
+
$overheads = array( $item['overhead'] );
|
529 |
+
|
530 |
+
// Loop through tool overhead and build links
|
531 |
+
foreach ( $overheads as $overhead ) {
|
532 |
+
$args = array( 'overhead' => $overhead );
|
533 |
+
$filter_url = add_query_arg( $args, $tools_url );
|
534 |
+
$name = bbp_admin_repair_tool_translate_overhead( $overhead );
|
535 |
+
$links[] = '<a href="' . esc_url( $filter_url ) . '">' . esc_html( $name ) . '</a>';
|
536 |
+
}
|
537 |
+
|
538 |
+
// Filter & return
|
539 |
+
return apply_filters( 'bbp_get_admin_repair_tool_overhead', $links, $item );
|
540 |
+
}
|
includes/admin/tools/converter.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Converter
|
5 |
+
*
|
6 |
+
* Based on the hard work of Adam Ellis
|
7 |
+
*
|
8 |
+
* @package bbPress
|
9 |
+
* @subpackage Administration
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
defined( 'ABSPATH' ) || exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Return an array of available converters
|
17 |
+
*
|
18 |
+
* @since 2.6.0 bbPress (r6447)
|
19 |
+
*
|
20 |
+
* @return array
|
21 |
+
*/
|
22 |
+
function bbp_get_converters() {
|
23 |
+
|
24 |
+
// Default
|
25 |
+
$files = array();
|
26 |
+
$path = bbpress()->admin->admin_dir . 'converters/';
|
27 |
+
$curdir = opendir( $path );
|
28 |
+
|
29 |
+
// Look for the converter file in the converters directory
|
30 |
+
if ( false !== $curdir ) {
|
31 |
+
while ( $file = readdir( $curdir ) ) {
|
32 |
+
if ( stristr( $file, '.php' ) && stristr( $file, 'index' ) === false ) {
|
33 |
+
$name = preg_replace( '/.php/', '', $file );
|
34 |
+
if ( 'Example' !== $name ) {
|
35 |
+
$files[ $name ] = $path . $file;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
// Close the directory
|
42 |
+
closedir( $curdir );
|
43 |
+
|
44 |
+
// Sort keys alphabetically, ignoring upper/lower casing
|
45 |
+
if ( ! empty( $files ) ) {
|
46 |
+
natcasesort( $files );
|
47 |
+
}
|
48 |
+
|
49 |
+
// Filter & return
|
50 |
+
return (array) apply_filters( 'bbp_get_converters', $files );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* This is a function that is purposely written to look like a "new" statement.
|
55 |
+
* It is basically a dynamic loader that will load in the platform conversion
|
56 |
+
* of your choice.
|
57 |
+
*
|
58 |
+
* @since 2.0.0
|
59 |
+
*
|
60 |
+
* @param string $platform Name of valid platform class.
|
61 |
+
*/
|
62 |
+
function bbp_new_converter( $platform ) {
|
63 |
+
|
64 |
+
// Default value
|
65 |
+
$converters = bbp_get_converters();
|
66 |
+
|
67 |
+
// Create a new converter object if it's found
|
68 |
+
if ( isset( $converters[ $platform ] ) ) {
|
69 |
+
require_once $converters[ $platform ];
|
70 |
+
return new $platform;
|
71 |
+
}
|
72 |
+
|
73 |
+
// Return null if no converter was found
|
74 |
+
return null;
|
75 |
+
}
|
includes/admin/tools/help.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Admin Tools Help
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Administration
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Contextual help for Repair Forums tools page
|
15 |
+
*
|
16 |
+
* @since 2.6.0 bbPress (r5314)
|
17 |
+
*
|
18 |
+
* @uses get_current_screen()
|
19 |
+
*/
|
20 |
+
function bbp_admin_tools_repair_help() {
|
21 |
+
|
22 |
+
$current_screen = get_current_screen();
|
23 |
+
|
24 |
+
// Bail if current screen could not be found
|
25 |
+
if ( empty( $current_screen ) ) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Repair Forums
|
30 |
+
$current_screen->add_help_tab( array(
|
31 |
+
'id' => 'repair_forums',
|
32 |
+
'title' => __( 'Repair Forums', 'bbpress' ),
|
33 |
+
'content' => '<p>' . __( 'There is more detailed information available on the bbPress and BuddyPress codex for the following:', 'bbpress' ) . '</p>' .
|
34 |
+
'<p>' .
|
35 |
+
'<ul>' .
|
36 |
+
'<li>' . __( 'BuddyPress Group Forums: <a href="https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/">Installing Group and Sitewide Forums</a> and <a href="https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/">Migrating from old forums to bbPress 2.2+</a>.', 'bbpress' ) . '</li>' .
|
37 |
+
'<li>' . __( 'bbPress roles: <a href="https://codex.bbpress.org/bbpress-user-roles-and-capabilities/" target="_blank">bbPress User Roles and Capabilities</a>', 'bbpress' ) . '</li>' .
|
38 |
+
'</ul>' .
|
39 |
+
'</p>' .
|
40 |
+
'<p>' . __( 'Also see <a href="https://codex.bbpress.org/repair-forums/">bbPress: Repair Forums</a>.', 'bbpress' ) . '</p>'
|
41 |
+
) );
|
42 |
+
|
43 |
+
// Help Sidebar
|
44 |
+
$current_screen->set_help_sidebar(
|
45 |
+
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
46 |
+
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
47 |
+
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Contextual help for Reset Forums tools page
|
53 |
+
*
|
54 |
+
* @since 2.6.0 bbPress (r5314)
|
55 |
+
*
|
56 |
+
* @uses get_current_screen()
|
57 |
+
*/
|
58 |
+
function bbp_admin_tools_reset_help() {
|
59 |
+
|
60 |
+
$current_screen = get_current_screen();
|
61 |
+
|
62 |
+
// Bail if current screen could not be found
|
63 |
+
if ( empty( $current_screen ) ) {
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
// Reset Forums
|
68 |
+
$current_screen->add_help_tab( array(
|
69 |
+
'id' => 'reset_forums',
|
70 |
+
'title' => __( 'Reset Forums', 'bbpress' ),
|
71 |
+
'content' => '<p>' . __( 'Also see <a href="https://codex.bbpress.org/reset-forums/">bbPress: Reset Forums</a>.', 'bbpress' ) . '</p>'
|
72 |
+
) );
|
73 |
+
|
74 |
+
// Help Sidebar
|
75 |
+
$current_screen->set_help_sidebar(
|
76 |
+
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
77 |
+
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
78 |
+
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
79 |
+
);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Contextual help for Import Forums tools page
|
84 |
+
*
|
85 |
+
* @since 2.6.0 bbPress (r5314)
|
86 |
+
*
|
87 |
+
* @uses get_current_screen()
|
88 |
+
*/
|
89 |
+
|
90 |
+
function bbp_admin_tools_converter_help() {
|
91 |
+
|
92 |
+
$current_screen = get_current_screen();
|
93 |
+
|
94 |
+
// Bail if current screen could not be found
|
95 |
+
if ( empty( $current_screen ) ) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
// Overview
|
100 |
+
$current_screen->add_help_tab( array(
|
101 |
+
'id' => 'overview',
|
102 |
+
'title' => __( 'Overview', 'bbpress' ),
|
103 |
+
'content' => '<p>' . __( 'This screen provides access to all of the bbPress Import Forums settings and resources.', 'bbpress' ) . '</p>' .
|
104 |
+
'<p>' . __( 'Please see the additional help tabs for more information on each individual section.', 'bbpress' ) . '</p>' .
|
105 |
+
'<p>' . __( 'Also see the main article on the bbPress codex <a href="https://codex.bbpress.org/import-forums/">bbPress: Import Forums</a>.', 'bbpress' ) . '</p>'
|
106 |
+
) );
|
107 |
+
|
108 |
+
// Database Settings
|
109 |
+
$current_screen->add_help_tab( array(
|
110 |
+
'id' => 'database_settings',
|
111 |
+
'title' => __( 'Database Settings', 'bbpress' ),
|
112 |
+
'content' => '<p>' . __( 'In the Database Settings you have a number of options:', 'bbpress' ) . '</p>' .
|
113 |
+
'<p>' .
|
114 |
+
'<ul>' .
|
115 |
+
'<li>' . __( 'The settings in this section refer to the database connection strings used by your old forum software. The best way to determine the exact settings you need is to copy them from your legacy forums configuration file or contact your web hosting provider.', 'bbpress' ) . '</li>' .
|
116 |
+
'</ul>' .
|
117 |
+
'</p>'
|
118 |
+
) );
|
119 |
+
|
120 |
+
// Importer Options
|
121 |
+
$current_screen->add_help_tab( array(
|
122 |
+
'id' => 'importer_options',
|
123 |
+
'title' => __( 'Importer Options', 'bbpress' ),
|
124 |
+
'content' => '<p>' . __( 'In the Options you have a number of options:', 'bbpress' ) . '</p>' .
|
125 |
+
'<p>' .
|
126 |
+
'<ul>' .
|
127 |
+
'<li>' . __( 'Depending on your MySQL configuration you can tweak the "Rows Limit" and "Delay Time" that may help to improve the overall time it takes to perform a complete forum import.', 'bbpress' ) . '</li>' .
|
128 |
+
'<li>' . __( '"Convert Users" will import your legacy forum members as WordPress Users.', 'bbpress' ) . '</li>' .
|
129 |
+
'<li>' . __( '"Start Over" will start the importer fresh, if your import failed for any reason leaving this setting unchecked the importer will begin from where it left off.', 'bbpress' ) . '</li>' .
|
130 |
+
'<li>' . __( '"Purge Previous Import" will remove data imported from a failed import without removing your existing forum data.', 'bbpress' ) . '</li>' .
|
131 |
+
'</ul>' .
|
132 |
+
'</p>'
|
133 |
+
) );
|
134 |
+
|
135 |
+
// Help Sidebar
|
136 |
+
$current_screen->set_help_sidebar(
|
137 |
+
'<p><strong>' . __( 'For more information:', 'bbpress' ) . '</strong></p>' .
|
138 |
+
'<p>' . __( '<a href="https://codex.bbpress.org" target="_blank">bbPress Documentation</a>', 'bbpress' ) . '</p>' .
|
139 |
+
'<p>' . __( '<a href="https://bbpress.org/forums/" target="_blank">bbPress Support Forums</a>', 'bbpress' ) . '</p>'
|
140 |
+
);
|
141 |
+
}
|
includes/admin/tools/repair.php
ADDED
@@ -0,0 +1,1252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Admin Repairs Page
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Administration
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Admin repair page
|
15 |
+
*
|
16 |
+
* @since 2.0.0 bbPress (r2613) Converted from bbPress 1.2
|
17 |
+
* @since 2.6.0 bbPress (r5885) Upgraded to list-table UI
|
18 |
+
*
|
19 |
+
* @todo Use a real list table
|
20 |
+
*
|
21 |
+
* @uses bbp_admin_repair_list() To get the recount list
|
22 |
+
* @uses check_admin_referer() To verify the nonce and the referer
|
23 |
+
* @uses wp_cache_flush() To flush the cache
|
24 |
+
* @uses do_action() Calls 'admin_notices' to display the notices
|
25 |
+
* @uses wp_nonce_field() To add a hidden nonce field
|
26 |
+
*/
|
27 |
+
function bbp_admin_repair_page() {
|
28 |
+
|
29 |
+
// Get the registered repair tools
|
30 |
+
$tools = bbp_admin_repair_list(); ?>
|
31 |
+
|
32 |
+
<div class="wrap">
|
33 |
+
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
34 |
+
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Repair Forums', 'bbpress' ) ); ?></h2>
|
35 |
+
|
36 |
+
<p><?php esc_html_e( 'bbPress keeps track of relationships between forums, topics, replies, topic-tags, favorites, subscriptions, and users. Occasionally these relationships become out of sync, most often after an import or migration. Use the tools below to manually recalculate these relationships.', 'bbpress' ); ?></p>
|
37 |
+
<p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Use caution when running more than 1 repair at a time.', 'bbpress' ); ?></p>
|
38 |
+
|
39 |
+
<?php bbp_admin_repair_tool_overhead_filters(); ?>
|
40 |
+
|
41 |
+
<form class="settings" method="get" action="">
|
42 |
+
|
43 |
+
<?php bbp_admin_repair_list_search_form(); ?>
|
44 |
+
|
45 |
+
<input type="hidden" name="page" value="bbp-repair" />
|
46 |
+
<?php wp_nonce_field( 'bbpress-do-counts' ); ?>
|
47 |
+
|
48 |
+
<div class="tablenav top">
|
49 |
+
<div class="alignleft actions bulkactions">
|
50 |
+
<label for="bulk-action-selector-top" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
51 |
+
<select name="action" id="bulk-action-selector-top">
|
52 |
+
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
53 |
+
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
54 |
+
</select>
|
55 |
+
<input type="submit" id="doaction" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
56 |
+
</div>
|
57 |
+
<div class="alignleft actions">
|
58 |
+
|
59 |
+
<?php bbp_admin_repair_list_components_filter(); ?>
|
60 |
+
|
61 |
+
</div>
|
62 |
+
<br class="clear">
|
63 |
+
</div>
|
64 |
+
<table class="wp-list-table widefat striped posts">
|
65 |
+
<thead>
|
66 |
+
<tr>
|
67 |
+
<td id="cb" class="manage-column column-cb check-column">
|
68 |
+
<label class="screen-reader-text" for="cb-select-all-1">
|
69 |
+
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
70 |
+
</label>
|
71 |
+
<input id="cb-select-all-1" type="checkbox">
|
72 |
+
</td>
|
73 |
+
<th scope="col" id="description" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
74 |
+
<th scope="col" id="components" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
75 |
+
<th scope="col" id="overhead" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
76 |
+
</tr>
|
77 |
+
</thead>
|
78 |
+
|
79 |
+
<tbody id="the-list">
|
80 |
+
|
81 |
+
<?php if ( ! empty( $tools ) ) : ?>
|
82 |
+
|
83 |
+
<?php foreach ( $tools as $item ) : ?>
|
84 |
+
|
85 |
+
<tr id="bbp-repair-tools" class="inactive">
|
86 |
+
<th scope="row" class="check-column">
|
87 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>"></label>
|
88 |
+
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $item['id'] ); ?>" id="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>">
|
89 |
+
</th>
|
90 |
+
<td class="bbp-tool-title column-primary column-description" data-colname="<?php esc_html_e( 'Description', 'bbpress' ); ?>">
|
91 |
+
<strong><?php echo esc_html( $item['description'] ); ?></strong>
|
92 |
+
<div class="row-actions hide-if-no-js">
|
93 |
+
<span class="run">
|
94 |
+
<a href="<?php bbp_admin_repair_tool_run_url( $item ); ?>" aria-label="<?php printf( esc_html__( 'Run %s', 'bbpress' ), $item['description'] ); ?>" id="<?php echo esc_attr( $item['id'] ); ?>" ><?php esc_html_e( 'Run', 'bbpress' ); ?></a>
|
95 |
+
</span>
|
96 |
+
</div>
|
97 |
+
<button type="button" class="toggle-row">
|
98 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Show more details', 'bbpress' ); ?></span>
|
99 |
+
</button>
|
100 |
+
</td>
|
101 |
+
<td class="column-components desc" data-colname="<?php esc_html_e( 'Components', 'bbpress' ); ?>">
|
102 |
+
<div class="bbp-tool-overhead">
|
103 |
+
|
104 |
+
<?php echo implode( ', ', bbp_get_admin_repair_tool_components( $item ) ); ?>
|
105 |
+
|
106 |
+
</div>
|
107 |
+
</td>
|
108 |
+
<td class="column-overhead desc" data-colname="<?php esc_html_e( 'Overhead', 'bbpress' ); ?>">
|
109 |
+
<div class="bbp-tool-overhead">
|
110 |
+
|
111 |
+
<?php echo implode( ', ', bbp_get_admin_repair_tool_overhead( $item ) ); ?>
|
112 |
+
|
113 |
+
</div>
|
114 |
+
</td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<?php endforeach; ?>
|
118 |
+
|
119 |
+
<?php else : ?>
|
120 |
+
|
121 |
+
<tr>
|
122 |
+
<td colspan="4">
|
123 |
+
<?php esc_html_e( 'No repair tools match this criteria.', 'bbpress' ); ?>
|
124 |
+
</td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<?php endif; ?>
|
128 |
+
|
129 |
+
</tbody>
|
130 |
+
<tfoot>
|
131 |
+
<tr>
|
132 |
+
<td class="manage-column column-cb check-column">
|
133 |
+
<label class="screen-reader-text" for="cb-select-all-2">
|
134 |
+
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
135 |
+
</label>
|
136 |
+
<input id="cb-select-all-2" type="checkbox">
|
137 |
+
</td>
|
138 |
+
<th scope="col" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
139 |
+
<th scope="col" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
140 |
+
<th scope="col" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
141 |
+
</tr>
|
142 |
+
</tfoot>
|
143 |
+
</table>
|
144 |
+
<div class="tablenav bottom">
|
145 |
+
<div class="alignleft actions bulkactions">
|
146 |
+
<label for="bulk-action-selector-bottom" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
147 |
+
<select name="action2" id="bulk-action-selector-bottom">
|
148 |
+
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
149 |
+
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
150 |
+
</select>
|
151 |
+
<input type="submit" id="doaction2" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</form>
|
155 |
+
</div>
|
156 |
+
|
157 |
+
<?php
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Recount topic replies
|
162 |
+
*
|
163 |
+
* @since 2.0.0 bbPress (r2613)
|
164 |
+
*
|
165 |
+
* @uses wpdb::query() To run our recount database queries
|
166 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
167 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
168 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
169 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
170 |
+
* @uses bbp_get_closed_status_id() To get the closed status id
|
171 |
+
* @return array An array of the status code and the message
|
172 |
+
*/
|
173 |
+
function bbp_admin_repair_topic_reply_count() {
|
174 |
+
|
175 |
+
// Define variables
|
176 |
+
$bbp_db = bbp_db();
|
177 |
+
$statement = __( 'Counting the number of replies in each topic… %s', 'bbpress' );
|
178 |
+
$result = __( 'Failed!', 'bbpress' );
|
179 |
+
|
180 |
+
// Post types and status
|
181 |
+
$tpt = bbp_get_topic_post_type();
|
182 |
+
$rpt = bbp_get_reply_post_type();
|
183 |
+
$pps = bbp_get_public_status_id();
|
184 |
+
$cps = bbp_get_closed_status_id();
|
185 |
+
|
186 |
+
// Delete the meta key _bbp_reply_count for each topic
|
187 |
+
$sql_delete = "DELETE `postmeta` FROM `{$bbp_db->postmeta}` AS `postmeta`
|
188 |
+
LEFT JOIN `{$bbp_db->posts}` AS `posts` ON `posts`.`ID` = `postmeta`.`post_id`
|
189 |
+
WHERE `posts`.`post_type` = '{$tpt}'
|
190 |
+
AND `postmeta`.`meta_key` = '_bbp_reply_count'";
|
191 |
+
|
192 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
193 |
+
return array( 1, sprintf( $statement, $result ) );
|
194 |
+
}
|
195 |
+
|
196 |
+
// Recalculate the meta key _bbp_reply_count for each topic
|
197 |
+
$sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (
|
198 |
+
SELECT `topics`.`ID` AS `post_id`, '_bbp_reply_count' AS `meta_key`, COUNT(`replies`.`ID`) As `meta_value`
|
199 |
+
FROM `{$bbp_db->posts}` AS `topics`
|
200 |
+
LEFT JOIN `{$bbp_db->posts}` as `replies`
|
201 |
+
ON `replies`.`post_parent` = `topics`.`ID`
|
202 |
+
AND `replies`.`post_status` = '{$pps}'
|
203 |
+
AND `replies`.`post_type` = '{$rpt}'
|
204 |
+
WHERE `topics`.`post_type` = '{$tpt}'
|
205 |
+
AND `topics`.`post_status` IN ( '{$pps}', '{$cps}' )
|
206 |
+
GROUP BY `topics`.`ID`)";
|
207 |
+
|
208 |
+
if ( is_wp_error( $bbp_db->query( $sql ) ) ) {
|
209 |
+
return array( 2, sprintf( $statement, $result ) );
|
210 |
+
}
|
211 |
+
|
212 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Recount topic voices
|
217 |
+
*
|
218 |
+
* @since 2.0.0 bbPress (r2613)
|
219 |
+
*
|
220 |
+
* @uses wpdb::query() To run our recount database queries
|
221 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
222 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
223 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
224 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
225 |
+
* @uses bbp_get_closed_status_id() To get the closed status id
|
226 |
+
* @return array An array of the status code and the message
|
227 |
+
*/
|
228 |
+
function bbp_admin_repair_topic_voice_count() {
|
229 |
+
|
230 |
+
// Define variables
|
231 |
+
$bbp_db = bbp_db();
|
232 |
+
$statement = __( 'Counting the number of voices in each topic… %s', 'bbpress' );
|
233 |
+
$result = __( 'Failed!', 'bbpress' );
|
234 |
+
|
235 |
+
$sql_delete = "DELETE FROM {$bbp_db->postmeta} WHERE meta_key IN ('_bbp_voice_count', '_bbp_engagement')";
|
236 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
237 |
+
return array( 1, sprintf( $statement, $result ) );
|
238 |
+
}
|
239 |
+
|
240 |
+
// Post types and status
|
241 |
+
$tpt = bbp_get_topic_post_type();
|
242 |
+
$rpt = bbp_get_reply_post_type();
|
243 |
+
$pps = bbp_get_public_status_id();
|
244 |
+
$cps = bbp_get_closed_status_id();
|
245 |
+
|
246 |
+
$engagements_sql = $bbp_db->prepare( "INSERT INTO {$bbp_db->postmeta} (post_id, meta_key, meta_value) (
|
247 |
+
SELECT postmeta.meta_value, '_bbp_engagement', posts.post_author
|
248 |
+
FROM {$bbp_db->posts} AS posts
|
249 |
+
LEFT JOIN {$bbp_db->postmeta} AS postmeta
|
250 |
+
ON posts.ID = postmeta.post_id
|
251 |
+
AND postmeta.meta_key = '_bbp_topic_id'
|
252 |
+
WHERE posts.post_type IN (%s, %s)
|
253 |
+
AND posts.post_status IN (%s, %s)
|
254 |
+
GROUP BY postmeta.meta_value, posts.post_author)", $tpt, $rpt, $pps, $cps );
|
255 |
+
|
256 |
+
if ( is_wp_error( $bbp_db->query( $engagements_sql ) ) ) {
|
257 |
+
return array( 2, sprintf( $statement, $result ) );
|
258 |
+
}
|
259 |
+
|
260 |
+
$voice_count_sql = "INSERT INTO {$bbp_db->postmeta} (post_id, meta_key, meta_value) (
|
261 |
+
SELECT post_id, '_bbp_voice_count', COUNT(DISTINCT meta_value)
|
262 |
+
FROM {$bbp_db->postmeta}
|
263 |
+
WHERE meta_key = '_bbp_engagement'
|
264 |
+
GROUP BY post_id)";
|
265 |
+
|
266 |
+
if ( is_wp_error( $bbp_db->query( $voice_count_sql ) ) ) {
|
267 |
+
return array( 3, sprintf( $statement, $result ) );
|
268 |
+
}
|
269 |
+
|
270 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Recount topic hidden replies (spammed/trashed)
|
275 |
+
*
|
276 |
+
* @since 2.0.0 bbPress (r2747)
|
277 |
+
*
|
278 |
+
* @uses wpdb::query() To run our recount database queries
|
279 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
280 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
281 |
+
* @uses bbp_get_trash_status_id() To get the trash status id
|
282 |
+
* @uses bbp_get_spam_status_id() To get the spam status id
|
283 |
+
* @uses bbp_get_pending_status_id() To get the pending status id
|
284 |
+
* @return array An array of the status code and the message
|
285 |
+
*/
|
286 |
+
function bbp_admin_repair_topic_hidden_reply_count() {
|
287 |
+
|
288 |
+
// Define variables
|
289 |
+
$bbp_db = bbp_db();
|
290 |
+
$statement = __( 'Counting the number of pending, spammed, and trashed replies in each topic… %s', 'bbpress' );
|
291 |
+
$result = __( 'Failed!', 'bbpress' );
|
292 |
+
|
293 |
+
$sql_delete = "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_reply_count_hidden'";
|
294 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
295 |
+
return array( 1, sprintf( $statement, $result ) );
|
296 |
+
}
|
297 |
+
|
298 |
+
// Post types and status
|
299 |
+
$rpt = bbp_get_reply_post_type();
|
300 |
+
$tps = bbp_get_trash_status_id();
|
301 |
+
$sps = bbp_get_spam_status_id();
|
302 |
+
$pps = bbp_get_pending_status_id();
|
303 |
+
|
304 |
+
$sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$rpt}' AND `post_status` IN ( '{$tps}', '{$sps}', '{$pps}' ) GROUP BY `post_parent`)";
|
305 |
+
if ( is_wp_error( $bbp_db->query( $sql ) ) ) {
|
306 |
+
return array( 2, sprintf( $statement, $result ) );
|
307 |
+
}
|
308 |
+
|
309 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Recount forum topics
|
314 |
+
*
|
315 |
+
* @since 2.0.0 bbPress (r2613)
|
316 |
+
*
|
317 |
+
* @uses wpdb::query() To run our recount database queries
|
318 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
319 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
320 |
+
* @uses get_posts() To get the forums
|
321 |
+
* @uses bbp_update_forum_topic_count() To update the forum topic count
|
322 |
+
* @return array An array of the status code and the message
|
323 |
+
*/
|
324 |
+
function bbp_admin_repair_forum_topic_count() {
|
325 |
+
|
326 |
+
// Define variables
|
327 |
+
$bbp_db = bbp_db();
|
328 |
+
$statement = __( 'Counting the number of topics in each forum… %s', 'bbpress' );
|
329 |
+
$result = __( 'Failed!', 'bbpress' );
|
330 |
+
|
331 |
+
$sql_delete = "DELETE FROM {$bbp_db->postmeta} WHERE meta_key IN ( '_bbp_topic_count', '_bbp_total_topic_count', '_bbp_topic_count_hidden' )";
|
332 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
333 |
+
return array( 1, sprintf( $statement, $result ) );
|
334 |
+
}
|
335 |
+
|
336 |
+
$forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
|
337 |
+
if ( ! empty( $forums ) ) {
|
338 |
+
foreach ( $forums as $forum ) {
|
339 |
+
bbp_update_forum_topic_count( $forum->ID );
|
340 |
+
bbp_update_forum_topic_count_hidden( $forum->ID );
|
341 |
+
}
|
342 |
+
} else {
|
343 |
+
return array( 2, sprintf( $statement, $result ) );
|
344 |
+
}
|
345 |
+
|
346 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Recount topic in each topic-tag
|
351 |
+
*
|
352 |
+
* @since 2.6.0 bbPress (r6256)
|
353 |
+
*
|
354 |
+
* @uses bbp_get_topic_tag_tax_id() To get the topic-tag taxonomy
|
355 |
+
* @uses get_terms() To get the terms
|
356 |
+
* @uses wp_list_pluck() To get term taxonomy IDs
|
357 |
+
* @uses get_taxonomy() To get term taxonomy object
|
358 |
+
* @uses _update_post_term_count() To update generic counts
|
359 |
+
* @uses bbp_update_topic_tag_count() To update topic-tag counts
|
360 |
+
* @uses clean_term_cache() To bust the terms cache
|
361 |
+
* @return array An array of the status code and the message
|
362 |
+
*/
|
363 |
+
function bbp_admin_repair_topic_tag_count() {
|
364 |
+
|
365 |
+
// Define variables
|
366 |
+
$statement = __( 'Counting the number of topics in each topic-tag… %s', 'bbpress' );
|
367 |
+
$result = __( 'Failed!', 'bbpress' );
|
368 |
+
$tax_id = bbp_get_topic_tag_tax_id();
|
369 |
+
$terms = get_terms( $tax_id, array( 'hide_empty' => false ) );
|
370 |
+
$tt_ids = wp_list_pluck( $terms, 'term_taxonomy_id' );
|
371 |
+
$ints = array_map( 'intval', $tt_ids );
|
372 |
+
$taxonomy = get_taxonomy( $tax_id );
|
373 |
+
|
374 |
+
// Bail if taxonomy does not exist
|
375 |
+
if ( empty( $taxonomy ) ) {
|
376 |
+
return array( 1, sprintf( $statement, $result ) );
|
377 |
+
}
|
378 |
+
|
379 |
+
// Custom callback
|
380 |
+
if ( ! empty( $taxonomy->update_count_callback ) ) {
|
381 |
+
|
382 |
+
// Bail if callback is not callable
|
383 |
+
if ( ! is_callable( $taxonomy->update_count_callback ) ) {
|
384 |
+
return array( 1, sprintf( $statement, $result ) );
|
385 |
+
}
|
386 |
+
|
387 |
+
call_user_func( $taxonomy->update_count_callback, $ints, $taxonomy );
|
388 |
+
|
389 |
+
// Generic callback fallback
|
390 |
+
} else {
|
391 |
+
_update_post_term_count( $ints, $taxonomy );
|
392 |
+
}
|
393 |
+
|
394 |
+
// Bust the cache
|
395 |
+
clean_term_cache( $ints, '', false );
|
396 |
+
|
397 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Recount forum replies
|
402 |
+
*
|
403 |
+
* @since 2.0.0 bbPress (r2613)
|
404 |
+
*
|
405 |
+
* @uses wpdb::query() To run our recount database queries
|
406 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
407 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
408 |
+
* @uses get_posts() To get the forums
|
409 |
+
* @uses bbp_update_forum_reply_count() To update the forum reply count
|
410 |
+
* @return array An array of the status code and the message
|
411 |
+
*/
|
412 |
+
function bbp_admin_repair_forum_reply_count() {
|
413 |
+
|
414 |
+
// Define variables
|
415 |
+
$bbp_db = bbp_db();
|
416 |
+
$statement = __( 'Counting the number of replies in each forum… %s', 'bbpress' );
|
417 |
+
$result = __( 'Failed!', 'bbpress' );
|
418 |
+
|
419 |
+
// Post type
|
420 |
+
$fpt = bbp_get_forum_post_type();
|
421 |
+
|
422 |
+
// Delete the meta keys _bbp_reply_count and _bbp_total_reply_count for each forum
|
423 |
+
$sql_delete = "DELETE `postmeta` FROM `{$bbp_db->postmeta}` AS `postmeta`
|
424 |
+
LEFT JOIN `{$bbp_db->posts}` AS `posts` ON `posts`.`ID` = `postmeta`.`post_id`
|
425 |
+
WHERE `posts`.`post_type` = '{$fpt}'
|
426 |
+
AND `postmeta`.`meta_key` = '_bbp_reply_count'
|
427 |
+
OR `postmeta`.`meta_key` = '_bbp_total_reply_count'";
|
428 |
+
|
429 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
430 |
+
return array( 1, sprintf( $statement, $result ) );
|
431 |
+
}
|
432 |
+
|
433 |
+
// Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum
|
434 |
+
$forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
|
435 |
+
if ( ! empty( $forums ) ) {
|
436 |
+
foreach ( $forums as $forum ) {
|
437 |
+
bbp_update_forum_reply_count( $forum->ID );
|
438 |
+
}
|
439 |
+
} else {
|
440 |
+
return array( 2, sprintf( $statement, $result ) );
|
441 |
+
}
|
442 |
+
|
443 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Recount topics by the users
|
448 |
+
*
|
449 |
+
* @since 2.1.0 bbPress (r3889)
|
450 |
+
*
|
451 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
452 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
453 |
+
* @uses wpdb::query() To run our recount database queries
|
454 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
455 |
+
* @return array An array of the status code and the message
|
456 |
+
*/
|
457 |
+
function bbp_admin_repair_user_topic_count() {
|
458 |
+
|
459 |
+
// Define variables
|
460 |
+
$bbp_db = bbp_db();
|
461 |
+
$statement = __( 'Counting the number of topics each user has created… %s', 'bbpress' );
|
462 |
+
$result = __( 'Failed!', 'bbpress' );
|
463 |
+
|
464 |
+
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
|
465 |
+
$insert_rows = $bbp_db->get_results( $sql_select );
|
466 |
+
|
467 |
+
if ( is_wp_error( $insert_rows ) ) {
|
468 |
+
return array( 1, sprintf( $statement, $result ) );
|
469 |
+
}
|
470 |
+
|
471 |
+
$key = $bbp_db->prefix . '_bbp_topic_count';
|
472 |
+
$insert_values = array();
|
473 |
+
foreach ( $insert_rows as $insert_row ) {
|
474 |
+
$insert_values[] = "('{$insert_row->post_author}', '{$key}', '{$insert_row->_count}')";
|
475 |
+
}
|
476 |
+
|
477 |
+
if ( !count( $insert_values ) ) {
|
478 |
+
return array( 2, sprintf( $statement, $result ) );
|
479 |
+
}
|
480 |
+
|
481 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
482 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
483 |
+
return array( 3, sprintf( $statement, $result ) );
|
484 |
+
}
|
485 |
+
|
486 |
+
foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
|
487 |
+
$chunk = "\n" . implode( ",\n", $chunk );
|
488 |
+
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
489 |
+
|
490 |
+
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
491 |
+
return array( 4, sprintf( $statement, $result ) );
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
496 |
+
}
|
497 |
+
|
498 |
+
/**
|
499 |
+
* Recount topic replied by the users
|
500 |
+
*
|
501 |
+
* @since 2.0.0 bbPress (r2613)
|
502 |
+
*
|
503 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
504 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
505 |
+
* @uses wpdb::query() To run our recount database queries
|
506 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
507 |
+
* @return array An array of the status code and the message
|
508 |
+
*/
|
509 |
+
function bbp_admin_repair_user_reply_count() {
|
510 |
+
|
511 |
+
// Define variables
|
512 |
+
$bbp_db = bbp_db();
|
513 |
+
$statement = __( 'Counting the number of topics to which each user has replied… %s', 'bbpress' );
|
514 |
+
$result = __( 'Failed!', 'bbpress' );
|
515 |
+
|
516 |
+
$sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "' GROUP BY `post_author`";
|
517 |
+
$insert_rows = $bbp_db->get_results( $sql_select );
|
518 |
+
|
519 |
+
if ( is_wp_error( $insert_rows ) ) {
|
520 |
+
return array( 1, sprintf( $statement, $result ) );
|
521 |
+
}
|
522 |
+
|
523 |
+
$key = $bbp_db->prefix . '_bbp_reply_count';
|
524 |
+
$insert_values = array();
|
525 |
+
foreach ( $insert_rows as $insert_row ) {
|
526 |
+
$insert_values[] = "('{$insert_row->post_author}', '{$key}', '{$insert_row->_count}')";
|
527 |
+
}
|
528 |
+
|
529 |
+
if ( !count( $insert_values ) ) {
|
530 |
+
return array( 2, sprintf( $statement, $result ) );
|
531 |
+
}
|
532 |
+
|
533 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
534 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
535 |
+
return array( 3, sprintf( $statement, $result ) );
|
536 |
+
}
|
537 |
+
|
538 |
+
foreach ( array_chunk( $insert_values, 10000 ) as $chunk ) {
|
539 |
+
$chunk = "\n" . implode( ",\n", $chunk );
|
540 |
+
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
541 |
+
|
542 |
+
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
543 |
+
return array( 4, sprintf( $statement, $result ) );
|
544 |
+
}
|
545 |
+
}
|
546 |
+
|
547 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Repair user favorites
|
552 |
+
*
|
553 |
+
* @since 2.0.0 bbPress (r2613)
|
554 |
+
*
|
555 |
+
* @uses wpdb::query() To run our recount database queries
|
556 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
557 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
558 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
559 |
+
* @return array An array of the status code and the message
|
560 |
+
*/
|
561 |
+
function bbp_admin_repair_user_favorites() {
|
562 |
+
|
563 |
+
// Define variables
|
564 |
+
$bbp_db = bbp_db();
|
565 |
+
$statement = __( 'Removing unpublished topics from user favorites… %s', 'bbpress' );
|
566 |
+
$result = __( 'Failed!', 'bbpress' );
|
567 |
+
|
568 |
+
// Query for users with favorites
|
569 |
+
$key = $bbp_db->prefix . '_bbp_favorites';
|
570 |
+
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `favorites` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
571 |
+
|
572 |
+
if ( is_wp_error( $users ) ) {
|
573 |
+
return array( 1, sprintf( $statement, $result ) );
|
574 |
+
}
|
575 |
+
|
576 |
+
$topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
577 |
+
|
578 |
+
if ( is_wp_error( $topics ) ) {
|
579 |
+
return array( 2, sprintf( $statement, $result ) );
|
580 |
+
}
|
581 |
+
|
582 |
+
$values = array();
|
583 |
+
foreach ( $users as $user ) {
|
584 |
+
if ( empty( $user->favorites ) || ! is_string( $user->favorites ) ) {
|
585 |
+
continue;
|
586 |
+
}
|
587 |
+
|
588 |
+
$favorites = array_intersect( $topics, explode( ',', $user->favorites ) );
|
589 |
+
if ( empty( $favorites ) || ! is_array( $favorites ) ) {
|
590 |
+
continue;
|
591 |
+
}
|
592 |
+
|
593 |
+
$favorites_joined = implode( ',', $favorites );
|
594 |
+
$values[] = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";
|
595 |
+
|
596 |
+
// Cleanup
|
597 |
+
unset( $favorites, $favorites_joined );
|
598 |
+
}
|
599 |
+
|
600 |
+
if ( !count( $values ) ) {
|
601 |
+
$result = __( 'Nothing to remove!', 'bbpress' );
|
602 |
+
return array( 0, sprintf( $statement, $result ) );
|
603 |
+
}
|
604 |
+
|
605 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
606 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
607 |
+
return array( 4, sprintf( $statement, $result ) );
|
608 |
+
}
|
609 |
+
|
610 |
+
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
611 |
+
$chunk = "\n" . implode( ",\n", $chunk );
|
612 |
+
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
613 |
+
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
614 |
+
return array( 5, sprintf( $statement, $result ) );
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* Clean the users' topic subscriptions
|
623 |
+
*
|
624 |
+
* @since 2.0.0 bbPress (r2668)
|
625 |
+
*
|
626 |
+
* @uses wpdb::query() To run our recount database queries
|
627 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
628 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
629 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
630 |
+
* @return array An array of the status code and the message
|
631 |
+
*/
|
632 |
+
function bbp_admin_repair_user_topic_subscriptions() {
|
633 |
+
|
634 |
+
// Define variables
|
635 |
+
$bbp_db = bbp_db();
|
636 |
+
$statement = __( 'Removing trashed topics from user subscriptions… %s', 'bbpress' );
|
637 |
+
$result = __( 'Failed!', 'bbpress' );
|
638 |
+
|
639 |
+
$key = $bbp_db->prefix . '_bbp_subscriptions';
|
640 |
+
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `subscriptions` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
641 |
+
|
642 |
+
if ( is_wp_error( $users ) ) {
|
643 |
+
return array( 1, sprintf( $statement, $result ) );
|
644 |
+
}
|
645 |
+
|
646 |
+
$topics = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
647 |
+
if ( is_wp_error( $topics ) ) {
|
648 |
+
return array( 2, sprintf( $statement, $result ) );
|
649 |
+
}
|
650 |
+
|
651 |
+
$values = array();
|
652 |
+
foreach ( $users as $user ) {
|
653 |
+
if ( empty( $user->subscriptions ) || ! is_string( $user->subscriptions ) ) {
|
654 |
+
continue;
|
655 |
+
}
|
656 |
+
|
657 |
+
$subscriptions = array_intersect( $topics, explode( ',', $user->subscriptions ) );
|
658 |
+
if ( empty( $subscriptions ) || ! is_array( $subscriptions ) ) {
|
659 |
+
continue;
|
660 |
+
}
|
661 |
+
|
662 |
+
$subscriptions_joined = implode( ',', $subscriptions );
|
663 |
+
$values[] = "('{$user->user_id}', '{$key}', '{$subscriptions_joined}')";
|
664 |
+
|
665 |
+
// Cleanup
|
666 |
+
unset( $subscriptions, $subscriptions_joined );
|
667 |
+
}
|
668 |
+
|
669 |
+
if ( !count( $values ) ) {
|
670 |
+
$result = __( 'Nothing to remove!', 'bbpress' );
|
671 |
+
return array( 0, sprintf( $statement, $result ) );
|
672 |
+
}
|
673 |
+
|
674 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
675 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
676 |
+
return array( 4, sprintf( $statement, $result ) );
|
677 |
+
}
|
678 |
+
|
679 |
+
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
680 |
+
$chunk = "\n" . implode( ",\n", $chunk );
|
681 |
+
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
682 |
+
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
683 |
+
return array( 5, sprintf( $statement, $result ) );
|
684 |
+
}
|
685 |
+
}
|
686 |
+
|
687 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
688 |
+
}
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Clean the users' forum subscriptions
|
692 |
+
*
|
693 |
+
* @since 2.5.0 bbPress (r5155)
|
694 |
+
*
|
695 |
+
* @uses wpdb::query() To run our recount database queries
|
696 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
697 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
698 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
699 |
+
* @return array An array of the status code and the message
|
700 |
+
*/
|
701 |
+
function bbp_admin_repair_user_forum_subscriptions() {
|
702 |
+
|
703 |
+
// Define variables
|
704 |
+
$bbp_db = bbp_db();
|
705 |
+
$statement = __( 'Removing trashed forums from user subscriptions… %s', 'bbpress' );
|
706 |
+
$result = __( 'Failed!', 'bbpress' );
|
707 |
+
|
708 |
+
$key = $bbp_db->prefix . '_bbp_forum_subscriptions';
|
709 |
+
$users = $bbp_db->get_results( "SELECT `user_id`, `meta_value` AS `subscriptions` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'" );
|
710 |
+
|
711 |
+
if ( is_wp_error( $users ) ) {
|
712 |
+
return array( 1, sprintf( $statement, $result ) );
|
713 |
+
}
|
714 |
+
|
715 |
+
$forums = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_forum_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'" );
|
716 |
+
if ( is_wp_error( $forums ) ) {
|
717 |
+
return array( 2, sprintf( $statement, $result ) );
|
718 |
+
}
|
719 |
+
|
720 |
+
$values = array();
|
721 |
+
foreach ( $users as $user ) {
|
722 |
+
if ( empty( $user->subscriptions ) || ! is_string( $user->subscriptions ) ) {
|
723 |
+
continue;
|
724 |
+
}
|
725 |
+
|
726 |
+
$subscriptions = array_intersect( $forums, explode( ',', $user->subscriptions ) );
|
727 |
+
if ( empty( $subscriptions ) || ! is_array( $subscriptions ) ) {
|
728 |
+
continue;
|
729 |
+
}
|
730 |
+
|
731 |
+
$subscriptions_joined = implode( ',', $subscriptions );
|
732 |
+
$values[] = "('{$user->user_id}', '{$key}', '{$subscriptions_joined}')";
|
733 |
+
|
734 |
+
// Cleanup
|
735 |
+
unset( $subscriptions, $subscriptions_joined );
|
736 |
+
}
|
737 |
+
|
738 |
+
if ( !count( $values ) ) {
|
739 |
+
$result = __( 'Nothing to remove!', 'bbpress' );
|
740 |
+
return array( 0, sprintf( $statement, $result ) );
|
741 |
+
}
|
742 |
+
|
743 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '{$key}'";
|
744 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
745 |
+
return array( 4, sprintf( $statement, $result ) );
|
746 |
+
}
|
747 |
+
|
748 |
+
foreach ( array_chunk( $values, 10000 ) as $chunk ) {
|
749 |
+
$chunk = "\n" . implode( ",\n", $chunk );
|
750 |
+
$sql_insert = "INSERT INTO `{$bbp_db->usermeta}` (`user_id`, `meta_key`, `meta_value`) VALUES {$chunk}";
|
751 |
+
if ( is_wp_error( $bbp_db->query( $sql_insert ) ) ) {
|
752 |
+
return array( 5, sprintf( $statement, $result ) );
|
753 |
+
}
|
754 |
+
}
|
755 |
+
|
756 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
757 |
+
}
|
758 |
+
|
759 |
+
/**
|
760 |
+
* This repair tool will map each user of the current site to their respective
|
761 |
+
* forums role. By default, Admins will be Key Masters, and every other role
|
762 |
+
* will be the default role defined in Settings > Forums (Participant).
|
763 |
+
*
|
764 |
+
* @since 2.2.0 bbPress (r4340)
|
765 |
+
*
|
766 |
+
* @uses bbp_get_user_role_map() To get the map of user roles
|
767 |
+
* @uses bbp_get_default_role() To get the default bbPress user role
|
768 |
+
* @uses bbp_get_blog_roles() To get the current WordPress roles
|
769 |
+
* @uses get_users() To get the users of each role (limited to ID field)
|
770 |
+
* @uses bbp_set_user_role() To set each user's forums role
|
771 |
+
*/
|
772 |
+
function bbp_admin_repair_user_roles() {
|
773 |
+
|
774 |
+
$statement = __( 'Remapping forum role for each user on this site… %s', 'bbpress' );
|
775 |
+
$changed = 0;
|
776 |
+
$role_map = bbp_get_user_role_map();
|
777 |
+
$default_role = bbp_get_default_role();
|
778 |
+
|
779 |
+
// Bail if no role map exists
|
780 |
+
if ( empty( $role_map ) ) {
|
781 |
+
return array( 1, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
782 |
+
}
|
783 |
+
|
784 |
+
// Iterate through each role...
|
785 |
+
foreach ( array_keys( bbp_get_blog_roles() ) as $role ) {
|
786 |
+
|
787 |
+
// Reset the offset
|
788 |
+
$offset = 0;
|
789 |
+
|
790 |
+
// If no role map exists, give the default forum role (bbp-participant)
|
791 |
+
$new_role = isset( $role_map[ $role ] ) ? $role_map[ $role ] : $default_role;
|
792 |
+
|
793 |
+
// Get users of this site, limited to 1000
|
794 |
+
while ( $users = get_users( array(
|
795 |
+
'role' => $role,
|
796 |
+
'fields' => 'ID',
|
797 |
+
'number' => 1000,
|
798 |
+
'offset' => $offset
|
799 |
+
) ) ) {
|
800 |
+
|
801 |
+
// Iterate through each user of $role and try to set it
|
802 |
+
foreach ( (array) $users as $user_id ) {
|
803 |
+
if ( bbp_set_user_role( $user_id, $new_role ) ) {
|
804 |
+
++$changed; // Keep a count to display at the end
|
805 |
+
}
|
806 |
+
}
|
807 |
+
|
808 |
+
// Bump the offset for the next query iteration
|
809 |
+
$offset = $offset + 1000;
|
810 |
+
}
|
811 |
+
}
|
812 |
+
|
813 |
+
$result = sprintf( __( 'Complete! %s users updated.', 'bbpress' ), bbp_number_format( $changed ) );
|
814 |
+
|
815 |
+
return array( 0, sprintf( $statement, $result ) );
|
816 |
+
}
|
817 |
+
|
818 |
+
/**
|
819 |
+
* Recaches the last post in every topic and forum
|
820 |
+
*
|
821 |
+
* @since 2.0.0 bbPress (r3040)
|
822 |
+
*
|
823 |
+
* @uses wpdb::query() To run our recount database queries
|
824 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
825 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
826 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
827 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
828 |
+
* @uses bbp_get_public_status_id() To get the public status id
|
829 |
+
* @uses bbp_is_forum_category() To check if the forum is a ategory
|
830 |
+
* @uses bbp_update_forum() To update the forums forum id
|
831 |
+
* @return array An array of the status code and the message
|
832 |
+
*/
|
833 |
+
function bbp_admin_repair_freshness() {
|
834 |
+
|
835 |
+
// Define variables
|
836 |
+
$bbp_db = bbp_db();
|
837 |
+
$statement = __( 'Recomputing latest post in every topic and forum… %s', 'bbpress' );
|
838 |
+
$result = __( 'Failed!', 'bbpress' );
|
839 |
+
|
840 |
+
// First, delete everything.
|
841 |
+
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` IN ( '_bbp_last_reply_id', '_bbp_last_topic_id', '_bbp_last_active_id', '_bbp_last_active_time' )" ) ) ) {
|
842 |
+
return array( 1, sprintf( $statement, $result ) );
|
843 |
+
}
|
844 |
+
|
845 |
+
// Post types and status
|
846 |
+
$fpt = bbp_get_forum_post_type();
|
847 |
+
$tpt = bbp_get_topic_post_type();
|
848 |
+
$rpt = bbp_get_reply_post_type();
|
849 |
+
$pps = bbp_get_public_status_id();
|
850 |
+
|
851 |
+
// Next, give all the topics with replies the ID their last reply.
|
852 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
853 |
+
( SELECT `topic`.`ID`, '_bbp_last_reply_id', MAX( `reply`.`ID` )
|
854 |
+
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
855 |
+
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
856 |
+
GROUP BY `topic`.`ID` )" ) ) ) {
|
857 |
+
return array( 2, sprintf( $statement, $result ) );
|
858 |
+
}
|
859 |
+
|
860 |
+
// For any remaining topics, give a reply ID of 0.
|
861 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
862 |
+
( SELECT `ID`, '_bbp_last_reply_id', 0
|
863 |
+
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
864 |
+
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_reply_id'
|
865 |
+
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
866 |
+
return array( 3, sprintf( $statement, $result ) );
|
867 |
+
}
|
868 |
+
|
869 |
+
// Now we give all the forums with topics the ID their last topic.
|
870 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
871 |
+
( SELECT `forum`.`ID`, '_bbp_last_topic_id', `topic`.`ID`
|
872 |
+
FROM `{$bbp_db->posts}` AS `forum` INNER JOIN `{$bbp_db->posts}` AS `topic` ON `forum`.`ID` = `topic`.`post_parent`
|
873 |
+
WHERE `topic`.`post_status` = '{$pps}' AND `forum`.`post_type` = '{$fpt}' AND `topic`.`post_type` = '{$tpt}'
|
874 |
+
GROUP BY `forum`.`ID` )" ) ) ) {
|
875 |
+
return array( 4, sprintf( $statement, $result ) );
|
876 |
+
}
|
877 |
+
|
878 |
+
// For any remaining forums, give a topic ID of 0.
|
879 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
880 |
+
( SELECT `ID`, '_bbp_last_topic_id', 0
|
881 |
+
FROM `{$bbp_db->posts}` AS `forum` LEFT JOIN `{$bbp_db->postmeta}` AS `topic`
|
882 |
+
ON `forum`.`ID` = `topic`.`post_id` AND `topic`.`meta_key` = '_bbp_last_topic_id'
|
883 |
+
WHERE `topic`.`meta_id` IS NULL AND `forum`.`post_type` = '{$fpt}' )" ) ) ) {
|
884 |
+
return array( 5, sprintf( $statement, $result ) );
|
885 |
+
}
|
886 |
+
|
887 |
+
// After that, we give all the topics with replies the ID their last reply (again, this time for a different reason).
|
888 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
889 |
+
( SELECT `topic`.`ID`, '_bbp_last_active_id', MAX( `reply`.`ID` )
|
890 |
+
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
891 |
+
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
892 |
+
GROUP BY `topic`.`ID` )" ) ) ) {
|
893 |
+
return array( 6, sprintf( $statement, $result ) );
|
894 |
+
}
|
895 |
+
|
896 |
+
// For any remaining topics, give a reply ID of themself.
|
897 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
898 |
+
( SELECT `ID`, '_bbp_last_active_id', `ID`
|
899 |
+
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
900 |
+
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_active_id'
|
901 |
+
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
902 |
+
return array( 7, sprintf( $statement, $result ) );
|
903 |
+
}
|
904 |
+
|
905 |
+
// Give topics with replies their last update time.
|
906 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
907 |
+
( SELECT `topic`.`ID`, '_bbp_last_active_time', MAX( `reply`.`post_date` )
|
908 |
+
FROM `{$bbp_db->posts}` AS `topic` INNER JOIN `{$bbp_db->posts}` AS `reply` ON `topic`.`ID` = `reply`.`post_parent`
|
909 |
+
WHERE `reply`.`post_status` = '{$pps}' AND `topic`.`post_type` = '{$tpt}' AND `reply`.`post_type` = '{$rpt}'
|
910 |
+
GROUP BY `topic`.`ID` )" ) ) ) {
|
911 |
+
return array( 8, sprintf( $statement, $result ) );
|
912 |
+
}
|
913 |
+
|
914 |
+
// Give topics without replies their last update time.
|
915 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
916 |
+
( SELECT `ID`, '_bbp_last_active_time', `post_date`
|
917 |
+
FROM `{$bbp_db->posts}` AS `topic` LEFT JOIN `{$bbp_db->postmeta}` AS `reply`
|
918 |
+
ON `topic`.`ID` = `reply`.`post_id` AND `reply`.`meta_key` = '_bbp_last_active_time'
|
919 |
+
WHERE `reply`.`meta_id` IS NULL AND `topic`.`post_type` = '{$tpt}' )" ) ) ) {
|
920 |
+
return array( 9, sprintf( $statement, $result ) );
|
921 |
+
}
|
922 |
+
|
923 |
+
// Forums need to know what their last active item is as well. Now it gets a bit more complex to do in the database.
|
924 |
+
$forums = $bbp_db->get_col( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$fpt}' and `post_status` != 'auto-draft'" );
|
925 |
+
if ( is_wp_error( $forums ) ) {
|
926 |
+
return array( 10, sprintf( $statement, $result ) );
|
927 |
+
}
|
928 |
+
|
929 |
+
// Loop through forums
|
930 |
+
foreach ( $forums as $forum_id ) {
|
931 |
+
if ( ! bbp_is_forum_category( $forum_id ) ) {
|
932 |
+
bbp_update_forum( array( 'forum_id' => $forum_id ) );
|
933 |
+
}
|
934 |
+
}
|
935 |
+
|
936 |
+
// Loop through categories when forums are done
|
937 |
+
foreach ( $forums as $forum_id ) {
|
938 |
+
if ( bbp_is_forum_category( $forum_id ) ) {
|
939 |
+
bbp_update_forum( array( 'forum_id' => $forum_id ) );
|
940 |
+
}
|
941 |
+
}
|
942 |
+
|
943 |
+
// Complete results
|
944 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
945 |
+
}
|
946 |
+
|
947 |
+
/**
|
948 |
+
* Repairs the relationship of sticky topics to the actual parent forum
|
949 |
+
*
|
950 |
+
* @since 2.3.0 bbPress (r4695)
|
951 |
+
*
|
952 |
+
* @uses wpdb::get_col() To run our recount database queries
|
953 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
954 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
955 |
+
* @uses get_post_meta() To get the sticky topics
|
956 |
+
* @uses bbp_is_topic_super_sticky() To check if the topic is super sticky
|
957 |
+
* @uses bbp_get_topic_forum_id() To get the topics forum id
|
958 |
+
* @uses update_post_meta To update the topics sticky post meta
|
959 |
+
* @return array An array of the status code and the message
|
960 |
+
*/
|
961 |
+
function bbp_admin_repair_sticky() {
|
962 |
+
|
963 |
+
// Define variables
|
964 |
+
$bbp_db = bbp_db();
|
965 |
+
$statement = __( 'Repairing the sticky topic to the parent forum relationships… %s', 'bbpress' );
|
966 |
+
$result = __( 'Failed!', 'bbpress' );
|
967 |
+
|
968 |
+
$forums = $bbp_db->get_col( "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_forum_post_type() . "'" );
|
969 |
+
|
970 |
+
// Bail if no forums found
|
971 |
+
if ( empty( $forums ) || is_wp_error( $forums ) ) {
|
972 |
+
return array( 1, sprintf( $statement, $result ) );
|
973 |
+
}
|
974 |
+
|
975 |
+
// Loop through forums and get their sticky topics
|
976 |
+
foreach ( $forums as $forum ) {
|
977 |
+
$forum_stickies[ $forum ] = get_post_meta( $forum, '_bbp_sticky_topics', true );
|
978 |
+
}
|
979 |
+
|
980 |
+
// Cleanup
|
981 |
+
unset( $forums, $forum );
|
982 |
+
|
983 |
+
// Loop through each forum with sticky topics
|
984 |
+
foreach ( $forum_stickies as $forum_id => $stickies ) {
|
985 |
+
|
986 |
+
// Skip if no stickies
|
987 |
+
if ( empty( $stickies ) ) {
|
988 |
+
continue;
|
989 |
+
}
|
990 |
+
|
991 |
+
// Loop through each sticky topic
|
992 |
+
foreach ( $stickies as $id => $topic_id ) {
|
993 |
+
|
994 |
+
// If the topic is not a super sticky, and the forum ID does not
|
995 |
+
// match the topic's forum ID, unset the forum's sticky meta.
|
996 |
+
if ( ! bbp_is_topic_super_sticky( $topic_id ) && $forum_id !== bbp_get_topic_forum_id( $topic_id ) ) {
|
997 |
+
unset( $forum_stickies[ $forum_id ][ $id ] );
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
|
1001 |
+
// Get sticky topic ID's, or use empty string
|
1002 |
+
$stickers = empty( $forum_stickies[ $forum_id ] ) ? '' : array_values( $forum_stickies[ $forum_id ] );
|
1003 |
+
|
1004 |
+
// Update the forum's sticky topics meta
|
1005 |
+
update_post_meta( $forum_id, '_bbp_sticky_topics', $stickers );
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
// Complete results
|
1009 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
/**
|
1013 |
+
* Repair closed topics
|
1014 |
+
*
|
1015 |
+
* Closed topics that are missing the postmeta "_bbp_status" key value "publish"
|
1016 |
+
* result in unexpected behaviour, primarily this would have only occured if you
|
1017 |
+
* had imported forums from another forum package previous to bbPress v2.6,
|
1018 |
+
* https://bbpress.trac.wordpress.org/ticket/2577
|
1019 |
+
*
|
1020 |
+
* @since 2.6.0 bbPress (r5668)
|
1021 |
+
*
|
1022 |
+
* @uses wpdb::get_col() To run our recount database queries
|
1023 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1024 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
1025 |
+
* @uses get_post_meta() To get the closed topic status meta
|
1026 |
+
* @uses update_post_meta To update the topics closed status post meta
|
1027 |
+
* @return array An array of the status code and the message
|
1028 |
+
*/
|
1029 |
+
function bbp_admin_repair_closed_topics() {
|
1030 |
+
|
1031 |
+
// Define variables
|
1032 |
+
$bbp_db = bbp_db();
|
1033 |
+
$statement = __( 'Repairing closed topics… %s', 'bbpress' );
|
1034 |
+
$result = __( 'No closed topics to repair.', 'bbpress' );
|
1035 |
+
$changed = 0;
|
1036 |
+
|
1037 |
+
$closed_topics = $bbp_db->get_col( "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = 'closed'" );
|
1038 |
+
|
1039 |
+
// Bail if no closed topics found
|
1040 |
+
if ( empty( $closed_topics ) || is_wp_error( $closed_topics ) ) {
|
1041 |
+
return array( 1, sprintf( $statement, $result ) );
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
// Loop through each closed topic
|
1045 |
+
foreach ( $closed_topics as $closed_topic ) {
|
1046 |
+
|
1047 |
+
// Check if the closed topic already has a postmeta _bbp_status value
|
1048 |
+
$topic_status = get_post_meta( $closed_topic, '_bbp_status', true );
|
1049 |
+
|
1050 |
+
// If we don't have a postmeta _bbp_status value
|
1051 |
+
if( empty( $topic_status ) ) {
|
1052 |
+
update_post_meta( $closed_topic, '_bbp_status', 'publish' );
|
1053 |
+
++$changed; // Keep a count to display at the end
|
1054 |
+
}
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
// Cleanup
|
1058 |
+
unset( $closed_topics, $closed_topic, $topic_status );
|
1059 |
+
|
1060 |
+
// Complete results
|
1061 |
+
$result = sprintf( _n( 'Complete! %d closed topic repaired.', 'Complete! %d closed topics repaired.', $changed, 'bbpress' ), $changed );
|
1062 |
+
|
1063 |
+
return array( 0, sprintf( $statement, $result ) );
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
/**
|
1067 |
+
* Recaches the private and hidden forums
|
1068 |
+
*
|
1069 |
+
* @since 2.2.0 bbPress (r4104)
|
1070 |
+
*
|
1071 |
+
* @uses bbp_repair_forum_visibility() To update private and hidden forum ids
|
1072 |
+
* @return array An array of the status code and the message
|
1073 |
+
*/
|
1074 |
+
function bbp_admin_repair_forum_visibility() {
|
1075 |
+
$statement = __( 'Recalculating forum visibility … %s', 'bbpress' );
|
1076 |
+
|
1077 |
+
// Bail if queries returned errors
|
1078 |
+
if ( ! bbp_repair_forum_visibility() ) {
|
1079 |
+
return array( 2, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
1080 |
+
|
1081 |
+
// Complete results
|
1082 |
+
} else {
|
1083 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
/**
|
1088 |
+
* Recaches the parent forum meta for each topic and reply
|
1089 |
+
*
|
1090 |
+
* @since 2.1.0 bbPress (r3876)
|
1091 |
+
*
|
1092 |
+
* @uses wpdb::query() To run our recount database queries
|
1093 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1094 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
1095 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
1096 |
+
* @return array An array of the status code and the message
|
1097 |
+
*/
|
1098 |
+
function bbp_admin_repair_forum_meta() {
|
1099 |
+
|
1100 |
+
// Define variables
|
1101 |
+
$bbp_db = bbp_db();
|
1102 |
+
$statement = __( 'Recalculating the forum for each post … %s', 'bbpress' );
|
1103 |
+
$result = __( 'Failed!', 'bbpress' );
|
1104 |
+
|
1105 |
+
// First, delete everything.
|
1106 |
+
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_forum_id'" ) ) ) {
|
1107 |
+
return array( 1, sprintf( $statement, $result ) );
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
// Post types and status
|
1111 |
+
$tpt = bbp_get_topic_post_type();
|
1112 |
+
$rpt = bbp_get_reply_post_type();
|
1113 |
+
|
1114 |
+
// Next, give all the topics their parent forum id.
|
1115 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1116 |
+
( SELECT `topic`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
|
1117 |
+
FROM `$bbp_db->posts`
|
1118 |
+
AS `topic`
|
1119 |
+
WHERE `topic`.`post_type` = '{$tpt}'
|
1120 |
+
GROUP BY `topic`.`ID` )" ) ) ) {
|
1121 |
+
return array( 2, sprintf( $statement, $result ) );
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
// Next, give all the replies their parent forum id.
|
1125 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1126 |
+
( SELECT `reply`.`ID`, '_bbp_forum_id', `topic`.`post_parent`
|
1127 |
+
FROM `$bbp_db->posts`
|
1128 |
+
AS `reply`
|
1129 |
+
INNER JOIN `$bbp_db->posts`
|
1130 |
+
AS `topic`
|
1131 |
+
ON `reply`.`post_parent` = `topic`.`ID`
|
1132 |
+
WHERE `topic`.`post_type` = '{$tpt}'
|
1133 |
+
AND `reply`.`post_type` = '{$rpt}'
|
1134 |
+
GROUP BY `reply`.`ID` )" ) ) ) {
|
1135 |
+
return array( 3, sprintf( $statement, $result ) );
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
// Complete results
|
1139 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
/**
|
1143 |
+
* Recaches the topic for each post
|
1144 |
+
*
|
1145 |
+
* @since 2.1.0 bbPress (r3876)
|
1146 |
+
*
|
1147 |
+
* @uses wpdb::query() To run our recount database queries
|
1148 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1149 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
1150 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
1151 |
+
* @return array An array of the status code and the message
|
1152 |
+
*/
|
1153 |
+
function bbp_admin_repair_topic_meta() {
|
1154 |
+
|
1155 |
+
// Define variables
|
1156 |
+
$bbp_db = bbp_db();
|
1157 |
+
$statement = __( 'Recalculating the topic for each post … %s', 'bbpress' );
|
1158 |
+
$result = __( 'Failed!', 'bbpress' );
|
1159 |
+
|
1160 |
+
// First, delete everything.
|
1161 |
+
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_topic_id'" ) ) ) {
|
1162 |
+
return array( 1, sprintf( $statement, $result ) );
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
// Post types and status
|
1166 |
+
$tpt = bbp_get_topic_post_type();
|
1167 |
+
$rpt = bbp_get_reply_post_type();
|
1168 |
+
|
1169 |
+
// Next, give all the topics with replies the ID their last reply.
|
1170 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1171 |
+
( SELECT `topic`.`ID`, '_bbp_topic_id', `topic`.`ID`
|
1172 |
+
FROM `$bbp_db->posts`
|
1173 |
+
AS `topic`
|
1174 |
+
WHERE `topic`.`post_type` = '{$tpt}'
|
1175 |
+
GROUP BY `topic`.`ID` )" ) ) ) {
|
1176 |
+
return array( 3, sprintf( $statement, $result ) );
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
// Next, give all the topics with replies the ID their last reply.
|
1180 |
+
if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`)
|
1181 |
+
( SELECT `reply`.`ID`, '_bbp_topic_id', `topic`.`ID`
|
1182 |
+
FROM `$bbp_db->posts`
|
1183 |
+
AS `reply`
|
1184 |
+
INNER JOIN `$bbp_db->posts`
|
1185 |
+
AS `topic`
|
1186 |
+
ON `reply`.`post_parent` = `topic`.`ID`
|
1187 |
+
WHERE `topic`.`post_type` = '{$tpt}'
|
1188 |
+
AND `reply`.`post_type` = '{$rpt}'
|
1189 |
+
GROUP BY `reply`.`ID` )" ) ) ) {
|
1190 |
+
return array( 4, sprintf( $statement, $result ) );
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
// Complete results
|
1194 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
/**
|
1198 |
+
* Recalculate reply menu order
|
1199 |
+
*
|
1200 |
+
* @since 2.5.4 bbPress (r5367)
|
1201 |
+
*
|
1202 |
+
* @uses wpdb::query() To run our recount database queries
|
1203 |
+
* @uses is_wp_error() To check if the executed query returned {@link WP_Error}
|
1204 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
1205 |
+
* @uses bbp_update_reply_position() To update the reply position
|
1206 |
+
* @return array An array of the status code and the message
|
1207 |
+
*/
|
1208 |
+
function bbp_admin_repair_reply_menu_order() {
|
1209 |
+
|
1210 |
+
// Define variables
|
1211 |
+
$bbp_db = bbp_db();
|
1212 |
+
$statement = __( 'Recalculating reply menu order … %s', 'bbpress' );
|
1213 |
+
$result = __( 'No reply positions to recalculate.', 'bbpress' );
|
1214 |
+
|
1215 |
+
// Delete cases where `_bbp_reply_to` was accidentally set to itself
|
1216 |
+
if ( is_wp_error( $bbp_db->query( "DELETE FROM `{$bbp_db->postmeta}` WHERE `meta_key` = '_bbp_reply_to' AND `post_id` = `meta_value`" ) ) ) {
|
1217 |
+
return array( 1, sprintf( $statement, $result ) );
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
// Post type
|
1221 |
+
$rpt = bbp_get_reply_post_type();
|
1222 |
+
|
1223 |
+
// Get an array of reply id's to update the menu oder for each reply
|
1224 |
+
$replies = $bbp_db->get_results( "SELECT `a`.`ID` FROM `{$bbp_db->posts}` AS `a`
|
1225 |
+
INNER JOIN (
|
1226 |
+
SELECT `menu_order`, `post_parent`
|
1227 |
+
FROM `{$bbp_db->posts}`
|
1228 |
+
GROUP BY `menu_order`, `post_parent`
|
1229 |
+
HAVING COUNT( * ) >1
|
1230 |
+
)`b`
|
1231 |
+
ON `a`.`menu_order` = `b`.`menu_order`
|
1232 |
+
AND `a`.`post_parent` = `b`.`post_parent`
|
1233 |
+
WHERE `post_type` = '{$rpt}'", OBJECT_K );
|
1234 |
+
|
1235 |
+
// Bail if no replies returned
|
1236 |
+
if ( empty( $replies ) ) {
|
1237 |
+
return array( 1, sprintf( $statement, $result ) );
|
1238 |
+
}
|
1239 |
+
|
1240 |
+
// Recalculate the menu order position for each reply
|
1241 |
+
foreach ( $replies as $reply ) {
|
1242 |
+
bbp_update_reply_position( $reply->ID );
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
// Cleanup
|
1246 |
+
unset( $replies, $reply );
|
1247 |
+
|
1248 |
+
// Flush the cache; things are about to get ugly.
|
1249 |
+
wp_cache_flush();
|
1250 |
+
|
1251 |
+
return array( 0, sprintf( $statement, __( 'Complete!', 'bbpress' ) ) );
|
1252 |
+
}
|
includes/admin/tools/reset.php
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Admin Tools Reset
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Administration
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Admin reset page
|
15 |
+
*
|
16 |
+
* @since 2.0.0 bbPress (r2613)
|
17 |
+
*
|
18 |
+
* @uses check_admin_referer() To verify the nonce and the referer
|
19 |
+
* @uses do_action() Calls 'admin_notices' to display the notices
|
20 |
+
* @uses wp_nonce_field() To add a hidden nonce field
|
21 |
+
*/
|
22 |
+
function bbp_admin_reset_page() {
|
23 |
+
?>
|
24 |
+
|
25 |
+
<div class="wrap">
|
26 |
+
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
27 |
+
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Reset Forums', 'bbpress' ) ); ?></h2>
|
28 |
+
<p><?php esc_html_e( 'Revert your forums back to a brand new installation, as if bbPress were never installed. This process cannot be undone.', 'bbpress' ); ?></p>
|
29 |
+
|
30 |
+
<form class="settings" method="post" action="">
|
31 |
+
<table class="form-table">
|
32 |
+
<tbody>
|
33 |
+
<tr valign="top">
|
34 |
+
<th scope="row"><?php esc_html_e( 'The following data will be removed:', 'bbpress' ) ?></th>
|
35 |
+
<td>
|
36 |
+
<?php esc_html_e( 'All Forums', 'bbpress' ); ?><br />
|
37 |
+
<?php esc_html_e( 'All Topics', 'bbpress' ); ?><br />
|
38 |
+
<?php esc_html_e( 'All Replies', 'bbpress' ); ?><br />
|
39 |
+
<?php esc_html_e( 'All Topic Tags', 'bbpress' ); ?><br />
|
40 |
+
<?php esc_html_e( 'All Meta Data', 'bbpress' ); ?><br />
|
41 |
+
<?php esc_html_e( 'Forum Settings', 'bbpress' ); ?><br />
|
42 |
+
<?php esc_html_e( 'Forum Activity', 'bbpress' ); ?><br />
|
43 |
+
<?php esc_html_e( 'Forum User Roles', 'bbpress' ); ?><br />
|
44 |
+
<?php esc_html_e( 'Forum Moderators', 'bbpress' ); ?><br />
|
45 |
+
<?php esc_html_e( 'Importer Helper Data', 'bbpress' ); ?><br />
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
<tr valign="top">
|
49 |
+
<th scope="row"><?php esc_html_e( 'Delete imported users?', 'bbpress' ); ?></th>
|
50 |
+
<td>
|
51 |
+
<fieldset>
|
52 |
+
<legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ); ?></span></legend>
|
53 |
+
<label><input type="checkbox" class="checkbox" name="bbpress-delete-imported-users" id="bbpress-delete-imported-users" value="1" /> <?php esc_html_e( 'This option will delete all previously imported users, and cannot be undone.', 'bbpress' ); ?></label>
|
54 |
+
<p class="description"><?php esc_html_e( 'Proceeding without this checked removes the meta-data necessary to delete these users later.', 'bbpress' ); ?></p>
|
55 |
+
</fieldset>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr valign="top">
|
59 |
+
<th scope="row"><?php esc_html_e( 'Do you really want to do this?', 'bbpress' ); ?></th>
|
60 |
+
<td>
|
61 |
+
<fieldset>
|
62 |
+
<legend class="screen-reader-text"><span><?php esc_html_e( "Say it ain't so!", 'bbpress' ); ?></span></legend>
|
63 |
+
<label><input type="checkbox" class="checkbox" name="bbpress-are-you-sure" id="bbpress-are-you-sure" value="1" /> <?php esc_html_e( 'This process cannot be undone.', 'bbpress' ); ?></label>
|
64 |
+
<p class="description"><?php esc_html_e( 'Backup your database before proceeding.', 'bbpress' ); ?></p>
|
65 |
+
</fieldset>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
</tbody>
|
69 |
+
</table>
|
70 |
+
|
71 |
+
<fieldset class="submit">
|
72 |
+
<input class="button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Reset bbPress', 'bbpress' ); ?>" />
|
73 |
+
<?php wp_nonce_field( 'bbpress-reset' ); ?>
|
74 |
+
</fieldset>
|
75 |
+
</form>
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<?php
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Handle the processing and feedback of the admin tools page
|
83 |
+
*
|
84 |
+
* @since 2.0.0 bbPress (r2613)
|
85 |
+
*
|
86 |
+
* @uses check_admin_referer() To verify the nonce and the referer
|
87 |
+
* @uses wp_cache_flush() To flush the cache
|
88 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
89 |
+
* @uses bbp_get_topic_post_type() To get the topic post type
|
90 |
+
* @uses bbp_get_reply_post_type() To get the reply post type
|
91 |
+
*/
|
92 |
+
function bbp_admin_reset_handler() {
|
93 |
+
|
94 |
+
// Bail if not resetting
|
95 |
+
if ( ! bbp_is_post_request() || empty( $_POST['bbpress-are-you-sure'] ) ) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
// Only keymasters can proceed
|
100 |
+
if ( ! bbp_is_user_keymaster() ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
check_admin_referer( 'bbpress-reset' );
|
105 |
+
|
106 |
+
// Stores messages
|
107 |
+
$messages = array();
|
108 |
+
$failed = __( 'Failed!', 'bbpress' );
|
109 |
+
$success = __( 'Success!', 'bbpress' );
|
110 |
+
|
111 |
+
// Flush the cache; things are about to get ugly.
|
112 |
+
wp_cache_flush();
|
113 |
+
|
114 |
+
/** Posts *****************************************************************/
|
115 |
+
|
116 |
+
// Post types and status
|
117 |
+
$fpt = bbp_get_forum_post_type();
|
118 |
+
$tpt = bbp_get_topic_post_type();
|
119 |
+
$rpt = bbp_get_reply_post_type();
|
120 |
+
|
121 |
+
// Define variables
|
122 |
+
$bbp_db = bbp_db();
|
123 |
+
$statement = __( 'Deleting Posts… %s', 'bbpress' );
|
124 |
+
|
125 |
+
$sql_posts = $bbp_db->get_results( "SELECT `ID` FROM `{$bbp_db->posts}` WHERE `post_type` IN ('{$fpt}', '{$tpt}', '{$rpt}')", OBJECT_K );
|
126 |
+
$sql_delete = "DELETE FROM `{$bbp_db->posts}` WHERE `post_type` IN ('{$fpt}', '{$tpt}', '{$rpt}')";
|
127 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
128 |
+
$messages[] = sprintf( $statement, $result );
|
129 |
+
|
130 |
+
/** Post Meta *************************************************************/
|
131 |
+
|
132 |
+
if ( ! empty( $sql_posts ) ) {
|
133 |
+
$sql_meta = array();
|
134 |
+
foreach ( $sql_posts as $key => $value ) {
|
135 |
+
$sql_meta[] = $key;
|
136 |
+
}
|
137 |
+
$statement = __( 'Deleting Post Meta… %s', 'bbpress' );
|
138 |
+
$sql_meta = implode( "', '", $sql_meta );
|
139 |
+
$sql_delete = "DELETE FROM `{$bbp_db->postmeta}` WHERE `post_id` IN ('{$sql_meta}')";
|
140 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
141 |
+
$messages[] = sprintf( $statement, $result );
|
142 |
+
}
|
143 |
+
|
144 |
+
/** Post Revisions ********************************************************/
|
145 |
+
|
146 |
+
if ( ! empty( $sql_posts ) ) {
|
147 |
+
$sql_meta = array();
|
148 |
+
foreach ( $sql_posts as $key => $value ) {
|
149 |
+
$sql_meta[] = $key;
|
150 |
+
}
|
151 |
+
$statement = __( 'Deleting Post Revisions… %s', 'bbpress' );
|
152 |
+
$sql_meta = implode( "', '", $sql_meta );
|
153 |
+
$sql_delete = "DELETE FROM `{$bbp_db->posts}` WHERE `post_parent` IN ('{$sql_meta}') AND `post_type` = 'revision'";
|
154 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
155 |
+
$messages[] = sprintf( $statement, $result );
|
156 |
+
}
|
157 |
+
|
158 |
+
/** Forum moderators ******************************************************/
|
159 |
+
|
160 |
+
$statement = __( 'Deleting Forum Moderators… %s', 'bbpress' );
|
161 |
+
$sql_delete = "DELETE a,b,c FROM `{$bbp_db->terms}` AS a LEFT JOIN `{$bbp_db->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$bbp_db->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'forum-mod'";
|
162 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
163 |
+
$messages[] = sprintf( $statement, $result );
|
164 |
+
|
165 |
+
/** Topic Tags ************************************************************/
|
166 |
+
|
167 |
+
$statement = __( 'Deleting Topic Tags… %s', 'bbpress' );
|
168 |
+
$sql_delete = "DELETE a,b,c FROM `{$bbp_db->terms}` AS a LEFT JOIN `{$bbp_db->term_taxonomy}` AS c ON a.term_id = c.term_id LEFT JOIN `{$bbp_db->term_relationships}` AS b ON b.term_taxonomy_id = c.term_taxonomy_id WHERE c.taxonomy = 'topic-tag'";
|
169 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
170 |
+
$messages[] = sprintf( $statement, $result );
|
171 |
+
|
172 |
+
/** User ******************************************************************/
|
173 |
+
|
174 |
+
// First, if we're deleting previously imported users, delete them now
|
175 |
+
if ( ! empty( $_POST['bbpress-delete-imported-users'] ) ) {
|
176 |
+
$sql_users = $bbp_db->get_results( "SELECT `user_id` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '_bbp_old_user_id'", OBJECT_K );
|
177 |
+
if ( ! empty( $sql_users ) ) {
|
178 |
+
$sql_meta = array();
|
179 |
+
foreach ( $sql_users as $key => $value ) {
|
180 |
+
$sql_meta[] = $key;
|
181 |
+
}
|
182 |
+
$statement = __( 'Deleting Imported Users… %s', 'bbpress' );
|
183 |
+
$sql_meta = implode( "', '", $sql_meta );
|
184 |
+
$sql_delete = "DELETE FROM `{$bbp_db->users}` WHERE `ID` IN ('{$sql_meta}')";
|
185 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
186 |
+
$messages[] = sprintf( $statement, $result );
|
187 |
+
$statement = __( 'Deleting Imported User Meta… %s', 'bbpress' );
|
188 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `user_id` IN ('{$sql_meta}')";
|
189 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
190 |
+
$messages[] = sprintf( $statement, $result );
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
// Next, if we still have users that were not imported delete that meta data
|
195 |
+
$statement = __( 'Deleting User Meta… %s', 'bbpress' );
|
196 |
+
$sql_delete = "DELETE FROM `{$bbp_db->usermeta}` WHERE `meta_key` LIKE '%%_bbp_%%'";
|
197 |
+
$result = is_wp_error( $bbp_db->query( $sql_delete ) ) ? $failed : $success;
|
198 |
+
$messages[] = sprintf( $statement, $result );
|
199 |
+
|
200 |
+
/** Converter *************************************************************/
|
201 |
+
|
202 |
+
$statement = __( 'Deleting Conversion Table… %s', 'bbpress' );
|
203 |
+
$table_name = $bbp_db->prefix . 'bbp_converter_translator';
|
204 |
+
if ( $bbp_db->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) {
|
205 |
+
$bbp_db->query( "DROP TABLE {$table_name}" );
|
206 |
+
$result = $success;
|
207 |
+
} else {
|
208 |
+
$result = $failed;
|
209 |
+
}
|
210 |
+
$messages[] = sprintf( $statement, $result );
|
211 |
+
|
212 |
+
/** Options ***************************************************************/
|
213 |
+
|
214 |
+
$statement = __( 'Deleting Settings… %s', 'bbpress' );
|
215 |
+
bbp_delete_options();
|
216 |
+
$messages[] = sprintf( $statement, $success );
|
217 |
+
|
218 |
+
/** Roles *****************************************************************/
|
219 |
+
|
220 |
+
$statement = __( 'Deleting Roles and Capabilities… %s', 'bbpress' );
|
221 |
+
bbp_remove_roles();
|
222 |
+
bbp_remove_caps();
|
223 |
+
$messages[] = sprintf( $statement, $success );
|
224 |
+
|
225 |
+
/** Output ****************************************************************/
|
226 |
+
|
227 |
+
if ( count( $messages ) ) {
|
228 |
+
foreach ( $messages as $message ) {
|
229 |
+
bbp_admin_tools_feedback( $message );
|
230 |
+
}
|
231 |
+
}
|
232 |
+
}
|
includes/admin/tools/upgrades.php
ADDED
@@ -0,0 +1,630 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Admin Upgrade Functions
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Administration
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Admin repair page
|
15 |
+
*
|
16 |
+
* @since 2.6.0 bbPress (r6278)
|
17 |
+
*
|
18 |
+
* @uses bbp_admin_repair_list() To get the recount list
|
19 |
+
* @uses check_admin_referer() To verify the nonce and the referer
|
20 |
+
* @uses wp_cache_flush() To flush the cache
|
21 |
+
* @uses do_action() Calls 'admin_notices' to display the notices
|
22 |
+
* @uses wp_nonce_field() To add a hidden nonce field
|
23 |
+
*/
|
24 |
+
function bbp_admin_upgrade_page() {
|
25 |
+
|
26 |
+
// Get the registered upgrade tools
|
27 |
+
$tools = bbp_admin_repair_list( 'upgrade' ); ?>
|
28 |
+
|
29 |
+
<div class="wrap">
|
30 |
+
<h1><?php esc_html_e( 'Forum Tools', 'bbpress' ); ?></h1>
|
31 |
+
<h2 class="nav-tab-wrapper"><?php bbp_tools_admin_tabs( __( 'Upgrade Forums', 'bbpress' ) ); ?></h2>
|
32 |
+
|
33 |
+
<p><?php esc_html_e( 'As bbPress improves, occasionally database upgrades are required but some forums are too large to upgrade automatically. Use the tools below to manually run upgrade routines.', 'bbpress' ); ?></p>
|
34 |
+
<p class="description"><?php esc_html_e( 'Some of these tools create substantial database overhead. Use caution when running more than 1 upgrade at a time.', 'bbpress' ); ?></p>
|
35 |
+
|
36 |
+
<?php bbp_admin_repair_tool_overhead_filters(); ?>
|
37 |
+
|
38 |
+
<form class="settings" method="get" action="">
|
39 |
+
|
40 |
+
<?php bbp_admin_repair_list_search_form(); ?>
|
41 |
+
|
42 |
+
<input type="hidden" name="page" value="bbp-upgrade" />
|
43 |
+
<?php wp_nonce_field( 'bbpress-do-counts' ); ?>
|
44 |
+
|
45 |
+
<div class="tablenav top">
|
46 |
+
<div class="alignleft actions bulkactions">
|
47 |
+
<label for="bulk-action-selector-top" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
48 |
+
<select name="action" id="bulk-action-selector-top">
|
49 |
+
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
50 |
+
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
51 |
+
</select>
|
52 |
+
<input type="submit" id="doaction" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
53 |
+
</div>
|
54 |
+
<div class="alignleft actions">
|
55 |
+
|
56 |
+
<?php bbp_admin_repair_list_components_filter(); ?>
|
57 |
+
|
58 |
+
</div>
|
59 |
+
<br class="clear">
|
60 |
+
</div>
|
61 |
+
<table class="wp-list-table widefat striped posts">
|
62 |
+
<thead>
|
63 |
+
<tr>
|
64 |
+
<td id="cb" class="manage-column column-cb check-column">
|
65 |
+
<label class="screen-reader-text" for="cb-select-all-1">
|
66 |
+
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
67 |
+
</label>
|
68 |
+
<input id="cb-select-all-1" type="checkbox">
|
69 |
+
</td>
|
70 |
+
<th scope="col" id="description" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
71 |
+
<th scope="col" id="components" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
72 |
+
<th scope="col" id="overhead" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
73 |
+
</tr>
|
74 |
+
</thead>
|
75 |
+
|
76 |
+
<tbody id="the-list">
|
77 |
+
|
78 |
+
<?php if ( ! empty( $tools ) ) : ?>
|
79 |
+
|
80 |
+
<?php foreach ( $tools as $item ) : ?>
|
81 |
+
|
82 |
+
<tr id="bbp-repair-tools" class="inactive">
|
83 |
+
<th scope="row" class="check-column">
|
84 |
+
<label class="screen-reader-text" for="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>"></label>
|
85 |
+
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $item['id'] ); ?>" id="<?php echo esc_attr( str_replace( '_', '-', $item['id'] ) ); ?>">
|
86 |
+
</th>
|
87 |
+
<td class="bbp-tool-title column-primary column-description" data-colname="<?php esc_html_e( 'Description', 'bbpress' ); ?>">
|
88 |
+
<strong><?php echo esc_html( $item['description'] ); ?></strong>
|
89 |
+
<div class="row-actions hide-if-no-js">
|
90 |
+
<span class="run">
|
91 |
+
<a href="<?php bbp_admin_repair_tool_run_url( $item ); ?>" aria-label="<?php printf( esc_html__( 'Run %s', 'bbpress' ), $item['description'] ); ?>" id="<?php echo esc_attr( $item['id'] ); ?>" ><?php esc_html_e( 'Run', 'bbpress' ); ?></a>
|
92 |
+
</span>
|
93 |
+
</div>
|
94 |
+
<button type="button" class="toggle-row">
|
95 |
+
<span class="screen-reader-text"><?php esc_html_e( 'Show more details', 'bbpress' ); ?></span>
|
96 |
+
</button>
|
97 |
+
</td>
|
98 |
+
<td class="column-components desc" data-colname="<?php esc_html_e( 'Components', 'bbpress' ); ?>">
|
99 |
+
<div class="bbp-tool-overhead">
|
100 |
+
|
101 |
+
<?php echo implode( ', ', bbp_get_admin_repair_tool_components( $item ) ); ?>
|
102 |
+
|
103 |
+
</div>
|
104 |
+
</td>
|
105 |
+
<td class="column-overhead desc" data-colname="<?php esc_html_e( 'Overhead', 'bbpress' ); ?>">
|
106 |
+
<div class="bbp-tool-overhead">
|
107 |
+
|
108 |
+
<?php echo implode( ', ', bbp_get_admin_repair_tool_overhead( $item ) ); ?>
|
109 |
+
|
110 |
+
</div>
|
111 |
+
</td>
|
112 |
+
</tr>
|
113 |
+
|
114 |
+
<?php endforeach; ?>
|
115 |
+
|
116 |
+
<?php else : ?>
|
117 |
+
|
118 |
+
<tr>
|
119 |
+
<td colspan="4">
|
120 |
+
<?php esc_html_e( 'No repair tools match this criteria.', 'bbpress' ); ?>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
|
124 |
+
<?php endif; ?>
|
125 |
+
|
126 |
+
</tbody>
|
127 |
+
<tfoot>
|
128 |
+
<tr>
|
129 |
+
<td class="manage-column column-cb check-column">
|
130 |
+
<label class="screen-reader-text" for="cb-select-all-2">
|
131 |
+
<?php esc_html_e( 'Select All', 'bbpress' ); ?>
|
132 |
+
</label>
|
133 |
+
<input id="cb-select-all-2" type="checkbox">
|
134 |
+
</td>
|
135 |
+
<th scope="col" class="manage-column column-primary column-description"><?php esc_html_e( 'Description', 'bbpress' ); ?></th>
|
136 |
+
<th scope="col" class="manage-column column-components"><?php esc_html_e( 'Components', 'bbpress' ); ?></th>
|
137 |
+
<th scope="col" class="manage-column column-overhead"><?php esc_html_e( 'Overhead', 'bbpress' ); ?></th>
|
138 |
+
</tr>
|
139 |
+
</tfoot>
|
140 |
+
</table>
|
141 |
+
<div class="tablenav bottom">
|
142 |
+
<div class="alignleft actions bulkactions">
|
143 |
+
<label for="bulk-action-selector-bottom" class="screen-reader-text"><?php esc_html_e( 'Select bulk action', 'bbpress' ); ?></label>
|
144 |
+
<select name="action2" id="bulk-action-selector-bottom">
|
145 |
+
<option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'bbpress' ); ?></option>
|
146 |
+
<option value="run" class="hide-if-no-js"><?php esc_html_e( 'Run', 'bbpress' ); ?></option>
|
147 |
+
</select>
|
148 |
+
<input type="submit" id="doaction2" class="button action" value="<?php esc_attr_e( 'Apply', 'bbpress' ); ?>">
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
</form>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<?php
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Upgrade user engagements for bbPress 2.6 and higher
|
159 |
+
*
|
160 |
+
* @since 2.6.0 bbPress (r6320)
|
161 |
+
*
|
162 |
+
* @return array An array of the status code and the message
|
163 |
+
*/
|
164 |
+
function bbp_admin_upgrade_user_engagements() {
|
165 |
+
|
166 |
+
// Define variables
|
167 |
+
$bbp_db = bbp_db();
|
168 |
+
$statement = __( 'Upgrading user engagements … %s', 'bbpress' );
|
169 |
+
$result = __( 'No engagements to upgrade.', 'bbpress' );
|
170 |
+
|
171 |
+
// Delete previous engagements
|
172 |
+
$sql_delete = "DELETE FROM {$bbp_db->postmeta} WHERE meta_key = '_bbp_engagement'";
|
173 |
+
if ( is_wp_error( $bbp_db->query( $sql_delete ) ) ) {
|
174 |
+
return array( 1, sprintf( $statement, $result ) );
|
175 |
+
}
|
176 |
+
|
177 |
+
// Post types and status
|
178 |
+
$tpt = bbp_get_topic_post_type();
|
179 |
+
$rpt = bbp_get_reply_post_type();
|
180 |
+
$pps = bbp_get_public_status_id();
|
181 |
+
$cps = bbp_get_closed_status_id();
|
182 |
+
$sql = $bbp_db->prepare( "INSERT INTO {$bbp_db->postmeta} (post_id, meta_key, meta_value) (
|
183 |
+
SELECT postmeta.meta_value, '_bbp_engagement', posts.post_author
|
184 |
+
FROM {$bbp_db->posts} AS posts
|
185 |
+
LEFT JOIN {$bbp_db->postmeta} AS postmeta
|
186 |
+
ON posts.ID = postmeta.post_id
|
187 |
+
AND postmeta.meta_key = '_bbp_topic_id'
|
188 |
+
WHERE posts.post_type IN (%s, %s)
|
189 |
+
AND posts.post_status IN (%s, %s)
|
190 |
+
GROUP BY postmeta.meta_value, posts.post_author)", $tpt, $rpt, $pps, $cps );
|
191 |
+
|
192 |
+
$engagements = $bbp_db->query( $sql );
|
193 |
+
|
194 |
+
// Bail if no closed topics found
|
195 |
+
if ( empty( $engagements ) || is_wp_error( $engagements ) ) {
|
196 |
+
return array( 1, sprintf( $statement, $result ) );
|
197 |
+
}
|
198 |
+
|
199 |
+
// Complete results
|
200 |
+
$result = sprintf( _n( 'Complete! %d engagements upgraded.', 'Complete! %d engagements upgraded.', $engagements, 'bbpress' ), $engagements );
|
201 |
+
|
202 |
+
return array( 0, sprintf( $statement, $result ) );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Upgrade group forum ID mappings after a bbPress 1.x to bbPress 2.x conversion
|
207 |
+
*
|
208 |
+
* Previously named: bbp_admin_repair_group_forum_relationships()
|
209 |
+
*
|
210 |
+
* @since 2.6.0 bbPress (r4395)
|
211 |
+
*
|
212 |
+
* @uses bbp_get_forum_post_type() To get the forum post type
|
213 |
+
* @return If a wp_error() occurs and no converted forums are found
|
214 |
+
*/
|
215 |
+
function bbp_admin_upgrade_group_forum_relationships() {
|
216 |
+
|
217 |
+
// Define variables
|
218 |
+
$bbp_db = bbp_db();
|
219 |
+
$statement = __( 'Upgrading BuddyPress group-forum relationships… %s', 'bbpress' );
|
220 |
+
$g_count = 0;
|
221 |
+
$f_count = 0;
|
222 |
+
$s_count = 0;
|
223 |
+
|
224 |
+
// Copy the BuddyPress filter here, incase BuddyPress is not active
|
225 |
+
$prefix = apply_filters( 'bp_core_get_table_prefix', $bbp_db->base_prefix );
|
226 |
+
$groups_table = $prefix . 'bp_groups';
|
227 |
+
$groups_meta_table = $prefix . 'bp_groups_groupmeta';
|
228 |
+
|
229 |
+
// Get the converted forum IDs
|
230 |
+
$forum_ids = $bbp_db->query( "SELECT `forum`.`ID`, `forummeta`.`meta_value`
|
231 |
+
FROM `{$bbp_db->posts}` AS `forum`
|
232 |
+
LEFT JOIN `{$bbp_db->postmeta}` AS `forummeta`
|
233 |
+
ON `forum`.`ID` = `forummeta`.`post_id`
|
234 |
+
AND `forummeta`.`meta_key` = '_bbp_old_forum_id'
|
235 |
+
WHERE `forum`.`post_type` = '" . bbp_get_forum_post_type() . "'
|
236 |
+
GROUP BY `forum`.`ID`" );
|
237 |
+
|
238 |
+
// Bail if forum IDs returned an error
|
239 |
+
if ( is_wp_error( $forum_ids ) || empty( $bbp_db->last_result ) ) {
|
240 |
+
return array( 2, sprintf( $statement, __( 'Failed!', 'bbpress' ) ) );
|
241 |
+
}
|
242 |
+
|
243 |
+
// Stash the last results
|
244 |
+
$results = $bbp_db->last_result;
|
245 |
+
|
246 |
+
// Update each group forum
|
247 |
+
foreach ( $results as $group_forums ) {
|
248 |
+
|
249 |
+
// Only update if is a converted forum
|
250 |
+
if ( empty( $group_forums->meta_value ) ) {
|
251 |
+
continue;
|
252 |
+
}
|
253 |
+
|
254 |
+
// Attempt to update group meta
|
255 |
+
$updated = $bbp_db->query( "UPDATE `{$groups_meta_table}` SET `meta_value` = '{$group_forums->ID}' WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->meta_value}'" );
|
256 |
+
|
257 |
+
// Bump the count
|
258 |
+
if ( ! empty( $updated ) && ! is_wp_error( $updated ) ) {
|
259 |
+
++$g_count;
|
260 |
+
}
|
261 |
+
|
262 |
+
// Update group to forum relationship data
|
263 |
+
$group_id = (int) $bbp_db->get_var( "SELECT `group_id` FROM `{$groups_meta_table}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}'" );
|
264 |
+
if ( ! empty( $group_id ) ) {
|
265 |
+
|
266 |
+
// Update the group to forum meta connection in forums
|
267 |
+
update_post_meta( $group_forums->ID, '_bbp_group_ids', array( $group_id ) );
|
268 |
+
|
269 |
+
// Get the group status
|
270 |
+
$group_status = $bbp_db->get_var( "SELECT `status` FROM `{$groups_table}` WHERE `id` = '{$group_id}'" );
|
271 |
+
|
272 |
+
// Sync up forum visibility based on group status
|
273 |
+
switch ( $group_status ) {
|
274 |
+
|
275 |
+
// Public groups have public forums
|
276 |
+
case 'public' :
|
277 |
+
bbp_publicize_forum( $group_forums->ID );
|
278 |
+
|
279 |
+
// Bump the count for output later
|
280 |
+
++$s_count;
|
281 |
+
break;
|
282 |
+
|
283 |
+
// Private/hidden groups have hidden forums
|
284 |
+
case 'private' :
|
285 |
+
case 'hidden' :
|
286 |
+
bbp_hide_forum( $group_forums->ID );
|
287 |
+
|
288 |
+
// Bump the count for output later
|
289 |
+
++$s_count;
|
290 |
+
break;
|
291 |
+
}
|
292 |
+
|
293 |
+
// Bump the count for output later
|
294 |
+
++$f_count;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
// Make some logical guesses at the old group root forum
|
299 |
+
if ( function_exists( 'bp_forums_parent_forum_id' ) ) {
|
300 |
+
$old_default_forum_id = bp_forums_parent_forum_id();
|
301 |
+
} elseif ( defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) {
|
302 |
+
$old_default_forum_id = (int) BP_FORUMS_PARENT_FORUM_ID;
|
303 |
+
} else {
|
304 |
+
$old_default_forum_id = 1;
|
305 |
+
}
|
306 |
+
|
307 |
+
// Try to get the group root forum
|
308 |
+
$posts = get_posts( array(
|
309 |
+
'post_type' => bbp_get_forum_post_type(),
|
310 |
+
'meta_key' => '_bbp_old_forum_id',
|
311 |
+
'meta_type' => 'NUMERIC',
|
312 |
+
'meta_value' => $old_default_forum_id,
|
313 |
+
'numberposts' => 1
|
314 |
+
) );
|
315 |
+
|
316 |
+
// Found the group root forum
|
317 |
+
if ( ! empty( $posts ) ) {
|
318 |
+
|
319 |
+
// Rename 'Default Forum' since it's now visible in sitewide forums
|
320 |
+
if ( 'Default Forum' === $posts[0]->post_title ) {
|
321 |
+
wp_update_post( array(
|
322 |
+
'ID' => $posts[0]->ID,
|
323 |
+
'post_title' => __( 'Group Forums', 'bbpress' ),
|
324 |
+
'post_name' => __( 'group-forums', 'bbpress' ),
|
325 |
+
) );
|
326 |
+
}
|
327 |
+
|
328 |
+
// Update the group forums root metadata
|
329 |
+
update_option( '_bbp_group_forums_root_id', $posts[0]->ID );
|
330 |
+
}
|
331 |
+
|
332 |
+
// Remove old bbPress 1.1 roles (BuddyPress)
|
333 |
+
remove_role( 'member' );
|
334 |
+
remove_role( 'inactive' );
|
335 |
+
remove_role( 'blocked' );
|
336 |
+
remove_role( 'moderator' );
|
337 |
+
remove_role( 'keymaster' );
|
338 |
+
|
339 |
+
// Complete results
|
340 |
+
$result = sprintf( __( 'Complete! %s groups updated; %s forums updated; %s forum statuses synced.', 'bbpress' ), bbp_number_format( $g_count ), bbp_number_format( $f_count ), bbp_number_format( $s_count ) );
|
341 |
+
return array( 0, sprintf( $statement, $result ) );
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Upgrade user favorites for bbPress 2.6 and higher
|
346 |
+
*
|
347 |
+
* @since 2.6.0 bbPress (r6174)
|
348 |
+
*
|
349 |
+
* @return array An array of the status code and the message
|
350 |
+
*/
|
351 |
+
function bbp_admin_upgrade_user_favorites() {
|
352 |
+
|
353 |
+
// Define variables
|
354 |
+
$bbp_db = bbp_db();
|
355 |
+
$statement = __( 'Upgrading user favorites … %s', 'bbpress' );
|
356 |
+
$result = __( 'No favorites to upgrade.', 'bbpress' );
|
357 |
+
$total = 0;
|
358 |
+
$key = $bbp_db->prefix . '_bbp_favorites';
|
359 |
+
$favs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s", $key ) );
|
360 |
+
|
361 |
+
// Bail if no closed topics found
|
362 |
+
if ( empty( $favs ) || is_wp_error( $favs ) ) {
|
363 |
+
return array( 1, sprintf( $statement, $result ) );
|
364 |
+
}
|
365 |
+
|
366 |
+
// Loop through each user's favorites
|
367 |
+
foreach ( $favs as $meta ) {
|
368 |
+
|
369 |
+
// Get post IDs
|
370 |
+
$post_ids = explode( ',', $meta->meta_value );
|
371 |
+
|
372 |
+
// Add user ID to all favorited posts
|
373 |
+
foreach ( $post_ids as $post_id ) {
|
374 |
+
|
375 |
+
// Skip if already exists
|
376 |
+
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, '_bbp_favorite', $meta->user_id ) ) ) {
|
377 |
+
continue;
|
378 |
+
}
|
379 |
+
|
380 |
+
// Add the post meta
|
381 |
+
$added = add_post_meta( $post_id, '_bbp_favorite', $meta->user_id, false );
|
382 |
+
|
383 |
+
// Bump counts if successfully added
|
384 |
+
if ( ! empty( $added ) ) {
|
385 |
+
++$total;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
// Cleanup
|
391 |
+
unset( $favs, $added, $post_ids );
|
392 |
+
|
393 |
+
// Complete results
|
394 |
+
$result = sprintf( _n( 'Complete! %d favorite upgraded.', 'Complete! %d favorites upgraded.', $total, 'bbpress' ), $total );
|
395 |
+
|
396 |
+
return array( 0, sprintf( $statement, $result ) );
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Upgrade user topic subscriptions for bbPress 2.6 and higher
|
401 |
+
*
|
402 |
+
* @since 2.6.0 bbPress (r6174)
|
403 |
+
*
|
404 |
+
* @return array An array of the status code and the message
|
405 |
+
*/
|
406 |
+
function bbp_admin_upgrade_user_topic_subscriptions() {
|
407 |
+
|
408 |
+
// Define variables
|
409 |
+
$bbp_db = bbp_db();
|
410 |
+
$statement = __( 'Upgrading user topic subscriptions … %s', 'bbpress' );
|
411 |
+
$result = __( 'No topic subscriptions to upgrade.', 'bbpress' );
|
412 |
+
$total = 0;
|
413 |
+
$key = $bbp_db->prefix . '_bbp_subscriptions';
|
414 |
+
$subs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
415 |
+
|
416 |
+
// Bail if no topic subscriptions found
|
417 |
+
if ( empty( $subs ) || is_wp_error( $subs ) ) {
|
418 |
+
return array( 1, sprintf( $statement, $result ) );
|
419 |
+
}
|
420 |
+
|
421 |
+
// Loop through each user's topic subscriptions
|
422 |
+
foreach ( $subs as $meta ) {
|
423 |
+
|
424 |
+
// Get post IDs
|
425 |
+
$post_ids = explode( ',', $meta->meta_value );
|
426 |
+
|
427 |
+
// Add user ID to all subscribed topics
|
428 |
+
foreach ( $post_ids as $post_id ) {
|
429 |
+
|
430 |
+
// Skip if already exists
|
431 |
+
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, '_bbp_subscription', $meta->user_id ) ) ) {
|
432 |
+
continue;
|
433 |
+
}
|
434 |
+
|
435 |
+
// Add the post meta
|
436 |
+
$added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false );
|
437 |
+
|
438 |
+
// Bump counts if successfully added
|
439 |
+
if ( ! empty( $added ) ) {
|
440 |
+
++$total;
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
// Cleanup
|
446 |
+
unset( $subs, $added, $post_ids );
|
447 |
+
|
448 |
+
// Complete results
|
449 |
+
$result = sprintf( _n( 'Complete! %d topic subscription upgraded.', 'Complete! %d topic subscriptions upgraded.', $total, 'bbpress' ), $total );
|
450 |
+
|
451 |
+
return array( 0, sprintf( $statement, $result ) );
|
452 |
+
}
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Upgrade user forum subscriptions for bbPress 2.6 and higher
|
456 |
+
*
|
457 |
+
* @since 2.6.0 bbPress (r6193)
|
458 |
+
*
|
459 |
+
* @return array An array of the status code and the message
|
460 |
+
*/
|
461 |
+
function bbp_admin_upgrade_user_forum_subscriptions() {
|
462 |
+
|
463 |
+
// Define variables
|
464 |
+
$bbp_db = bbp_db();
|
465 |
+
$statement = __( 'Upgrading user forum subscriptions … %s', 'bbpress' );
|
466 |
+
$result = __( 'No forum subscriptions to upgrade.', 'bbpress' );
|
467 |
+
$total = 0;
|
468 |
+
$key = $bbp_db->prefix . '_bbp_forum_subscriptions';
|
469 |
+
$subs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
470 |
+
|
471 |
+
// Bail if no forum subscriptions found
|
472 |
+
if ( empty( $subs ) || is_wp_error( $subs ) ) {
|
473 |
+
return array( 1, sprintf( $statement, $result ) );
|
474 |
+
}
|
475 |
+
|
476 |
+
// Loop through each user's forum subscriptions
|
477 |
+
foreach ( $subs as $meta ) {
|
478 |
+
|
479 |
+
// Get post IDs
|
480 |
+
$post_ids = explode( ',', $meta->meta_value );
|
481 |
+
|
482 |
+
// Add user ID to all subscribed forums
|
483 |
+
foreach ( $post_ids as $post_id ) {
|
484 |
+
|
485 |
+
// Skip if already exists
|
486 |
+
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, '_bbp_forum_subscription', $meta->user_id ) ) ) {
|
487 |
+
continue;
|
488 |
+
}
|
489 |
+
|
490 |
+
// Add the post meta
|
491 |
+
$added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false );
|
492 |
+
|
493 |
+
// Bump counts if successfully added
|
494 |
+
if ( ! empty( $added ) ) {
|
495 |
+
++$total;
|
496 |
+
}
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
500 |
+
// Cleanup
|
501 |
+
unset( $subs, $added, $post_ids );
|
502 |
+
|
503 |
+
// Complete results
|
504 |
+
$result = sprintf( _n( 'Complete! %d forum subscription upgraded.', 'Complete! %d forum subscriptions upgraded.', $total, 'bbpress' ), $total );
|
505 |
+
|
506 |
+
return array( 0, sprintf( $statement, $result ) );
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Remove favorites data from wp_usermeta for bbPress 2.6 and higher
|
511 |
+
*
|
512 |
+
* @since 2.6.0 bbPress (r6281)
|
513 |
+
*
|
514 |
+
* @return array An array of the status code and the message
|
515 |
+
*/
|
516 |
+
function bbp_admin_upgrade_remove_favorites_from_usermeta() {
|
517 |
+
|
518 |
+
// Define variables
|
519 |
+
$bbp_db = bbp_db();
|
520 |
+
$statement = __( 'Remove favorites from usermeta … %s', 'bbpress' );
|
521 |
+
$result = __( 'No favorites to remove.', 'bbpress' );
|
522 |
+
$total = 0;
|
523 |
+
$key = $bbp_db->prefix . '_bbp_favorites';
|
524 |
+
$favs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
525 |
+
|
526 |
+
// Bail if no favorites found
|
527 |
+
if ( empty( $favs ) || is_wp_error( $favs ) ) {
|
528 |
+
return array( 1, sprintf( $statement, $result ) );
|
529 |
+
}
|
530 |
+
|
531 |
+
// Loop through each user's favorites
|
532 |
+
foreach ( $favs as $meta ) {
|
533 |
+
|
534 |
+
// Get post IDs
|
535 |
+
$post_ids = explode( ',', $meta->meta_value );
|
536 |
+
$total = $total + count( $post_ids );
|
537 |
+
|
538 |
+
delete_metadata_by_mid( 'user', $meta->umeta_id );
|
539 |
+
}
|
540 |
+
|
541 |
+
// Cleanup
|
542 |
+
unset( $favs, $post_ids );
|
543 |
+
|
544 |
+
// Complete results
|
545 |
+
$result = sprintf( _n( 'Complete! %d favorites upgraded.', 'Complete! %d favorites upgraded.', $total, 'bbpress' ), $total );
|
546 |
+
|
547 |
+
return array( 0, sprintf( $statement, $result ) );
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Remove topic subscriptions data from wp_usermeta for bbPress 2.6 and higher
|
552 |
+
*
|
553 |
+
* @since 2.6.0 bbPress (r6281)
|
554 |
+
*
|
555 |
+
* @return array An array of the status code and the message
|
556 |
+
*/
|
557 |
+
function bbp_admin_upgrade_remove_topic_subscriptions_from_usermeta() {
|
558 |
+
|
559 |
+
// Define variables
|
560 |
+
$bbp_db = bbp_db();
|
561 |
+
$statement = __( 'Remove topic subscriptions from usermeta … %s', 'bbpress' );
|
562 |
+
$result = __( 'No topic subscriptions to remove.', 'bbpress' );
|
563 |
+
$total = 0;
|
564 |
+
$key = $bbp_db->prefix . '_bbp_subscriptions';
|
565 |
+
$subs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
566 |
+
|
567 |
+
// Bail if no forum favorites found
|
568 |
+
if ( empty( $subs ) || is_wp_error( $subs ) ) {
|
569 |
+
return array( 1, sprintf( $statement, $result ) );
|
570 |
+
}
|
571 |
+
|
572 |
+
// Loop through each user's favorites
|
573 |
+
foreach ( $subs as $meta ) {
|
574 |
+
|
575 |
+
// Get post IDs
|
576 |
+
$post_ids = explode( ',', $meta->meta_value );
|
577 |
+
$total = $total + count( $post_ids );
|
578 |
+
|
579 |
+
delete_metadata_by_mid( 'user', $meta->umeta_id );
|
580 |
+
}
|
581 |
+
|
582 |
+
// Cleanup
|
583 |
+
unset( $subs, $post_ids );
|
584 |
+
|
585 |
+
// Complete results
|
586 |
+
$result = sprintf( _n( 'Complete! %d topic subscription upgraded.', 'Complete! %d topic subscriptions upgraded.', $total, 'bbpress' ), $total );
|
587 |
+
|
588 |
+
return array( 0, sprintf( $statement, $result ) );
|
589 |
+
}
|
590 |
+
|
591 |
+
/**
|
592 |
+
* Remove topic subscriptions data from wp_usermeta for bbPress 2.6 and higher
|
593 |
+
*
|
594 |
+
* @since 2.6.0 bbPress (r6281)
|
595 |
+
*
|
596 |
+
* @return array An array of the status code and the message
|
597 |
+
*/
|
598 |
+
function bbp_admin_upgrade_remove_forum_subscriptions_from_usermeta() {
|
599 |
+
|
600 |
+
// Define variables
|
601 |
+
$bbp_db = bbp_db();
|
602 |
+
$statement = __( 'Remove forum subscriptions from usermeta … %s', 'bbpress' );
|
603 |
+
$result = __( 'No forum subscriptions to remove.', 'bbpress' );
|
604 |
+
$total = 0;
|
605 |
+
$key = $bbp_db->prefix . '_bbp_forum_subscriptions';
|
606 |
+
$subs = $bbp_db->get_results( $bbp_db->prepare( "SELECT * FROM {$bbp_db->usermeta} WHERE meta_key = %s ORDER BY user_id", $key ) );
|
607 |
+
|
608 |
+
// Bail if no forum favorites found
|
609 |
+
if ( empty( $subs ) || is_wp_error( $subs ) ) {
|
610 |
+
return array( 1, sprintf( $statement, $result ) );
|
611 |
+
}
|
612 |
+
|
613 |
+
// Loop through each user's favorites
|
614 |
+
foreach ( $subs as $meta ) {
|
615 |
+
|
616 |
+
// Get post IDs
|
617 |
+
$post_ids = explode( ',', $meta->meta_value );
|
618 |
+
$total = $total + count( $post_ids );
|
619 |
+
|
620 |
+
delete_metadata_by_mid( 'user', $meta->umeta_id );
|
621 |
+
}
|
622 |
+
|
623 |
+
// Cleanup
|
624 |
+
unset( $subs, $post_ids );
|
625 |
+
|
626 |
+
// Complete results
|
627 |
+
$result = sprintf( _n( 'Complete! %d forum subscription upgraded.', 'Complete! %d forum subscriptions upgraded.', $total, 'bbpress' ), $total );
|
628 |
+
|
629 |
+
return array( 0, sprintf( $statement, $result ) );
|
630 |
+
}
|
includes/admin/topics.php
CHANGED
@@ -76,10 +76,11 @@ class BBP_Topics_Admin {
|
|
76 |
add_action( 'manage_' . $this->post_type . '_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
|
77 |
add_filter( 'post_row_actions', array( $this, 'row_actions' ), 10, 2 );
|
78 |
|
79 |
-
// Topic
|
80 |
add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) );
|
81 |
add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
|
82 |
add_action( 'add_meta_boxes', array( $this, 'replies_metabox' ) );
|
|
|
83 |
add_action( 'add_meta_boxes', array( $this, 'favorites_metabox' ) );
|
84 |
add_action( 'add_meta_boxes', array( $this, 'subscriptions_metabox' ) );
|
85 |
add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) );
|
@@ -332,12 +333,12 @@ class BBP_Topics_Admin {
|
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
-
* Add the topic attributes
|
336 |
*
|
337 |
* @since 2.0.0 bbPress (r2744)
|
338 |
*
|
339 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
340 |
-
* @uses add_meta_box() To add the
|
341 |
* @uses do_action() Calls 'bbp_topic_attributes_metabox'
|
342 |
*/
|
343 |
public function attributes_metabox() {
|
@@ -352,11 +353,11 @@ class BBP_Topics_Admin {
|
|
352 |
}
|
353 |
|
354 |
/**
|
355 |
-
* Add the author info
|
356 |
*
|
357 |
* @since 2.0.0 bbPress (r2828)
|
358 |
*
|
359 |
-
* @uses add_meta_box() To add the
|
360 |
*/
|
361 |
public function author_metabox() {
|
362 |
|
@@ -365,7 +366,7 @@ class BBP_Topics_Admin {
|
|
365 |
return;
|
366 |
}
|
367 |
|
368 |
-
// Add the
|
369 |
add_meta_box(
|
370 |
'bbp_author_metabox',
|
371 |
__( 'Author Information', 'bbpress' ),
|
@@ -377,7 +378,7 @@ class BBP_Topics_Admin {
|
|
377 |
}
|
378 |
|
379 |
/**
|
380 |
-
* Add the replies
|
381 |
*
|
382 |
* Allows viewing & moderating of replies to a topic, based on the way
|
383 |
* comments are visible on a blog post.
|
@@ -388,7 +389,7 @@ class BBP_Topics_Admin {
|
|
388 |
* @uses bbp_get_reply() To get the reply
|
389 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
390 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
391 |
-
* @uses add_meta_box() To add the
|
392 |
* @uses do_action() Calls 'bbp_author_metabox' with the topic/reply
|
393 |
* id
|
394 |
*/
|
@@ -399,7 +400,7 @@ class BBP_Topics_Admin {
|
|
399 |
return;
|
400 |
}
|
401 |
|
402 |
-
// Add the
|
403 |
add_meta_box(
|
404 |
'bbp_topic_replies_metabox',
|
405 |
__( 'Replies', 'bbpress' ),
|
@@ -411,13 +412,45 @@ class BBP_Topics_Admin {
|
|
411 |
}
|
412 |
|
413 |
/**
|
414 |
-
* Add the
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
*
|
416 |
* Allows viewing of users who have favorited a topic.
|
417 |
*
|
418 |
* @since 2.6.0 bbPress (r6197)
|
419 |
*
|
420 |
-
* @uses add_meta_box() To add the
|
421 |
*/
|
422 |
public function favorites_metabox() {
|
423 |
|
@@ -431,7 +464,7 @@ class BBP_Topics_Admin {
|
|
431 |
return;
|
432 |
}
|
433 |
|
434 |
-
// Add the
|
435 |
add_meta_box(
|
436 |
'bbp_topic_favorites_metabox',
|
437 |
__( 'Favorites', 'bbpress' ),
|
@@ -443,13 +476,13 @@ class BBP_Topics_Admin {
|
|
443 |
}
|
444 |
|
445 |
/**
|
446 |
-
* Add the subscriptions
|
447 |
*
|
448 |
* Allows viewing of users who have subscribed to a topic.
|
449 |
*
|
450 |
* @since 2.6.0 bbPress (r6197)
|
451 |
*
|
452 |
-
* @uses add_meta_box() To add the
|
453 |
*/
|
454 |
public function subscriptions_metabox() {
|
455 |
|
@@ -463,7 +496,7 @@ class BBP_Topics_Admin {
|
|
463 |
return;
|
464 |
}
|
465 |
|
466 |
-
// Add the
|
467 |
add_meta_box(
|
468 |
'bbp_topic_subscriptions_metabox',
|
469 |
__( 'Subscriptions', 'bbpress' ),
|
@@ -475,7 +508,7 @@ class BBP_Topics_Admin {
|
|
475 |
}
|
476 |
|
477 |
/**
|
478 |
-
* Remove comments & discussion
|
479 |
*
|
480 |
* @since 2.6.0 bbPress (r6186)
|
481 |
*/
|
@@ -510,13 +543,18 @@ class BBP_Topics_Admin {
|
|
510 |
return $topic_id;
|
511 |
}
|
512 |
|
|
|
|
|
|
|
|
|
|
|
513 |
// Nonce check
|
514 |
if ( empty( $_POST['bbp_topic_metabox'] ) || ! wp_verify_nonce( $_POST['bbp_topic_metabox'], 'bbp_topic_metabox_save' ) ) {
|
515 |
return $topic_id;
|
516 |
}
|
517 |
|
518 |
// Bail if current user cannot edit this topic
|
519 |
-
if ( !current_user_can( 'edit_topic', $topic_id ) ) {
|
520 |
return $topic_id;
|
521 |
}
|
522 |
|
@@ -569,97 +607,113 @@ class BBP_Topics_Admin {
|
|
569 |
*/
|
570 |
public function toggle_topic() {
|
571 |
|
572 |
-
//
|
573 |
-
if ( bbp_is_get_request()
|
574 |
-
|
575 |
-
|
576 |
-
$success = false; // Flag
|
577 |
-
$post_data = array( 'ID' => $topic_id ); // Prelim array
|
578 |
-
$topic = bbp_get_topic( $topic_id ); // Verify the topic id
|
579 |
-
|
580 |
-
// Bail if topic is missing
|
581 |
-
if ( empty( $topic ) ) {
|
582 |
-
wp_die( __( 'The topic was not found.', 'bbpress' ) );
|
583 |
-
}
|
584 |
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
|
|
589 |
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
$message = ( true === $is_approve )
|
596 |
-
? 'approved'
|
597 |
-
: 'unapproved';
|
598 |
-
$success = ( true === $is_approve )
|
599 |
-
? bbp_approve_topic( $topic_id )
|
600 |
-
: bbp_unapprove_topic( $topic_id );
|
601 |
-
|
602 |
-
break;
|
603 |
-
|
604 |
-
case 'bbp_toggle_topic_close' :
|
605 |
-
check_admin_referer( 'close-topic_' . $topic_id );
|
606 |
-
|
607 |
-
$is_open = bbp_is_topic_open( $topic_id );
|
608 |
-
$message = ( true === $is_open )
|
609 |
-
? 'closed'
|
610 |
-
: 'opened';
|
611 |
-
$success = ( true === $is_open )
|
612 |
-
? bbp_close_topic( $topic_id )
|
613 |
-
: bbp_open_topic( $topic_id );
|
614 |
-
|
615 |
-
break;
|
616 |
-
|
617 |
-
case 'bbp_toggle_topic_stick' :
|
618 |
-
check_admin_referer( 'stick-topic_' . $topic_id );
|
619 |
-
|
620 |
-
$is_sticky = bbp_is_topic_sticky( $topic_id );
|
621 |
-
$is_super = ( false === $is_sticky ) && ! empty( $_GET['super'] ) && ( "1" === $_GET['super'] )
|
622 |
-
? true
|
623 |
-
: false;
|
624 |
-
$message = ( true === $is_sticky )
|
625 |
-
? 'unstuck'
|
626 |
-
: 'stuck';
|
627 |
-
$message = ( true === $is_super )
|
628 |
-
? 'super_sticky'
|
629 |
-
: $message;
|
630 |
-
$success = ( true === $is_sticky )
|
631 |
-
? bbp_unstick_topic( $topic_id )
|
632 |
-
: bbp_stick_topic( $topic_id, $is_super );
|
633 |
-
|
634 |
-
break;
|
635 |
-
|
636 |
-
case 'bbp_toggle_topic_spam' :
|
637 |
-
check_admin_referer( 'spam-topic_' . $topic_id );
|
638 |
-
|
639 |
-
$is_spam = bbp_is_topic_spam( $topic_id );
|
640 |
-
$message = ( true === $is_spam )
|
641 |
-
? 'unspammed'
|
642 |
-
: 'spammed';
|
643 |
-
$success = ( true === $is_spam )
|
644 |
-
? bbp_unspam_topic( $topic_id )
|
645 |
-
: bbp_spam_topic( $topic_id );
|
646 |
-
|
647 |
-
break;
|
648 |
-
}
|
649 |
|
650 |
-
|
|
|
|
|
|
|
651 |
|
652 |
-
|
653 |
-
|
654 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
|
656 |
-
|
657 |
-
|
658 |
|
659 |
-
|
660 |
-
|
661 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
662 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
}
|
664 |
|
665 |
/**
|
@@ -678,92 +732,144 @@ class BBP_Topics_Admin {
|
|
678 |
*/
|
679 |
public function toggle_topic_notice() {
|
680 |
|
681 |
-
//
|
682 |
-
if ( bbp_is_get_request()
|
683 |
-
|
684 |
-
|
685 |
-
$is_failure = ! empty( $_GET['failed'] ) ? true : false; // Was that a failure?
|
686 |
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
|
|
691 |
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
? sprintf( __( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title )
|
716 |
-
: sprintf( __( 'Topic "%1$s" successfully stuck to front.', 'bbpress' ), $topic_title );
|
717 |
-
break;
|
718 |
-
|
719 |
-
case 'stuck' :
|
720 |
-
$message = ( $is_failure === true )
|
721 |
-
? sprintf( __( 'There was a problem sticking the topic "%1$s".', 'bbpress' ), $topic_title )
|
722 |
-
: sprintf( __( 'Topic "%1$s" successfully stuck.', 'bbpress' ), $topic_title );
|
723 |
-
break;
|
724 |
-
|
725 |
-
case 'unstuck' :
|
726 |
-
$message = ( $is_failure === true )
|
727 |
-
? sprintf( __( 'There was a problem unsticking the topic "%1$s".', 'bbpress' ), $topic_title )
|
728 |
-
: sprintf( __( 'Topic "%1$s" successfully unstuck.', 'bbpress' ), $topic_title );
|
729 |
-
break;
|
730 |
-
|
731 |
-
case 'spammed' :
|
732 |
-
$message = ( $is_failure === true )
|
733 |
-
? sprintf( __( 'There was a problem marking the topic "%1$s" as spam.', 'bbpress' ), $topic_title )
|
734 |
-
: sprintf( __( 'Topic "%1$s" successfully marked as spam.', 'bbpress' ), $topic_title );
|
735 |
-
break;
|
736 |
-
|
737 |
-
case 'unspammed' :
|
738 |
-
$message = ( $is_failure === true )
|
739 |
-
? sprintf( __( 'There was a problem unmarking the topic "%1$s" as spam.', 'bbpress' ), $topic_title )
|
740 |
-
: sprintf( __( 'Topic "%1$s" successfully unmarked as spam.', 'bbpress' ), $topic_title );
|
741 |
-
break;
|
742 |
-
|
743 |
-
case 'approved' :
|
744 |
-
$message = ( $is_failure === true )
|
745 |
-
? sprintf( __( 'There was a problem approving the topic "%1$s".', 'bbpress' ), $topic_title )
|
746 |
-
: sprintf( __( 'Topic "%1$s" successfully approved.', 'bbpress' ), $topic_title );
|
747 |
-
break;
|
748 |
-
|
749 |
-
case 'unapproved' :
|
750 |
-
$message = ( $is_failure === true )
|
751 |
-
? sprintf( __( 'There was a problem unapproving the topic "%1$s".', 'bbpress' ), $topic_title )
|
752 |
-
: sprintf( __( 'Topic "%1$s" successfully unapproved.', 'bbpress' ), $topic_title );
|
753 |
-
break;
|
754 |
-
}
|
755 |
|
756 |
-
|
757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
758 |
|
759 |
-
|
|
|
|
|
|
|
|
|
760 |
|
761 |
-
|
762 |
-
|
763 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
764 |
|
765 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
}
|
768 |
|
769 |
/**
|
@@ -788,7 +894,8 @@ class BBP_Topics_Admin {
|
|
788 |
'bbp_topic_freshness' => __( 'Last Post', 'bbpress' )
|
789 |
);
|
790 |
|
791 |
-
|
|
|
792 |
}
|
793 |
|
794 |
/**
|
@@ -826,20 +933,21 @@ class BBP_Topics_Admin {
|
|
826 |
// Forum
|
827 |
case 'bbp_topic_forum' :
|
828 |
|
829 |
-
//
|
830 |
-
|
|
|
|
|
831 |
|
832 |
-
|
833 |
-
|
834 |
-
if ( empty( $forum_title ) ) {
|
835 |
-
$forum_title = esc_html__( 'No Forum', 'bbpress' );
|
836 |
-
}
|
837 |
-
|
838 |
-
// Output the title
|
839 |
echo $forum_title;
|
840 |
|
|
|
841 |
} else {
|
842 |
-
|
|
|
|
|
|
|
843 |
}
|
844 |
|
845 |
break;
|
@@ -917,9 +1025,17 @@ class BBP_Topics_Admin {
|
|
917 |
|
918 |
unset( $actions['inline hide-if-no-js'] );
|
919 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
920 |
// Show view link if it's not set, the topic is trashed and the user can view trashed topics
|
921 |
if ( empty( $actions['view'] ) && ( bbp_get_trash_status_id() === $topic->post_status ) && current_user_can( 'view_trash' ) ) {
|
922 |
-
$actions['view'] = '<a href="' . esc_url(
|
923 |
}
|
924 |
|
925 |
// Only show the actions if the user is capable of viewing them :)
|
@@ -932,12 +1048,12 @@ class BBP_Topics_Admin {
|
|
932 |
$actions['unapproved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Unapprove this topic', 'bbpress' ) . '">' . _x( 'Unapprove', 'Unapprove Topic', 'bbpress' ) . '</a>';
|
933 |
} elseif ( ! bbp_is_topic_private( $topic->ID ) ) {
|
934 |
$actions['approved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Approve this topic', 'bbpress' ) . '">' . _x( 'Approve', 'Approve Topic', 'bbpress' ) . '</a>';
|
935 |
-
$actions['view'] = '<a href="' . esc_url(
|
936 |
}
|
937 |
|
938 |
// Close
|
939 |
// Show the 'close' and 'open' link on published and closed posts only
|
940 |
-
if (
|
941 |
$close_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID );
|
942 |
if ( bbp_is_topic_open( $topic->ID ) ) {
|
943 |
$actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . _x( 'Close', 'Close a Topic', 'bbpress' ) . '</a>';
|
@@ -969,15 +1085,17 @@ class BBP_Topics_Admin {
|
|
969 |
|
970 |
// Do not show trash links for spam topics, or spam links for trashed topics
|
971 |
if ( current_user_can( 'delete_topic', $topic->ID ) ) {
|
|
|
|
|
972 |
if ( bbp_get_trash_status_id() === $topic->post_status ) {
|
973 |
$post_type_object = get_post_type_object( bbp_get_topic_post_type() );
|
974 |
-
$actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" .
|
975 |
-
} elseif (
|
976 |
-
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url(
|
977 |
}
|
978 |
|
979 |
-
if ( bbp_get_trash_status_id() === $topic->post_status ||
|
980 |
-
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url(
|
981 |
} elseif ( bbp_get_spam_status_id() === $topic->post_status ) {
|
982 |
unset( $actions['trash'] );
|
983 |
}
|
@@ -1017,7 +1135,7 @@ class BBP_Topics_Admin {
|
|
1017 |
// Show the forums dropdown
|
1018 |
bbp_dropdown( array(
|
1019 |
'selected' => $selected,
|
1020 |
-
'show_none' =>
|
1021 |
) );
|
1022 |
}
|
1023 |
|
76 |
add_action( 'manage_' . $this->post_type . '_posts_custom_column', array( $this, 'column_data' ), 10, 2 );
|
77 |
add_filter( 'post_row_actions', array( $this, 'row_actions' ), 10, 2 );
|
78 |
|
79 |
+
// Topic meta-box actions
|
80 |
add_action( 'add_meta_boxes', array( $this, 'attributes_metabox' ) );
|
81 |
add_action( 'add_meta_boxes', array( $this, 'author_metabox' ) );
|
82 |
add_action( 'add_meta_boxes', array( $this, 'replies_metabox' ) );
|
83 |
+
add_action( 'add_meta_boxes', array( $this, 'engagements_metabox' ) );
|
84 |
add_action( 'add_meta_boxes', array( $this, 'favorites_metabox' ) );
|
85 |
add_action( 'add_meta_boxes', array( $this, 'subscriptions_metabox' ) );
|
86 |
add_action( 'add_meta_boxes', array( $this, 'comments_metabox' ) );
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
+
* Add the topic attributes meta-box
|
337 |
*
|
338 |
* @since 2.0.0 bbPress (r2744)
|
339 |
*
|
340 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
341 |
+
* @uses add_meta_box() To add the meta-box
|
342 |
* @uses do_action() Calls 'bbp_topic_attributes_metabox'
|
343 |
*/
|
344 |
public function attributes_metabox() {
|
353 |
}
|
354 |
|
355 |
/**
|
356 |
+
* Add the author info meta-box
|
357 |
*
|
358 |
* @since 2.0.0 bbPress (r2828)
|
359 |
*
|
360 |
+
* @uses add_meta_box() To add the meta-box
|
361 |
*/
|
362 |
public function author_metabox() {
|
363 |
|
366 |
return;
|
367 |
}
|
368 |
|
369 |
+
// Add the meta-box
|
370 |
add_meta_box(
|
371 |
'bbp_author_metabox',
|
372 |
__( 'Author Information', 'bbpress' ),
|
378 |
}
|
379 |
|
380 |
/**
|
381 |
+
* Add the replies meta-box
|
382 |
*
|
383 |
* Allows viewing & moderating of replies to a topic, based on the way
|
384 |
* comments are visible on a blog post.
|
389 |
* @uses bbp_get_reply() To get the reply
|
390 |
* @uses bbp_get_topic_post_type() To get the topic post type
|
391 |
* @uses bbp_get_reply_post_type() To get the reply post type
|
392 |
+
* @uses add_meta_box() To add the meta-box
|
393 |
* @uses do_action() Calls 'bbp_author_metabox' with the topic/reply
|
394 |
* id
|
395 |
*/
|
400 |
return;
|
401 |
}
|
402 |
|
403 |
+
// Add the meta-box
|
404 |
add_meta_box(
|
405 |
'bbp_topic_replies_metabox',
|
406 |
__( 'Replies', 'bbpress' ),
|
412 |
}
|
413 |
|
414 |
/**
|
415 |
+
* Add the engagements meta-box
|
416 |
+
*
|
417 |
+
* Allows viewing of users who have engaged in a topic.
|
418 |
+
*
|
419 |
+
* @since 2.6.0 bbPress (r6333)
|
420 |
+
*
|
421 |
+
* @uses add_meta_box() To add the meta-box
|
422 |
+
*/
|
423 |
+
public function engagements_metabox() {
|
424 |
+
|
425 |
+
// Bail when creating a new topic
|
426 |
+
if ( empty( $_GET['action'] ) || ( 'edit' !== $_GET['action'] ) ) {
|
427 |
+
return;
|
428 |
+
}
|
429 |
+
|
430 |
+
// Bail if no engagements
|
431 |
+
if ( ! bbp_is_engagements_active() ) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
|
435 |
+
// Add the meta-box
|
436 |
+
add_meta_box(
|
437 |
+
'bbp_topic_engagements_metabox',
|
438 |
+
__( 'Engagements', 'bbpress' ),
|
439 |
+
'bbp_topic_engagements_metabox',
|
440 |
+
$this->post_type,
|
441 |
+
'side',
|
442 |
+
'low'
|
443 |
+
);
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Add the favorites meta-box
|
448 |
*
|
449 |
* Allows viewing of users who have favorited a topic.
|
450 |
*
|
451 |
* @since 2.6.0 bbPress (r6197)
|
452 |
*
|
453 |
+
* @uses add_meta_box() To add the meta-box
|
454 |
*/
|
455 |
public function favorites_metabox() {
|
456 |
|
464 |
return;
|
465 |
}
|
466 |
|
467 |
+
// Add the meta-box
|
468 |
add_meta_box(
|
469 |
'bbp_topic_favorites_metabox',
|
470 |
__( 'Favorites', 'bbpress' ),
|
476 |
}
|
477 |
|
478 |
/**
|
479 |
+
* Add the subscriptions meta-box
|
480 |
*
|
481 |
* Allows viewing of users who have subscribed to a topic.
|
482 |
*
|
483 |
* @since 2.6.0 bbPress (r6197)
|
484 |
*
|
485 |
+
* @uses add_meta_box() To add the meta-box
|
486 |
*/
|
487 |
public function subscriptions_metabox() {
|
488 |
|
496 |
return;
|
497 |
}
|
498 |
|
499 |
+
// Add the meta-box
|
500 |
add_meta_box(
|
501 |
'bbp_topic_subscriptions_metabox',
|
502 |
__( 'Subscriptions', 'bbpress' ),
|
508 |
}
|
509 |
|
510 |
/**
|
511 |
+
* Remove comments & discussion meta-boxes if comments are not supported
|
512 |
*
|
513 |
* @since 2.6.0 bbPress (r6186)
|
514 |
*/
|
543 |
return $topic_id;
|
544 |
}
|
545 |
|
546 |
+
// Check action exists
|
547 |
+
if ( empty( $_POST['action'] ) ) {
|
548 |
+
return $topic_id;
|
549 |
+
}
|
550 |
+
|
551 |
// Nonce check
|
552 |
if ( empty( $_POST['bbp_topic_metabox'] ) || ! wp_verify_nonce( $_POST['bbp_topic_metabox'], 'bbp_topic_metabox_save' ) ) {
|
553 |
return $topic_id;
|
554 |
}
|
555 |
|
556 |
// Bail if current user cannot edit this topic
|
557 |
+
if ( ! current_user_can( 'edit_topic', $topic_id ) ) {
|
558 |
return $topic_id;
|
559 |
}
|
560 |
|
607 |
*/
|
608 |
public function toggle_topic() {
|
609 |
|
610 |
+
// Bail if not a topic toggle action
|
611 |
+
if ( ! bbp_is_get_request() || empty( $_GET['action'] ) || empty( $_GET['topic_id'] ) ) {
|
612 |
+
return;
|
613 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
|
615 |
+
// Bail if not an allowed action
|
616 |
+
$action = sanitize_key( $_GET['action'] );
|
617 |
+
if ( empty( $action ) || ! in_array( $action, $this->get_allowed_action_toggles(), true ) ) {
|
618 |
+
return;
|
619 |
+
}
|
620 |
|
621 |
+
// Bail if topic is missing
|
622 |
+
$topic_id = bbp_get_topic_id( $_GET['topic_id'] );
|
623 |
+
if ( ! bbp_get_topic( $topic_id ) ) {
|
624 |
+
wp_die( __( 'The topic was not found.', 'bbpress' ) );
|
625 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
|
627 |
+
// What is the user doing here?
|
628 |
+
if ( ! current_user_can( 'moderate', $topic_id ) ) {
|
629 |
+
wp_die( __( 'You do not have permission to do that.', 'bbpress' ) );
|
630 |
+
}
|
631 |
|
632 |
+
// Defaults
|
633 |
+
$post_data = array( 'ID' => $topic_id );
|
634 |
+
$message = '';
|
635 |
+
$success = false;
|
636 |
+
|
637 |
+
switch ( $action ) {
|
638 |
+
case 'bbp_toggle_topic_approve' :
|
639 |
+
check_admin_referer( 'approve-topic_' . $topic_id );
|
640 |
+
|
641 |
+
$is_approve = bbp_is_topic_pending( $topic_id );
|
642 |
+
$message = ( true === $is_approve )
|
643 |
+
? 'approved'
|
644 |
+
: 'unapproved';
|
645 |
+
$success = ( true === $is_approve )
|
646 |
+
? bbp_approve_topic( $topic_id )
|
647 |
+
: bbp_unapprove_topic( $topic_id );
|
648 |
+
|
649 |
+
break;
|
650 |
+
|
651 |
+
case 'bbp_toggle_topic_close' :
|
652 |
+
check_admin_referer( 'close-topic_' . $topic_id );
|
653 |
+
|
654 |
+
$is_open = bbp_is_topic_open( $topic_id );
|
655 |
+
$message = ( true === $is_open )
|
656 |
+
? 'closed'
|
657 |
+
: 'opened';
|
658 |
+
$success = ( true === $is_open )
|
659 |
+
? bbp_close_topic( $topic_id )
|
660 |
+
: bbp_open_topic( $topic_id );
|
661 |
+
|
662 |
+
break;
|
663 |
+
|
664 |
+
case 'bbp_toggle_topic_stick' :
|
665 |
+
check_admin_referer( 'stick-topic_' . $topic_id );
|
666 |
+
|
667 |
+
$is_sticky = bbp_is_topic_sticky( $topic_id );
|
668 |
+
$is_super = ( false === $is_sticky ) && ! empty( $_GET['super'] ) && ( "1" === $_GET['super'] )
|
669 |
+
? true
|
670 |
+
: false;
|
671 |
+
$message = ( true === $is_sticky )
|
672 |
+
? 'unstuck'
|
673 |
+
: 'stuck';
|
674 |
+
$message = ( true === $is_super )
|
675 |
+
? 'super_sticky'
|
676 |
+
: $message;
|
677 |
+
$success = ( true === $is_sticky )
|
678 |
+
? bbp_unstick_topic( $topic_id )
|
679 |
+
: bbp_stick_topic( $topic_id, $is_super );
|
680 |
+
|
681 |
+
break;
|
682 |
|
683 |
+
case 'bbp_toggle_topic_spam' :
|
684 |
+
check_admin_referer( 'spam-topic_' . $topic_id );
|
685 |
|
686 |
+
$is_spam = bbp_is_topic_spam( $topic_id );
|
687 |
+
$message = ( true === $is_spam )
|
688 |
+
? 'unspammed'
|
689 |
+
: 'spammed';
|
690 |
+
$success = ( true === $is_spam )
|
691 |
+
? bbp_unspam_topic( $topic_id )
|
692 |
+
: bbp_spam_topic( $topic_id );
|
693 |
+
|
694 |
+
break;
|
695 |
}
|
696 |
+
|
697 |
+
// Setup the message
|
698 |
+
$retval = array(
|
699 |
+
'bbp_topic_toggle_notice' => $message,
|
700 |
+
'topic_id' => $topic_id
|
701 |
+
);
|
702 |
+
|
703 |
+
// Prepare for failure
|
704 |
+
if ( ( false === $success ) || is_wp_error( $success ) ) {
|
705 |
+
$retval['failed'] = '1';
|
706 |
+
}
|
707 |
+
|
708 |
+
// Filter all message args
|
709 |
+
$retval = apply_filters( 'bbp_toggle_topic_action_admin', $retval, $topic_id, $action );
|
710 |
+
|
711 |
+
// Do additional topic toggle actions (admin side)
|
712 |
+
do_action( 'bbp_toggle_topic_admin', $success, $post_data, $action, $retval );
|
713 |
+
|
714 |
+
// Redirect back to the topic
|
715 |
+
$redirect = add_query_arg( $retval, remove_query_arg( array( 'action', 'topic_id' ) ) );
|
716 |
+
bbp_redirect( $redirect );
|
717 |
}
|
718 |
|
719 |
/**
|
732 |
*/
|
733 |
public function toggle_topic_notice() {
|
734 |
|
735 |
+
// Bail if missing topic toggle action
|
736 |
+
if ( ! bbp_is_get_request() || empty( $_GET['topic_id'] ) || empty( $_GET['bbp_topic_toggle_notice'] ) ) {
|
737 |
+
return;
|
738 |
+
}
|
|
|
739 |
|
740 |
+
// Bail if not an allowed notice
|
741 |
+
$notice = sanitize_key( $_GET['bbp_topic_toggle_notice'] );
|
742 |
+
if ( empty( $notice ) || ! in_array( $notice, $this->get_allowed_notice_toggles(), true ) ) {
|
743 |
+
return;
|
744 |
+
}
|
745 |
|
746 |
+
// Bail if no topic_id or notice
|
747 |
+
$topic_id = bbp_get_topic_id( $_GET['topic_id'] );
|
748 |
+
if ( empty( $topic_id ) ) {
|
749 |
+
return;
|
750 |
+
}
|
751 |
|
752 |
+
// Bail if topic is missing
|
753 |
+
if ( ! bbp_get_topic( $topic_id ) ) {
|
754 |
+
return;
|
755 |
+
}
|
756 |
+
|
757 |
+
// Use the title in the responses
|
758 |
+
$topic_title = bbp_get_topic_title( $topic_id );
|
759 |
+
$is_failure = ! empty( $_GET['failed'] );
|
760 |
+
$message = '';
|
761 |
+
|
762 |
+
// Which notice?
|
763 |
+
switch ( $notice ) {
|
764 |
+
case 'opened' :
|
765 |
+
$message = ( $is_failure === true )
|
766 |
+
? sprintf( __( 'There was a problem opening the topic "%1$s".', 'bbpress' ), $topic_title )
|
767 |
+
: sprintf( __( 'Topic "%1$s" successfully opened.', 'bbpress' ), $topic_title );
|
768 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
|
770 |
+
case 'closed' :
|
771 |
+
$message = ( $is_failure === true )
|
772 |
+
? sprintf( __( 'There was a problem closing the topic "%1$s".', 'bbpress' ), $topic_title )
|
773 |
+
: sprintf( __( 'Topic "%1$s" successfully closed.', 'bbpress' ), $topic_title );
|
774 |
+
break;
|
775 |
+
|
776 |
+
case 'super_sticky' :
|
777 |
+
$message = ( $is_failure === true )
|
778 |
+
? sprintf( __( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title )
|
779 |
+
: sprintf( __( 'Topic "%1$s" successfully stuck to front.', 'bbpress' ), $topic_title );
|
780 |
+
break;
|
781 |
|
782 |
+
case 'stuck' :
|
783 |
+
$message = ( $is_failure === true )
|
784 |
+
? sprintf( __( 'There was a problem sticking the topic "%1$s".', 'bbpress' ), $topic_title )
|
785 |
+
: sprintf( __( 'Topic "%1$s" successfully stuck.', 'bbpress' ), $topic_title );
|
786 |
+
break;
|
787 |
|
788 |
+
case 'unstuck' :
|
789 |
+
$message = ( $is_failure === true )
|
790 |
+
? sprintf( __( 'There was a problem unsticking the topic "%1$s".', 'bbpress' ), $topic_title )
|
791 |
+
: sprintf( __( 'Topic "%1$s" successfully unstuck.', 'bbpress' ), $topic_title );
|
792 |
+
break;
|
793 |
+
|
794 |
+
case 'spammed' :
|
795 |
+
$message = ( $is_failure === true )
|
796 |
+
? sprintf( __( 'There was a problem marking the topic "%1$s" as spam.', 'bbpress' ), $topic_title )
|
797 |
+
: sprintf( __( 'Topic "%1$s" successfully marked as spam.', 'bbpress' ), $topic_title );
|
798 |
+
break;
|
799 |
|
800 |
+
case 'unspammed' :
|
801 |
+
$message = ( $is_failure === true )
|
802 |
+
? sprintf( __( 'There was a problem unmarking the topic "%1$s" as spam.', 'bbpress' ), $topic_title )
|
803 |
+
: sprintf( __( 'Topic "%1$s" successfully unmarked as spam.', 'bbpress' ), $topic_title );
|
804 |
+
break;
|
805 |
+
|
806 |
+
case 'approved' :
|
807 |
+
$message = ( $is_failure === true )
|
808 |
+
? sprintf( __( 'There was a problem approving the topic "%1$s".', 'bbpress' ), $topic_title )
|
809 |
+
: sprintf( __( 'Topic "%1$s" successfully approved.', 'bbpress' ), $topic_title );
|
810 |
+
break;
|
811 |
+
|
812 |
+
case 'unapproved' :
|
813 |
+
$message = ( $is_failure === true )
|
814 |
+
? sprintf( __( 'There was a problem unapproving the topic "%1$s".', 'bbpress' ), $topic_title )
|
815 |
+
: sprintf( __( 'Topic "%1$s" successfully unapproved.', 'bbpress' ), $topic_title );
|
816 |
+
break;
|
817 |
}
|
818 |
+
|
819 |
+
// Do additional topic toggle notice filters (admin side)
|
820 |
+
$message = apply_filters( 'bbp_toggle_topic_notice_admin', $message, $topic_id, $notice, $is_failure );
|
821 |
+
$class = ( $is_failure === true )
|
822 |
+
? 'error'
|
823 |
+
: 'updated';
|
824 |
+
|
825 |
+
?>
|
826 |
+
|
827 |
+
<div id="message" class="<?php echo esc_html( $class ); ?> fade">
|
828 |
+
<p style="line-height: 150%"><?php echo esc_html( $message ); ?></p>
|
829 |
+
</div>
|
830 |
+
|
831 |
+
<?php
|
832 |
+
}
|
833 |
+
|
834 |
+
/**
|
835 |
+
* Returns an array of notice toggles
|
836 |
+
*
|
837 |
+
* @since 2.6.0 bbPress (r6396)
|
838 |
+
*
|
839 |
+
* @return array
|
840 |
+
*/
|
841 |
+
private function get_allowed_notice_toggles() {
|
842 |
+
|
843 |
+
// Filter & return
|
844 |
+
return (array) apply_filters( 'bbp_admin_topics_allowed_notice_toggles', array(
|
845 |
+
'opened',
|
846 |
+
'closed',
|
847 |
+
'super_sticky',
|
848 |
+
'stuck',
|
849 |
+
'unstuck',
|
850 |
+
'spammed',
|
851 |
+
'unspammed',
|
852 |
+
'approved',
|
853 |
+
'unapproved'
|
854 |
+
) );
|
855 |
+
}
|
856 |
+
|
857 |
+
/**
|
858 |
+
* Returns an array of notice toggles
|
859 |
+
*
|
860 |
+
* @since 2.6.0 bbPress (r6396)
|
861 |
+
*
|
862 |
+
* @return array
|
863 |
+
*/
|
864 |
+
private function get_allowed_action_toggles() {
|
865 |
+
|
866 |
+
// Filter & return
|
867 |
+
return (array) apply_filters( 'bbp_admin_topics_allowed_action_toggles', array(
|
868 |
+
'bbp_toggle_topic_close',
|
869 |
+
'bbp_toggle_topic_stick',
|
870 |
+
'bbp_toggle_topic_spam',
|
871 |
+
'bbp_toggle_topic_approve'
|
872 |
+
) );
|
873 |
}
|
874 |
|
875 |
/**
|
894 |
'bbp_topic_freshness' => __( 'Last Post', 'bbpress' )
|
895 |
);
|
896 |
|
897 |
+
// Filter & return
|
898 |
+
return (array) apply_filters( 'bbp_admin_topics_column_headers', $columns );
|
899 |
}
|
900 |
|
901 |
/**
|
933 |
// Forum
|
934 |
case 'bbp_topic_forum' :
|
935 |
|
936 |
+
// Get title
|
937 |
+
$forum_title = ! empty( $forum_id )
|
938 |
+
? bbp_get_forum_title( $forum_id )
|
939 |
+
: '';
|
940 |
|
941 |
+
// Output forum name
|
942 |
+
if ( ! empty( $forum_title ) ) {
|
|
|
|
|
|
|
|
|
|
|
943 |
echo $forum_title;
|
944 |
|
945 |
+
// Output dash
|
946 |
} else {
|
947 |
+
?>
|
948 |
+
<span aria-hidden="true">—</span>
|
949 |
+
<span class="screen-reader-text"><?php esc_html_e( 'No forum', 'bbpress' ); ?></span>
|
950 |
+
<?php
|
951 |
}
|
952 |
|
953 |
break;
|
1025 |
|
1026 |
unset( $actions['inline hide-if-no-js'] );
|
1027 |
|
1028 |
+
// View link
|
1029 |
+
$view_link = bbp_get_topic_permalink( $topic->ID );
|
1030 |
+
|
1031 |
+
// Maybe add view=all
|
1032 |
+
if ( ! in_array( $topic->post_status, array( bbp_get_closed_status_id(), bbp_get_public_status_id() ), true ) ) {
|
1033 |
+
$view_link = bbp_add_view_all( $view_link, true );
|
1034 |
+
}
|
1035 |
+
|
1036 |
// Show view link if it's not set, the topic is trashed and the user can view trashed topics
|
1037 |
if ( empty( $actions['view'] ) && ( bbp_get_trash_status_id() === $topic->post_status ) && current_user_can( 'view_trash' ) ) {
|
1038 |
+
$actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';
|
1039 |
}
|
1040 |
|
1041 |
// Only show the actions if the user is capable of viewing them :)
|
1048 |
$actions['unapproved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Unapprove this topic', 'bbpress' ) . '">' . _x( 'Unapprove', 'Unapprove Topic', 'bbpress' ) . '</a>';
|
1049 |
} elseif ( ! bbp_is_topic_private( $topic->ID ) ) {
|
1050 |
$actions['approved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Approve this topic', 'bbpress' ) . '">' . _x( 'Approve', 'Approve Topic', 'bbpress' ) . '</a>';
|
1051 |
+
$actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';
|
1052 |
}
|
1053 |
|
1054 |
// Close
|
1055 |
// Show the 'close' and 'open' link on published and closed posts only
|
1056 |
+
if ( bbp_is_topic_public( $topic->ID ) ) {
|
1057 |
$close_uri = wp_nonce_url( add_query_arg( array( 'topic_id' => $topic->ID, 'action' => 'bbp_toggle_topic_close' ), remove_query_arg( array( 'bbp_topic_toggle_notice', 'topic_id', 'failed', 'super' ) ) ), 'close-topic_' . $topic->ID );
|
1058 |
if ( bbp_is_topic_open( $topic->ID ) ) {
|
1059 |
$actions['closed'] = '<a href="' . esc_url( $close_uri ) . '" title="' . esc_attr__( 'Close this topic', 'bbpress' ) . '">' . _x( 'Close', 'Close a Topic', 'bbpress' ) . '</a>';
|
1085 |
|
1086 |
// Do not show trash links for spam topics, or spam links for trashed topics
|
1087 |
if ( current_user_can( 'delete_topic', $topic->ID ) ) {
|
1088 |
+
$trash_days = bbp_get_trash_days( bbp_get_topic_post_type() );
|
1089 |
+
|
1090 |
if ( bbp_get_trash_status_id() === $topic->post_status ) {
|
1091 |
$post_type_object = get_post_type_object( bbp_get_topic_post_type() );
|
1092 |
+
$actions['untrash'] = "<a title='" . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . "' href='" . esc_url( wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $topic->ID ) ), 'untrash-post_' . $topic->ID ) ) . "'>" . esc_html__( 'Restore', 'bbpress' ) . "</a>";
|
1093 |
+
} elseif ( ! empty( $trash_days ) ) {
|
1094 |
+
$actions['trash'] = "<a class='submitdelete' title='" . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $topic->ID ) ) . "'>" . esc_html__( 'Trash', 'bbpress' ) . "</a>";
|
1095 |
}
|
1096 |
|
1097 |
+
if ( ( bbp_get_trash_status_id() === $topic->post_status ) || empty( $trash_days ) ) {
|
1098 |
+
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $topic->ID, '', true ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>";
|
1099 |
} elseif ( bbp_get_spam_status_id() === $topic->post_status ) {
|
1100 |
unset( $actions['trash'] );
|
1101 |
}
|
1135 |
// Show the forums dropdown
|
1136 |
bbp_dropdown( array(
|
1137 |
'selected' => $selected,
|
1138 |
+
'show_none' => esc_html__( 'In all forums', 'bbpress' )
|
1139 |
) );
|
1140 |
}
|
1141 |
|
includes/admin/users.php
CHANGED
@@ -94,7 +94,7 @@ class BBP_Users_Admin {
|
|
94 |
unset( $dynamic_roles[ bbp_get_keymaster_role() ] );
|
95 |
} ?>
|
96 |
|
97 |
-
<
|
98 |
|
99 |
<table class="form-table">
|
100 |
<tbody>
|
@@ -238,7 +238,7 @@ class BBP_Users_Admin {
|
|
238 |
$new_role = sanitize_text_field( $new_role );
|
239 |
|
240 |
// Only keymasters can set other keymasters
|
241 |
-
if ( in_array( bbp_get_keymaster_role(), array( $user_role, $new_role ) ) && ! bbp_is_user_keymaster() ) {
|
242 |
continue;
|
243 |
}
|
244 |
|
@@ -278,7 +278,7 @@ class BBP_Users_Admin {
|
|
278 |
*/
|
279 |
public static function user_role_row( $retval = '', $column_name = '', $user_id = 0 ) {
|
280 |
|
281 |
-
//
|
282 |
if ( 'bbp_user_role' === $column_name ) {
|
283 |
|
284 |
// Get the users role
|
@@ -299,8 +299,8 @@ class BBP_Users_Admin {
|
|
299 |
/**
|
300 |
* Filter the list of roles included in the WordPress site role list
|
301 |
*
|
302 |
-
*
|
303 |
-
*
|
304 |
*
|
305 |
* @since 2.6.0 bbPress (r6051)
|
306 |
*
|
94 |
unset( $dynamic_roles[ bbp_get_keymaster_role() ] );
|
95 |
} ?>
|
96 |
|
97 |
+
<h2><?php esc_html_e( 'Forums', 'bbpress' ); ?></h2>
|
98 |
|
99 |
<table class="form-table">
|
100 |
<tbody>
|
238 |
$new_role = sanitize_text_field( $new_role );
|
239 |
|
240 |
// Only keymasters can set other keymasters
|
241 |
+
if ( in_array( bbp_get_keymaster_role(), array( $user_role, $new_role ), true ) && ! bbp_is_user_keymaster() ) {
|
242 |
continue;
|
243 |
}
|
244 |
|
278 |
*/
|
279 |
public static function user_role_row( $retval = '', $column_name = '', $user_id = 0 ) {
|
280 |
|
281 |
+
// User role column
|
282 |
if ( 'bbp_user_role' === $column_name ) {
|
283 |
|
284 |
// Get the users role
|
299 |
/**
|
300 |
* Filter the list of roles included in the WordPress site role list
|
301 |
*
|
302 |
+
* Ensures forum roles are only displayed under the Forum Role list in the
|
303 |
+
* WordPress Users list table
|
304 |
*
|
305 |
* @since 2.6.0 bbPress (r6051)
|
306 |
*
|
includes/common/ajax.php
CHANGED
@@ -37,6 +37,7 @@ function bbp_ajax_url() {
|
|
37 |
$base_url = home_url( trailingslashit( $wp->request ), ( is_ssl() ? 'https' : 'http' ) );
|
38 |
$ajaxurl = add_query_arg( array( 'bbp-ajax' => 'true' ), $base_url );
|
39 |
|
|
|
40 |
return apply_filters( 'bbp_get_ajax_url', $ajaxurl );
|
41 |
}
|
42 |
|
@@ -52,21 +53,21 @@ function bbp_is_ajax() {
|
|
52 |
}
|
53 |
|
54 |
/**
|
55 |
-
* Hooked to the 'bbp_template_redirect' action, this is
|
56 |
-
* theme-side
|
57 |
*
|
58 |
* @since 2.3.0 bbPress (r4543)
|
59 |
*
|
60 |
-
* @return If not a bbPress
|
61 |
*/
|
62 |
function bbp_do_ajax() {
|
63 |
|
64 |
-
// Bail if not an
|
65 |
if ( ! bbp_is_ajax() ) {
|
66 |
return;
|
67 |
}
|
68 |
|
69 |
-
// Set WordPress core
|
70 |
define( 'DOING_AJAX', true );
|
71 |
|
72 |
// Set the header content type
|
@@ -83,7 +84,7 @@ function bbp_do_ajax() {
|
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
-
* Helper method to return JSON response for the
|
87 |
*
|
88 |
* @since 2.3.0 bbPress (r4542)
|
89 |
*
|
37 |
$base_url = home_url( trailingslashit( $wp->request ), ( is_ssl() ? 'https' : 'http' ) );
|
38 |
$ajaxurl = add_query_arg( array( 'bbp-ajax' => 'true' ), $base_url );
|
39 |
|
40 |
+
// Filter & return
|
41 |
return apply_filters( 'bbp_get_ajax_url', $ajaxurl );
|
42 |
}
|
43 |
|
53 |
}
|
54 |
|
55 |
/**
|
56 |
+
* Hooked to the 'bbp_template_redirect' action, this is also the custom
|
57 |
+
* theme-side AJAX handler.
|
58 |
*
|
59 |
* @since 2.3.0 bbPress (r4543)
|
60 |
*
|
61 |
+
* @return If not a bbPress AJAX request
|
62 |
*/
|
63 |
function bbp_do_ajax() {
|
64 |
|
65 |
+
// Bail if not an AJAX request
|
66 |
if ( ! bbp_is_ajax() ) {
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
+
// Set WordPress core AJAX constant
|
71 |
define( 'DOING_AJAX', true );
|
72 |
|
73 |
// Set the header content type
|
84 |
}
|
85 |
|
86 |
/**
|
87 |
+
* Helper method to return JSON response for the AJAX calls
|
88 |
*
|
89 |
* @since 2.3.0 bbPress (r4542)
|
90 |
*
|
includes/common/classes.php
CHANGED
@@ -254,7 +254,7 @@ class BBP_Walker_Dropdown extends Walker {
|
|
254 |
if ( ( true === $args['disable_categories'] )
|
255 |
&& ( bbp_get_forum_post_type() === $object->post_type )
|
256 |
&& ( bbp_is_forum_category( $object->ID )
|
257 |
-
|| ( !current_user_can( 'edit_forum', $object->ID ) && bbp_is_forum_closed( $object->ID )
|
258 |
)
|
259 |
) ) {
|
260 |
$output .= ' disabled="disabled" value=""';
|
@@ -325,11 +325,11 @@ class BBP_Walker_Reply extends Walker {
|
|
325 |
case 'div':
|
326 |
break;
|
327 |
case 'ol':
|
328 |
-
|
329 |
break;
|
330 |
case 'ul':
|
331 |
default:
|
332 |
-
|
333 |
break;
|
334 |
}
|
335 |
}
|
@@ -350,11 +350,11 @@ class BBP_Walker_Reply extends Walker {
|
|
350 |
case 'div':
|
351 |
break;
|
352 |
case 'ol':
|
353 |
-
|
354 |
break;
|
355 |
case 'ul':
|
356 |
default:
|
357 |
-
|
358 |
break;
|
359 |
}
|
360 |
}
|
@@ -400,18 +400,20 @@ class BBP_Walker_Reply extends Walker {
|
|
400 |
|
401 |
// Check for a callback and use it if specified
|
402 |
if ( ! empty( $args['callback'] ) ) {
|
|
|
403 |
call_user_func( $args['callback'], $object, $args, $depth );
|
|
|
404 |
return;
|
405 |
}
|
406 |
|
407 |
// Style for div or list element
|
408 |
if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
|
409 |
-
|
410 |
} else {
|
411 |
-
|
412 |
}
|
413 |
|
414 |
-
|
415 |
}
|
416 |
|
417 |
/**
|
@@ -421,15 +423,17 @@ class BBP_Walker_Reply extends Walker {
|
|
421 |
|
422 |
// Check for a callback and use it if specified
|
423 |
if ( ! empty( $args['end-callback'] ) ) {
|
|
|
424 |
call_user_func( $args['end-callback'], $object, $args, $depth );
|
|
|
425 |
return;
|
426 |
}
|
427 |
|
428 |
// Style for div or list element
|
429 |
if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
|
430 |
-
|
431 |
} else {
|
432 |
-
|
433 |
}
|
434 |
}
|
435 |
}
|
@@ -535,7 +539,7 @@ class BBP_Walker_Reply_Dropdown extends Walker {
|
|
535 |
ob_start(); ?>
|
536 |
|
537 |
<option class="<?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr( $value ); ?>"<?php selected( $args['selected'], $object->ID ); ?> <?php disabled( in_array( $reply_id, $ancestors ), true ); ?>><?php echo $pad . esc_html( $title ); ?></option>
|
538 |
-
|
539 |
<?php
|
540 |
|
541 |
// Append the output buffer to the $output variable
|
254 |
if ( ( true === $args['disable_categories'] )
|
255 |
&& ( bbp_get_forum_post_type() === $object->post_type )
|
256 |
&& ( bbp_is_forum_category( $object->ID )
|
257 |
+
|| ( ! current_user_can( 'edit_forum', $object->ID ) && bbp_is_forum_closed( $object->ID )
|
258 |
)
|
259 |
) ) {
|
260 |
$output .= ' disabled="disabled" value=""';
|
325 |
case 'div':
|
326 |
break;
|
327 |
case 'ol':
|
328 |
+
$output .= "<ol class='bbp-threaded-replies'>\n";
|
329 |
break;
|
330 |
case 'ul':
|
331 |
default:
|
332 |
+
$output .= "<ul class='bbp-threaded-replies'>\n";
|
333 |
break;
|
334 |
}
|
335 |
}
|
350 |
case 'div':
|
351 |
break;
|
352 |
case 'ol':
|
353 |
+
$output .= "</ol>\n";
|
354 |
break;
|
355 |
case 'ul':
|
356 |
default:
|
357 |
+
$output .= "</ul>\n";
|
358 |
break;
|
359 |
}
|
360 |
}
|
400 |
|
401 |
// Check for a callback and use it if specified
|
402 |
if ( ! empty( $args['callback'] ) ) {
|
403 |
+
ob_start();
|
404 |
call_user_func( $args['callback'], $object, $args, $depth );
|
405 |
+
$output .= ob_get_clean();
|
406 |
return;
|
407 |
}
|
408 |
|
409 |
// Style for div or list element
|
410 |
if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
|
411 |
+
$output .= "<div>\n";
|
412 |
} else {
|
413 |
+
$output .= "<li>\n";
|
414 |
}
|
415 |
|
416 |
+
$output .= bbp_buffer_template_part( 'loop', 'single-reply', false );
|
417 |
}
|
418 |
|
419 |
/**
|
423 |
|
424 |
// Check for a callback and use it if specified
|
425 |
if ( ! empty( $args['end-callback'] ) ) {
|
426 |
+
ob_start();
|
427 |
call_user_func( $args['end-callback'], $object, $args, $depth );
|
428 |
+
$output .= ob_get_clean();
|
429 |
return;
|
430 |
}
|
431 |
|
432 |
// Style for div or list element
|
433 |
if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
|
434 |
+
$output .= "</div>\n";
|
435 |
} else {
|
436 |
+
$output .= "</li>\n";
|
437 |
}
|
438 |
}
|
439 |
}
|
539 |
ob_start(); ?>
|
540 |
|
541 |
<option class="<?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr( $value ); ?>"<?php selected( $args['selected'], $object->ID ); ?> <?php disabled( in_array( $reply_id, $ancestors ), true ); ?>><?php echo $pad . esc_html( $title ); ?></option>
|
542 |
+
|
543 |
<?php
|
544 |
|
545 |
// Append the output buffer to the $output variable
|
includes/common/formatting.php
CHANGED
@@ -22,7 +22,9 @@ defined( 'ABSPATH' ) || exit;
|
|
22 |
* @return array Associative array of allowed tags and attributes
|
23 |
*/
|
24 |
function bbp_kses_allowed_tags() {
|
25 |
-
|
|
|
|
|
26 |
|
27 |
// Links
|
28 |
'a' => array(
|
@@ -303,9 +305,37 @@ function bbp_rel_nofollow( $text = '' ) {
|
|
303 |
* @return string $text Link with rel=nofollow added
|
304 |
*/
|
305 |
function bbp_rel_nofollow_callback( $matches = array() ) {
|
306 |
-
$text
|
307 |
-
$
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
|
311 |
/** Make Clickable ************************************************************/
|
@@ -431,30 +461,298 @@ function bbp_make_emails_clickable( $text = '' ) {
|
|
431 |
* @return string
|
432 |
*/
|
433 |
function bbp_make_mentions_clickable( $text = '' ) {
|
434 |
-
return preg_replace_callback( '
|
435 |
}
|
436 |
|
437 |
/**
|
438 |
-
* Callback to convert mention
|
439 |
*
|
440 |
* @since 2.6.0 (r6014)
|
441 |
*
|
442 |
-
* @param array $matches
|
443 |
*
|
444 |
-
* @return string
|
445 |
*/
|
446 |
function bbp_make_mentions_clickable_callback( $matches = array() ) {
|
447 |
|
448 |
// Get user; bail if not found
|
449 |
-
$user = get_user_by( 'slug', $matches[
|
450 |
if ( empty( $user ) || bbp_is_user_inactive( $user->ID ) ) {
|
451 |
return $matches[0];
|
452 |
}
|
453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
// Create the link to the user's profile
|
455 |
$url = bbp_get_user_profile_url( $user->ID );
|
456 |
-
$
|
457 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
|
459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
}
|
|
22 |
* @return array Associative array of allowed tags and attributes
|
23 |
*/
|
24 |
function bbp_kses_allowed_tags() {
|
25 |
+
|
26 |
+
// Filter & return
|
27 |
+
return (array) apply_filters( 'bbp_kses_allowed_tags', array(
|
28 |
|
29 |
// Links
|
30 |
'a' => array(
|
305 |
* @return string $text Link with rel=nofollow added
|
306 |
*/
|
307 |
function bbp_rel_nofollow_callback( $matches = array() ) {
|
308 |
+
$text = $matches[1];
|
309 |
+
$atts = shortcode_parse_atts( $matches[1] );
|
310 |
+
$rel = 'nofollow';
|
311 |
+
$home_url = home_url();
|
312 |
+
|
313 |
+
// Bail on links that match the current domain
|
314 |
+
if ( preg_match( '%href=["\'](' . preg_quote( set_url_scheme( $home_url, 'http' ) ) . ')%i', $text ) ||
|
315 |
+
preg_match( '%href=["\'](' . preg_quote( set_url_scheme( $home_url, 'https' ) ) . ')%i', $text )
|
316 |
+
) {
|
317 |
+
return "<a {$text}>";
|
318 |
+
}
|
319 |
+
|
320 |
+
// Avoid collisions with existing "rel" attribute
|
321 |
+
if ( ! empty( $atts['rel'] ) ) {
|
322 |
+
$parts = array_map( 'trim', explode( ' ', $atts['rel'] ) );
|
323 |
+
if ( false === array_search( 'nofollow', $parts ) ) {
|
324 |
+
$parts[] = 'nofollow';
|
325 |
+
}
|
326 |
+
|
327 |
+
$rel = implode( ' ', $parts );
|
328 |
+
unset( $atts['rel'] );
|
329 |
+
|
330 |
+
$html = '';
|
331 |
+
foreach ( $atts as $name => $value ) {
|
332 |
+
$html .= "{$name}=\"{$value}\" ";
|
333 |
+
}
|
334 |
+
|
335 |
+
$text = trim( $html );
|
336 |
+
}
|
337 |
+
|
338 |
+
return "<a {$text} rel=\"{$rel}\">";
|
339 |
}
|
340 |
|
341 |
/** Make Clickable ************************************************************/
|
461 |
* @return string
|
462 |
*/
|
463 |
function bbp_make_mentions_clickable( $text = '' ) {
|
464 |
+
return preg_replace_callback( '#@([0-9a-zA-Z-_]+)#i', 'bbp_make_mentions_clickable_callback', $text );
|
465 |
}
|
466 |
|
467 |
/**
|
468 |
+
* Callback to convert mention matches to HTML A tag.
|
469 |
*
|
470 |
* @since 2.6.0 (r6014)
|
471 |
*
|
472 |
+
* @param array $matches Regular expression matches in the current text blob.
|
473 |
*
|
474 |
+
* @return string Original text if no user exists, or link to user profile.
|
475 |
*/
|
476 |
function bbp_make_mentions_clickable_callback( $matches = array() ) {
|
477 |
|
478 |
// Get user; bail if not found
|
479 |
+
$user = get_user_by( 'slug', $matches[1] );
|
480 |
if ( empty( $user ) || bbp_is_user_inactive( $user->ID ) ) {
|
481 |
return $matches[0];
|
482 |
}
|
483 |
|
484 |
+
// Filter classes
|
485 |
+
$classes = (array) apply_filters( 'bbp_make_mentions_clickable_classes', array(
|
486 |
+
'bbp-user-id-' . $user->ID,
|
487 |
+
'bbp-user-mention'
|
488 |
+
) );
|
489 |
+
|
490 |
+
// Escape & implode if not empty, otherwise an empty string
|
491 |
+
$class_str = ! empty( $classes )
|
492 |
+
? implode( ' ', array_map( 'sanitize_html_class', $classes ) )
|
493 |
+
: '';
|
494 |
+
|
495 |
// Create the link to the user's profile
|
496 |
$url = bbp_get_user_profile_url( $user->ID );
|
497 |
+
$clicky = '<a href="%1$s" class="' . esc_attr( $class_str ) . '">%2$s</a>';
|
498 |
+
$anchor = sprintf( $clicky, esc_url( $url ), esc_html( $matches[0] ) );
|
499 |
+
$link = bbp_rel_nofollow( $anchor );
|
500 |
+
|
501 |
+
return $link;
|
502 |
+
}
|
503 |
+
|
504 |
+
/** Numbers *******************************************************************/
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Never let a numeric value be less than zero.
|
508 |
+
*
|
509 |
+
* @since 2.6.0 bbPress (r6300)
|
510 |
+
*
|
511 |
+
* @param int $number
|
512 |
+
*/
|
513 |
+
function bbp_number_not_negative( $number = 0 ) {
|
514 |
+
|
515 |
+
// Protect against formatted strings
|
516 |
+
if ( is_string( $number ) ) {
|
517 |
+
$number = strip_tags( $number ); // No HTML
|
518 |
+
$number = preg_replace( '/[^0-9-]/', '', $number ); // No number-format
|
519 |
+
|
520 |
+
// Protect against objects, arrays, scalars, etc...
|
521 |
+
} elseif ( ! is_numeric( $number ) ) {
|
522 |
+
$number = 0;
|
523 |
+
}
|
524 |
+
|
525 |
+
// Make the number an integer
|
526 |
+
$int = intval( $number );
|
527 |
+
|
528 |
+
// Pick the maximum value, never less than zero
|
529 |
+
$not_less_than_zero = max( 0, $int );
|
530 |
+
|
531 |
+
// Filter & return
|
532 |
+
return (int) apply_filters( 'bbp_number_not_negative', $not_less_than_zero, $int, $number );
|
533 |
+
}
|
534 |
+
|
535 |
+
/**
|
536 |
+
* A bbPress specific method of formatting numeric values
|
537 |
+
*
|
538 |
+
* @since 2.0.0 bbPress (r2486)
|
539 |
+
*
|
540 |
+
* @param string $number Number to format
|
541 |
+
* @param string $decimals Optional. Display decimals
|
542 |
+
* @uses apply_filters() Calls 'bbp_number_format' with the formatted values,
|
543 |
+
* number and display decimals bool
|
544 |
+
* @return string Formatted string
|
545 |
+
*/
|
546 |
+
function bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = ',' ) {
|
547 |
+
|
548 |
+
// If empty, set $number to (int) 0
|
549 |
+
if ( ! is_numeric( $number ) ) {
|
550 |
+
$number = 0;
|
551 |
+
}
|
552 |
+
|
553 |
+
// Filter & return
|
554 |
+
return apply_filters( 'bbp_number_format', number_format( $number, $decimals, $dec_point, $thousands_sep ), $number, $decimals, $dec_point, $thousands_sep );
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* A bbPress specific method of formatting numeric values
|
559 |
+
*
|
560 |
+
* @since 2.1.0 bbPress (r3857)
|
561 |
+
*
|
562 |
+
* @param string $number Number to format
|
563 |
+
* @param string $decimals Optional. Display decimals
|
564 |
+
* @uses apply_filters() Calls 'bbp_number_format' with the formatted values,
|
565 |
+
* number and display decimals bool
|
566 |
+
* @return string Formatted string
|
567 |
+
*/
|
568 |
+
function bbp_number_format_i18n( $number = 0, $decimals = false ) {
|
569 |
+
|
570 |
+
// If empty, set $number to (int) 0
|
571 |
+
if ( ! is_numeric( $number ) ) {
|
572 |
+
$number = 0;
|
573 |
+
}
|
574 |
+
|
575 |
+
// Filter & return
|
576 |
+
return apply_filters( 'bbp_number_format_i18n', number_format_i18n( $number, $decimals ), $number, $decimals );
|
577 |
+
}
|
578 |
+
|
579 |
+
/** Dates *********************************************************************/
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Convert time supplied from database query into specified date format.
|
583 |
+
*
|
584 |
+
* @since 2.0.0 bbPress (r2544)
|
585 |
+
*
|
586 |
+
* @param string $time Time to convert
|
587 |
+
* @param string $d Optional. Default is 'U'. Either 'G', 'U', or php date
|
588 |
+
* format
|
589 |
+
* @param bool $translate Optional. Default is false. Whether to translate the
|
590 |
+
* result
|
591 |
+
* @uses mysql2date() To convert the format
|
592 |
+
* @uses apply_filters() Calls 'bbp_convert_date' with the time, date format
|
593 |
+
* and translate bool
|
594 |
+
* @return string Returns timestamp
|
595 |
+
*/
|
596 |
+
function bbp_convert_date( $time, $d = 'U', $translate = false ) {
|
597 |
+
$new_time = mysql2date( $d, $time, $translate );
|
598 |
+
|
599 |
+
// Filter & return
|
600 |
+
return apply_filters( 'bbp_convert_date', $new_time, $d, $translate, $time );
|
601 |
+
}
|
602 |
+
|
603 |
+
/**
|
604 |
+
* Output formatted time to display human readable time difference.
|
605 |
+
*
|
606 |
+
* @since 2.0.0 bbPress (r2544)
|
607 |
+
*
|
608 |
+
* @param string $older_date Unix timestamp from which the difference begins.
|
609 |
+
* @param string $newer_date Optional. Unix timestamp from which the
|
610 |
+
* difference ends. False for current time.
|
611 |
+
* @param int $gmt Optional. Whether to use GMT timezone. Default is false.
|
612 |
+
* @uses bbp_get_time_since() To get the formatted time
|
613 |
+
*/
|
614 |
+
function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) {
|
615 |
+
echo bbp_get_time_since( $older_date, $newer_date, $gmt );
|
616 |
+
}
|
617 |
+
/**
|
618 |
+
* Return formatted time to display human readable time difference.
|
619 |
+
*
|
620 |
+
* @since 2.0.0 bbPress (r2544)
|
621 |
+
*
|
622 |
+
* @param string $older_date Unix timestamp from which the difference begins.
|
623 |
+
* @param string $newer_date Optional. Unix timestamp from which the
|
624 |
+
* difference ends. False for current time.
|
625 |
+
* @param int $gmt Optional. Whether to use GMT timezone. Default is false.
|
626 |
+
* @uses current_time() To get the current time in mysql format
|
627 |
+
* @uses human_time_diff() To get the time differene in since format
|
628 |
+
* @uses apply_filters() Calls 'bbp_get_time_since' with the time
|
629 |
+
* difference and time
|
630 |
+
* @return string Formatted time
|
631 |
+
*/
|
632 |
+
function bbp_get_time_since( $older_date, $newer_date = false, $gmt = false ) {
|
633 |
+
|
634 |
+
// Setup the strings
|
635 |
+
$unknown_text = apply_filters( 'bbp_core_time_since_unknown_text', __( 'sometime', 'bbpress' ) );
|
636 |
+
$right_now_text = apply_filters( 'bbp_core_time_since_right_now_text', __( 'right now', 'bbpress' ) );
|
637 |
+
$ago_text = apply_filters( 'bbp_core_time_since_ago_text', __( '%s ago', 'bbpress' ) );
|
638 |
+
|
639 |
+
// array of time period chunks
|
640 |
+
$chunks = array(
|
641 |
+
array( 60 * 60 * 24 * 365 , __( 'year', 'bbpress' ), __( 'years', 'bbpress' ) ),
|
642 |
+
array( 60 * 60 * 24 * 30 , __( 'month', 'bbpress' ), __( 'months', 'bbpress' ) ),
|
643 |
+
array( 60 * 60 * 24 * 7, __( 'week', 'bbpress' ), __( 'weeks', 'bbpress' ) ),
|
644 |
+
array( 60 * 60 * 24 , __( 'day', 'bbpress' ), __( 'days', 'bbpress' ) ),
|
645 |
+
array( 60 * 60 , __( 'hour', 'bbpress' ), __( 'hours', 'bbpress' ) ),
|
646 |
+
array( 60 , __( 'minute', 'bbpress' ), __( 'minutes', 'bbpress' ) ),
|
647 |
+
array( 1, __( 'second', 'bbpress' ), __( 'seconds', 'bbpress' ) )
|
648 |
+
);
|
649 |
+
|
650 |
+
if ( ! empty( $older_date ) && ! is_numeric( $older_date ) ) {
|
651 |
+
$time_chunks = explode( ':', str_replace( ' ', ':', $older_date ) );
|
652 |
+
$date_chunks = explode( '-', str_replace( ' ', '-', $older_date ) );
|
653 |
+
$older_date = gmmktime( (int) $time_chunks[1], (int) $time_chunks[2], (int) $time_chunks[3], (int) $date_chunks[1], (int) $date_chunks[2], (int) $date_chunks[0] );
|
654 |
+
}
|
655 |
+
|
656 |
+
// $newer_date will equal false if we want to know the time elapsed
|
657 |
+
// between a date and the current time. $newer_date will have a value if
|
658 |
+
// we want to work out time elapsed between two known dates.
|
659 |
+
$newer_date = ( ! $newer_date ) ? strtotime( current_time( 'mysql', $gmt ) ) : $newer_date;
|
660 |
+
|
661 |
+
// Difference in seconds
|
662 |
+
$since = $newer_date - $older_date;
|
663 |
+
|
664 |
+
// Something went wrong with date calculation and we ended up with a negative date.
|
665 |
+
if ( 0 > $since ) {
|
666 |
+
$output = $unknown_text;
|
667 |
+
|
668 |
+
// We only want to output two chunks of time here, eg:
|
669 |
+
// x years, xx months
|
670 |
+
// x days, xx hours
|
671 |
+
// so there's only two bits of calculation below:
|
672 |
+
} else {
|
673 |
+
|
674 |
+
// Step one: the first chunk
|
675 |
+
for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
|
676 |
+
$seconds = $chunks[ $i ][0];
|
677 |
+
|
678 |
+
// Finding the biggest chunk (if the chunk fits, break)
|
679 |
+
$count = floor( $since / $seconds );
|
680 |
+
if ( 0 != $count ) {
|
681 |
+
break;
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
// If $i iterates all the way to $j, then the event happened 0 seconds ago
|
686 |
+
if ( ! isset( $chunks[ $i ] ) ) {
|
687 |
+
$output = $right_now_text;
|
688 |
+
|
689 |
+
} else {
|
690 |
+
|
691 |
+
// Set output var
|
692 |
+
$output = ( 1 == $count ) ? '1 '. $chunks[ $i ][1] : $count . ' ' . $chunks[ $i ][2];
|
693 |
+
|
694 |
+
// Step two: the second chunk
|
695 |
+
if ( $i + 2 < $j ) {
|
696 |
+
$seconds2 = $chunks[ $i + 1 ][0];
|
697 |
+
$name2 = $chunks[ $i + 1 ][1];
|
698 |
+
$count2 = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
|
699 |
|
700 |
+
// Add to output var
|
701 |
+
if ( 0 != $count2 ) {
|
702 |
+
$output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[ $i + 1 ][2];
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
+
// No output, so happened right now
|
707 |
+
if ( ! (int) trim( $output ) ) {
|
708 |
+
$output = $right_now_text;
|
709 |
+
}
|
710 |
+
}
|
711 |
+
}
|
712 |
+
|
713 |
+
// Append 'ago' to the end of time-since if not 'right now'
|
714 |
+
if ( $output != $right_now_text ) {
|
715 |
+
$output = sprintf( $ago_text, $output );
|
716 |
+
}
|
717 |
+
|
718 |
+
// Filter & return
|
719 |
+
return apply_filters( 'bbp_get_time_since', $output, $older_date, $newer_date );
|
720 |
+
}
|
721 |
+
|
722 |
+
/** Revisions *****************************************************************/
|
723 |
+
|
724 |
+
/**
|
725 |
+
* Formats the reason for editing the topic/reply.
|
726 |
+
*
|
727 |
+
* Does these things:
|
728 |
+
* - Trimming
|
729 |
+
* - Removing periods from the end of the string
|
730 |
+
* - Trimming again
|
731 |
+
*
|
732 |
+
* @since 2.0.0 bbPress (r2782)
|
733 |
+
*
|
734 |
+
* @param string $reason Optional. User submitted reason for editing.
|
735 |
+
* @return string Status of topic
|
736 |
+
*/
|
737 |
+
function bbp_format_revision_reason( $reason = '' ) {
|
738 |
+
$reason = (string) $reason;
|
739 |
+
|
740 |
+
// Format reason for proper display
|
741 |
+
if ( empty( $reason ) ) {
|
742 |
+
return $reason;
|
743 |
+
}
|
744 |
+
|
745 |
+
// Trimming
|
746 |
+
$reason = trim( $reason );
|
747 |
+
|
748 |
+
// We add our own full stop.
|
749 |
+
while ( substr( $reason, -1 ) === '.' ) {
|
750 |
+
$reason = substr( $reason, 0, -1 );
|
751 |
+
}
|
752 |
+
|
753 |
+
// Trim again
|
754 |
+
$reason = trim( $reason );
|
755 |
+
|
756 |
+
return $reason;
|
757 |
}
|
758 |
+
|
includes/common/functions.php
CHANGED
@@ -13,225 +13,7 @@
|
|
13 |
// Exit if accessed directly
|
14 |
defined( 'ABSPATH' ) || exit;
|
15 |
|
16 |
-
/**
|
17 |
-
|
18 |
-
/**
|
19 |
-
* A bbPress specific method of formatting numeric values
|
20 |
-
*
|
21 |
-
* @since 2.0.0 bbPress (r2486)
|
22 |
-
*
|
23 |
-
* @param string $number Number to format
|
24 |
-
* @param string $decimals Optional. Display decimals
|
25 |
-
* @uses apply_filters() Calls 'bbp_number_format' with the formatted values,
|
26 |
-
* number and display decimals bool
|
27 |
-
* @return string Formatted string
|
28 |
-
*/
|
29 |
-
function bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = ',' ) {
|
30 |
-
|
31 |
-
// If empty, set $number to (int) 0
|
32 |
-
if ( ! is_numeric( $number ) ) {
|
33 |
-
$number = 0;
|
34 |
-
}
|
35 |
-
|
36 |
-
return apply_filters( 'bbp_number_format', number_format( $number, $decimals, $dec_point, $thousands_sep ), $number, $decimals, $dec_point, $thousands_sep );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* A bbPress specific method of formatting numeric values
|
41 |
-
*
|
42 |
-
* @since 2.1.0 bbPress (r3857)
|
43 |
-
*
|
44 |
-
* @param string $number Number to format
|
45 |
-
* @param string $decimals Optional. Display decimals
|
46 |
-
* @uses apply_filters() Calls 'bbp_number_format' with the formatted values,
|
47 |
-
* number and display decimals bool
|
48 |
-
* @return string Formatted string
|
49 |
-
*/
|
50 |
-
function bbp_number_format_i18n( $number = 0, $decimals = false ) {
|
51 |
-
|
52 |
-
// If empty, set $number to (int) 0
|
53 |
-
if ( ! is_numeric( $number ) ) {
|
54 |
-
$number = 0;
|
55 |
-
}
|
56 |
-
|
57 |
-
return apply_filters( 'bbp_number_format_i18n', number_format_i18n( $number, $decimals ), $number, $decimals );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Convert time supplied from database query into specified date format.
|
62 |
-
*
|
63 |
-
* @since 2.0.0 bbPress (r2544)
|
64 |
-
*
|
65 |
-
* @param string $time Time to convert
|
66 |
-
* @param string $d Optional. Default is 'U'. Either 'G', 'U', or php date
|
67 |
-
* format
|
68 |
-
* @param bool $translate Optional. Default is false. Whether to translate the
|
69 |
-
* result
|
70 |
-
* @uses mysql2date() To convert the format
|
71 |
-
* @uses apply_filters() Calls 'bbp_convert_date' with the time, date format
|
72 |
-
* and translate bool
|
73 |
-
* @return string Returns timestamp
|
74 |
-
*/
|
75 |
-
function bbp_convert_date( $time, $d = 'U', $translate = false ) {
|
76 |
-
$new_time = mysql2date( $d, $time, $translate );
|
77 |
-
|
78 |
-
return apply_filters( 'bbp_convert_date', $new_time, $d, $translate, $time );
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Output formatted time to display human readable time difference.
|
83 |
-
*
|
84 |
-
* @since 2.0.0 bbPress (r2544)
|
85 |
-
*
|
86 |
-
* @param string $older_date Unix timestamp from which the difference begins.
|
87 |
-
* @param string $newer_date Optional. Unix timestamp from which the
|
88 |
-
* difference ends. False for current time.
|
89 |
-
* @param int $gmt Optional. Whether to use GMT timezone. Default is false.
|
90 |
-
* @uses bbp_get_time_since() To get the formatted time
|
91 |
-
*/
|
92 |
-
function bbp_time_since( $older_date, $newer_date = false, $gmt = false ) {
|
93 |
-
echo bbp_get_time_since( $older_date, $newer_date, $gmt );
|
94 |
-
}
|
95 |
-
/**
|
96 |
-
* Return formatted time to display human readable time difference.
|
97 |
-
*
|
98 |
-
* @since 2.0.0 bbPress (r2544)
|
99 |
-
*
|
100 |
-
* @param string $older_date Unix timestamp from which the difference begins.
|
101 |
-
* @param string $newer_date Optional. Unix timestamp from which the
|
102 |
-
* difference ends. False for current time.
|
103 |
-
* @param int $gmt Optional. Whether to use GMT timezone. Default is false.
|
104 |
-
* @uses current_time() To get the current time in mysql format
|
105 |
-
* @uses human_time_diff() To get the time differene in since format
|
106 |
-
* @uses apply_filters() Calls 'bbp_get_time_since' with the time
|
107 |
-
* difference and time
|
108 |
-
* @return string Formatted time
|
109 |
-
*/
|
110 |
-
function bbp_get_time_since( $older_date, $newer_date = false, $gmt = false ) {
|
111 |
-
|
112 |
-
// Setup the strings
|
113 |
-
$unknown_text = apply_filters( 'bbp_core_time_since_unknown_text', __( 'sometime', 'bbpress' ) );
|
114 |
-
$right_now_text = apply_filters( 'bbp_core_time_since_right_now_text', __( 'right now', 'bbpress' ) );
|
115 |
-
$ago_text = apply_filters( 'bbp_core_time_since_ago_text', __( '%s ago', 'bbpress' ) );
|
116 |
-
|
117 |
-
// array of time period chunks
|
118 |
-
$chunks = array(
|
119 |
-
array( 60 * 60 * 24 * 365 , __( 'year', 'bbpress' ), __( 'years', 'bbpress' ) ),
|
120 |
-
array( 60 * 60 * 24 * 30 , __( 'month', 'bbpress' ), __( 'months', 'bbpress' ) ),
|
121 |
-
array( 60 * 60 * 24 * 7, __( 'week', 'bbpress' ), __( 'weeks', 'bbpress' ) ),
|
122 |
-
array( 60 * 60 * 24 , __( 'day', 'bbpress' ), __( 'days', 'bbpress' ) ),
|
123 |
-
array( 60 * 60 , __( 'hour', 'bbpress' ), __( 'hours', 'bbpress' ) ),
|
124 |
-
array( 60 , __( 'minute', 'bbpress' ), __( 'minutes', 'bbpress' ) ),
|
125 |
-
array( 1, __( 'second', 'bbpress' ), __( 'seconds', 'bbpress' ) )
|
126 |
-
);
|
127 |
-
|
128 |
-
if ( ! empty( $older_date ) && ! is_numeric( $older_date ) ) {
|
129 |
-
$time_chunks = explode( ':', str_replace( ' ', ':', $older_date ) );
|
130 |
-
$date_chunks = explode( '-', str_replace( ' ', '-', $older_date ) );
|
131 |
-
$older_date = gmmktime( (int) $time_chunks[1], (int) $time_chunks[2], (int) $time_chunks[3], (int) $date_chunks[1], (int) $date_chunks[2], (int) $date_chunks[0] );
|
132 |
-
}
|
133 |
-
|
134 |
-
// $newer_date will equal false if we want to know the time elapsed
|
135 |
-
// between a date and the current time. $newer_date will have a value if
|
136 |
-
// we want to work out time elapsed between two known dates.
|
137 |
-
$newer_date = ( ! $newer_date ) ? strtotime( current_time( 'mysql', $gmt ) ) : $newer_date;
|
138 |
-
|
139 |
-
// Difference in seconds
|
140 |
-
$since = $newer_date - $older_date;
|
141 |
-
|
142 |
-
// Something went wrong with date calculation and we ended up with a negative date.
|
143 |
-
if ( 0 > $since ) {
|
144 |
-
$output = $unknown_text;
|
145 |
-
|
146 |
-
// We only want to output two chunks of time here, eg:
|
147 |
-
// x years, xx months
|
148 |
-
// x days, xx hours
|
149 |
-
// so there's only two bits of calculation below:
|
150 |
-
} else {
|
151 |
-
|
152 |
-
// Step one: the first chunk
|
153 |
-
for ( $i = 0, $j = count( $chunks ); $i < $j; ++$i ) {
|
154 |
-
$seconds = $chunks[ $i ][0];
|
155 |
-
|
156 |
-
// Finding the biggest chunk (if the chunk fits, break)
|
157 |
-
$count = floor( $since / $seconds );
|
158 |
-
if ( 0 != $count ) {
|
159 |
-
break;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
// If $i iterates all the way to $j, then the event happened 0 seconds ago
|
164 |
-
if ( ! isset( $chunks[ $i ] ) ) {
|
165 |
-
$output = $right_now_text;
|
166 |
-
|
167 |
-
} else {
|
168 |
-
|
169 |
-
// Set output var
|
170 |
-
$output = ( 1 == $count ) ? '1 '. $chunks[ $i ][1] : $count . ' ' . $chunks[ $i ][2];
|
171 |
-
|
172 |
-
// Step two: the second chunk
|
173 |
-
if ( $i + 2 < $j ) {
|
174 |
-
$seconds2 = $chunks[ $i + 1 ][0];
|
175 |
-
$name2 = $chunks[ $i + 1 ][1];
|
176 |
-
$count2 = floor( ( $since - ( $seconds * $count ) ) / $seconds2 );
|
177 |
-
|
178 |
-
// Add to output var
|
179 |
-
if ( 0 != $count2 ) {
|
180 |
-
$output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'bbpress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'bbpress' ) . ' ' . $count2 . ' ' . $chunks[ $i + 1 ][2];
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
// No output, so happened right now
|
185 |
-
if ( ! (int) trim( $output ) ) {
|
186 |
-
$output = $right_now_text;
|
187 |
-
}
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
// Append 'ago' to the end of time-since if not 'right now'
|
192 |
-
if ( $output != $right_now_text ) {
|
193 |
-
$output = sprintf( $ago_text, $output );
|
194 |
-
}
|
195 |
-
|
196 |
-
return apply_filters( 'bbp_get_time_since', $output, $older_date, $newer_date );
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Formats the reason for editing the topic/reply.
|
201 |
-
*
|
202 |
-
* Does these things:
|
203 |
-
* - Trimming
|
204 |
-
* - Removing periods from the end of the string
|
205 |
-
* - Trimming again
|
206 |
-
*
|
207 |
-
* @since 2.0.0 bbPress (r2782)
|
208 |
-
*
|
209 |
-
* @param string $reason Optional. User submitted reason for editing.
|
210 |
-
* @return string Status of topic
|
211 |
-
*/
|
212 |
-
function bbp_format_revision_reason( $reason = '' ) {
|
213 |
-
$reason = (string) $reason;
|
214 |
-
|
215 |
-
// Format reason for proper display
|
216 |
-
if ( empty( $reason ) ) {
|
217 |
-
return $reason;
|
218 |
-
}
|
219 |
-
|
220 |
-
// Trimming
|
221 |
-
$reason = trim( $reason );
|
222 |
-
|
223 |
-
// We add our own full stop.
|
224 |
-
while ( substr( $reason, -1 ) === '.' ) {
|
225 |
-
$reason = substr( $reason, 0, -1 );
|
226 |
-
}
|
227 |
-
|
228 |
-
// Trim again
|
229 |
-
$reason = trim( $reason );
|
230 |
-
|
231 |
-
return $reason;
|
232 |
-
}
|
233 |
-
|
234 |
-
/** Misc **********************************************************************/
|
235 |
|
236 |
/**
|
237 |
* Return the unescaped redirect_to request value
|
@@ -241,8 +23,13 @@ function bbp_format_revision_reason( $reason = '' ) {
|
|
241 |
* @return string The URL to redirect to, if set
|
242 |
*/
|
243 |
function bbp_get_redirect_to() {
|
244 |
-
$retval = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
return apply_filters( 'bbp_get_redirect_to', $retval );
|
247 |
}
|
248 |
|
@@ -261,12 +48,11 @@ function bbp_get_redirect_to() {
|
|
261 |
function bbp_add_view_all( $original_link = '', $force = false ) {
|
262 |
|
263 |
// Are we appending the view=all vars?
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
$link = $original_link;
|
268 |
-
}
|
269 |
|
|
|
270 |
return apply_filters( 'bbp_add_view_all', $link, $original_link );
|
271 |
}
|
272 |
|
@@ -282,7 +68,12 @@ function bbp_add_view_all( $original_link = '', $force = false ) {
|
|
282 |
* @return string The link with 'view=all' appended if necessary
|
283 |
*/
|
284 |
function bbp_remove_view_all( $original_link = '' ) {
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
286 |
}
|
287 |
|
288 |
/**
|
@@ -296,6 +87,8 @@ function bbp_remove_view_all( $original_link = '' ) {
|
|
296 |
*/
|
297 |
function bbp_get_view_all( $cap = 'moderate' ) {
|
298 |
$retval = ( ( ! empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) );
|
|
|
|
|
299 |
return apply_filters( 'bbp_get_view_all', (bool) $retval );
|
300 |
}
|
301 |
|
@@ -328,6 +121,21 @@ function bbp_get_paged() {
|
|
328 |
return 1;
|
329 |
}
|
330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
/**
|
332 |
* Fix post author id on post save
|
333 |
*
|
@@ -353,7 +161,7 @@ function bbp_fix_post_author( $data = array(), $postarr = array() ) {
|
|
353 |
}
|
354 |
|
355 |
// Post is not a topic or reply, return
|
356 |
-
if ( ! in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
|
357 |
return $data;
|
358 |
}
|
359 |
|
@@ -371,43 +179,80 @@ function bbp_fix_post_author( $data = array(), $postarr = array() ) {
|
|
371 |
}
|
372 |
|
373 |
/**
|
374 |
-
* Check
|
375 |
*
|
376 |
* @since 2.0.0 bbPress (r3133)
|
377 |
*
|
378 |
* @param string $post_date_gmt
|
379 |
*
|
|
|
380 |
* @uses get_option() Get the edit lock time
|
381 |
* @uses current_time() Get the current time
|
382 |
* @uses strtotime() Convert strings to time
|
383 |
* @uses apply_filters() Allow output to be manipulated
|
384 |
*
|
385 |
-
* @return bool
|
386 |
*/
|
387 |
-
function bbp_past_edit_lock( $post_date_gmt ) {
|
388 |
|
389 |
-
//
|
390 |
$retval = false;
|
391 |
|
392 |
-
//
|
393 |
-
if ( ! empty( $post_date_gmt ) ) {
|
394 |
|
395 |
-
//
|
396 |
-
$
|
397 |
|
398 |
-
//
|
399 |
-
|
|
|
400 |
|
401 |
-
//
|
402 |
-
|
403 |
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
}
|
408 |
}
|
409 |
|
410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
}
|
412 |
|
413 |
/** Statistics ****************************************************************/
|
@@ -615,7 +460,8 @@ function bbp_get_statistics( $args = array() ) {
|
|
615 |
$statistics['hidden_topic_title'] = isset( $hidden_topic_title ) ? $hidden_topic_title : '';
|
616 |
$statistics['hidden_reply_title'] = isset( $hidden_reply_title ) ? $hidden_reply_title : '';
|
617 |
|
618 |
-
|
|
|
619 |
}
|
620 |
|
621 |
/** New/edit topic/reply helpers **********************************************/
|
@@ -647,31 +493,109 @@ function bbp_get_statistics( $args = array() ) {
|
|
647 |
function bbp_filter_anonymous_post_data( $args = array() ) {
|
648 |
|
649 |
// Parse arguments against default values
|
650 |
-
$r = bbp_parse_args( $args, array
|
651 |
'bbp_anonymous_name' => ! empty( $_POST['bbp_anonymous_name'] ) ? $_POST['bbp_anonymous_name'] : false,
|
652 |
'bbp_anonymous_email' => ! empty( $_POST['bbp_anonymous_email'] ) ? $_POST['bbp_anonymous_email'] : false,
|
653 |
'bbp_anonymous_website' => ! empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
|
654 |
), 'filter_anonymous_post_data' );
|
655 |
|
656 |
-
//
|
657 |
-
$r
|
|
|
|
|
|
|
658 |
if ( empty( $r['bbp_anonymous_name'] ) ) {
|
659 |
-
bbp_add_error( 'bbp_anonymous_name', __( '<strong>ERROR</strong>: Invalid author name.',
|
660 |
}
|
661 |
|
|
|
662 |
$r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
|
663 |
if ( empty( $r['bbp_anonymous_email'] ) ) {
|
664 |
bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
|
665 |
}
|
666 |
|
667 |
-
// Website is optional
|
668 |
$r['bbp_anonymous_website'] = apply_filters( 'bbp_pre_anonymous_post_author_website', $r['bbp_anonymous_website'] );
|
669 |
|
670 |
-
//
|
671 |
-
|
|
|
672 |
|
673 |
-
|
674 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
}
|
676 |
|
677 |
/**
|
@@ -683,7 +607,7 @@ function bbp_filter_anonymous_post_data( $args = array() ) {
|
|
683 |
*
|
684 |
* @param array $post_data Contains information about the comment
|
685 |
* @uses current_user_can() To check if the current user can throttle
|
686 |
-
* @uses get_meta_sql() To generate the meta
|
687 |
* @uses apply_filters() Calls 'bbp_check_for_duplicate_query' with the
|
688 |
* duplicate check query and post data
|
689 |
* @uses wpdb::get_var() To execute our query and get the var back
|
@@ -706,23 +630,34 @@ function bbp_check_for_duplicate( $post_data = array() ) {
|
|
706 |
'post_parent' => 0,
|
707 |
'post_content' => '',
|
708 |
'post_status' => bbp_get_trash_status_id(),
|
709 |
-
'anonymous_data' =>
|
710 |
), 'check_for_duplicate' );
|
711 |
|
712 |
// Get the DB
|
713 |
$bbp_db = bbp_db();
|
714 |
|
|
|
|
|
|
|
715 |
// Check for anonymous post
|
716 |
if ( empty( $r['post_author'] ) && ( ! empty( $r['anonymous_data'] ) && ! empty( $r['anonymous_data']['bbp_anonymous_email'] ) ) ) {
|
717 |
-
$clauses = get_meta_sql( array( array(
|
718 |
-
'key' => '_bbp_anonymous_email',
|
719 |
-
'value' => $r['anonymous_data']['bbp_anonymous_email']
|
720 |
-
) ), 'post', $bbp_db->posts, 'ID' );
|
721 |
|
722 |
-
|
723 |
-
$
|
724 |
-
|
725 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
726 |
}
|
727 |
|
728 |
// Unslash $r to pass through DB->prepare()
|
@@ -753,33 +688,38 @@ function bbp_check_for_duplicate( $post_data = array() ) {
|
|
753 |
*
|
754 |
* @since 2.0.0 bbPress (r2734)
|
755 |
*
|
756 |
-
* @param
|
757 |
-
*
|
758 |
-
*
|
759 |
-
* Should be sanitized (see
|
760 |
-
* {@link bbp_filter_anonymous_post_data()}
|
761 |
-
* for sanitization)
|
762 |
* @param int $author_id Optional. Supply if it's a post by a logged in user.
|
763 |
* Do not supply if supplying $anonymous_data.
|
|
|
|
|
764 |
* @uses get_option() To get the throttle time
|
765 |
* @uses get_transient() To get the last posted transient of the ip
|
766 |
* @uses bbp_get_user_last_posted() To get the last posted time of the user
|
767 |
* @uses current_user_can() To check if the current user can throttle
|
|
|
768 |
* @return bool True if there is no flooding, false if there is
|
769 |
*/
|
770 |
-
function bbp_check_for_flood( $anonymous_data =
|
|
|
|
|
|
|
|
|
|
|
771 |
|
772 |
// Option disabled. No flood checks.
|
773 |
$throttle_time = get_option( '_bbp_throttle_time' );
|
774 |
-
if ( empty( $throttle_time ) ) {
|
775 |
return true;
|
776 |
}
|
777 |
|
778 |
// User is anonymous, so check a transient based on the IP
|
779 |
-
if ( ! empty( $anonymous_data )
|
780 |
$last_posted = get_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted' );
|
781 |
|
782 |
-
if ( ! empty( $last_posted ) && time() < $last_posted + $throttle_time ) {
|
783 |
return false;
|
784 |
}
|
785 |
|
@@ -788,7 +728,7 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
|
|
788 |
$author_id = (int) $author_id;
|
789 |
$last_posted = bbp_get_user_last_posted( $author_id );
|
790 |
|
791 |
-
if (
|
792 |
return false;
|
793 |
}
|
794 |
} else {
|
@@ -803,7 +743,9 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
|
|
803 |
*
|
804 |
* @since 2.1.0 bbPress (r3581)
|
805 |
*
|
806 |
-
* @param array $anonymous_data
|
|
|
|
|
807 |
* @param int $author_id Topic or reply author ID
|
808 |
* @param string $title The title of the content
|
809 |
* @param string $content The content being posted
|
@@ -812,7 +754,7 @@ function bbp_check_for_flood( $anonymous_data = false, $author_id = 0 ) {
|
|
812 |
* @uses bbp_current_author_ua() To get current user agent
|
813 |
* @return bool True if test is passed, false if fail
|
814 |
*/
|
815 |
-
function bbp_check_for_moderation( $anonymous_data =
|
816 |
|
817 |
// Allow for moderation check to be skipped
|
818 |
if ( apply_filters( 'bbp_bypass_check_for_moderation', false, $anonymous_data, $author_id, $title, $content ) ) {
|
@@ -939,7 +881,9 @@ function bbp_check_for_moderation( $anonymous_data = false, $author_id = 0, $tit
|
|
939 |
*
|
940 |
* @since 2.0.0 bbPress (r3446)
|
941 |
*
|
942 |
-
* @param array $anonymous_data
|
|
|
|
|
943 |
* @param int $author_id Topic or reply author ID
|
944 |
* @param string $title The title of the content
|
945 |
* @param string $content The content being posted
|
@@ -948,7 +892,7 @@ function bbp_check_for_moderation( $anonymous_data = false, $author_id = 0, $tit
|
|
948 |
* @uses bbp_current_author_ua() To get current user agent
|
949 |
* @return bool True if test is passed, false if fail
|
950 |
*/
|
951 |
-
function bbp_check_for_blacklist( $anonymous_data =
|
952 |
|
953 |
// Allow for blacklist check to be skipped
|
954 |
if ( apply_filters( 'bbp_bypass_check_for_blacklist', false, $anonymous_data, $author_id, $title, $content ) ) {
|
@@ -1073,6 +1017,8 @@ function bbp_get_do_not_reply_address() {
|
|
1073 |
if ( substr( $sitename, 0, 4 ) === 'www.' ) {
|
1074 |
$sitename = substr( $sitename, 4 );
|
1075 |
}
|
|
|
|
|
1076 |
return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
|
1077 |
}
|
1078 |
|
@@ -1093,7 +1039,9 @@ function bbp_get_do_not_reply_address() {
|
|
1093 |
* @param int $reply_id ID of the newly made reply
|
1094 |
* @param int $topic_id ID of the topic of the reply
|
1095 |
* @param int $forum_id ID of the forum of the reply
|
1096 |
-
* @param
|
|
|
|
|
1097 |
* @param int $reply_author ID of the topic author ID
|
1098 |
*
|
1099 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
@@ -1120,7 +1068,7 @@ function bbp_get_do_not_reply_address() {
|
|
1120 |
* topic id and user id
|
1121 |
* @return bool True on success, false on failure
|
1122 |
*/
|
1123 |
-
function bbp_notify_topic_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data =
|
1124 |
|
1125 |
// Bail if subscriptions are turned off
|
1126 |
if ( ! bbp_is_subscriptions_active() ) {
|
@@ -1150,6 +1098,28 @@ function bbp_notify_topic_subscribers( $reply_id = 0, $topic_id = 0, $forum_id =
|
|
1150 |
// Poster name
|
1151 |
$reply_author_name = bbp_get_reply_author_display_name( $reply_id );
|
1152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1153 |
/** Mail ******************************************************************/
|
1154 |
|
1155 |
// Remove filters from reply content and topic title to prevent content
|
@@ -1192,7 +1162,7 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1192 |
return;
|
1193 |
}
|
1194 |
|
1195 |
-
/**
|
1196 |
|
1197 |
// Get the noreply@ address
|
1198 |
$no_reply = bbp_get_do_not_reply_address();
|
@@ -1203,24 +1173,8 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1203 |
// Setup the From header
|
1204 |
$headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
|
1205 |
|
1206 |
-
// Get topic subscribers and bail if empty
|
1207 |
-
$user_ids = bbp_get_topic_subscribers( $topic_id, true );
|
1208 |
-
|
1209 |
-
// Dedicated filter to manipulate user ID's to send emails to
|
1210 |
-
$user_ids = apply_filters( 'bbp_topic_subscription_user_ids', $user_ids );
|
1211 |
-
if ( empty( $user_ids ) ) {
|
1212 |
-
return false;
|
1213 |
-
}
|
1214 |
-
|
1215 |
// Loop through users
|
1216 |
foreach ( (array) $user_ids as $user_id ) {
|
1217 |
-
|
1218 |
-
// Don't send notifications to the person who made the post
|
1219 |
-
if ( ! empty( $reply_author ) && (int) $user_id === (int) $reply_author ) {
|
1220 |
-
continue;
|
1221 |
-
}
|
1222 |
-
|
1223 |
-
// Get email address of subscribed user
|
1224 |
$headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
|
1225 |
}
|
1226 |
|
@@ -1256,7 +1210,9 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1256 |
*
|
1257 |
* @param int $topic_id ID of the newly made reply
|
1258 |
* @param int $forum_id ID of the forum for the topic
|
1259 |
-
* @param
|
|
|
|
|
1260 |
* @param int $topic_author ID of the topic author ID
|
1261 |
*
|
1262 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
@@ -1278,7 +1234,7 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1278 |
* id, forum id and user id
|
1279 |
* @return bool True on success, false on failure
|
1280 |
*/
|
1281 |
-
function bbp_notify_forum_subscribers( $topic_id = 0, $forum_id = 0, $anonymous_data =
|
1282 |
|
1283 |
// Bail if subscriptions are turned off
|
1284 |
if ( ! bbp_is_subscriptions_active() ) {
|
@@ -1307,6 +1263,28 @@ function bbp_notify_forum_subscribers( $topic_id = 0, $forum_id = 0, $anonymous_
|
|
1307 |
// Poster name
|
1308 |
$topic_author_name = bbp_get_topic_author_display_name( $topic_id );
|
1309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1310 |
/** Mail ******************************************************************/
|
1311 |
|
1312 |
// Remove filters from reply content and topic title to prevent content
|
@@ -1349,7 +1327,7 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1349 |
return;
|
1350 |
}
|
1351 |
|
1352 |
-
/**
|
1353 |
|
1354 |
// Get the noreply@ address
|
1355 |
$no_reply = bbp_get_do_not_reply_address();
|
@@ -1360,24 +1338,8 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1360 |
// Setup the From header
|
1361 |
$headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
|
1362 |
|
1363 |
-
// Get topic subscribers and bail if empty
|
1364 |
-
$user_ids = bbp_get_forum_subscribers( $forum_id, true );
|
1365 |
-
|
1366 |
-
// Dedicated filter to manipulate user ID's to send emails to
|
1367 |
-
$user_ids = apply_filters( 'bbp_forum_subscription_user_ids', $user_ids );
|
1368 |
-
if ( empty( $user_ids ) ) {
|
1369 |
-
return false;
|
1370 |
-
}
|
1371 |
-
|
1372 |
// Loop through users
|
1373 |
foreach ( (array) $user_ids as $user_id ) {
|
1374 |
-
|
1375 |
-
// Don't send notifications to the person who made the post
|
1376 |
-
if ( ! empty( $topic_author ) && (int) $user_id === (int) $topic_author ) {
|
1377 |
-
continue;
|
1378 |
-
}
|
1379 |
-
|
1380 |
-
// Get email address of subscribed user
|
1381 |
$headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
|
1382 |
}
|
1383 |
|
@@ -1409,12 +1371,14 @@ Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
|
|
1409 |
* @param int $reply_id ID of the newly made reply
|
1410 |
* @param int $topic_id ID of the topic of the reply
|
1411 |
* @param int $forum_id ID of the forum of the reply
|
1412 |
-
* @param
|
|
|
|
|
1413 |
* @param int $reply_author ID of the topic author ID
|
1414 |
*
|
1415 |
* @return bool True on success, false on failure
|
1416 |
*/
|
1417 |
-
function bbp_notify_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data =
|
1418 |
return bbp_notify_topic_subscribers( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author );
|
1419 |
}
|
1420 |
|
@@ -1446,7 +1410,7 @@ function bbp_logout_url( $url = '', $redirect_to = '' ) {
|
|
1446 |
$url = add_query_arg( array( 'redirect_to' => urlencode( $redirect_to ) ), $url );
|
1447 |
}
|
1448 |
|
1449 |
-
// Filter
|
1450 |
return apply_filters( 'bbp_logout_url', $url, $redirect_to );
|
1451 |
}
|
1452 |
|
@@ -1513,7 +1477,7 @@ function bbp_query_post_parent__in( $where, $object = '' ) {
|
|
1513 |
global $wp;
|
1514 |
|
1515 |
// Noop if WP core supports this already
|
1516 |
-
if ( in_array( 'post_parent__in', $wp->private_query_vars ) ) {
|
1517 |
return $where;
|
1518 |
}
|
1519 |
|
@@ -1581,6 +1545,10 @@ function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) {
|
|
1581 |
'post_parent' => $parent_id,
|
1582 |
'post_status' => $post_status,
|
1583 |
'post_type' => $post_type,
|
|
|
|
|
|
|
|
|
1584 |
|
1585 |
// Maybe change these later
|
1586 |
'posts_per_page' => 1,
|
@@ -1592,7 +1560,7 @@ function bbp_get_public_child_last_id( $parent_id = 0, $post_type = 'post' ) {
|
|
1592 |
$child_id = array_shift( $query->posts );
|
1593 |
unset( $query );
|
1594 |
|
1595 |
-
// Filter
|
1596 |
return (int) apply_filters( 'bbp_get_public_child_last_id', $child_id, $parent_id, $post_type );
|
1597 |
}
|
1598 |
|
@@ -1643,7 +1611,7 @@ function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
|
1643 |
$child_count = $query->post_count;
|
1644 |
unset( $query );
|
1645 |
|
1646 |
-
// Filter
|
1647 |
return (int) apply_filters( 'bbp_get_public_child_count', $child_count, $parent_id, $post_type );
|
1648 |
}
|
1649 |
|
@@ -1666,8 +1634,8 @@ function bbp_get_public_child_count( $parent_id = 0, $post_type = 'post' ) {
|
|
1666 |
function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
1667 |
|
1668 |
// Bail if nothing passed
|
1669 |
-
if ( empty( $parent_id ) ) {
|
1670 |
-
return
|
1671 |
}
|
1672 |
|
1673 |
// Get the public post status
|
@@ -1694,7 +1662,7 @@ function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
1694 |
$child_ids = ! empty( $query->posts ) ? $query->posts : array();
|
1695 |
unset( $query );
|
1696 |
|
1697 |
-
// Filter
|
1698 |
return (array) apply_filters( 'bbp_get_public_child_ids', $child_ids, $parent_id, $post_type );
|
1699 |
}
|
1700 |
|
@@ -1726,8 +1694,8 @@ function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
1726 |
function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
1727 |
|
1728 |
// Bail if nothing passed
|
1729 |
-
if ( empty( $parent_id ) ) {
|
1730 |
-
return
|
1731 |
}
|
1732 |
|
1733 |
// The ID of the cached query
|
@@ -1766,15 +1734,19 @@ function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
1766 |
// Join post statuses together
|
1767 |
$post_status = "'" . implode( "', '", $post_status ) . "'";
|
1768 |
$bbp_db = bbp_db();
|
|
|
|
|
1769 |
$query = $bbp_db->prepare( "SELECT ID FROM {$bbp_db->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = %s ORDER BY ID DESC", $parent_id, $post_type );
|
1770 |
$child_ids = (array) $bbp_db->get_col( $query );
|
1771 |
|
|
|
1772 |
wp_cache_set( $cache_id, $child_ids, 'bbpress_posts' );
|
1773 |
-
} else {
|
1774 |
-
$child_ids = (array) $child_ids;
|
1775 |
}
|
1776 |
|
1777 |
-
//
|
|
|
|
|
|
|
1778 |
return (array) apply_filters( 'bbp_get_all_child_ids', $child_ids, $parent_id, $post_type );
|
1779 |
}
|
1780 |
|
@@ -1787,18 +1759,20 @@ function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
|
1787 |
*
|
1788 |
* @since 2.1.0 bbPress (r3694)
|
1789 |
*
|
1790 |
-
* @global WP_Query $post
|
1791 |
* @param string $field Name of the key
|
1792 |
* @param string $context How to sanitize - raw|edit|db|display|attribute|js
|
1793 |
* @return string Field value
|
1794 |
*/
|
1795 |
function bbp_get_global_post_field( $field = 'ID', $context = 'edit' ) {
|
1796 |
-
global $post;
|
1797 |
|
1798 |
-
|
1799 |
-
$
|
|
|
|
|
|
|
1800 |
|
1801 |
-
|
|
|
1802 |
}
|
1803 |
|
1804 |
/** Nonces ********************************************************************/
|
@@ -1976,7 +1950,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
|
|
1976 |
'feed' => true,
|
1977 |
'post_type' => bbp_get_reply_post_type(),
|
1978 |
'post_parent' => 'any',
|
1979 |
-
'post_status' =>
|
1980 |
'posts_per_page' => bbp_get_replies_per_rss_page(),
|
1981 |
'order' => 'DESC',
|
1982 |
'meta_query' => $meta_query
|
@@ -1994,7 +1968,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
|
|
1994 |
'feed' => true,
|
1995 |
'post_type' => bbp_get_topic_post_type(),
|
1996 |
'post_parent' => bbp_get_forum_id(),
|
1997 |
-
'post_status' =>
|
1998 |
'posts_per_page' => bbp_get_topics_per_rss_page(),
|
1999 |
'order' => 'DESC'
|
2000 |
);
|
@@ -2016,7 +1990,7 @@ function bbp_request_feed_trap( $query_vars = array() ) {
|
|
2016 |
'feed' => true,
|
2017 |
'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
|
2018 |
'post_parent' => 'any',
|
2019 |
-
'post_status' =>
|
2020 |
'posts_per_page' => bbp_get_replies_per_rss_page(),
|
2021 |
'order' => 'DESC',
|
2022 |
'meta_query' => $meta_query
|
@@ -2131,6 +2105,7 @@ function bbp_get_page_by_path( $path = '' ) {
|
|
2131 |
}
|
2132 |
}
|
2133 |
|
|
|
2134 |
return apply_filters( 'bbp_get_page_by_path', $retval, $path );
|
2135 |
}
|
2136 |
|
13 |
// Exit if accessed directly
|
14 |
defined( 'ABSPATH' ) || exit;
|
15 |
|
16 |
+
/** URLs **********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Return the unescaped redirect_to request value
|
23 |
* @return string The URL to redirect to, if set
|
24 |
*/
|
25 |
function bbp_get_redirect_to() {
|
|
|
26 |
|
27 |
+
// Check 'redirect_to' request parameter
|
28 |
+
$retval = ! empty( $_REQUEST['redirect_to'] )
|
29 |
+
? $_REQUEST['redirect_to']
|
30 |
+
: '';
|
31 |
+
|
32 |
+
// Filter & return
|
33 |
return apply_filters( 'bbp_get_redirect_to', $retval );
|
34 |
}
|
35 |
|
48 |
function bbp_add_view_all( $original_link = '', $force = false ) {
|
49 |
|
50 |
// Are we appending the view=all vars?
|
51 |
+
$link = ( bbp_get_view_all() || ! empty( $force ) )
|
52 |
+
? add_query_arg( array( 'view' => 'all' ), $original_link )
|
53 |
+
: $original_link;
|
|
|
|
|
54 |
|
55 |
+
// Filter & return
|
56 |
return apply_filters( 'bbp_add_view_all', $link, $original_link );
|
57 |
}
|
58 |
|
68 |
* @return string The link with 'view=all' appended if necessary
|
69 |
*/
|
70 |
function bbp_remove_view_all( $original_link = '' ) {
|
71 |
+
|
72 |
+
// Remove `view' argument
|
73 |
+
$link = remove_query_arg( 'view', $original_link );
|
74 |
+
|
75 |
+
// Filter & return
|
76 |
+
return apply_filters( 'bbp_remove_view_all', $link, $original_link );
|
77 |
}
|
78 |
|
79 |
/**
|
87 |
*/
|
88 |
function bbp_get_view_all( $cap = 'moderate' ) {
|
89 |
$retval = ( ( ! empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) );
|
90 |
+
|
91 |
+
// Filter & return
|
92 |
return apply_filters( 'bbp_get_view_all', (bool) $retval );
|
93 |
}
|
94 |
|
121 |
return 1;
|
122 |
}
|
123 |
|
124 |
+
/** Misc **********************************************************************/
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Return the unique non-empty values of an array.
|
128 |
+
*
|
129 |
+
* @since 2.6.0 bbPress (r6481)
|
130 |
+
*
|
131 |
+
* @param array $array Array to get values of
|
132 |
+
*
|
133 |
+
* @return array
|
134 |
+
*/
|
135 |
+
function bbp_get_unique_array_values( $array = array() ) {
|
136 |
+
return array_unique( array_filter( array_values( $array ) ) );
|
137 |
+
}
|
138 |
+
|
139 |
/**
|
140 |
* Fix post author id on post save
|
141 |
*
|
161 |
}
|
162 |
|
163 |
// Post is not a topic or reply, return
|
164 |
+
if ( ! in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ), true ) ) {
|
165 |
return $data;
|
166 |
}
|
167 |
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
+
* Check a date against the length of time something can be edited.
|
183 |
*
|
184 |
* @since 2.0.0 bbPress (r3133)
|
185 |
*
|
186 |
* @param string $post_date_gmt
|
187 |
*
|
188 |
+
* @uses bbp_allow_content_edit()() To make sure editing is allowed
|
189 |
* @uses get_option() Get the edit lock time
|
190 |
* @uses current_time() Get the current time
|
191 |
* @uses strtotime() Convert strings to time
|
192 |
* @uses apply_filters() Allow output to be manipulated
|
193 |
*
|
194 |
+
* @return bool True if date is past, False if not
|
195 |
*/
|
196 |
+
function bbp_past_edit_lock( $post_date_gmt = '' ) {
|
197 |
|
198 |
+
// Default value
|
199 |
$retval = false;
|
200 |
|
201 |
+
// Check if date and editing is allowed
|
202 |
+
if ( ! empty( $post_date_gmt ) && bbp_allow_content_edit() ) {
|
203 |
|
204 |
+
// Get number of minutes to allow editing for
|
205 |
+
$minutes = (int) get_option( '_bbp_edit_lock', 5 );
|
206 |
|
207 |
+
// "0" minutes set, so allow forever
|
208 |
+
if ( 0 === $minutes ) {
|
209 |
+
$retval = true;
|
210 |
|
211 |
+
// Not "0" so compare
|
212 |
+
} else {
|
213 |
|
214 |
+
// Period of time
|
215 |
+
$lockable = "+{$minutes} minutes";
|
216 |
+
|
217 |
+
// Now
|
218 |
+
$cur_time = current_time( 'timestamp', true );
|
219 |
+
|
220 |
+
// Add lockable time to post time
|
221 |
+
$lock_time = strtotime( $lockable, strtotime( $post_date_gmt ) );
|
222 |
+
|
223 |
+
// Compare
|
224 |
+
if ( $cur_time >= $lock_time ) {
|
225 |
+
$retval = true;
|
226 |
+
}
|
227 |
}
|
228 |
}
|
229 |
|
230 |
+
// Filter & return
|
231 |
+
return (bool) apply_filters( 'bbp_past_edit_lock', $retval, $cur_time, $lock_time, $post_date_gmt );
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get number of days something should remain trashed for before it is cleaned
|
236 |
+
* up by WordPress Cron. If set to 0, items will skip trash and be deleted
|
237 |
+
* immediately.
|
238 |
+
*
|
239 |
+
* @since 2.6.0 bbPress (r6424)
|
240 |
+
*
|
241 |
+
* @param string $context Provide context for additional filtering
|
242 |
+
* @return int Number of days items remain in trash
|
243 |
+
*/
|
244 |
+
function bbp_get_trash_days( $context = 'forum' ) {
|
245 |
+
|
246 |
+
// Sanitize the context
|
247 |
+
$context = sanitize_key( $context );
|
248 |
+
|
249 |
+
// Check the WordPress constant
|
250 |
+
$days = defined( 'EMPTY_TRASH_DAYS' )
|
251 |
+
? (int) EMPTY_TRASH_DAYS
|
252 |
+
: 30;
|
253 |
+
|
254 |
+
// Filter & return
|
255 |
+
return (int) apply_filters( 'bbp_get_trash_days', $days, $context );
|
256 |
}
|
257 |
|
258 |
/** Statistics ****************************************************************/
|
460 |
$statistics['hidden_topic_title'] = isset( $hidden_topic_title ) ? $hidden_topic_title : '';
|
461 |
$statistics['hidden_reply_title'] = isset( $hidden_reply_title ) ? $hidden_reply_title : '';
|
462 |
|
463 |
+
// Filter & return
|
464 |
+
return apply_filters( 'bbp_get_statistics', $statistics, $r, $args );
|
465 |
}
|
466 |
|
467 |
/** New/edit topic/reply helpers **********************************************/
|
493 |
function bbp_filter_anonymous_post_data( $args = array() ) {
|
494 |
|
495 |
// Parse arguments against default values
|
496 |
+
$r = bbp_parse_args( $args, array(
|
497 |
'bbp_anonymous_name' => ! empty( $_POST['bbp_anonymous_name'] ) ? $_POST['bbp_anonymous_name'] : false,
|
498 |
'bbp_anonymous_email' => ! empty( $_POST['bbp_anonymous_email'] ) ? $_POST['bbp_anonymous_email'] : false,
|
499 |
'bbp_anonymous_website' => ! empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
|
500 |
), 'filter_anonymous_post_data' );
|
501 |
|
502 |
+
// Strip invalid characters
|
503 |
+
$r = bbp_sanitize_anonymous_post_author( $r );
|
504 |
+
|
505 |
+
// Filter name
|
506 |
+
$r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
|
507 |
if ( empty( $r['bbp_anonymous_name'] ) ) {
|
508 |
+
bbp_add_error( 'bbp_anonymous_name', __( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
|
509 |
}
|
510 |
|
511 |
+
// Filter email address
|
512 |
$r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
|
513 |
if ( empty( $r['bbp_anonymous_email'] ) ) {
|
514 |
bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
|
515 |
}
|
516 |
|
517 |
+
// Website is optional (can be empty)
|
518 |
$r['bbp_anonymous_website'] = apply_filters( 'bbp_pre_anonymous_post_author_website', $r['bbp_anonymous_website'] );
|
519 |
|
520 |
+
// Filter & return
|
521 |
+
return (array) apply_filters( 'bbp_filter_anonymous_post_data', $r, $args );
|
522 |
+
}
|
523 |
|
524 |
+
/**
|
525 |
+
* Sanitize an array of anonymous post author data
|
526 |
+
*
|
527 |
+
* @since 2.6.0 bbPress (r6400)
|
528 |
+
*
|
529 |
+
* @param array $anonymous_data
|
530 |
+
* @return array
|
531 |
+
*/
|
532 |
+
function bbp_sanitize_anonymous_post_author( $anonymous_data = array() ) {
|
533 |
+
|
534 |
+
// Make sure anonymous data is an array
|
535 |
+
if ( ! is_array( $anonymous_data ) ) {
|
536 |
+
$anonymous_data = array();
|
537 |
+
}
|
538 |
+
|
539 |
+
// Map meta data to comment fields (as guides for stripping invalid text)
|
540 |
+
$fields = array(
|
541 |
+
'bbp_anonymous_name' => 'comment_author',
|
542 |
+
'bbp_anonymous_email' => 'comment_author_email',
|
543 |
+
'bbp_anonymous_website' => 'comment_author_url'
|
544 |
+
);
|
545 |
+
|
546 |
+
// Setup a new return array
|
547 |
+
$r = $anonymous_data;
|
548 |
+
|
549 |
+
// Get the database
|
550 |
+
$bbp_db = bbp_db();
|
551 |
+
|
552 |
+
// Strip invalid text from fields
|
553 |
+
foreach ( $fields as $bbp_field => $comment_field ) {
|
554 |
+
if ( ! empty( $r[ $bbp_field ] ) ) {
|
555 |
+
$r[ $bbp_field ] = $bbp_db->strip_invalid_text_for_column( $bbp_db->comments, $comment_field, $r[ $bbp_field ] );
|
556 |
+
}
|
557 |
+
}
|
558 |
+
|
559 |
+
// Filter & return
|
560 |
+
return (array) apply_filters( 'bbp_sanitize_anonymous_post_author', $r, $anonymous_data );
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* Update the relevant meta-data for an anonymous post author
|
565 |
+
*
|
566 |
+
* @since 2.6.0 bbPress (r6400)
|
567 |
+
*
|
568 |
+
* @param int $post_id
|
569 |
+
* @param array $anonymous_data
|
570 |
+
* @param string $post_type
|
571 |
+
*/
|
572 |
+
function bbp_update_anonymous_post_author( $post_id = 0, $anonymous_data = array(), $post_type = '' ) {
|
573 |
+
|
574 |
+
// Maybe look for anonymous
|
575 |
+
if ( empty( $anonymous_data ) ) {
|
576 |
+
$anonymous_data = bbp_filter_anonymous_post_data();
|
577 |
+
}
|
578 |
+
|
579 |
+
// Sanitize parameters
|
580 |
+
$post_id = (int) $post_id;
|
581 |
+
$post_type = sanitize_key( $post_type );
|
582 |
+
|
583 |
+
// Bail if missing required data
|
584 |
+
if ( empty( $post_id ) || empty( $post_type ) || empty( $anonymous_data ) ) {
|
585 |
+
return;
|
586 |
+
}
|
587 |
+
|
588 |
+
// Parse arguments against default values
|
589 |
+
$r = bbp_parse_args( $anonymous_data, array(
|
590 |
+
'bbp_anonymous_name' => '',
|
591 |
+
'bbp_anonymous_email' => '',
|
592 |
+
'bbp_anonymous_website' => '',
|
593 |
+
), "update_{$post_type}" );
|
594 |
+
|
595 |
+
// Update all anonymous metas
|
596 |
+
foreach ( $r as $anon_key => $anon_value ) {
|
597 |
+
update_post_meta( $post_id, '_' . $anon_key, (string) $anon_value, false );
|
598 |
+
}
|
599 |
}
|
600 |
|
601 |
/**
|
607 |
*
|
608 |
* @param array $post_data Contains information about the comment
|
609 |
* @uses current_user_can() To check if the current user can throttle
|
610 |
+
* @uses get_meta_sql() To generate the meta database for checking anonymous email
|
611 |
* @uses apply_filters() Calls 'bbp_check_for_duplicate_query' with the
|
612 |
* duplicate check query and post data
|
613 |
* @uses wpdb::get_var() To execute our query and get the var back
|
630 |
'post_parent' => 0,
|
631 |
'post_content' => '',
|
632 |
'post_status' => bbp_get_trash_status_id(),
|
633 |
+
'anonymous_data' => array()
|
634 |
), 'check_for_duplicate' );
|
635 |
|
636 |
// Get the DB
|
637 |
$bbp_db = bbp_db();
|
638 |
|
639 |
+
// Default clauses
|
640 |
+
$join = $where = '';
|
641 |
+
|
642 |
// Check for anonymous post
|
643 |
if ( empty( $r['post_author'] ) && ( ! empty( $r['anonymous_data'] ) && ! empty( $r['anonymous_data']['bbp_anonymous_email'] ) ) ) {
|
|
|
|
|
|
|
|
|
644 |
|
645 |
+
// Sanitize the email address for querying
|
646 |
+
$email = sanitize_email( $r['anonymous_data']['bbp_anonymous_email'] );
|
647 |
+
|
648 |
+
// Only proceed
|
649 |
+
if ( ! empty( $email ) && is_email( $email ) ) {
|
650 |
+
|
651 |
+
// Get the meta SQL
|
652 |
+
$clauses = get_meta_sql( array( array(
|
653 |
+
'key' => '_bbp_anonymous_email',
|
654 |
+
'value' => $email,
|
655 |
+
) ), 'post', $bbp_db->posts, 'ID' );
|
656 |
+
|
657 |
+
// Set clauses
|
658 |
+
$join = $clauses['join'];
|
659 |
+
$where = $clauses['where'];
|
660 |
+
}
|
661 |
}
|
662 |
|
663 |
// Unslash $r to pass through DB->prepare()
|
688 |
*
|
689 |
* @since 2.0.0 bbPress (r2734)
|
690 |
*
|
691 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
692 |
+
* supply if supplying $author_id. Should be
|
693 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
|
|
|
|
|
|
694 |
* @param int $author_id Optional. Supply if it's a post by a logged in user.
|
695 |
* Do not supply if supplying $anonymous_data.
|
696 |
+
*
|
697 |
+
* @suse bbp_allow_content_throttle() To make sure flood checking is enabled
|
698 |
* @uses get_option() To get the throttle time
|
699 |
* @uses get_transient() To get the last posted transient of the ip
|
700 |
* @uses bbp_get_user_last_posted() To get the last posted time of the user
|
701 |
* @uses current_user_can() To check if the current user can throttle
|
702 |
+
*
|
703 |
* @return bool True if there is no flooding, false if there is
|
704 |
*/
|
705 |
+
function bbp_check_for_flood( $anonymous_data = array(), $author_id = 0 ) {
|
706 |
+
|
707 |
+
// Allow for flood check to be skipped
|
708 |
+
if ( apply_filters( 'bbp_bypass_check_for_flood', false, $anonymous_data, $author_id ) ) {
|
709 |
+
return true;
|
710 |
+
}
|
711 |
|
712 |
// Option disabled. No flood checks.
|
713 |
$throttle_time = get_option( '_bbp_throttle_time' );
|
714 |
+
if ( empty( $throttle_time ) || ! bbp_allow_content_throttle() ) {
|
715 |
return true;
|
716 |
}
|
717 |
|
718 |
// User is anonymous, so check a transient based on the IP
|
719 |
+
if ( ! empty( $anonymous_data ) ) {
|
720 |
$last_posted = get_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted' );
|
721 |
|
722 |
+
if ( ! empty( $last_posted ) && ( time() < ( $last_posted + $throttle_time ) ) ) {
|
723 |
return false;
|
724 |
}
|
725 |
|
728 |
$author_id = (int) $author_id;
|
729 |
$last_posted = bbp_get_user_last_posted( $author_id );
|
730 |
|
731 |
+
if ( ! empty( $last_posted ) && ( time() < ( $last_posted + $throttle_time ) ) && ! user_can( $author_id, 'throttle' ) ) {
|
732 |
return false;
|
733 |
}
|
734 |
} else {
|
743 |
*
|
744 |
* @since 2.1.0 bbPress (r3581)
|
745 |
*
|
746 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
747 |
+
* supply if supplying $author_id. Should be
|
748 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
749 |
* @param int $author_id Topic or reply author ID
|
750 |
* @param string $title The title of the content
|
751 |
* @param string $content The content being posted
|
754 |
* @uses bbp_current_author_ua() To get current user agent
|
755 |
* @return bool True if test is passed, false if fail
|
756 |
*/
|
757 |
+
function bbp_check_for_moderation( $anonymous_data = array(), $author_id = 0, $title = '', $content = '' ) {
|
758 |
|
759 |
// Allow for moderation check to be skipped
|
760 |
if ( apply_filters( 'bbp_bypass_check_for_moderation', false, $anonymous_data, $author_id, $title, $content ) ) {
|
881 |
*
|
882 |
* @since 2.0.0 bbPress (r3446)
|
883 |
*
|
884 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
885 |
+
* supply if supplying $author_id. Should be
|
886 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
887 |
* @param int $author_id Topic or reply author ID
|
888 |
* @param string $title The title of the content
|
889 |
* @param string $content The content being posted
|
892 |
* @uses bbp_current_author_ua() To get current user agent
|
893 |
* @return bool True if test is passed, false if fail
|
894 |
*/
|
895 |
+
function bbp_check_for_blacklist( $anonymous_data = array(), $author_id = 0, $title = '', $content = '' ) {
|
896 |
|
897 |
// Allow for blacklist check to be skipped
|
898 |
if ( apply_filters( 'bbp_bypass_check_for_blacklist', false, $anonymous_data, $author_id, $title, $content ) ) {
|
1017 |
if ( substr( $sitename, 0, 4 ) === 'www.' ) {
|
1018 |
$sitename = substr( $sitename, 4 );
|
1019 |
}
|
1020 |
+
|
1021 |
+
// Filter & return
|
1022 |
return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
|
1023 |
}
|
1024 |
|
1039 |
* @param int $reply_id ID of the newly made reply
|
1040 |
* @param int $topic_id ID of the topic of the reply
|
1041 |
* @param int $forum_id ID of the forum of the reply
|
1042 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
1043 |
+
* supply if supplying $author_id. Should be
|
1044 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
1045 |
* @param int $reply_author ID of the topic author ID
|
1046 |
*
|
1047 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
1068 |
* topic id and user id
|
1069 |
* @return bool True on success, false on failure
|
1070 |
*/
|
1071 |
+
function bbp_notify_topic_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $reply_author = 0 ) {
|
1072 |
|
1073 |
// Bail if subscriptions are turned off
|
1074 |
if ( ! bbp_is_subscriptions_active() ) {
|
1098 |
// Poster name
|
1099 |
$reply_author_name = bbp_get_reply_author_display_name( $reply_id );
|
1100 |
|
1101 |
+
/** Users *****************************************************************/
|
1102 |
+
|
1103 |
+
// Get topic subscribers and bail if empty
|
1104 |
+
$user_ids = bbp_get_topic_subscribers( $topic_id, true );
|
1105 |
+
|
1106 |
+
// Dedicated filter to manipulate user ID's to send emails to
|
1107 |
+
$user_ids = (array) apply_filters( 'bbp_topic_subscription_user_ids', $user_ids );
|
1108 |
+
if ( empty( $user_ids ) ) {
|
1109 |
+
return false;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
// Remove the reply author from the list.
|
1113 |
+
$reply_author_key = array_search( (int) $reply_author, $user_ids, true );
|
1114 |
+
if ( false !== $reply_author_key ) {
|
1115 |
+
unset( $user_ids[ $reply_author_key ] );
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
// Bail of the reply author was the only one subscribed.
|
1119 |
+
if ( empty( $user_ids ) ) {
|
1120 |
+
return false;
|
1121 |
+
}
|
1122 |
+
|
1123 |
/** Mail ******************************************************************/
|
1124 |
|
1125 |
// Remove filters from reply content and topic title to prevent content
|
1162 |
return;
|
1163 |
}
|
1164 |
|
1165 |
+
/** Headers ***************************************************************/
|
1166 |
|
1167 |
// Get the noreply@ address
|
1168 |
$no_reply = bbp_get_do_not_reply_address();
|
1173 |
// Setup the From header
|
1174 |
$headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
|
1175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
// Loop through users
|
1177 |
foreach ( (array) $user_ids as $user_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1178 |
$headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
|
1179 |
}
|
1180 |
|
1210 |
*
|
1211 |
* @param int $topic_id ID of the newly made reply
|
1212 |
* @param int $forum_id ID of the forum for the topic
|
1213 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
1214 |
+
* supply if supplying $author_id. Should be
|
1215 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
1216 |
* @param int $topic_author ID of the topic author ID
|
1217 |
*
|
1218 |
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
|
1234 |
* id, forum id and user id
|
1235 |
* @return bool True on success, false on failure
|
1236 |
*/
|
1237 |
+
function bbp_notify_forum_subscribers( $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $topic_author = 0 ) {
|
1238 |
|
1239 |
// Bail if subscriptions are turned off
|
1240 |
if ( ! bbp_is_subscriptions_active() ) {
|
1263 |
// Poster name
|
1264 |
$topic_author_name = bbp_get_topic_author_display_name( $topic_id );
|
1265 |
|
1266 |
+
/** Users *****************************************************************/
|
1267 |
+
|
1268 |
+
// Get topic subscribers and bail if empty
|
1269 |
+
$user_ids = bbp_get_forum_subscribers( $forum_id, true );
|
1270 |
+
|
1271 |
+
// Dedicated filter to manipulate user ID's to send emails to
|
1272 |
+
$user_ids = (array) apply_filters( 'bbp_forum_subscription_user_ids', $user_ids );
|
1273 |
+
if ( empty( $user_ids ) ) {
|
1274 |
+
return false;
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
// Remove the topic author from the list.
|
1278 |
+
$topic_author_key = array_search( (int) $topic_author, $user_ids, true );
|
1279 |
+
if ( false !== $topic_author_key ) {
|
1280 |
+
unset( $user_ids[ $topic_author_key ] );
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
// Bail of the topic author was the only one subscribed.
|
1284 |
+
if ( empty( $user_ids ) ) {
|
1285 |
+
return false;
|
1286 |
+
}
|
1287 |
+
|
1288 |
/** Mail ******************************************************************/
|
1289 |
|
1290 |
// Remove filters from reply content and topic title to prevent content
|
1327 |
return;
|
1328 |
}
|
1329 |
|
1330 |
+
/** Headers ***************************************************************/
|
1331 |
|
1332 |
// Get the noreply@ address
|
1333 |
$no_reply = bbp_get_do_not_reply_address();
|
1338 |
// Setup the From header
|
1339 |
$headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
|
1340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1341 |
// Loop through users
|
1342 |
foreach ( (array) $user_ids as $user_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1343 |
$headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
|
1344 |
}
|
1345 |
|
1371 |
* @param int $reply_id ID of the newly made reply
|
1372 |
* @param int $topic_id ID of the topic of the reply
|
1373 |
* @param int $forum_id ID of the forum of the reply
|
1374 |
+
* @param array $anonymous_data Optional - if it's an anonymous post. Do not
|
1375 |
+
* supply if supplying $author_id. Should be
|
1376 |
+
* sanitized (see {@link bbp_filter_anonymous_post_data()}
|
1377 |
* @param int $reply_author ID of the topic author ID
|
1378 |
*
|
1379 |
* @return bool True on success, false on failure
|
1380 |
*/
|
1381 |
+
function bbp_notify_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $reply_author = 0 ) {
|
1382 |
return bbp_notify_topic_subscribers( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author );
|
1383 |
}
|
1384 |
|
1410 |
$url = add_query_arg( array( 'redirect_to' => urlencode( $redirect_to ) ), $url );
|
1411 |
}
|
1412 |
|
1413 |
+
// Filter & return
|
1414 |
return apply_filters( 'bbp_logout_url', $url, $redirect_to );
|
1415 |
}
|
1416 |
|
1477 |
global $wp;
|
1478 |
|
1479 |
// Noop if WP core supports this already
|
1480 |
+
if ( in_array( 'post_parent__in', $wp->private_query_vars, true ) ) {
|
1481 |
return $where;
|
1482 |
}
|
1483 |
|
1545 |
'post_parent' => $parent_id,
|
1546 |
'post_status' => $post_status,
|
1547 |
'post_type' => $post_type,
|
1548 |
+
'orderby' => array(
|
1549 |
+
'post_date' => 'DESC',
|
1550 |
+
'ID' => 'DESC'
|
1551 |
+
),
|
1552 |
|
1553 |
// Maybe change these later
|
1554 |
'posts_per_page' => 1,
|
1560 |
$child_id = array_shift( $query->posts );
|
1561 |
unset( $query );
|
1562 |
|
1563 |
+
// Filter & return
|
1564 |
return (int) apply_filters( 'bbp_get_public_child_last_id', $child_id, $parent_id, $post_type );
|
1565 |
}
|
1566 |
|
1611 |
$child_count = $query->post_count;
|
1612 |
unset( $query );
|
1613 |
|
1614 |
+
// Filter & return
|
1615 |
return (int) apply_filters( 'bbp_get_public_child_count', $child_count, $parent_id, $post_type );
|
1616 |
}
|
1617 |
|
1634 |
function bbp_get_public_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
1635 |
|
1636 |
// Bail if nothing passed
|
1637 |
+
if ( empty( $parent_id ) || empty( $post_type ) ) {
|
1638 |
+
return array();
|
1639 |
}
|
1640 |
|
1641 |
// Get the public post status
|
1662 |
$child_ids = ! empty( $query->posts ) ? $query->posts : array();
|
1663 |
unset( $query );
|
1664 |
|
1665 |
+
// Filter & return
|
1666 |
return (array) apply_filters( 'bbp_get_public_child_ids', $child_ids, $parent_id, $post_type );
|
1667 |
}
|
1668 |
|
1694 |
function bbp_get_all_child_ids( $parent_id = 0, $post_type = 'post' ) {
|
1695 |
|
1696 |
// Bail if nothing passed
|
1697 |
+
if ( empty( $parent_id ) || empty( $post_type ) ) {
|
1698 |
+
return array();
|
1699 |
}
|
1700 |
|
1701 |
// The ID of the cached query
|
1734 |
// Join post statuses together
|
1735 |
$post_status = "'" . implode( "', '", $post_status ) . "'";
|
1736 |
$bbp_db = bbp_db();
|
1737 |
+
|
1738 |
+
// Note that we can't use WP_Query here thanks to post_status assumptions
|
1739 |
$query = $bbp_db->prepare( "SELECT ID FROM {$bbp_db->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = %s ORDER BY ID DESC", $parent_id, $post_type );
|
1740 |
$child_ids = (array) $bbp_db->get_col( $query );
|
1741 |
|
1742 |
+
// Always cache the results
|
1743 |
wp_cache_set( $cache_id, $child_ids, 'bbpress_posts' );
|
|
|
|
|
1744 |
}
|
1745 |
|
1746 |
+
// Make sure results are INTs
|
1747 |
+
$child_ids = wp_parse_id_list( $child_ids );
|
1748 |
+
|
1749 |
+
// Filter & return
|
1750 |
return (array) apply_filters( 'bbp_get_all_child_ids', $child_ids, $parent_id, $post_type );
|
1751 |
}
|
1752 |
|
1759 |
*
|
1760 |
* @since 2.1.0 bbPress (r3694)
|
1761 |
*
|
|
|
1762 |
* @param string $field Name of the key
|
1763 |
* @param string $context How to sanitize - raw|edit|db|display|attribute|js
|
1764 |
* @return string Field value
|
1765 |
*/
|
1766 |
function bbp_get_global_post_field( $field = 'ID', $context = 'edit' ) {
|
|
|
1767 |
|
1768 |
+
// Get the post, and maybe get a field from it
|
1769 |
+
$post = get_post();
|
1770 |
+
$retval = isset( $post->{$field} )
|
1771 |
+
? sanitize_post_field( $field, $post->{$field}, $post->ID, $context )
|
1772 |
+
: '';
|
1773 |
|
1774 |
+
// Filter & return
|
1775 |
+
return apply_filters( 'bbp_get_global_post_field', $retval, $post, $field, $context );
|
1776 |
}
|
1777 |
|
1778 |
/** Nonces ********************************************************************/
|
1950 |
'feed' => true,
|
1951 |
'post_type' => bbp_get_reply_post_type(),
|
1952 |
'post_parent' => 'any',
|
1953 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
1954 |
'posts_per_page' => bbp_get_replies_per_rss_page(),
|
1955 |
'order' => 'DESC',
|
1956 |
'meta_query' => $meta_query
|
1968 |
'feed' => true,
|
1969 |
'post_type' => bbp_get_topic_post_type(),
|
1970 |
'post_parent' => bbp_get_forum_id(),
|
1971 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
1972 |
'posts_per_page' => bbp_get_topics_per_rss_page(),
|
1973 |
'order' => 'DESC'
|
1974 |
);
|
1990 |
'feed' => true,
|
1991 |
'post_type' => array( bbp_get_reply_post_type(), bbp_get_topic_post_type() ),
|
1992 |
'post_parent' => 'any',
|
1993 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
1994 |
'posts_per_page' => bbp_get_replies_per_rss_page(),
|
1995 |
'order' => 'DESC',
|
1996 |
'meta_query' => $meta_query
|
2105 |
}
|
2106 |
}
|
2107 |
|
2108 |
+
// Filter & return
|
2109 |
return apply_filters( 'bbp_get_page_by_path', $retval, $path );
|
2110 |
}
|
2111 |
|
includes/common/locks.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* bbPress Locking
|
5 |
+
*
|
6 |
+
* @package bbPress
|
7 |
+
* @subpackage Common
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
defined( 'ABSPATH' ) || exit;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Check to see if the post is currently being edited by another user.
|
15 |
+
*
|
16 |
+
* @see wp_check_post_lock()
|
17 |
+
*
|
18 |
+
* @since 2.6.0 bbPress (r6340)
|
19 |
+
*
|
20 |
+
* @param int $post_id ID of the post to check for editing
|
21 |
+
* @return integer False: not locked or locked by current user. Int: user ID of user with lock.
|
22 |
+
*/
|
23 |
+
function bbp_check_post_lock( $post_id = 0 ) {
|
24 |
+
|
25 |
+
// Bail if no post
|
26 |
+
if ( !$post = get_post( $post_id ) ) {
|
27 |
+
return false;
|
28 |
+
}
|
29 |
+
|
30 |
+
// Bail if no lock
|
31 |
+
if ( !$lock = get_post_meta( $post->ID, '_edit_lock', true ) ) {
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
// Get lock
|
36 |
+
$lock = explode( ':', $lock );
|
37 |
+
$time = $lock[0];
|
38 |
+
$user = (int) isset( $lock[1] )
|
39 |
+
? $lock[1]
|
40 |
+
: get_post_meta( $post->ID, '_edit_last', true );
|
41 |
+
|
42 |
+
// Filter editing window duration
|
43 |
+
$time_window = apply_filters( 'bbp_check_post_lock_window', 3 * MINUTE_IN_SECONDS );
|
44 |
+
|
45 |
+
// Return user who is or last edited
|
46 |
+
if ( ! empty( $time ) && ( $time > ( time() - $time_window ) ) && ( $user !== bbp_get_current_user_id() ) ) {
|
47 |
+
return (int) $user;
|
48 |
+
}
|
49 |
+
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Mark the post as currently being edited by the current user
|
55 |
+
*
|
56 |
+
* @since 2.6.0 bbPress (r6340)
|
57 |
+
*
|
58 |
+
* @param int $post_id ID of the post to being edited
|
59 |
+
* @return bool|array Returns false if the post doesn't exist of there is no current user, or
|
60 |
+
* an array of the lock time and the user ID.
|
61 |
+
*/
|
62 |
+
function bbp_set_post_lock( $post_id = 0 ) {
|
63 |
+
|
64 |
+
// Bail if no post
|
65 |
+
if ( !$post = get_post( $post_id ) ) {
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
|
69 |
+
// Bail if no user
|
70 |
+
if ( 0 == ( $user_id = get_current_user_id() ) ) {
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
// Get time & lock value
|
75 |
+
$now = time();
|
76 |
+
$lock = "{$now}:{$user_id}";
|
77 |
+
|
78 |
+
// Set lock value
|
79 |
+
update_post_meta( $post->ID, '_edit_lock', $lock );
|
80 |
+
|
81 |
+
return array( $now, $user_id );
|
82 |
+
}
|
includes/common/shortcodes.php
CHANGED
@@ -174,11 +174,17 @@ class BBP_Shortcodes {
|
|
174 |
// Unset globals
|
175 |
$this->unset_globals();
|
176 |
|
|
|
|
|
|
|
177 |
// Reset the query name
|
178 |
bbp_reset_query_name();
|
179 |
|
180 |
// Return and flush the output buffer
|
181 |
-
|
|
|
|
|
|
|
182 |
}
|
183 |
|
184 |
/** Forum shortcodes ******************************************************/
|
@@ -278,7 +284,6 @@ class BBP_Shortcodes {
|
|
278 |
*
|
279 |
* @since 2.0.0 bbPress (r3031)
|
280 |
*
|
281 |
-
* @uses bbp_get_hidden_forum_ids()
|
282 |
* @uses get_template_part()
|
283 |
* @return string
|
284 |
*/
|
174 |
// Unset globals
|
175 |
$this->unset_globals();
|
176 |
|
177 |
+
// Get the query name, for filter
|
178 |
+
$query_name = bbp_get_query_name();
|
179 |
+
|
180 |
// Reset the query name
|
181 |
bbp_reset_query_name();
|
182 |
|
183 |
// Return and flush the output buffer
|
184 |
+
$output = ob_get_clean();
|
185 |
+
|
186 |
+
// Filter & return
|
187 |
+
return apply_filters( 'bbp_display_shortcode', $output, $query_name );
|
188 |
}
|
189 |
|
190 |
/** Forum shortcodes ******************************************************/
|
284 |
*
|
285 |
* @since 2.0.0 bbPress (r3031)
|
286 |
*
|
|
|
287 |
* @uses get_template_part()
|
288 |
* @return string
|
289 |
*/
|
includes/common/template.php
CHANGED
@@ -16,7 +16,7 @@ defined( 'ABSPATH' ) || exit;
|
|
16 |
/** URLs **********************************************************************/
|
17 |
|
18 |
/**
|
19 |
-
*
|
20 |
*
|
21 |
* @since 2.1.0 bbPress (r3979)
|
22 |
*
|
@@ -40,7 +40,7 @@ function bbp_forums_url( $path = '/' ) {
|
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
-
*
|
44 |
*
|
45 |
* @since 2.1.0 bbPress (r3979)
|
46 |
*
|
@@ -111,6 +111,7 @@ function bbp_is_site_public( $site_id = 0 ) {
|
|
111 |
// Get the site visibility setting
|
112 |
$public = get_blog_option( $site_id, 'blog_public', 1 );
|
113 |
|
|
|
114 |
return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id );
|
115 |
}
|
116 |
|
@@ -133,6 +134,7 @@ function bbp_is_forum( $post_id = 0 ) {
|
|
133 |
$retval = true;
|
134 |
}
|
135 |
|
|
|
136 |
return (bool) apply_filters( 'bbp_is_forum', $retval, $post_id );
|
137 |
}
|
138 |
|
@@ -157,6 +159,7 @@ function bbp_is_forum_archive() {
|
|
157 |
$retval = true;
|
158 |
}
|
159 |
|
|
|
160 |
return (bool) apply_filters( 'bbp_is_forum_archive', $retval );
|
161 |
}
|
162 |
|
@@ -187,6 +190,7 @@ function bbp_is_single_forum() {
|
|
187 |
$retval = true;
|
188 |
}
|
189 |
|
|
|
190 |
return (bool) apply_filters( 'bbp_is_single_forum', $retval );
|
191 |
}
|
192 |
|
@@ -213,6 +217,7 @@ function bbp_is_forum_edit() {
|
|
213 |
$retval = true;
|
214 |
}
|
215 |
|
|
|
216 |
return (bool) apply_filters( 'bbp_is_forum_edit', $retval );
|
217 |
}
|
218 |
|
@@ -236,6 +241,7 @@ function bbp_is_topic( $post_id = 0 ) {
|
|
236 |
$retval = true;
|
237 |
}
|
238 |
|
|
|
239 |
return (bool) apply_filters( 'bbp_is_topic', $retval, $post_id );
|
240 |
}
|
241 |
|
@@ -266,6 +272,7 @@ function bbp_is_single_topic() {
|
|
266 |
$retval = true;
|
267 |
}
|
268 |
|
|
|
269 |
return (bool) apply_filters( 'bbp_is_single_topic', $retval );
|
270 |
}
|
271 |
|
@@ -289,6 +296,7 @@ function bbp_is_topic_archive() {
|
|
289 |
$retval = true;
|
290 |
}
|
291 |
|
|
|
292 |
return (bool) apply_filters( 'bbp_is_topic_archive', $retval );
|
293 |
}
|
294 |
|
@@ -315,6 +323,7 @@ function bbp_is_topic_edit() {
|
|
315 |
$retval = true;
|
316 |
}
|
317 |
|
|
|
318 |
return (bool) apply_filters( 'bbp_is_topic_edit', $retval );
|
319 |
}
|
320 |
|
@@ -336,6 +345,7 @@ function bbp_is_topic_merge() {
|
|
336 |
return true;
|
337 |
}
|
338 |
|
|
|
339 |
return (bool) apply_filters( 'bbp_is_topic_merge', $retval );
|
340 |
}
|
341 |
|
@@ -357,6 +367,7 @@ function bbp_is_topic_split() {
|
|
357 |
$retval = true;
|
358 |
}
|
359 |
|
|
|
360 |
return (bool) apply_filters( 'bbp_is_topic_split', $retval );
|
361 |
}
|
362 |
|
@@ -387,6 +398,7 @@ function bbp_is_topic_tag() {
|
|
387 |
$retval = true;
|
388 |
}
|
389 |
|
|
|
390 |
return (bool) apply_filters( 'bbp_is_topic_tag', $retval );
|
391 |
}
|
392 |
|
@@ -418,11 +430,12 @@ function bbp_is_topic_tag_edit() {
|
|
418 |
$retval = true;
|
419 |
}
|
420 |
|
|
|
421 |
return (bool) apply_filters( 'bbp_is_topic_tag_edit', $retval );
|
422 |
}
|
423 |
|
424 |
/**
|
425 |
-
* Check if the current post type is one
|
426 |
*
|
427 |
* @since 2.0.0 bbPress (r3311)
|
428 |
*
|
@@ -444,10 +457,11 @@ function bbp_is_custom_post_type( $the_post = false ) {
|
|
444 |
bbp_get_forum_post_type(),
|
445 |
bbp_get_topic_post_type(),
|
446 |
bbp_get_reply_post_type()
|
447 |
-
) ) ) {
|
448 |
$retval = true;
|
449 |
}
|
450 |
|
|
|
451 |
return (bool) apply_filters( 'bbp_is_custom_post_type', $retval, $the_post );
|
452 |
}
|
453 |
|
@@ -471,6 +485,7 @@ function bbp_is_reply( $post_id = 0 ) {
|
|
471 |
$retval = true;
|
472 |
}
|
473 |
|
|
|
474 |
return (bool) apply_filters( 'bbp_is_reply', $retval, $post_id );
|
475 |
}
|
476 |
|
@@ -497,6 +512,7 @@ function bbp_is_reply_edit() {
|
|
497 |
$retval = true;
|
498 |
}
|
499 |
|
|
|
500 |
return (bool) apply_filters( 'bbp_is_reply_edit', $retval );
|
501 |
}
|
502 |
|
@@ -516,6 +532,7 @@ function bbp_is_reply_move() {
|
|
516 |
$retval = true;
|
517 |
}
|
518 |
|
|
|
519 |
return (bool) apply_filters( 'bbp_is_reply_move', $retval );
|
520 |
}
|
521 |
|
@@ -546,6 +563,7 @@ function bbp_is_single_reply() {
|
|
546 |
$retval = true;
|
547 |
}
|
548 |
|
|
|
549 |
return (bool) apply_filters( 'bbp_is_single_reply', $retval );
|
550 |
}
|
551 |
|
@@ -567,6 +585,7 @@ function bbp_is_favorites() {
|
|
567 |
$retval = true;
|
568 |
}
|
569 |
|
|
|
570 |
return (bool) apply_filters( 'bbp_is_favorites', $retval );
|
571 |
}
|
572 |
|
@@ -588,6 +607,7 @@ function bbp_is_subscriptions() {
|
|
588 |
$retval = true;
|
589 |
}
|
590 |
|
|
|
591 |
return (bool) apply_filters( 'bbp_is_subscriptions', $retval );
|
592 |
}
|
593 |
|
@@ -610,16 +630,17 @@ function bbp_is_topics_created() {
|
|
610 |
$retval = true;
|
611 |
}
|
612 |
|
|
|
613 |
return (bool) apply_filters( 'bbp_is_topics_created', $retval );
|
614 |
}
|
615 |
|
616 |
/**
|
617 |
-
* Check if current page shows the
|
618 |
* page)
|
619 |
*
|
620 |
* @since 2.2.0 bbPress (r4225)
|
621 |
*
|
622 |
-
* @return bool True if it's the
|
623 |
*/
|
624 |
function bbp_is_replies_created() {
|
625 |
global $wp_query;
|
@@ -632,6 +653,7 @@ function bbp_is_replies_created() {
|
|
632 |
$retval = true;
|
633 |
}
|
634 |
|
|
|
635 |
return (bool) apply_filters( 'bbp_is_replies_created', $retval );
|
636 |
}
|
637 |
|
@@ -657,6 +679,7 @@ function bbp_is_user_home() {
|
|
657 |
$retval = true;
|
658 |
}
|
659 |
|
|
|
660 |
return (bool) apply_filters( 'bbp_is_user_home', $retval );
|
661 |
}
|
662 |
|
@@ -680,6 +703,7 @@ function bbp_is_user_home_edit() {
|
|
680 |
$retval = true;
|
681 |
}
|
682 |
|
|
|
683 |
return (bool) apply_filters( 'bbp_is_user_home_edit', $retval );
|
684 |
}
|
685 |
|
@@ -702,6 +726,7 @@ function bbp_is_single_user() {
|
|
702 |
$retval = true;
|
703 |
}
|
704 |
|
|
|
705 |
return (bool) apply_filters( 'bbp_is_single_user', $retval );
|
706 |
}
|
707 |
|
@@ -724,6 +749,7 @@ function bbp_is_single_user_edit() {
|
|
724 |
$retval = true;
|
725 |
}
|
726 |
|
|
|
727 |
return (bool) apply_filters( 'bbp_is_single_user_edit', $retval );
|
728 |
}
|
729 |
|
@@ -746,6 +772,7 @@ function bbp_is_single_user_profile() {
|
|
746 |
$retval = true;
|
747 |
}
|
748 |
|
|
|
749 |
return (bool) apply_filters( 'bbp_is_single_user_profile', $retval );
|
750 |
}
|
751 |
|
@@ -768,6 +795,7 @@ function bbp_is_single_user_topics() {
|
|
768 |
$retval = true;
|
769 |
}
|
770 |
|
|
|
771 |
return (bool) apply_filters( 'bbp_is_single_user_topics', $retval );
|
772 |
}
|
773 |
|
@@ -790,9 +818,33 @@ function bbp_is_single_user_replies() {
|
|
790 |
$retval = true;
|
791 |
}
|
792 |
|
|
|
793 |
return (bool) apply_filters( 'bbp_is_single_user_replies', $retval );
|
794 |
}
|
795 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
/**
|
797 |
* Check if current page is a view page
|
798 |
*
|
@@ -818,6 +870,7 @@ function bbp_is_single_view() {
|
|
818 |
$retval = true;
|
819 |
}
|
820 |
|
|
|
821 |
return (bool) apply_filters( 'bbp_is_single_view', $retval );
|
822 |
}
|
823 |
|
@@ -856,6 +909,7 @@ function bbp_is_search() {
|
|
856 |
$retval = true;
|
857 |
}
|
858 |
|
|
|
859 |
return (bool) apply_filters( 'bbp_is_search', $retval );
|
860 |
}
|
861 |
|
@@ -894,6 +948,7 @@ function bbp_is_search_results() {
|
|
894 |
$retval = true;
|
895 |
}
|
896 |
|
|
|
897 |
return (bool) apply_filters( 'bbp_is_search_results', $retval );
|
898 |
}
|
899 |
|
@@ -916,6 +971,7 @@ function bbp_is_edit() {
|
|
916 |
$retval = true;
|
917 |
}
|
918 |
|
|
|
919 |
return (bool) apply_filters( 'bbp_is_edit', $retval );
|
920 |
}
|
921 |
|
@@ -1054,6 +1110,11 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
1054 |
} elseif ( bbp_is_search_results() ) {
|
1055 |
$bbp_classes[] = 'bbp-search-results';
|
1056 |
$bbp_classes[] = 'forum-search-results';
|
|
|
|
|
|
|
|
|
|
|
1057 |
}
|
1058 |
|
1059 |
/** Clean up **************************************************************/
|
@@ -1069,7 +1130,59 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
1069 |
// Deprecated filter (do not use)
|
1070 |
$classes = apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
|
1071 |
|
1072 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1073 |
}
|
1074 |
|
1075 |
/**
|
@@ -1093,6 +1206,8 @@ function bbp_body_class( $wp_classes, $custom_classes = false ) {
|
|
1093 |
* @uses bbp_is_favorites()
|
1094 |
* @uses bbp_is_topics_created()
|
1095 |
* @uses bbp_is_replies_created()
|
|
|
|
|
1096 |
* @return bool In a bbPress page
|
1097 |
*/
|
1098 |
function is_bbpress() {
|
@@ -1178,10 +1293,16 @@ function is_bbpress() {
|
|
1178 |
|
1179 |
} elseif ( bbp_is_search_results() ) {
|
1180 |
$retval = true;
|
|
|
|
|
|
|
|
|
|
|
1181 |
}
|
1182 |
|
1183 |
/** Done ******************************************************************/
|
1184 |
|
|
|
1185 |
return (bool) apply_filters( 'is_bbpress', $retval );
|
1186 |
}
|
1187 |
|
@@ -1225,16 +1346,13 @@ function bbp_wp_login_action( $args = array() ) {
|
|
1225 |
), 'login_action' );
|
1226 |
|
1227 |
// Add action as query arg
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
// No query arg
|
1232 |
-
} else {
|
1233 |
-
$login_url = $r['url'];
|
1234 |
-
}
|
1235 |
|
1236 |
$login_url = site_url( $login_url, $r['context'] );
|
1237 |
|
|
|
1238 |
return apply_filters( 'bbp_get_wp_login_action', $login_url, $r, $args );
|
1239 |
}
|
1240 |
|
@@ -1267,6 +1385,7 @@ function bbp_redirect_to_field( $redirect_to = '' ) {
|
|
1267 |
$redirect_to = remove_query_arg( 'loggedout', $redirect_to );
|
1268 |
$redirect_field = '<input type="hidden" id="bbp_redirect_to" name="redirect_to" value="' . esc_url( $redirect_to ) . '" />';
|
1269 |
|
|
|
1270 |
echo apply_filters( 'bbp_redirect_to_field', $redirect_field, $redirect_to );
|
1271 |
}
|
1272 |
|
@@ -1328,6 +1447,7 @@ function bbp_sanitize_val( $request = '', $input_type = 'text' ) {
|
|
1328 |
break;
|
1329 |
}
|
1330 |
|
|
|
1331 |
return apply_filters( 'bbp_get_sanitize_val', $retval, $request, $input_type );
|
1332 |
}
|
1333 |
|
@@ -1374,9 +1494,51 @@ function bbp_tab_index( $auto_increment = true ) {
|
|
1374 |
++$bbp->tab_index;
|
1375 |
}
|
1376 |
|
|
|
1377 |
return apply_filters( 'bbp_get_tab_index', (int) $bbp->tab_index );
|
1378 |
}
|
1379 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1380 |
/**
|
1381 |
* Output a select box allowing to pick which forum/topic a new topic/reply
|
1382 |
* belongs in.
|
@@ -1461,13 +1623,14 @@ function bbp_dropdown( $args = array() ) {
|
|
1461 |
'disabled' => ''
|
1462 |
), 'get_dropdown' );
|
1463 |
|
|
|
1464 |
if ( empty( $r['walker'] ) ) {
|
1465 |
$r['walker'] = new BBP_Walker_Dropdown();
|
1466 |
$r['walker']->tree_type = $r['post_type'];
|
1467 |
}
|
1468 |
|
1469 |
// Force 0
|
1470 |
-
if ( is_numeric( $r['selected'] ) && $r['selected'] < 0 ) {
|
1471 |
$r['selected'] = 0;
|
1472 |
}
|
1473 |
|
@@ -1561,7 +1724,8 @@ function bbp_dropdown( $args = array() ) {
|
|
1561 |
$retval .= '</select>';
|
1562 |
}
|
1563 |
|
1564 |
-
|
|
|
1565 |
}
|
1566 |
|
1567 |
/**
|
@@ -1742,7 +1906,7 @@ function bbp_split_topic_form_fields() {
|
|
1742 |
?>
|
1743 |
|
1744 |
<input type="hidden" name="action" id="bbp_post_action" value="bbp-split-topic" />
|
1745 |
-
<input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php echo
|
1746 |
|
1747 |
<?php wp_nonce_field( 'bbp-split-topic_' . bbp_get_topic_id() );
|
1748 |
}
|
@@ -1758,7 +1922,7 @@ function bbp_move_reply_form_fields() {
|
|
1758 |
?>
|
1759 |
|
1760 |
<input type="hidden" name="action" id="bbp_post_action" value="bbp-move-reply" />
|
1761 |
-
<input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php echo
|
1762 |
|
1763 |
<?php wp_nonce_field( 'bbp-move-reply_' . bbp_get_reply_id() );
|
1764 |
}
|
@@ -1861,12 +2025,9 @@ function bbp_the_content( $args = array() ) {
|
|
1861 |
* Note that we do not use esc_textarea() here to prevent double
|
1862 |
* escaping the editable output, mucking up existing content.
|
1863 |
*/
|
1864 |
-
else :
|
1865 |
|
1866 |
-
|
1867 |
-
$tab = ! empty( $r['tab'] ) ? ' tabindex="' . intval( $r['tab'] ) . '"' : ''; ?>
|
1868 |
-
|
1869 |
-
<textarea id="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" class="<?php echo esc_attr( $r['editor_class'] ); ?>" name="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" cols="60" rows="<?php echo esc_attr( $r['textarea_rows'] ); ?>" <?php echo $tab; ?>><?php echo $post_content; ?></textarea>
|
1870 |
|
1871 |
<?php endif;
|
1872 |
|
@@ -1878,6 +2039,7 @@ function bbp_the_content( $args = array() ) {
|
|
1878 |
// Put the output into a usable variable
|
1879 |
$output = ob_get_clean();
|
1880 |
|
|
|
1881 |
return apply_filters( 'bbp_get_the_content', $output, $args, $post_content );
|
1882 |
}
|
1883 |
|
@@ -1903,6 +2065,7 @@ function bbp_get_tiny_mce_plugins( $plugins = array() ) {
|
|
1903 |
// Add the tabfocus plugin
|
1904 |
$plugins[] = 'tabfocus';
|
1905 |
|
|
|
1906 |
return apply_filters( 'bbp_get_tiny_mce_plugins', $plugins );
|
1907 |
}
|
1908 |
|
@@ -1928,6 +2091,7 @@ function bbp_get_teeny_mce_buttons( $buttons = array() ) {
|
|
1928 |
// Images
|
1929 |
array_push( $buttons, 'image' );
|
1930 |
|
|
|
1931 |
return apply_filters( 'bbp_get_teeny_mce_buttons', $buttons );
|
1932 |
}
|
1933 |
|
@@ -1955,6 +2119,7 @@ function bbp_get_quicktags_settings( $settings = array() ) {
|
|
1955 |
// Put them back into a string in the $settings array
|
1956 |
$settings['buttons'] = implode( ',', $buttons );
|
1957 |
|
|
|
1958 |
return apply_filters( 'bbp_get_quicktags_settings', $settings );
|
1959 |
}
|
1960 |
|
@@ -2082,6 +2247,7 @@ function bbp_view_url( $view = false ) {
|
|
2082 |
), home_url( '/' ) );
|
2083 |
}
|
2084 |
|
|
|
2085 |
return apply_filters( 'bbp_get_view_link', $url, $view );
|
2086 |
}
|
2087 |
|
@@ -2443,7 +2609,8 @@ function bbp_breadcrumb( $args = array() ) {
|
|
2443 |
// Build the trail
|
2444 |
$trail = ! empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : '';
|
2445 |
|
2446 |
-
|
|
|
2447 |
}
|
2448 |
|
2449 |
/** Topic Tags ***************************************************************/
|
@@ -2487,6 +2654,7 @@ function bbp_allowed_tags() {
|
|
2487 |
$allowed .= '> ';
|
2488 |
}
|
2489 |
|
|
|
2490 |
return apply_filters( 'bbp_get_allowed_tags', htmlentities( $allowed ) );
|
2491 |
}
|
2492 |
|
@@ -2580,7 +2748,12 @@ function bbp_logout_link( $redirect_to = '' ) {
|
|
2580 |
* @return string The logout link
|
2581 |
*/
|
2582 |
function bbp_get_logout_link( $redirect_to = '' ) {
|
2583 |
-
|
|
|
|
|
|
|
|
|
|
|
2584 |
}
|
2585 |
|
2586 |
/** Title *********************************************************************/
|
@@ -2612,7 +2785,7 @@ function bbp_logout_link( $redirect_to = '' ) {
|
|
2612 |
* @uses apply_filters() Calls 'bbp_raw_title' with the title
|
2613 |
* @uses apply_filters() Calls 'bbp_profile_page_wp_title' with the title,
|
2614 |
* separator and separator location
|
2615 |
-
* @return string The
|
2616 |
*/
|
2617 |
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
2618 |
|
@@ -2797,6 +2970,6 @@ function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
|
2797 |
$new_title = $prefix . implode( " $sep ", $new_title_array );
|
2798 |
}
|
2799 |
|
2800 |
-
// Filter
|
2801 |
return apply_filters( 'bbp_title', $new_title, $sep, $seplocation );
|
2802 |
}
|
16 |
/** URLs **********************************************************************/
|
17 |
|
18 |
/**
|
19 |
+
* Output the forum URL
|
20 |
*
|
21 |
* @since 2.1.0 bbPress (r3979)
|
22 |
*
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
+
* Output the forum URL
|
44 |
*
|
45 |
* @since 2.1.0 bbPress (r3979)
|
46 |
*
|
111 |
// Get the site visibility setting
|
112 |
$public = get_blog_option( $site_id, 'blog_public', 1 );
|
113 |
|
114 |
+
// Filter & return
|
115 |
return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id );
|
116 |
}
|
117 |
|
134 |
$retval = true;
|
135 |
}
|
136 |
|
137 |
+
// Filter & return
|
138 |
return (bool) apply_filters( 'bbp_is_forum', $retval, $post_id );
|
139 |
}
|
140 |
|
159 |
$retval = true;
|
160 |
}
|
161 |
|
162 |
+
// Filter & return
|
163 |
return (bool) apply_filters( 'bbp_is_forum_archive', $retval );
|
164 |
}
|
165 |
|
190 |
$retval = true;
|
191 |
}
|
192 |
|
193 |
+
// Filter & return
|
194 |
return (bool) apply_filters( 'bbp_is_single_forum', $retval );
|
195 |
}
|
196 |
|
217 |
$retval = true;
|
218 |
}
|
219 |
|
220 |
+
// Filter & return
|
221 |
return (bool) apply_filters( 'bbp_is_forum_edit', $retval );
|
222 |
}
|
223 |
|
241 |
$retval = true;
|
242 |
}
|
243 |
|
244 |
+
// Filter & return
|
245 |
return (bool) apply_filters( 'bbp_is_topic', $retval, $post_id );
|
246 |
}
|
247 |
|
272 |
$retval = true;
|
273 |
}
|
274 |
|
275 |
+
// Filter & return
|
276 |
return (bool) apply_filters( 'bbp_is_single_topic', $retval );
|
277 |
}
|
278 |
|
296 |
$retval = true;
|
297 |
}
|
298 |
|
299 |
+
// Filter & return
|
300 |
return (bool) apply_filters( 'bbp_is_topic_archive', $retval );
|
301 |
}
|
302 |
|
323 |
$retval = true;
|
324 |
}
|
325 |
|
326 |
+
// Filter & return
|
327 |
return (bool) apply_filters( 'bbp_is_topic_edit', $retval );
|
328 |
}
|
329 |
|
345 |
return true;
|
346 |
}
|
347 |
|
348 |
+
// Filter & return
|
349 |
return (bool) apply_filters( 'bbp_is_topic_merge', $retval );
|
350 |
}
|
351 |
|
367 |
$retval = true;
|
368 |
}
|
369 |
|
370 |
+
// Filter & return
|
371 |
return (bool) apply_filters( 'bbp_is_topic_split', $retval );
|
372 |
}
|
373 |
|
398 |
$retval = true;
|
399 |
}
|
400 |
|
401 |
+
// Filter & return
|
402 |
return (bool) apply_filters( 'bbp_is_topic_tag', $retval );
|
403 |
}
|
404 |
|
430 |
$retval = true;
|
431 |
}
|
432 |
|
433 |
+
// Filter & return
|
434 |
return (bool) apply_filters( 'bbp_is_topic_tag_edit', $retval );
|
435 |
}
|
436 |
|
437 |
/**
|
438 |
+
* Check if the current post type is one that comes with bbPress
|
439 |
*
|
440 |
* @since 2.0.0 bbPress (r3311)
|
441 |
*
|
457 |
bbp_get_forum_post_type(),
|
458 |
bbp_get_topic_post_type(),
|
459 |
bbp_get_reply_post_type()
|
460 |
+
), true ) ) {
|
461 |
$retval = true;
|
462 |
}
|
463 |
|
464 |
+
// Filter & return
|
465 |
return (bool) apply_filters( 'bbp_is_custom_post_type', $retval, $the_post );
|
466 |
}
|
467 |
|
485 |
$retval = true;
|
486 |
}
|
487 |
|
488 |
+
// Filter & return
|
489 |
return (bool) apply_filters( 'bbp_is_reply', $retval, $post_id );
|
490 |
}
|
491 |
|
512 |
$retval = true;
|
513 |
}
|
514 |
|
515 |
+
// Filter & return
|
516 |
return (bool) apply_filters( 'bbp_is_reply_edit', $retval );
|
517 |
}
|
518 |
|
532 |
$retval = true;
|
533 |
}
|
534 |
|
535 |
+
// Filter & return
|
536 |
return (bool) apply_filters( 'bbp_is_reply_move', $retval );
|
537 |
}
|
538 |
|
563 |
$retval = true;
|
564 |
}
|
565 |
|
566 |
+
// Filter & return
|
567 |
return (bool) apply_filters( 'bbp_is_single_reply', $retval );
|
568 |
}
|
569 |
|
585 |
$retval = true;
|
586 |
}
|
587 |
|
588 |
+
// Filter & return
|
589 |
return (bool) apply_filters( 'bbp_is_favorites', $retval );
|
590 |
}
|
591 |
|
607 |
$retval = true;
|
608 |
}
|
609 |
|
610 |
+
// Filter & return
|
611 |
return (bool) apply_filters( 'bbp_is_subscriptions', $retval );
|
612 |
}
|
613 |
|
630 |
$retval = true;
|
631 |
}
|
632 |
|
633 |
+
// Filter & return
|
634 |
return (bool) apply_filters( 'bbp_is_topics_created', $retval );
|
635 |
}
|
636 |
|
637 |
/**
|
638 |
+
* Check if current page shows the replies created by a bbPress user (profile
|
639 |
* page)
|
640 |
*
|
641 |
* @since 2.2.0 bbPress (r4225)
|
642 |
*
|
643 |
+
* @return bool True if it's the replies created page, false if not
|
644 |
*/
|
645 |
function bbp_is_replies_created() {
|
646 |
global $wp_query;
|
653 |
$retval = true;
|
654 |
}
|
655 |
|
656 |
+
// Filter & return
|
657 |
return (bool) apply_filters( 'bbp_is_replies_created', $retval );
|
658 |
}
|
659 |
|
679 |
$retval = true;
|
680 |
}
|
681 |
|
682 |
+
// Filter & return
|
683 |
return (bool) apply_filters( 'bbp_is_user_home', $retval );
|
684 |
}
|
685 |
|
703 |
$retval = true;
|
704 |
}
|
705 |
|
706 |
+
// Filter & return
|
707 |
return (bool) apply_filters( 'bbp_is_user_home_edit', $retval );
|
708 |
}
|
709 |
|
726 |
$retval = true;
|
727 |
}
|
728 |
|
729 |
+
// Filter & return
|
730 |
return (bool) apply_filters( 'bbp_is_single_user', $retval );
|
731 |
}
|
732 |
|
749 |
$retval = true;
|
750 |
}
|
751 |
|
752 |
+
// Filter & return
|
753 |
return (bool) apply_filters( 'bbp_is_single_user_edit', $retval );
|
754 |
}
|
755 |
|
772 |
$retval = true;
|
773 |
}
|
774 |
|
775 |
+
// Filter & return
|
776 |
return (bool) apply_filters( 'bbp_is_single_user_profile', $retval );
|
777 |
}
|
778 |
|
795 |
$retval = true;
|
796 |
}
|
797 |
|
798 |
+
// Filter & return
|
799 |
return (bool) apply_filters( 'bbp_is_single_user_topics', $retval );
|
800 |
}
|
801 |
|
818 |
$retval = true;
|
819 |
}
|
820 |
|
821 |
+
// Filter & return
|
822 |
return (bool) apply_filters( 'bbp_is_single_user_replies', $retval );
|
823 |
}
|
824 |
|
825 |
+
/**
|
826 |
+
* Check if current page is a user engagements page
|
827 |
+
*
|
828 |
+
* @since 2.6.0 bbPress (r6320)
|
829 |
+
*
|
830 |
+
* @uses WP_Query Checks if WP_Query::bbp_is_single_user_engagements is set to true
|
831 |
+
* @return bool True if it's a user's replies page, false if not
|
832 |
+
*/
|
833 |
+
function bbp_is_single_user_engagements() {
|
834 |
+
global $wp_query;
|
835 |
+
|
836 |
+
// Assume false
|
837 |
+
$retval = false;
|
838 |
+
|
839 |
+
// Check query
|
840 |
+
if ( ! empty( $wp_query->bbp_is_single_user_engagements ) && ( true === $wp_query->bbp_is_single_user_engagements ) ) {
|
841 |
+
$retval = true;
|
842 |
+
}
|
843 |
+
|
844 |
+
// Filter & return
|
845 |
+
return (bool) apply_filters( 'bbp_is_single_user_engagements', $retval );
|
846 |
+
}
|
847 |
+
|
848 |
/**
|
849 |
* Check if current page is a view page
|
850 |
*
|
870 |
$retval = true;
|
871 |
}
|
872 |
|
873 |
+
// Filter & return
|
874 |
return (bool) apply_filters( 'bbp_is_single_view', $retval );
|
875 |
}
|
876 |
|
909 |
$retval = true;
|
910 |
}
|
911 |
|
912 |
+
// Filter & return
|
913 |
return (bool) apply_filters( 'bbp_is_search', $retval );
|
914 |
}
|
915 |
|
948 |
$retval = true;
|
949 |
}
|
950 |
|
951 |
+
// Filter & return
|
952 |
return (bool) apply_filters( 'bbp_is_search_results', $retval );
|
953 |
}
|
954 |
|
971 |
$retval = true;
|
972 |
}
|
973 |
|
974 |
+
// Filter & return
|
975 |
return (bool) apply_filters( 'bbp_is_edit', $retval );
|
976 |
}
|
977 |
|
1110 |
} elseif ( bbp_is_search_results() ) {
|
1111 |
$bbp_classes[] = 'bbp-search-results';
|
1112 |
$bbp_classes[] = 'forum-search-results';
|
1113 |
+
|
1114 |
+
/** Shortcodes ************************************************************/
|
1115 |
+
|
1116 |
+
} elseif ( bbp_has_shortcode() ) {
|
1117 |
+
$bbp_classes[] = 'bbp-shortcode';
|
1118 |
}
|
1119 |
|
1120 |
/** Clean up **************************************************************/
|
1130 |
// Deprecated filter (do not use)
|
1131 |
$classes = apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
|
1132 |
|
1133 |
+
// Filter & return
|
1134 |
+
return (array) apply_filters( 'bbp_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes );
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
/**
|
1138 |
+
* Check if text contains a bbPress shortcode.
|
1139 |
+
*
|
1140 |
+
* Loops through registered bbPress shortcodes and keeps track of which ones
|
1141 |
+
* were used in a blob of text. If no text is passed, the current global post
|
1142 |
+
* content is assumed.
|
1143 |
+
*
|
1144 |
+
* A preliminary strpos() is performed before looping through each shortcode, to
|
1145 |
+
* prevent unnecessarily processing.
|
1146 |
+
*
|
1147 |
+
* @since 2.6.0
|
1148 |
+
*
|
1149 |
+
* @uses is_singular()
|
1150 |
+
* @uses bbp_get_global_post_field()
|
1151 |
+
* @uses has_shortcode();
|
1152 |
+
*
|
1153 |
+
* @param string $text
|
1154 |
+
* @return bool
|
1155 |
+
*/
|
1156 |
+
function bbp_has_shortcode( $text = '' ) {
|
1157 |
+
|
1158 |
+
// Default return value
|
1159 |
+
$retval = false;
|
1160 |
+
$found = array();
|
1161 |
+
|
1162 |
+
// Fallback to global post_content
|
1163 |
+
if ( empty( $text ) && is_singular() ) {
|
1164 |
+
$text = bbp_get_global_post_field( 'post_content', 'raw' );
|
1165 |
+
}
|
1166 |
+
|
1167 |
+
// Skip if empty, or string doesn't contain the bbPress shortcode prefix
|
1168 |
+
if ( ! empty( $text ) && ( false !== strpos( $text, '[bbp' ) ) ) {
|
1169 |
+
|
1170 |
+
// Get possible shortcodes
|
1171 |
+
$codes = array_keys( bbpress()->shortcodes->codes );
|
1172 |
+
|
1173 |
+
// Loop through codes
|
1174 |
+
foreach ( $codes as $code ) {
|
1175 |
+
|
1176 |
+
// Looking for shortcode in text
|
1177 |
+
if ( has_shortcode( $text, $code ) ) {
|
1178 |
+
$retval = true;
|
1179 |
+
$found[] = $code;
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
// Filter & return
|
1185 |
+
return (bool) apply_filters( 'bbp_has_shortcode', $retval, $found, $text );
|
1186 |
}
|
1187 |
|
1188 |
/**
|
1206 |
* @uses bbp_is_favorites()
|
1207 |
* @uses bbp_is_topics_created()
|
1208 |
* @uses bbp_is_replies_created()
|
1209 |
+
* @uses bbp_has_shortcode()
|
1210 |
+
*
|
1211 |
* @return bool In a bbPress page
|
1212 |
*/
|
1213 |
function is_bbpress() {
|
1293 |
|
1294 |
} elseif ( bbp_is_search_results() ) {
|
1295 |
$retval = true;
|
1296 |
+
|
1297 |
+
/** Shortcodes ************************************************************/
|
1298 |
+
|
1299 |
+
} elseif ( bbp_has_shortcode() ) {
|
1300 |
+
$retval = true;
|
1301 |
}
|
1302 |
|
1303 |
/** Done ******************************************************************/
|
1304 |
|
1305 |
+
// Filter & return
|
1306 |
return (bool) apply_filters( 'is_bbpress', $retval );
|
1307 |
}
|
1308 |
|
1346 |
), 'login_action' );
|
1347 |
|
1348 |
// Add action as query arg
|
1349 |
+
$login_url = ! empty( $r['action'] )
|
1350 |
+
? add_query_arg( array( 'action' => $r['action'] ), $r['url'] )
|
1351 |
+
: $r['url'];
|
|
|
|
|
|
|
|
|
1352 |
|
1353 |
$login_url = site_url( $login_url, $r['context'] );
|
1354 |
|
1355 |
+
// Filter & return
|
1356 |
return apply_filters( 'bbp_get_wp_login_action', $login_url, $r, $args );
|
1357 |
}
|
1358 |
|
1385 |
$redirect_to = remove_query_arg( 'loggedout', $redirect_to );
|
1386 |
$redirect_field = '<input type="hidden" id="bbp_redirect_to" name="redirect_to" value="' . esc_url( $redirect_to ) . '" />';
|
1387 |
|
1388 |
+
// Filter & return
|
1389 |
echo apply_filters( 'bbp_redirect_to_field', $redirect_field, $redirect_to );
|
1390 |
}
|
1391 |
|
1447 |
break;
|
1448 |
}
|
1449 |
|
1450 |
+
// Filter & return
|
1451 |
return apply_filters( 'bbp_get_sanitize_val', $retval, $request, $input_type );
|
1452 |
}
|
1453 |
|
1494 |
++$bbp->tab_index;
|
1495 |
}
|
1496 |
|
1497 |
+
// Filter & return
|
1498 |
return apply_filters( 'bbp_get_tab_index', (int) $bbp->tab_index );
|
1499 |
}
|
1500 |
|
1501 |
+
/**
|
1502 |
+
* Output a "tabindex" attribute for an element, if an index was passed.
|
1503 |
+
*
|
1504 |
+
* This helper function is in use, but it is generally considered impolite to
|
1505 |
+
* override the "tabindex" attribute beyond what the browser naturally assigns.
|
1506 |
+
*
|
1507 |
+
* Most internal usages pass `false` which results in no attribute being used.
|
1508 |
+
*
|
1509 |
+
* @since 2.6.0 bbPress (r6424)
|
1510 |
+
*
|
1511 |
+
* @param mixed $tab False to skip, any integer to use
|
1512 |
+
*/
|
1513 |
+
function bbp_tab_index_attribute( $tab = false ) {
|
1514 |
+
echo bbp_get_tab_index_attribute( $tab );
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
/**
|
1518 |
+
* Return a "tabindex" attribute for an element, if an index was passed.
|
1519 |
+
*
|
1520 |
+
* This helper function is in use, but it is generally considered impolite to
|
1521 |
+
* override the "tabindex" attribute beyond what the browser naturally assigns.
|
1522 |
+
*
|
1523 |
+
* Most internal usages pass `false` which results in no attribute being used.
|
1524 |
+
*
|
1525 |
+
* @since 2.6.0 bbPress (r6424)
|
1526 |
+
*
|
1527 |
+
* @param mixed $tab False to skip, any integer to use
|
1528 |
+
*
|
1529 |
+
* @return string
|
1530 |
+
*/
|
1531 |
+
function bbp_get_tab_index_attribute( $tab = false ) {
|
1532 |
+
|
1533 |
+
// Get attribute
|
1534 |
+
$attr = is_numeric( $tab )
|
1535 |
+
? ' tabindex="' . (int) $tab . '"'
|
1536 |
+
: '';
|
1537 |
+
|
1538 |
+
// Filter & return
|
1539 |
+
return apply_filters( 'bbp_get_tab_index_attribute', $attr, $tab );
|
1540 |
+
}
|
1541 |
+
|
1542 |
/**
|
1543 |
* Output a select box allowing to pick which forum/topic a new topic/reply
|
1544 |
* belongs in.
|
1623 |
'disabled' => ''
|
1624 |
), 'get_dropdown' );
|
1625 |
|
1626 |
+
// Fallback to our walker
|
1627 |
if ( empty( $r['walker'] ) ) {
|
1628 |
$r['walker'] = new BBP_Walker_Dropdown();
|
1629 |
$r['walker']->tree_type = $r['post_type'];
|
1630 |
}
|
1631 |
|
1632 |
// Force 0
|
1633 |
+
if ( is_numeric( $r['selected'] ) && ( $r['selected'] < 0 ) ) {
|
1634 |
$r['selected'] = 0;
|
1635 |
}
|
1636 |
|
1724 |
$retval .= '</select>';
|
1725 |
}
|
1726 |
|
1727 |
+
// Filter & return
|
1728 |
+
return apply_filters( 'bbp_get_dropdown', $retval, $r, $args );
|
1729 |
}
|
1730 |
|
1731 |
/**
|
1906 |
?>
|
1907 |
|
1908 |
<input type="hidden" name="action" id="bbp_post_action" value="bbp-split-topic" />
|
1909 |
+
<input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php echo intval( $_GET['reply_id'] ); ?>" />
|
1910 |
|
1911 |
<?php wp_nonce_field( 'bbp-split-topic_' . bbp_get_topic_id() );
|
1912 |
}
|
1922 |
?>
|
1923 |
|
1924 |
<input type="hidden" name="action" id="bbp_post_action" value="bbp-move-reply" />
|
1925 |
+
<input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php echo intval( $_GET['reply_id'] ); ?>" />
|
1926 |
|
1927 |
<?php wp_nonce_field( 'bbp-move-reply_' . bbp_get_reply_id() );
|
1928 |
}
|
2025 |
* Note that we do not use esc_textarea() here to prevent double
|
2026 |
* escaping the editable output, mucking up existing content.
|
2027 |
*/
|
2028 |
+
else : ?>
|
2029 |
|
2030 |
+
<textarea id="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" class="<?php echo esc_attr( $r['editor_class'] ); ?>" name="bbp_<?php echo esc_attr( $r['context'] ); ?>_content" cols="60" rows="<?php echo esc_attr( $r['textarea_rows'] ); ?>" <?php bbp_tab_index_attribute( $r['tab'] ); ?>><?php echo $post_content; ?></textarea>
|
|
|
|
|
|
|
2031 |
|
2032 |
<?php endif;
|
2033 |
|
2039 |
// Put the output into a usable variable
|
2040 |
$output = ob_get_clean();
|
2041 |
|
2042 |
+
// Filter & return
|
2043 |
return apply_filters( 'bbp_get_the_content', $output, $args, $post_content );
|
2044 |
}
|
2045 |
|
2065 |
// Add the tabfocus plugin
|
2066 |
$plugins[] = 'tabfocus';
|
2067 |
|
2068 |
+
// Filter & return
|
2069 |
return apply_filters( 'bbp_get_tiny_mce_plugins', $plugins );
|
2070 |
}
|
2071 |
|
2091 |
// Images
|
2092 |
array_push( $buttons, 'image' );
|
2093 |
|
2094 |
+
// Filter & return
|
2095 |
return apply_filters( 'bbp_get_teeny_mce_buttons', $buttons );
|
2096 |
}
|
2097 |
|
2119 |
// Put them back into a string in the $settings array
|
2120 |
$settings['buttons'] = implode( ',', $buttons );
|
2121 |
|
2122 |
+
// Filter & return
|
2123 |
return apply_filters( 'bbp_get_quicktags_settings', $settings );
|
2124 |
}
|
2125 |
|
2247 |
), home_url( '/' ) );
|
2248 |
}
|
2249 |
|
2250 |
+
// Filter & return
|
2251 |
return apply_filters( 'bbp_get_view_link', $url, $view );
|
2252 |
}
|
2253 |
|
2609 |
// Build the trail
|
2610 |
$trail = ! empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : '';
|
2611 |
|
2612 |
+
// Filter & return
|
2613 |
+
return apply_filters( 'bbp_get_breadcrumb', $trail, $crumbs, $r, $args );
|
2614 |
}
|
2615 |
|
2616 |
/** Topic Tags ***************************************************************/
|
2654 |
$allowed .= '> ';
|
2655 |
}
|
2656 |
|
2657 |
+
// Filter & return
|
2658 |
return apply_filters( 'bbp_get_allowed_tags', htmlentities( $allowed ) );
|
2659 |
}
|
2660 |
|
2748 |
* @return string The logout link
|
2749 |
*/
|
2750 |
function bbp_get_logout_link( $redirect_to = '' ) {
|
2751 |
+
|
2752 |
+
// Build the link
|
2753 |
+
$link = '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>';
|
2754 |
+
|
2755 |
+
// Filter & return
|
2756 |
+
return apply_filters( 'bbp_get_logout_link', $link, $redirect_to );
|
2757 |
}
|
2758 |
|
2759 |
/** Title *********************************************************************/
|
2785 |
* @uses apply_filters() Calls 'bbp_raw_title' with the title
|
2786 |
* @uses apply_filters() Calls 'bbp_profile_page_wp_title' with the title,
|
2787 |
* separator and separator location
|
2788 |
+
* @return string The title
|
2789 |
*/
|
2790 |
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) {
|
2791 |
|
2970 |
$new_title = $prefix . implode( " $sep ", $new_title_array );
|
2971 |
}
|
2972 |
|
2973 |
+
// Filter & return
|
2974 |
return apply_filters( 'bbp_title', $new_title, $sep, $seplocation );
|
2975 |
}
|
includes/common/widgets.php
CHANGED
@@ -36,10 +36,10 @@ class BBP_Login_Widget extends WP_Widget {
|
|
36 |
public function __construct() {
|
37 |
$widget_ops = apply_filters( 'bbp_login_widget_options', array(
|
38 |
'classname' => 'bbp_widget_login',
|
39 |
-
'description' =>
|
40 |
) );
|
41 |
|
42 |
-
parent::__construct( false,
|
43 |
}
|
44 |
|
45 |
/**
|
@@ -86,28 +86,28 @@ class BBP_Login_Widget extends WP_Widget {
|
|
86 |
|
87 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
88 |
<fieldset>
|
89 |
-
<legend><?php
|
90 |
|
91 |
<div class="bbp-username">
|
92 |
-
<label for="user_login"><?php
|
93 |
<input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" id="user_login" />
|
94 |
</div>
|
95 |
|
96 |
<div class="bbp-password">
|
97 |
-
<label for="user_pass"><?php
|
98 |
<input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" />
|
99 |
</div>
|
100 |
|
101 |
<div class="bbp-remember-me">
|
102 |
<input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ), true, true ); ?> id="rememberme" />
|
103 |
-
<label for="rememberme"><?php
|
104 |
</div>
|
105 |
|
106 |
<div class="bbp-submit-wrapper">
|
107 |
|
108 |
<?php do_action( 'login_form' ); ?>
|
109 |
|
110 |
-
<button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php
|
111 |
|
112 |
<?php bbp_user_login_fields(); ?>
|
113 |
|
@@ -119,13 +119,13 @@ class BBP_Login_Widget extends WP_Widget {
|
|
119 |
|
120 |
<?php if ( ! empty( $settings['register'] ) ) : ?>
|
121 |
|
122 |
-
<a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php
|
123 |
|
124 |
<?php endif; ?>
|
125 |
|
126 |
<?php if ( ! empty( $settings['lostpass'] ) ) : ?>
|
127 |
|
128 |
-
<a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php
|
129 |
|
130 |
<?php endif; ?>
|
131 |
|
@@ -182,17 +182,17 @@ class BBP_Login_Widget extends WP_Widget {
|
|
182 |
$settings = $this->parse_settings( $instance ); ?>
|
183 |
|
184 |
<p>
|
185 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
186 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
|
187 |
</p>
|
188 |
|
189 |
<p>
|
190 |
-
<label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php
|
191 |
<input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo esc_url( $settings['register'] ); ?>" /></label>
|
192 |
</p>
|
193 |
|
194 |
<p>
|
195 |
-
<label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php
|
196 |
<input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo esc_url( $settings['lostpass'] ); ?>" /></label>
|
197 |
</p>
|
198 |
|
@@ -240,10 +240,10 @@ class BBP_Views_Widget extends WP_Widget {
|
|
240 |
public function __construct() {
|
241 |
$widget_ops = apply_filters( 'bbp_views_widget_options', array(
|
242 |
'classname' => 'widget_display_views',
|
243 |
-
'description' =>
|
244 |
) );
|
245 |
|
246 |
-
parent::__construct( false,
|
247 |
}
|
248 |
|
249 |
/**
|
@@ -285,13 +285,16 @@ class BBP_Views_Widget extends WP_Widget {
|
|
285 |
// bbPress filter
|
286 |
$settings['title'] = apply_filters( 'bbp_view_widget_title', $settings['title'], $instance, $this->id_base );
|
287 |
|
|
|
|
|
|
|
288 |
echo $args['before_widget'];
|
289 |
|
290 |
if ( ! empty( $settings['title'] ) ) {
|
291 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
292 |
} ?>
|
293 |
|
294 |
-
<ul>
|
295 |
|
296 |
<?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
|
297 |
|
@@ -302,6 +305,9 @@ class BBP_Views_Widget extends WP_Widget {
|
|
302 |
</ul>
|
303 |
|
304 |
<?php echo $args['after_widget'];
|
|
|
|
|
|
|
305 |
}
|
306 |
|
307 |
/**
|
@@ -334,7 +340,7 @@ class BBP_Views_Widget extends WP_Widget {
|
|
334 |
$settings = $this->parse_settings( $instance ); ?>
|
335 |
|
336 |
<p>
|
337 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
338 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
339 |
</label>
|
340 |
</p>
|
@@ -381,10 +387,10 @@ class BBP_Search_Widget extends WP_Widget {
|
|
381 |
public function __construct() {
|
382 |
$widget_ops = apply_filters( 'bbp_search_widget_options', array(
|
383 |
'classname' => 'widget_display_search',
|
384 |
-
'description' =>
|
385 |
) );
|
386 |
|
387 |
-
parent::__construct( false,
|
388 |
}
|
389 |
|
390 |
/**
|
@@ -463,7 +469,7 @@ class BBP_Search_Widget extends WP_Widget {
|
|
463 |
$settings = $this->parse_settings( $instance ); ?>
|
464 |
|
465 |
<p>
|
466 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
467 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
468 |
</label>
|
469 |
</p>
|
@@ -481,7 +487,7 @@ class BBP_Search_Widget extends WP_Widget {
|
|
481 |
*/
|
482 |
public function parse_settings( $instance = array() ) {
|
483 |
return bbp_parse_args( $instance, array(
|
484 |
-
'title' =>
|
485 |
), 'search_widget_settings' );
|
486 |
}
|
487 |
}
|
@@ -510,10 +516,10 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
510 |
public function __construct() {
|
511 |
$widget_ops = apply_filters( 'bbp_forums_widget_options', array(
|
512 |
'classname' => 'widget_display_forums',
|
513 |
-
'description' =>
|
514 |
) );
|
515 |
|
516 |
-
parent::__construct( false,
|
517 |
}
|
518 |
|
519 |
/**
|
@@ -559,14 +565,23 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
559 |
// Note: private and hidden forums will be excluded via the
|
560 |
// bbp_pre_get_posts_normalize_forum_visibility action and function.
|
561 |
$widget_query = new WP_Query( array(
|
562 |
-
|
563 |
-
|
564 |
-
'
|
565 |
-
'
|
566 |
-
'
|
567 |
-
'
|
568 |
-
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
) );
|
571 |
|
572 |
// Bail if no posts
|
@@ -580,7 +595,7 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
580 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
581 |
} ?>
|
582 |
|
583 |
-
<ul>
|
584 |
|
585 |
<?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
|
586 |
|
@@ -636,19 +651,19 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
636 |
$settings = $this->parse_settings( $instance ); ?>
|
637 |
|
638 |
<p>
|
639 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
640 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
641 |
</label>
|
642 |
</p>
|
643 |
|
644 |
<p>
|
645 |
-
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php
|
646 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
|
647 |
</label>
|
648 |
|
649 |
<br />
|
650 |
|
651 |
-
<small><?php
|
652 |
</p>
|
653 |
|
654 |
<?php
|
@@ -664,7 +679,7 @@ class BBP_Forums_Widget extends WP_Widget {
|
|
664 |
*/
|
665 |
public function parse_settings( $instance = array() ) {
|
666 |
return bbp_parse_args( $instance, array(
|
667 |
-
'title' =>
|
668 |
'parent_forum' => 0
|
669 |
), 'forum_widget_settings' );
|
670 |
}
|
@@ -694,10 +709,10 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
694 |
public function __construct() {
|
695 |
$widget_ops = apply_filters( 'bbp_topics_widget_options', array(
|
696 |
'classname' => 'widget_display_topics',
|
697 |
-
'description' =>
|
698 |
) );
|
699 |
|
700 |
-
parent::__construct( false,
|
701 |
}
|
702 |
|
703 |
/**
|
@@ -742,32 +757,54 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
742 |
// Order by most recent replies
|
743 |
case 'freshness' :
|
744 |
$topics_query = array(
|
745 |
-
|
746 |
-
|
747 |
-
'
|
748 |
-
'post_status'
|
749 |
-
'
|
750 |
-
'
|
751 |
-
'
|
752 |
-
|
753 |
-
|
754 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
);
|
756 |
break;
|
757 |
|
758 |
// Order by total number of replies
|
759 |
case 'popular' :
|
760 |
$topics_query = array(
|
761 |
-
|
762 |
-
|
763 |
-
'
|
764 |
-
'post_status'
|
765 |
-
'
|
766 |
-
'
|
767 |
-
'
|
768 |
-
|
769 |
-
|
770 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
);
|
772 |
break;
|
773 |
|
@@ -775,13 +812,23 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
775 |
case 'newness' :
|
776 |
default :
|
777 |
$topics_query = array(
|
778 |
-
|
779 |
-
|
780 |
-
'
|
781 |
-
'post_status'
|
782 |
-
'
|
783 |
-
'
|
784 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
);
|
786 |
break;
|
787 |
}
|
@@ -795,13 +842,16 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
795 |
return;
|
796 |
}
|
797 |
|
|
|
|
|
|
|
798 |
echo $args['before_widget'];
|
799 |
|
800 |
if ( ! empty( $settings['title'] ) ) {
|
801 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
802 |
} ?>
|
803 |
|
804 |
-
<ul>
|
805 |
|
806 |
<?php while ( $widget_query->have_posts() ) :
|
807 |
|
@@ -819,7 +869,7 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
819 |
|
820 |
<?php if ( ! empty( $author_link ) ) : ?>
|
821 |
|
822 |
-
<?php printf(
|
823 |
|
824 |
<?php endif; ?>
|
825 |
|
@@ -839,6 +889,9 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
839 |
|
840 |
// Reset the $post global
|
841 |
wp_reset_postdata();
|
|
|
|
|
|
|
842 |
}
|
843 |
|
844 |
/**
|
@@ -880,28 +933,28 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
880 |
// Get widget settings
|
881 |
$settings = $this->parse_settings( $instance ); ?>
|
882 |
|
883 |
-
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
884 |
-
<p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php
|
885 |
|
886 |
<p>
|
887 |
-
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php
|
888 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
|
889 |
</label>
|
890 |
|
891 |
<br />
|
892 |
|
893 |
-
<small><?php
|
894 |
</p>
|
895 |
|
896 |
-
<p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php
|
897 |
-
<p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php
|
898 |
|
899 |
<p>
|
900 |
-
<label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php
|
901 |
<select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_id( 'order_by' ); ?>">
|
902 |
-
<option <?php selected( $settings['order_by'], 'newness'
|
903 |
-
<option <?php selected( $settings['order_by'], 'popular'
|
904 |
-
<option <?php selected( $settings['order_by'], 'freshness' ); ?> value="freshness"><?php
|
905 |
</select>
|
906 |
</p>
|
907 |
|
@@ -918,7 +971,7 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
918 |
*/
|
919 |
public function parse_settings( $instance = array() ) {
|
920 |
return bbp_parse_args( $instance, array(
|
921 |
-
'title' =>
|
922 |
'max_shown' => 5,
|
923 |
'show_date' => false,
|
924 |
'show_user' => false,
|
@@ -929,7 +982,7 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
929 |
}
|
930 |
|
931 |
/**
|
932 |
-
* bbPress
|
933 |
*
|
934 |
* Adds a widget which displays the forum statistics
|
935 |
*
|
@@ -940,9 +993,9 @@ class BBP_Topics_Widget extends WP_Widget {
|
|
940 |
class BBP_Stats_Widget extends WP_Widget {
|
941 |
|
942 |
/**
|
943 |
-
* bbPress
|
944 |
*
|
945 |
-
* Registers the
|
946 |
*
|
947 |
* @since 2.3.0 bbPress (r4509)
|
948 |
*
|
@@ -952,10 +1005,10 @@ class BBP_Stats_Widget extends WP_Widget {
|
|
952 |
public function __construct() {
|
953 |
$widget_ops = apply_filters( 'bbp_stats_widget_options', array(
|
954 |
'classname' => 'widget_display_stats',
|
955 |
-
'description' =>
|
956 |
) );
|
957 |
|
958 |
-
parent::__construct( false,
|
959 |
}
|
960 |
|
961 |
/**
|
@@ -1003,7 +1056,7 @@ class BBP_Stats_Widget extends WP_Widget {
|
|
1003 |
}
|
1004 |
|
1005 |
/**
|
1006 |
-
* Update the
|
1007 |
*
|
1008 |
* @since 2.3.0 bbPress (r4509)
|
1009 |
*
|
@@ -1020,7 +1073,7 @@ class BBP_Stats_Widget extends WP_Widget {
|
|
1020 |
}
|
1021 |
|
1022 |
/**
|
1023 |
-
* Output the
|
1024 |
*
|
1025 |
* @since 2.3.0 bbPress (r4509)
|
1026 |
*
|
@@ -1034,7 +1087,7 @@ class BBP_Stats_Widget extends WP_Widget {
|
|
1034 |
$settings = $this->parse_settings( $instance ); ?>
|
1035 |
|
1036 |
<p>
|
1037 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
1038 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>"/>
|
1039 |
</label>
|
1040 |
</p>
|
@@ -1052,9 +1105,8 @@ class BBP_Stats_Widget extends WP_Widget {
|
|
1052 |
*/
|
1053 |
public function parse_settings( $instance = array() ) {
|
1054 |
return bbp_parse_args( $instance, array(
|
1055 |
-
'title' =>
|
1056 |
-
),
|
1057 |
-
'stats_widget_settings' );
|
1058 |
}
|
1059 |
}
|
1060 |
|
@@ -1082,10 +1134,10 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1082 |
public function __construct() {
|
1083 |
$widget_ops = apply_filters( 'bbp_replies_widget_options', array(
|
1084 |
'classname' => 'widget_display_replies',
|
1085 |
-
'description' =>
|
1086 |
) );
|
1087 |
|
1088 |
-
parent::__construct( false,
|
1089 |
}
|
1090 |
|
1091 |
/**
|
@@ -1129,11 +1181,18 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1129 |
// Note: private and hidden forums will be excluded via the
|
1130 |
// bbp_pre_get_posts_normalize_forum_visibility action and function.
|
1131 |
$widget_query = new WP_Query( array(
|
1132 |
-
|
1133 |
-
|
1134 |
-
'
|
1135 |
-
'
|
1136 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
) );
|
1138 |
|
1139 |
// Bail if no replies
|
@@ -1141,13 +1200,16 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1141 |
return;
|
1142 |
}
|
1143 |
|
|
|
|
|
|
|
1144 |
echo $args['before_widget'];
|
1145 |
|
1146 |
if ( ! empty( $settings['title'] ) ) {
|
1147 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
1148 |
} ?>
|
1149 |
|
1150 |
-
<ul>
|
1151 |
|
1152 |
<?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
|
1153 |
|
@@ -1170,25 +1232,25 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1170 |
if ( ! empty( $settings['show_date'] ) && ! empty( $author_link ) ) :
|
1171 |
|
1172 |
// translators: 1: reply author, 2: reply link, 3: reply timestamp
|
1173 |
-
printf(
|
1174 |
|
1175 |
// Reply link and timestamp
|
1176 |
elseif ( ! empty( $settings['show_date'] ) ) :
|
1177 |
|
1178 |
// translators: 1: reply link, 2: reply timestamp
|
1179 |
-
printf(
|
1180 |
|
1181 |
// Reply author and title
|
1182 |
elseif ( ! empty( $author_link ) ) :
|
1183 |
|
1184 |
// translators: 1: reply author, 2: reply link
|
1185 |
-
printf(
|
1186 |
|
1187 |
// Only the reply title
|
1188 |
else :
|
1189 |
|
1190 |
// translators: 1: reply link
|
1191 |
-
printf(
|
1192 |
|
1193 |
endif;
|
1194 |
|
@@ -1204,6 +1266,9 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1204 |
|
1205 |
// Reset the $post global
|
1206 |
wp_reset_postdata();
|
|
|
|
|
|
|
1207 |
}
|
1208 |
|
1209 |
/**
|
@@ -1238,10 +1303,10 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1238 |
// Get widget settings
|
1239 |
$settings = $this->parse_settings( $instance ); ?>
|
1240 |
|
1241 |
-
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
1242 |
-
<p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php
|
1243 |
-
<p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php
|
1244 |
-
<p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php
|
1245 |
|
1246 |
<?php
|
1247 |
}
|
@@ -1256,11 +1321,10 @@ class BBP_Replies_Widget extends WP_Widget {
|
|
1256 |
*/
|
1257 |
public function parse_settings( $instance = array() ) {
|
1258 |
return bbp_parse_args( $instance, array(
|
1259 |
-
'title' =>
|
1260 |
'max_shown' => 5,
|
1261 |
'show_date' => false,
|
1262 |
'show_user' => false
|
1263 |
-
),
|
1264 |
-
'replies_widget_settings' );
|
1265 |
}
|
1266 |
}
|
36 |
public function __construct() {
|
37 |
$widget_ops = apply_filters( 'bbp_login_widget_options', array(
|
38 |
'classname' => 'bbp_widget_login',
|
39 |
+
'description' => esc_html__( 'A simple login form with optional links to sign-up and lost password pages.', 'bbpress' )
|
40 |
) );
|
41 |
|
42 |
+
parent::__construct( false, esc_html__( '(bbPress) Login Widget', 'bbpress' ), $widget_ops );
|
43 |
}
|
44 |
|
45 |
/**
|
86 |
|
87 |
<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
|
88 |
<fieldset>
|
89 |
+
<legend><?php esc_html_e( 'Log In', 'bbpress' ); ?></legend>
|
90 |
|
91 |
<div class="bbp-username">
|
92 |
+
<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label>
|
93 |
<input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" id="user_login" />
|
94 |
</div>
|
95 |
|
96 |
<div class="bbp-password">
|
97 |
+
<label for="user_pass"><?php esc_html_e( 'Password', 'bbpress' ); ?>: </label>
|
98 |
<input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" />
|
99 |
</div>
|
100 |
|
101 |
<div class="bbp-remember-me">
|
102 |
<input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ), true, true ); ?> id="rememberme" />
|
103 |
+
<label for="rememberme"><?php esc_html_e( 'Remember Me', 'bbpress' ); ?></label>
|
104 |
</div>
|
105 |
|
106 |
<div class="bbp-submit-wrapper">
|
107 |
|
108 |
<?php do_action( 'login_form' ); ?>
|
109 |
|
110 |
+
<button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php esc_html_e( 'Log In', 'bbpress' ); ?></button>
|
111 |
|
112 |
<?php bbp_user_login_fields(); ?>
|
113 |
|
119 |
|
120 |
<?php if ( ! empty( $settings['register'] ) ) : ?>
|
121 |
|
122 |
+
<a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php esc_html_e( 'Register', 'bbpress' ); ?></a>
|
123 |
|
124 |
<?php endif; ?>
|
125 |
|
126 |
<?php if ( ! empty( $settings['lostpass'] ) ) : ?>
|
127 |
|
128 |
+
<a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php esc_html_e( 'Lost Password', 'bbpress' ); ?></a>
|
129 |
|
130 |
<?php endif; ?>
|
131 |
|
182 |
$settings = $this->parse_settings( $instance ); ?>
|
183 |
|
184 |
<p>
|
185 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
|
186 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
|
187 |
</p>
|
188 |
|
189 |
<p>
|
190 |
+
<label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php esc_html_e( 'Register URI:', 'bbpress' ); ?>
|
191 |
<input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo esc_url( $settings['register'] ); ?>" /></label>
|
192 |
</p>
|
193 |
|
194 |
<p>
|
195 |
+
<label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php esc_html_e( 'Lost Password URI:', 'bbpress' ); ?>
|
196 |
<input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo esc_url( $settings['lostpass'] ); ?>" /></label>
|
197 |
</p>
|
198 |
|
240 |
public function __construct() {
|
241 |
$widget_ops = apply_filters( 'bbp_views_widget_options', array(
|
242 |
'classname' => 'widget_display_views',
|
243 |
+
'description' => esc_html__( 'A list of registered optional topic views.', 'bbpress' )
|
244 |
) );
|
245 |
|
246 |
+
parent::__construct( false, esc_html__( '(bbPress) Topic Views List', 'bbpress' ), $widget_ops );
|
247 |
}
|
248 |
|
249 |
/**
|
285 |
// bbPress filter
|
286 |
$settings['title'] = apply_filters( 'bbp_view_widget_title', $settings['title'], $instance, $this->id_base );
|
287 |
|
288 |
+
// Start an output buffer
|
289 |
+
ob_start();
|
290 |
+
|
291 |
echo $args['before_widget'];
|
292 |
|
293 |
if ( ! empty( $settings['title'] ) ) {
|
294 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
295 |
} ?>
|
296 |
|
297 |
+
<ul class="bbp-views-widget">
|
298 |
|
299 |
<?php foreach ( array_keys( bbp_get_views() ) as $view ) : ?>
|
300 |
|
305 |
</ul>
|
306 |
|
307 |
<?php echo $args['after_widget'];
|
308 |
+
|
309 |
+
// Output the current buffer
|
310 |
+
echo ob_get_clean();
|
311 |
}
|
312 |
|
313 |
/**
|
340 |
$settings = $this->parse_settings( $instance ); ?>
|
341 |
|
342 |
<p>
|
343 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
|
344 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
345 |
</label>
|
346 |
</p>
|
387 |
public function __construct() {
|
388 |
$widget_ops = apply_filters( 'bbp_search_widget_options', array(
|
389 |
'classname' => 'widget_display_search',
|
390 |
+
'description' => esc_html__( 'The bbPress forum search form.', 'bbpress' )
|
391 |
) );
|
392 |
|
393 |
+
parent::__construct( false, esc_html__( '(bbPress) Forum Search Form', 'bbpress' ), $widget_ops );
|
394 |
}
|
395 |
|
396 |
/**
|
469 |
$settings = $this->parse_settings( $instance ); ?>
|
470 |
|
471 |
<p>
|
472 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
|
473 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
474 |
</label>
|
475 |
</p>
|
487 |
*/
|
488 |
public function parse_settings( $instance = array() ) {
|
489 |
return bbp_parse_args( $instance, array(
|
490 |
+
'title' => esc_html__( 'Search Forums', 'bbpress' )
|
491 |
), 'search_widget_settings' );
|
492 |
}
|
493 |
}
|
516 |
public function __construct() {
|
517 |
$widget_ops = apply_filters( 'bbp_forums_widget_options', array(
|
518 |
'classname' => 'widget_display_forums',
|
519 |
+
'description' => esc_html__( 'A list of forums with an option to set the parent.', 'bbpress' )
|
520 |
) );
|
521 |
|
522 |
+
parent::__construct( false, esc_html__( '(bbPress) Forums List', 'bbpress' ), $widget_ops );
|
523 |
}
|
524 |
|
525 |
/**
|
565 |
// Note: private and hidden forums will be excluded via the
|
566 |
// bbp_pre_get_posts_normalize_forum_visibility action and function.
|
567 |
$widget_query = new WP_Query( array(
|
568 |
+
|
569 |
+
// What and how
|
570 |
+
'post_type' => bbp_get_forum_post_type(),
|
571 |
+
'post_status' => bbp_get_public_status_id(),
|
572 |
+
'post_parent' => $settings['parent_forum'],
|
573 |
+
'posts_per_page' => (int) get_option( '_bbp_forums_per_page', 50 ),
|
574 |
+
|
575 |
+
// Order
|
576 |
+
'orderby' => 'menu_order title',
|
577 |
+
'order' => 'DESC',
|
578 |
+
|
579 |
+
// Performance
|
580 |
+
'ignore_sticky_posts' => true,
|
581 |
+
'no_found_rows' => true,
|
582 |
+
'nopaging' => true,
|
583 |
+
'update_post_term_cache' => false,
|
584 |
+
'update_post_meta_cache' => false
|
585 |
) );
|
586 |
|
587 |
// Bail if no posts
|
595 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
596 |
} ?>
|
597 |
|
598 |
+
<ul class="bbp-forums-widget">
|
599 |
|
600 |
<?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
|
601 |
|
651 |
$settings = $this->parse_settings( $instance ); ?>
|
652 |
|
653 |
<p>
|
654 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
|
655 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" />
|
656 |
</label>
|
657 |
</p>
|
658 |
|
659 |
<p>
|
660 |
+
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php esc_html_e( 'Parent Forum ID:', 'bbpress' ); ?>
|
661 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
|
662 |
</label>
|
663 |
|
664 |
<br />
|
665 |
|
666 |
+
<small><?php esc_html_e( '"0" to show only root - "any" to show all', 'bbpress' ); ?></small>
|
667 |
</p>
|
668 |
|
669 |
<?php
|
679 |
*/
|
680 |
public function parse_settings( $instance = array() ) {
|
681 |
return bbp_parse_args( $instance, array(
|
682 |
+
'title' => esc_html__( 'Forums', 'bbpress' ),
|
683 |
'parent_forum' => 0
|
684 |
), 'forum_widget_settings' );
|
685 |
}
|
709 |
public function __construct() {
|
710 |
$widget_ops = apply_filters( 'bbp_topics_widget_options', array(
|
711 |
'classname' => 'widget_display_topics',
|
712 |
+
'description' => esc_html__( 'A list of recent topics, sorted by: newness, popularity, or recent replies.', 'bbpress' )
|
713 |
) );
|
714 |
|
715 |
+
parent::__construct( false, esc_html__( '(bbPress) Recent Topics', 'bbpress' ), $widget_ops );
|
716 |
}
|
717 |
|
718 |
/**
|
757 |
// Order by most recent replies
|
758 |
case 'freshness' :
|
759 |
$topics_query = array(
|
760 |
+
|
761 |
+
// What and how
|
762 |
+
'post_type' => bbp_get_topic_post_type(),
|
763 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
764 |
+
'post_parent' => $settings['parent_forum'],
|
765 |
+
'posts_per_page' => (int) $settings['max_shown'],
|
766 |
+
'meta_query' => array( array(
|
767 |
+
'key' => '_bbp_last_active_time',
|
768 |
+
'type' => 'DATETIME'
|
769 |
+
) ),
|
770 |
+
|
771 |
+
// Ordering
|
772 |
+
'orderby' => 'meta_value',
|
773 |
+
'order' => 'DESC',
|
774 |
+
|
775 |
+
// Performance
|
776 |
+
'ignore_sticky_posts' => true,
|
777 |
+
'no_found_rows' => true,
|
778 |
+
'nopaging' => true,
|
779 |
+
'update_post_term_cache' => false,
|
780 |
+
'update_post_meta_cache' => false
|
781 |
);
|
782 |
break;
|
783 |
|
784 |
// Order by total number of replies
|
785 |
case 'popular' :
|
786 |
$topics_query = array(
|
787 |
+
|
788 |
+
// What and how
|
789 |
+
'post_type' => bbp_get_topic_post_type(),
|
790 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
791 |
+
'post_parent' => $settings['parent_forum'],
|
792 |
+
'posts_per_page' => (int) $settings['max_shown'],
|
793 |
+
'meta_query' => array( array(
|
794 |
+
'key' => '_bbp_reply_count',
|
795 |
+
'type' => 'NUMERIC'
|
796 |
+
) ),
|
797 |
+
|
798 |
+
// Ordering
|
799 |
+
'orderby' => 'meta_value_num',
|
800 |
+
'order' => 'DESC',
|
801 |
+
|
802 |
+
// Performance
|
803 |
+
'ignore_sticky_posts' => true,
|
804 |
+
'no_found_rows' => true,
|
805 |
+
'nopaging' => true,
|
806 |
+
'update_post_term_cache' => false,
|
807 |
+
'update_post_meta_cache' => false
|
808 |
);
|
809 |
break;
|
810 |
|
812 |
case 'newness' :
|
813 |
default :
|
814 |
$topics_query = array(
|
815 |
+
|
816 |
+
// What and how
|
817 |
+
'post_type' => bbp_get_topic_post_type(),
|
818 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
819 |
+
'post_parent' => $settings['parent_forum'],
|
820 |
+
'posts_per_page' => (int) $settings['max_shown'],
|
821 |
+
|
822 |
+
// Ordering
|
823 |
+
'orderby' => 'date',
|
824 |
+
'order' => 'DESC',
|
825 |
+
|
826 |
+
// Performance
|
827 |
+
'ignore_sticky_posts' => true,
|
828 |
+
'no_found_rows' => true,
|
829 |
+
'nopaging' => true,
|
830 |
+
'update_post_term_cache' => false,
|
831 |
+
'update_post_meta_cache' => false
|
832 |
);
|
833 |
break;
|
834 |
}
|
842 |
return;
|
843 |
}
|
844 |
|
845 |
+
// Start an output buffer
|
846 |
+
ob_start();
|
847 |
+
|
848 |
echo $args['before_widget'];
|
849 |
|
850 |
if ( ! empty( $settings['title'] ) ) {
|
851 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
852 |
} ?>
|
853 |
|
854 |
+
<ul class="bbp-topics-widget <?php echo esc_attr( $settings['order_by'] ); ?>">
|
855 |
|
856 |
<?php while ( $widget_query->have_posts() ) :
|
857 |
|
869 |
|
870 |
<?php if ( ! empty( $author_link ) ) : ?>
|
871 |
|
872 |
+
<?php printf( esc_html_x( 'by %1$s', 'widgets', 'bbpress' ), '<span class="topic-author">' . $author_link . '</span>' ); ?>
|
873 |
|
874 |
<?php endif; ?>
|
875 |
|
889 |
|
890 |
// Reset the $post global
|
891 |
wp_reset_postdata();
|
892 |
+
|
893 |
+
// Output the current buffer
|
894 |
+
echo ob_get_clean();
|
895 |
}
|
896 |
|
897 |
/**
|
933 |
// Get widget settings
|
934 |
$settings = $this->parse_settings( $instance ); ?>
|
935 |
|
936 |
+
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label></p>
|
937 |
+
<p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php esc_html_e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo esc_attr( $settings['max_shown'] ); ?>" /></label></p>
|
938 |
|
939 |
<p>
|
940 |
+
<label for="<?php echo $this->get_field_id( 'parent_forum' ); ?>"><?php esc_html_e( 'Parent Forum ID:', 'bbpress' ); ?>
|
941 |
<input class="widefat" id="<?php echo $this->get_field_id( 'parent_forum' ); ?>" name="<?php echo $this->get_field_name( 'parent_forum' ); ?>" type="text" value="<?php echo esc_attr( $settings['parent_forum'] ); ?>" />
|
942 |
</label>
|
943 |
|
944 |
<br />
|
945 |
|
946 |
+
<small><?php esc_html_e( '"0" to show only root - "any" to show all', 'bbpress' ); ?></small>
|
947 |
</p>
|
948 |
|
949 |
+
<p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php esc_html_e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( true, $settings['show_date'] ); ?> value="1" /></label></p>
|
950 |
+
<p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php esc_html_e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( true, $settings['show_user'] ); ?> value="1" /></label></p>
|
951 |
|
952 |
<p>
|
953 |
+
<label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php esc_html_e( 'Order By:', 'bbpress' ); ?></label>
|
954 |
<select name="<?php echo $this->get_field_name( 'order_by' ); ?>" id="<?php echo $this->get_field_id( 'order_by' ); ?>">
|
955 |
+
<option <?php selected( $settings['order_by'], 'newness' ); ?> value="newness"><?php esc_html_e( 'Newest Topics', 'bbpress' ); ?></option>
|
956 |
+
<option <?php selected( $settings['order_by'], 'popular' ); ?> value="popular"><?php esc_html_e( 'Popular Topics', 'bbpress' ); ?></option>
|
957 |
+
<option <?php selected( $settings['order_by'], 'freshness' ); ?> value="freshness"><?php esc_html_e( 'Topics With Recent Replies', 'bbpress' ); ?></option>
|
958 |
</select>
|
959 |
</p>
|
960 |
|
971 |
*/
|
972 |
public function parse_settings( $instance = array() ) {
|
973 |
return bbp_parse_args( $instance, array(
|
974 |
+
'title' => esc_html__( 'Recent Topics', 'bbpress' ),
|
975 |
'max_shown' => 5,
|
976 |
'show_date' => false,
|
977 |
'show_user' => false,
|
982 |
}
|
983 |
|
984 |
/**
|
985 |
+
* bbPress Statistics Widget
|
986 |
*
|
987 |
* Adds a widget which displays the forum statistics
|
988 |
*
|
993 |
class BBP_Stats_Widget extends WP_Widget {
|
994 |
|
995 |
/**
|
996 |
+
* bbPress Statistics Widget
|
997 |
*
|
998 |
+
* Registers the statistics widget
|
999 |
*
|
1000 |
* @since 2.3.0 bbPress (r4509)
|
1001 |
*
|
1005 |
public function __construct() {
|
1006 |
$widget_ops = apply_filters( 'bbp_stats_widget_options', array(
|
1007 |
'classname' => 'widget_display_stats',
|
1008 |
+
'description' => esc_html__( 'Some statistics from your forum.', 'bbpress' )
|
1009 |
) );
|
1010 |
|
1011 |
+
parent::__construct( false, esc_html__( '(bbPress) Statistics', 'bbpress' ), $widget_ops );
|
1012 |
}
|
1013 |
|
1014 |
/**
|
1056 |
}
|
1057 |
|
1058 |
/**
|
1059 |
+
* Update the statistics widget options
|
1060 |
*
|
1061 |
* @since 2.3.0 bbPress (r4509)
|
1062 |
*
|
1073 |
}
|
1074 |
|
1075 |
/**
|
1076 |
+
* Output the statistics widget options form
|
1077 |
*
|
1078 |
* @since 2.3.0 bbPress (r4509)
|
1079 |
*
|
1087 |
$settings = $this->parse_settings( $instance ); ?>
|
1088 |
|
1089 |
<p>
|
1090 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
|
1091 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>"/>
|
1092 |
</label>
|
1093 |
</p>
|
1105 |
*/
|
1106 |
public function parse_settings( $instance = array() ) {
|
1107 |
return bbp_parse_args( $instance, array(
|
1108 |
+
'title' => esc_html__( 'Forum Statistics', 'bbpress' )
|
1109 |
+
), 'stats_widget_settings' );
|
|
|
1110 |
}
|
1111 |
}
|
1112 |
|
1134 |
public function __construct() {
|
1135 |
$widget_ops = apply_filters( 'bbp_replies_widget_options', array(
|
1136 |
'classname' => 'widget_display_replies',
|
1137 |
+
'description' => esc_html__( 'A list of the most recent replies.', 'bbpress' )
|
1138 |
) );
|
1139 |
|
1140 |
+
parent::__construct( false, esc_html__( '(bbPress) Recent Replies', 'bbpress' ), $widget_ops );
|
1141 |
}
|
1142 |
|
1143 |
/**
|
1181 |
// Note: private and hidden forums will be excluded via the
|
1182 |
// bbp_pre_get_posts_normalize_forum_visibility action and function.
|
1183 |
$widget_query = new WP_Query( array(
|
1184 |
+
|
1185 |
+
// What and when
|
1186 |
+
'post_type' => bbp_get_reply_post_type(),
|
1187 |
+
'post_status' => bbp_get_public_topic_statuses(),
|
1188 |
+
'posts_per_page' => (int) $settings['max_shown'],
|
1189 |
+
|
1190 |
+
// Performance
|
1191 |
+
'ignore_sticky_posts' => true,
|
1192 |
+
'no_found_rows' => true,
|
1193 |
+
'nopaging' => true,
|
1194 |
+
'update_post_term_cache' => false,
|
1195 |
+
'update_post_meta_cache' => false
|
1196 |
) );
|
1197 |
|
1198 |
// Bail if no replies
|
1200 |
return;
|
1201 |
}
|
1202 |
|
1203 |
+
// Start an output buffer
|
1204 |
+
ob_start();
|
1205 |
+
|
1206 |
echo $args['before_widget'];
|
1207 |
|
1208 |
if ( ! empty( $settings['title'] ) ) {
|
1209 |
echo $args['before_title'] . $settings['title'] . $args['after_title'];
|
1210 |
} ?>
|
1211 |
|
1212 |
+
<ul class="bbp-replies-widget">
|
1213 |
|
1214 |
<?php while ( $widget_query->have_posts() ) : $widget_query->the_post(); ?>
|
1215 |
|
1232 |
if ( ! empty( $settings['show_date'] ) && ! empty( $author_link ) ) :
|
1233 |
|
1234 |
// translators: 1: reply author, 2: reply link, 3: reply timestamp
|
1235 |
+
printf( esc_html_x( '%1$s on %2$s %3$s', 'widgets', 'bbpress' ), $author_link, $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
|
1236 |
|
1237 |
// Reply link and timestamp
|
1238 |
elseif ( ! empty( $settings['show_date'] ) ) :
|
1239 |
|
1240 |
// translators: 1: reply link, 2: reply timestamp
|
1241 |
+
printf( esc_html_x( '%1$s %2$s', 'widgets', 'bbpress' ), $reply_link, '<div>' . bbp_get_time_since( get_the_time( 'U' ) ) . '</div>' );
|
1242 |
|
1243 |
// Reply author and title
|
1244 |
elseif ( ! empty( $author_link ) ) :
|
1245 |
|
1246 |
// translators: 1: reply author, 2: reply link
|
1247 |
+
printf( esc_html_x( '%1$s on %2$s', 'widgets', 'bbpress' ), $author_link, $reply_link );
|
1248 |
|
1249 |
// Only the reply title
|
1250 |
else :
|
1251 |
|
1252 |
// translators: 1: reply link
|
1253 |
+
printf( esc_html_x( '%1$s', 'widgets', 'bbpress' ), $reply_link );
|
1254 |
|
1255 |
endif;
|
1256 |
|
1266 |
|
1267 |
// Reset the $post global
|
1268 |
wp_reset_postdata();
|
1269 |
+
|
1270 |
+
// Output the current buffer
|
1271 |
+
echo ob_get_clean();
|
1272 |
}
|
1273 |
|
1274 |
/**
|
1303 |
// Get widget settings
|
1304 |
$settings = $this->parse_settings( $instance ); ?>
|
1305 |
|
1306 |
+
<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label></p>
|
1307 |
+
<p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php esc_html_e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo esc_attr( $settings['max_shown'] ); ?>" /></label></p>
|
1308 |
+
<p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php esc_html_e( 'Show post date:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( true, $settings['show_date'] ); ?> value="1" /></label></p>
|
1309 |
+
<p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php esc_html_e( 'Show reply author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( true, $settings['show_user'] ); ?> value="1" /></label></p>
|
1310 |
|
1311 |
<?php
|
1312 |
}
|
1321 |
*/
|
1322 |
public function parse_settings( $instance = array() ) {
|
1323 |
return bbp_parse_args( $instance, array(
|
1324 |
+
'title' => esc_html__( 'Recent Replies', 'bbpress' ),
|
1325 |
'max_shown' => 5,
|
1326 |
'show_date' => false,
|
1327 |
'show_user' => false
|
1328 |
+
), 'replies_widget_settings' );
|
|
|
1329 |
}
|
1330 |
}
|
includes/core/abstraction.php
CHANGED
@@ -102,6 +102,8 @@ function bbp_rewrite() {
|
|
102 |
* @return string
|
103 |
*/
|
104 |
function bbp_get_root_url() {
|
|
|
|
|
105 |
return apply_filters( 'bbp_get_root_url', bbp_rewrite()->root );
|
106 |
}
|
107 |
|
@@ -113,6 +115,8 @@ function bbp_get_root_url() {
|
|
113 |
* @return string
|
114 |
*/
|
115 |
function bbp_get_paged_slug() {
|
|
|
|
|
116 |
return apply_filters( 'bbp_get_paged_slug', bbp_rewrite()->pagination_base );
|
117 |
}
|
118 |
|
102 |
* @return string
|
103 |
*/
|
104 |
function bbp_get_root_url() {
|
105 |
+
|
106 |
+
// Filter & return
|
107 |
return apply_filters( 'bbp_get_root_url', bbp_rewrite()->root );
|
108 |
}
|
109 |
|
115 |
* @return string
|
116 |
*/
|
117 |
function bbp_get_paged_slug() {
|
118 |
+
|
119 |
+
// Filter & return
|
120 |
return apply_filters( 'bbp_get_paged_slug', bbp_rewrite()->pagination_base );
|
121 |
}
|
122 |
|
includes/core/actions.php
CHANGED
@@ -112,6 +112,7 @@ add_action( 'bbp_register', 'bbp_register_post_statuses', 4 );
|
|
112 |
add_action( 'bbp_register', 'bbp_register_taxonomies', 6 );
|
113 |
add_action( 'bbp_register', 'bbp_register_views', 8 );
|
114 |
add_action( 'bbp_register', 'bbp_register_shortcodes', 10 );
|
|
|
115 |
|
116 |
// Autoembeds
|
117 |
add_action( 'bbp_init', 'bbp_reply_content_autoembed', 8 );
|
@@ -308,6 +309,18 @@ add_action( 'bbp_spam_reply', 'bbp_decrease_user_reply_count' );
|
|
308 |
add_action( 'bbp_insert_topic', 'bbp_insert_topic_update_counts', 10, 2 );
|
309 |
add_action( 'bbp_insert_reply', 'bbp_insert_reply_update_counts', 10, 3 );
|
310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
// Topic status transition helpers for replies
|
312 |
add_action( 'bbp_trash_topic', 'bbp_trash_topic_replies' );
|
313 |
add_action( 'bbp_untrash_topic', 'bbp_untrash_topic_replies' );
|
112 |
add_action( 'bbp_register', 'bbp_register_taxonomies', 6 );
|
113 |
add_action( 'bbp_register', 'bbp_register_views', 8 );
|
114 |
add_action( 'bbp_register', 'bbp_register_shortcodes', 10 );
|
115 |
+
add_action( 'bbp_register', 'bbp_register_meta', 12 );
|
116 |
|
117 |
// Autoembeds
|
118 |
add_action( 'bbp_init', 'bbp_reply_content_autoembed', 8 );
|
309 |
add_action( 'bbp_insert_topic', 'bbp_insert_topic_update_counts', 10, 2 );
|
310 |
add_action( 'bbp_insert_reply', 'bbp_insert_reply_update_counts', 10, 3 );
|
311 |
|
312 |
+
// Update topic voice counts.
|
313 |
+
add_action( 'bbp_new_reply', 'bbp_update_topic_voice_count' );
|
314 |
+
add_action( 'bbp_trashed_reply', 'bbp_update_topic_voice_count' );
|
315 |
+
add_action( 'bbp_untrashed_reply', 'bbp_update_topic_voice_count' );
|
316 |
+
add_action( 'bbp_spammed_reply', 'bbp_update_topic_voice_count' );
|
317 |
+
add_action( 'bbp_unspammed_reply', 'bbp_update_topic_voice_count' );
|
318 |
+
add_action( 'bbp_approved_reply', 'bbp_update_topic_voice_count' );
|
319 |
+
add_action( 'bbp_unapproved_reply', 'bbp_update_topic_voice_count' );
|
320 |
+
|
321 |
+
// Insert reply voice counts.
|
322 |
+
add_action( 'bbp_insert_reply', 'bbp_update_topic_voice_count' );
|
323 |
+
|
324 |
// Topic status transition helpers for replies
|
325 |
add_action( 'bbp_trash_topic', 'bbp_trash_topic_replies' );
|
326 |
add_action( 'bbp_untrash_topic', 'bbp_untrash_topic_replies' );
|
includes/core/cache.php
CHANGED
@@ -180,11 +180,12 @@ function bbp_clean_post_cache( $post_id = null, $post = null ) {
|
|
180 |
|
181 |
// Loop through query types and clean caches
|
182 |
foreach ( $post_types as $post_type ) {
|
183 |
-
|
|
|
184 |
}
|
185 |
|
186 |
/**
|
187 |
-
* Fires immediately after the given post
|
188 |
*
|
189 |
* @since 2.1.0
|
190 |
*
|
180 |
|
181 |
// Loop through query types and clean caches
|
182 |
foreach ( $post_types as $post_type ) {
|
183 |
+
$key = 'bbp_parent_all_' . $post->ID . '_type_' . $post_type . '_child_ids';
|
184 |
+
wp_cache_delete( $key, 'bbpress_posts' );
|
185 |
}
|
186 |
|
187 |
/**
|
188 |
+
* Fires immediately after the given post cache is cleaned.
|
189 |
*
|
190 |
* @since 2.1.0
|
191 |
*
|
includes/core/capabilities.php
CHANGED
@@ -207,6 +207,7 @@ function bbp_get_caps_for_role( $role = '' ) {
|
|
207 |
break;
|
208 |
}
|
209 |
|
|
|
210 |
return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
|
211 |
}
|
212 |
|
@@ -245,7 +246,7 @@ function bbp_remove_caps() {
|
|
245 |
}
|
246 |
|
247 |
/**
|
248 |
-
* Get the available roles minus
|
249 |
*
|
250 |
* @since 2.4.0 bbPress (r5064)
|
251 |
*
|
@@ -264,6 +265,7 @@ function bbp_get_blog_roles() {
|
|
264 |
$the_roles = isset( $wp_roles->roles ) ? $wp_roles->roles : false;
|
265 |
$all_roles = apply_filters( 'editable_roles', $the_roles );
|
266 |
|
|
|
267 |
return apply_filters( 'bbp_get_blog_roles', $all_roles, $wp_roles );
|
268 |
}
|
269 |
|
@@ -279,7 +281,7 @@ function bbp_get_blog_roles() {
|
|
279 |
*
|
280 |
* @since 2.2.0 bbPress (r4290)
|
281 |
*
|
282 |
-
* @uses bbp_get_dynamic_roles() To get and add
|
283 |
*
|
284 |
* @param WP_Roles $wp_roles The array of WP_Role objects that was initialized
|
285 |
*
|
@@ -394,6 +396,7 @@ function bbp_get_dynamic_role_name( $role_id = '' ) {
|
|
394 |
? bbp_translate_user_role( $roles[ $role_id ]['name'] )
|
395 |
: '';
|
396 |
|
|
|
397 |
return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );
|
398 |
}
|
399 |
|
@@ -435,6 +438,8 @@ function bbp_filter_blog_editable_roles( $all_roles = array() ) {
|
|
435 |
* @return string
|
436 |
*/
|
437 |
function bbp_get_keymaster_role() {
|
|
|
|
|
438 |
return apply_filters( 'bbp_get_keymaster_role', 'bbp_keymaster' );
|
439 |
}
|
440 |
|
@@ -447,6 +452,8 @@ function bbp_get_keymaster_role() {
|
|
447 |
* @return string
|
448 |
*/
|
449 |
function bbp_get_moderator_role() {
|
|
|
|
|
450 |
return apply_filters( 'bbp_get_moderator_role', 'bbp_moderator' );
|
451 |
}
|
452 |
|
@@ -459,6 +466,8 @@ function bbp_get_moderator_role() {
|
|
459 |
* @return string
|
460 |
*/
|
461 |
function bbp_get_participant_role() {
|
|
|
|
|
462 |
return apply_filters( 'bbp_get_participant_role', 'bbp_participant' );
|
463 |
}
|
464 |
|
@@ -471,6 +480,8 @@ function bbp_get_participant_role() {
|
|
471 |
* @return string
|
472 |
*/
|
473 |
function bbp_get_spectator_role() {
|
|
|
|
|
474 |
return apply_filters( 'bbp_get_spectator_role', 'bbp_spectator' );
|
475 |
}
|
476 |
|
@@ -483,6 +494,8 @@ function bbp_get_spectator_role() {
|
|
483 |
* @return string
|
484 |
*/
|
485 |
function bbp_get_blocked_role() {
|
|
|
|
|
486 |
return apply_filters( 'bbp_get_blocked_role', 'bbp_blocked' );
|
487 |
}
|
488 |
|
207 |
break;
|
208 |
}
|
209 |
|
210 |
+
// Filter & return
|
211 |
return apply_filters( 'bbp_get_caps_for_role', $caps, $role );
|
212 |
}
|
213 |
|
246 |
}
|
247 |
|
248 |
/**
|
249 |
+
* Get the available roles, minus the dynamic roles that come with bbPress
|
250 |
*
|
251 |
* @since 2.4.0 bbPress (r5064)
|
252 |
*
|
265 |
$the_roles = isset( $wp_roles->roles ) ? $wp_roles->roles : false;
|
266 |
$all_roles = apply_filters( 'editable_roles', $the_roles );
|
267 |
|
268 |
+
// Filter & return
|
269 |
return apply_filters( 'bbp_get_blog_roles', $all_roles, $wp_roles );
|
270 |
}
|
271 |
|
281 |
*
|
282 |
* @since 2.2.0 bbPress (r4290)
|
283 |
*
|
284 |
+
* @uses bbp_get_dynamic_roles() To get and add forum roles to $wp_roles
|
285 |
*
|
286 |
* @param WP_Roles $wp_roles The array of WP_Role objects that was initialized
|
287 |
*
|
396 |
? bbp_translate_user_role( $roles[ $role_id ]['name'] )
|
397 |
: '';
|
398 |
|
399 |
+
// Filter & return
|
400 |
return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );
|
401 |
}
|
402 |
|
438 |
* @return string
|
439 |
*/
|
440 |
function bbp_get_keymaster_role() {
|
441 |
+
|
442 |
+
// Filter & return
|
443 |
return apply_filters( 'bbp_get_keymaster_role', 'bbp_keymaster' );
|
444 |
}
|
445 |
|
452 |
* @return string
|
453 |
*/
|
454 |
function bbp_get_moderator_role() {
|
455 |
+
|
456 |
+
// Filter & return
|
457 |
return apply_filters( 'bbp_get_moderator_role', 'bbp_moderator' );
|
458 |
}
|
459 |
|
466 |
* @return string
|
467 |
*/
|
468 |
function bbp_get_participant_role() {
|
469 |
+
|
470 |
+
// Filter & return
|
471 |
return apply_filters( 'bbp_get_participant_role', 'bbp_participant' );
|
472 |
}
|
473 |
|
480 |
* @return string
|
481 |
*/
|
482 |
function bbp_get_spectator_role() {
|
483 |
+
|
484 |
+
// Filter & return
|
485 |
return apply_filters( 'bbp_get_spectator_role', 'bbp_spectator' );
|
486 |
}
|
487 |
|
494 |
* @return string
|
495 |
*/
|
496 |
function bbp_get_blocked_role() {
|
497 |
+
|
498 |
+
// Filter & return
|
499 |
return apply_filters( 'bbp_get_blocked_role', 'bbp_blocked' );
|
500 |
}
|
501 |
|
includes/core/extend.php
CHANGED
@@ -23,7 +23,7 @@ defined( 'ABSPATH' ) || exit;
|
|
23 |
function bbp_setup_akismet() {
|
24 |
|
25 |
// Bail if no akismet
|
26 |
-
if ( !defined( 'AKISMET_VERSION' ) ) {
|
27 |
return;
|
28 |
}
|
29 |
|
@@ -33,7 +33,7 @@ function bbp_setup_akismet() {
|
|
33 |
}
|
34 |
|
35 |
// Include the Akismet Component
|
36 |
-
|
37 |
|
38 |
// Instantiate Akismet for bbPress
|
39 |
bbpress()->extend->akismet = new BBP_Akismet();
|
@@ -69,7 +69,7 @@ function bbp_setup_buddypress() {
|
|
69 |
}
|
70 |
|
71 |
// Include the BuddyPress Component
|
72 |
-
|
73 |
|
74 |
// Instantiate BuddyPress for bbPress
|
75 |
bbpress()->extend->buddypress = new BBP_Forums_Component();
|
23 |
function bbp_setup_akismet() {
|
24 |
|
25 |
// Bail if no akismet
|
26 |
+
if ( ! defined( 'AKISMET_VERSION' ) ) {
|
27 |
return;
|
28 |
}
|
29 |
|
33 |
}
|
34 |
|
35 |
// Include the Akismet Component
|
36 |
+
require_once bbpress()->includes_dir . 'extend/akismet.php';
|
37 |
|
38 |
// Instantiate Akismet for bbPress
|
39 |
bbpress()->extend->akismet = new BBP_Akismet();
|
69 |
}
|
70 |
|
71 |
// Include the BuddyPress Component
|
72 |
+
require_once bbpress()->includes_dir . 'extend/buddypress/loader.php';
|
73 |
|
74 |
// Instantiate BuddyPress for bbPress
|
75 |
bbpress()->extend->buddypress = new BBP_Forums_Component();
|
includes/core/filters.php
CHANGED
@@ -139,26 +139,47 @@ add_filter( 'bbp_get_user_profile_link', 'bbp_rel_nofollow' );
|
|
139 |
add_filter( 'bbp_get_user_profile_link', 'wp_unslash' );
|
140 |
add_filter( 'bbp_get_user_profile_edit_link', 'bbp_rel_nofollow' );
|
141 |
add_filter( 'bbp_get_user_profile_edit_link', 'wp_unslash' );
|
|
|
|
|
142 |
|
143 |
// Run filters on reply content
|
144 |
-
add_filter( 'bbp_get_reply_content', '
|
145 |
-
add_filter( 'bbp_get_reply_content', '
|
146 |
-
add_filter( 'bbp_get_reply_content', '
|
147 |
-
add_filter( 'bbp_get_reply_content', '
|
148 |
-
add_filter( 'bbp_get_reply_content', '
|
149 |
-
add_filter( 'bbp_get_reply_content', '
|
150 |
-
add_filter( 'bbp_get_reply_content', 'wpautop',
|
151 |
-
add_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow',
|
152 |
|
153 |
// Run filters on topic content
|
154 |
-
add_filter( 'bbp_get_topic_content', '
|
155 |
-
add_filter( 'bbp_get_topic_content', '
|
156 |
-
add_filter( 'bbp_get_topic_content', '
|
157 |
-
add_filter( 'bbp_get_topic_content', '
|
158 |
-
add_filter( 'bbp_get_topic_content', '
|
159 |
-
add_filter( 'bbp_get_topic_content', '
|
160 |
-
add_filter( 'bbp_get_topic_content', 'wpautop',
|
161 |
-
add_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
// Form textarea output - undo the code-trick done pre-save, and sanitize
|
164 |
add_filter( 'bbp_get_form_forum_content', 'bbp_code_trick_reverse' );
|
@@ -186,11 +207,11 @@ add_filter( 'bbp_get_form_forum_visibility', 'esc_attr' );
|
|
186 |
add_filter( 'bbp_get_form_forum_visibility', 'trim' );
|
187 |
add_filter( 'bbp_get_form_forum_moderators', 'esc_attr' );
|
188 |
add_filter( 'bbp_get_form_forum_moderators', 'trim' );
|
189 |
-
add_filter( 'bbp_get_form_topic_forum', '
|
190 |
-
add_filter( 'bbp_get_form_forum_parent', '
|
191 |
-
add_filter( 'bbp_get_form_reply_to', '
|
192 |
|
193 |
-
// Add number format filter to functions
|
194 |
add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
|
195 |
add_filter( 'bbp_get_user_reply_count', 'bbp_number_format', 10 );
|
196 |
add_filter( 'bbp_get_user_post_count', 'bbp_number_format', 10 );
|
@@ -201,23 +222,30 @@ add_filter( 'bbp_get_forum_post_count', 'bbp_number_format', 10 );
|
|
201 |
add_filter( 'bbp_get_topic_voice_count', 'bbp_number_format', 10 );
|
202 |
add_filter( 'bbp_get_topic_reply_count', 'bbp_number_format', 10 );
|
203 |
add_filter( 'bbp_get_topic_post_count', 'bbp_number_format', 10 );
|
|
|
|
|
204 |
add_filter( 'bbp_get_forum_topic_count_hidden', 'bbp_number_format', 10 );
|
205 |
add_filter( 'bbp_get_topic_reply_count_hidden', 'bbp_number_format', 10 );
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
// Sanitize displayed user data
|
208 |
add_filter( 'bbp_get_displayed_user_field', 'bbp_sanitize_displayed_user_field', 10, 3 );
|
209 |
|
210 |
-
// Run wp_kses_data on topic/reply content in admin section
|
211 |
-
if ( is_admin() ) {
|
212 |
-
add_filter( 'bbp_get_reply_content', 'bbp_kses_data' );
|
213 |
-
add_filter( 'bbp_get_topic_content', 'bbp_kses_data' );
|
214 |
-
|
215 |
-
// Revisions (only when not in admin)
|
216 |
-
} else {
|
217 |
-
add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 99, 2 );
|
218 |
-
add_filter( 'bbp_get_topic_content', 'bbp_topic_content_append_revisions', 99, 2 );
|
219 |
-
}
|
220 |
-
|
221 |
// Suppress private forum details
|
222 |
add_filter( 'bbp_get_forum_topic_count', 'bbp_suppress_private_forum_meta', 10, 2 );
|
223 |
add_filter( 'bbp_get_forum_reply_count', 'bbp_suppress_private_forum_meta', 10, 2 );
|
@@ -227,6 +255,9 @@ add_filter( 'bbp_get_author_link', 'bbp_suppress_private_author_link',
|
|
227 |
add_filter( 'bbp_get_topic_author_link', 'bbp_suppress_private_author_link', 10, 2 );
|
228 |
add_filter( 'bbp_get_reply_author_link', 'bbp_suppress_private_author_link', 10, 2 );
|
229 |
|
|
|
|
|
|
|
230 |
// Topic and reply author display names
|
231 |
add_filter( 'bbp_get_topic_author_display_name', 'wptexturize' );
|
232 |
add_filter( 'bbp_get_topic_author_display_name', 'convert_chars' );
|
@@ -278,8 +309,8 @@ add_filter( 'bbp_make_clickable', 'bbp_make_mentions_clickable', 8 ); // @jjj
|
|
278 |
*
|
279 |
* These filters were most likely replaced by bbp_parse_args(), which includes
|
280 |
* both passive and aggressive filters anywhere parse_args is used to compare
|
281 |
-
* default arguments to passed arguments, without
|
282 |
-
*
|
283 |
*/
|
284 |
|
285 |
/**
|
@@ -310,7 +341,9 @@ add_filter( 'bbp_plugin_locale', '_bbp_filter_locale', 10, 1 );
|
|
310 |
* @return array
|
311 |
*/
|
312 |
function _bbp_has_forums_query( $args = array() ) {
|
313 |
-
|
|
|
|
|
314 |
}
|
315 |
add_filter( 'bbp_after_has_forums_parse_args', '_bbp_has_forums_query' );
|
316 |
|
@@ -323,7 +356,9 @@ add_filter( 'bbp_after_has_forums_parse_args', '_bbp_has_forums_query' );
|
|
323 |
* @return array
|
324 |
*/
|
325 |
function _bbp_has_topics_query( $args = array() ) {
|
326 |
-
|
|
|
|
|
327 |
}
|
328 |
add_filter( 'bbp_after_has_topics_parse_args', '_bbp_has_topics_query' );
|
329 |
|
@@ -336,6 +371,8 @@ add_filter( 'bbp_after_has_topics_parse_args', '_bbp_has_topics_query' );
|
|
336 |
* @return array
|
337 |
*/
|
338 |
function _bbp_has_replies_query( $args = array() ) {
|
339 |
-
|
|
|
|
|
340 |
}
|
341 |
add_filter( 'bbp_after_has_replies_parse_args', '_bbp_has_replies_query' );
|
139 |
add_filter( 'bbp_get_user_profile_link', 'wp_unslash' );
|
140 |
add_filter( 'bbp_get_user_profile_edit_link', 'bbp_rel_nofollow' );
|
141 |
add_filter( 'bbp_get_user_profile_edit_link', 'wp_unslash' );
|
142 |
+
add_filter( 'bbp_get_cancel_reply_to_link', 'bbp_rel_nofollow' );
|
143 |
+
add_filter( 'bbp_get_cancel_reply_to_link', 'wp_unslash' );
|
144 |
|
145 |
// Run filters on reply content
|
146 |
+
add_filter( 'bbp_get_reply_content', 'wptexturize', 6 );
|
147 |
+
add_filter( 'bbp_get_reply_content', 'convert_chars', 8 );
|
148 |
+
add_filter( 'bbp_get_reply_content', 'capital_P_dangit', 10 );
|
149 |
+
add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );
|
150 |
+
add_filter( 'bbp_get_reply_content', 'force_balance_tags', 30 );
|
151 |
+
add_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 40 );
|
152 |
+
add_filter( 'bbp_get_reply_content', 'wpautop', 50 );
|
153 |
+
add_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow', 60 );
|
154 |
|
155 |
// Run filters on topic content
|
156 |
+
add_filter( 'bbp_get_topic_content', 'wptexturize', 6 );
|
157 |
+
add_filter( 'bbp_get_topic_content', 'convert_chars', 8 );
|
158 |
+
add_filter( 'bbp_get_topic_content', 'capital_P_dangit', 10 );
|
159 |
+
add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );
|
160 |
+
add_filter( 'bbp_get_topic_content', 'force_balance_tags', 30 );
|
161 |
+
add_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 40 );
|
162 |
+
add_filter( 'bbp_get_topic_content', 'wpautop', 50 );
|
163 |
+
add_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow', 60 );
|
164 |
+
|
165 |
+
// Admin-only
|
166 |
+
if ( is_admin() ) {
|
167 |
+
|
168 |
+
// Run wp_kses_data on topic/reply content in admin section
|
169 |
+
add_filter( 'bbp_get_reply_content', 'bbp_kses_data' );
|
170 |
+
add_filter( 'bbp_get_topic_content', 'bbp_kses_data' );
|
171 |
+
|
172 |
+
// Filters outside of wp-admin
|
173 |
+
} else {
|
174 |
+
|
175 |
+
// Responsive images
|
176 |
+
add_filter( 'bbp_get_reply_content', 'wp_make_content_images_responsive', 60 );
|
177 |
+
add_filter( 'bbp_get_topic_content', 'wp_make_content_images_responsive', 60 );
|
178 |
+
|
179 |
+
// Revisions
|
180 |
+
add_filter( 'bbp_get_reply_content', 'bbp_reply_content_append_revisions', 99, 2 );
|
181 |
+
add_filter( 'bbp_get_topic_content', 'bbp_topic_content_append_revisions', 99, 2 );
|
182 |
+
}
|
183 |
|
184 |
// Form textarea output - undo the code-trick done pre-save, and sanitize
|
185 |
add_filter( 'bbp_get_form_forum_content', 'bbp_code_trick_reverse' );
|
207 |
add_filter( 'bbp_get_form_forum_visibility', 'trim' );
|
208 |
add_filter( 'bbp_get_form_forum_moderators', 'esc_attr' );
|
209 |
add_filter( 'bbp_get_form_forum_moderators', 'trim' );
|
210 |
+
add_filter( 'bbp_get_form_topic_forum', 'intval' );
|
211 |
+
add_filter( 'bbp_get_form_forum_parent', 'intval' );
|
212 |
+
add_filter( 'bbp_get_form_reply_to', 'intval' );
|
213 |
|
214 |
+
// Add number format filter to functions requesting formatted values
|
215 |
add_filter( 'bbp_get_user_topic_count', 'bbp_number_format', 10 );
|
216 |
add_filter( 'bbp_get_user_reply_count', 'bbp_number_format', 10 );
|
217 |
add_filter( 'bbp_get_user_post_count', 'bbp_number_format', 10 );
|
222 |
add_filter( 'bbp_get_topic_voice_count', 'bbp_number_format', 10 );
|
223 |
add_filter( 'bbp_get_topic_reply_count', 'bbp_number_format', 10 );
|
224 |
add_filter( 'bbp_get_topic_post_count', 'bbp_number_format', 10 );
|
225 |
+
add_filter( 'bbp_get_topic_revision_count', 'bbp_number_format', 10 );
|
226 |
+
add_filter( 'bbp_get_reply_revision_count', 'bbp_number_format', 10 );
|
227 |
add_filter( 'bbp_get_forum_topic_count_hidden', 'bbp_number_format', 10 );
|
228 |
add_filter( 'bbp_get_topic_reply_count_hidden', 'bbp_number_format', 10 );
|
229 |
|
230 |
+
// Add number-not-negative filter to values that can never be negative numbers
|
231 |
+
add_filter( 'bbp_get_user_topic_count_int', 'bbp_number_not_negative', 10 );
|
232 |
+
add_filter( 'bbp_get_user_reply_count_int', 'bbp_number_not_negative', 10 );
|
233 |
+
add_filter( 'bbp_get_user_post_count_int', 'bbp_number_not_negative', 10 );
|
234 |
+
add_filter( 'bbp_get_forum_subforum_count_int', 'bbp_number_not_negative', 10 );
|
235 |
+
add_filter( 'bbp_get_forum_topic_count_int', 'bbp_number_not_negative', 10 );
|
236 |
+
add_filter( 'bbp_get_forum_reply_count_int', 'bbp_number_not_negative', 10 );
|
237 |
+
add_filter( 'bbp_get_forum_post_count_int', 'bbp_number_not_negative', 10 );
|
238 |
+
add_filter( 'bbp_get_topic_voice_count_int', 'bbp_number_not_negative', 10 );
|
239 |
+
add_filter( 'bbp_get_topic_reply_count_int', 'bbp_number_not_negative', 10 );
|
240 |
+
add_filter( 'bbp_get_topic_post_count_int', 'bbp_number_not_negative', 10 );
|
241 |
+
add_filter( 'bbp_get_forum_topic_count_hidden_int', 'bbp_number_not_negative', 10 );
|
242 |
+
add_filter( 'bbp_get_topic_reply_count_hidden_int', 'bbp_number_not_negative', 10 );
|
243 |
+
add_filter( 'bbp_get_topic_revision_count_int', 'bbp_number_not_negative', 10 );
|
244 |
+
add_filter( 'bbp_get_reply_revision_count_int', 'bbp_number_not_negative', 10 );
|
245 |
+
|
246 |
// Sanitize displayed user data
|
247 |
add_filter( 'bbp_get_displayed_user_field', 'bbp_sanitize_displayed_user_field', 10, 3 );
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
// Suppress private forum details
|
250 |
add_filter( 'bbp_get_forum_topic_count', 'bbp_suppress_private_forum_meta', 10, 2 );
|
251 |
add_filter( 'bbp_get_forum_reply_count', 'bbp_suppress_private_forum_meta', 10, 2 );
|
255 |
add_filter( 'bbp_get_topic_author_link', 'bbp_suppress_private_author_link', 10, 2 );
|
256 |
add_filter( 'bbp_get_reply_author_link', 'bbp_suppress_private_author_link', 10, 2 );
|
257 |
|
258 |
+
// Allow private & hidden forum details for moderators
|
259 |
+
add_filter( 'bbp_get_excluded_forum_ids', 'bbp_allow_forums_of_user', 10, 2 );
|
260 |
+
|
261 |
// Topic and reply author display names
|
262 |
add_filter( 'bbp_get_topic_author_display_name', 'wptexturize' );
|
263 |
add_filter( 'bbp_get_topic_author_display_name', 'convert_chars' );
|
309 |
*
|
310 |
* These filters were most likely replaced by bbp_parse_args(), which includes
|
311 |
* both passive and aggressive filters anywhere parse_args is used to compare
|
312 |
+
* default arguments to passed arguments, without sprinkling the project with
|
313 |
+
* _before_ and _after_ filters everywhere.
|
314 |
*/
|
315 |
|
316 |
/**
|
341 |
* @return array
|
342 |
*/
|
343 |
function _bbp_has_forums_query( $args = array() ) {
|
344 |
+
|
345 |
+
// Filter & return
|
346 |
+
return (array) apply_filters( 'bbp_has_forums_query', $args );
|
347 |
}
|
348 |
add_filter( 'bbp_after_has_forums_parse_args', '_bbp_has_forums_query' );
|
349 |
|
356 |
* @return array
|
357 |
*/
|
358 |
function _bbp_has_topics_query( $args = array() ) {
|
359 |
+
|
360 |
+
// Filter & return
|
361 |
+
return (array) apply_filters( 'bbp_has_topics_query', $args );
|
362 |
}
|
363 |
add_filter( 'bbp_after_has_topics_parse_args', '_bbp_has_topics_query' );
|
364 |
|
371 |
* @return array
|
372 |
*/
|
373 |
function _bbp_has_replies_query( $args = array() ) {
|
374 |
+
|
375 |
+
// Filter & return
|
376 |
+
return (array) apply_filters( 'bbp_has_replies_query', $args );
|
377 |
}
|
378 |
add_filter( 'bbp_after_has_replies_parse_args', '_bbp_has_replies_query' );
|
includes/core/functions.php
CHANGED
@@ -78,14 +78,14 @@ function bbp_db_version_raw() {
|
|
78 |
/** Post Meta *****************************************************************/
|
79 |
|
80 |
/**
|
81 |
-
* Update
|
82 |
*
|
83 |
* @since 2.0.0 bbPress (r3181)
|
84 |
*
|
85 |
* @param int $post_id The post to update
|
86 |
* @param int $forum_id The forum
|
87 |
*/
|
88 |
-
function bbp_update_forum_id( $post_id, $forum_id ) {
|
89 |
|
90 |
// Allow the forum ID to be updated 'just in time' before save
|
91 |
$forum_id = (int) apply_filters( 'bbp_update_forum_id', $forum_id, $post_id );
|
@@ -97,14 +97,14 @@ function bbp_update_forum_id( $post_id, $forum_id ) {
|
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
-
* Update
|
101 |
*
|
102 |
* @since 2.0.0 bbPress (r3181)
|
103 |
*
|
104 |
* @param int $post_id The post to update
|
105 |
* @param int $topic_id The topic
|
106 |
*/
|
107 |
-
function bbp_update_topic_id( $post_id, $topic_id ) {
|
108 |
|
109 |
// Allow the topic ID to be updated 'just in time' before save
|
110 |
$topic_id = (int) apply_filters( 'bbp_update_topic_id', $topic_id, $post_id );
|
@@ -116,14 +116,14 @@ function bbp_update_topic_id( $post_id, $topic_id ) {
|
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
-
* Update
|
120 |
*
|
121 |
* @since 2.0.0 bbPress (r3181)
|
122 |
*
|
123 |
* @param int $post_id The post to update
|
124 |
* @param int $reply_id The reply
|
125 |
*/
|
126 |
-
function bbp_update_reply_id( $post_id, $reply_id ) {
|
127 |
|
128 |
// Allow the reply ID to be updated 'just in time' before save
|
129 |
$reply_id = (int) apply_filters( 'bbp_update_reply_id', $reply_id, $post_id );
|
@@ -135,14 +135,14 @@ function bbp_update_reply_id( $post_id, $reply_id ) {
|
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
-
* Update
|
139 |
*
|
140 |
* @since 2.6.0 bbPress (r5735)
|
141 |
*
|
142 |
* @param int $post_id The post to update
|
143 |
* @param int $reply_id The reply ID
|
144 |
*/
|
145 |
-
function bbp_update_reply_to_id( $post_id, $reply_id ) {
|
146 |
|
147 |
// Allow the reply ID to be updated 'just in time' before save
|
148 |
$reply_id = (int) apply_filters( 'bbp_update_reply_to_id', $reply_id, $post_id );
|
@@ -237,7 +237,7 @@ function bbp_deregister_view( $view ) {
|
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
-
* Run the view
|
241 |
*
|
242 |
* @since 2.0.0 bbPress (r2789)
|
243 |
*
|
@@ -251,6 +251,7 @@ function bbp_deregister_view( $view ) {
|
|
251 |
*/
|
252 |
function bbp_view_query( $view = '', $new_args = '' ) {
|
253 |
|
|
|
254 |
$view = bbp_get_view_id( $view );
|
255 |
if ( empty( $view ) ) {
|
256 |
return false;
|
@@ -267,7 +268,7 @@ function bbp_view_query( $view = '', $new_args = '' ) {
|
|
267 |
}
|
268 |
|
269 |
/**
|
270 |
-
* Return the
|
271 |
*
|
272 |
* @since 2.0.0 bbPress (r2789)
|
273 |
*
|
@@ -275,12 +276,14 @@ function bbp_view_query( $view = '', $new_args = '' ) {
|
|
275 |
* @uses bbp_get_view_id() To get the view id
|
276 |
* @return array Query arguments
|
277 |
*/
|
278 |
-
function bbp_get_view_query_args( $view ) {
|
|
|
279 |
$view = bbp_get_view_id( $view );
|
280 |
-
$retval = ! empty( $view )
|
281 |
-
?
|
282 |
: false;
|
283 |
|
|
|
284 |
return apply_filters( 'bbp_get_view_query_args', $retval, $view );
|
285 |
}
|
286 |
|
@@ -313,9 +316,11 @@ function bbp_add_error( $code = '', $message = '', $data = '' ) {
|
|
313 |
* @usese WP_Error::get_error_codes()
|
314 |
*/
|
315 |
function bbp_has_errors() {
|
316 |
-
$has_errors = bbpress()->errors->get_error_codes()
|
|
|
|
|
317 |
|
318 |
-
return apply_filters( 'bbp_has_errors', $has_errors, bbpress()->errors );
|
319 |
}
|
320 |
|
321 |
/** Mentions ******************************************************************/
|
@@ -332,6 +337,8 @@ function bbp_has_errors() {
|
|
332 |
* @return string Pattern to match usernames with
|
333 |
*/
|
334 |
function bbp_find_mentions_pattern() {
|
|
|
|
|
335 |
return apply_filters( 'bbp_find_mentions_pattern', '/[@]+([A-Za-z0-9-_\.@]+)\b/' );
|
336 |
}
|
337 |
|
@@ -354,6 +361,7 @@ function bbp_find_mentions( $content = '' ) {
|
|
354 |
$usernames = false;
|
355 |
}
|
356 |
|
|
|
357 |
return apply_filters( 'bbp_find_mentions', $usernames, $pattern, $content );
|
358 |
}
|
359 |
|
@@ -383,8 +391,14 @@ function bbp_mention_filter( $content = '' ) {
|
|
383 |
continue;
|
384 |
}
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
// Replace name in content
|
387 |
-
$content = preg_replace(
|
388 |
}
|
389 |
|
390 |
// Return modified content
|
@@ -539,7 +553,7 @@ function bbp_get_user_replies_rewrite_id() {
|
|
539 |
}
|
540 |
|
541 |
/**
|
542 |
-
* Return the unique ID for user
|
543 |
*
|
544 |
* @since 2.2.0 bbPress (r4181)
|
545 |
*
|
@@ -550,7 +564,7 @@ function bbp_get_user_favorites_rewrite_id() {
|
|
550 |
}
|
551 |
|
552 |
/**
|
553 |
-
* Return the unique ID for user
|
554 |
*
|
555 |
* @since 2.2.0 bbPress (r4181)
|
556 |
*
|
@@ -560,6 +574,17 @@ function bbp_get_user_subscriptions_rewrite_id() {
|
|
560 |
return bbpress()->subs_id;
|
561 |
}
|
562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
/**
|
564 |
* Return the unique ID for topic view rewrite rules
|
565 |
*
|
78 |
/** Post Meta *****************************************************************/
|
79 |
|
80 |
/**
|
81 |
+
* Update the forum meta ID of a post
|
82 |
*
|
83 |
* @since 2.0.0 bbPress (r3181)
|
84 |
*
|
85 |
* @param int $post_id The post to update
|
86 |
* @param int $forum_id The forum
|
87 |
*/
|
88 |
+
function bbp_update_forum_id( $post_id = 0, $forum_id = 0 ) {
|
89 |
|
90 |
// Allow the forum ID to be updated 'just in time' before save
|
91 |
$forum_id = (int) apply_filters( 'bbp_update_forum_id', $forum_id, $post_id );
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
+
* Update the topic meta ID of a post
|
101 |
*
|
102 |
* @since 2.0.0 bbPress (r3181)
|
103 |
*
|
104 |
* @param int $post_id The post to update
|
105 |
* @param int $topic_id The topic
|
106 |
*/
|
107 |
+
function bbp_update_topic_id( $post_id = 0, $topic_id = 0 ) {
|
108 |
|
109 |
// Allow the topic ID to be updated 'just in time' before save
|
110 |
$topic_id = (int) apply_filters( 'bbp_update_topic_id', $topic_id, $post_id );
|
116 |
}
|
117 |
|
118 |
/**
|
119 |
+
* Update the reply meta ID of a post
|
120 |
*
|
121 |
* @since 2.0.0 bbPress (r3181)
|
122 |
*
|
123 |
* @param int $post_id The post to update
|
124 |
* @param int $reply_id The reply
|
125 |
*/
|
126 |
+
function bbp_update_reply_id( $post_id = 0, $reply_id = 0 ) {
|
127 |
|
128 |
// Allow the reply ID to be updated 'just in time' before save
|
129 |
$reply_id = (int) apply_filters( 'bbp_update_reply_id', $reply_id, $post_id );
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
+
* Update the reply-to meta ID of a post
|
139 |
*
|
140 |
* @since 2.6.0 bbPress (r5735)
|
141 |
*
|
142 |
* @param int $post_id The post to update
|
143 |
* @param int $reply_id The reply ID
|
144 |
*/
|
145 |
+
function bbp_update_reply_to_id( $post_id = 0, $reply_id = 0 ) {
|
146 |
|
147 |
// Allow the reply ID to be updated 'just in time' before save
|
148 |
$reply_id = (int) apply_filters( 'bbp_update_reply_to_id', $reply_id, $post_id );
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
+
* Run the query of a topic-view
|
241 |
*
|
242 |
* @since 2.0.0 bbPress (r2789)
|
243 |
*
|
251 |
*/
|
252 |
function bbp_view_query( $view = '', $new_args = '' ) {
|
253 |
|
254 |
+
// Get view, or bail
|
255 |
$view = bbp_get_view_id( $view );
|
256 |
if ( empty( $view ) ) {
|
257 |
return false;
|
268 |
}
|
269 |
|
270 |
/**
|
271 |
+
* Return the query arguments of a topic-view
|
272 |
*
|
273 |
* @since 2.0.0 bbPress (r2789)
|
274 |
*
|
276 |
* @uses bbp_get_view_id() To get the view id
|
277 |
* @return array Query arguments
|
278 |
*/
|
279 |
+
function bbp_get_view_query_args( $view = '' ) {
|
280 |
+
$bbp = bbpress();
|
281 |
$view = bbp_get_view_id( $view );
|
282 |
+
$retval = ! empty( $view ) && ! empty( $bbp->views[ $view ] )
|
283 |
+
? $bbp->views[ $view ]['query']
|
284 |
: false;
|
285 |
|
286 |
+
// Filter & return
|
287 |
return apply_filters( 'bbp_get_view_query_args', $retval, $view );
|
288 |
}
|
289 |
|
316 |
* @usese WP_Error::get_error_codes()
|
317 |
*/
|
318 |
function bbp_has_errors() {
|
319 |
+
$has_errors = bbpress()->errors->get_error_codes()
|
320 |
+
? true
|
321 |
+
: false;
|
322 |
|
323 |
+
return (bool) apply_filters( 'bbp_has_errors', $has_errors, bbpress()->errors );
|
324 |
}
|
325 |
|
326 |
/** Mentions ******************************************************************/
|
337 |
* @return string Pattern to match usernames with
|
338 |
*/
|
339 |
function bbp_find_mentions_pattern() {
|
340 |
+
|
341 |
+
// Filter & return
|
342 |
return apply_filters( 'bbp_find_mentions_pattern', '/[@]+([A-Za-z0-9-_\.@]+)\b/' );
|
343 |
}
|
344 |
|
361 |
$usernames = false;
|
362 |
}
|
363 |
|
364 |
+
// Filter & return
|
365 |
return apply_filters( 'bbp_find_mentions', $usernames, $pattern, $content );
|
366 |
}
|
367 |
|
391 |
continue;
|
392 |
}
|
393 |
|
394 |
+
// Link
|
395 |
+
$profile_url = bbp_get_user_profile_url( $user->ID );
|
396 |
+
$profile_link = sprintf( '<a href="%1$s">@%2$s</a>', esc_url( $profile_url ), esc_html( $username ) );
|
397 |
+
$no_followed = bbp_rel_nofollow( $profile_link );
|
398 |
+
$pattern = "/(@{$username}\b)/";
|
399 |
+
|
400 |
// Replace name in content
|
401 |
+
$content = preg_replace( $pattern, $no_followed, $content );
|
402 |
}
|
403 |
|
404 |
// Return modified content
|
553 |
}
|
554 |
|
555 |
/**
|
556 |
+
* Return the unique ID for user favorites rewrite rules
|
557 |
*
|
558 |
* @since 2.2.0 bbPress (r4181)
|
559 |
*
|
564 |
}
|
565 |
|
566 |
/**
|
567 |
+
* Return the unique ID for user subscriptions rewrite rules
|
568 |
*
|
569 |
* @since 2.2.0 bbPress (r4181)
|
570 |
*
|
574 |
return bbpress()->subs_id;
|
575 |
}
|
576 |
|
577 |
+
/**
|
578 |
+
* Return the unique ID for user engagement rewrite rules
|
579 |
+
*
|
580 |
+
* @since 2.6.0 bbPress (r6320)
|
581 |
+
*
|
582 |
+
* @return string
|
583 |
+
*/
|
584 |
+
function bbp_get_user_engagements_rewrite_id() {
|
585 |
+
return bbpress()->engagements_id;
|
586 |
+
}
|
587 |
+
|
588 |
/**
|
589 |
* Return the unique ID for topic view rewrite rules
|
590 |
*
|
includes/core/options.php
CHANGED
@@ -21,7 +21,7 @@ defined( 'ABSPATH' ) || exit;
|
|
21 |
*/
|
22 |
function bbp_get_default_options() {
|
23 |
|
24 |
-
//
|
25 |
return apply_filters( 'bbp_get_default_options', array(
|
26 |
|
27 |
/** DB Version ********************************************************/
|
@@ -34,6 +34,9 @@ function bbp_get_default_options() {
|
|
34 |
'_bbp_throttle_time' => 10, // Throttle post time to 10 seconds
|
35 |
'_bbp_enable_favorites' => 1, // Favorites
|
36 |
'_bbp_enable_subscriptions' => 1, // Subscriptions
|
|
|
|
|
|
|
37 |
'_bbp_allow_anonymous' => 0, // Allow anonymous posting
|
38 |
'_bbp_allow_global_access' => 1, // Users from all sites can post
|
39 |
'_bbp_allow_revisions' => 1, // Allow revisions
|
@@ -46,7 +49,7 @@ function bbp_get_default_options() {
|
|
46 |
'_bbp_use_autoembed' => 0, // Allow oEmbed in topics and replies
|
47 |
'_bbp_theme_package_id' => 'default', // The ID for the current theme package
|
48 |
'_bbp_default_role' => bbp_get_participant_role(), // Default forums role
|
49 |
-
'_bbp_settings_integration' =>
|
50 |
|
51 |
/** Per Page **********************************************************/
|
52 |
|
@@ -214,6 +217,8 @@ function bbp_pre_get_option( $value = '' ) {
|
|
214 |
* @return bool Is favorites enabled or not
|
215 |
*/
|
216 |
function bbp_is_favorites_active( $default = 1 ) {
|
|
|
|
|
217 |
return (bool) apply_filters( 'bbp_is_favorites_active', (bool) get_option( '_bbp_enable_favorites', $default ) );
|
218 |
}
|
219 |
|
@@ -227,9 +232,56 @@ function bbp_is_favorites_active( $default = 1 ) {
|
|
227 |
* @return bool Is subscription enabled or not
|
228 |
*/
|
229 |
function bbp_is_subscriptions_active( $default = 1 ) {
|
|
|
|
|
230 |
return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) );
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
/**
|
234 |
* Are topic tags allowed
|
235 |
*
|
@@ -240,6 +292,8 @@ function bbp_is_subscriptions_active( $default = 1 ) {
|
|
240 |
* @return bool Are tags allowed?
|
241 |
*/
|
242 |
function bbp_allow_topic_tags( $default = 1 ) {
|
|
|
|
|
243 |
return (bool) apply_filters( 'bbp_allow_topic_tags', (bool) get_option( '_bbp_allow_topic_tags', $default ) );
|
244 |
}
|
245 |
|
@@ -254,6 +308,8 @@ function bbp_allow_topic_tags( $default = 1 ) {
|
|
254 |
* @return bool Are per-forum moderators allowed?
|
255 |
*/
|
256 |
function bbp_allow_forum_mods( $default = 1 ) {
|
|
|
|
|
257 |
return (bool) apply_filters( 'bbp_allow_forum_mods', (bool) get_option( '_bbp_allow_forum_mods', $default ) );
|
258 |
}
|
259 |
|
@@ -267,6 +323,8 @@ function bbp_allow_forum_mods( $default = 1 ) {
|
|
267 |
* @return bool Is forum-wide searching allowed?
|
268 |
*/
|
269 |
function bbp_allow_search( $default = 1 ) {
|
|
|
|
|
270 |
return (bool) apply_filters( 'bbp_allow_search', (bool) get_option( '_bbp_allow_search', $default ) );
|
271 |
}
|
272 |
|
@@ -280,6 +338,8 @@ function bbp_allow_search( $default = 1 ) {
|
|
280 |
* @return bool Are threaded replies allowed?
|
281 |
*/
|
282 |
function bbp_allow_threaded_replies( $default = 0 ) {
|
|
|
|
|
283 |
return (bool) apply_filters( '_bbp_allow_threaded_replies', (bool) get_option( '_bbp_allow_threaded_replies', $default ) );
|
284 |
}
|
285 |
|
@@ -295,6 +355,8 @@ function bbp_allow_threaded_replies( $default = 0 ) {
|
|
295 |
* @return int Thread replies depth
|
296 |
*/
|
297 |
function bbp_thread_replies_depth( $default = 2 ) {
|
|
|
|
|
298 |
return (int) apply_filters( 'bbp_thread_replies_depth', (int) get_option( '_bbp_thread_replies_depth', $default ) );
|
299 |
}
|
300 |
|
@@ -308,6 +370,8 @@ function bbp_thread_replies_depth( $default = 2 ) {
|
|
308 |
* @return bool Are revisions allowed?
|
309 |
*/
|
310 |
function bbp_allow_revisions( $default = 1 ) {
|
|
|
|
|
311 |
return (bool) apply_filters( 'bbp_allow_revisions', (bool) get_option( '_bbp_allow_revisions', $default ) );
|
312 |
}
|
313 |
|
@@ -321,6 +385,8 @@ function bbp_allow_revisions( $default = 1 ) {
|
|
321 |
* @return bool Is anonymous posting allowed?
|
322 |
*/
|
323 |
function bbp_allow_anonymous( $default = 0 ) {
|
|
|
|
|
324 |
return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) );
|
325 |
}
|
326 |
|
@@ -334,6 +400,8 @@ function bbp_allow_anonymous( $default = 0 ) {
|
|
334 |
* @return bool Is global access allowed?
|
335 |
*/
|
336 |
function bbp_allow_global_access( $default = 1 ) {
|
|
|
|
|
337 |
return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
|
338 |
}
|
339 |
|
@@ -347,6 +415,8 @@ function bbp_allow_global_access( $default = 1 ) {
|
|
347 |
* @return string The default forums user role
|
348 |
*/
|
349 |
function bbp_get_default_role( $default = 'bbp_participant' ) {
|
|
|
|
|
350 |
return apply_filters( 'bbp_get_default_role', get_option( '_bbp_default_role', $default ) );
|
351 |
}
|
352 |
|
@@ -360,6 +430,8 @@ function bbp_get_default_role( $default = 'bbp_participant' ) {
|
|
360 |
* @return bool Use WP editor?
|
361 |
*/
|
362 |
function bbp_use_wp_editor( $default = 1 ) {
|
|
|
|
|
363 |
return (bool) apply_filters( 'bbp_use_wp_editor', (bool) get_option( '_bbp_use_wp_editor', $default ) );
|
364 |
}
|
365 |
|
@@ -373,6 +445,8 @@ function bbp_use_wp_editor( $default = 1 ) {
|
|
373 |
* @return bool Use oEmbed?
|
374 |
*/
|
375 |
function bbp_use_autoembed( $default = 1 ) {
|
|
|
|
|
376 |
return (bool) apply_filters( 'bbp_use_autoembed', (bool) get_option( '_bbp_use_autoembed', $default ) );
|
377 |
}
|
378 |
|
@@ -382,10 +456,12 @@ function bbp_use_autoembed( $default = 1 ) {
|
|
382 |
* @since 2.1.0 bbPress (r3829)
|
383 |
*
|
384 |
* @param $default string Optional. Default value 'default'
|
385 |
-
* @uses get_option() To get the
|
386 |
-
* @return string ID of the
|
387 |
*/
|
388 |
function bbp_get_theme_package_id( $default = 'default' ) {
|
|
|
|
|
389 |
return apply_filters( 'bbp_get_theme_package_id', get_option( '_bbp_theme_package_id', $default ) );
|
390 |
}
|
391 |
|
@@ -409,11 +485,13 @@ function bbp_title_max_length( $default = 80 ) {
|
|
409 |
* @return int Is anonymous posting allowed?
|
410 |
*/
|
411 |
function bbp_get_title_max_length( $default = 80 ) {
|
|
|
|
|
412 |
return (int) apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) );
|
413 |
}
|
414 |
|
415 |
/**
|
416 |
-
* Output the
|
417 |
*
|
418 |
* @since 2.1.0 bbPress (r3575)
|
419 |
*
|
@@ -423,7 +501,7 @@ function bbp_group_forums_root_id( $default = 0 ) {
|
|
423 |
echo bbp_get_group_forums_root_id( $default );
|
424 |
}
|
425 |
/**
|
426 |
-
* Return the
|
427 |
*
|
428 |
* @since 2.1.0 bbPress (r3575)
|
429 |
*
|
@@ -432,6 +510,8 @@ function bbp_group_forums_root_id( $default = 0 ) {
|
|
432 |
* @return int The post ID for the root forum
|
433 |
*/
|
434 |
function bbp_get_group_forums_root_id( $default = 0 ) {
|
|
|
|
|
435 |
return (int) apply_filters( 'bbp_get_group_forums_root_id', (int) get_option( '_bbp_group_forums_root_id', $default ) );
|
436 |
}
|
437 |
|
@@ -445,6 +525,8 @@ function bbp_group_forums_root_id( $default = 0 ) {
|
|
445 |
* @return bool Is group forums enabled or not
|
446 |
*/
|
447 |
function bbp_is_group_forums_active( $default = 1 ) {
|
|
|
|
|
448 |
return (bool) apply_filters( 'bbp_is_group_forums_active', (bool) get_option( '_bbp_enable_group_forums', $default ) );
|
449 |
}
|
450 |
|
@@ -458,20 +540,44 @@ function bbp_is_group_forums_active( $default = 1 ) {
|
|
458 |
* @return bool Is Akismet enabled or not
|
459 |
*/
|
460 |
function bbp_is_akismet_active( $default = 1 ) {
|
|
|
|
|
461 |
return (bool) apply_filters( 'bbp_is_akismet_active', (bool) get_option( '_bbp_enable_akismet', $default ) );
|
462 |
}
|
463 |
|
464 |
/**
|
465 |
* Integrate settings into existing WordPress pages
|
466 |
*
|
|
|
|
|
|
|
|
|
|
|
467 |
* @since 2.4.0 bbPress (r4932)
|
468 |
*
|
469 |
* @param $default bool Optional. Default value false
|
470 |
* @uses get_option() To get the admin integration setting
|
471 |
* @return bool To deeply integrate settings, or not
|
472 |
*/
|
473 |
-
function bbp_settings_integration( $default =
|
474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
}
|
476 |
|
477 |
/** Slugs *********************************************************************/
|
@@ -484,6 +590,8 @@ function bbp_settings_integration( $default = 0 ) {
|
|
484 |
* @return string
|
485 |
*/
|
486 |
function bbp_get_root_slug( $default = 'forums' ) {
|
|
|
|
|
487 |
return apply_filters( 'bbp_get_root_slug', get_option( '_bbp_root_slug', $default ) );
|
488 |
}
|
489 |
|
@@ -495,6 +603,8 @@ function bbp_get_root_slug( $default = 'forums' ) {
|
|
495 |
* @return bool
|
496 |
*/
|
497 |
function bbp_include_root_slug( $default = 1 ) {
|
|
|
|
|
498 |
return (bool) apply_filters( 'bbp_include_root_slug', (bool) get_option( '_bbp_include_root', $default ) );
|
499 |
}
|
500 |
|
@@ -506,6 +616,8 @@ function bbp_include_root_slug( $default = 1 ) {
|
|
506 |
* @return string
|
507 |
*/
|
508 |
function bbp_show_on_root( $default = 'forums' ) {
|
|
|
|
|
509 |
return apply_filters( 'bbp_show_on_root', get_option( '_bbp_show_on_root', $default ) );
|
510 |
}
|
511 |
|
@@ -523,6 +635,7 @@ function bbp_maybe_get_root_slug() {
|
|
523 |
$retval = trailingslashit( bbp_get_root_slug() );
|
524 |
}
|
525 |
|
|
|
526 |
return apply_filters( 'bbp_maybe_get_root_slug', $retval );
|
527 |
}
|
528 |
|
@@ -534,6 +647,8 @@ function bbp_maybe_get_root_slug() {
|
|
534 |
* @return string
|
535 |
*/
|
536 |
function bbp_get_forum_slug( $default = 'forum' ) {
|
|
|
|
|
537 |
return apply_filters( 'bbp_get_forum_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_forum_slug', $default ) );
|
538 |
}
|
539 |
|
@@ -545,6 +660,8 @@ function bbp_get_forum_slug( $default = 'forum' ) {
|
|
545 |
* @return string
|
546 |
*/
|
547 |
function bbp_get_topic_archive_slug( $default = 'topics' ) {
|
|
|
|
|
548 |
return apply_filters( 'bbp_get_topic_archive_slug', get_option( '_bbp_topic_archive_slug', $default ) );
|
549 |
}
|
550 |
|
@@ -556,6 +673,8 @@ function bbp_get_topic_archive_slug( $default = 'topics' ) {
|
|
556 |
* @return string
|
557 |
*/
|
558 |
function bbp_get_reply_archive_slug( $default = 'replies' ) {
|
|
|
|
|
559 |
return apply_filters( 'bbp_get_reply_archive_slug', get_option( '_bbp_reply_archive_slug', $default ) );
|
560 |
}
|
561 |
|
@@ -567,6 +686,8 @@ function bbp_get_reply_archive_slug( $default = 'replies' ) {
|
|
567 |
* @return string
|
568 |
*/
|
569 |
function bbp_get_topic_slug( $default = 'topic' ) {
|
|
|
|
|
570 |
return apply_filters( 'bbp_get_topic_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_topic_slug', $default ) );
|
571 |
}
|
572 |
|
@@ -578,6 +699,8 @@ function bbp_get_topic_slug( $default = 'topic' ) {
|
|
578 |
* @return string
|
579 |
*/
|
580 |
function bbp_get_topic_tag_tax_slug( $default = 'topic-tag' ) {
|
|
|
|
|
581 |
return apply_filters( 'bbp_get_topic_tag_tax_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_topic_tag_slug', $default ) );
|
582 |
}
|
583 |
|
@@ -589,6 +712,8 @@ function bbp_get_topic_tag_tax_slug( $default = 'topic-tag' ) {
|
|
589 |
* @return string
|
590 |
*/
|
591 |
function bbp_get_reply_slug( $default = 'reply' ) {
|
|
|
|
|
592 |
return apply_filters( 'bbp_get_reply_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_reply_slug', $default ) );
|
593 |
}
|
594 |
|
@@ -600,6 +725,8 @@ function bbp_get_reply_slug( $default = 'reply' ) {
|
|
600 |
* @return string
|
601 |
*/
|
602 |
function bbp_get_user_slug( $default = 'users' ) {
|
|
|
|
|
603 |
return apply_filters( 'bbp_get_user_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_user_slug', $default ) );
|
604 |
}
|
605 |
|
@@ -611,6 +738,8 @@ function bbp_get_user_slug( $default = 'users' ) {
|
|
611 |
* @return string
|
612 |
*/
|
613 |
function bbp_get_user_favorites_slug( $default = 'favorites' ) {
|
|
|
|
|
614 |
return apply_filters( 'bbp_get_user_favorites_slug', get_option( '_bbp_user_favs_slug', $default ) );
|
615 |
}
|
616 |
|
@@ -622,9 +751,24 @@ function bbp_get_user_favorites_slug( $default = 'favorites' ) {
|
|
622 |
* @return string
|
623 |
*/
|
624 |
function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) {
|
|
|
|
|
625 |
return apply_filters( 'bbp_get_user_subscriptions_slug', get_option( '_bbp_user_subs_slug', $default ) );
|
626 |
}
|
627 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
/**
|
629 |
* Return the topic view slug
|
630 |
*
|
@@ -633,6 +777,8 @@ function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) {
|
|
633 |
* @return string
|
634 |
*/
|
635 |
function bbp_get_view_slug( $default = 'view' ) {
|
|
|
|
|
636 |
return apply_filters( 'bbp_get_view_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_view_slug', $default ) );
|
637 |
}
|
638 |
|
@@ -644,6 +790,8 @@ function bbp_get_view_slug( $default = 'view' ) {
|
|
644 |
* @return string
|
645 |
*/
|
646 |
function bbp_get_search_slug( $default = 'search' ) {
|
|
|
|
|
647 |
return apply_filters( 'bbp_get_search_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_search_slug', $default ) );
|
648 |
}
|
649 |
|
@@ -659,5 +807,7 @@ function bbp_get_search_slug( $default = 'search' ) {
|
|
659 |
* @return string The location of the bb-config.php file, if any
|
660 |
*/
|
661 |
function bbp_get_config_location( $default = '' ) {
|
|
|
|
|
662 |
return apply_filters( 'bbp_get_config_location', get_option( 'bb-config-location', $default ) );
|
663 |
}
|
21 |
*/
|
22 |
function bbp_get_default_options() {
|
23 |
|
24 |
+
// Filter & return
|
25 |
return apply_filters( 'bbp_get_default_options', array(
|
26 |
|
27 |
/** DB Version ********************************************************/
|
34 |
'_bbp_throttle_time' => 10, // Throttle post time to 10 seconds
|
35 |
'_bbp_enable_favorites' => 1, // Favorites
|
36 |
'_bbp_enable_subscriptions' => 1, // Subscriptions
|
37 |
+
'_bbp_enable_engagements' => 1, // Engagements
|
38 |
+
'_bbp_allow_content_edit' => 1, // Allow content edit
|
39 |
+
'_bbp_allow_content_throttle' => 1, // Allow content throttle
|
40 |
'_bbp_allow_anonymous' => 0, // Allow anonymous posting
|
41 |
'_bbp_allow_global_access' => 1, // Users from all sites can post
|
42 |
'_bbp_allow_revisions' => 1, // Allow revisions
|
49 |
'_bbp_use_autoembed' => 0, // Allow oEmbed in topics and replies
|
50 |
'_bbp_theme_package_id' => 'default', // The ID for the current theme package
|
51 |
'_bbp_default_role' => bbp_get_participant_role(), // Default forums role
|
52 |
+
'_bbp_settings_integration' => 'basic', // How to integrate into wp-admin
|
53 |
|
54 |
/** Per Page **********************************************************/
|
55 |
|
217 |
* @return bool Is favorites enabled or not
|
218 |
*/
|
219 |
function bbp_is_favorites_active( $default = 1 ) {
|
220 |
+
|
221 |
+
// Filter & return
|
222 |
return (bool) apply_filters( 'bbp_is_favorites_active', (bool) get_option( '_bbp_enable_favorites', $default ) );
|
223 |
}
|
224 |
|
232 |
* @return bool Is subscription enabled or not
|
233 |
*/
|
234 |
function bbp_is_subscriptions_active( $default = 1 ) {
|
235 |
+
|
236 |
+
// Filter & return
|
237 |
return (bool) apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions', $default ) );
|
238 |
}
|
239 |
|
240 |
+
/**
|
241 |
+
* Checks if engagements feature is enabled.
|
242 |
+
*
|
243 |
+
* @since 2.6.0 bbPress (r6320)
|
244 |
+
*
|
245 |
+
* @param $default bool Optional.Default value true
|
246 |
+
* @uses get_option() To get the engagements option
|
247 |
+
* @return bool Is engagements enabled or not
|
248 |
+
*/
|
249 |
+
function bbp_is_engagements_active( $default = 1 ) {
|
250 |
+
|
251 |
+
// Filter & return
|
252 |
+
return (bool) apply_filters( 'bbp_is_engagements_active', (bool) get_option( '_bbp_enable_engagements', $default ) );
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Is content editing available when posting new topics & replies?
|
257 |
+
*
|
258 |
+
* @since 2.6.0 bbPress (r6441)
|
259 |
+
*
|
260 |
+
* @param $default bool Optional. Default value false
|
261 |
+
* @uses get_option() To get the global content edit option
|
262 |
+
* @return bool Is content editing allowed?
|
263 |
+
*/
|
264 |
+
function bbp_allow_content_edit( $default = 1 ) {
|
265 |
+
|
266 |
+
// Filter & return
|
267 |
+
return (bool) apply_filters( 'bbp_allow_content_edit', (bool) get_option( '_bbp_allow_content_edit', $default ) );
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Is content throttling engaged when posting new topics & replies?
|
272 |
+
*
|
273 |
+
* @since 2.6.0 bbPress (r6441)
|
274 |
+
*
|
275 |
+
* @param $default bool Optional. Default value false
|
276 |
+
* @uses get_option() To get the content throttle option
|
277 |
+
* @return bool Is content throttling allowed?
|
278 |
+
*/
|
279 |
+
function bbp_allow_content_throttle( $default = 1 ) {
|
280 |
+
|
281 |
+
// Filter & return
|
282 |
+
return (bool) apply_filters( 'bbp_allow_content_throttle', (bool) get_option( '_bbp_allow_content_throttle', $default ) );
|
283 |
+
}
|
284 |
+
|
285 |
/**
|
286 |
* Are topic tags allowed
|
287 |
*
|
292 |
* @return bool Are tags allowed?
|
293 |
*/
|
294 |
function bbp_allow_topic_tags( $default = 1 ) {
|
295 |
+
|
296 |
+
// Filter & return
|
297 |
return (bool) apply_filters( 'bbp_allow_topic_tags', (bool) get_option( '_bbp_allow_topic_tags', $default ) );
|
298 |
}
|
299 |
|
308 |
* @return bool Are per-forum moderators allowed?
|
309 |
*/
|
310 |
function bbp_allow_forum_mods( $default = 1 ) {
|
311 |
+
|
312 |
+
// Filter & return
|
313 |
return (bool) apply_filters( 'bbp_allow_forum_mods', (bool) get_option( '_bbp_allow_forum_mods', $default ) );
|
314 |
}
|
315 |
|
323 |
* @return bool Is forum-wide searching allowed?
|
324 |
*/
|
325 |
function bbp_allow_search( $default = 1 ) {
|
326 |
+
|
327 |
+
// Filter & return
|
328 |
return (bool) apply_filters( 'bbp_allow_search', (bool) get_option( '_bbp_allow_search', $default ) );
|
329 |
}
|
330 |
|
338 |
* @return bool Are threaded replies allowed?
|
339 |
*/
|
340 |
function bbp_allow_threaded_replies( $default = 0 ) {
|
341 |
+
|
342 |
+
// Filter & return
|
343 |
return (bool) apply_filters( '_bbp_allow_threaded_replies', (bool) get_option( '_bbp_allow_threaded_replies', $default ) );
|
344 |
}
|
345 |
|
355 |
* @return int Thread replies depth
|
356 |
*/
|
357 |
function bbp_thread_replies_depth( $default = 2 ) {
|
358 |
+
|
359 |
+
// Filter & return
|
360 |
return (int) apply_filters( 'bbp_thread_replies_depth', (int) get_option( '_bbp_thread_replies_depth', $default ) );
|
361 |
}
|
362 |
|
370 |
* @return bool Are revisions allowed?
|
371 |
*/
|
372 |
function bbp_allow_revisions( $default = 1 ) {
|
373 |
+
|
374 |
+
// Filter & return
|
375 |
return (bool) apply_filters( 'bbp_allow_revisions', (bool) get_option( '_bbp_allow_revisions', $default ) );
|
376 |
}
|
377 |
|
385 |
* @return bool Is anonymous posting allowed?
|
386 |
*/
|
387 |
function bbp_allow_anonymous( $default = 0 ) {
|
388 |
+
|
389 |
+
// Filter & return
|
390 |
return apply_filters( 'bbp_allow_anonymous', (bool) get_option( '_bbp_allow_anonymous', $default ) );
|
391 |
}
|
392 |
|
400 |
* @return bool Is global access allowed?
|
401 |
*/
|
402 |
function bbp_allow_global_access( $default = 1 ) {
|
403 |
+
|
404 |
+
// Filter & return
|
405 |
return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
|
406 |
}
|
407 |
|
415 |
* @return string The default forums user role
|
416 |
*/
|
417 |
function bbp_get_default_role( $default = 'bbp_participant' ) {
|
418 |
+
|
419 |
+
// Filter & return
|
420 |
return apply_filters( 'bbp_get_default_role', get_option( '_bbp_default_role', $default ) );
|
421 |
}
|
422 |
|
430 |
* @return bool Use WP editor?
|
431 |
*/
|
432 |
function bbp_use_wp_editor( $default = 1 ) {
|
433 |
+
|
434 |
+
// Filter & return
|
435 |
return (bool) apply_filters( 'bbp_use_wp_editor', (bool) get_option( '_bbp_use_wp_editor', $default ) );
|
436 |
}
|
437 |
|
445 |
* @return bool Use oEmbed?
|
446 |
*/
|
447 |
function bbp_use_autoembed( $default = 1 ) {
|
448 |
+
|
449 |
+
// Filter & return
|
450 |
return (bool) apply_filters( 'bbp_use_autoembed', (bool) get_option( '_bbp_use_autoembed', $default ) );
|
451 |
}
|
452 |
|
456 |
* @since 2.1.0 bbPress (r3829)
|
457 |
*
|
458 |
* @param $default string Optional. Default value 'default'
|
459 |
+
* @uses get_option() To get the theme-package option
|
460 |
+
* @return string ID of the theme-package
|
461 |
*/
|
462 |
function bbp_get_theme_package_id( $default = 'default' ) {
|
463 |
+
|
464 |
+
// Filter & return
|
465 |
return apply_filters( 'bbp_get_theme_package_id', get_option( '_bbp_theme_package_id', $default ) );
|
466 |
}
|
467 |
|
485 |
* @return int Is anonymous posting allowed?
|
486 |
*/
|
487 |
function bbp_get_title_max_length( $default = 80 ) {
|
488 |
+
|
489 |
+
// Filter & return
|
490 |
return (int) apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) );
|
491 |
}
|
492 |
|
493 |
/**
|
494 |
+
* Output the group forums root parent forum id
|
495 |
*
|
496 |
* @since 2.1.0 bbPress (r3575)
|
497 |
*
|
501 |
echo bbp_get_group_forums_root_id( $default );
|
502 |
}
|
503 |
/**
|
504 |
+
* Return the group forums root parent forum id
|
505 |
*
|
506 |
* @since 2.1.0 bbPress (r3575)
|
507 |
*
|
510 |
* @return int The post ID for the root forum
|
511 |
*/
|
512 |
function bbp_get_group_forums_root_id( $default = 0 ) {
|
513 |
+
|
514 |
+
// Filter & return
|
515 |
return (int) apply_filters( 'bbp_get_group_forums_root_id', (int) get_option( '_bbp_group_forums_root_id', $default ) );
|
516 |
}
|
517 |
|
525 |
* @return bool Is group forums enabled or not
|
526 |
*/
|
527 |
function bbp_is_group_forums_active( $default = 1 ) {
|
528 |
+
|
529 |
+
// Filter & return
|
530 |
return (bool) apply_filters( 'bbp_is_group_forums_active', (bool) get_option( '_bbp_enable_group_forums', $default ) );
|
531 |
}
|
532 |
|
540 |
* @return bool Is Akismet enabled or not
|
541 |
*/
|
542 |
function bbp_is_akismet_active( $default = 1 ) {
|
543 |
+
|
544 |
+
// Filter & return
|
545 |
return (bool) apply_filters( 'bbp_is_akismet_active', (bool) get_option( '_bbp_enable_akismet', $default ) );
|
546 |
}
|
547 |
|
548 |
/**
|
549 |
* Integrate settings into existing WordPress pages
|
550 |
*
|
551 |
+
* There are 3 possible modes:
|
552 |
+
* - 'basic' Traditional admin integration
|
553 |
+
* - 'compact' One "bbPress" top-level admin menu
|
554 |
+
* - 'deep' Deeply integrate with the WordPress admin interface
|
555 |
+
*
|
556 |
* @since 2.4.0 bbPress (r4932)
|
557 |
*
|
558 |
* @param $default bool Optional. Default value false
|
559 |
* @uses get_option() To get the admin integration setting
|
560 |
* @return bool To deeply integrate settings, or not
|
561 |
*/
|
562 |
+
function bbp_settings_integration( $default = 'basic' ) {
|
563 |
+
|
564 |
+
// Get the option value
|
565 |
+
$integration = get_option( '_bbp_settings_integration', $default );
|
566 |
+
|
567 |
+
// Back-compat for deep/basic (pre-2.6)
|
568 |
+
if ( is_numeric( $integration ) ) {
|
569 |
+
$integration = ( 1 === (int) $integration )
|
570 |
+
? 'deep'
|
571 |
+
: 'basic';
|
572 |
+
}
|
573 |
+
|
574 |
+
// Fallback to 'none' if invalid
|
575 |
+
if ( ! in_array( $integration, array( 'basic', 'deep', 'compact' ), true ) ) {
|
576 |
+
$integration = 'basic';
|
577 |
+
}
|
578 |
+
|
579 |
+
// Filter & return
|
580 |
+
return apply_filters( 'bbp_settings_integration', $integration, $default );
|
581 |
}
|
582 |
|
583 |
/** Slugs *********************************************************************/
|
590 |
* @return string
|
591 |
*/
|
592 |
function bbp_get_root_slug( $default = 'forums' ) {
|
593 |
+
|
594 |
+
// Filter & return
|
595 |
return apply_filters( 'bbp_get_root_slug', get_option( '_bbp_root_slug', $default ) );
|
596 |
}
|
597 |
|
603 |
* @return bool
|
604 |
*/
|
605 |
function bbp_include_root_slug( $default = 1 ) {
|
606 |
+
|
607 |
+
// Filter & return
|
608 |
return (bool) apply_filters( 'bbp_include_root_slug', (bool) get_option( '_bbp_include_root', $default ) );
|
609 |
}
|
610 |
|
616 |
* @return string
|
617 |
*/
|
618 |
function bbp_show_on_root( $default = 'forums' ) {
|
619 |
+
|
620 |
+
// Filter & return
|
621 |
return apply_filters( 'bbp_show_on_root', get_option( '_bbp_show_on_root', $default ) );
|
622 |
}
|
623 |
|
635 |
$retval = trailingslashit( bbp_get_root_slug() );
|
636 |
}
|
637 |
|
638 |
+
// Filter & return
|
639 |
return apply_filters( 'bbp_maybe_get_root_slug', $retval );
|
640 |
}
|
641 |
|
647 |
* @return string
|
648 |
*/
|
649 |
function bbp_get_forum_slug( $default = 'forum' ) {
|
650 |
+
|
651 |
+
// Filter & return
|
652 |
return apply_filters( 'bbp_get_forum_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_forum_slug', $default ) );
|
653 |
}
|
654 |
|
660 |
* @return string
|
661 |
*/
|
662 |
function bbp_get_topic_archive_slug( $default = 'topics' ) {
|
663 |
+
|
664 |
+
// Filter & return
|
665 |
return apply_filters( 'bbp_get_topic_archive_slug', get_option( '_bbp_topic_archive_slug', $default ) );
|
666 |
}
|
667 |
|
673 |
* @return string
|
674 |
*/
|
675 |
function bbp_get_reply_archive_slug( $default = 'replies' ) {
|
676 |
+
|
677 |
+
// Filter & return
|
678 |
return apply_filters( 'bbp_get_reply_archive_slug', get_option( '_bbp_reply_archive_slug', $default ) );
|
679 |
}
|
680 |
|
686 |
* @return string
|
687 |
*/
|
688 |
function bbp_get_topic_slug( $default = 'topic' ) {
|
689 |
+
|
690 |
+
// Filter & return
|
691 |
return apply_filters( 'bbp_get_topic_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_topic_slug', $default ) );
|
692 |
}
|
693 |
|
699 |
* @return string
|
700 |
*/
|
701 |
function bbp_get_topic_tag_tax_slug( $default = 'topic-tag' ) {
|
702 |
+
|
703 |
+
// Filter & return
|
704 |
return apply_filters( 'bbp_get_topic_tag_tax_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_topic_tag_slug', $default ) );
|
705 |
}
|
706 |
|
712 |
* @return string
|
713 |
*/
|
714 |
function bbp_get_reply_slug( $default = 'reply' ) {
|
715 |
+
|
716 |
+
// Filter & return
|
717 |
return apply_filters( 'bbp_get_reply_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_reply_slug', $default ) );
|
718 |
}
|
719 |
|
725 |
* @return string
|
726 |
*/
|
727 |
function bbp_get_user_slug( $default = 'users' ) {
|
728 |
+
|
729 |
+
// Filter & return
|
730 |
return apply_filters( 'bbp_get_user_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_user_slug', $default ) );
|
731 |
}
|
732 |
|
738 |
* @return string
|
739 |
*/
|
740 |
function bbp_get_user_favorites_slug( $default = 'favorites' ) {
|
741 |
+
|
742 |
+
// Filter & return
|
743 |
return apply_filters( 'bbp_get_user_favorites_slug', get_option( '_bbp_user_favs_slug', $default ) );
|
744 |
}
|
745 |
|
751 |
* @return string
|
752 |
*/
|
753 |
function bbp_get_user_subscriptions_slug( $default = 'subscriptions' ) {
|
754 |
+
|
755 |
+
// Filter & return
|
756 |
return apply_filters( 'bbp_get_user_subscriptions_slug', get_option( '_bbp_user_subs_slug', $default ) );
|
757 |
}
|
758 |
|
759 |
+
/**
|
760 |
+
* Return the single user engagements slug
|
761 |
+
*
|
762 |
+
* @since 2.6.0 bbPress (r6320)
|
763 |
+
*
|
764 |
+
* @return string
|
765 |
+
*/
|
766 |
+
function bbp_get_user_engagements_slug( $default = 'engagements' ) {
|
767 |
+
|
768 |
+
// Filter & return
|
769 |
+
return apply_filters( 'bbp_get_user_engagements_slug', get_option( '_bbp_user_engagements_slug', $default ) );
|
770 |
+
}
|
771 |
+
|
772 |
/**
|
773 |
* Return the topic view slug
|
774 |
*
|
777 |
* @return string
|
778 |
*/
|
779 |
function bbp_get_view_slug( $default = 'view' ) {
|
780 |
+
|
781 |
+
// Filter & return
|
782 |
return apply_filters( 'bbp_get_view_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_view_slug', $default ) );
|
783 |
}
|
784 |
|
790 |
* @return string
|
791 |
*/
|
792 |
function bbp_get_search_slug( $default = 'search' ) {
|
793 |
+
|
794 |
+
// Filter & return
|
795 |
return apply_filters( 'bbp_get_search_slug', bbp_maybe_get_root_slug() . get_option( '_bbp_search_slug', $default ) );
|
796 |
}
|
797 |
|
807 |
* @return string The location of the bb-config.php file, if any
|
808 |
*/
|
809 |
function bbp_get_config_location( $default = '' ) {
|
810 |
+
|
811 |
+
// Filter & return
|
812 |
return apply_filters( 'bbp_get_config_location', get_option( 'bb-config-location', $default ) );
|
813 |
}
|
includes/core/sub-actions.php
CHANGED
@@ -241,6 +241,17 @@ function bbp_register_shortcodes() {
|
|
241 |
do_action( 'bbp_register_shortcodes' );
|
242 |
}
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
/**
|
245 |
* Enqueue bbPress specific CSS and JS
|
246 |
*
|
@@ -456,6 +467,8 @@ function bbp_get_request() {
|
|
456 |
* @param string $domain
|
457 |
*/
|
458 |
function bbp_plugin_locale( $locale = '', $domain = '' ) {
|
|
|
|
|
459 |
return apply_filters( 'bbp_plugin_locale', $locale, $domain );
|
460 |
}
|
461 |
|
@@ -468,6 +481,8 @@ function bbp_plugin_locale( $locale = '', $domain = '' ) {
|
|
468 |
* @return array
|
469 |
*/
|
470 |
function bbp_request( $query_vars = array() ) {
|
|
|
|
|
471 |
return apply_filters( 'bbp_request', $query_vars );
|
472 |
}
|
473 |
|
@@ -482,6 +497,8 @@ function bbp_request( $query_vars = array() ) {
|
|
482 |
* @return string Template file to use
|
483 |
*/
|
484 |
function bbp_template_include( $template = '' ) {
|
|
|
|
|
485 |
return apply_filters( 'bbp_template_include', $template );
|
486 |
}
|
487 |
|
@@ -504,10 +521,15 @@ function bbp_generate_rewrite_rules( $wp_rewrite ) {
|
|
504 |
*
|
505 |
* @since 2.0.0 bbPress (r2944)
|
506 |
*
|
|
|
507 |
* @uses apply_filters() Calls 'bbp_allowed_themes' with the allowed themes list
|
|
|
|
|
508 |
*/
|
509 |
function bbp_allowed_themes( $themes ) {
|
510 |
-
|
|
|
|
|
511 |
}
|
512 |
|
513 |
/**
|
@@ -519,7 +541,11 @@ function bbp_allowed_themes( $themes ) {
|
|
519 |
* @param string $cap Capability name
|
520 |
* @param int $user_id User id
|
521 |
* @param array $args Arguments
|
|
|
|
|
522 |
*/
|
523 |
function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
|
524 |
-
|
|
|
|
|
525 |
}
|
241 |
do_action( 'bbp_register_shortcodes' );
|
242 |
}
|
243 |
|
244 |
+
/**
|
245 |
+
* Register the default bbPress meta-data
|
246 |
+
*
|
247 |
+
* @since 2.6.0 bbPress (r46300)
|
248 |
+
*
|
249 |
+
* @uses do_action() Calls 'bbp_register_meta'
|
250 |
+
*/
|
251 |
+
function bbp_register_meta() {
|
252 |
+
do_action( 'bbp_register_meta' );
|
253 |
+
}
|
254 |
+
|
255 |
/**
|
256 |
* Enqueue bbPress specific CSS and JS
|
257 |
*
|
467 |
* @param string $domain
|
468 |
*/
|
469 |
function bbp_plugin_locale( $locale = '', $domain = '' ) {
|
470 |
+
|
471 |
+
// Filter & return
|
472 |
return apply_filters( 'bbp_plugin_locale', $locale, $domain );
|
473 |
}
|
474 |
|
481 |
* @return array
|
482 |
*/
|
483 |
function bbp_request( $query_vars = array() ) {
|
484 |
+
|
485 |
+
// Filter & return
|
486 |
return apply_filters( 'bbp_request', $query_vars );
|
487 |
}
|
488 |
|
497 |
* @return string Template file to use
|
498 |
*/
|
499 |
function bbp_template_include( $template = '' ) {
|
500 |
+
|
501 |
+
// Filter & return
|
502 |
return apply_filters( 'bbp_template_include', $template );
|
503 |
}
|
504 |
|
521 |
*
|
522 |
* @since 2.0.0 bbPress (r2944)
|
523 |
*
|
524 |
+
* @param array $themes
|
525 |
* @uses apply_filters() Calls 'bbp_allowed_themes' with the allowed themes list
|
526 |
+
*
|
527 |
+
* @return array Array of allowed themes
|
528 |
*/
|
529 |
function bbp_allowed_themes( $themes ) {
|
530 |
+
|
531 |
+
// Filter & return
|
532 |
+
return (array) apply_filters( 'bbp_allowed_themes', $themes );
|
533 |
}
|
534 |
|
535 |
/**
|
541 |
* @param string $cap Capability name
|
542 |
* @param int $user_id User id
|
543 |
* @param array $args Arguments
|
544 |
+
*
|
545 |
+
* @return array Array of capabilities
|
546 |
*/
|
547 |
function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
|
548 |
+
|
549 |
+
// Filter & return
|
550 |
+
return (array) apply_filters( 'bbp_map_meta_caps', $caps, $cap, $user_id, $args );
|
551 |
}
|
includes/core/template-functions.php
CHANGED
@@ -352,6 +352,7 @@ function bbp_get_template_stack() {
|
|
352 |
// Remove empties and duplicates
|
353 |
$stack = array_unique( array_filter( $stack ) );
|
354 |
|
|
|
355 |
return (array) apply_filters( 'bbp_get_template_stack', $stack ) ;
|
356 |
}
|
357 |
|
@@ -411,6 +412,7 @@ function bbp_get_query_template( $type, $templates = array() ) {
|
|
411 |
$template = bbp_locate_template( $templates );
|
412 |
$template = bbp_set_theme_compat_template( $template );
|
413 |
|
|
|
414 |
return apply_filters( "bbp_{$type}_template", $template );
|
415 |
}
|
416 |
|
@@ -428,6 +430,8 @@ function bbp_get_template_locations( $templates = array() ) {
|
|
428 |
'forums',
|
429 |
''
|
430 |
);
|
|
|
|
|
431 |
return apply_filters( 'bbp_get_template_locations', $locations, $templates );
|
432 |
}
|
433 |
|
@@ -452,6 +456,7 @@ function bbp_add_template_stack_locations( $stacks = array() ) {
|
|
452 |
}
|
453 |
}
|
454 |
|
|
|
455 |
return apply_filters( 'bbp_add_template_stack_locations', array_unique( $retval ), $stacks );
|
456 |
}
|
457 |
|
@@ -536,10 +541,11 @@ function bbp_parse_query( $posts_query ) {
|
|
536 |
|
537 |
/** User Exists *******************************************************/
|
538 |
|
539 |
-
$is_favs
|
540 |
-
$is_subs
|
541 |
-
$is_topics
|
542 |
-
$is_replies
|
|
|
543 |
|
544 |
// View or edit?
|
545 |
if ( ! empty( $is_edit ) ) {
|
@@ -581,6 +587,10 @@ function bbp_parse_query( $posts_query ) {
|
|
581 |
} elseif ( ! empty( $is_replies ) ) {
|
582 |
$posts_query->bbp_is_single_user_replies = true;
|
583 |
|
|
|
|
|
|
|
|
|
584 |
// User profile
|
585 |
} else {
|
586 |
$posts_query->bbp_is_single_user_profile = true;
|
352 |
// Remove empties and duplicates
|
353 |
$stack = array_unique( array_filter( $stack ) );
|
354 |
|
355 |
+
// Filter & return
|
356 |
return (array) apply_filters( 'bbp_get_template_stack', $stack ) ;
|
357 |
}
|
358 |
|
412 |
$template = bbp_locate_template( $templates );
|
413 |
$template = bbp_set_theme_compat_template( $template );
|
414 |
|
415 |
+
// Filter & return
|
416 |
return apply_filters( "bbp_{$type}_template", $template );
|
417 |
}
|
418 |
|
430 |
'forums',
|
431 |
''
|
432 |
);
|
433 |
+
|
434 |
+
// Filter & return
|
435 |
return apply_filters( 'bbp_get_template_locations', $locations, $templates );
|
436 |
}
|
437 |
|
456 |
}
|
457 |
}
|
458 |
|
459 |
+
// Filter & return
|
460 |
return apply_filters( 'bbp_add_template_stack_locations', array_unique( $retval ), $stacks );
|
461 |
}
|
462 |
|
541 |
|
542 |
/** User Exists *******************************************************/
|
543 |
|
544 |
+
$is_favs = $posts_query->get( bbp_get_user_favorites_rewrite_id() );
|
545 |
+
$is_subs = $posts_query->get( bbp_get_user_subscriptions_rewrite_id() );
|
546 |
+
$is_topics = $posts_query->get( bbp_get_user_topics_rewrite_id() );
|
547 |
+
$is_replies = $posts_query->get( bbp_get_user_replies_rewrite_id() );
|
548 |
+
$is_engagements = $posts_query->get( bbp_get_user_engagements_rewrite_id() );
|
549 |
|
550 |
// View or edit?
|
551 |
if ( ! empty( $is_edit ) ) {
|
587 |
} elseif ( ! empty( $is_replies ) ) {
|
588 |
$posts_query->bbp_is_single_user_replies = true;
|
589 |
|
590 |
+
// User engagements
|
591 |
+
} elseif ( ! empty( $is_engagements ) ) {
|
592 |
+
$posts_query->bbp_is_single_user_engagements = true;
|
593 |
+
|
594 |
// User profile
|
595 |
} else {
|
596 |
$posts_query->bbp_is_single_user_profile = true;
|
includes/core/template-loader.php
CHANGED
@@ -109,11 +109,12 @@ function bbp_template_include_theme_supports( $template = '' ) {
|
|
109 |
endif;
|
110 |
|
111 |
// A bbPress template file was located, so override the WordPress template
|
112 |
-
// and use it to switch off
|
113 |
if ( ! empty( $new_template ) ) {
|
114 |
$template = bbp_set_template_included( $new_template );
|
115 |
}
|
116 |
|
|
|
117 |
return apply_filters( 'bbp_template_include_theme_supports', $template );
|
118 |
}
|
119 |
|
109 |
endif;
|
110 |
|
111 |
// A bbPress template file was located, so override the WordPress template
|
112 |
+
// and use it to switch off theme compatibility.
|
113 |
if ( ! empty( $new_template ) ) {
|
114 |
$template = bbp_set_template_included( $new_template );
|
115 |
}
|
116 |
|
117 |
+
// Filter & return
|
118 |
return apply_filters( 'bbp_template_include_theme_supports', $template );
|
119 |
}
|
120 |
|
includes/core/theme-compat.php
CHANGED
@@ -56,7 +56,7 @@ class BBP_Theme_Compat {
|
|
56 |
*
|
57 |
* @param array $properties
|
58 |
*/
|
59 |
-
|
60 |
$this->_data = $properties;
|
61 |
}
|
62 |
|
@@ -125,6 +125,8 @@ function bbp_setup_theme_compat( $theme = '' ) {
|
|
125 |
* @return string
|
126 |
*/
|
127 |
function bbp_get_theme_compat_id() {
|
|
|
|
|
128 |
return apply_filters( 'bbp_get_theme_compat_id', bbpress()->theme_compat->theme->id );
|
129 |
}
|
130 |
|
@@ -140,11 +142,13 @@ function bbp_get_theme_compat_id() {
|
|
140 |
* @return string
|
141 |
*/
|
142 |
function bbp_get_theme_compat_name() {
|
|
|
|
|
143 |
return apply_filters( 'bbp_get_theme_compat_name', bbpress()->theme_compat->theme->name );
|
144 |
}
|
145 |
|
146 |
/**
|
147 |
-
* Gets the version of the bbPress
|
148 |
* currently active WordPress theme does not explicitly support bbPress.
|
149 |
* This can be filtered or set manually. Tricky theme authors can override the
|
150 |
* default and include their own bbPress compatibility layers for their themes.
|
@@ -155,11 +159,13 @@ function bbp_get_theme_compat_name() {
|
|
155 |
* @return string
|
156 |
*/
|
157 |
function bbp_get_theme_compat_version() {
|
|
|
|
|
158 |
return apply_filters( 'bbp_get_theme_compat_version', bbpress()->theme_compat->theme->version );
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
-
* Gets the bbPress
|
163 |
* WordPress theme does not explicitly support bbPress. This can be filtered,
|
164 |
* or set manually. Tricky theme authors can override the default and include
|
165 |
* their own bbPress compatibility layers for their themes.
|
@@ -170,6 +176,8 @@ function bbp_get_theme_compat_version() {
|
|
170 |
* @return string
|
171 |
*/
|
172 |
function bbp_get_theme_compat_dir() {
|
|
|
|
|
173 |
return apply_filters( 'bbp_get_theme_compat_dir', bbpress()->theme_compat->theme->dir );
|
174 |
}
|
175 |
|
@@ -185,6 +193,8 @@ function bbp_get_theme_compat_dir() {
|
|
185 |
* @return string
|
186 |
*/
|
187 |
function bbp_get_theme_compat_url() {
|
|
|
|
|
188 |
return apply_filters( 'bbp_get_theme_compat_url', bbpress()->theme_compat->theme->url );
|
189 |
}
|
190 |
|
@@ -458,7 +468,7 @@ function bbp_theme_compat_reset_post( $args = array() ) {
|
|
458 |
* @uses bbp_set_theme_compat_template() To set the global theme compat template
|
459 |
*/
|
460 |
function bbp_template_include_theme_compat( $template = '' ) {
|
461 |
-
|
462 |
/**
|
463 |
* Bail if a root template was already found. This prevents unintended
|
464 |
* recursive filtering of 'the_content'.
|
@@ -502,7 +512,6 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
502 |
'post_type' => '',
|
503 |
'post_title' => bbp_get_displayed_user_field( 'display_name' ),
|
504 |
'post_status' => bbp_get_public_status_id(),
|
505 |
-
'is_single' => true,
|
506 |
'is_archive' => false,
|
507 |
'comment_status' => 'closed'
|
508 |
) );
|
@@ -578,6 +587,9 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
578 |
'comment_status' => 'closed'
|
579 |
) );
|
580 |
|
|
|
|
|
|
|
581 |
} elseif ( bbp_is_single_forum() ) {
|
582 |
|
583 |
// Reset post
|
@@ -647,6 +659,9 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
647 |
} elseif ( bbp_is_topic_edit() ) {
|
648 |
$new_content = $bbp_shortcodes->display_topic_form();
|
649 |
|
|
|
|
|
|
|
650 |
// Single
|
651 |
} else {
|
652 |
$new_content = $bbp_shortcodes->display_topic( array( 'id' => bbp_get_topic_id() ) );
|
@@ -679,6 +694,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
679 |
'post_content' => $bbp_shortcodes->display_reply_index(),
|
680 |
'post_type' => bbp_get_reply_post_type(),
|
681 |
'post_status' => bbp_get_public_status_id(),
|
|
|
682 |
'comment_status' => 'closed'
|
683 |
) );
|
684 |
|
@@ -693,6 +709,9 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
693 |
} elseif ( bbp_is_reply_edit() ) {
|
694 |
$new_content = $bbp_shortcodes->display_reply_form();
|
695 |
|
|
|
|
|
|
|
696 |
// Single
|
697 |
} else {
|
698 |
$new_content = $bbp_shortcodes->display_reply( array( 'id' => get_the_ID() ) );
|
@@ -707,6 +726,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
707 |
'post_content' => $new_content,
|
708 |
'post_type' => bbp_get_reply_post_type(),
|
709 |
'post_status' => bbp_get_reply_status(),
|
|
|
710 |
'comment_status' => 'closed'
|
711 |
) );
|
712 |
|
@@ -723,6 +743,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
723 |
'post_content' => $bbp_shortcodes->display_view( array( 'id' => get_query_var( bbp_get_view_rewrite_id() ) ) ),
|
724 |
'post_type' => '',
|
725 |
'post_status' => bbp_get_public_status_id(),
|
|
|
726 |
'comment_status' => 'closed'
|
727 |
) );
|
728 |
|
@@ -739,6 +760,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
739 |
'post_content' => $bbp_shortcodes->display_search( array( 'search' => get_query_var( bbp_get_search_rewrite_id() ) ) ),
|
740 |
'post_type' => '',
|
741 |
'post_status' => bbp_get_public_status_id(),
|
|
|
742 |
'comment_status' => 'closed'
|
743 |
) );
|
744 |
|
@@ -768,8 +790,9 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
768 |
'post_type' => '',
|
769 |
'post_title' => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ),
|
770 |
'post_status' => bbp_get_public_status_id(),
|
771 |
-
'
|
772 |
-
'
|
|
|
773 |
) );
|
774 |
}
|
775 |
|
@@ -788,7 +811,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
788 |
return $template;
|
789 |
|
790 |
/**
|
791 |
-
* If we are relying on
|
792 |
* the proper content, we need to intercept the_content, replace the
|
793 |
* output, and display ours instead.
|
794 |
*
|
@@ -810,6 +833,7 @@ function bbp_template_include_theme_compat( $template = '' ) {
|
|
810 |
$template = bbp_get_theme_compat_templates();
|
811 |
}
|
812 |
|
|
|
813 |
return apply_filters( 'bbp_template_include_theme_compat', $template );
|
814 |
}
|
815 |
|
@@ -993,7 +1017,7 @@ function bbp_force_comment_status( $open, $post_id = 0 ) {
|
|
993 |
$post_type = get_post_type( $post_id );
|
994 |
|
995 |
// Default return value is what is passed in $open
|
996 |
-
$retval = $open;
|
997 |
|
998 |
// Only force for bbPress post types
|
999 |
switch ( $post_type ) {
|
@@ -1004,6 +1028,6 @@ function bbp_force_comment_status( $open, $post_id = 0 ) {
|
|
1004 |
break;
|
1005 |
}
|
1006 |
|
1007 |
-
//
|
1008 |
-
return apply_filters( 'bbp_force_comment_status', $retval, $open, $post_id, $post_type );
|
1009 |
}
|
56 |
*
|
57 |
* @param array $properties
|
58 |
*/
|
59 |
+
public function __construct( Array $properties = array() ) {
|
60 |
$this->_data = $properties;
|
61 |
}
|
62 |
|
125 |
* @return string
|
126 |
*/
|
127 |
function bbp_get_theme_compat_id() {
|
128 |
+
|
129 |
+
// Filter & return
|
130 |
return apply_filters( 'bbp_get_theme_compat_id', bbpress()->theme_compat->theme->id );
|
131 |
}
|
132 |
|
142 |
* @return string
|
143 |
*/
|
144 |
function bbp_get_theme_compat_name() {
|
145 |
+
|
146 |
+
// Filter & return
|
147 |
return apply_filters( 'bbp_get_theme_compat_name', bbpress()->theme_compat->theme->name );
|
148 |
}
|
149 |
|
150 |
/**
|
151 |
+
* Gets the version of the bbPress compatible theme used, in the event the
|
152 |
* currently active WordPress theme does not explicitly support bbPress.
|
153 |
* This can be filtered or set manually. Tricky theme authors can override the
|
154 |
* default and include their own bbPress compatibility layers for their themes.
|
159 |
* @return string
|
160 |
*/
|
161 |
function bbp_get_theme_compat_version() {
|
162 |
+
|
163 |
+
// Filter & return
|
164 |
return apply_filters( 'bbp_get_theme_compat_version', bbpress()->theme_compat->theme->version );
|
165 |
}
|
166 |
|
167 |
/**
|
168 |
+
* Gets the bbPress compatible theme used in the event the currently active
|
169 |
* WordPress theme does not explicitly support bbPress. This can be filtered,
|
170 |
* or set manually. Tricky theme authors can override the default and include
|
171 |
* their own bbPress compatibility layers for their themes.
|
176 |
* @return string
|
177 |
*/
|
178 |
function bbp_get_theme_compat_dir() {
|
179 |
+
|
180 |
+
// Filter & return
|
181 |
return apply_filters( 'bbp_get_theme_compat_dir', bbpress()->theme_compat->theme->dir );
|
182 |
}
|
183 |
|
193 |
* @return string
|
194 |
*/
|
195 |
function bbp_get_theme_compat_url() {
|
196 |
+
|
197 |
+
// Filter & return
|
198 |
return apply_filters( 'bbp_get_theme_compat_url', bbpress()->theme_compat->theme->url );
|
199 |
}
|
200 |
|
468 |
* @uses bbp_set_theme_compat_template() To set the global theme compat template
|
469 |
*/
|
470 |
function bbp_template_include_theme_compat( $template = '' ) {
|
471 |
+
|
472 |
/**
|
473 |
* Bail if a root template was already found. This prevents unintended
|
474 |
* recursive filtering of 'the_content'.
|
512 |
'post_type' => '',
|
513 |
'post_title' => bbp_get_displayed_user_field( 'display_name' ),
|
514 |
'post_status' => bbp_get_public_status_id(),
|
|
|
515 |
'is_archive' => false,
|
516 |
'comment_status' => 'closed'
|
517 |
) );
|
587 |
'comment_status' => 'closed'
|
588 |
) );
|
589 |
|
590 |
+
// Lock the forum from other edits
|
591 |
+
bbp_set_post_lock( bbp_get_forum_id() );
|
592 |
+
|
593 |
} elseif ( bbp_is_single_forum() ) {
|
594 |
|
595 |
// Reset post
|
659 |
} elseif ( bbp_is_topic_edit() ) {
|
660 |
$new_content = $bbp_shortcodes->display_topic_form();
|
661 |
|
662 |
+
// Lock the topic from other edits
|
663 |
+
bbp_set_post_lock( bbp_get_topic_id() );
|
664 |
+
|
665 |
// Single
|
666 |
} else {
|
667 |
$new_content = $bbp_shortcodes->display_topic( array( 'id' => bbp_get_topic_id() ) );
|
694 |
'post_content' => $bbp_shortcodes->display_reply_index(),
|
695 |
'post_type' => bbp_get_reply_post_type(),
|
696 |
'post_status' => bbp_get_public_status_id(),
|
697 |
+
'is_archive' => true,
|
698 |
'comment_status' => 'closed'
|
699 |
) );
|
700 |
|
709 |
} elseif ( bbp_is_reply_edit() ) {
|
710 |
$new_content = $bbp_shortcodes->display_reply_form();
|
711 |
|
712 |
+
// Lock the reply from other edits
|
713 |
+
bbp_set_post_lock( bbp_get_reply_id() );
|
714 |
+
|
715 |
// Single
|
716 |
} else {
|
717 |
$new_content = $bbp_shortcodes->display_reply( array( 'id' => get_the_ID() ) );
|
726 |
'post_content' => $new_content,
|
727 |
'post_type' => bbp_get_reply_post_type(),
|
728 |
'post_status' => bbp_get_reply_status(),
|
729 |
+
'is_single' => true,
|
730 |
'comment_status' => 'closed'
|
731 |
) );
|
732 |
|
743 |
'post_content' => $bbp_shortcodes->display_view( array( 'id' => get_query_var( bbp_get_view_rewrite_id() ) ) ),
|
744 |
'post_type' => '',
|
745 |
'post_status' => bbp_get_public_status_id(),
|
746 |
+
'is_archive' => true,
|
747 |
'comment_status' => 'closed'
|
748 |
) );
|
749 |
|
760 |
'post_content' => $bbp_shortcodes->display_search( array( 'search' => get_query_var( bbp_get_search_rewrite_id() ) ) ),
|
761 |
'post_type' => '',
|
762 |
'post_status' => bbp_get_public_status_id(),
|
763 |
+
'is_archive' => true,
|
764 |
'comment_status' => 'closed'
|
765 |
) );
|
766 |
|
790 |
'post_type' => '',
|
791 |
'post_title' => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ),
|
792 |
'post_status' => bbp_get_public_status_id(),
|
793 |
+
'is_tax' => true,
|
794 |
+
'is_archive' => true,
|
795 |
+
'comment_status' => 'closed'
|
796 |
) );
|
797 |
}
|
798 |
|
811 |
return $template;
|
812 |
|
813 |
/**
|
814 |
+
* If we are relying on the built-in theme compatibility API to load
|
815 |
* the proper content, we need to intercept the_content, replace the
|
816 |
* output, and display ours instead.
|
817 |
*
|
833 |
$template = bbp_get_theme_compat_templates();
|
834 |
}
|
835 |
|
836 |
+
// Filter & return
|
837 |
return apply_filters( 'bbp_template_include_theme_compat', $template );
|
838 |
}
|
839 |
|
1017 |
$post_type = get_post_type( $post_id );
|
1018 |
|
1019 |
// Default return value is what is passed in $open
|
1020 |
+
$retval = (bool) $open;
|
1021 |
|
1022 |
// Only force for bbPress post types
|
1023 |
switch ( $post_type ) {
|
1028 |
break;
|
1029 |
}
|
1030 |
|
1031 |
+
// Filter & return
|
1032 |
+
return (bool) apply_filters( 'bbp_force_comment_status', $retval, $open, $post_id, $post_type );
|
1033 |
}
|
includes/core/update.php
CHANGED
@@ -16,7 +16,7 @@ defined( 'ABSPATH' ) || exit;
|
|
16 |
* @since 2.1.0 bbPress (r3764)
|
17 |
*
|
18 |
* @uses get_option()
|
19 |
-
* @uses bbp_get_db_version() To get
|
20 |
* @return bool True if update, False if not
|
21 |
*/
|
22 |
function bbp_is_install() {
|
@@ -29,7 +29,7 @@ function bbp_is_install() {
|
|
29 |
* @since 2.0.0 bbPress (r3421)
|
30 |
*
|
31 |
* @uses get_option()
|
32 |
-
* @uses bbp_get_db_version() To get
|
33 |
* @return bool True if update, False if not
|
34 |
*/
|
35 |
function bbp_is_update() {
|
@@ -67,7 +67,7 @@ function bbp_is_activation( $basename = '' ) {
|
|
67 |
}
|
68 |
|
69 |
// Bail if not activating
|
70 |
-
if ( empty( $action ) || ! in_array( $action, array( 'activate', 'activate-selected' ) ) ) {
|
71 |
return false;
|
72 |
}
|
73 |
|
@@ -89,7 +89,7 @@ function bbp_is_activation( $basename = '' ) {
|
|
89 |
}
|
90 |
|
91 |
// Is bbPress being activated?
|
92 |
-
return in_array( $basename, $plugins );
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -117,7 +117,7 @@ function bbp_is_deactivation( $basename = '' ) {
|
|
117 |
}
|
118 |
|
119 |
// Bail if not deactivating
|
120 |
-
if ( empty( $action ) || ! in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) ) {
|
121 |
return false;
|
122 |
}
|
123 |
|
@@ -139,7 +139,7 @@ function bbp_is_deactivation( $basename = '' ) {
|
|
139 |
}
|
140 |
|
141 |
// Is bbPress being deactivated?
|
142 |
-
return in_array( $basename, $plugins );
|
143 |
}
|
144 |
|
145 |
/**
|
@@ -148,7 +148,7 @@ function bbp_is_deactivation( $basename = '' ) {
|
|
148 |
* @since 2.0.0 bbPress (r3421)
|
149 |
*
|
150 |
* @uses update_option()
|
151 |
-
* @uses bbp_get_db_version() To get
|
152 |
*/
|
153 |
function bbp_version_bump() {
|
154 |
update_option( '_bbp_db_version', bbp_get_db_version() );
|
@@ -159,9 +159,8 @@ function bbp_version_bump() {
|
|
159 |
*
|
160 |
* @since 2.0.0 bbPress (r3419)
|
161 |
*
|
|
|
162 |
* @uses bbp_version_updater()
|
163 |
-
* @uses bbp_version_bump()
|
164 |
-
* @uses flush_rewrite_rules()
|
165 |
*/
|
166 |
function bbp_setup_updater() {
|
167 |
|
@@ -183,25 +182,34 @@ function bbp_setup_updater() {
|
|
183 |
*/
|
184 |
function bbp_create_initial_content( $args = array() ) {
|
185 |
|
|
|
|
|
|
|
186 |
// Parse arguments against default values
|
187 |
$r = bbp_parse_args( $args, array(
|
|
|
188 |
'forum_parent' => 0,
|
189 |
'forum_status' => 'publish',
|
190 |
-
'forum_title' => __( 'General',
|
191 |
-
'forum_content' => __( 'General chit-chat',
|
|
|
|
|
192 |
'topic_title' => __( 'Hello World!', 'bbpress' ),
|
193 |
'topic_content' => __( 'I am the first topic in your new forums.', 'bbpress' ),
|
|
|
|
|
194 |
'reply_content' => __( 'Oh, and this is what a reply looks like.', 'bbpress' ),
|
195 |
), 'create_initial_content' );
|
196 |
|
197 |
// Use the same time for each post
|
198 |
$current_time = time();
|
199 |
-
$forum_time
|
200 |
-
$topic_time
|
201 |
-
$reply_time
|
202 |
|
203 |
// Create the initial forum
|
204 |
$forum_id = bbp_insert_forum( array(
|
|
|
205 |
'post_parent' => $r['forum_parent'],
|
206 |
'post_status' => $r['forum_status'],
|
207 |
'post_title' => $r['forum_title'],
|
@@ -212,10 +220,11 @@ function bbp_create_initial_content( $args = array() ) {
|
|
212 |
// Create the initial topic
|
213 |
$topic_id = bbp_insert_topic(
|
214 |
array(
|
|
|
215 |
'post_parent' => $forum_id,
|
216 |
'post_title' => $r['topic_title'],
|
217 |
'post_content' => $r['topic_content'],
|
218 |
-
'post_date' => $topic_time
|
219 |
),
|
220 |
array(
|
221 |
'forum_id' => $forum_id
|
@@ -225,6 +234,7 @@ function bbp_create_initial_content( $args = array() ) {
|
|
225 |
// Create the initial reply
|
226 |
$reply_id = bbp_insert_reply(
|
227 |
array(
|
|
|
228 |
'post_parent' => $topic_id,
|
229 |
'post_content' => $r['reply_content'],
|
230 |
'post_date' => $reply_time
|
@@ -243,7 +253,7 @@ function bbp_create_initial_content( $args = array() ) {
|
|
243 |
}
|
244 |
|
245 |
/**
|
246 |
-
*
|
247 |
* runs whatever other code is needed.
|
248 |
*
|
249 |
* This is most-often used when the data schema changes, but should also be used
|
@@ -315,14 +325,16 @@ function bbp_version_updater() {
|
|
315 |
/** 2.6 Branch ********************************************************/
|
316 |
|
317 |
// 2.6.x
|
318 |
-
if ( $raw_db_version <
|
319 |
|
320 |
/**
|
321 |
-
* Upgrade user favorites and
|
322 |
*
|
323 |
* @link https://bbpress.trac.wordpress.org/ticket/2959
|
|
|
324 |
*/
|
325 |
if ( ! bbp_is_large_install() ) {
|
|
|
326 |
bbp_admin_upgrade_user_favorites();
|
327 |
bbp_admin_upgrade_user_topic_subscriptions();
|
328 |
bbp_admin_upgrade_user_forum_subscriptions();
|
@@ -340,7 +352,7 @@ function bbp_version_updater() {
|
|
340 |
}
|
341 |
|
342 |
/**
|
343 |
-
* Redirect user to
|
344 |
*
|
345 |
* @since 2.2.0 bbPress (r4389)
|
346 |
*
|
@@ -359,7 +371,7 @@ function bbp_add_activation_redirect() {
|
|
359 |
}
|
360 |
|
361 |
// Add the transient to redirect
|
362 |
-
|
363 |
}
|
364 |
|
365 |
/**
|
16 |
* @since 2.1.0 bbPress (r3764)
|
17 |
*
|
18 |
* @uses get_option()
|
19 |
+
* @uses bbp_get_db_version() To get the database version
|
20 |
* @return bool True if update, False if not
|
21 |
*/
|
22 |
function bbp_is_install() {
|
29 |
* @since 2.0.0 bbPress (r3421)
|
30 |
*
|
31 |
* @uses get_option()
|
32 |
+
* @uses bbp_get_db_version() To get the database version
|
33 |
* @return bool True if update, False if not
|
34 |
*/
|
35 |
function bbp_is_update() {
|
67 |
}
|
68 |
|
69 |
// Bail if not activating
|
70 |
+
if ( empty( $action ) || ! in_array( $action, array( 'activate', 'activate-selected', true ) ) ) {
|
71 |
return false;
|
72 |
}
|
73 |
|
89 |
}
|
90 |
|
91 |
// Is bbPress being activated?
|
92 |
+
return in_array( $basename, $plugins, true );
|
93 |
}
|
94 |
|
95 |
/**
|
117 |
}
|
118 |
|
119 |
// Bail if not deactivating
|
120 |
+
if ( empty( $action ) || ! in_array( $action, array( 'deactivate', 'deactivate-selected' ), true ) ) {
|
121 |
return false;
|
122 |
}
|
123 |
|
139 |
}
|
140 |
|
141 |
// Is bbPress being deactivated?
|
142 |
+
return in_array( $basename, $plugins, true );
|
143 |
}
|
144 |
|
145 |
/**
|
148 |
* @since 2.0.0 bbPress (r3421)
|
149 |
*
|
150 |
* @uses update_option()
|
151 |
+
* @uses bbp_get_db_version() To get the database version
|
152 |
*/
|
153 |
function bbp_version_bump() {
|
154 |
update_option( '_bbp_db_version', bbp_get_db_version() );
|
159 |
*
|
160 |
* @since 2.0.0 bbPress (r3419)
|
161 |
*
|
162 |
+
* @uses bbp_is_update()
|
163 |
* @uses bbp_version_updater()
|
|
|
|
|
164 |
*/
|
165 |
function bbp_setup_updater() {
|
166 |
|
182 |
*/
|
183 |
function bbp_create_initial_content( $args = array() ) {
|
184 |
|
185 |
+
// Current user ID
|
186 |
+
$user_id = bbp_get_current_user_id();
|
187 |
+
|
188 |
// Parse arguments against default values
|
189 |
$r = bbp_parse_args( $args, array(
|
190 |
+
'forum_author' => $user_id,
|
191 |
'forum_parent' => 0,
|
192 |
'forum_status' => 'publish',
|
193 |
+
'forum_title' => __( 'General', 'bbpress' ),
|
194 |
+
'forum_content' => __( 'General chit-chat', 'bbpress' ),
|
195 |
+
|
196 |
+
'topic_author' => $user_id,
|
197 |
'topic_title' => __( 'Hello World!', 'bbpress' ),
|
198 |
'topic_content' => __( 'I am the first topic in your new forums.', 'bbpress' ),
|
199 |
+
|
200 |
+
'reply_author' => $user_id,
|
201 |
'reply_content' => __( 'Oh, and this is what a reply looks like.', 'bbpress' ),
|
202 |
), 'create_initial_content' );
|
203 |
|
204 |
// Use the same time for each post
|
205 |
$current_time = time();
|
206 |
+
$forum_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 80 );
|
207 |
+
$topic_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 60 );
|
208 |
+
$reply_time = date( 'Y-m-d H:i:s', $current_time - 60 * 60 * 40 );
|
209 |
|
210 |
// Create the initial forum
|
211 |
$forum_id = bbp_insert_forum( array(
|
212 |
+
'post_author' => $r['forum_author'],
|
213 |
'post_parent' => $r['forum_parent'],
|
214 |
'post_status' => $r['forum_status'],
|
215 |
'post_title' => $r['forum_title'],
|
220 |
// Create the initial topic
|
221 |
$topic_id = bbp_insert_topic(
|
222 |
array(
|
223 |
+
'post_author' => $r['topic_author'],
|
224 |
'post_parent' => $forum_id,
|
225 |
'post_title' => $r['topic_title'],
|
226 |
'post_content' => $r['topic_content'],
|
227 |
+
'post_date' => $topic_time,
|
228 |
),
|
229 |
array(
|
230 |
'forum_id' => $forum_id
|
234 |
// Create the initial reply
|
235 |
$reply_id = bbp_insert_reply(
|
236 |
array(
|
237 |
+
'post_author' => $r['reply_author'],
|
238 |
'post_parent' => $topic_id,
|
239 |
'post_content' => $r['reply_content'],
|
240 |
'post_date' => $reply_time
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
+
* The version updater looks at what the current database version is, and
|
257 |
* runs whatever other code is needed.
|
258 |
*
|
259 |
* This is most-often used when the data schema changes, but should also be used
|
325 |
/** 2.6 Branch ********************************************************/
|
326 |
|
327 |
// 2.6.x
|
328 |
+
if ( $raw_db_version < 261 ) {
|
329 |
|
330 |
/**
|
331 |
+
* Upgrade user favorites, subscriptions, and engagements
|
332 |
*
|
333 |
* @link https://bbpress.trac.wordpress.org/ticket/2959
|
334 |
+
* @link https://bbpress.trac.wordpress.org/ticket/3068
|
335 |
*/
|
336 |
if ( ! bbp_is_large_install() ) {
|
337 |
+
bbp_admin_upgrade_user_engagements();
|
338 |
bbp_admin_upgrade_user_favorites();
|
339 |
bbp_admin_upgrade_user_topic_subscriptions();
|
340 |
bbp_admin_upgrade_user_forum_subscriptions();
|
352 |
}
|
353 |
|
354 |
/**
|
355 |
+
* Redirect user to the "What's New" page on activation
|
356 |
*
|
357 |
* @since 2.2.0 bbPress (r4389)
|
358 |
*
|
371 |
}
|
372 |
|
373 |
// Add the transient to redirect
|
374 |
+
set_transient( '_bbp_activation_redirect', true, 30 );
|
375 |
}
|
376 |
|
377 |
/**
|
includes/extend/akismet.php
CHANGED
@@ -440,7 +440,7 @@ class BBP_Akismet {
|
|
440 |
foreach ( $_SERVER as $key => $value ) {
|
441 |
|
442 |
// Key should not be ignored
|
443 |
-
if ( ! in_array( $key, $ignore ) && is_string( $value ) ) {
|
444 |
$post_data[ $key ] = $value;
|
445 |
|
446 |
// Key should be ignored
|
@@ -758,7 +758,7 @@ class BBP_Akismet {
|
|
758 |
/** Admin *****************************************************************/
|
759 |
|
760 |
/**
|
761 |
-
* Add Aksimet History
|
762 |
*
|
763 |
* @since 2.4.0 bbPress (r5049)
|
764 |
*/
|
@@ -786,7 +786,7 @@ class BBP_Akismet {
|
|
786 |
}
|
787 |
|
788 |
/**
|
789 |
-
* Output for Akismet History
|
790 |
*
|
791 |
* @since 2.4.0 bbPress (r5049)
|
792 |
*
|
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
|
758 |
/** Admin *****************************************************************/
|
759 |
|
760 |
/**
|
761 |
+
* Add Aksimet History meta-boxes to topics and replies
|
762 |
*
|
763 |
* @since 2.4.0 bbPress (r5049)
|
764 |
*/
|
786 |
}
|
787 |
|
788 |
/**
|
789 |
+
* Output for Akismet History meta-box
|
790 |
*
|
791 |
* @since 2.4.0 bbPress (r5049)
|
792 |
*
|
includes/extend/buddypress/activity.php
CHANGED
@@ -195,9 +195,53 @@ class BBP_BuddyPress_Activity {
|
|
195 |
*/
|
196 |
public function register_activity_actions() {
|
197 |
|
198 |
-
// Sitewide
|
199 |
-
bp_activity_set_action(
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
|
203 |
/**
|
@@ -321,7 +365,7 @@ class BBP_BuddyPress_Activity {
|
|
321 |
);
|
322 |
|
323 |
// Check if this activity stream action is disabled
|
324 |
-
if ( in_array( $action_name, $disabled_actions ) ) {
|
325 |
$can_comment = false;
|
326 |
}
|
327 |
}
|
@@ -347,7 +391,7 @@ class BBP_BuddyPress_Activity {
|
|
347 |
);
|
348 |
|
349 |
// Check if this activity stream action is directly linked
|
350 |
-
if ( in_array( $activity_object->type, $disabled_actions ) ) {
|
351 |
$link = $activity_object->primary_link;
|
352 |
}
|
353 |
|
@@ -403,7 +447,7 @@ class BBP_BuddyPress_Activity {
|
|
403 |
}
|
404 |
|
405 |
// Validate activity data
|
406 |
-
$user_id = (
|
407 |
$topic_id = bbp_get_topic_id( $topic_id );
|
408 |
$forum_id = bbp_get_forum_id( $forum_id );
|
409 |
|
@@ -503,7 +547,7 @@ class BBP_BuddyPress_Activity {
|
|
503 |
}
|
504 |
|
505 |
// Action based on new status
|
506 |
-
if (
|
507 |
|
508 |
// Validate topic data
|
509 |
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
@@ -552,7 +596,7 @@ class BBP_BuddyPress_Activity {
|
|
552 |
}
|
553 |
|
554 |
// Validate activity data
|
555 |
-
$user_id = (
|
556 |
$reply_id = bbp_get_reply_id( $reply_id );
|
557 |
$topic_id = bbp_get_topic_id( $topic_id );
|
558 |
$forum_id = bbp_get_forum_id( $forum_id );
|
195 |
*/
|
196 |
public function register_activity_actions() {
|
197 |
|
198 |
+
// Sitewide topic
|
199 |
+
bp_activity_set_action(
|
200 |
+
$this->component,
|
201 |
+
$this->topic_create,
|
202 |
+
esc_html__( 'New forum topic', 'bbpress' ),
|
203 |
+
'bbp_format_activity_action_new_topic',
|
204 |
+
esc_html__( 'Topics', 'bbpress' ),
|
205 |
+
array( 'activity', 'member', 'member_groups', 'group' )
|
206 |
+
);
|
207 |
+
|
208 |
+
// Sitewide reply
|
209 |
+
bp_activity_set_action(
|
210 |
+
$this->component,
|
211 |
+
$this->reply_create,
|
212 |
+
esc_html__( 'New forum reply', 'bbpress' ),
|
213 |
+
'bbp_format_activity_action_new_reply',
|
214 |
+
esc_html__( 'Replies', 'bbpress' ),
|
215 |
+
array( 'activity', 'member', 'member_groups', 'group' )
|
216 |
+
);
|
217 |
+
|
218 |
+
// Group forums
|
219 |
+
/**
|
220 |
+
* An upstream improvement to BuddyPress is required to make these work,
|
221 |
+
* but they are included here to make our lives easier later.
|
222 |
+
if ( bp_is_active( 'groups' ) ) {
|
223 |
+
|
224 |
+
// Topic
|
225 |
+
bp_activity_set_action(
|
226 |
+
buddypress()->groups->id,
|
227 |
+
$this->topic_create,
|
228 |
+
esc_html__( 'New forum topic', 'bbpress' ),
|
229 |
+
'bbp_format_activity_action_new_topic',
|
230 |
+
esc_html__( 'Topics', 'bbpress' ),
|
231 |
+
array( 'activity', 'member', 'member_groups', 'group' )
|
232 |
+
);
|
233 |
+
|
234 |
+
// Reply
|
235 |
+
bp_activity_set_action(
|
236 |
+
buddypress()->groups->id,
|
237 |
+
$this->reply_create,
|
238 |
+
esc_html__( 'New forum reply', 'bbpress' ),
|
239 |
+
'bbp_format_activity_action_new_reply',
|
240 |
+
esc_html__( 'Replies', 'bbpress' ),
|
241 |
+
array( 'activity', 'member', 'member_groups', 'group' )
|
242 |
+
);
|
243 |
+
}
|
244 |
+
*/
|
245 |
}
|
246 |
|
247 |
/**
|
365 |
);
|
366 |
|
367 |
// Check if this activity stream action is disabled
|
368 |
+
if ( in_array( $action_name, $disabled_actions, true ) ) {
|
369 |
$can_comment = false;
|
370 |
}
|
371 |
}
|
391 |
);
|
392 |
|
393 |
// Check if this activity stream action is directly linked
|
394 |
+
if ( in_array( $activity_object->type, $disabled_actions, true ) ) {
|
395 |
$link = $activity_object->primary_link;
|
396 |
}
|
397 |
|
447 |
}
|
448 |
|
449 |
// Validate activity data
|
450 |
+
$user_id = bbp_get_user_id( $topic_author_id );
|
451 |
$topic_id = bbp_get_topic_id( $topic_id );
|
452 |
$forum_id = bbp_get_forum_id( $forum_id );
|
453 |
|
547 |
}
|
548 |
|
549 |
// Action based on new status
|
550 |
+
if ( bbp_is_topic_public( $post->ID ) ) {
|
551 |
|
552 |
// Validate topic data
|
553 |
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
596 |
}
|
597 |
|
598 |
// Validate activity data
|
599 |
+
$user_id = bbp_get_user_id( $reply_author_id );
|
600 |
$reply_id = bbp_get_reply_id( $reply_id );
|
601 |
$topic_id = bbp_get_topic_id( $topic_id );
|
602 |
$forum_id = bbp_get_forum_id( $forum_id );
|
includes/extend/buddypress/functions.php
CHANGED
@@ -11,15 +11,19 @@
|
|
11 |
defined( 'ABSPATH' ) || exit;
|
12 |
|
13 |
// Hooks
|
14 |
-
|
15 |
-
add_filter( 'bbp_get_user_id',
|
16 |
-
add_filter( 'bbp_is_single_user',
|
17 |
-
add_filter( 'bbp_is_user_home',
|
|
|
|
|
|
|
|
|
18 |
|
19 |
/** BuddyPress Helpers ********************************************************/
|
20 |
|
21 |
/**
|
22 |
-
* Return
|
23 |
*
|
24 |
* This is used primarily for Notifications integration.
|
25 |
*
|
@@ -29,15 +33,12 @@ add_filter( 'bbp_is_user_home', 'bbp_filter_is_user_home', 10, 1 );
|
|
29 |
*/
|
30 |
function bbp_get_component_name() {
|
31 |
|
32 |
-
// Use existing ID
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
// Use default
|
37 |
-
} else {
|
38 |
-
$retval = 'forums';
|
39 |
-
}
|
40 |
|
|
|
41 |
return apply_filters( 'bbp_get_component_name', $retval );
|
42 |
}
|
43 |
|
@@ -64,15 +65,13 @@ function bbp_filter_user_id( $user_id = 0, $displayed_user_fallback = true, $cur
|
|
64 |
// Easy empty checking
|
65 |
if ( ! empty( $user_id ) && is_numeric( $user_id ) ) {
|
66 |
$bbp_user_id = $user_id;
|
67 |
-
}
|
68 |
|
69 |
// Currently viewing or editing a user
|
70 |
-
elseif ( ( true === $displayed_user_fallback ) && ! empty( $did ) ) {
|
71 |
$bbp_user_id = $did;
|
72 |
-
}
|
73 |
|
74 |
// Maybe fallback on the current_user ID
|
75 |
-
elseif ( ( true === $current_user_fallback ) && ! empty( $lid ) ) {
|
76 |
$bbp_user_id = $lid;
|
77 |
}
|
78 |
|
@@ -80,7 +79,7 @@ function bbp_filter_user_id( $user_id = 0, $displayed_user_fallback = true, $cur
|
|
80 |
}
|
81 |
|
82 |
/**
|
83 |
-
* Filter the bbPress is_single_user function with BuddyPress
|
84 |
*
|
85 |
* @since 2.1.0 bbPress (r3552)
|
86 |
*
|
@@ -96,7 +95,7 @@ function bbp_filter_is_single_user( $is = false ) {
|
|
96 |
}
|
97 |
|
98 |
/**
|
99 |
-
* Filter the bbPress is_user_home function with BuddyPress
|
100 |
*
|
101 |
* @since 2.1.0 bbPress (r3552)
|
102 |
*
|
@@ -174,6 +173,19 @@ function bbp_member_forums_screen_replies() {
|
|
174 |
bp_core_load_template( apply_filters( 'bbp_member_forums_screen_replies', 'members/single/plugins' ) );
|
175 |
}
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
/**
|
178 |
* Hook bbPress favorites template into plugins template
|
179 |
*
|
@@ -240,6 +252,25 @@ function bbp_member_forums_replies_content() {
|
|
240 |
<?php
|
241 |
}
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
/**
|
244 |
* Get the topics favorited template part
|
245 |
*
|
@@ -278,13 +309,88 @@ function bbp_member_forums_subscriptions_content() {
|
|
278 |
<?php
|
279 |
}
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
/** Forum/Group Sync **********************************************************/
|
282 |
|
283 |
/**
|
284 |
* These functions are used to keep the many-to-many relationships between
|
285 |
-
* groups and forums synchronized. Each forum and group stores
|
286 |
* other in their respective meta. This way if a group or forum is deleted
|
287 |
-
* their
|
288 |
*/
|
289 |
|
290 |
/**
|
@@ -308,14 +414,10 @@ function bbp_get_group_forum_ids( $group_id = 0 ) {
|
|
308 |
$forum_ids = groups_get_groupmeta( $group_id, 'forum_id' );
|
309 |
}
|
310 |
|
311 |
-
// Make sure result is an array
|
312 |
-
|
313 |
-
$forum_ids = (array) $forum_ids;
|
314 |
-
}
|
315 |
-
|
316 |
-
// Trim out any empty array items
|
317 |
-
$forum_ids = array_filter( $forum_ids );
|
318 |
|
|
|
319 |
return (array) apply_filters( 'bbp_get_group_forum_ids', $forum_ids, $group_id );
|
320 |
}
|
321 |
|
@@ -340,14 +442,10 @@ function bbp_get_forum_group_ids( $forum_id = 0 ) {
|
|
340 |
$group_ids = get_post_meta( $forum_id, '_bbp_group_ids', true );
|
341 |
}
|
342 |
|
343 |
-
// Make sure result is an array
|
344 |
-
|
345 |
-
$group_ids = (array) $group_ids;
|
346 |
-
}
|
347 |
-
|
348 |
-
// Trim out any empty array items
|
349 |
-
$group_ids = array_filter( $group_ids );
|
350 |
|
|
|
351 |
return (array) apply_filters( 'bbp_get_forum_group_ids', $group_ids, $forum_id );
|
352 |
}
|
353 |
|
@@ -365,7 +463,7 @@ function bbp_update_group_forum_ids( $group_id = 0, $forum_ids = array() ) {
|
|
365 |
}
|
366 |
|
367 |
// Trim out any empties
|
368 |
-
$forum_ids = array_filter( $forum_ids );
|
369 |
|
370 |
// Get the forums
|
371 |
return groups_update_groupmeta( $group_id, 'forum_id', $forum_ids );
|
@@ -381,7 +479,7 @@ function bbp_update_forum_group_ids( $forum_id = 0, $group_ids = array() ) {
|
|
381 |
$forum_id = bbp_get_forum_id( $forum_id );
|
382 |
|
383 |
// Trim out any empties
|
384 |
-
$group_ids = array_filter( $group_ids );
|
385 |
|
386 |
// Get the forums
|
387 |
return update_post_meta( $forum_id, '_bbp_group_ids', $group_ids );
|
@@ -407,7 +505,7 @@ function bbp_add_group_id_to_forum( $forum_id = 0, $group_id = 0 ) {
|
|
407 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
408 |
|
409 |
// Maybe update the groups forums
|
410 |
-
if ( ! in_array( $group_id, $group_ids ) ) {
|
411 |
$group_ids[] = $group_id;
|
412 |
return bbp_update_forum_group_ids( $forum_id, $group_ids );
|
413 |
}
|
@@ -433,7 +531,7 @@ function bbp_add_forum_id_to_group( $group_id = 0, $forum_id = 0 ) {
|
|
433 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
434 |
|
435 |
// Maybe update the groups forums
|
436 |
-
if ( ! in_array( $forum_id, $forum_ids ) ) {
|
437 |
$forum_ids[] = $forum_id;
|
438 |
return bbp_update_group_forum_ids( $group_id, $forum_ids );
|
439 |
}
|
@@ -459,7 +557,7 @@ function bbp_remove_group_id_from_forum( $forum_id = 0, $group_id = 0 ) {
|
|
459 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
460 |
|
461 |
// Maybe update the groups forums
|
462 |
-
if ( in_array( $group_id, $group_ids ) ) {
|
463 |
$group_ids = array_diff( array_values( $group_ids ), (array) $group_id );
|
464 |
return bbp_update_forum_group_ids( $forum_id, $group_ids );
|
465 |
}
|
@@ -485,14 +583,14 @@ function bbp_remove_forum_id_from_group( $group_id = 0, $forum_id = 0 ) {
|
|
485 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
486 |
|
487 |
// Maybe update the groups forums
|
488 |
-
if ( in_array( $forum_id, $forum_ids ) ) {
|
489 |
$forum_ids = array_diff( array_values( $forum_ids ), (array) $forum_id );
|
490 |
return bbp_update_group_forum_ids( $group_id, $forum_ids );
|
491 |
}
|
492 |
}
|
493 |
|
494 |
/**
|
495 |
-
* Remove a group from
|
496 |
*
|
497 |
* @param type $group_id
|
498 |
* @since 2.1.0 bbPress (r3653)
|
@@ -508,7 +606,7 @@ function bbp_remove_group_id_from_all_forums( $group_id = 0 ) {
|
|
508 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
509 |
|
510 |
// Loop through forums and remove this group from each one
|
511 |
-
foreach (
|
512 |
bbp_remove_group_id_from_forum( $group_id, $forum_id );
|
513 |
}
|
514 |
}
|
@@ -526,7 +624,7 @@ function bbp_remove_forum_id_from_all_groups( $forum_id = 0 ) {
|
|
526 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
527 |
|
528 |
// Loop through groups and remove this forum from each one
|
529 |
-
foreach (
|
530 |
bbp_remove_forum_id_from_group( $forum_id, $group_id );
|
531 |
}
|
532 |
}
|
@@ -553,6 +651,7 @@ function bbp_is_forum_group_forum( $forum_id = 0 ) {
|
|
553 |
// Check if the forum has groups
|
554 |
$retval = (bool) ! empty( $group_ids );
|
555 |
|
|
|
556 |
return (bool) apply_filters( 'bbp_is_forum_group_forum', $retval, $forum_id, $group_ids );
|
557 |
}
|
558 |
|
@@ -712,3 +811,155 @@ function bbp_group_is_creator() {
|
|
712 |
// Return the value
|
713 |
return (bool) $bbp->current_user->is_group_creator;
|
714 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
defined( 'ABSPATH' ) || exit;
|
12 |
|
13 |
// Hooks
|
14 |
+
add_filter( 'bp_modify_page_title', 'bbp_filter_modify_page_title', 10, 3 );
|
15 |
+
add_filter( 'bbp_get_user_id', 'bbp_filter_user_id', 10, 3 );
|
16 |
+
add_filter( 'bbp_is_single_user', 'bbp_filter_is_single_user', 10, 1 );
|
17 |
+
add_filter( 'bbp_is_user_home', 'bbp_filter_is_user_home', 10, 1 );
|
18 |
+
|
19 |
+
// Group Forum Root
|
20 |
+
add_action( 'load-settings_page_bbpress', 'bbp_maybe_create_group_forum_root' );
|
21 |
+
add_action( 'bbp_delete_forum', 'bbp_maybe_delete_group_forum_root' );
|
22 |
|
23 |
/** BuddyPress Helpers ********************************************************/
|
24 |
|
25 |
/**
|
26 |
+
* Return component name/ID ('forums' by default)
|
27 |
*
|
28 |
* This is used primarily for Notifications integration.
|
29 |
*
|
33 |
*/
|
34 |
function bbp_get_component_name() {
|
35 |
|
36 |
+
// Use existing ID or default
|
37 |
+
$retval = ! empty( bbpress()->extend->buddypress->id )
|
38 |
+
? bbpress()->extend->buddypress->id
|
39 |
+
: 'forums';
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
// Filter & return
|
42 |
return apply_filters( 'bbp_get_component_name', $retval );
|
43 |
}
|
44 |
|
65 |
// Easy empty checking
|
66 |
if ( ! empty( $user_id ) && is_numeric( $user_id ) ) {
|
67 |
$bbp_user_id = $user_id;
|
|
|
68 |
|
69 |
// Currently viewing or editing a user
|
70 |
+
} elseif ( ( true === $displayed_user_fallback ) && ! empty( $did ) ) {
|
71 |
$bbp_user_id = $did;
|
|
|
72 |
|
73 |
// Maybe fallback on the current_user ID
|
74 |
+
} elseif ( ( true === $current_user_fallback ) && ! empty( $lid ) ) {
|
75 |
$bbp_user_id = $lid;
|
76 |
}
|
77 |
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
+
* Filter the bbPress is_single_user function with BuddyPress equivalent
|
83 |
*
|
84 |
* @since 2.1.0 bbPress (r3552)
|
85 |
*
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
+
* Filter the bbPress is_user_home function with BuddyPress equivalent
|
99 |
*
|
100 |
* @since 2.1.0 bbPress (r3552)
|
101 |
*
|
173 |
bp_core_load_template( apply_filters( 'bbp_member_forums_screen_replies', 'members/single/plugins' ) );
|
174 |
}
|
175 |
|
176 |
+
/**
|
177 |
+
* Hook bbPress engagements template into plugins template
|
178 |
+
*
|
179 |
+
* @since 2.6.0 bbPress (r6320)
|
180 |
+
*
|
181 |
+
* @uses add_action() To add the content hook
|
182 |
+
* @uses bp_core_load_template() To load the plugins template
|
183 |
+
*/
|
184 |
+
function bbp_member_forums_screen_engagements() {
|
185 |
+
add_action( 'bp_template_content', 'bbp_member_forums_engagements_content' );
|
186 |
+
bp_core_load_template( apply_filters( 'bbp_member_forums_screen_engagements', 'members/single/plugins' ) );
|
187 |
+
}
|
188 |
+
|
189 |
/**
|
190 |
* Hook bbPress favorites template into plugins template
|
191 |
*
|
252 |
<?php
|
253 |
}
|
254 |
|
255 |
+
/**
|
256 |
+
* Get the topic engagements template part
|
257 |
+
*
|
258 |
+
* @since 2.6.0 bbPress (r6320)
|
259 |
+
*
|
260 |
+
* @uses bbp_get_template_part()
|
261 |
+
*/
|
262 |
+
function bbp_member_forums_engagements_content() {
|
263 |
+
?>
|
264 |
+
|
265 |
+
<div id="bbpress-forums" class="bbpress-wrapper">
|
266 |
+
|
267 |
+
<?php bbp_get_template_part( 'user', 'engagements' ); ?>
|
268 |
+
|
269 |
+
</div>
|
270 |
+
|
271 |
+
<?php
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Get the topics favorited template part
|
276 |
*
|
309 |
<?php
|
310 |
}
|
311 |
|
312 |
+
/** Forum Group Root **********************************************************/
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Clean up the group root setting if the forum is being deleted
|
316 |
+
*
|
317 |
+
* @since 2.6.0 bbPress (r6479)
|
318 |
+
*
|
319 |
+
* @param int $forum_id The forum ID being deleted
|
320 |
+
*/
|
321 |
+
function bbp_maybe_delete_group_forum_root( $forum_id = 0 ) {
|
322 |
+
|
323 |
+
// Bail if no forum ID
|
324 |
+
$forum_id = bbp_get_forum_id();
|
325 |
+
if ( empty( $forum_id ) ) {
|
326 |
+
return;
|
327 |
+
}
|
328 |
+
|
329 |
+
// Get the group root
|
330 |
+
$group_root = (int) get_option( '_bbp_group_forums_root_id', 0 );
|
331 |
+
|
332 |
+
// Delete the group root if the forum just got deleted
|
333 |
+
if ( $group_root === $forum_id ) {
|
334 |
+
delete_option( '_bbp_group_forums_root_id' );
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Handle the new group forum root creation
|
340 |
+
*
|
341 |
+
* @since 2.6.0 bbPress (r6479)
|
342 |
+
*
|
343 |
+
* @return
|
344 |
+
*/
|
345 |
+
function bbp_maybe_create_group_forum_root() {
|
346 |
+
|
347 |
+
// Bail if no nonce
|
348 |
+
if ( empty( $_GET['_wpnonce'] ) || ( empty( $_GET['create'] ) || ( 'bbp-group-forum-root' !== $_GET['create'] ) ) ) {
|
349 |
+
return;
|
350 |
+
}
|
351 |
+
|
352 |
+
// Bail if user cannot publish forums
|
353 |
+
if ( ! current_user_can( 'publish_forums' ) ) {
|
354 |
+
return;
|
355 |
+
}
|
356 |
+
|
357 |
+
// Bail if nonce check fails
|
358 |
+
if ( ! wp_verify_nonce( $_GET['_wpnonce'], '_bbp_group_forums_root_id' ) ) {
|
359 |
+
return;
|
360 |
+
}
|
361 |
+
|
362 |
+
// Create new forum
|
363 |
+
$forum_id = bbp_insert_forum(
|
364 |
+
|
365 |
+
// Post
|
366 |
+
array( 'post_title' => esc_html__( 'Group Forums', 'bbpress' ) ),
|
367 |
+
|
368 |
+
// Meta
|
369 |
+
array( 'forum_type' => 'category' )
|
370 |
+
);
|
371 |
+
|
372 |
+
// Update & redirect
|
373 |
+
if ( ! empty( $forum_id ) ) {
|
374 |
+
|
375 |
+
// Create
|
376 |
+
update_option( '_bbp_group_forums_root_id', $forum_id );
|
377 |
+
|
378 |
+
// Redirect
|
379 |
+
wp_safe_redirect( add_query_arg( array(
|
380 |
+
'page' => 'bbpress',
|
381 |
+
'updated' => true // Lame, but still supported
|
382 |
+
), admin_url( 'options-general.php' ) ) );
|
383 |
+
die;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
/** Forum/Group Sync **********************************************************/
|
388 |
|
389 |
/**
|
390 |
* These functions are used to keep the many-to-many relationships between
|
391 |
+
* groups and forums synchronized. Each forum and group stores pointers to each
|
392 |
* other in their respective meta. This way if a group or forum is deleted
|
393 |
+
* their associations can be updated without much effort.
|
394 |
*/
|
395 |
|
396 |
/**
|
414 |
$forum_ids = groups_get_groupmeta( $group_id, 'forum_id' );
|
415 |
}
|
416 |
|
417 |
+
// Make sure result is an array of ints
|
418 |
+
$forum_ids = array_filter( wp_parse_id_list( $forum_ids ) );
|
|
|
|
|
|
|
|
|
|
|
419 |
|
420 |
+
// Filter & return
|
421 |
return (array) apply_filters( 'bbp_get_group_forum_ids', $forum_ids, $group_id );
|
422 |
}
|
423 |
|
442 |
$group_ids = get_post_meta( $forum_id, '_bbp_group_ids', true );
|
443 |
}
|
444 |
|
445 |
+
// Make sure result is an array of ints
|
446 |
+
$group_ids = array_filter( wp_parse_id_list( $group_ids ) );
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
+
// Filter & return
|
449 |
return (array) apply_filters( 'bbp_get_forum_group_ids', $group_ids, $forum_id );
|
450 |
}
|
451 |
|
463 |
}
|
464 |
|
465 |
// Trim out any empties
|
466 |
+
$forum_ids = array_filter( wp_parse_id_list( $forum_ids ) );
|
467 |
|
468 |
// Get the forums
|
469 |
return groups_update_groupmeta( $group_id, 'forum_id', $forum_ids );
|
479 |
$forum_id = bbp_get_forum_id( $forum_id );
|
480 |
|
481 |
// Trim out any empties
|
482 |
+
$group_ids = array_filter( wp_parse_id_list( $group_ids ) );
|
483 |
|
484 |
// Get the forums
|
485 |
return update_post_meta( $forum_id, '_bbp_group_ids', $group_ids );
|
505 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
506 |
|
507 |
// Maybe update the groups forums
|
508 |
+
if ( ! in_array( $group_id, $group_ids, true ) ) {
|
509 |
$group_ids[] = $group_id;
|
510 |
return bbp_update_forum_group_ids( $forum_id, $group_ids );
|
511 |
}
|
531 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
532 |
|
533 |
// Maybe update the groups forums
|
534 |
+
if ( ! in_array( $forum_id, $forum_ids, true ) ) {
|
535 |
$forum_ids[] = $forum_id;
|
536 |
return bbp_update_group_forum_ids( $group_id, $forum_ids );
|
537 |
}
|
557 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
558 |
|
559 |
// Maybe update the groups forums
|
560 |
+
if ( in_array( $group_id, $group_ids, true ) ) {
|
561 |
$group_ids = array_diff( array_values( $group_ids ), (array) $group_id );
|
562 |
return bbp_update_forum_group_ids( $forum_id, $group_ids );
|
563 |
}
|
583 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
584 |
|
585 |
// Maybe update the groups forums
|
586 |
+
if ( in_array( $forum_id, $forum_ids, true ) ) {
|
587 |
$forum_ids = array_diff( array_values( $forum_ids ), (array) $forum_id );
|
588 |
return bbp_update_group_forum_ids( $group_id, $forum_ids );
|
589 |
}
|
590 |
}
|
591 |
|
592 |
/**
|
593 |
+
* Remove a group from all forums
|
594 |
*
|
595 |
* @param type $group_id
|
596 |
* @since 2.1.0 bbPress (r3653)
|
606 |
$forum_ids = bbp_get_group_forum_ids( $group_id );
|
607 |
|
608 |
// Loop through forums and remove this group from each one
|
609 |
+
foreach ( $forum_ids as $forum_id ) {
|
610 |
bbp_remove_group_id_from_forum( $group_id, $forum_id );
|
611 |
}
|
612 |
}
|
624 |
$group_ids = bbp_get_forum_group_ids( $forum_id );
|
625 |
|
626 |
// Loop through groups and remove this forum from each one
|
627 |
+
foreach ( $group_ids as $group_id ) {
|
628 |
bbp_remove_forum_id_from_group( $forum_id, $group_id );
|
629 |
}
|
630 |
}
|
651 |
// Check if the forum has groups
|
652 |
$retval = (bool) ! empty( $group_ids );
|
653 |
|
654 |
+
// Filter & return
|
655 |
return (bool) apply_filters( 'bbp_is_forum_group_forum', $retval, $forum_id, $group_ids );
|
656 |
}
|
657 |
|
811 |
// Return the value
|
812 |
return (bool) $bbp->current_user->is_group_creator;
|
813 |
}
|
814 |
+
|
815 |
+
/* BuddyPress Activity Action Callbacks ***************************************/
|
816 |
+
|
817 |
+
/**
|
818 |
+
* Return an array of allowed activity actions
|
819 |
+
*
|
820 |
+
* @since 2.6.0 bbPress (r6370)
|
821 |
+
*
|
822 |
+
* @return array
|
823 |
+
*/
|
824 |
+
function bbp_get_activity_actions() {
|
825 |
+
|
826 |
+
// Filter & return
|
827 |
+
return (array) apply_filters( 'bbp_get_activity_actions', array(
|
828 |
+
'topic' => __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ),
|
829 |
+
'reply' => __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' )
|
830 |
+
) );
|
831 |
+
}
|
832 |
+
|
833 |
+
/**
|
834 |
+
* Generic function to format the dynamic BuddyPress activity action for new
|
835 |
+
* topics/replies.
|
836 |
+
*
|
837 |
+
* @since 2.6.0 bbPress (r6370)
|
838 |
+
*
|
839 |
+
* @param string $type The type of post. Expects `topic` or `reply`.
|
840 |
+
* @param string $action The current action string.
|
841 |
+
* @param BP_Activity_Activity $activity The BuddyPress activity object.
|
842 |
+
*
|
843 |
+
* @return string The formatted activity action.
|
844 |
+
*/
|
845 |
+
function bbp_format_activity_action_new_post( $type = '', $action = '', $activity = false ) {
|
846 |
+
|
847 |
+
// Get actions
|
848 |
+
$actions = bbp_get_activity_actions();
|
849 |
+
|
850 |
+
// Bail early if we don't have a valid type
|
851 |
+
if ( ! in_array( $type, array_keys( $actions ), true ) ) {
|
852 |
+
return $action;
|
853 |
+
}
|
854 |
+
|
855 |
+
/**
|
856 |
+
* Overrides the formatted activity action new activity string.
|
857 |
+
*
|
858 |
+
* @since 2.6.0 bbPress (r6370)
|
859 |
+
*
|
860 |
+
* @param string $activity_action Activity action string value
|
861 |
+
* @param string $type The type of post. Expects `topic` or `reply`.
|
862 |
+
* @param string $action The current action string.
|
863 |
+
* @param BP_Activity_Activity $activity The BuddyPress activity object.
|
864 |
+
*/
|
865 |
+
if ( $pre = apply_filters( 'bbp_pre_format_activity_action_new_post', false, $type, $action, $activity ) ) {
|
866 |
+
return $pre;
|
867 |
+
}
|
868 |
+
|
869 |
+
// Groups component
|
870 |
+
if ( 'groups' === $activity->component ) {
|
871 |
+
if ( 'topic' === $type ) {
|
872 |
+
$topic_id = bbp_get_topic_id( $activity->secondary_item_id );
|
873 |
+
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
874 |
+
} else {
|
875 |
+
$topic_id = bbp_get_reply_topic_id( $activity->secondary_item_id );
|
876 |
+
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
877 |
+
}
|
878 |
+
|
879 |
+
// General component (bbpress/forums/other)
|
880 |
+
} else {
|
881 |
+
if ( 'topic' === $type ) {
|
882 |
+
$topic_id = bbp_get_topic_id( $activity->item_id );
|
883 |
+
$forum_id = bbp_get_forum_id( $activity->secondary_item_id );
|
884 |
+
} else {
|
885 |
+
$topic_id = bbp_get_topic_id( $activity->secondary_item_id );
|
886 |
+
$forum_id = bbp_get_topic_forum_id( $topic_id );
|
887 |
+
}
|
888 |
+
}
|
889 |
+
|
890 |
+
// User link for topic author
|
891 |
+
$user_link = bbp_get_user_profile_link( $activity->user_id );
|
892 |
+
|
893 |
+
// Topic link
|
894 |
+
$topic_permalink = bbp_get_topic_permalink( $topic_id );
|
895 |
+
$topic_title = get_post_field( 'post_title', $topic_id, 'raw' );
|
896 |
+
$topic_link = '<a href="' . esc_url( $topic_permalink ) . '">' . esc_html( $topic_title ) . '</a>';
|
897 |
+
|
898 |
+
// Forum link
|
899 |
+
$forum_permalink = bbp_get_forum_permalink( $forum_id );
|
900 |
+
$forum_title = get_post_field( 'post_title', $forum_id, 'raw' );
|
901 |
+
$forum_link = '<a href="' . esc_url( $forum_permalink ) . '">' . esc_html( $forum_title ) . '</a>';
|
902 |
+
|
903 |
+
// Format
|
904 |
+
$activity_action = sprintf( $actions[ $type ], $user_link, $topic_link, $forum_link );
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Filters the formatted activity action new activity string.
|
908 |
+
*
|
909 |
+
* @since 2.6.0 bbPress (r6370)
|
910 |
+
*
|
911 |
+
* @param string $activity_action Activity action string value
|
912 |
+
* @param string $type The type of post. Expects `topic` or `reply`.
|
913 |
+
* @param string $action The current action string.
|
914 |
+
* @param BP_Activity_Activity $activity The BuddyPress activity object.
|
915 |
+
*/
|
916 |
+
return apply_filters( 'bbp_format_activity_action_new_post', $activity_action, $type, $action, $activity );
|
917 |
+
}
|
918 |
+
|
919 |
+
/**
|
920 |
+
* Formats the dynamic BuddyPress activity action for new topics.
|
921 |
+
*
|
922 |
+
* @since 2.6.0 bbPress (r6370)
|
923 |
+
*
|
924 |
+
* @param string $action The current action string
|
925 |
+
* @param object $activity The BuddyPress activity object
|
926 |
+
*
|
927 |
+
* @return string The formatted activity action.
|
928 |
+
*/
|
929 |
+
function bbp_format_activity_action_new_topic( $action, $activity ) {
|
930 |
+
$action = bbp_format_activity_action_new_post( 'topic', $action, $activity );
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Filters the formatted activity action new topic string.
|
934 |
+
*
|
935 |
+
* @since 2.6.0 bbPress (r6370)
|
936 |
+
*
|
937 |
+
* @param string $action Activity action string value
|
938 |
+
* @param BP_Activity_Activity $activity Activity item object
|
939 |
+
*/
|
940 |
+
return apply_filters( 'bbp_format_activity_action_new_topic', $action, $activity );
|
941 |
+
}
|
942 |
+
|
943 |
+
/**
|
944 |
+
* Formats the dynamic BuddyPress activity action for new replies.
|
945 |
+
*
|
946 |
+
* @since 2.6.0 bbPress (r6370)
|
947 |
+
*
|
948 |
+
* @param string $action The current action string
|
949 |
+
* @param object $activity The BuddyPress activity object
|
950 |
+
*
|
951 |
+
* @return string The formatted activity action
|
952 |
+
*/
|
953 |
+
function bbp_format_activity_action_new_reply( $action, $activity ) {
|
954 |
+
$action = bbp_format_activity_action_new_post( 'reply', $action, $activity );
|
955 |
+
|
956 |
+
/**
|
957 |
+
* Filters the formatted activity action new reply string.
|
958 |
+
*
|
959 |
+
* @since 2.6.0 bbPress (r6370)
|
960 |
+
*
|
961 |
+
* @param string $action Activity action string value
|
962 |
+
* @param BP_Activity_Activity $activity Activity item object
|
963 |
+
*/
|
964 |
+
return apply_filters( 'bbp_format_activity_action_new_reply', $action, $activity );
|
965 |
+
}
|
includes/extend/buddypress/groups.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
/**
|
4 |
* bbPress BuddyPress Group Extension Class
|
5 |
*
|
6 |
-
* This file is responsible for connecting bbPress to BuddyPress
|
7 |
* Component. It's a great example of how to perform both simple and advanced
|
8 |
-
* techniques to manipulate
|
9 |
*
|
10 |
* @package bbPress
|
11 |
* @subpackage BuddyPress
|
@@ -91,7 +91,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
91 |
// bbPress needs to listen to BuddyPress group deletion
|
92 |
add_action( 'groups_before_delete_group', array( $this, 'disconnect_forum_from_group' ) );
|
93 |
|
94 |
-
// Adds a bbPress
|
95 |
add_action( 'bp_groups_admin_meta_boxes', array( $this, 'group_admin_ui_edit_screen' ) );
|
96 |
|
97 |
// Saves the bbPress options if they come from the BuddyPress Group Admin UI
|
@@ -108,6 +108,9 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
108 |
*/
|
109 |
private function setup_filters() {
|
110 |
|
|
|
|
|
|
|
111 |
// Ensure bbp_is_single_topic() returns true on group forum topics.
|
112 |
add_filter( 'bbp_is_single_topic', array( $this, 'is_single_topic' ) );
|
113 |
|
@@ -149,6 +152,28 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
149 |
}
|
150 |
}
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
/**
|
153 |
* Ensure that bbp_is_single_topic() returns true on group forum topic pages.
|
154 |
*
|
@@ -218,7 +243,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
218 |
}
|
219 |
|
220 |
/**
|
221 |
-
* Allow group members to have advanced
|
222 |
*
|
223 |
* @since 2.2.0 bbPress (r4434)
|
224 |
*
|
@@ -267,7 +292,8 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
267 |
break;
|
268 |
}
|
269 |
|
270 |
-
|
|
|
271 |
}
|
272 |
|
273 |
/**
|
@@ -323,7 +349,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
323 |
<?php
|
324 |
bbp_dropdown( array(
|
325 |
'select_id' => 'bbp_group_forum_id',
|
326 |
-
'show_none' =>
|
327 |
'selected' => $forum_id
|
328 |
) );
|
329 |
?>
|
@@ -459,7 +485,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
459 |
}
|
460 |
|
461 |
/**
|
462 |
-
* Adds a
|
463 |
*
|
464 |
* @since 2.3.0 bbPress (r4814)
|
465 |
*
|
@@ -478,7 +504,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
478 |
}
|
479 |
|
480 |
/**
|
481 |
-
* Displays the bbPress
|
482 |
*
|
483 |
* @since 2.3.0 bbPress (r4814)
|
484 |
*
|
@@ -791,7 +817,7 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
791 |
$this->disconnect_forum_from_group( $group_id );
|
792 |
}
|
793 |
|
794 |
-
// Update
|
795 |
bbp_repair_forum_visibility();
|
796 |
|
797 |
// Return the group
|
@@ -860,11 +886,16 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
860 |
if ( bbp_forums() ) :
|
861 |
|
862 |
// Setup the forum
|
863 |
-
bbp_the_forum();
|
864 |
|
865 |
-
|
|
|
|
|
|
|
|
|
866 |
|
867 |
-
|
|
|
868 |
|
869 |
// No forums found
|
870 |
else : ?>
|
@@ -893,18 +924,27 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
893 |
|
894 |
// If no topic, 404
|
895 |
if ( ! bbp_topics() ) {
|
896 |
-
bp_do_404( bbp_get_forum_permalink( $forum_id ) );
|
897 |
-
|
898 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
break;
|
900 |
}
|
901 |
|
902 |
// Setup the topic
|
903 |
-
bbp_the_topic();
|
904 |
-
|
905 |
-
<h2><?php bbp_topic_title(); ?></h2>
|
906 |
|
907 |
-
|
|
|
|
|
|
|
|
|
908 |
|
909 |
// Topic edit
|
910 |
if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_rewrite_id() ) :
|
@@ -955,18 +995,29 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
955 |
|
956 |
// If no topic, 404
|
957 |
if ( ! bbp_replies() ) {
|
958 |
-
bp_do_404( bbp_get_forum_permalink( $forum_id ) );
|
959 |
-
|
960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
break;
|
962 |
}
|
963 |
|
964 |
// Setup the reply
|
965 |
-
bbp_the_reply();
|
966 |
|
967 |
-
|
|
|
|
|
|
|
|
|
968 |
|
969 |
-
|
970 |
|
971 |
// Set the edit switches
|
972 |
$wp_query->bbp_is_edit = true;
|
@@ -1461,6 +1512,11 @@ class BBP_Forums_Group_Extension extends BP_Group_Extension {
|
|
1461 |
*/
|
1462 |
public function redirect_canonical() {
|
1463 |
|
|
|
|
|
|
|
|
|
|
|
1464 |
// Viewing a single forum
|
1465 |
if ( bbp_is_single_forum() ) {
|
1466 |
$forum_id = get_the_ID();
|
3 |
/**
|
4 |
* bbPress BuddyPress Group Extension Class
|
5 |
*
|
6 |
+
* This file is responsible for connecting bbPress to the BuddyPress Groups
|
7 |
* Component. It's a great example of how to perform both simple and advanced
|
8 |
+
* techniques to manipulate the default output provided by both.
|
9 |
*
|
10 |
* @package bbPress
|
11 |
* @subpackage BuddyPress
|
91 |
// bbPress needs to listen to BuddyPress group deletion
|
92 |
add_action( 'groups_before_delete_group', array( $this, 'disconnect_forum_from_group' ) );
|
93 |
|
94 |
+
// Adds a bbPress meta-box to the new BuddyPress Group Admin UI
|
95 |
add_action( 'bp_groups_admin_meta_boxes', array( $this, 'group_admin_ui_edit_screen' ) );
|
96 |
|
97 |
// Saves the bbPress options if they come from the BuddyPress Group Admin UI
|
108 |
*/
|
109 |
private function setup_filters() {
|
110 |
|
111 |
+
// Ensure bbp_is_single_forum() returns true on group forums.
|
112 |
+
add_filter( 'bbp_is_single_forum', array( $this, 'is_single_forum' ) );
|
113 |
+
|
114 |
// Ensure bbp_is_single_topic() returns true on group forum topics.
|
115 |
add_filter( 'bbp_is_single_topic', array( $this, 'is_single_topic' ) );
|
116 |
|
152 |
}
|
153 |
}
|
154 |
|
155 |
+
/**
|
156 |
+
* Ensure that bbp_is_single_forum() returns true on group forum pages.
|
157 |
+
*
|
158 |
+
* @see https://bbpress.trac.wordpress.org/ticket/2974
|
159 |
+
*
|
160 |
+
* @since 2.6.0 bbPress (r6366)
|
161 |
+
*
|
162 |
+
* @param bool $retval Current boolean.
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
public function is_single_forum( $retval = false ) {
|
166 |
+
|
167 |
+
// Additional BuddyPress specific single-forum conditionals
|
168 |
+
if ( false === $retval ) {
|
169 |
+
if ( bp_is_group() && bp_is_action_variable( $this->forum_slug, 0 ) ) {
|
170 |
+
$retval = true;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
return $retval;
|
175 |
+
}
|
176 |
+
|
177 |
/**
|
178 |
* Ensure that bbp_is_single_topic() returns true on group forum topic pages.
|
179 |
*
|
243 |
}
|
244 |
|
245 |
/**
|
246 |
+
* Allow group members to have advanced privileges in group forum topics.
|
247 |
*
|
248 |
* @since 2.2.0 bbPress (r4434)
|
249 |
*
|
292 |
break;
|
293 |
}
|
294 |
|
295 |
+
// Filter & return
|
296 |
+
return (array) apply_filters( 'bbp_map_group_forum_topic_meta_caps', $caps, $cap, $user_id, $args );
|
297 |
}
|
298 |
|
299 |
/**
|
349 |
<?php
|
350 |
bbp_dropdown( array(
|
351 |
'select_id' => 'bbp_group_forum_id',
|
352 |
+
'show_none' => esc_html__( '— No forum —', 'bbpress' ),
|
353 |
'selected' => $forum_id
|
354 |
) );
|
355 |
?>
|
485 |
}
|
486 |
|
487 |
/**
|
488 |
+
* Adds a meta-box to BuddyPress Group Admin UI
|
489 |
*
|
490 |
* @since 2.3.0 bbPress (r4814)
|
491 |
*
|
504 |
}
|
505 |
|
506 |
/**
|
507 |
+
* Displays the bbPress meta-box in BuddyPress Group Admin UI
|
508 |
*
|
509 |
* @since 2.3.0 bbPress (r4814)
|
510 |
*
|
817 |
$this->disconnect_forum_from_group( $group_id );
|
818 |
}
|
819 |
|
820 |
+
// Update internal private and forum ID variables
|
821 |
bbp_repair_forum_visibility();
|
822 |
|
823 |
// Return the group
|
886 |
if ( bbp_forums() ) :
|
887 |
|
888 |
// Setup the forum
|
889 |
+
bbp_the_forum();
|
890 |
|
891 |
+
// Only wrap title in H2 if not empty
|
892 |
+
$title = bbp_get_forum_title();
|
893 |
+
if ( ! empty( $title ) ) {
|
894 |
+
echo '<h2>' . $title . '</h2>';
|
895 |
+
}
|
896 |
|
897 |
+
// Output forum
|
898 |
+
bbp_get_template_part( 'content', 'single-forum' );
|
899 |
|
900 |
// No forums found
|
901 |
else : ?>
|
924 |
|
925 |
// If no topic, 404
|
926 |
if ( ! bbp_topics() ) {
|
927 |
+
bp_do_404( bbp_get_forum_permalink( $forum_id ) );
|
928 |
+
|
929 |
+
// Only wrap title in H2 if not empty
|
930 |
+
$title = bbp_get_forum_title();
|
931 |
+
if ( ! empty( $title ) ) {
|
932 |
+
echo '<h2>' . $title . '</h2>';
|
933 |
+
}
|
934 |
+
|
935 |
+
// No topics
|
936 |
+
bbp_get_template_part( 'feedback', 'no-topics' );
|
937 |
break;
|
938 |
}
|
939 |
|
940 |
// Setup the topic
|
941 |
+
bbp_the_topic();
|
|
|
|
|
942 |
|
943 |
+
// Only wrap title in H2 if not empty
|
944 |
+
$title = bbp_get_topic_title();
|
945 |
+
if ( ! empty( $title ) ) {
|
946 |
+
echo '<h2>' . $title . '</h2>';
|
947 |
+
}
|
948 |
|
949 |
// Topic edit
|
950 |
if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_rewrite_id() ) :
|
995 |
|
996 |
// If no topic, 404
|
997 |
if ( ! bbp_replies() ) {
|
998 |
+
bp_do_404( bbp_get_forum_permalink( $forum_id ) );
|
999 |
+
|
1000 |
+
// Only wrap title in H2 if not empty
|
1001 |
+
$title = bbp_get_forum_title();
|
1002 |
+
if ( ! empty( $title ) ) {
|
1003 |
+
echo '<h2>' . $title . '</h2>';
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
// No replies
|
1007 |
+
bbp_get_template_part( 'feedback', 'no-replies' );
|
1008 |
break;
|
1009 |
}
|
1010 |
|
1011 |
// Setup the reply
|
1012 |
+
bbp_the_reply();
|
1013 |
|
1014 |
+
// Only wrap title in H2 if not empty
|
1015 |
+
$title = bbp_get_reply_title();
|
1016 |
+
if ( ! empty( $title ) ) {
|
1017 |
+
echo '<h2>' . $title . '</h2>';
|
1018 |
+
}
|
1019 |
|
1020 |
+
if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_rewrite_id() ) :
|
1021 |
|
1022 |
// Set the edit switches
|
1023 |
$wp_query->bbp_is_edit = true;
|
1512 |
*/
|
1513 |
public function redirect_canonical() {
|
1514 |
|
1515 |
+
// Bail if on a RSS feed
|
1516 |
+
if ( is_feed() ) {
|
1517 |
+
return;
|
1518 |
+
}
|
1519 |
+
|
1520 |
// Viewing a single forum
|
1521 |
if ( bbp_is_single_forum() ) {
|
1522 |
$forum_id = get_the_ID();
|
includes/extend/buddypress/loader.php
CHANGED
@@ -89,12 +89,12 @@ class BBP_Forums_Component extends BP_Component {
|
|
89 |
$bp = buddypress();
|
90 |
|
91 |
// Define the parent forum ID
|
92 |
-
if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) {
|
93 |
define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
|
94 |
}
|
95 |
|
96 |
// Define a slug, if necessary
|
97 |
-
if ( !defined( 'BP_FORUMS_SLUG' ) ) {
|
98 |
define( 'BP_FORUMS_SLUG', $this->id );
|
99 |
}
|
100 |
|
@@ -218,6 +218,19 @@ class BBP_Forums_Component extends BP_Component {
|
|
218 |
'item_css_id' => 'replies'
|
219 |
);
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
// Favorite topics
|
222 |
if ( bbp_is_favorites_active() ){
|
223 |
$sub_nav[] = array(
|
@@ -226,7 +239,7 @@ class BBP_Forums_Component extends BP_Component {
|
|
226 |
'parent_url' => $forums_link,
|
227 |
'parent_slug' => $this->slug,
|
228 |
'screen_function' => 'bbp_member_forums_screen_favorites',
|
229 |
-
'position' =>
|
230 |
'item_css_id' => 'favorites'
|
231 |
);
|
232 |
}
|
@@ -239,7 +252,7 @@ class BBP_Forums_Component extends BP_Component {
|
|
239 |
'parent_url' => $forums_link,
|
240 |
'parent_slug' => $this->slug,
|
241 |
'screen_function' => 'bbp_member_forums_screen_subscriptions',
|
242 |
-
'position' =>
|
243 |
'item_css_id' => 'subscriptions'
|
244 |
);
|
245 |
}
|
@@ -264,6 +277,7 @@ class BBP_Forums_Component extends BP_Component {
|
|
264 |
$my_account_link = bbp_get_user_profile_url( $user_id );
|
265 |
$my_topics_link = bbp_get_user_topics_created_url( $user_id );
|
266 |
$my_replies_link = bbp_get_user_replies_created_url( $user_id );
|
|
|
267 |
$my_favorites_link = bbp_get_favorites_permalink( $user_id );
|
268 |
$my_subscriptions_link = bbp_get_subscriptions_permalink( $user_id );
|
269 |
} else {
|
@@ -275,6 +289,7 @@ class BBP_Forums_Component extends BP_Component {
|
|
275 |
$my_account_link = trailingslashit( $forums_link );
|
276 |
$my_topics_link = trailingslashit( $forums_link . bbp_get_topic_archive_slug() );
|
277 |
$my_replies_link = trailingslashit( $forums_link . bbp_get_reply_archive_slug() );
|
|
|
278 |
$my_favorites_link = trailingslashit( $forums_link . bbp_get_user_favorites_slug() );
|
279 |
$my_subscriptions_link = trailingslashit( $forums_link . bbp_get_user_subscriptions_slug() );
|
280 |
}
|
@@ -303,21 +318,35 @@ class BBP_Forums_Component extends BP_Component {
|
|
303 |
'href' => $my_replies_link
|
304 |
);
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
// Favorites
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
|
|
313 |
|
314 |
// Subscriptions
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
|
|
|
|
321 |
}
|
322 |
|
323 |
parent::setup_admin_bar( $wp_admin_nav );
|
89 |
$bp = buddypress();
|
90 |
|
91 |
// Define the parent forum ID
|
92 |
+
if ( ! defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) {
|
93 |
define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
|
94 |
}
|
95 |
|
96 |
// Define a slug, if necessary
|
97 |
+
if ( ! defined( 'BP_FORUMS_SLUG' ) ) {
|
98 |
define( 'BP_FORUMS_SLUG', $this->id );
|
99 |
}
|
100 |
|
218 |
'item_css_id' => 'replies'
|
219 |
);
|
220 |
|
221 |
+
// Engagements
|
222 |
+
if ( bbp_is_engagements_active() ) {
|
223 |
+
$sub_nav[] = array(
|
224 |
+
'name' => __( 'Engagements', 'bbpress' ),
|
225 |
+
'slug' => bbp_get_user_engagements_slug(),
|
226 |
+
'parent_url' => $forums_link,
|
227 |
+
'parent_slug' => $this->slug,
|
228 |
+
'screen_function' => 'bbp_member_forums_screen_engagements',
|
229 |
+
'position' => 60,
|
230 |
+
'item_css_id' => 'engagements'
|
231 |
+
);
|
232 |
+
}
|
233 |
+
|
234 |
// Favorite topics
|
235 |
if ( bbp_is_favorites_active() ){
|
236 |
$sub_nav[] = array(
|
239 |
'parent_url' => $forums_link,
|
240 |
'parent_slug' => $this->slug,
|
241 |
'screen_function' => 'bbp_member_forums_screen_favorites',
|
242 |
+
'position' => 80,
|
243 |
'item_css_id' => 'favorites'
|
244 |
);
|
245 |
}
|
252 |
'parent_url' => $forums_link,
|
253 |
'parent_slug' => $this->slug,
|
254 |
'screen_function' => 'bbp_member_forums_screen_subscriptions',
|
255 |
+
'position' => 100,
|
256 |
'item_css_id' => 'subscriptions'
|
257 |
);
|
258 |
}
|
277 |
$my_account_link = bbp_get_user_profile_url( $user_id );
|
278 |
$my_topics_link = bbp_get_user_topics_created_url( $user_id );
|
279 |
$my_replies_link = bbp_get_user_replies_created_url( $user_id );
|
280 |
+
$my_engagements_link = bbp_get_user_engagements_url( $user_id );
|
281 |
$my_favorites_link = bbp_get_favorites_permalink( $user_id );
|
282 |
$my_subscriptions_link = bbp_get_subscriptions_permalink( $user_id );
|
283 |
} else {
|
289 |
$my_account_link = trailingslashit( $forums_link );
|
290 |
$my_topics_link = trailingslashit( $forums_link . bbp_get_topic_archive_slug() );
|
291 |
$my_replies_link = trailingslashit( $forums_link . bbp_get_reply_archive_slug() );
|
292 |
+
$my_engagements_link = trailingslashit( $forums_link . bbp_get_user_engagements_slug() );
|
293 |
$my_favorites_link = trailingslashit( $forums_link . bbp_get_user_favorites_slug() );
|
294 |
$my_subscriptions_link = trailingslashit( $forums_link . bbp_get_user_subscriptions_slug() );
|
295 |
}
|
318 |
'href' => $my_replies_link
|
319 |
);
|
320 |
|
321 |
+
// Engagements
|
322 |
+
if ( bbp_is_engagements_active() ) {
|
323 |
+
$wp_admin_nav[] = array(
|
324 |
+
'parent' => 'my-account-' . $this->id,
|
325 |
+
'id' => 'my-account-' . $this->id . '-engagements',
|
326 |
+
'title' => __( 'Engagements', 'bbpress' ),
|
327 |
+
'href' => $my_engagements_link
|
328 |
+
);
|
329 |
+
}
|
330 |
+
|
331 |
// Favorites
|
332 |
+
if ( bbp_is_favorites_active() ) {
|
333 |
+
$wp_admin_nav[] = array(
|
334 |
+
'parent' => 'my-account-' . $this->id,
|
335 |
+
'id' => 'my-account-' . $this->id . '-favorites',
|
336 |
+
'title' => __( 'Favorite Topics', 'bbpress' ),
|
337 |
+
'href' => $my_favorites_link
|
338 |
+
);
|
339 |
+
}
|
340 |
|
341 |
// Subscriptions
|
342 |
+
if ( bbp_is_subscriptions_active() ) {
|
343 |
+
$wp_admin_nav[] = array(
|
344 |
+
'parent' => 'my-account-' . $this->id,
|
345 |
+
'id' => 'my-account-' . $this->id . '-subscriptions',
|
346 |
+
'title' => __( 'Subscribed Topics', 'bbpress' ),
|
347 |
+
'href' => $my_subscriptions_link
|
348 |
+
);
|
349 |
+
}
|
350 |
}
|
351 |
|
352 |
parent::setup_admin_bar( $wp_admin_nav );
|
includes/extend/buddypress/members.php
CHANGED
@@ -15,6 +15,7 @@ if ( ! class_exists( 'BBP_Forums_Members' ) ) :
|
|
15 |
* Member profile modifications
|
16 |
*
|
17 |
* @since 2.2.0 bbPress (r4395)
|
|
|
18 |
*
|
19 |
* @package bbPress
|
20 |
* @subpackage BuddyPress
|
@@ -62,15 +63,17 @@ class BBP_BuddyPress_Members {
|
|
62 |
* Setup the filters
|
63 |
*
|
64 |
* @since 2.2.0 bbPress (r4395)
|
|
|
65 |
*
|
66 |
* @access private
|
67 |
* @uses add_filter() To add various filters
|
68 |
* @uses add_action() To add various actions
|
69 |
*/
|
70 |
private function setup_filters() {
|
71 |
-
add_filter( 'bbp_pre_get_user_profile_url',
|
72 |
-
add_filter( '
|
73 |
-
add_filter( '
|
|
|
74 |
}
|
75 |
|
76 |
/** Filters ***************************************************************/
|
@@ -79,6 +82,7 @@ class BBP_BuddyPress_Members {
|
|
79 |
* Override bbPress profile URL with BuddyPress profile URL
|
80 |
*
|
81 |
* @since 2.0.0 bbPress (r3401)
|
|
|
82 |
*
|
83 |
* @param string $url
|
84 |
* @param int $user_id
|
@@ -95,17 +99,18 @@ class BBP_BuddyPress_Members {
|
|
95 |
// Define local variable(s)
|
96 |
$profile_url = '';
|
97 |
$component_slug = bbpress()->extend->buddypress->slug;
|
|
|
98 |
|
99 |
// Special handling for forum component
|
100 |
if ( bp_is_current_component( $component_slug ) ) {
|
101 |
|
102 |
// Empty action or 'topics' action
|
103 |
-
if ( !bp_current_action() || bp_is_current_action( bbp_get_topic_archive_slug() ) ) {
|
104 |
-
$profile_url =
|
105 |
|
106 |
// Empty action or 'topics' action
|
107 |
} elseif ( bp_is_current_action( bbp_get_reply_archive_slug() ) ) {
|
108 |
-
$profile_url =
|
109 |
|
110 |
// 'favorites' action
|
111 |
} elseif ( bbp_is_favorites_active() && bp_is_current_action( bbp_get_user_favorites_slug() ) ) {
|
@@ -114,11 +119,11 @@ class BBP_BuddyPress_Members {
|
|
114 |
// 'subscriptions' action
|
115 |
} elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) {
|
116 |
$profile_url = $this->get_subscriptions_permalink( '', $user_id );
|
117 |
-
}
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
122 |
}
|
123 |
|
124 |
return trailingslashit( $profile_url );
|
@@ -142,6 +147,7 @@ class BBP_BuddyPress_Members {
|
|
142 |
|
143 |
$component_slug = bbpress()->extend->buddypress->slug;
|
144 |
$url = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_favorites_slug() );
|
|
|
145 |
return $url;
|
146 |
}
|
147 |
|
@@ -163,6 +169,29 @@ class BBP_BuddyPress_Members {
|
|
163 |
|
164 |
$component_slug = bbpress()->extend->buddypress->slug;
|
165 |
$url = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_subscriptions_slug() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
return $url;
|
167 |
}
|
168 |
|
@@ -171,6 +200,7 @@ class BBP_BuddyPress_Members {
|
|
171 |
* pages.
|
172 |
*
|
173 |
* @since 2.3.0 bbPress (r4615)
|
|
|
174 |
*
|
175 |
* @global WP_Query $wp_query
|
176 |
* @return If not viewing your own profile
|
@@ -191,6 +221,10 @@ class BBP_BuddyPress_Members {
|
|
191 |
// 'subscriptions' action
|
192 |
} elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) {
|
193 |
$wp_query->bbp_is_single_user_subs = true;
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
}
|
196 |
}
|
15 |
* Member profile modifications
|
16 |
*
|
17 |
* @since 2.2.0 bbPress (r4395)
|
18 |
+
* @since 2.6.0 bbPress (r6320) Add engagements support
|
19 |
*
|
20 |
* @package bbPress
|
21 |
* @subpackage BuddyPress
|
63 |
* Setup the filters
|
64 |
*
|
65 |
* @since 2.2.0 bbPress (r4395)
|
66 |
+
* @since 2.6.0 bbPress (r6320) Add engagements support
|
67 |
*
|
68 |
* @access private
|
69 |
* @uses add_filter() To add various filters
|
70 |
* @uses add_action() To add various actions
|
71 |
*/
|
72 |
private function setup_filters() {
|
73 |
+
add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) );
|
74 |
+
add_filter( 'bbp_pre_get_user_engagements_url', array( $this, 'get_engagements_permalink' ) );
|
75 |
+
add_filter( 'bbp_get_favorites_permalink', array( $this, 'get_favorites_permalink' ), 10, 2 );
|
76 |
+
add_filter( 'bbp_get_subscriptions_permalink', array( $this, 'get_subscriptions_permalink' ), 10, 2 );
|
77 |
}
|
78 |
|
79 |
/** Filters ***************************************************************/
|
82 |
* Override bbPress profile URL with BuddyPress profile URL
|
83 |
*
|
84 |
* @since 2.0.0 bbPress (r3401)
|
85 |
+
* @since 2.6.0 bbPress (r6320) Add engagements support
|
86 |
*
|
87 |
* @param string $url
|
88 |
* @param int $user_id
|
99 |
// Define local variable(s)
|
100 |
$profile_url = '';
|
101 |
$component_slug = bbpress()->extend->buddypress->slug;
|
102 |
+
$profile_url = bp_core_get_user_domain( $user_id );
|
103 |
|
104 |
// Special handling for forum component
|
105 |
if ( bp_is_current_component( $component_slug ) ) {
|
106 |
|
107 |
// Empty action or 'topics' action
|
108 |
+
if ( ! bp_current_action() || bp_is_current_action( bbp_get_topic_archive_slug() ) ) {
|
109 |
+
$profile_url = $profile_url . $component_slug . '/' . bbp_get_topic_archive_slug();
|
110 |
|
111 |
// Empty action or 'topics' action
|
112 |
} elseif ( bp_is_current_action( bbp_get_reply_archive_slug() ) ) {
|
113 |
+
$profile_url = $profile_url . $component_slug . '/' . bbp_get_reply_archive_slug();
|
114 |
|
115 |
// 'favorites' action
|
116 |
} elseif ( bbp_is_favorites_active() && bp_is_current_action( bbp_get_user_favorites_slug() ) ) {
|
119 |
// 'subscriptions' action
|
120 |
} elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) {
|
121 |
$profile_url = $this->get_subscriptions_permalink( '', $user_id );
|
|
|
122 |
|
123 |
+
// 'engagements' action
|
124 |
+
} elseif ( bbp_is_engagements_active() && bp_is_current_action( bbp_get_user_engagements_slug() ) ) {
|
125 |
+
$profile_url = $this->get_engagements_permalink( $user_id );
|
126 |
+
}
|
127 |
}
|
128 |
|
129 |
return trailingslashit( $profile_url );
|
147 |
|
148 |
$component_slug = bbpress()->extend->buddypress->slug;
|
149 |
$url = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_favorites_slug() );
|
150 |
+
|
151 |
return $url;
|
152 |
}
|
153 |
|
169 |
|
170 |
$component_slug = bbpress()->extend->buddypress->slug;
|
171 |
$url = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_subscriptions_slug() );
|
172 |
+
|
173 |
+
return $url;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Override bbPress engagements URL with BuddyPress profile URL
|
178 |
+
*
|
179 |
+
* @since 2.6.0 bbPress (r6320)
|
180 |
+
*
|
181 |
+
* @param string $url
|
182 |
+
* @param int $user_id
|
183 |
+
* @return string
|
184 |
+
*/
|
185 |
+
public function get_engagements_permalink( $user_id ) {
|
186 |
+
|
187 |
+
// Do not filter if not on BuddyPress root blog
|
188 |
+
if ( ! bp_is_root_blog() ) {
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
$component_slug = bbpress()->extend->buddypress->slug;
|
193 |
+
$url = trailingslashit( bp_core_get_user_domain( $user_id ) . $component_slug . '/' . bbp_get_user_engagements_slug() );
|
194 |
+
|
195 |
return $url;
|
196 |
}
|
197 |
|
200 |
* pages.
|
201 |
*
|
202 |
* @since 2.3.0 bbPress (r4615)
|
203 |
+
* @since 2.6.0 bbPress (r6320) Add engagements support
|
204 |
*
|
205 |
* @global WP_Query $wp_query
|
206 |
* @return If not viewing your own profile
|
221 |
// 'subscriptions' action
|
222 |
} elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) {
|
223 |
$wp_query->bbp_is_single_user_subs = true;
|
224 |
+
|
225 |
+
// 'engagements' action
|
226 |
+
} elseif ( bbp_is_engagements_active() && bp_is_current_action( bbp_get_user_engagements_slug() ) ) {
|
227 |
+
$wp_query->bbp_is_single_user_engagements = true;
|
228 |
}
|
229 |
}
|
230 |
}
|
includes/extend/buddypress/notifications.php
CHANGED
@@ -12,7 +12,7 @@ defined( 'ABSPATH' ) || exit;
|
|
12 |
|
13 |
// Hooks
|
14 |
add_filter( 'bp_notifications_get_registered_components', 'bbp_filter_notifications_get_registered_components', 10 );
|
15 |
-
add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10,
|
16 |
add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10, 7 );
|
17 |
add_action( 'bbp_get_request', 'bbp_buddypress_mark_notifications', 1 );
|
18 |
|
@@ -49,50 +49,66 @@ function bbp_filter_notifications_get_registered_components( $component_names =
|
|
49 |
*
|
50 |
* @package bbPress
|
51 |
*
|
52 |
-
* @param string $action
|
53 |
-
*
|
54 |
-
* @param int
|
55 |
-
* @param int
|
56 |
-
* @param
|
|
|
|
|
|
|
|
|
57 |
*/
|
58 |
-
function bbp_format_buddypress_notifications( $
|
59 |
|
60 |
// Bail if not the notification action we are looking for
|
61 |
-
if ( 'bbp_new_reply' !== $
|
62 |
-
return $
|
63 |
}
|
64 |
|
65 |
// New reply notifications
|
66 |
$topic_id = bbp_get_reply_topic_id( $item_id );
|
67 |
$topic_title = bbp_get_topic_title( $topic_id );
|
68 |
-
$topic_link = wp_nonce_url(
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
72 |
-
|
73 |
$filter = 'bbp_multiple_new_subscription_notification';
|
|
|
|
|
|
|
74 |
} else {
|
75 |
-
if ( ! empty( $secondary_item_id ) ) {
|
76 |
-
$text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
|
77 |
-
} else {
|
78 |
-
$text = sprintf( __( 'You have %d new reply to %s', 'bbpress' ), (int) $total_items, $topic_title );
|
79 |
-
}
|
80 |
$filter = 'bbp_single_new_subscription_notification';
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
// WordPress Toolbar
|
84 |
if ( 'string' === $format ) {
|
85 |
-
$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' .
|
86 |
|
87 |
// Deprecated BuddyBar
|
88 |
} else {
|
89 |
$return = apply_filters( $filter, array(
|
90 |
'text' => $text,
|
91 |
'link' => $topic_link
|
92 |
-
), $topic_link,
|
93 |
}
|
94 |
|
95 |
-
do_action( 'bbp_format_buddypress_notifications', $
|
96 |
|
97 |
return $return;
|
98 |
}
|
@@ -111,7 +127,7 @@ function bbp_format_buddypress_notifications( $action, $item_id, $secondary_item
|
|
111 |
* @param bool $is_edit Used to bail if this gets hooked to an edit action
|
112 |
* @param int $reply_to
|
113 |
*/
|
114 |
-
function bbp_buddypress_add_notification( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data =
|
115 |
|
116 |
// Bail if somehow this is hooked to an edit action
|
117 |
if ( ! empty( $is_edit ) ) {
|
@@ -179,7 +195,7 @@ function bbp_buddypress_mark_notifications( $action = '' ) {
|
|
179 |
bbp_add_error( 'bbp_notification_topic_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
|
180 |
|
181 |
// Check current user's ability to edit the user
|
182 |
-
} elseif ( !current_user_can( 'edit_user', $user_id ) ) {
|
183 |
bbp_add_error( 'bbp_notification_permission', __( '<strong>ERROR</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
|
184 |
}
|
185 |
|
12 |
|
13 |
// Hooks
|
14 |
add_filter( 'bp_notifications_get_registered_components', 'bbp_filter_notifications_get_registered_components', 10 );
|
15 |
+
add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10, 8 );
|
16 |
add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10, 7 );
|
17 |
add_action( 'bbp_get_request', 'bbp_buddypress_mark_notifications', 1 );
|
18 |
|
49 |
*
|
50 |
* @package bbPress
|
51 |
*
|
52 |
+
* @param string $content Component action. Deprecated. Do not do checks against this! Use
|
53 |
+
* the 6th parameter instead - $component_action_name.
|
54 |
+
* @param int $item_id Notification item ID.
|
55 |
+
* @param int $secondary_item_id Notification secondary item ID.
|
56 |
+
* @param int $action_item_count Number of notifications with the same action.
|
57 |
+
* @param string $format Format of return. Either 'string' or 'object'.
|
58 |
+
* @param string $component_action_name Canonical notification action.
|
59 |
+
* @param string $component_name Notification component ID.
|
60 |
+
* @param int $id Notification ID.
|
61 |
*/
|
62 |
+
function bbp_format_buddypress_notifications( $content, $item_id, $secondary_item_id, $action_item_count, $format, $component_action_name, $component_name, $id ) {
|
63 |
|
64 |
// Bail if not the notification action we are looking for
|
65 |
+
if ( 'bbp_new_reply' !== $component_action_name ) {
|
66 |
+
return $component_action_name;
|
67 |
}
|
68 |
|
69 |
// New reply notifications
|
70 |
$topic_id = bbp_get_reply_topic_id( $item_id );
|
71 |
$topic_title = bbp_get_topic_title( $topic_id );
|
72 |
+
$topic_link = wp_nonce_url(
|
73 |
+
add_query_arg(
|
74 |
+
array(
|
75 |
+
'action' => 'bbp_mark_read',
|
76 |
+
'topic_id' => $topic_id
|
77 |
+
),
|
78 |
+
bbp_get_reply_url( $item_id )
|
79 |
+
),
|
80 |
+
'bbp_mark_topic_' . $topic_id
|
81 |
+
);
|
82 |
+
|
83 |
+
// Cast to int
|
84 |
+
$action_item_count = (int) $action_item_count;
|
85 |
|
86 |
+
// Multiple
|
87 |
+
if ( $action_item_count > 1 ) {
|
88 |
$filter = 'bbp_multiple_new_subscription_notification';
|
89 |
+
$text = sprintf( __( 'You have %d new replies', 'bbpress' ), $action_item_count );
|
90 |
+
|
91 |
+
// Single
|
92 |
} else {
|
|
|
|
|
|
|
|
|
|
|
93 |
$filter = 'bbp_single_new_subscription_notification';
|
94 |
+
$text = ! empty( $secondary_item_id )
|
95 |
+
? sprintf( __( '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( __( 'You have %d new reply to %s', 'bbpress' ), $action_item_count, $topic_title );
|
97 |
}
|
98 |
|
99 |
// WordPress Toolbar
|
100 |
if ( 'string' === $format ) {
|
101 |
+
$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr__( 'Topic Replies', 'bbpress' ) . '">' . esc_html( $text ) . '</a>', $action_item_count, $text, $topic_link );
|
102 |
|
103 |
// Deprecated BuddyBar
|
104 |
} else {
|
105 |
$return = apply_filters( $filter, array(
|
106 |
'text' => $text,
|
107 |
'link' => $topic_link
|
108 |
+
), $topic_link, $action_item_count, $text, $topic_title );
|
109 |
}
|
110 |
|
111 |
+
do_action( 'bbp_format_buddypress_notifications', $component_action_name, $item_id, $secondary_item_id, $action_item_count, $format, $component_action_name, $component_name, $id );
|
112 |
|
113 |
return $return;
|
114 |
}
|
127 |
* @param bool $is_edit Used to bail if this gets hooked to an edit action
|
128 |
* @param int $reply_to
|
129 |
*/
|
130 |
+
function bbp_buddypress_add_notification( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $author_id = 0, $is_edit = false, $reply_to = 0 ) {
|
131 |
|
132 |
// Bail if somehow this is hooked to an edit action
|
133 |
if ( ! empty( $is_edit ) ) {
|
195 |
bbp_add_error( 'bbp_notification_topic_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
|
196 |
|
197 |
// Check current user's ability to edit the user
|
198 |
+
} elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
|
199 |
bbp_add_error( 'bbp_notification_permission', __( '<strong>ERROR</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
|
200 |
}
|
201 |
|
includes/forums/capabilities.php
CHANGED
@@ -18,7 +18,9 @@
|
|
18 |
* @return array Forum capabilities
|
19 |
*/
|
20 |
function bbp_get_forum_caps() {
|
21 |
-
|
|
|
|
|
22 |
'edit_posts' => 'edit_forums',
|
23 |
'edit_others_posts' => 'edit_others_forums',
|
24 |
'publish_posts' => 'publish_forums',
|
@@ -84,7 +86,19 @@ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
|
|
84 |
} elseif ( (int) $user_id === (int) $_post->post_author ) {
|
85 |
$caps = array( 'spectate' );
|
86 |
|
87 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
} else {
|
89 |
$caps = array( $post_type->cap->read_private_posts );
|
90 |
}
|
@@ -130,19 +144,22 @@ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
|
|
130 |
|
131 |
// Get caps for post type object
|
132 |
$post_type = get_post_type_object( $_post->post_type );
|
133 |
-
$caps = array();
|
134 |
|
135 |
// Add 'do_not_allow' cap if user is spam or deleted
|
136 |
if ( bbp_is_user_inactive( $user_id ) ) {
|
137 |
-
$caps
|
138 |
|
139 |
// User is author so allow edit if not in admin
|
140 |
} elseif ( ! is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
|
141 |
-
$caps
|
|
|
|
|
|
|
|
|
142 |
|
143 |
// Unknown, so map to edit_others_posts
|
144 |
} else {
|
145 |
-
$caps
|
146 |
}
|
147 |
}
|
148 |
|
@@ -159,19 +176,18 @@ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
|
|
159 |
|
160 |
// Get caps for post type object
|
161 |
$post_type = get_post_type_object( $_post->post_type );
|
162 |
-
$caps = array();
|
163 |
|
164 |
// Add 'do_not_allow' cap if user is spam or deleted
|
165 |
if ( bbp_is_user_inactive( $user_id ) ) {
|
166 |
-
$caps
|
167 |
|
168 |
// User is author so allow to delete
|
169 |
} elseif ( (int) $user_id === (int) $_post->post_author ) {
|
170 |
-
$caps
|
171 |
|
172 |
// Unknown so map to delete_others_posts
|
173 |
} else {
|
174 |
-
$caps
|
175 |
}
|
176 |
}
|
177 |
|
@@ -185,7 +201,8 @@ function bbp_map_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $arg
|
|
185 |
break;
|
186 |
}
|
187 |
|
188 |
-
|
|
|
189 |
}
|
190 |
|
191 |
/**
|
@@ -224,32 +241,62 @@ function bbp_get_moderator_forum_ids( $user_id = 0 ) {
|
|
224 |
* @param int $forum_id Forum id.
|
225 |
* @uses bbp_get_user_id()
|
226 |
* @uses bbp_get_forum_id()
|
227 |
-
* @uses
|
228 |
* @uses apply_filters() Calls 'bbp_is_user_forum_moderator' with the forums
|
229 |
*
|
230 |
* @return bool Return true if user is moderator of forum
|
231 |
*/
|
232 |
function bbp_is_user_forum_moderator( $user_id = 0, $forum_id = 0 ) {
|
233 |
|
234 |
-
// Assume user cannot moderate the forum.
|
235 |
-
$retval = false;
|
236 |
-
|
237 |
// Validate user ID - fallback to current user if no ID passed.
|
238 |
-
$user_id
|
239 |
-
$forum_id
|
240 |
-
$forum_ids = array();
|
241 |
|
242 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
if ( bbp_allow_forum_mods() ) {
|
244 |
|
245 |
-
//
|
246 |
-
$forum_ids
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
|
|
251 |
}
|
252 |
}
|
253 |
|
254 |
-
|
|
|
255 |
}
|
18 |
* @return array Forum capabilities
|
19 |
*/
|
20 |
function bbp_get_forum_caps() {
|
21 |
+
|
22 |
+
// Filter & return
|
23 |
+
return (array) apply_filters( 'bbp_get_forum_caps', array (
|
24 |
'edit_posts' => 'edit_forums',
|
25 |
'edit_others_posts' => 'edit_others_forums',
|
26 |
'publish_posts' => 'publish_forums',
|
86 |
} elseif ( (int) $user_id === (int) $_post->post_author ) {
|
87 |
$caps = array( 'spectate' );
|
88 |
|
89 |
+
// Moderators can always read forum content
|
90 |
+
} elseif ( user_can( $user_id, 'moderate', $_post->ID ) ) {
|
91 |
+
$caps = array( 'spectate' );
|
92 |
+
|
93 |
+
// Private
|
94 |
+
} elseif ( bbp_get_hidden_status_id() === $_post->post_status ) {
|
95 |
+
$caps = array( $post_type->cap->read_hidden_posts );
|
96 |
+
|
97 |
+
// Hidden
|
98 |
+
} elseif ( bbp_get_private_status_id() === $_post->post_status ) {
|
99 |
+
$caps = array( $post_type->cap->read_private_posts );
|
100 |
+
|
101 |
+
// Unknown, so map to private
|
102 |
} else {
|
103 |
$caps = array( $post_type->cap->read_private_posts );
|
104 |
}
|
144 |
|
145 |
// Get caps for post type object
|
146 |
$post_type = get_post_type_object( $_post->post_type );
|
|
|
147 |
|
148 |
// Add 'do_not_allow' cap if user is spam or deleted
|
149 |
if ( bbp_is_user_inactive( $user_id ) ) {
|
150 |
+
$caps = array( 'do_not_allow' );
|
151 |
|
152 |
// User is author so allow edit if not in admin
|
153 |
} elseif ( ! is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
|
154 |
+
$caps = array( $post_type->cap->edit_posts );
|
155 |
+
|
156 |
+
// Moderators can always read forum content
|
157 |
+
} elseif ( user_can( $user_id, 'moderate', $_post->ID ) ) {
|
158 |
+
$caps = array( 'spectate' );
|
159 |
|
160 |
// Unknown, so map to edit_others_posts
|
161 |
} else {
|
162 |
+
$caps = array( $post_type->cap->edit_others_posts );
|
163 |
}
|
164 |
}
|
165 |
|
176 |
|
177 |
// Get caps for post type object
|
178 |
$post_type = get_post_type_object( $_post->post_type );
|
|
|
179 |
|
180 |
// Add 'do_not_allow' cap if user is spam or deleted
|
181 |
if ( bbp_is_user_inactive( $user_id ) ) {
|
182 |
+
$caps = array( 'do_not_allow' );
|
183 |
|
184 |
// User is author so allow to delete
|
185 |
} elseif ( (int) $user_id === (int) $_post->post_author ) {
|
186 |
+
$caps = array( $post_type->cap->delete_posts );
|
187 |
|
188 |
// Unknown so map to delete_others_posts
|
189 |
} else {
|
190 |
+
$caps = array( $post_type->cap->delete_others_posts );
|
191 |
}
|
192 |
}
|
193 |
|
201 |
break;
|
202 |
}
|
203 |
|
204 |
+
// Filter & return
|
205 |
+
return (array) apply_filters( 'bbp_map_forum_meta_caps', $caps, $cap, $user_id, $args );
|
206 |
}
|
207 |
|
208 |
/**
|
241 |
* @param int $forum_id Forum id.
|
242 |
* @uses bbp_get_user_id()
|
243 |
* @uses bbp_get_forum_id()
|
244 |
+
* @uses bbp_is_object_of_user()
|
245 |
* @uses apply_filters() Calls 'bbp_is_user_forum_moderator' with the forums
|
246 |
*
|
247 |
* @return bool Return true if user is moderator of forum
|
248 |
*/
|
249 |
function bbp_is_user_forum_moderator( $user_id = 0, $forum_id = 0 ) {
|
250 |
|
|
|
|
|
|
|
251 |
// Validate user ID - fallback to current user if no ID passed.
|
252 |
+
$user_id = bbp_get_user_id( $user_id, false, ! empty( $user_id ) );
|
253 |
+
$forum_id = bbp_get_forum_id( $forum_id );
|
|
|
254 |
|
255 |
+
// Check if per-forum moderation is enabled, or assume false
|
256 |
+
$retval = bbp_allow_forum_mods()
|
257 |
+
? bbp_is_object_of_user( $forum_id, $user_id, '_bbp_moderator_id' )
|
258 |
+
: false;
|
259 |
+
|
260 |
+
// Filter & return
|
261 |
+
return (bool) apply_filters( 'bbp_is_user_forum_moderator', $retval, $user_id, $forum_id );
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Filter an array of forum IDs that are being excluded, and remove any forum
|
266 |
+
* IDs a user explicitly has access to.
|
267 |
+
*
|
268 |
+
* This typically means private or hidden forums the user has moderation rights
|
269 |
+
* to, but it can be filtered to mean just about anything.
|
270 |
+
*
|
271 |
+
* This function filters the return values of the following functions:
|
272 |
+
* - `bbp_get_private_forum_ids()`
|
273 |
+
* - `bbp_get_hidden_forum_ids()`
|
274 |
+
*
|
275 |
+
* @since 2.6.0 bbPress (r6426)
|
276 |
+
*
|
277 |
+
* @param array $forum_ids Forum IDs to check if the user ID is a moderator of
|
278 |
+
* @param int $user_id User ID to check if is a moderator of forums
|
279 |
+
*
|
280 |
+
* @return array
|
281 |
+
*/
|
282 |
+
function bbp_allow_forums_of_user( $forum_ids = array(), $user_id = 0 ) {
|
283 |
+
|
284 |
+
// Store the original forum IDs
|
285 |
+
$original_forum_ids = $forum_ids;
|
286 |
+
|
287 |
+
// Per-forum Moderators
|
288 |
if ( bbp_allow_forum_mods() ) {
|
289 |
|
290 |
+
// Loop through forum IDs
|
291 |
+
foreach ( $forum_ids as $key => $forum_id ) {
|
292 |
|
293 |
+
// Unset forum ID if user is a moderator
|
294 |
+
if ( bbp_is_user_forum_moderator( $user_id, $forum_id ) ) {
|
295 |
+
unset( $forum_ids[ $key ] );
|
296 |
+
}
|
297 |
}
|
298 |
}
|
299 |
|
300 |
+
// Filter & return
|
301 |
+
return (array) apply_filters( 'bbp_allow_forums_of_user', $forum_ids, $user_id, $original_forum_ids );
|
302 |
}
|
includes/forums/functions.php
CHANGED
@@ -42,7 +42,7 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
42 |
), 'insert_forum' );
|
43 |
|
44 |
// Insert forum
|
45 |
-
$forum_id = wp_insert_post( $forum_data );
|
46 |
|
47 |
// Bail if no forum was added
|
48 |
if ( empty( $forum_id ) ) {
|
@@ -51,6 +51,8 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
51 |
|
52 |
// Forum meta
|
53 |
$forum_meta = bbp_parse_args( $forum_meta, array(
|
|
|
|
|
54 |
'reply_count' => 0,
|
55 |
'topic_count' => 0,
|
56 |
'topic_count_hidden' => 0,
|
@@ -65,12 +67,19 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
65 |
|
66 |
// Insert forum meta
|
67 |
foreach ( $forum_meta as $meta_key => $meta_value ) {
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
// Update the forum and hierarchy
|
72 |
bbp_update_forum( array(
|
73 |
-
'forum_id' => $forum_id
|
74 |
) );
|
75 |
|
76 |
/**
|
@@ -82,7 +91,7 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
82 |
*/
|
83 |
do_action( 'bbp_insert_forum', (int) $forum_id );
|
84 |
|
85 |
-
// Return
|
86 |
return $forum_id;
|
87 |
}
|
88 |
|
@@ -97,8 +106,6 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
97 |
* @uses bbp_is_anonymous() To check if an anonymous post is being made
|
98 |
* @uses current_user_can() To check if the current user can publish forum
|
99 |
* @uses bbp_get_current_user_id() To get the current user id
|
100 |
-
* @uses bbp_filter_anonymous_post_data() To filter anonymous data
|
101 |
-
* @uses bbp_set_current_anonymous_user_data() To set the anonymous user cookies
|
102 |
* @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
|
103 |
* @uses bbp_is_forum_category() To check if the forum is a category
|
104 |
* @uses bbp_is_forum_closed() To check if the forum is closed
|
@@ -110,11 +117,8 @@ function bbp_insert_forum( $forum_data = array(), $forum_meta = array() ) {
|
|
110 |
* @uses apply_filters() Calls 'bbp_new_forum_pre_title' with the content
|
111 |
* @uses apply_filters() Calls 'bbp_new_forum_pre_content' with the content
|
112 |
* @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors
|
113 |
-
* @uses wp_insert_post() To insert the forum
|
114 |
* @uses do_action() Calls 'bbp_new_forum' with the forum id, forum id,
|
115 |
* anonymous data and reply author
|
116 |
-
* @uses bbp_stick_forum() To stick or super stick the forum
|
117 |
-
* @uses bbp_unstick_forum() To unstick the forum
|
118 |
* @uses bbp_get_forum_permalink() To get the forum permalink
|
119 |
* @uses bbp_redirect() To redirect to the forum link
|
120 |
* @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error
|
@@ -134,14 +138,15 @@ function bbp_new_forum_handler( $action = '' ) {
|
|
134 |
}
|
135 |
|
136 |
// Define local variable(s)
|
137 |
-
$view_all =
|
138 |
$forum_parent_id = $forum_author = 0;
|
139 |
$forum_title = $forum_content = '';
|
|
|
140 |
|
141 |
/** Forum Author **********************************************************/
|
142 |
|
143 |
// User cannot create forums
|
144 |
-
if ( !current_user_can( 'publish_forums' ) ) {
|
145 |
bbp_add_error( 'bbp_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );
|
146 |
return;
|
147 |
}
|
@@ -207,17 +212,17 @@ function bbp_new_forum_handler( $action = '' ) {
|
|
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( '
|
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( '
|
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 |
}
|
@@ -271,7 +276,7 @@ function bbp_new_forum_handler( $action = '' ) {
|
|
271 |
) );
|
272 |
|
273 |
// Insert forum
|
274 |
-
$forum_id = wp_insert_post( $forum_data );
|
275 |
|
276 |
/** No Errors *************************************************************/
|
277 |
|
@@ -346,10 +351,15 @@ function bbp_new_forum_handler( $action = '' ) {
|
|
346 |
// Redirect back to new forum
|
347 |
bbp_redirect( $redirect_url );
|
348 |
|
349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
} else {
|
351 |
-
|
352 |
-
bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your forum:' . $append_error, 'bbpress' ) );
|
353 |
}
|
354 |
}
|
355 |
|
@@ -362,7 +372,6 @@ function bbp_new_forum_handler( $action = '' ) {
|
|
362 |
* @uses bbp_verify_nonce_request() To verify the nonce and check the request
|
363 |
* @uses bbp_is_forum_anonymous() To check if forum is by an anonymous user
|
364 |
* @uses current_user_can() To check if the current user can edit the forum
|
365 |
-
* @uses bbp_filter_anonymous_post_data() To filter anonymous data
|
366 |
* @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
|
367 |
* @uses bbp_is_forum_category() To check if the forum is a category
|
368 |
* @uses bbp_is_forum_closed() To check if the forum is closed
|
@@ -421,7 +430,7 @@ function bbp_edit_forum_handler( $action = '' ) {
|
|
421 |
return;
|
422 |
|
423 |
// User cannot edit this forum
|
424 |
-
} elseif ( !current_user_can( 'edit_forum', $forum_id ) ) {
|
425 |
bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
|
426 |
return;
|
427 |
}
|
@@ -447,17 +456,17 @@ function bbp_edit_forum_handler( $action = '' ) {
|
|
447 |
if ( ! empty( $forum_parent_id ) && ( $forum_parent_id !== $current_parent_forum_id ) ) {
|
448 |
|
449 |
// Forum is closed and user cannot access
|
450 |
-
if ( bbp_is_forum_closed( $forum_parent_id ) && !current_user_can( 'edit_forum', $forum_parent_id ) ) {
|
451 |
bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
|
452 |
}
|
453 |
|
454 |
// Forum is private and user cannot access
|
455 |
-
if ( bbp_is_forum_private( $forum_parent_id ) && !current_user_can( '
|
456 |
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' ) );
|
457 |
}
|
458 |
|
459 |
// Forum is hidden and user cannot access
|
460 |
-
if ( bbp_is_forum_hidden( $forum_parent_id ) && !current_user_can( '
|
461 |
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' ) );
|
462 |
}
|
463 |
}
|
@@ -527,25 +536,6 @@ function bbp_edit_forum_handler( $action = '' ) {
|
|
527 |
// Insert forum
|
528 |
$forum_id = wp_update_post( $forum_data );
|
529 |
|
530 |
-
/** Revisions *************************************************************/
|
531 |
-
|
532 |
-
/**
|
533 |
-
* @todo omitted for 2.1
|
534 |
-
// Revision Reason
|
535 |
-
if ( ! empty( $_POST['bbp_forum_edit_reason'] ) )
|
536 |
-
$forum_edit_reason = sanitize_text_field( $_POST['bbp_forum_edit_reason'] );
|
537 |
-
|
538 |
-
// Update revision log
|
539 |
-
if ( ! empty( $_POST['bbp_log_forum_edit'] ) && ( "1" === $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) {
|
540 |
-
bbp_update_forum_revision_log( array(
|
541 |
-
'forum_id' => $forum_id,
|
542 |
-
'revision_id' => $revision_id,
|
543 |
-
'author_id' => bbp_get_current_user_id(),
|
544 |
-
'reason' => $forum_edit_reason
|
545 |
-
) );
|
546 |
-
}
|
547 |
-
*/
|
548 |
-
|
549 |
/** No Errors *************************************************************/
|
550 |
|
551 |
if ( ! empty( $forum_id ) && ! is_wp_error( $forum_id ) ) {
|
@@ -562,12 +552,37 @@ function bbp_edit_forum_handler( $action = '' ) {
|
|
562 |
'last_active_status' => bbp_get_public_status_id()
|
563 |
) );
|
564 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
// If the new forum parent id is not equal to the old forum parent
|
566 |
// id, run the bbp_move_forum action and pass the forum's parent id
|
567 |
-
// as the first
|
568 |
// @todo implement
|
569 |
-
|
570 |
-
|
|
|
|
|
|
|
571 |
|
572 |
/** Additional Actions (After Save) ***********************************/
|
573 |
|
@@ -638,7 +653,7 @@ function bbp_save_forum_extras( $forum_id = 0 ) {
|
|
638 |
|
639 |
/** Forum Status **********************************************************/
|
640 |
|
641 |
-
if ( ! empty( $_POST['bbp_forum_status'] ) && in_array( $_POST['bbp_forum_status'], array( 'open', 'closed' ) ) ) {
|
642 |
if ( 'closed' === $_POST['bbp_forum_status'] && ! bbp_is_forum_closed( $forum_id, false ) ) {
|
643 |
bbp_close_forum( $forum_id );
|
644 |
} elseif ( 'open' === $_POST['bbp_forum_status'] && bbp_is_forum_open( $forum_id, false ) ) {
|
@@ -650,7 +665,7 @@ function bbp_save_forum_extras( $forum_id = 0 ) {
|
|
650 |
|
651 |
/** Forum Type ************************************************************/
|
652 |
|
653 |
-
if ( ! empty( $_POST['bbp_forum_type'] ) && in_array( $_POST['bbp_forum_type'], array( 'forum', 'category' ) ) ) {
|
654 |
if ( 'category' === $_POST['bbp_forum_type'] && ! bbp_is_forum_category( $forum_id ) ) {
|
655 |
bbp_categorize_forum( $forum_id );
|
656 |
} elseif ( 'forum' === $_POST['bbp_forum_type'] && ! bbp_is_forum_category( $forum_id ) ) {
|
@@ -662,7 +677,7 @@ function bbp_save_forum_extras( $forum_id = 0 ) {
|
|
662 |
|
663 |
/** Forum Visibility ******************************************************/
|
664 |
|
665 |
-
if ( ! empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array_keys( bbp_get_forum_visibilities() ) ) ) {
|
666 |
|
667 |
// Get forums current visibility
|
668 |
$old_visibility = bbp_get_forum_visibility( $forum_id );
|
@@ -709,13 +724,7 @@ function bbp_save_forum_extras( $forum_id = 0 ) {
|
|
709 |
if ( current_user_can( 'assign_moderators' ) && ! empty( $_POST['bbp_moderators'] ) ) {
|
710 |
|
711 |
// Escape tag input
|
712 |
-
$users
|
713 |
-
|
714 |
-
// Explode by comma
|
715 |
-
$users = strstr( $users, ',' )
|
716 |
-
? explode( ',', $users )
|
717 |
-
: (array) $users;
|
718 |
-
|
719 |
$user_ids = bbp_get_user_ids_from_nicenames( $users );
|
720 |
|
721 |
// Update forum moderators
|
@@ -855,30 +864,30 @@ function bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
855 |
$private = bbp_get_private_forum_ids();
|
856 |
|
857 |
// Find this forum in the array
|
858 |
-
if ( in_array( $forum_id, $private ) ) {
|
859 |
|
860 |
-
$offset = array_search( $forum_id, $private );
|
861 |
|
862 |
// Splice around it
|
863 |
array_splice( $private, $offset, 1 );
|
864 |
|
865 |
// Update private forums minus this one
|
866 |
-
update_option( '_bbp_private_forums',
|
867 |
}
|
868 |
|
869 |
// Get hidden forums
|
870 |
$hidden = bbp_get_hidden_forum_ids();
|
871 |
|
872 |
// Find this forum in the array
|
873 |
-
if ( in_array( $forum_id, $hidden ) ) {
|
874 |
|
875 |
-
$offset = array_search( $forum_id, $hidden );
|
876 |
|
877 |
// Splice around it
|
878 |
array_splice( $hidden, $offset, 1 );
|
879 |
|
880 |
// Update hidden forums minus this one
|
881 |
-
update_option( '_bbp_hidden_forums',
|
882 |
}
|
883 |
|
884 |
// Only run queries if visibility is changing
|
@@ -916,21 +925,21 @@ function bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
916 |
$hidden = bbp_get_hidden_forum_ids();
|
917 |
|
918 |
// Find this forum in the array
|
919 |
-
if ( in_array( $forum_id, $hidden ) ) {
|
920 |
|
921 |
-
$offset = array_search( $forum_id, $hidden );
|
922 |
|
923 |
// Splice around it
|
924 |
array_splice( $hidden, $offset, 1 );
|
925 |
|
926 |
// Update hidden forums minus this one
|
927 |
-
update_option( '_bbp_hidden_forums',
|
928 |
}
|
929 |
|
930 |
// Add to '_bbp_private_forums' site option
|
931 |
$private = bbp_get_private_forum_ids();
|
932 |
$private[] = $forum_id;
|
933 |
-
update_option( '_bbp_private_forums',
|
934 |
|
935 |
// Update forums visibility setting
|
936 |
$bbp_db = bbp_db();
|
@@ -966,21 +975,21 @@ function bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) {
|
|
966 |
$private = bbp_get_private_forum_ids();
|
967 |
|
968 |
// Find this forum in the array
|
969 |
-
if ( in_array( $forum_id, $private ) ) {
|
970 |
|
971 |
-
$offset = array_search( $forum_id, $private );
|
972 |
|
973 |
// Splice around it
|
974 |
array_splice( $private, $offset, 1 );
|
975 |
|
976 |
// Update private forums minus this one
|
977 |
-
update_option( '_bbp_private_forums',
|
978 |
}
|
979 |
|
980 |
// Add to '_bbp_hidden_forums' site option
|
981 |
$hidden = bbp_get_hidden_forum_ids();
|
982 |
$hidden[] = $forum_id;
|
983 |
-
update_option( '_bbp_hidden_forums',
|
984 |
|
985 |
// Update forums visibility setting
|
986 |
$bbp_db = bbp_db();
|
@@ -1020,7 +1029,7 @@ function bbp_repair_forum_visibility() {
|
|
1020 |
*/
|
1021 |
remove_action( 'pre_get_posts', 'bbp_pre_get_posts_normalize_forum_visibility', 4 );
|
1022 |
|
1023 |
-
//
|
1024 |
$private_forums = new WP_Query( array(
|
1025 |
'suppress_filters' => true,
|
1026 |
'nopaging' => true,
|
@@ -1029,6 +1038,8 @@ function bbp_repair_forum_visibility() {
|
|
1029 |
'post_status' => bbp_get_private_status_id(),
|
1030 |
'fields' => 'ids'
|
1031 |
) );
|
|
|
|
|
1032 |
$hidden_forums = new WP_Query( array(
|
1033 |
'suppress_filters' => true,
|
1034 |
'nopaging' => true,
|
@@ -1044,14 +1055,15 @@ function bbp_repair_forum_visibility() {
|
|
1044 |
// Reset the $post global
|
1045 |
wp_reset_postdata();
|
1046 |
|
1047 |
-
//
|
1048 |
-
if ( is_wp_error( $private_forums )
|
1049 |
-
|
1050 |
}
|
1051 |
|
1052 |
-
//
|
1053 |
-
|
1054 |
-
|
|
|
1055 |
|
1056 |
// Complete results
|
1057 |
return true;
|
@@ -1159,6 +1171,7 @@ function bbp_bump_forum_topic_count( $forum_id = 0, $difference = 1, $update_anc
|
|
1159 |
|
1160 |
$forum_topic_count = (int) ( $total_topic_count + $difference );
|
1161 |
|
|
|
1162 |
return (int) apply_filters( 'bbp_bump_forum_topic_count', $forum_topic_count, $forum_id, $difference, $update_ancestors );
|
1163 |
}
|
1164 |
|
@@ -1259,6 +1272,7 @@ function bbp_bump_forum_topic_count_hidden( $forum_id = 0, $difference = 1 ) {
|
|
1259 |
// Update this forum id
|
1260 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', $new_count );
|
1261 |
|
|
|
1262 |
return (int) apply_filters( 'bbp_bump_forum_topic_count_hidden', $new_count, $forum_id, $difference );
|
1263 |
}
|
1264 |
|
@@ -1377,6 +1391,7 @@ function bbp_bump_forum_reply_count( $forum_id = 0, $difference = 1, $update_anc
|
|
1377 |
|
1378 |
$forum_reply_count = (int) ( $total_reply_count + $difference );
|
1379 |
|
|
|
1380 |
return (int) apply_filters( 'bbp_bump_forum_reply_count', $forum_reply_count, $forum_id, $difference, $update_ancestors );
|
1381 |
}
|
1382 |
|
@@ -1546,6 +1561,7 @@ function bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) {
|
|
1546 |
update_post_meta( $forum_id, '_bbp_last_topic_id', $topic_id );
|
1547 |
}
|
1548 |
|
|
|
1549 |
return (int) apply_filters( 'bbp_update_forum_last_topic_id', $topic_id, $forum_id );
|
1550 |
}
|
1551 |
|
@@ -1611,6 +1627,7 @@ function bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) {
|
|
1611 |
update_post_meta( $forum_id, '_bbp_last_reply_id', $reply_id );
|
1612 |
}
|
1613 |
|
|
|
1614 |
return (int) apply_filters( 'bbp_update_forum_last_reply_id', $reply_id, $forum_id );
|
1615 |
}
|
1616 |
|
@@ -1678,6 +1695,7 @@ function bbp_update_forum_last_active_id( $forum_id = 0, $active_id = 0 ) {
|
|
1678 |
update_post_meta( $forum_id, '_bbp_last_active_id', $active_id );
|
1679 |
}
|
1680 |
|
|
|
1681 |
return (int) apply_filters( 'bbp_update_forum_last_active_id', $active_id, $forum_id );
|
1682 |
}
|
1683 |
|
@@ -1709,6 +1727,7 @@ function bbp_update_forum_last_active_time( $forum_id = 0, $new_time = '' ) {
|
|
1709 |
update_post_meta( $forum_id, '_bbp_last_active_time', $new_time );
|
1710 |
}
|
1711 |
|
|
|
1712 |
return apply_filters( 'bbp_update_forum_last_active', $new_time, $forum_id );
|
1713 |
}
|
1714 |
|
@@ -1732,6 +1751,7 @@ function bbp_update_forum_subforum_count( $forum_id = 0, $subforums = 0 ) {
|
|
1732 |
|
1733 |
update_post_meta( $forum_id, '_bbp_forum_subforum_count', $subforums );
|
1734 |
|
|
|
1735 |
return (int) apply_filters( 'bbp_update_forum_subforum_count', $subforums, $forum_id );
|
1736 |
}
|
1737 |
|
@@ -1776,6 +1796,7 @@ function bbp_update_forum_topic_count( $forum_id = 0 ) {
|
|
1776 |
update_post_meta( $forum_id, '_bbp_topic_count', $topics );
|
1777 |
update_post_meta( $forum_id, '_bbp_total_topic_count', $total_topics );
|
1778 |
|
|
|
1779 |
return (int) apply_filters( 'bbp_update_forum_topic_count', $total_topics, $forum_id );
|
1780 |
}
|
1781 |
|
@@ -1841,6 +1862,7 @@ function bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = 0 )
|
|
1841 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', $topic_count );
|
1842 |
}
|
1843 |
|
|
|
1844 |
return (int) apply_filters( 'bbp_update_forum_topic_count_hidden', $topic_count, $forum_id );
|
1845 |
}
|
1846 |
|
@@ -1905,6 +1927,7 @@ function bbp_update_forum_reply_count( $forum_id = 0 ) {
|
|
1905 |
update_post_meta( $forum_id, '_bbp_reply_count', $reply_count );
|
1906 |
update_post_meta( $forum_id, '_bbp_total_reply_count', $total_replies );
|
1907 |
|
|
|
1908 |
return (int) apply_filters( 'bbp_update_forum_reply_count', $total_replies, $forum_id );
|
1909 |
}
|
1910 |
|
@@ -1993,7 +2016,9 @@ function bbp_update_forum( $args = array() ) {
|
|
1993 |
* @return array
|
1994 |
*/
|
1995 |
function bbp_get_forum_statuses( $forum_id = 0 ) {
|
1996 |
-
|
|
|
|
|
1997 |
'open' => _x( 'Open', 'Open the forum', 'bbpress' ),
|
1998 |
'closed' => _x( 'Closed', 'Close the forum', 'bbpress' )
|
1999 |
), $forum_id );
|
@@ -2009,7 +2034,9 @@ function bbp_get_forum_statuses( $forum_id = 0 ) {
|
|
2009 |
* @return array
|
2010 |
*/
|
2011 |
function bbp_get_forum_types( $forum_id = 0 ) {
|
2012 |
-
|
|
|
|
|
2013 |
'forum' => _x( 'Forum', 'Forum accepts new topics', 'bbpress' ),
|
2014 |
'category' => _x( 'Category', 'Forum is a category', 'bbpress' )
|
2015 |
), $forum_id );
|
@@ -2025,7 +2052,9 @@ function bbp_get_forum_types( $forum_id = 0 ) {
|
|
2025 |
* @return array
|
2026 |
*/
|
2027 |
function bbp_get_forum_visibilities( $forum_id = 0) {
|
2028 |
-
|
|
|
|
|
2029 |
bbp_get_public_status_id() => _x( 'Public', 'Make forum public', 'bbpress' ),
|
2030 |
bbp_get_private_status_id() => _x( 'Private', 'Make forum private', 'bbpress' ),
|
2031 |
bbp_get_hidden_status_id() => _x( 'Hidden', 'Make forum hidden', 'bbpress' )
|
@@ -2042,13 +2071,18 @@ function bbp_get_forum_visibilities( $forum_id = 0) {
|
|
2042 |
* @since 2.0.0 bbPress (r3007)
|
2043 |
*
|
2044 |
* @uses get_option() Returns the unserialized array of hidden forum ids
|
|
|
2045 |
* @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids
|
2046 |
* and forum id
|
2047 |
*/
|
2048 |
function bbp_get_hidden_forum_ids() {
|
2049 |
$forum_ids = get_option( '_bbp_hidden_forums', array() );
|
|
|
|
|
|
|
2050 |
|
2051 |
-
|
|
|
2052 |
}
|
2053 |
|
2054 |
/**
|
@@ -2059,13 +2093,47 @@ function bbp_get_hidden_forum_ids() {
|
|
2059 |
* @since 2.0.0 bbPress (r3007)
|
2060 |
*
|
2061 |
* @uses get_option() Returns the unserialized array of private forum ids
|
|
|
2062 |
* @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids
|
2063 |
* and forum id
|
2064 |
*/
|
2065 |
function bbp_get_private_forum_ids() {
|
2066 |
$forum_ids = get_option( '_bbp_private_forums', array() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2067 |
|
2068 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2069 |
}
|
2070 |
|
2071 |
/**
|
@@ -2082,70 +2150,57 @@ function bbp_get_private_forum_ids() {
|
|
2082 |
* @uses apply_filters()
|
2083 |
*/
|
2084 |
function bbp_exclude_forum_ids( $type = 'string' ) {
|
|
|
2085 |
|
2086 |
// Setup arrays
|
2087 |
-
$
|
2088 |
|
2089 |
-
//
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
break;
|
2094 |
|
2095 |
-
|
2096 |
-
|
2097 |
-
break;
|
2098 |
-
|
2099 |
-
case 'meta_query' :
|
2100 |
-
$retval = array( array() ) ;
|
2101 |
-
break;
|
2102 |
-
}
|
2103 |
-
|
2104 |
-
// Exclude for everyone but keymasters
|
2105 |
-
if ( ! bbp_is_user_keymaster() ) {
|
2106 |
|
2107 |
-
//
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
|
|
|
|
2111 |
|
2112 |
-
//
|
2113 |
-
if ( !
|
2114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2115 |
}
|
2116 |
|
2117 |
-
// Merge private and hidden forums together
|
2118 |
-
$forum_ids = (array) array_filter( wp_parse_id_list( array_merge( $private, $hidden ) ) );
|
2119 |
-
|
2120 |
// There are forums that need to be excluded
|
2121 |
-
|
2122 |
-
|
2123 |
-
switch ( $type ) {
|
2124 |
-
|
2125 |
-
// Separate forum ID's into a comma separated string
|
2126 |
-
case 'string' :
|
2127 |
-
$retval = implode( ',', $forum_ids );
|
2128 |
-
break;
|
2129 |
-
|
2130 |
-
// Use forum_ids array
|
2131 |
-
case 'array' :
|
2132 |
-
$retval = $forum_ids;
|
2133 |
-
break;
|
2134 |
-
|
2135 |
-
// Build a meta_query
|
2136 |
-
case 'meta_query' :
|
2137 |
-
$retval = array(
|
2138 |
-
'key' => '_bbp_forum_id',
|
2139 |
-
'value' => implode( ',', $forum_ids ),
|
2140 |
-
'type' => 'NUMERIC',
|
2141 |
-
'compare' => ( 1 < count( $forum_ids ) ) ? 'NOT IN' : '!='
|
2142 |
-
);
|
2143 |
-
break;
|
2144 |
-
}
|
2145 |
-
}
|
2146 |
}
|
2147 |
|
2148 |
-
// Filter
|
2149 |
return apply_filters( 'bbp_exclude_forum_ids', $retval, $forum_ids, $type );
|
2150 |
}
|
2151 |
|
@@ -2209,7 +2264,7 @@ function bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) {
|
|
2209 |
|
2210 |
// Remove bbp_get_private_status_id() if user is not capable
|
2211 |
if ( ! current_user_can( 'read_private_forums' ) ) {
|
2212 |
-
$key = array_search( bbp_get_private_status_id(), $post_stati );
|
2213 |
if ( ! empty( $key ) ) {
|
2214 |
unset( $post_stati[ $key ] );
|
2215 |
}
|
@@ -2223,7 +2278,7 @@ function bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) {
|
|
2223 |
|
2224 |
// Remove bbp_get_hidden_status_id() if user is not capable
|
2225 |
if ( ! current_user_can( 'read_hidden_forums' ) ) {
|
2226 |
-
|
42 |
), 'insert_forum' );
|
43 |
|
44 |
// Insert forum
|
45 |
+
$forum_id = wp_insert_post( $forum_data, false );
|
46 |
|
47 |
// Bail if no forum was added
|
48 |
if ( empty( $forum_id ) ) {
|
51 |
|
52 |
// Forum meta
|
53 |
$forum_meta = bbp_parse_args( $forum_meta, array(
|
54 |
+
'forum_type' => 'forum',
|
55 |
+
'status' => 'open',
|
56 |
'reply_count' => 0,
|
57 |
'topic_count' => 0,
|
58 |
'topic_count_hidden' => 0,
|
67 |
|
68 |
// Insert forum meta
|
69 |
foreach ( $forum_meta as $meta_key => $meta_value ) {
|
70 |
+
|
71 |
+
// Prefix if not prefixed
|
72 |
+
if ( '_bbp_' !== substr( $meta_key, 0, 5 ) ) {
|
73 |
+
$meta_key = '_bbp_' . $meta_key;
|
74 |
+
}
|
75 |
+
|
76 |
+
// Update the meta
|
77 |
+
update_post_meta( $forum_id, $meta_key, $meta_value );
|
78 |
}
|
79 |
|
80 |
// Update the forum and hierarchy
|
81 |
bbp_update_forum( array(
|
82 |
+
'forum_id' => $forum_id
|
83 |
) );
|
84 |
|
85 |
/**
|
91 |
*/
|
92 |
do_action( 'bbp_insert_forum', (int) $forum_id );
|
93 |
|
94 |
+
// Return forum_id
|
95 |
return $forum_id;
|
96 |
}
|
97 |
|
106 |
* @uses bbp_is_anonymous() To check if an anonymous post is being made
|
107 |
* @uses current_user_can() To check if the current user can publish forum
|
108 |
* @uses bbp_get_current_user_id() To get the current user id
|
|
|
|
|
109 |
* @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
|
110 |
* @uses bbp_is_forum_category() To check if the forum is a category
|
111 |
* @uses bbp_is_forum_closed() To check if the forum is closed
|
117 |
* @uses apply_filters() Calls 'bbp_new_forum_pre_title' with the content
|
118 |
* @uses apply_filters() Calls 'bbp_new_forum_pre_content' with the content
|
119 |
* @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors
|
|
|
120 |
* @uses do_action() Calls 'bbp_new_forum' with the forum id, forum id,
|
121 |
* anonymous data and reply author
|
|
|
|
|
122 |
* @uses bbp_get_forum_permalink() To get the forum permalink
|
123 |
* @uses bbp_redirect() To redirect to the forum link
|
124 |
* @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error
|
138 |
}
|
139 |
|
140 |
// Define local variable(s)
|
141 |
+
$view_all = false;
|
142 |
$forum_parent_id = $forum_author = 0;
|
143 |
$forum_title = $forum_content = '';
|
144 |
+
$anonymous_data = array();
|
145 |
|
146 |
/** Forum Author **********************************************************/
|
147 |
|
148 |
// User cannot create forums
|
149 |
+
if ( ! current_user_can( 'publish_forums' ) ) {
|
150 |
bbp_add_error( 'bbp_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );
|
151 |
return;
|
152 |
}
|
212 |
}
|
213 |
|
214 |
// Forum is closed and user cannot access
|
215 |
+
if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
|
216 |
bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
|
217 |
}
|
218 |
|
219 |
// Forum is private and user cannot access
|
220 |
+
if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
|
221 |
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' ) );
|
222 |
}
|
223 |
|
224 |
// Forum is hidden and user cannot access
|
225 |
+
if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
|
226 |
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' ) );
|
227 |
}
|
228 |
}
|
276 |
) );
|
277 |
|
278 |
// Insert forum
|
279 |
+
$forum_id = wp_insert_post( $forum_data, true );
|
280 |
|
281 |
/** No Errors *************************************************************/
|
282 |
|
351 |
// Redirect back to new forum
|
352 |
bbp_redirect( $redirect_url );
|
353 |
|
354 |
+
/** Errors ****************************************************************/
|
355 |
+
|
356 |
+
// WP_Error
|
357 |
+
} elseif ( is_wp_error( $forum_id ) ) {
|
358 |
+
bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
|
359 |
+
|
360 |
+
// Generic error
|
361 |
} else {
|
362 |
+
bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The forum was not created.', 'bbpress' ) );
|
|
|
363 |
}
|
364 |
}
|
365 |
|
372 |
* @uses bbp_verify_nonce_request() To verify the nonce and check the request
|
373 |
* @uses bbp_is_forum_anonymous() To check if forum is by an anonymous user
|
374 |
* @uses current_user_can() To check if the current user can edit the forum
|
|
|
375 |
* @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
|
376 |
* @uses bbp_is_forum_category() To check if the forum is a category
|
377 |
* @uses bbp_is_forum_closed() To check if the forum is closed
|
430 |
return;
|
431 |
|
432 |
// User cannot edit this forum
|
433 |
+
} elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) {
|
434 |
bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
|
435 |
return;
|
436 |
}
|
456 |
if ( ! empty( $forum_parent_id ) && ( $forum_parent_id !== $current_parent_forum_id ) ) {
|
457 |
|
458 |
// Forum is closed and user cannot access
|
459 |
+
if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
|
460 |
bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
|
461 |
}
|
462 |
|
463 |
// Forum is private and user cannot access
|
464 |
+
if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
|
465 |
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' ) );
|
466 |
}
|
467 |
|
468 |
// Forum is hidden and user cannot access
|
469 |
+
if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
|
470 |
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' ) );
|
471 |
}
|
472 |
}
|
536 |
// Insert forum
|
537 |
$forum_id = wp_update_post( $forum_data );
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
/** No Errors *************************************************************/
|
540 |
|
541 |
if ( ! empty( $forum_id ) && ! is_wp_error( $forum_id ) ) {
|
552 |
'last_active_status' => bbp_get_public_status_id()
|
553 |
) );
|
554 |
|
555 |
+
/** Revisions *********************************************************/
|
556 |
+
|
557 |
+
// Update locks
|
558 |
+
update_post_meta( $forum_id, '_edit_last', bbp_get_current_user_id() );
|
559 |
+
delete_post_meta( $forum_id, '_edit_lock' );
|
560 |
+
|
561 |
+
/**
|
562 |
+
* @todo omitted for now
|
563 |
+
// Revision Reason
|
564 |
+
if ( ! empty( $_POST['bbp_forum_edit_reason'] ) )
|
565 |
+
$forum_edit_reason = sanitize_text_field( $_POST['bbp_forum_edit_reason'] );
|
566 |
+
|
567 |
+
// Update revision log
|
568 |
+
if ( ! empty( $_POST['bbp_log_forum_edit'] ) && ( "1" === $_POST['bbp_log_forum_edit'] ) && ( $revision_id = wp_save_post_revision( $forum_id ) ) ) {
|
569 |
+
bbp_update_forum_revision_log( array(
|
570 |
+
'forum_id' => $forum_id,
|
571 |
+
'revision_id' => $revision_id,
|
572 |
+
'author_id' => bbp_get_current_user_id(),
|
573 |
+
'reason' => $forum_edit_reason
|
574 |
+
) );
|
575 |
+
}
|
576 |
+
|
577 |
// If the new forum parent id is not equal to the old forum parent
|
578 |
// id, run the bbp_move_forum action and pass the forum's parent id
|
579 |
+
// as the first argument and new forum parent id as the second.
|
580 |
// @todo implement
|
581 |
+
if ( $forum_id !== $forum->post_parent ) {
|
582 |
+
bbp_move_forum_handler( $forum_parent_id, $forum->post_parent, $forum_id );
|
583 |
+
}
|
584 |
+
|
585 |
+
*/
|
586 |
|
587 |
/** Additional Actions (After Save) ***********************************/
|
588 |
|
653 |
|
654 |
/** Forum Status **********************************************************/
|
655 |
|
656 |
+
if ( ! empty( $_POST['bbp_forum_status'] ) && in_array( $_POST['bbp_forum_status'], array( 'open', 'closed' ), true ) ) {
|
657 |
if ( 'closed' === $_POST['bbp_forum_status'] && ! bbp_is_forum_closed( $forum_id, false ) ) {
|
658 |
bbp_close_forum( $forum_id );
|
659 |
} elseif ( 'open' === $_POST['bbp_forum_status'] && bbp_is_forum_open( $forum_id, false ) ) {
|
665 |
|
666 |
/** Forum Type ************************************************************/
|
667 |
|
668 |
+
if ( ! empty( $_POST['bbp_forum_type'] ) && in_array( $_POST['bbp_forum_type'], array( 'forum', 'category' ), true ) ) {
|
669 |
if ( 'category' === $_POST['bbp_forum_type'] && ! bbp_is_forum_category( $forum_id ) ) {
|
670 |
bbp_categorize_forum( $forum_id );
|
671 |
} elseif ( 'forum' === $_POST['bbp_forum_type'] && ! bbp_is_forum_category( $forum_id ) ) {
|
677 |
|
678 |
/** Forum Visibility ******************************************************/
|
679 |
|
680 |
+
if ( ! empty( $_POST['bbp_forum_visibility'] ) && in_array( $_POST['bbp_forum_visibility'], array_keys( bbp_get_forum_visibilities() ), true ) ) {
|
681 |
|
682 |
// Get forums current visibility
|
683 |
$old_visibility = bbp_get_forum_visibility( $forum_id );
|
724 |
if ( current_user_can( 'assign_moderators' ) && ! empty( $_POST['bbp_moderators'] ) ) {
|
725 |
|
726 |
// Escape tag input
|
727 |
+
$users = sanitize_text_field( $_POST['bbp_moderators'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
728 |
$user_ids = bbp_get_user_ids_from_nicenames( $users );
|
729 |
|
730 |
// Update forum moderators
|
864 |
$private = bbp_get_private_forum_ids();
|
865 |
|
866 |
// Find this forum in the array
|
867 |
+
if ( in_array( $forum_id, $private, true ) ) {
|
868 |
|
869 |
+
$offset = array_search( $forum_id, $private, true );
|
870 |
|
871 |
// Splice around it
|
872 |
array_splice( $private, $offset, 1 );
|
873 |
|
874 |
// Update private forums minus this one
|
875 |
+
update_option( '_bbp_private_forums', bbp_get_unique_array_values( $private ) );
|
876 |
}
|
877 |
|
878 |
// Get hidden forums
|
879 |
$hidden = bbp_get_hidden_forum_ids();
|
880 |
|
881 |
// Find this forum in the array
|
882 |
+
if ( in_array( $forum_id, $hidden, true ) ) {
|
883 |
|
884 |
+
$offset = array_search( $forum_id, $hidden, true );
|
885 |
|
886 |
// Splice around it
|
887 |
array_splice( $hidden, $offset, 1 );
|
888 |
|
889 |
// Update hidden forums minus this one
|
890 |
+
update_option( '_bbp_hidden_forums', bbp_get_unique_array_values( $hidden ) );
|
891 |
}
|
892 |
|
893 |
// Only run queries if visibility is changing
|
925 |
$hidden = bbp_get_hidden_forum_ids();
|
926 |
|
927 |
// Find this forum in the array
|
928 |
+
if ( in_array( $forum_id, $hidden, true ) ) {
|
929 |
|
930 |
+
$offset = array_search( $forum_id, $hidden, true );
|
931 |
|
932 |
// Splice around it
|
933 |
array_splice( $hidden, $offset, 1 );
|
934 |
|
935 |
// Update hidden forums minus this one
|
936 |
+
update_option( '_bbp_hidden_forums', bbp_get_unique_array_values( $hidden ) );
|
937 |
}
|
938 |
|
939 |
// Add to '_bbp_private_forums' site option
|
940 |
$private = bbp_get_private_forum_ids();
|
941 |
$private[] = $forum_id;
|
942 |
+
update_option( '_bbp_private_forums', bbp_get_unique_array_values( $private ) );
|
943 |
|
944 |
// Update forums visibility setting
|
945 |
$bbp_db = bbp_db();
|
975 |
$private = bbp_get_private_forum_ids();
|
976 |
|
977 |
// Find this forum in the array
|
978 |
+
if ( in_array( $forum_id, $private, true ) ) {
|
979 |
|
980 |
+
$offset = array_search( $forum_id, $private, true );
|
981 |
|
982 |
// Splice around it
|
983 |
array_splice( $private, $offset, 1 );
|
984 |
|
985 |
// Update private forums minus this one
|
986 |
+
update_option( '_bbp_private_forums', bbp_get_unique_array_values( $private ) );
|
987 |
}
|
988 |
|
989 |
// Add to '_bbp_hidden_forums' site option
|
990 |
$hidden = bbp_get_hidden_forum_ids();
|
991 |
$hidden[] = $forum_id;
|
992 |
+
update_option( '_bbp_hidden_forums', bbp_get_unique_array_values( $hidden ) );
|
993 |
|
994 |
// Update forums visibility setting
|
995 |
$bbp_db = bbp_db();
|
1029 |
*/
|
1030 |
remove_action( 'pre_get_posts', 'bbp_pre_get_posts_normalize_forum_visibility', 4 );
|
1031 |
|
1032 |
+
// Query for private forums
|
1033 |
$private_forums = new WP_Query( array(
|
1034 |
'suppress_filters' => true,
|
1035 |
'nopaging' => true,
|
1038 |
'post_status' => bbp_get_private_status_id(),
|
1039 |
'fields' => 'ids'
|
1040 |
) );
|
1041 |
+
|
1042 |
+
// Query for hidden forums
|
1043 |
$hidden_forums = new WP_Query( array(
|
1044 |
'suppress_filters' => true,
|
1045 |
'nopaging' => true,
|
1055 |
// Reset the $post global
|
1056 |
wp_reset_postdata();
|
1057 |
|
1058 |
+
// Private
|
1059 |
+
if ( ! is_wp_error( $private_forums ) ) {
|
1060 |
+
update_option( '_bbp_private_forums', $private_forums->posts );
|
1061 |
}
|
1062 |
|
1063 |
+
// Hidden forums
|
1064 |
+
if ( ! is_wp_error( $hidden_forums ) ) {
|
1065 |
+
update_option( '_bbp_hidden_forums', $hidden_forums->posts );
|
1066 |
+
}
|
1067 |
|
1068 |
// Complete results
|
1069 |
return true;
|
1171 |
|
1172 |
$forum_topic_count = (int) ( $total_topic_count + $difference );
|
1173 |
|
1174 |
+
// Filter & return
|
1175 |
return (int) apply_filters( 'bbp_bump_forum_topic_count', $forum_topic_count, $forum_id, $difference, $update_ancestors );
|
1176 |
}
|
1177 |
|
1272 |
// Update this forum id
|
1273 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', $new_count );
|
1274 |
|
1275 |
+
// Filter & return
|
1276 |
return (int) apply_filters( 'bbp_bump_forum_topic_count_hidden', $new_count, $forum_id, $difference );
|
1277 |
}
|
1278 |
|
1391 |
|
1392 |
$forum_reply_count = (int) ( $total_reply_count + $difference );
|
1393 |
|
1394 |
+
// Filter & return
|
1395 |
return (int) apply_filters( 'bbp_bump_forum_reply_count', $forum_reply_count, $forum_id, $difference, $update_ancestors );
|
1396 |
}
|
1397 |
|
1561 |
update_post_meta( $forum_id, '_bbp_last_topic_id', $topic_id );
|
1562 |
}
|
1563 |
|
1564 |
+
// Filter & return
|
1565 |
return (int) apply_filters( 'bbp_update_forum_last_topic_id', $topic_id, $forum_id );
|
1566 |
}
|
1567 |
|
1627 |
update_post_meta( $forum_id, '_bbp_last_reply_id', $reply_id );
|
1628 |
}
|
1629 |
|
1630 |
+
// Filter & return
|
1631 |
return (int) apply_filters( 'bbp_update_forum_last_reply_id', $reply_id, $forum_id );
|
1632 |
}
|
1633 |
|
1695 |
update_post_meta( $forum_id, '_bbp_last_active_id', $active_id );
|
1696 |
}
|
1697 |
|
1698 |
+
// Filter & return
|
1699 |
return (int) apply_filters( 'bbp_update_forum_last_active_id', $active_id, $forum_id );
|
1700 |
}
|
1701 |
|
1727 |
update_post_meta( $forum_id, '_bbp_last_active_time', $new_time );
|
1728 |
}
|
1729 |
|
1730 |
+
// Filter & return
|
1731 |
return apply_filters( 'bbp_update_forum_last_active', $new_time, $forum_id );
|
1732 |
}
|
1733 |
|
1751 |
|
1752 |
update_post_meta( $forum_id, '_bbp_forum_subforum_count', $subforums );
|
1753 |
|
1754 |
+
// Filter & return
|
1755 |
return (int) apply_filters( 'bbp_update_forum_subforum_count', $subforums, $forum_id );
|
1756 |
}
|
1757 |
|
1796 |
update_post_meta( $forum_id, '_bbp_topic_count', $topics );
|
1797 |
update_post_meta( $forum_id, '_bbp_total_topic_count', $total_topics );
|
1798 |
|
1799 |
+
// Filter & return
|
1800 |
return (int) apply_filters( 'bbp_update_forum_topic_count', $total_topics, $forum_id );
|
1801 |
}
|
1802 |
|
1862 |
update_post_meta( $forum_id, '_bbp_topic_count_hidden', $topic_count );
|
1863 |
}
|
1864 |
|
1865 |
+
// Filter & return
|
1866 |
return (int) apply_filters( 'bbp_update_forum_topic_count_hidden', $topic_count, $forum_id );
|
1867 |
}
|
1868 |
|
1927 |
update_post_meta( $forum_id, '_bbp_reply_count', $reply_count );
|
1928 |
update_post_meta( $forum_id, '_bbp_total_reply_count', $total_replies );
|
1929 |
|
1930 |
+
// Filter & return
|
1931 |
return (int) apply_filters( 'bbp_update_forum_reply_count', $total_replies, $forum_id );
|
1932 |
}
|
1933 |
|
2016 |
* @return array
|
2017 |
*/
|
2018 |
function bbp_get_forum_statuses( $forum_id = 0 ) {
|
2019 |
+
|
2020 |
+
// Filter & return
|
2021 |
+
return (array) apply_filters( 'bbp_get_forum_statuses', array(
|
2022 |
'open' => _x( 'Open', 'Open the forum', 'bbpress' ),
|
2023 |
'closed' => _x( 'Closed', 'Close the forum', 'bbpress' )
|
2024 |
), $forum_id );
|
2034 |
* @return array
|
2035 |
*/
|
2036 |
function bbp_get_forum_types( $forum_id = 0 ) {
|
2037 |
+
|
2038 |
+
// Filter & return
|
2039 |
+
return (array) apply_filters( 'bbp_get_forum_types', array(
|
2040 |
'forum' => _x( 'Forum', 'Forum accepts new topics', 'bbpress' ),
|
2041 |
'category' => _x( 'Category', 'Forum is a category', 'bbpress' )
|
2042 |
), $forum_id );
|
2052 |
* @return array
|
2053 |
*/
|
2054 |
function bbp_get_forum_visibilities( $forum_id = 0) {
|
2055 |
+
|
2056 |
+
// Filter & return
|
2057 |
+
return (array) apply_filters( 'bbp_get_forum_visibilities', array(
|
2058 |
bbp_get_public_status_id() => _x( 'Public', 'Make forum public', 'bbpress' ),
|
2059 |
bbp_get_private_status_id() => _x( 'Private', 'Make forum private', 'bbpress' ),
|
2060 |
bbp_get_hidden_status_id() => _x( 'Hidden', 'Make forum hidden', 'bbpress' )
|
2071 |
* @since 2.0.0 bbPress (r3007)
|
2072 |
*
|
2073 |
* @uses get_option() Returns the unserialized array of hidden forum ids
|
2074 |
+
* @uses wp_parse_id_list() Make sure array items are ints
|
2075 |
* @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids
|
2076 |
* and forum id
|
2077 |
*/
|
2078 |
function bbp_get_hidden_forum_ids() {
|
2079 |
$forum_ids = get_option( '_bbp_hidden_forums', array() );
|
2080 |
+
$forum_ids = ! empty( $forum_ids )
|
2081 |
+
? wp_parse_id_list( $forum_ids )
|
2082 |
+
: array();
|
2083 |
|
2084 |
+
// Filter & return
|
2085 |
+
return (array) apply_filters( 'bbp_get_hidden_forum_ids', $forum_ids );
|
2086 |
}
|
2087 |
|
2088 |
/**
|
2093 |
* @since 2.0.0 bbPress (r3007)
|
2094 |
*
|
2095 |
* @uses get_option() Returns the unserialized array of private forum ids
|
2096 |
+
* @uses wp_parse_id_list() Make sure array items are ints
|
2097 |
* @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids
|
2098 |
* and forum id
|
2099 |
*/
|
2100 |
function bbp_get_private_forum_ids() {
|
2101 |
$forum_ids = get_option( '_bbp_private_forums', array() );
|
2102 |
+
$forum_ids = ! empty( $forum_ids )
|
2103 |
+
? wp_parse_id_list( $forum_ids )
|
2104 |
+
: array();
|
2105 |
+
|
2106 |
+
// Filter & return
|
2107 |
+
return (array) apply_filters( 'bbp_get_private_forum_ids', $forum_ids );
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
/**
|
2111 |
+
* Returns the forum IDs that should be excluded from various views & queries,
|
2112 |
+
* based on the current user's capabilities.
|
2113 |
+
*
|
2114 |
+
* @since 2.6.0 bbPress (r6425)
|
2115 |
+
*
|
2116 |
+
* @return array Forum IDs to exclude, or an empty array
|
2117 |
+
*/
|
2118 |
+
function bbp_get_excluded_forum_ids() {
|
2119 |
+
|
2120 |
+
// Private forums
|
2121 |
+
$private = ! current_user_can( 'read_private_forums' )
|
2122 |
+
? bbp_get_private_forum_ids()
|
2123 |
+
: array();
|
2124 |
|
2125 |
+
// Hidden forums
|
2126 |
+
$hidden = ! current_user_can( 'read_hidden_forums' )
|
2127 |
+
? bbp_get_hidden_forum_ids()
|
2128 |
+
: array();
|
2129 |
+
|
2130 |
+
// Merge private & hidden forums together, and remove any empties
|
2131 |
+
$forum_ids = ( ! empty( $private ) || ! empty( $hidden ) )
|
2132 |
+
? array_filter( wp_parse_id_list( array_merge( $private, $hidden ) ) )
|
2133 |
+
: array();
|
2134 |
+
|
2135 |
+
// Filter & return
|
2136 |
+
return (array) apply_filters( 'bbp_get_excluded_forum_ids', $forum_ids, $private, $hidden );
|
2137 |
}
|
2138 |
|
2139 |
/**
|
2150 |
* @uses apply_filters()
|
2151 |
*/
|
2152 |
function bbp_exclude_forum_ids( $type = 'string' ) {
|
2153 |
+
static $types = array();
|
2154 |
|
2155 |
// Setup arrays
|
2156 |
+
$forum_ids = array();
|
2157 |
|
2158 |
+
// Capability performance optimization
|
2159 |
+
if ( ! empty( $types[ $type ] ) ) {
|
2160 |
+
$retval = $types[ $type ];
|
2161 |
+
$forum_ids = $types['array'];
|
|
|
2162 |
|
2163 |
+
// Populate forum types
|
2164 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2165 |
|
2166 |
+
// Types
|
2167 |
+
$types = array(
|
2168 |
+
'array' => array(),
|
2169 |
+
'string' => '',
|
2170 |
+
'meta_query' => array()
|
2171 |
+
);
|
2172 |
|
2173 |
+
// Exclude for everyone but keymasters
|
2174 |
+
if ( ! bbp_is_user_keymaster() ) {
|
2175 |
+
|
2176 |
+
// Get forum IDs to exclude
|
2177 |
+
$forum_ids = bbp_get_excluded_forum_ids();
|
2178 |
+
|
2179 |
+
// Store return values in static types array
|
2180 |
+
if ( ! empty( $forum_ids ) ) {
|
2181 |
+
|
2182 |
+
// Comparison
|
2183 |
+
$compare = ( 1 < count( $forum_ids ) )
|
2184 |
+
? 'NOT IN'
|
2185 |
+
: '!=';
|
2186 |
+
|
2187 |
+
// Setup types
|
2188 |
+
$types['array'] = $forum_ids;
|
2189 |
+
$types['string'] = implode( ',', $forum_ids );
|
2190 |
+
$types['meta_query'] = array(
|
2191 |
+
'key' => '_bbp_forum_id',
|
2192 |
+
'value' => $types['string'],
|
2193 |
+
'type' => 'NUMERIC',
|
2194 |
+
'compare' => $compare
|
2195 |
+
);
|
2196 |
+
}
|
2197 |
}
|
2198 |
|
|
|
|
|
|
|
2199 |
// There are forums that need to be excluded
|
2200 |
+
$retval = $types[ $type ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2201 |
}
|
2202 |
|
2203 |
+
// Filter & return
|
2204 |
return apply_filters( 'bbp_exclude_forum_ids', $retval, $forum_ids, $type );
|
2205 |
}
|
2206 |
|
2264 |
|
2265 |
// Remove bbp_get_private_status_id() if user is not capable
|
2266 |
if ( ! current_user_can( 'read_private_forums' ) ) {
|
2267 |
+
$key = array_search( bbp_get_private_status_id(), $post_stati, true );
|
2268 |
if ( ! empty( $key ) ) {
|
2269 |
unset( $post_stati[ $key ] );
|
2270 |
}
|
2278 |
|
2279 |
// Remove bbp_get_hidden_status_id() if user is not capable
|
2280 |
if ( ! current_user_can( 'read_hidden_forums' ) ) {
|
|