* @license http://www.gnu.org/licenses/gpl-2.0.html */ namespace Kirby\Plugins\Typography; use C; define('TYPOGRAPHY_PLUGIN_BASE_DIR', __DIR__); load([ // TypeSetter classes 'kirby\\plugins\\typography\\kirbytypography' => 'lib' . DS . 'kirbytypography.php', 'kirby\\plugins\\typography\\cache' => 'lib' . DS . 'cache.php', 'kirby\\plugins\\typography\\component\\typography' => 'lib' . DS . 'component' . DS . 'typography.php', // WP Typography classes 'php_typography\\parse_text' => 'php-typography' . DS . 'class-parse-text.php', 'php_typography\\php_typography' => 'php-typography' . DS . 'class-php-typography.php', ], TYPOGRAPHY_PLUGIN_BASE_DIR); // Register plugin component $kirby->set('component', 'smartypants', 'kirby\\plugins\\typography\\component\\typography'); // Register dashboard widget if not disabled in config file if ( c::get('typography.widget') === null ) { c::set('typography.widget', true); // enable by default, if not explicitly set to `false`. $kirby->options['typography.widget'] = true; } if ($kirby->option('typography.widget') !== false) { require_once __DIR__ . DS . 'widgets' . DS . 'typography' . DS . 'bootstrap.php'; }