PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
← All changes | wpforo.php +15 -3 3.0.83.1.6 View file →
@@ -4,9 +4,9 @@
4 4 * Plugin URI: https://wpforo.com
5 5 * Description: WordPress Forum plugin. wpForo is the only AI powered forum solution for your community. Modern design and 5 forum layouts.
6 6 * Author: gVectors Team
7 7 * Author URI: https://gvectors.com/
8 -* Version: 3.0.8
8 +* Version: 3.1.6
9 9 * Requires at least: 5.2
10 10 * Requires PHP: 7.1
11 11 * Text Domain: wpforo
12 12 * Domain Path: /languages
@@ -13,9 +13,9 @@
13 13 */
14 14
15 15 namespace wpforo;
16 16
17 -define( 'WPFORO_VERSION', '3.0.8' );
17 +define( 'WPFORO_VERSION', '3.1.6' );
18 18
19 19 //Exit if accessed directly
20 20 if( ! defined( 'ABSPATH' ) ) exit;
21 21
@@ -52,8 +52,9 @@
52 52 use wpforo\classes\RamCache;
53 53 use wpforo\classes\SEO;
54 54 use wpforo\classes\Settings;
55 55 use wpforo\classes\TaskManager;
56 +use wpforo\classes\EmailQueue;
56 57 use wpforo\classes\Template;
57 58 use wpforo\classes\Topics;
58 59 use wpforo\classes\VectorStorageManager;
59 60 use wpforo\classes\UserGroups;
@@ -79,8 +80,9 @@
79 80 'logs',
80 81 'follows',
81 82 'bookmarks',
82 83 'accesses',
84 + 'email_queue',
83 85 ];
84 86 public $_tables = [
85 87 'activity',
86 88 'ai_cache',
@@ -202,8 +204,10 @@
202 204 /** @var SEO */
203 205 public $seo;
204 206 /** @var Subscriptions */
205 207 public $sbscrb;
208 + /** @var EmailQueue */
209 + public $email_queue;
206 210 /** @var Template */
207 211 public $tpl;
208 212 /** @var Topics */
209 213 public $topic;
@@ -324,9 +328,10 @@
324 328 $this->seo = new SEO();
325 329 $this->topic = new Topics();
326 330 $this->reaction = new Reactions();
327 331 $this->bookmark = new Bookmarks();
328 - $this->sbscrb = new Subscriptions();
332 + $this->sbscrb = new Subscriptions();
333 + $this->email_queue = new EmailQueue();
329 334 if( wpforo_is_module_enabled( 'revisions' ) ) $this->revision = new Revisions();
330 335
331 336 do_action( 'wpforo_after_init_classes' );
332 337 }
@@ -1286,9 +1291,16 @@
1286 1291 'period' => $period,
1287 1292 ];
1288 1293 } elseif( $this->current_object['template'] === 'tags' ) {
1289 1294 $current_object['items_per_page'] = wpforo_setting( 'tags', 'per_page' );
1295 + // Tag sort: whitelist the URL key, then map to orderby/order. Never pass raw input to get_tags().
1296 + $tag_sort_map = [ 'count' => [ 'count', 'DESC' ], 'az' => [ 'tag', 'ASC' ], 'za' => [ 'tag', 'DESC' ] ];
1297 + $tag_sort_key = sanitize_key( (string) wpfval( $_GET, 'wpf_tag_sort' ) );
1298 + if( ! isset( $tag_sort_map[ $tag_sort_key ] ) ) $tag_sort_key = 'count';
1299 + $current_object['tag_sort'] = $tag_sort_key;
1290 1300 $args = [
1301 + 'orderby' => $tag_sort_map[ $tag_sort_key ][0],
1302 + 'order' => $tag_sort_map[ $tag_sort_key ][1],
1291 1303 'offset' => ( $current_object['paged'] - 1 ) * $current_object['items_per_page'],
1292 1304 'row_count' => $current_object['items_per_page'],
1293 1305 ];
1294 1306 $current_object['tags'] = $this->topic->get_tags( $args, $current_object['items_count'] );