feat: remove forum feature (Phase 1)
This commit is contained in:
1 parent
f3e4cdd9cf
commit
2bbd7c01a3
173 files changed
+51
-27360
No files matched your search
@@ -178,29 +178,6 @@ class Shortcodes {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Forum topics: paid/credits unlock list or orders.
|
||||
if ($post->post_type === 'aksrt_forum_topic' && class_exists('\AKSRT\Forum\Forum')) {
|
||||
$forum = \AKSRT\Forum\Forum::get_instance();
|
||||
$visibility = sanitize_key((string) get_post_meta($pid, '_aksrt_visibility', true));
|
||||
if ($visibility === 'public' || $visibility === '') {
|
||||
return true;
|
||||
}
|
||||
if (method_exists($forum, 'has_user_unlocked_topic') && $forum->has_user_unlocked_topic($uid, $pid)) {
|
||||
return true;
|
||||
}
|
||||
if (method_exists($forum, 'has_user_paid_topic') && $forum->has_user_paid_topic($uid, $pid)) {
|
||||
return true;
|
||||
}
|
||||
// Free VIP price counts as paid for cash topics.
|
||||
if ($visibility === 'pay' && method_exists($forum, 'resolve_topic_pay_price')) {
|
||||
$price = $forum->resolve_topic_pay_price($pid, $uid);
|
||||
if (!empty($price['is_free'])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (class_exists('\AKSRT\Content\Visibility')) {
|
||||
return \AKSRT\Content\Visibility::can_view_paid_content($pid);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user