refactor(permissions): remove hard-off compat stubs and harden login schema
Delete aksrt-compat.php and rewire messages/PM entry points to the user center notification route. Normalize permissions login dependsOn objects and allow an explicit empty captcha provider option so login/moderation schema pages remain loadable without legacy compatibility shims.
This commit is contained in:
1 parent
f86513dbff
commit
06e551e6d8
6 files changed
+14
-53
No files matched your search
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Deprecated compatibility toggles retained only as hard-off stubs.
|
||||
*
|
||||
* The rebuild now treats Zibll-style mainline pages as the only product target.
|
||||
* Historical message center / PM entry points / compat template pickers stay on
|
||||
* disk for legacy routing safety, but no longer participate in product-facing
|
||||
* navigation or configuration decisions.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('aksrt_get_messages_url')) {
|
||||
/**
|
||||
* Legacy message center URL stub.
|
||||
*/
|
||||
function aksrt_get_messages_url(): string {
|
||||
return home_url('/messages/');
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_pm_frontend_enabled')) {
|
||||
/**
|
||||
* Private-message entry is disabled in the rebuilt mainline.
|
||||
*/
|
||||
function aksrt_pm_frontend_enabled(): bool {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_show_compat_page_templates')) {
|
||||
/**
|
||||
* Compat-only page templates are hidden from the rebuilt product surface.
|
||||
*/
|
||||
function aksrt_show_compat_page_templates(): bool {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -453,7 +453,7 @@ if (!function_exists('aksrt_get_user_center_render_context')) {
|
||||
'show_avatar_edit' => !empty($user_center_settings['avatar_upload']),
|
||||
'avatar_settings_url' => admin_url('profile.php'),
|
||||
'notification_unread_count' => function_exists('aksrt_get_user_unread_notification_count') ? aksrt_get_user_unread_notification_count($user_id) : 0,
|
||||
'messages_url' => function_exists('aksrt_get_messages_url') ? aksrt_get_messages_url() : aksrt_get_user_center_url('notif'),
|
||||
'messages_url' => aksrt_get_user_center_url('notif'),
|
||||
'per_page' => 10,
|
||||
'posts_page' => max(1, isset($_GET['posts_page']) ? (int) $_GET['posts_page'] : 1),
|
||||
'comments_page' => max(1, isset($_GET['comments_page']) ? (int) $_GET['comments_page'] : 1),
|
||||
|
||||
Reference in new issue
Block a user