PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
← All changes | src/includes/classes/utils-dirs.inc.php +3 -3 260909260917 View file →
@@ -50,12 +50,12 @@
50 50 * @param string $template Template path supplied by a shortcode.
51 51 * @param array $legacy_filenames Exact legacy filenames allowed automatically in the content root or active theme roots.
52 52 * @param string $shortcode Shortcode name for administrator notices.
53 53 * @param int $post_id Post/Page ID where the template was detected, when available.
54 - * @param bool $enforce When true, return only approved templates. During the transition period this defaults to false.
54 + * @param bool $enforce When true, return only approved templates. Defaults to enforcement.
55 55 * @return string Canonical template path, or an empty string if invalid or blocked.
56 56 */
57 - public static function shortcode_template ($template = FALSE, $legacy_filenames = array(), $shortcode = '', $post_id = 0, $enforce = FALSE)
57 + public static function shortcode_template ($template = FALSE, $legacy_filenames = array(), $shortcode = '', $post_id = 0, $enforce = TRUE)
58 58 {
59 59 $template = c_ws_plugin__s2member_utils_dirs::n_dir_seps (trim (str_replace (chr (0), '', (string)$template)));
60 60 if (!$template)
61 61 return '';
@@ -170,9 +170,9 @@
170 170 // Notify Pro about an unapproved template so it can be included in the admin warning.
171 171 if ($_relative_path && $shortcode)
172 172 do_action ('ws_plugin__s2member_shortcode_template_unapproved', $_relative_path, $shortcode, (int)$post_id);
173 173
174 - // During the transition period unapproved templates still work; enforcement can later be enabled centrally.
174 + //260915.0134 Block unapproved custom templates; callers retain their existing standard-template fallback.
175 175 return ($enforce) ? '' : $candidate;
176 176 }
177 177 /**
178 178 * Strips a trailing `/app_data/` sub-directory.