A whole library which was meant to to 10 things, but you only use one. And that for x libraries
chraebsli
joined 2 years ago
as a swiss german (we capitalize nouns for those who don't know), I sometimes automatically capitalize nouns when writing in english, especially when I just wrote something in german. Its a habit and at least for me, its really hard to prevent me doing it.
Same is for when I wrote mucn in english before, then writing something in german. Then everything is in lowercase.
I just spent 6 hours of debugging some code, just to find out I had to delete a line in a .gitkeep file
I just spent 6 hours of debugging some code, just to find out I had to delete a line in a .gitkeep file
Every shortcode is a PHP class and looks like this:
<?php
namespace Grav\Plugin\Shortcodes;
use Grav\Common\Utils;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
class ClearBothShortcode extends Shortcode
{
public function init()
{
$this->shortcode->getHandlers()->add('clearboth', function (ShortcodeInterface $sc) {
// Get shortcode content and parameters
$str = $sc->getContent();
$output = '<div style="clear: both;"></div>';
return $output;
});
}
}
with that, it should be possible to only call these classes.
view more: next ›
$ sudo walk north