| @@ -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. |