Version Description
| 20.12.2016 =
- Added: Compatible with WordPress 4.7
- Added: Custom Forum Icons (font-awesome)
- Added: Delete member with WP user and user specific forum content.
- Added: [Add Child Forum] button on forum management list
- Added: Persian (fa_IR) Translation by behrooz (www.wpforo.ir)
- Added: New addon notifier
- Cache: Update/clean cache on actions with topics, posts and members
- Fixed Bug: Unnecessary email with Password Reset link on user registration
- Fixed Bug: RTL Issue with widget avatars
- Fixed Bug: Disable banning yourself
- More info...
IMPORTANT:
- To load old customized colors please refresh forum page twice.
- If you have a Cache Plugin, please delete all caches after wpForo update.
- If you use CDN and found some issue please purge it.
Download this release
Release Info
Developer | Tomdever |
Plugin | ![]() |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- readme.txt +44 -14
- wpf-admin/addons.php +3 -6
- wpf-admin/forum.php +13 -1
- wpf-includes/class-feed.php +2 -2
- wpf-includes/class-members.php +11 -0
- wpf-includes/class-notices.php +63 -0
- wpf-includes/class-template.php +2 -2
- wpf-includes/functions-installation.php +3 -3
- wpf-includes/functions-template.php +3 -3
- wpf-includes/functions.php +43 -17
- wpf-includes/wpf-actions.php +25 -20
- wpf-includes/wpf-hooks.php +8 -6
- wpf-languages/wpforo-fa_IR.mo +0 -0
- wpf-languages/wpforo-fa_IR.po +3038 -0
- wpf-languages/wpforo-he_IL.mo +0 -0
- wpf-languages/wpforo-he_IL.po +79 -65
- wpf-languages/wpforo-ja.mo +0 -0
- wpf-languages/wpforo-ja.po +2317 -2561
- wpf-languages/wpforo-ru_RU.mo +0 -0
- wpf-languages/wpforo-ru_RU.po +2285 -2577
- wpf-languages/wpforo.pot +93 -59
- wpf-themes/classic/colors.css +6 -6
- wpf-themes/classic/layouts/1/forum.php +6 -5
- wpf-themes/classic/layouts/2/forum.php +7 -4
- wpf-themes/classic/layouts/3/forum.php +6 -3
- wpf-themes/classic/style-rtl.css +9 -8
- wpf-themes/classic/style.css +9 -8
- wpf-themes/classic/styles/css.php +5 -5
- wpf-themes/classic/widgets-rtl.css +1 -0
- wpforo.php +16 -7
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
|
|
3 |
Tags: forum, community, discussion, bulletin board, question and answers, qa, support, foro, forums
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.7
|
6 |
-
Stable tag: 1.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -18,6 +18,8 @@ This is a new forum plugin. If you found some issue or bug please open a support
|
|
18 |
<br/><br/>
|
19 |
</blockquote>
|
20 |
|
|
|
|
|
21 |
1. **Extended Layout:**
|
22 |
Classic forum layout with an unique feature to show one level deeper information. You can see latest topics of each forum on Forum List and latest posts of each topic on Topic List.
|
23 |
2. **Simplified Layout:**
|
@@ -25,6 +27,24 @@ Light, modern and beautiful forum layout with topic and post author avatars on f
|
|
25 |
3. **Question and Answer Layout:**
|
26 |
Complete Question & Answers discussion board for professional support and for communities similar to Stack Overflow. Perfect platform for users to ask and answer questions, and, through membership and active participation, to vote up or down.
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
= WPFORO FEATURES =
|
30 |
|
@@ -46,12 +66,6 @@ Complete Question & Answers discussion board for professional support and for co
|
|
46 |
* | **EASY TO MIGRATE** | You can download [Go2wpForo](http://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) free migration tool from our [support forum](http://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/). This tool allows you migrate from different WordPress forum plugins to wpForo.
|
47 |
|
48 |
|
49 |
-
= WPFORO ADDONS =
|
50 |
-
|
51 |
-
* | [wpForo - Embeds](http://gvectors.com/product/wpforo-embeds/)
|
52 |
-
* | [wpForo - Advanced Attachments](http://gvectors.com/product/wpforo-advanced-attachments/)
|
53 |
-
|
54 |
-
|
55 |
= Currently we're working on =
|
56 |
|
57 |
* wpForo Anti-Spam...
|
@@ -113,6 +127,27 @@ wpForo Support Forum: <http://wpforo.com/community/>
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
= 1.1.0 | 04.12.2016 =
|
117 |
|
118 |
* Added: Support WordPress Multisite (single and network activation)
|
@@ -144,13 +179,7 @@ wpForo Support Forum: <http://wpforo.com/community/>
|
|
144 |
* Fixed Bug: Warning: Missing argument 2 for wpforo_update_last_login_date()
|
145 |
* Optimization: Forum, topic and post loading speed and memory optimization
|
146 |
* Security: improving post and topic creation security, two more level of checking processes before inserting data in database.
|
147 |
-
|
148 |
-
IMPORTANT:
|
149 |
-
|
150 |
-
- To load old customized colors please refresh forum page twice.
|
151 |
-
- If you have a Cache Plugin, please delete all caches after wpForo update.
|
152 |
-
- If you use CDN and found some issue please purge it.
|
153 |
-
|
154 |
|
155 |
= 1.0.2 | 10.09.2016 =
|
156 |
|
@@ -195,6 +224,7 @@ IMPORTANT:
|
|
195 |
* Shortcode: Changed [wpforo-index] to [wpforo]
|
196 |
* Shortcode: wpForo new shortcodes. [More info.](http://wpforo.com/community/faq/wpforo-shortcodes/)
|
197 |
* SEO Optimization: Duplicated meta data on Member Profile pages
|
|
|
198 |
|
199 |
|
200 |
= Beta-6 | 06.08.2016 =
|
3 |
Tags: forum, community, discussion, bulletin board, question and answers, qa, support, foro, forums
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.7
|
6 |
+
Stable tag: 1.1.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
18 |
<br/><br/>
|
19 |
</blockquote>
|
20 |
|
21 |
+
= Forums can be displayed with three different layouts =
|
22 |
+
|
23 |
1. **Extended Layout:**
|
24 |
Classic forum layout with an unique feature to show one level deeper information. You can see latest topics of each forum on Forum List and latest posts of each topic on Topic List.
|
25 |
2. **Simplified Layout:**
|
27 |
3. **Question and Answer Layout:**
|
28 |
Complete Question & Answers discussion board for professional support and for communities similar to Stack Overflow. Perfect platform for users to ask and answer questions, and, through membership and active participation, to vote up or down.
|
29 |
|
30 |
+
= Available Translations =
|
31 |
+
|
32 |
+
* | Czech (cs_CZ) by Glados (The Witcher)
|
33 |
+
* | German (de_DE) by Markus Herrmann
|
34 |
+
* | Spanish (es_ES) Poncho Camacho
|
35 |
+
* | Spanish (Mexico) (es_MX) Poncho Camacho
|
36 |
+
* | French (fr_FR) by Julien Coopmann
|
37 |
+
* | Persian (fa_IR) by wpforo.ir
|
38 |
+
* | Hebrew (he_IL) Gal Zilberman
|
39 |
+
* | Japanese (JA_ja) by Seg Way
|
40 |
+
* | Korean (ko_KO) by Jeehwan Song
|
41 |
+
* | Dutch(nl_NL) Ger Metselaar i.o.v. Parma multimedia BV
|
42 |
+
* | Russian (ru_RU) by Dmitry Butkevich
|
43 |
+
|
44 |
+
= wpForo Addons =
|
45 |
+
|
46 |
+
* | [wpForo - Embeds](http://gvectors.com/product/wpforo-embeds/)
|
47 |
+
* | [wpForo - Advanced Attachments](http://gvectors.com/product/wpforo-advanced-attachments/)
|
48 |
|
49 |
= WPFORO FEATURES =
|
50 |
|
66 |
* | **EASY TO MIGRATE** | You can download [Go2wpForo](http://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) free migration tool from our [support forum](http://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/). This tool allows you migrate from different WordPress forum plugins to wpForo.
|
67 |
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
= Currently we're working on =
|
70 |
|
71 |
* wpForo Anti-Spam...
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 1.1.1 | 20.12.2016 =
|
131 |
+
|
132 |
+
* Added: Compatible with WordPress 4.7
|
133 |
+
* Added: Custom Forum Icons (font-awesome)
|
134 |
+
* Added: Delete member with WP user and user specific forum content.
|
135 |
+
* Added: [Add Child Forum] button on forum management list
|
136 |
+
* Added: Persian (fa_IR) Translation by behrooz (www.wpforo.ir)
|
137 |
+
* Added: New addon notifier
|
138 |
+
* Cache: Update/clean cache on actions with topics, posts and members
|
139 |
+
* Fixed Bug: Unnecessary email with Password Reset link on user registration
|
140 |
+
* Fixed Bug: RTL Issue with widget avatars
|
141 |
+
* Fixed Bug: Disable banning yourself
|
142 |
+
* [More info...](http://wpforo.com/community/wpforo-announcements/wpforo-1-1-1-is-released/)
|
143 |
+
|
144 |
+
IMPORTANT:
|
145 |
+
|
146 |
+
- To load old customized colors please refresh forum page twice.
|
147 |
+
- If you have a Cache Plugin, please delete all caches after wpForo update.
|
148 |
+
- If you use CDN and found some issue please purge it.
|
149 |
+
|
150 |
+
|
151 |
= 1.1.0 | 04.12.2016 =
|
152 |
|
153 |
* Added: Support WordPress Multisite (single and network activation)
|
179 |
* Fixed Bug: Warning: Missing argument 2 for wpforo_update_last_login_date()
|
180 |
* Optimization: Forum, topic and post loading speed and memory optimization
|
181 |
* Security: improving post and topic creation security, two more level of checking processes before inserting data in database.
|
182 |
+
* [More info...](http://wpforo.com/community/wpforo-announcements/wpforo-1-1-0-is-released/)
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
= 1.0.2 | 10.09.2016 =
|
185 |
|
224 |
* Shortcode: Changed [wpforo-index] to [wpforo]
|
225 |
* Shortcode: wpForo new shortcodes. [More info.](http://wpforo.com/community/faq/wpforo-shortcodes/)
|
226 |
* SEO Optimization: Duplicated meta data on Member Profile pages
|
227 |
+
* [More info...](http://wpforo.com/community/wpforo-announcements/wpforo-1-0-0-is-released/)
|
228 |
|
229 |
|
230 |
= Beta-6 | 06.08.2016 =
|
wpf-admin/addons.php
CHANGED
@@ -3,10 +3,8 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
if( !current_user_can('administrator') ) exit;
|
5 |
|
6 |
-
$
|
7 |
-
|
8 |
-
'embeds' => array('version' => '1.0.0', 'requires' => '1.1.0', 'class' => 'wpForoEmbeds', 'title' => 'Embeds', 'thumb' => WPFORO_URL . '/wpf-assets/addons/' . 'embeds' . '/header.png', 'desc' => __('Allows to embed hundreds of video, social network, audio and photo content providers in forum topics and posts.', 'wpforo'), 'url' => 'http://gvectors.com/product/wpforo-embeds/'),
|
9 |
-
);
|
10 |
?>
|
11 |
|
12 |
<div id="wpf-admin-wrap" class="wrap wpforo-addons">
|
@@ -40,7 +38,7 @@
|
|
40 |
<br style="clear:both">
|
41 |
<div class="wpforo-addons-wrapper">
|
42 |
<?php
|
43 |
-
foreach ($addons as $key => $addon) {
|
44 |
$installed = (class_exists($addon['class'])) ? true : false;
|
45 |
?>
|
46 |
<div class="wpforo-addon-block">
|
@@ -75,5 +73,4 @@
|
|
75 |
<div style="clear:both;"></div>
|
76 |
<h3> </h3>
|
77 |
<hr />
|
78 |
-
|
79 |
</div>
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
if( !current_user_can('administrator') ) exit;
|
5 |
|
6 |
+
$wpforo->notice->refreshAddonPage(); $wpforo->notice->dismissAddonNoteOnPage();
|
7 |
+
|
|
|
|
|
8 |
?>
|
9 |
|
10 |
<div id="wpf-admin-wrap" class="wrap wpforo-addons">
|
38 |
<br style="clear:both">
|
39 |
<div class="wpforo-addons-wrapper">
|
40 |
<?php
|
41 |
+
foreach ($wpforo->addons as $key => $addon) {
|
42 |
$installed = (class_exists($addon['class'])) ? true : false;
|
43 |
?>
|
44 |
<div class="wpforo-addon-block">
|
73 |
<div style="clear:both;"></div>
|
74 |
<h3> </h3>
|
75 |
<hr />
|
|
|
76 |
</div>
|
wpf-admin/forum.php
CHANGED
@@ -86,7 +86,7 @@
|
|
86 |
<!-- Forum Add || Edit -->
|
87 |
<?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?>
|
88 |
<?php if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'cf')): ?>
|
89 |
-
<?php if(isset($_GET['id'])) $data = $wpforo->forum->get_forum( array('forumid' => $_GET['id'])
|
90 |
<div id="poststuff">
|
91 |
<form name="forum" action="" method="post">
|
92 |
<?php wp_nonce_field( 'wpforo-forum-addedit' ); ?>
|
@@ -228,6 +228,18 @@
|
|
228 |
</div>
|
229 |
</div>
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
<div id="forum_meta" class="postbox hide-if-js" style="display: block; ">
|
232 |
<div class="handlediv" title="Click to toggle"><br></div>
|
233 |
<h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3>
|
86 |
<!-- Forum Add || Edit -->
|
87 |
<?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?>
|
88 |
<?php if($wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'cf')): ?>
|
89 |
+
<?php if(isset($_GET['id'])) $data = $wpforo->forum->get_forum( array('forumid' => $_GET['id']) ); ?>
|
90 |
<div id="poststuff">
|
91 |
<form name="forum" action="" method="post">
|
92 |
<?php wp_nonce_field( 'wpforo-forum-addedit' ); ?>
|
228 |
</div>
|
229 |
</div>
|
230 |
|
231 |
+
<div id="forum_icon" class="postbox hide-if-js" style="display: block; ">
|
232 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
233 |
+
<h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?></span></h3>
|
234 |
+
<div class="inside" style="padding-top:10px;">
|
235 |
+
<div class="form-field">
|
236 |
+
<label for="tag-icon" style="display:block; padding-bottom:5px;"><?php _e('Font-awesome Icon', 'wpforo'); ?>:</label>
|
237 |
+
<input name="forum[icon]" value="<?php echo (isset($data['icon']) && $data['icon']) ? esc_attr($data['icon']) : 'fa-comments'; ?>" type="text"/>
|
238 |
+
<p style="margin-bottom:0px; margin-top:5px;"><?php _e('You can find all icons', 'wpforo'); ?> <a href="http://fontawesome.io/icons/" target="_blank"><?php _e('here', 'wpforo'); ?>.</a> <?php _e('Make sure you insert a class of font-awesome icon, it should start with fa- prefix like "fa-comments".', '') ?></p>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
|
243 |
<div id="forum_meta" class="postbox hide-if-js" style="display: block; ">
|
244 |
<div class="handlediv" title="Click to toggle"><br></div>
|
245 |
<h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3>
|
wpf-includes/class-feed.php
CHANGED
@@ -10,8 +10,8 @@ class wpForoFeed{
|
|
10 |
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
11 |
}
|
12 |
|
13 |
-
function rss2_url
|
14 |
-
$url =
|
15 |
if(isset($this->wpforo->current_object['forumid'])){ $forumid = $this->wpforo->current_object['forumid']; }
|
16 |
if(isset($this->wpforo->current_object['topicid'])){ $topicid = $this->wpforo->current_object['topicid']; }
|
17 |
if(isset($forumid) && isset($topicid)){
|
10 |
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
11 |
}
|
12 |
|
13 |
+
function rss2_url($echo = true){
|
14 |
+
$url = wpforo_get_request_uri();
|
15 |
if(isset($this->wpforo->current_object['forumid'])){ $forumid = $this->wpforo->current_object['forumid']; }
|
16 |
if(isset($this->wpforo->current_object['topicid'])){ $topicid = $this->wpforo->current_object['topicid']; }
|
17 |
if(isset($forumid) && isset($topicid)){
|
wpf-includes/class-members.php
CHANGED
@@ -12,6 +12,10 @@ class wpForoMember{
|
|
12 |
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
13 |
add_action('delete_user_form', array(&$this, 'show_delete_form'), 10, 2);
|
14 |
}
|
|
|
|
|
|
|
|
|
15 |
|
16 |
private function add_profile($args){
|
17 |
if(empty($args)) return FALSE;
|
@@ -137,6 +141,9 @@ class wpForoMember{
|
|
137 |
return FALSE;
|
138 |
}
|
139 |
if( !empty($args) && is_array($args) && !empty($args['user_pass1']) ){
|
|
|
|
|
|
|
140 |
$errors = new WP_Error();
|
141 |
|
142 |
extract($args, EXTR_OVERWRITE);
|
@@ -543,6 +550,10 @@ class wpForoMember{
|
|
543 |
}
|
544 |
|
545 |
function ban($userid){
|
|
|
|
|
|
|
|
|
546 |
if( !$this->wpforo->perm->usergroup_can( $this->wpforo->current_user_groupid , 'bm' ) || !$this->wpforo->perm->user_can_manage_user( $this->wpforo->current_userid, intval( $userid ) )){
|
547 |
$this->wpforo->notice->add('Permission denied for this action', 'error');
|
548 |
return FALSE;
|
12 |
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
13 |
add_action('delete_user_form', array(&$this, 'show_delete_form'), 10, 2);
|
14 |
}
|
15 |
+
|
16 |
+
public function send_new_user_notifications($user_id, $notify = 'admin'){
|
17 |
+
wp_send_new_user_notifications( $user_id, $notify );
|
18 |
+
}
|
19 |
|
20 |
private function add_profile($args){
|
21 |
if(empty($args)) return FALSE;
|
141 |
return FALSE;
|
142 |
}
|
143 |
if( !empty($args) && is_array($args) && !empty($args['user_pass1']) ){
|
144 |
+
remove_action('register_new_user', 'wp_send_new_user_notifications');
|
145 |
+
add_action('register_new_user', array($this, 'send_new_user_notifications'));
|
146 |
+
|
147 |
$errors = new WP_Error();
|
148 |
|
149 |
extract($args, EXTR_OVERWRITE);
|
550 |
}
|
551 |
|
552 |
function ban($userid){
|
553 |
+
if( $userid == $this->wpforo->current_userid ){
|
554 |
+
$this->wpforo->notice->add('You can\'t make yourself banned user', 'error');
|
555 |
+
return FALSE;
|
556 |
+
}
|
557 |
if( !$this->wpforo->perm->usergroup_can( $this->wpforo->current_user_groupid , 'bm' ) || !$this->wpforo->perm->user_can_manage_user( $this->wpforo->current_userid, intval( $userid ) )){
|
558 |
$this->wpforo->notice->add('Permission denied for this action', 'error');
|
559 |
return FALSE;
|
wpf-includes/class-notices.php
CHANGED
@@ -135,6 +135,69 @@ class wpForoNotices{
|
|
135 |
$this->clear();
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
?>
|
135 |
$this->clear();
|
136 |
}
|
137 |
|
138 |
+
|
139 |
+
public function addonNote() {
|
140 |
+
global $wpforo;
|
141 |
+
$lastHash = get_option('wpforo-addon-note-dismissed');
|
142 |
+
$lastHashArray = explode(',', $lastHash);
|
143 |
+
$currentHash = $this->addonHash();
|
144 |
+
if ($lastHash != $currentHash) {
|
145 |
+
?>
|
146 |
+
<div class="updated notice wpforo_addon_note is-dismissible" style="margin-top:10px;">
|
147 |
+
<p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; width:95%;"><strong><?php _e('New Addons for Your Forum!', 'wpforo'); ?></strong><br><span style="font-size:14px;"><?php _e('Extend your forum with wpForo addons', 'wpforo'); ?></span></p>
|
148 |
+
<div style="font-size:14px;">
|
149 |
+
<?php
|
150 |
+
foreach ($wpforo->addons as $key => $addon) {
|
151 |
+
if (in_array($addon['title'], $lastHashArray))
|
152 |
+
continue;
|
153 |
+
?>
|
154 |
+
<div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:1px;border-bottom:1px dotted #DCDCDC; border-right:1px dotted #DCDCDC; padding-bottom:10px;"><img src="<?php echo $addon['thumb'] ?>" style="height:40px; width:auto; vertical-align:middle; margin:0px 10px; text-decoration:none;" /> <a href="<?php echo $addon['url'] ?>" style="text-decoration:none;" target="_blank">wpForo <?php echo $addon['title']; ?></a></div>
|
155 |
+
<?php
|
156 |
+
}
|
157 |
+
?>
|
158 |
+
<div style="clear:both;"></div>
|
159 |
+
</div>
|
160 |
+
<p> <a href="<?php echo admin_url('admin.php?page=wpforo-addons') ?>"><?php _e('View all Addons', 'wpforo'); ?> »</a></p>
|
161 |
+
</div>
|
162 |
+
<script>jQuery(document).on( 'click', '.wpforo_addon_note .notice-dismiss', function() {jQuery.ajax({url: ajaxurl, data: { action: 'dismiss_wpforo_addon_note'}})})</script>
|
163 |
+
<?php
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
public function dismissAddonNote() {
|
168 |
+
$hash = $this->addonHash();
|
169 |
+
update_option('wpforo-addon-note-dismissed', $hash);
|
170 |
+
exit();
|
171 |
+
}
|
172 |
+
|
173 |
+
public function dismissAddonNoteOnPage() {
|
174 |
+
$hash = $this->addonHash();
|
175 |
+
update_option('wpforo-addon-note-dismissed', $hash);
|
176 |
+
}
|
177 |
+
|
178 |
+
public function addonHash() {
|
179 |
+
global $wpforo; $viewed = '';
|
180 |
+
foreach ($wpforo->addons as $key => $addon) {
|
181 |
+
$viewed .= $addon['title'] . ',';
|
182 |
+
}
|
183 |
+
$hash = $viewed;
|
184 |
+
return $hash;
|
185 |
+
}
|
186 |
+
|
187 |
+
public function refreshAddonPage() {
|
188 |
+
$lastHash = get_option('wpforo-addon-note-dismissed');
|
189 |
+
$currentHash = $this->addonHash();
|
190 |
+
if ($lastHash != $currentHash) {
|
191 |
+
?>
|
192 |
+
<script language="javascript">jQuery(document).ready(function () {
|
193 |
+
location.reload();
|
194 |
+
});</script>
|
195 |
+
<?php
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
|
200 |
+
|
201 |
}
|
202 |
|
203 |
?>
|
wpf-includes/class-template.php
CHANGED
@@ -220,9 +220,9 @@ class wpForoTemplate{
|
|
220 |
$pages_count = ceil($items_count/$this->wpforo->post_options['posts_per_page']);
|
221 |
|
222 |
if($permalink){
|
223 |
-
$url = trim( preg_replace('#\/paged\/[\d]+\/*.*$#is', '',
|
224 |
}else{
|
225 |
-
$url = trim( preg_replace('#[\&\?]wpfpaged=[\d]*.*$#is', '',
|
226 |
$url .= (strpos($url, '?') === FALSE ? '?' : '&') . 'wpfpaged=';
|
227 |
}
|
228 |
?>
|
220 |
$pages_count = ceil($items_count/$this->wpforo->post_options['posts_per_page']);
|
221 |
|
222 |
if($permalink){
|
223 |
+
$url = trim( preg_replace('#\/paged\/[\d]+\/*.*$#is', '', wpforo_get_request_uri()), '/' ) . '/paged/';
|
224 |
}else{
|
225 |
+
$url = trim( preg_replace('#[\&\?]wpfpaged=[\d]*.*$#is', '', wpforo_get_request_uri()), '/' );
|
226 |
$url .= (strpos($url, '?') === FALSE ? '?' : '&') . 'wpfpaged=';
|
227 |
}
|
228 |
?>
|
wpf-includes/functions-installation.php
CHANGED
@@ -36,7 +36,7 @@ function do_wpforo_deactivation($network_wide){
|
|
36 |
|
37 |
function wpforo_activation(){
|
38 |
global $wpforo;
|
39 |
-
if( !
|
40 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
41 |
add_option('wpforo_default_groupid', 3);
|
42 |
require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
|
@@ -504,7 +504,7 @@ function wpforo_activation(){
|
|
504 |
$count = $wpforo->db->get_var($sql);
|
505 |
if(!$count){
|
506 |
if( $parentid = $wpforo->forum->add( array( 'title' => 'Main Category', 'description' => 'This is a simple category / section' ), FALSE ) ){
|
507 |
-
$wpforo->forum->add( array( 'title' => 'Main Forum', 'description' => 'This is a simple parent forum', 'parentid' => $parentid ), FALSE );
|
508 |
}
|
509 |
}
|
510 |
|
@@ -625,7 +625,7 @@ function wpforo_uninstall() {
|
|
625 |
|
626 |
global $wpforo, $wpdb;
|
627 |
|
628 |
-
if( !
|
629 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
630 |
$QUERY_STRING = trim(preg_replace('|_wpnonce=[^\&\?\=]*|is', '', $_SERVER['QUERY_STRING']), '&');
|
631 |
|
36 |
|
37 |
function wpforo_activation(){
|
38 |
global $wpforo;
|
39 |
+
if( ! wpforo_is_admin() ) return;
|
40 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
41 |
add_option('wpforo_default_groupid', 3);
|
42 |
require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
|
504 |
$count = $wpforo->db->get_var($sql);
|
505 |
if(!$count){
|
506 |
if( $parentid = $wpforo->forum->add( array( 'title' => 'Main Category', 'description' => 'This is a simple category / section' ), FALSE ) ){
|
507 |
+
$wpforo->forum->add( array( 'title' => 'Main Forum', 'description' => 'This is a simple parent forum', 'parentid' => $parentid, 'icon' => 'fa-comments' ), FALSE );
|
508 |
}
|
509 |
}
|
510 |
|
625 |
|
626 |
global $wpforo, $wpdb;
|
627 |
|
628 |
+
if( ! wpforo_is_admin() ) return;
|
629 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
630 |
$QUERY_STRING = trim(preg_replace('|_wpnonce=[^\&\?\=]*|is', '', $_SERVER['QUERY_STRING']), '&');
|
631 |
|
wpf-includes/functions-template.php
CHANGED
@@ -38,7 +38,7 @@ function wpforo_lostpass_url(){
|
|
38 |
$wp_lostpass_url = trim(get_bloginfo('url') , '/') . '/' . ltrim($wpforo->member_options['lost_password_url'] , '/');
|
39 |
}
|
40 |
else{
|
41 |
-
$wp_lostpass_url = wp_lostpassword_url(
|
42 |
}
|
43 |
return esc_url($wp_lostpass_url);
|
44 |
}
|
@@ -46,7 +46,7 @@ function wpforo_lostpass_url(){
|
|
46 |
|
47 |
function wpforo_menu_filter( $items, $menu ) {
|
48 |
global $wpforo;
|
49 |
-
if ( !
|
50 |
foreach ( $items as $key => $item ) {
|
51 |
if(isset($item->url)){
|
52 |
if( strpos($item->url, '%wpforo-') !== FALSE ){
|
@@ -280,7 +280,7 @@ class wpForo_Widget_login_form extends WP_Widget {
|
|
280 |
<p class="wpf-extra wpfcl-1">
|
281 |
<input type="checkbox" value="1" name="rememberme" id="wpf-login-remember">
|
282 |
<label for="wpf-login-remember"><?php wpforo_phrase('Remember Me') ?> |</label>
|
283 |
-
<a href="<?php echo esc_url(wp_lostpassword_url(
|
284 |
<a href="<?php echo esc_url(WPFORO_BASE_URL) ?>?wpforo=register"><?php wpforo_phrase('register') ?></a>
|
285 |
</p>
|
286 |
<input type="submit" name="wpforologin" value="<?php wpforo_phrase('Sign In') ?>" />
|
38 |
$wp_lostpass_url = trim(get_bloginfo('url') , '/') . '/' . ltrim($wpforo->member_options['lost_password_url'] , '/');
|
39 |
}
|
40 |
else{
|
41 |
+
$wp_lostpass_url = wp_lostpassword_url( wpforo_get_request_uri() );
|
42 |
}
|
43 |
return esc_url($wp_lostpass_url);
|
44 |
}
|
46 |
|
47 |
function wpforo_menu_filter( $items, $menu ) {
|
48 |
global $wpforo;
|
49 |
+
if ( !wpforo_is_admin() ) {
|
50 |
foreach ( $items as $key => $item ) {
|
51 |
if(isset($item->url)){
|
52 |
if( strpos($item->url, '%wpforo-') !== FALSE ){
|
280 |
<p class="wpf-extra wpfcl-1">
|
281 |
<input type="checkbox" value="1" name="rememberme" id="wpf-login-remember">
|
282 |
<label for="wpf-login-remember"><?php wpforo_phrase('Remember Me') ?> |</label>
|
283 |
+
<a href="<?php echo esc_url(wp_lostpassword_url(wpforo_get_request_uri())); ?>" class="wpf-forgot-pass"><?php wpforo_phrase('Lost your password?') ?></a>
|
284 |
<a href="<?php echo esc_url(WPFORO_BASE_URL) ?>?wpforo=register"><?php wpforo_phrase('register') ?></a>
|
285 |
</p>
|
286 |
<input type="submit" name="wpforologin" value="<?php wpforo_phrase('Sign In') ?>" />
|
wpf-includes/functions.php
CHANGED
@@ -23,8 +23,19 @@ function wpforo_verify_form( $mode = 'full' ){
|
|
23 |
}
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
function is_wpforo_page($url = ''){
|
27 |
-
if(
|
|
|
28 |
if( is_wpforo_exclude_url($url) ) return FALSE;
|
29 |
if( is_wpforo_shortcode_page() ) return TRUE;
|
30 |
return is_wpforo_url($url);
|
@@ -32,7 +43,7 @@ function is_wpforo_page($url = ''){
|
|
32 |
|
33 |
function is_wpforo_exclude_url($url = ''){
|
34 |
global $wpforo;
|
35 |
-
if(!$url) $url =
|
36 |
$url = urldecode($url);
|
37 |
$url = preg_replace('#/page/\d*/?$#isu', '', $url);
|
38 |
|
@@ -51,8 +62,8 @@ function is_wpforo_exclude_url($url = ''){
|
|
51 |
}
|
52 |
|
53 |
function is_wpforo_url($url = ''){
|
54 |
-
if(
|
55 |
-
if(!$url) $url =
|
56 |
global $wpforo;
|
57 |
|
58 |
if( $wpforo->use_home_url ) return TRUE;
|
@@ -61,20 +72,20 @@ function is_wpforo_url($url = ''){
|
|
61 |
|
62 |
if( $wpforo->permastruct && strpos($current_url, $wpforo->permastruct) !== FALSE
|
63 |
&& strpos($current_url, $wpforo->permastruct) == 0
|
64 |
-
&& !
|
65 |
|
66 |
return FALSE;
|
67 |
}
|
68 |
|
69 |
function is_wpforo_shortcode_page(){
|
70 |
-
if(
|
71 |
global $wpforo, $post;
|
72 |
if( $post && isset($post->post_content) && has_shortcode( $post->post_content, 'wpforo' ) && !is_wpforo_url() ) return TRUE;
|
73 |
return FALSE;
|
74 |
}
|
75 |
|
76 |
function wpforo_get_url_query_vars_str($url = ''){
|
77 |
-
if(!$url) $url =
|
78 |
|
79 |
$current_url = preg_replace('#https?://[^/\?]+\.[^/\?]+/?#isu', '', $url);
|
80 |
$site_url = preg_replace('#https?://[^/\?]+\.[^/\?]+/?#isu', '', esc_url( home_url('/') ));
|
@@ -182,7 +193,8 @@ if(!function_exists('is_serialized')){
|
|
182 |
}
|
183 |
|
184 |
|
185 |
-
function
|
|
|
186 |
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
|
187 |
$sp = strtolower($_SERVER["SERVER_PROTOCOL"]);
|
188 |
$protocol = substr($sp, 0, strpos($sp, "/")) . $s;
|
@@ -372,12 +384,12 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
372 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 2 ) : ?>
|
373 |
<span class="tablenav-pages-navspan">«</span>
|
374 |
<?php else : ?>
|
375 |
-
<a class="first-page" title="Go to the first page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
376 |
<?php endif ?>
|
377 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 1 ) : ?>
|
378 |
<span class="tablenav-pages-navspan">‹</span>
|
379 |
<?php else : ?>
|
380 |
-
<a class="prev-page" title="Go to the previous page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
381 |
<?php endif ?>
|
382 |
|
383 |
<span class="paging-input"><input class="current-page" title="Current page" type="text" name="paged" value="<?php echo isset($_GET['paged']) ? intval($_GET['paged']) : 1 ?>" size="1"> of <span class="total-pages"><?php echo intval($pages_count) ?></span></span>
|
@@ -385,12 +397,12 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
385 |
<?php if( isset($_GET['paged']) && $_GET['paged'] >= $pages_count ) : ?>
|
386 |
<span class="tablenav-pages-navspan">›</span>
|
387 |
<?php else : ?>
|
388 |
-
<a class="next-page" title="Go to the next page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
389 |
<?php endif ?>
|
390 |
<?php if( (isset($_GET['paged']) && $_GET['paged'] >= $pages_count - 1) || 1 >= $pages_count - 1 ) : ?>
|
391 |
<span class="tablenav-pages-navspan">»</span>
|
392 |
<?php else : ?>
|
393 |
-
<a class="last-page" title="Go to the last page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
394 |
<?php endif ?>
|
395 |
</div> <br class="clear">
|
396 |
|
@@ -404,7 +416,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
404 |
</th>
|
405 |
<?php foreach($fields as $key => $field) : ?>
|
406 |
<th scope="col" <?php if($key===0) echo ' style="width:30%"' ?> id="<?php echo esc_attr(sanitize_text_field($field)) ?>" class="manage-column column-<?php echo esc_attr(sanitize_text_field($field)) ?> <?php echo isset($_GET['order']) ? ($_GET['orderby'] == $field ? 'sorted ' : '') . $_GET['order'] : 'sortable asc' ?>">
|
407 |
-
<a href="<?php echo esc_url(preg_replace('#(\&*orderby\=[^\&]*\&*order\=[^\&]*)#is', '',
|
408 |
<span><?php echo sanitize_text_field(str_replace('_', ' ', wpforo_phrase( $field, false ))) ?></span>
|
409 |
<span class="sorting-indicator"></span>
|
410 |
</a>
|
@@ -556,12 +568,12 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
556 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 2 ) : ?>
|
557 |
<span class="tablenav-pages-navspan">«</span>
|
558 |
<?php else : ?>
|
559 |
-
<a class="first-page" title="Go to the first page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
560 |
<?php endif ?>
|
561 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 1 ) : ?>
|
562 |
<span class="tablenav-pages-navspan">‹</span>
|
563 |
<?php else : ?>
|
564 |
-
<a class="prev-page" title="Go to the previous page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
565 |
<?php endif ?>
|
566 |
|
567 |
<span class="paging-input"><input class="current-page" title="Current page" type="text" name="paged" value="<?php echo isset($_GET['paged']) ? intval($_GET['paged']) : 1 ?>" size="1"> of <span class="total-pages"><?php echo intval($pages_count) ?></span></span>
|
@@ -569,12 +581,12 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
569 |
<?php if( isset($_GET['paged']) && $_GET['paged'] >= $pages_count ) : ?>
|
570 |
<span class="tablenav-pages-navspan">›</span>
|
571 |
<?php else : ?>
|
572 |
-
<a class="next-page" title="Go to the next page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
573 |
<?php endif ?>
|
574 |
<?php if( (isset($_GET['paged']) && $_GET['paged'] >= $pages_count - 1) || 1 >= $pages_count - 1 ) : ?>
|
575 |
<span class="tablenav-pages-navspan">»</span>
|
576 |
<?php else : ?>
|
577 |
-
<a class="last-page" title="Go to the last page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '',
|
578 |
<?php endif ?>
|
579 |
</div> <br class="clear">
|
580 |
</div>
|
@@ -1323,4 +1335,18 @@ function wpforo_debug( $wpforo ){
|
|
1323 |
function wpforo_hook( $name, $args = array() ){
|
1324 |
do_action( $name, $args );
|
1325 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1326 |
?>
|
23 |
}
|
24 |
}
|
25 |
|
26 |
+
function wpforo_is_ajax(){
|
27 |
+
if( defined('DOING_AJAX') && DOING_AJAX ) return TRUE;
|
28 |
+
return FALSE;
|
29 |
+
}
|
30 |
+
|
31 |
+
function wpforo_is_admin(){
|
32 |
+
if( is_admin() && !wpforo_is_ajax() ) return TRUE;
|
33 |
+
return FALSE;
|
34 |
+
}
|
35 |
+
|
36 |
function is_wpforo_page($url = ''){
|
37 |
+
if( wpforo_is_admin() ) return FALSE;
|
38 |
+
if(!$url) $url = wpforo_get_request_uri();
|
39 |
if( is_wpforo_exclude_url($url) ) return FALSE;
|
40 |
if( is_wpforo_shortcode_page() ) return TRUE;
|
41 |
return is_wpforo_url($url);
|
43 |
|
44 |
function is_wpforo_exclude_url($url = ''){
|
45 |
global $wpforo;
|
46 |
+
if(!$url) $url = wpforo_get_request_uri();
|
47 |
$url = urldecode($url);
|
48 |
$url = preg_replace('#/page/\d*/?$#isu', '', $url);
|
49 |
|
62 |
}
|
63 |
|
64 |
function is_wpforo_url($url = ''){
|
65 |
+
if( wpforo_is_admin() ) return FALSE;
|
66 |
+
if(!$url) $url = wpforo_get_request_uri();
|
67 |
global $wpforo;
|
68 |
|
69 |
if( $wpforo->use_home_url ) return TRUE;
|
72 |
|
73 |
if( $wpforo->permastruct && strpos($current_url, $wpforo->permastruct) !== FALSE
|
74 |
&& strpos($current_url, $wpforo->permastruct) == 0
|
75 |
+
&& !wpforo_is_admin() ) return TRUE;
|
76 |
|
77 |
return FALSE;
|
78 |
}
|
79 |
|
80 |
function is_wpforo_shortcode_page(){
|
81 |
+
if( wpforo_is_admin() ) return FALSE;
|
82 |
global $wpforo, $post;
|
83 |
if( $post && isset($post->post_content) && has_shortcode( $post->post_content, 'wpforo' ) && !is_wpforo_url() ) return TRUE;
|
84 |
return FALSE;
|
85 |
}
|
86 |
|
87 |
function wpforo_get_url_query_vars_str($url = ''){
|
88 |
+
if(!$url) $url = wpforo_get_request_uri();
|
89 |
|
90 |
$current_url = preg_replace('#https?://[^/\?]+\.[^/\?]+/?#isu', '', $url);
|
91 |
$site_url = preg_replace('#https?://[^/\?]+\.[^/\?]+/?#isu', '', esc_url( home_url('/') ));
|
193 |
}
|
194 |
|
195 |
|
196 |
+
function wpforo_get_request_uri($with_port = FALSE, $get_referer_when_ajax = TRUE){
|
197 |
+
if( $get_referer_when_ajax && wpforo_is_ajax() ) return $_SERVER['HTTP_REFERER'];
|
198 |
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
|
199 |
$sp = strtolower($_SERVER["SERVER_PROTOCOL"]);
|
200 |
$protocol = substr($sp, 0, strpos($sp, "/")) . $s;
|
384 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 2 ) : ?>
|
385 |
<span class="tablenav-pages-navspan">«</span>
|
386 |
<?php else : ?>
|
387 |
+
<a class="first-page" title="Go to the first page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>">«</a>
|
388 |
<?php endif ?>
|
389 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 1 ) : ?>
|
390 |
<span class="tablenav-pages-navspan">‹</span>
|
391 |
<?php else : ?>
|
392 |
+
<a class="prev-page" title="Go to the previous page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo !isset($_GET['paged']) || $_GET['paged'] <= 1 ? 1 : $_GET['paged'] - 1 ?>">‹</a>
|
393 |
<?php endif ?>
|
394 |
|
395 |
<span class="paging-input"><input class="current-page" title="Current page" type="text" name="paged" value="<?php echo isset($_GET['paged']) ? intval($_GET['paged']) : 1 ?>" size="1"> of <span class="total-pages"><?php echo intval($pages_count) ?></span></span>
|
397 |
<?php if( isset($_GET['paged']) && $_GET['paged'] >= $pages_count ) : ?>
|
398 |
<span class="tablenav-pages-navspan">›</span>
|
399 |
<?php else : ?>
|
400 |
+
<a class="next-page" title="Go to the next page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo (isset($_GET['paged']) ? ( $_GET['paged'] >= $pages_count ? intval($pages_count) : intval($_GET['paged']) + 1 ) : (!isset($_GET['paged']) ? 2 : intval($_GET['paged']) + 1)) ?>">›</a>
|
401 |
<?php endif ?>
|
402 |
<?php if( (isset($_GET['paged']) && $_GET['paged'] >= $pages_count - 1) || 1 >= $pages_count - 1 ) : ?>
|
403 |
<span class="tablenav-pages-navspan">»</span>
|
404 |
<?php else : ?>
|
405 |
+
<a class="last-page" title="Go to the last page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo intval($pages_count) ?>">»</a></span>
|
406 |
<?php endif ?>
|
407 |
</div> <br class="clear">
|
408 |
|
416 |
</th>
|
417 |
<?php foreach($fields as $key => $field) : ?>
|
418 |
<th scope="col" <?php if($key===0) echo ' style="width:30%"' ?> id="<?php echo esc_attr(sanitize_text_field($field)) ?>" class="manage-column column-<?php echo esc_attr(sanitize_text_field($field)) ?> <?php echo isset($_GET['order']) ? ($_GET['orderby'] == $field ? 'sorted ' : '') . $_GET['order'] : 'sortable asc' ?>">
|
419 |
+
<a href="<?php echo esc_url(preg_replace('#(\&*orderby\=[^\&]*\&*order\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&orderby=<?php echo esc_attr(sanitize_text_field($field)) ?>&order=<?php echo isset($_GET['order']) ? ( $_GET['order'] == 'asc' ? 'desc' : 'asc' ) : 'asc' ?>">
|
420 |
<span><?php echo sanitize_text_field(str_replace('_', ' ', wpforo_phrase( $field, false ))) ?></span>
|
421 |
<span class="sorting-indicator"></span>
|
422 |
</a>
|
568 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 2 ) : ?>
|
569 |
<span class="tablenav-pages-navspan">«</span>
|
570 |
<?php else : ?>
|
571 |
+
<a class="first-page" title="Go to the first page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>">«</a>
|
572 |
<?php endif ?>
|
573 |
<?php if( !isset($_GET['paged']) || $_GET['paged'] <= 1 ) : ?>
|
574 |
<span class="tablenav-pages-navspan">‹</span>
|
575 |
<?php else : ?>
|
576 |
+
<a class="prev-page" title="Go to the previous page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo !isset($_GET['paged']) || $_GET['paged'] <= 1 ? 1 : intval($_GET['paged']) - 1 ?>">‹</a>
|
577 |
<?php endif ?>
|
578 |
|
579 |
<span class="paging-input"><input class="current-page" title="Current page" type="text" name="paged" value="<?php echo isset($_GET['paged']) ? intval($_GET['paged']) : 1 ?>" size="1"> of <span class="total-pages"><?php echo intval($pages_count) ?></span></span>
|
581 |
<?php if( isset($_GET['paged']) && $_GET['paged'] >= $pages_count ) : ?>
|
582 |
<span class="tablenav-pages-navspan">›</span>
|
583 |
<?php else : ?>
|
584 |
+
<a class="next-page" title="Go to the next page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo (isset($_GET['paged']) ? ( $_GET['paged'] >= $pages_count ? intval($pages_count) : intval($_GET['paged']) + 1 ) : (!isset($_GET['paged']) ? 2 : intval($_GET['paged']) + 1)) ?>">›</a>
|
585 |
<?php endif ?>
|
586 |
<?php if( (isset($_GET['paged']) && $_GET['paged'] >= $pages_count - 1) || 1 >= $pages_count - 1 ) : ?>
|
587 |
<span class="tablenav-pages-navspan">»</span>
|
588 |
<?php else : ?>
|
589 |
+
<a class="last-page" title="Go to the last page" href="<?php echo esc_url(preg_replace('#(\&*paged\=[^\&]*)#is', '', wpforo_get_request_uri())); ?>&paged=<?php echo intval($pages_count) ?>">»</a></span>
|
590 |
<?php endif ?>
|
591 |
</div> <br class="clear">
|
592 |
</div>
|
1335 |
function wpforo_hook( $name, $args = array() ){
|
1336 |
do_action( $name, $args );
|
1337 |
}
|
1338 |
+
|
1339 |
+
function wpforo_clean_cache( $key = 'post' ){
|
1340 |
+
if($key == 'post'){
|
1341 |
+
global $post;
|
1342 |
+
if(isset($post) && is_object($post) && !empty($post)) {
|
1343 |
+
clean_post_cache( $post );
|
1344 |
+
}
|
1345 |
+
else{
|
1346 |
+
$pageid = url_to_postid( $_SERVER['REQUEST_URI'] );
|
1347 |
+
$page = get_post( $pageid );
|
1348 |
+
clean_post_cache( $page );
|
1349 |
+
}
|
1350 |
+
}
|
1351 |
+
}
|
1352 |
?>
|
wpf-includes/wpf-actions.php
CHANGED
@@ -27,13 +27,13 @@ function wpforo_actions(){
|
|
27 |
}
|
28 |
(int)$wpf_login_times++;
|
29 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
30 |
-
wp_redirect( preg_replace('#\?.*$#is', '',
|
31 |
exit();
|
32 |
}else{
|
33 |
$args = array();
|
34 |
foreach($user->errors as $u_err) $args[] = $u_err[0];
|
35 |
$wpforo->notice->add($args, 'error');
|
36 |
-
wp_redirect(
|
37 |
exit();
|
38 |
}
|
39 |
}
|
@@ -53,7 +53,7 @@ function wpforo_actions(){
|
|
53 |
( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'em' ) && $wpforo->perm->user_can_manage_user( $wpforo->current_userid, intval($_POST['member']['userid']) )) ) ){
|
54 |
$wpforo->notice->clear();
|
55 |
$wpforo->notice->add('Permission denied', 'error');
|
56 |
-
wp_redirect(
|
57 |
exit();
|
58 |
}
|
59 |
|
@@ -87,7 +87,7 @@ function wpforo_actions(){
|
|
87 |
exit();
|
88 |
}
|
89 |
}
|
90 |
-
wp_redirect(
|
91 |
exit();
|
92 |
}
|
93 |
|
@@ -95,17 +95,19 @@ function wpforo_actions(){
|
|
95 |
if( $_REQUEST['topic']['action'] == 'add' ){
|
96 |
wpforo_verify_form();
|
97 |
if( $topicid = $wpforo->topic->add() ){
|
|
|
98 |
wp_redirect( $wpforo->topic->get_topic_url($topicid) );
|
99 |
exit();
|
100 |
}
|
101 |
}elseif( $_REQUEST['topic']['action'] == 'edit' ){
|
102 |
wpforo_verify_form();
|
103 |
if( $topicid = $wpforo->topic->edit() ){
|
|
|
104 |
wp_redirect( $wpforo->topic->get_topic_url($topicid) );
|
105 |
exit();
|
106 |
}
|
107 |
}
|
108 |
-
wp_redirect(
|
109 |
exit();
|
110 |
}
|
111 |
|
@@ -114,12 +116,14 @@ function wpforo_actions(){
|
|
114 |
if($_REQUEST['post']['action'] == 'add'){
|
115 |
wpforo_verify_form();
|
116 |
if( $postid = $wpforo->post->add() ){
|
|
|
117 |
wp_redirect( $wpforo->post->get_post_url( $postid ) );
|
118 |
exit();
|
119 |
}
|
120 |
}elseif($_REQUEST['post']['action'] == 'edit'){
|
121 |
wpforo_verify_form();
|
122 |
if( $postid = $wpforo->post->edit() ){
|
|
|
123 |
wp_redirect( $wpforo->post->get_post_url( $postid ) );
|
124 |
exit();
|
125 |
}
|
@@ -131,11 +135,12 @@ function wpforo_actions(){
|
|
131 |
$move_topicid = intval($_POST['movetopicid']);
|
132 |
$move_forumid = intval($_POST['topic']['forumid']);
|
133 |
$wpforo->topic->move( $move_topicid, $move_forumid );
|
134 |
-
|
|
|
135 |
exit();
|
136 |
}
|
137 |
|
138 |
-
wp_redirect(
|
139 |
exit();
|
140 |
}
|
141 |
|
@@ -147,7 +152,7 @@ function wpforo_actions(){
|
|
147 |
}else{
|
148 |
$wpforo->sbscrb->delete($sbs_key);
|
149 |
}
|
150 |
-
wp_redirect( preg_replace('#\?.*$#is', '',
|
151 |
exit();
|
152 |
}
|
153 |
|
@@ -155,7 +160,7 @@ function wpforo_actions(){
|
|
155 |
if( isset($_GET['wpforo']) && $_GET['wpforo'] == 'solved' && $_GET['tid'] ){
|
156 |
$topicid = intval($_GET['tid']);
|
157 |
|
158 |
-
wp_redirect( preg_replace('#\?.*$#is', '',
|
159 |
exit();
|
160 |
}
|
161 |
|
@@ -167,12 +172,12 @@ function wpforo_actions(){
|
|
167 |
*/
|
168 |
|
169 |
##Settings action
|
170 |
-
if(
|
171 |
if(!current_user_can('administrator')) return;
|
172 |
update_option('wpforo_count_per_page', $_POST['wpforo_screen_option']['value']);
|
173 |
}
|
174 |
|
175 |
-
if(
|
176 |
if(!current_user_can('administrator')){
|
177 |
$wpforo->notice->add('Permission denied', 'error');
|
178 |
wp_redirect(admin_url());
|
@@ -214,7 +219,7 @@ function wpforo_actions(){
|
|
214 |
}
|
215 |
}
|
216 |
|
217 |
-
if(
|
218 |
|
219 |
if(!current_user_can('administrator')){
|
220 |
$wpforo->notice->add('Permission denied', 'error');
|
@@ -343,7 +348,7 @@ function wpforo_actions(){
|
|
343 |
}
|
344 |
|
345 |
### forum action ###
|
346 |
-
if(
|
347 |
|
348 |
if(!current_user_can('administrator')){
|
349 |
$wpforo->notice->add('Permission denied', 'error');
|
@@ -364,7 +369,7 @@ function wpforo_actions(){
|
|
364 |
if( isset($forumid) && $forumid ){
|
365 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) );
|
366 |
}else{
|
367 |
-
wp_redirect(
|
368 |
}
|
369 |
exit();
|
370 |
}
|
@@ -385,7 +390,7 @@ function wpforo_actions(){
|
|
385 |
}
|
386 |
|
387 |
##Phrases
|
388 |
-
if(
|
389 |
|
390 |
if(!current_user_can('administrator')){
|
391 |
$wpforo->notice->add('Permission denied', 'error');
|
@@ -410,7 +415,7 @@ function wpforo_actions(){
|
|
410 |
|
411 |
|
412 |
##Members
|
413 |
-
if(
|
414 |
$u_action = '';
|
415 |
if( !empty($_GET['action']) && $_GET['action'] != '-1' ){
|
416 |
$u_action = $_GET['action'];
|
@@ -458,7 +463,7 @@ function wpforo_actions(){
|
|
458 |
|
459 |
|
460 |
##Usergroups
|
461 |
-
if(
|
462 |
|
463 |
if(!current_user_can('administrator')){
|
464 |
$wpforo->notice->add('Permission denied', 'error');
|
@@ -492,7 +497,7 @@ function wpforo_actions(){
|
|
492 |
}
|
493 |
|
494 |
##### Admin Accesses action ######
|
495 |
-
if(
|
496 |
|
497 |
if(!current_user_can('administrator')){
|
498 |
$wpforo->notice->add('Permission denied', 'error');
|
@@ -513,7 +518,7 @@ function wpforo_actions(){
|
|
513 |
$insert_access_key = sanitize_text_field($_POST['access']['key']);
|
514 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
515 |
$wpforo->perm->edit( $insert_access_name, $cans, $insert_access_key );
|
516 |
-
wp_redirect(
|
517 |
exit();
|
518 |
}elseif( isset($_GET['action']) && $_GET['action'] == 'del' && isset($_GET['accessid']) ){
|
519 |
|
@@ -531,7 +536,7 @@ function wpforo_actions(){
|
|
531 |
}
|
532 |
|
533 |
##Themes
|
534 |
-
if(
|
535 |
|
536 |
if(!current_user_can('administrator')){
|
537 |
$wpforo->notice->add('Permission denied', 'error');
|
27 |
}
|
28 |
(int)$wpf_login_times++;
|
29 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
30 |
+
wp_redirect( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) );
|
31 |
exit();
|
32 |
}else{
|
33 |
$args = array();
|
34 |
foreach($user->errors as $u_err) $args[] = $u_err[0];
|
35 |
$wpforo->notice->add($args, 'error');
|
36 |
+
wp_redirect( wpforo_get_request_uri() );
|
37 |
exit();
|
38 |
}
|
39 |
}
|
53 |
( $wpforo->perm->usergroup_can( $wpforo->current_user_groupid, 'em' ) && $wpforo->perm->user_can_manage_user( $wpforo->current_userid, intval($_POST['member']['userid']) )) ) ){
|
54 |
$wpforo->notice->clear();
|
55 |
$wpforo->notice->add('Permission denied', 'error');
|
56 |
+
wp_redirect(wpforo_get_request_uri());
|
57 |
exit();
|
58 |
}
|
59 |
|
87 |
exit();
|
88 |
}
|
89 |
}
|
90 |
+
wp_redirect(wpforo_get_request_uri());
|
91 |
exit();
|
92 |
}
|
93 |
|
95 |
if( $_REQUEST['topic']['action'] == 'add' ){
|
96 |
wpforo_verify_form();
|
97 |
if( $topicid = $wpforo->topic->add() ){
|
98 |
+
wpforo_clean_cache();
|
99 |
wp_redirect( $wpforo->topic->get_topic_url($topicid) );
|
100 |
exit();
|
101 |
}
|
102 |
}elseif( $_REQUEST['topic']['action'] == 'edit' ){
|
103 |
wpforo_verify_form();
|
104 |
if( $topicid = $wpforo->topic->edit() ){
|
105 |
+
wpforo_clean_cache();
|
106 |
wp_redirect( $wpforo->topic->get_topic_url($topicid) );
|
107 |
exit();
|
108 |
}
|
109 |
}
|
110 |
+
wp_redirect( wpforo_get_request_uri() );
|
111 |
exit();
|
112 |
}
|
113 |
|
116 |
if($_REQUEST['post']['action'] == 'add'){
|
117 |
wpforo_verify_form();
|
118 |
if( $postid = $wpforo->post->add() ){
|
119 |
+
wpforo_clean_cache();
|
120 |
wp_redirect( $wpforo->post->get_post_url( $postid ) );
|
121 |
exit();
|
122 |
}
|
123 |
}elseif($_REQUEST['post']['action'] == 'edit'){
|
124 |
wpforo_verify_form();
|
125 |
if( $postid = $wpforo->post->edit() ){
|
126 |
+
wpforo_clean_cache();
|
127 |
wp_redirect( $wpforo->post->get_post_url( $postid ) );
|
128 |
exit();
|
129 |
}
|
135 |
$move_topicid = intval($_POST['movetopicid']);
|
136 |
$move_forumid = intval($_POST['topic']['forumid']);
|
137 |
$wpforo->topic->move( $move_topicid, $move_forumid );
|
138 |
+
wpforo_clean_cache();
|
139 |
+
wp_redirect( wpforo_get_request_uri() );
|
140 |
exit();
|
141 |
}
|
142 |
|
143 |
+
wp_redirect( wpforo_get_request_uri() );
|
144 |
exit();
|
145 |
}
|
146 |
|
152 |
}else{
|
153 |
$wpforo->sbscrb->delete($sbs_key);
|
154 |
}
|
155 |
+
wp_redirect( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) );
|
156 |
exit();
|
157 |
}
|
158 |
|
160 |
if( isset($_GET['wpforo']) && $_GET['wpforo'] == 'solved' && $_GET['tid'] ){
|
161 |
$topicid = intval($_GET['tid']);
|
162 |
|
163 |
+
wp_redirect( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) );
|
164 |
exit();
|
165 |
}
|
166 |
|
172 |
*/
|
173 |
|
174 |
##Settings action
|
175 |
+
if( wpforo_is_admin() && isset($_POST['wpforo_screen_option']['value']) ){
|
176 |
if(!current_user_can('administrator')) return;
|
177 |
update_option('wpforo_count_per_page', $_POST['wpforo_screen_option']['value']);
|
178 |
}
|
179 |
|
180 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-community' && isset($_GET['action']) && $_GET['action'] ){
|
181 |
if(!current_user_can('administrator')){
|
182 |
$wpforo->notice->add('Permission denied', 'error');
|
183 |
wp_redirect(admin_url());
|
219 |
}
|
220 |
}
|
221 |
|
222 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' ){
|
223 |
|
224 |
if(!current_user_can('administrator')){
|
225 |
$wpforo->notice->add('Permission denied', 'error');
|
348 |
}
|
349 |
|
350 |
### forum action ###
|
351 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-forums' ){
|
352 |
|
353 |
if(!current_user_can('administrator')){
|
354 |
$wpforo->notice->add('Permission denied', 'error');
|
369 |
if( isset($forumid) && $forumid ){
|
370 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) );
|
371 |
}else{
|
372 |
+
wp_redirect( wpforo_get_request_uri() );
|
373 |
}
|
374 |
exit();
|
375 |
}
|
390 |
}
|
391 |
|
392 |
##Phrases
|
393 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-phrases' ){
|
394 |
|
395 |
if(!current_user_can('administrator')){
|
396 |
$wpforo->notice->add('Permission denied', 'error');
|
415 |
|
416 |
|
417 |
##Members
|
418 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-members' ){
|
419 |
$u_action = '';
|
420 |
if( !empty($_GET['action']) && $_GET['action'] != '-1' ){
|
421 |
$u_action = $_GET['action'];
|
463 |
|
464 |
|
465 |
##Usergroups
|
466 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-usergroups' ){
|
467 |
|
468 |
if(!current_user_can('administrator')){
|
469 |
$wpforo->notice->add('Permission denied', 'error');
|
497 |
}
|
498 |
|
499 |
##### Admin Accesses action ######
|
500 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' && isset($_GET['tab']) && $_GET['tab'] == 'accesses' ){
|
501 |
|
502 |
if(!current_user_can('administrator')){
|
503 |
$wpforo->notice->add('Permission denied', 'error');
|
518 |
$insert_access_key = sanitize_text_field($_POST['access']['key']);
|
519 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
520 |
$wpforo->perm->edit( $insert_access_name, $cans, $insert_access_key );
|
521 |
+
wp_redirect( wpforo_get_request_uri() );
|
522 |
exit();
|
523 |
}elseif( isset($_GET['action']) && $_GET['action'] == 'del' && isset($_GET['accessid']) ){
|
524 |
|
536 |
}
|
537 |
|
538 |
##Themes
|
539 |
+
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-themes' && isset($_GET['theme']) ){
|
540 |
|
541 |
if(!current_user_can('administrator')){
|
542 |
$wpforo->notice->add('Permission denied', 'error');
|
wpf-includes/wpf-hooks.php
CHANGED
@@ -37,7 +37,7 @@ function wpforo_user_admin_bar(){
|
|
37 |
add_action('init', 'wpforo_user_admin_bar');
|
38 |
|
39 |
function wpforo_admin_notice__menu_help(){
|
40 |
-
if(strpos(
|
41 |
global $wpforo;
|
42 |
|
43 |
$message = 'wpForo Menu Shortcodes<hr/><table>';
|
@@ -127,13 +127,13 @@ function wpftpl( $filename ){
|
|
127 |
|
128 |
function wpforo_init_template(){
|
129 |
global $wpforo;
|
130 |
-
if(
|
131 |
include_once( wpftpl('index.php') );
|
132 |
}
|
133 |
|
134 |
add_shortcode( 'wpforo', 'wpforo_load' );
|
135 |
function wpforo_load( $atts ){
|
136 |
-
if(
|
137 |
global $wpforo, $post;
|
138 |
|
139 |
if( is_wpforo_shortcode_page() ){
|
@@ -308,7 +308,7 @@ function wpforo_add_meta_tags(){
|
|
308 |
$template = '';
|
309 |
$description = '';
|
310 |
$udata = array();
|
311 |
-
$canonical =
|
312 |
$paged = ( $wpforo->current_object['paged'] > 1 ) ? wpforo_phrase( 'page', false) . ' ' . $wpforo->current_object['paged'] .' | ' : '';
|
313 |
if(isset($wpforo->current_object['template'])) $template = $wpforo->current_object['template'];
|
314 |
if(!empty($wpforo->current_object['forum'])) $forum = $wpforo->current_object['forum'];
|
@@ -1422,8 +1422,10 @@ if( !defined('WPFOROATTACH_BASENAME') ){
|
|
1422 |
add_filter('wpforo_body_text_filter', 'wpforo_default_attachments_filter');
|
1423 |
}
|
1424 |
|
1425 |
-
|
1426 |
-
add_filter('wpforo_body_text_filter', '
|
|
|
|
|
1427 |
|
1428 |
function wpforo_akismet_check(){
|
1429 |
global $wpforo;
|
37 |
add_action('init', 'wpforo_user_admin_bar');
|
38 |
|
39 |
function wpforo_admin_notice__menu_help(){
|
40 |
+
if(strpos(wpforo_get_request_uri(), 'nav-menus.php') !== FALSE){
|
41 |
global $wpforo;
|
42 |
|
43 |
$message = 'wpForo Menu Shortcodes<hr/><table>';
|
127 |
|
128 |
function wpforo_init_template(){
|
129 |
global $wpforo;
|
130 |
+
if(wpforo_is_admin()) return;
|
131 |
include_once( wpftpl('index.php') );
|
132 |
}
|
133 |
|
134 |
add_shortcode( 'wpforo', 'wpforo_load' );
|
135 |
function wpforo_load( $atts ){
|
136 |
+
if(wpforo_is_admin()) return;
|
137 |
global $wpforo, $post;
|
138 |
|
139 |
if( is_wpforo_shortcode_page() ){
|
308 |
$template = '';
|
309 |
$description = '';
|
310 |
$udata = array();
|
311 |
+
$canonical = wpforo_get_request_uri();
|
312 |
$paged = ( $wpforo->current_object['paged'] > 1 ) ? wpforo_phrase( 'page', false) . ' ' . $wpforo->current_object['paged'] .' | ' : '';
|
313 |
if(isset($wpforo->current_object['template'])) $template = $wpforo->current_object['template'];
|
314 |
if(!empty($wpforo->current_object['forum'])) $forum = $wpforo->current_object['forum'];
|
1422 |
add_filter('wpforo_body_text_filter', 'wpforo_default_attachments_filter');
|
1423 |
}
|
1424 |
|
1425 |
+
if( !class_exists('wpForoSmiles') ){
|
1426 |
+
add_filter('wpforo_body_text_filter', 'wp_encode_emoji', 9);
|
1427 |
+
add_filter('wpforo_body_text_filter', 'convert_smilies');
|
1428 |
+
}
|
1429 |
|
1430 |
function wpforo_akismet_check(){
|
1431 |
global $wpforo;
|
wpf-languages/wpforo-fa_IR.mo
ADDED
Binary file
|
wpf-languages/wpforo-fa_IR.po
ADDED
@@ -0,0 +1,3038 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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