| @@ -70,10 +70,11 @@ | ||
| 70 | 70 | add_filter('wp_list_pages_excludes', 'c_ws_plugin__s2member_querys::_query_level_access_list_pages', 100); |
| 71 | 71 | |
| 72 | 72 | add_action('wp', 'c_ws_plugin__s2member_ssl::check_force_ssl', 1); |
| 73 | 73 | add_action('wp', 'c_ws_plugin__s2member_security::security_gate', 1); |
| 74 | -//240315 Apply s2 restrictions to WP REST API | |
| 75 | -add_filter('rest_pre_dispatch', 'c_ws_plugin__s2member_security_rest::security_gate', 10, 3); | |
| 74 | +//261005.2320 Resolve actual REST controllers and IDs after WordPress matches and validates requests. | |
| 75 | +add_filter('rest_request_before_callbacks', 'c_ws_plugin__s2member_security_rest::security_gate', 10, 3); | |
| 76 | +add_action('rest_api_init', 'c_ws_plugin__s2member_security_rest::register_collection_filters', 100); | |
| 76 | 77 | |
| 77 | 78 | add_filter('wp_mail', 'c_ws_plugin__s2member_email_configs::email_filter'); |
| 78 | 79 | |
| 79 | 80 | add_filter('widget_text', 'do_shortcode'); // Shortcodes in widgets. |
| @@ -198,11 +199,11 @@ | ||
| 198 | 199 | add_action('admin_init', 'c_ws_plugin__s2member_admin_notices::dismiss_shortcode_user_fields_notice'); |
| 199 | 200 | add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::shortcode_user_fields_notice', 11); |
| 200 | 201 | |
| 201 | 202 | //260820.0149 Escalate materially unhealthy Auto-EOT processing beyond its settings panel. |
| 202 | -add_action('admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12); | |
| 203 | -add_action('user_admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12); | |
| 204 | -add_action('network_admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12); | |
| 203 | +add_action('admin_notices', 'c_ws_plugin__s2member_eot::auto_eot_system_admin_notice', 12); | |
| 204 | +add_action('user_admin_notices', 'c_ws_plugin__s2member_eot::auto_eot_system_admin_notice', 12); | |
| 205 | +add_action('network_admin_notices', 'c_ws_plugin__s2member_eot::auto_eot_system_admin_notice', 12); | |
| 205 | 206 | |
| 206 | 207 | //260917.0425 Warn administrators from the current Framework when the installed Pro add-on predates the current Pro updater, without disabling otherwise-compatible Pro features. |
| 207 | 208 | add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::outdated_pro_notice', 10); |
| 208 | 209 | add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::outdated_pro_notice', 10); |
| @@ -237,16 +238,16 @@ | ||
| 237 | 238 | add_action('updated_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times', 10, 4); |
| 238 | 239 | add_action('deleted_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times_on_delete', 10, 3); |
| 239 | 240 | |
| 240 | 241 | add_filter('cron_schedules', 'c_ws_plugin__s2member_cron_jobs::extend_cron_schedules'); |
| 241 | -add_action('ws_plugin__s2member_auto_eot_system__schedule', 'c_ws_plugin__s2member_auto_eots::auto_eot_system'); | |
| 242 | +add_action('ws_plugin__s2member_auto_eot_system__schedule', 'c_ws_plugin__s2member_eot::auto_eot_system'); | |
| 242 | 243 | //260820.0056 Keep catch-up work on a separate one-off hook so it can process only overdue EOTs without repeatedly invoking collective Pro cron consumers. |
| 243 | -add_action('ws_plugin__s2member_auto_eot_system__continuation', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_continuation'); | |
| 244 | -add_action('ws_plugin__s2member_eot_processed_time_backfill', 'c_ws_plugin__s2member_auto_eots::backfill_eot_processed_times'); //260822.2048 Recover historical EOT processing times from legacy Administrative Notes after upgrade. | |
| 244 | +add_action('ws_plugin__s2member_auto_eot_system__continuation', 'c_ws_plugin__s2member_eot::auto_eot_system_continuation'); | |
| 245 | +add_action('ws_plugin__s2member_eot_processed_time_backfill', 'c_ws_plugin__s2member_eot::backfill_eot_processed_times'); //260822.2048 Recover historical EOT processing times from legacy Administrative Notes after upgrade. | |
| 245 | 246 | //260819.0613 Repair a missing recurring Auto-EOT event during normal requests, and immediately after an EOT run if WordPress failed to reschedule it. |
| 246 | -add_action('init', 'c_ws_plugin__s2member_auto_eots::ensure_auto_eot_system', 3); | |
| 247 | -add_action('init', 'c_ws_plugin__s2member_auto_eots::ensure_eot_processed_time_backfill', 4); //260822.2048 Self-heal only while the temporary upgrade backfill cursor exists. | |
| 248 | -add_action('ws_plugin__s2member_after_auto_eot_system', 'c_ws_plugin__s2member_auto_eots::ensure_auto_eot_system', 999); | |
| 247 | +add_action('init', 'c_ws_plugin__s2member_eot::ensure_auto_eot_system', 3); | |
| 248 | +add_action('init', 'c_ws_plugin__s2member_eot::ensure_eot_processed_time_backfill', 4); //260822.2048 Self-heal only while the temporary upgrade backfill cursor exists. | |
| 249 | +add_action('ws_plugin__s2member_after_auto_eot_system', 'c_ws_plugin__s2member_eot::ensure_auto_eot_system', 999); | |
| 249 | 250 | |
| 250 | 251 | add_action('wp_ajax_ws_plugin__s2member_update_roles_via_ajax', 'c_ws_plugin__s2member_roles_caps::update_roles_via_ajax'); |
| 251 | 252 | |
| 252 | 253 | add_action('wp_ajax_ws_plugin__s2member_sp_access_link_via_ajax', 'c_ws_plugin__s2member_sp_access::sp_access_link_via_ajax'); |
| @@ -276,6 +277,4 @@ | ||
| 276 | 277 | */ |
| 277 | 278 | register_activation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::activate'); |
| 278 | 279 | register_deactivation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::deactivate'); |
| 279 | 280 | register_uninstall_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::uninstall'); |
| 280 | -//221024 Now that Pro add-on doesn't have to match Framework's version to remain active, it's safer to auto-update Framework. | |
| 281 | -// add_filter('auto_update_plugin', 'c_ws_plugin__s2member_installation::auto_update_filter', PHP_INT_MAX-10, 2); // Disallow s2Member update. | |