Skip to content

Instantly share code, notes, and snippets.

View bleutzinn's full-sized avatar
🙃
Downside UP !

Ron Wardenier bleutzinn

🙃
Downside UP !
  • Zuidhorn, the Netherlands
View GitHub Profile
@bleutzinn
bleutzinn / UserInput.php
Created April 17, 2022 15:45 — forked from chtombleson/UserInput.php
Helper Class for sanitizing user input in PHP
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Christopher Tombleson <chris@cribznetwok.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@bleutzinn
bleutzinn / editable-contenttools.php
Created February 8, 2019 13:16
This is the core logic of the Editable with ContentTools Plugin for Grav CMS. This version preprocesses editable shortcode name parameters.
<?php
namespace Grav\Plugin;
use Grav\Common\Page\Page;
use Grav\Common\Plugin;
use Grav\Common\Twig\Twig;
use Grav\Common\Utils;
use RocketTheme\Toolbox\Event\Event;
/**
@bleutzinn
bleutzinn / editable.php
Created March 20, 2017 19:35
Modified Grav Editable Plugin editable.php file that works with caching enabled and SimpleMDE ONLY, see https://github.com/bleutzinn/grav-plugin-editable/issues/3
<?php
namespace Grav\Plugin;
use Grav\Common\Grav;
use Grav\Common\Plugin;
use Grav\Common\Page\Page;
use Grav\Common\Uri;
use RocketTheme\Toolbox\Event\Event;
use Grav\Common\Filesystem\Folder;
use RocketTheme\Toolbox\File\File;