enhancePostContent/_prepend.php

49 lines
1 KiB
PHP

<?php
/**
* @brief enhancePostContent, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
$filters = [
'Tag',
'Search',
'Acronym',
'Abbreviation',
'Definition',
'Citation',
'Link',
'Replace',
'Update',
'Twitter',
];
$d = __DIR__ . '/inc/';
Clearbricks::lib()->autoload([
'libEPC' => $d . 'lib.epc.php',
'epcFilter' => $d . 'lib.epc.filter.php',
'epcRecords' => $d . 'lib.epc.records.php',
'adminEpcList' => $d . 'lib.epc.pager.php',
]);
foreach ($filters as $f) {
Clearbricks::lib()->autoload(['epcFilter' . $f => $d . 'lib.epc.filters.php']);
dcCore::app()->addBehavior('enhancePostContentFilters', ['epcFilter' . $f, 'create']);
}
dcCore::app()->url->register(
'epccss',
'epc.css',
'^epc\.css',
['publicEnhancePostContent', 'css']
);