feat: remove forum feature (Phase 1)
This commit is contained in:
@@ -356,26 +356,7 @@ if (!function_exists('aksrt_content_order_cookie_token_key')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether guest cash purchase is allowed for forum topic / plate follow.
|
||||
* Reuses global pay_no_logged_in (same switch as content).
|
||||
*
|
||||
* @param WP_Post|int|null $post Topic or plate post (optional filter context).
|
||||
*/
|
||||
if (!function_exists('aksrt_allow_guest_forum_pay')) {
|
||||
function aksrt_allow_guest_forum_pay($post = null): bool {
|
||||
$order = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_order_settings() : [];
|
||||
$paid = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_paid_content_settings() : [];
|
||||
$allow = !empty($order['no_logged_in']) || !empty($paid['no_logged_in']);
|
||||
/**
|
||||
* @param bool $allow
|
||||
* @param WP_Post|int|null $post
|
||||
*/
|
||||
return (bool) apply_filters('aksrt_allow_guest_forum_pay', $allow, $post);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set guest paid cookies after cash order paid (content / topic / plate_follow).
|
||||
* Set guest paid cookies after cash order paid (content).
|
||||
*
|
||||
* @param array<string,mixed> $order
|
||||
*/
|
||||
@@ -495,18 +476,6 @@ if (!function_exists('aksrt_guest_has_paid_access')) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Guest paid plate follow access (cookie).
|
||||
*/
|
||||
if (!function_exists('aksrt_guest_has_plate_follow_access')) {
|
||||
function aksrt_guest_has_plate_follow_access(int $plate_id): bool {
|
||||
$type = class_exists('\AKSRT\Core\DomainModel')
|
||||
? \AKSRT\Core\DomainModel::ORDER_PRODUCT_PLATE_FOLLOW
|
||||
: 'plate_follow';
|
||||
return null !== aksrt_get_guest_paid_order($plate_id, $type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the amount a given user should pay for a post (Zibll VIP tier min).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user