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 +42 -13 260829 → 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.
@@ -81,8 +82,33 @@
81 82 add_action('wp_print_styles', 'c_ws_plugin__s2member_css_js_themes::add_css');
82 83 add_action('wp_print_scripts', 'c_ws_plugin__s2member_css_js_themes::add_js_w_globals');
83 84 add_filter('script_loader_tag', 'c_ws_plugin__s2member_css_js_themes::script_loader_tag', 10, 2);
84 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.
87 +add_action('ws_plugin__s2member_loaded', function() {
88 + add_action('updated_option', 'c_ws_plugin__s2member_utils_assets::maybe_invalidate_after_wp_option_update', 10, 3);
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);
92 +add_action('activated_plugin', 'c_ws_plugin__s2member_utils_assets::invalidate_after_plugin_change');
93 +add_action('deactivated_plugin', 'c_ws_plugin__s2member_utils_assets::invalidate_after_plugin_change');
94 +add_action('upgrader_process_complete', 'c_ws_plugin__s2member_utils_assets::maybe_invalidate_after_upgrade', 10, 2);
95 +add_action('ws_plugin__s2member_after_activation', 'c_ws_plugin__s2member_utils_assets::invalidate_static_assets', 10, 0);
96 +add_action('wp_ajax_ws_plugin__s2member_refresh_static_assets', 'c_ws_plugin__s2member_utils_assets::ajax_refresh_static_assets');
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.
99 +add_action('wp_ajax_ws_plugin__s2member_asset_runtime_suspect', 'c_ws_plugin__s2member_utils_assets::ajax_asset_runtime_suspicion');
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.
106 +add_action('admin_notices', 'c_ws_plugin__s2member_utils_assets::static_assets_admin_notice');
107 +add_action('admin_footer', 'c_ws_plugin__s2member_utils_assets::asset_http_health_probe', 900);
108 +add_action('wp_footer', 'c_ws_plugin__s2member_utils_assets::asset_http_health_probe', 900);
109 +add_action('wp_footer', 'c_ws_plugin__s2member_utils_assets::page_asset_runtime_monitor', 1000);
110 +
85 111 add_action('wp_login_failed', 'c_ws_plugin__s2member_brute_force::track_failed_logins');
86 112 add_filter('authenticate', 'c_ws_plugin__s2member_brute_force::stop_brute_force_logins', 100);
87 113
88 114 add_filter('wp_authenticate_user', 'c_ws_plugin__s2member_login_checks::ms_wp_authenticate_user', 100);
@@ -173,12 +199,17 @@
173 199 add_action('admin_init', 'c_ws_plugin__s2member_admin_notices::dismiss_shortcode_user_fields_notice');
174 200 add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::shortcode_user_fields_notice', 11);
175 201
176 202 //260820.0149 Escalate materially unhealthy Auto-EOT processing beyond its settings panel.
177 -add_action('admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12);
178 -add_action('user_admin_notices', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_admin_notice', 12);
179 -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);
180 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 +
181 212 add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
182 213 add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
183 214 add_action('network_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
184 215
@@ -207,16 +238,16 @@
207 238 add_action('updated_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times', 10, 4);
208 239 add_action('deleted_user_meta', 'c_ws_plugin__s2member_access_cap_times::log_access_cap_times_on_delete', 10, 3);
209 240
210 241 add_filter('cron_schedules', 'c_ws_plugin__s2member_cron_jobs::extend_cron_schedules');
211 -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');
212 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.
213 -add_action('ws_plugin__s2member_auto_eot_system__continuation', 'c_ws_plugin__s2member_auto_eots::auto_eot_system_continuation');
214 -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.
215 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.
216 -add_action('init', 'c_ws_plugin__s2member_auto_eots::ensure_auto_eot_system', 3);
217 -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.
218 -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);
219 250
220 251 add_action('wp_ajax_ws_plugin__s2member_update_roles_via_ajax', 'c_ws_plugin__s2member_roles_caps::update_roles_via_ajax');
221 252
222 253 add_action('wp_ajax_ws_plugin__s2member_sp_access_link_via_ajax', 'c_ws_plugin__s2member_sp_access::sp_access_link_via_ajax');
@@ -246,6 +277,4 @@
246 277 */
247 278 register_activation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::activate');
248 279 register_deactivation_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::deactivate');
249 280 register_uninstall_hook($GLOBALS['WS_PLUGIN__']['s2member']['c']['plugin_basename'], 'c_ws_plugin__s2member_installation::uninstall');
250 -//221024 Now that Pro add-on doesn't have to match Framework's version to remain active, it's safer to auto-update Framework.
251 -// add_filter('auto_update_plugin', 'c_ws_plugin__s2member_installation::auto_update_filter', PHP_INT_MAX-10, 2); // Disallow s2Member update.