diff options
| author | 2019-10-23 11:18:20 +0200 | |
|---|---|---|
| committer | 2019-10-23 11:18:20 +0200 | |
| commit | 7a5236de3f13f08b8c51eb183c0dcf1c8c85beca (patch) | |
| tree | 10a09f07458ed1279e62646188cb42e87fe0ed8f /app/views/subscription/bookmarklet.phtml | |
| parent | fdfd8ce9be182943e73d20ec3bff4d560c5b7503 (diff) | |
Take advantage of PHP 5.4+ short echo (#2585)
* Take advantage of PHP 5.4+ short echo
https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495
Use `<?= ?>` instead of `<?php echo; ?>`
10kB of code saved :-)
Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```
* Try Travis fix
https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
Diffstat (limited to 'app/views/subscription/bookmarklet.phtml')
| -rw-r--r-- | app/views/subscription/bookmarklet.phtml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/views/subscription/bookmarklet.phtml b/app/views/subscription/bookmarklet.phtml index 76ac700e0..385ce8cea 100644 --- a/app/views/subscription/bookmarklet.phtml +++ b/app/views/subscription/bookmarklet.phtml @@ -1,17 +1,17 @@ <?php $this->partial('aside_subscription'); ?> <div class="post"> - <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a> + <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> - <legend><?php echo _t('sub.bookmarklet.title'); ?></legend> - <p><a class="btn btn-important" href="javascript:(function(){var%20url%20=%20location.href;var%20otherWindow=window.open('about:blank','_blank');otherWindow.opener=null;otherWindow.location='<?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss='+encodeURIComponent(url);})();"><?php echo _t('sub.bookmarklet.label'); ?></a></p> - <?php echo _t('sub.bookmarklet.documentation'); ?> + <legend><?= _t('sub.bookmarklet.title') ?></legend> + <p><a class="btn btn-important" href="javascript:(function(){var%20url%20=%20location.href;var%20otherWindow=window.open('about:blank','_blank');otherWindow.opener=null;otherWindow.location='<?= Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&url_rss='+encodeURIComponent(url);})();"><?= _t('sub.bookmarklet.label') ?></a></p> + <?= _t('sub.bookmarklet.documentation') ?> - <legend><?php echo _t('sub.firefox.title'); ?></legend> - <p><?php echo _t('sub.firefox.documentation'); ?></p> - <pre>browser.contentHandlers.types.number.uri → <?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss=%s</pre> + <legend><?= _t('sub.firefox.title') ?></legend> + <p><?= _t('sub.firefox.documentation') ?></p> + <pre>browser.contentHandlers.types.number.uri → <?= Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&url_rss=%s</pre> - <legend><?php echo _t('sub.api.title'); ?></legend> - <p><?php echo _t('sub.api.documentation'); ?></p> - <pre><?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss=%s</pre> + <legend><?= _t('sub.api.title') ?></legend> + <p><?= _t('sub.api.documentation') ?></p> + <pre><?= Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&url_rss=%s</pre> </div>
\ No newline at end of file |
