PHP Short Tags
-
Great plug in, but one small request please?
Could you remove the use of PHP short tags?
They are the cause of this issue:
Showing only “data-scroll_theme=”…” only.
PHP short tags are in woocommerce-ajax-filters\templates\widget_start.php at least (I have not checked other files):
<h3 class="widget-title berocket_aapf_widget-title"><?=$title?></h3> <ul class='berocket_aapf_widget <?=$class?>' <?=$style?> data-scroll_theme='<?=$scroll_theme?>'>
PHP short tags are not enabled on all versions of PHP. As a server administrator, if you do turn short tags on, you choose to break XML inline:
[Short tag] tells PHP whether the short form of PHP’s open tag should be allowed. If you want to use PHP in combination with XML, you should disable this option in order to use xml inline.
They are also discouraged in the PHP manual:
PHP also allows for short open tag (which is discouraged since it is only available if enabled using the short_open_tag php.ini configuration file directive)
WordPress coding standards also state:
Important: Never use shorthand PHP start tags. Always use full PHP tags.
Correct:
<?php ... ?> <?php echo $var; ?>
Incorrect:
<? ... ?> <?= $var ?>
Please could you use full PHP tags, so we can use your plugin? ??
https://www.ads-software.com/plugins/woocommerce-ajax-filters/
- The topic ‘PHP Short Tags’ is closed to new replies.