mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
Add deprecation warnings if syntax like <--#include-->, <!--%import--> is used in template v2
This commit is contained in:
parent
6a2a2826ec
commit
c42d059594
2 changed files with 15 additions and 0 deletions
|
|
@ -932,6 +932,11 @@ class TemplateParser_v2
|
|||
*/
|
||||
protected function _addDeprecationMessages(string $content): string
|
||||
{
|
||||
// <!--#include-->, <!--%import-->, etc.
|
||||
$content = preg_replace_callback('#<!--(\#include|%import|%unload|%load_js_plugin)\s?\(.+?-->#', function($match) {
|
||||
return '<?php trigger_error("' . $match[1] . ' is not supported in template v2", \E_USER_WARNING); ?>';
|
||||
}, $content);
|
||||
|
||||
// <block>
|
||||
$content = preg_replace_callback('#<block(?=\s)#', function($match) {
|
||||
return $match[0] . '<?php trigger_error("block element is not supported in template v2", \E_USER_WARNING); ?>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue