Dotclear

source: plugins/dcLegacyEditor/_admin.php @ 2614:db6f6a1f4f25

Revision 2614:db6f6a1f4f25, 1.1 KB checked in by Nicolas <nikrou77@…>, 12 years ago (diff)

Move legacy editor to a plugin. First step for alternate editors.
Addresses #1896

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12
13if (!defined('DC_CONTEXT_ADMIN')) { return; }
14
15$_menu['Plugins']->addItem('dcLegacyEditor',
16'plugin.php?p=dcLegacyEditor',
17'index.php?pf=dcLegacyEditor/imgs/icon.png',
18preg_match('/plugin.php\?p=dcLegacyEditor/', $_SERVER['REQUEST_URI']),
19$core->auth->check('admin,contentadmin', $core->blog->id)
20);
21
22$self_ns = $core->blog->settings->addNamespace('dclegacyeditor');
23
24if ($self_ns->active) {
25    $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor'));
26    $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia'));
27    $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink'));
28    $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts'));
29}
Note: See TracBrowser for help on using the repository browser.

Sites map