PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 261011
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v261011
261011 261001 260927 260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 All 192 releases
← All changes | src/includes/hooks.inc.php +25 -13 260909 → 261011 View file →
@@ -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.
@@ -85,8 +86,10 @@
85 86 //260904.0300 Fresh activation can update options before funcs.inc.php installs s2Member's class autoloader, so defer this callback until s2Member is fully loaded.
86 87 add_action('ws_plugin__s2member_loaded', function() {
87 88 add_action('updated_option', 'c_ws_plugin__s2member_utils_assets::maybe_invalidate_after_wp_option_update', 10, 3);
88 89 });
90 +//260911.1834 Relevant General Options saves rebuild enabled static assets after the complete new option set is available, instead of making the admin wait for a frontend page-load.
91 +add_action('ws_plugin__s2member_after_update_all_options', 'c_ws_plugin__s2member_utils_assets::rebuild_static_assets_after_options_save', 10, 1);
89 92 add_action('activated_plugin', 'c_ws_plugin__s2member_utils_assets::invalidate_after_plugin_change');
90 93 add_action('deactivated_plugin', 'c_ws_plugin__s2member_utils_assets::invalidate_after_plugin_change');
91 94 add_action('upgrader_process_complete', 'c_ws_plugin__s2member_utils_assets::maybe_invalidate_after_upgrade', 10, 2);
92 95 add_action('ws_plugin__s2member_after_activation', 'c_ws_plugin__s2member_utils_assets::invalidate_static_assets', 10, 0);
@@ -91,10 +94,16 @@
91 94 add_action('upgrader_process_complete', 'c_ws_plugin__s2member_utils_assets::maybe_invalidate_after_upgrade', 10, 2);
92 95 add_action('ws_plugin__s2member_after_activation', 'c_ws_plugin__s2member_utils_assets::invalidate_static_assets', 10, 0);
93 96 add_action('wp_ajax_ws_plugin__s2member_refresh_static_assets', 'c_ws_plugin__s2member_utils_assets::ajax_refresh_static_assets');
94 97 add_action('wp_ajax_ws_plugin__s2member_asset_http_health', 'c_ws_plugin__s2member_utils_assets::ajax_asset_http_health_report');
98 +add_action('wp_ajax_ws_plugin__s2member_clear_asset_health_details', 'c_ws_plugin__s2member_utils_assets::ajax_clear_asset_health_details'); //260913.0056 Clear only the requested persistent troubleshooting summary; scoring and current Health remain unchanged.
95 99 add_action('wp_ajax_ws_plugin__s2member_asset_runtime_suspect', 'c_ws_plugin__s2member_utils_assets::ajax_asset_runtime_suspicion');
96 100 add_action('wp_ajax_nopriv_ws_plugin__s2member_asset_runtime_suspect', 'c_ws_plugin__s2member_utils_assets::ajax_asset_runtime_suspicion');
101 +//260912.0258 Frontend requests queue separate health events; the Health Logkeeper merges them later so page delivery never waits on the shared health-log writer.
102 +add_action('ws_plugin__s2member_assets_health_logkeeper', 'c_ws_plugin__s2member_utils_assets::run_health_logkeeper');
103 +add_action('init', 'c_ws_plugin__s2member_utils_assets::maybe_upgrade_asset_health_format', 1); //260912.0522 Run before normal asset decisions so stale first-v260909 activation tags/builds cannot leak into the physical-response scoring format.
104 +add_action('admin_init', 'c_ws_plugin__s2member_utils_assets::maybe_rebuild_static_assets_on_admin_request', 20); //260911.1924 Privileged admin page-loads are a cheap recovery opportunity for pending, ungenerated, or locally missing enabled static assets; frontend traffic remains a fallback.
105 +add_action('admin_init', 'c_ws_plugin__s2member_utils_assets::dismiss_static_assets_admin_notice'); //260910.0709 Process the nonce-protected incident dismissal before the same request reaches admin_notices.
97 106 add_action('admin_notices', 'c_ws_plugin__s2member_utils_assets::static_assets_admin_notice');
98 107 add_action('admin_footer', 'c_ws_plugin__s2member_utils_assets::asset_http_health_probe', 900);
99 108 add_action('wp_footer', 'c_ws_plugin__s2member_utils_assets::asset_http_health_probe', 900);
100 109 add_action('wp_footer', 'c_ws_plugin__s2member_utils_assets::page_asset_runtime_monitor', 1000);
@@ -190,12 +199,17 @@
190 199 add_action('admin_init', 'c_ws_plugin__s2member_admin_notices::dismiss_shortcode_user_fields_notice');
191 200 add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::shortcode_user_fields_notice', 11);
192 201
193 202 //260820.0149 Escalate materially unhealthy Auto-EOT processing beyond its settings panel.
194 -add_action('admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12);
195 -add_action('user_admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12);
196 -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);
197 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.
208 +add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::outdated_pro_notice', 10);
209 +add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::outdated_pro_notice', 10);
210 +add_action('network_admin_notices', 'c_ws_plugin__s2member_admin_notices::outdated_pro_notice', 10);
211 +
198 212 add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
199 213 add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
200 214 add_action('network_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
201 215
@@ -224,16 +238,16 @@
224 238 add_action('updated_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times', 10, 4);
225 239 add_action('deleted_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times_on_delete', 10, 3);
226 240
227 241 add_filter('cron_schedules', 'c_ws_plugin__s2member_cron_jobs::extend_cron_schedules');
228 -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');
229 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.
230 -add_action('ws_plugin__s2member_auto_eot_system__continuation', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_continuation');
231 -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.
232 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.
233 -add_action('init', 'c_ws_plugin__s2member_auto_eots::ensure_auto_eot_system', 3);
234 -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.
235 -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);
236 250
237 251 add_action('wp_ajax_ws_plugin__s2member_update_roles_via_ajax', 'c_ws_plugin__s2member_roles_caps::update_roles_via_ajax');
238 252
239 253 add_action('wp_ajax_ws_plugin__s2member_sp_access_link_via_ajax', 'c_ws_plugin__s2member_sp_access::sp_access_link_via_ajax');
@@ -263,6 +277,4 @@
263 277 */
264 278 register_activation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::activate');
265 279 register_deactivation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::deactivate');
266 280 register_uninstall_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::uninstall');
267 -//221024 Now that Pro add-on doesn't have to match Framework's version to remain active, it's safer to auto-update Framework.
268 -// add_filter('auto_update_plugin', 'c_ws_plugin__s2member_installation::auto_update_filter', PHP_INT_MAX-10, 2); // Disallow s2Member update.