Dotclear

source: plugins/dcLegacyEditor/_admin.php @ 2849:97e1b334e54b

Revision 2849:97e1b334e54b, 1.4 KB checked in by Dsls, 11 years ago (diff)

Deprecated $core->adminurl->decode, use $core->adminurl->get instead (with urlencode set to false)

Added dcPage::getPF to shortcut plugin file inclusion

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     $core->adminurl->get('admin.plugin.dcLegacyEditor'),
17     dcPage::getPF('dcLegacyEditor/icon.png'),
18     preg_match('/'.preg_quote($core->adminurl->get('admin.plugin.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    if (!($core->wiki2xhtml instanceof wiki2xhtml)) {
26          $core->initWikiPost();
27     }
28
29     $core->addEditorFormater('dcLegacyEditor','xhtml',create_function('$s','return $s;'));
30     $core->addEditorFormater('dcLegacyEditor','wiki',array($core->wiki2xhtml,'transform'));
31
32     $core->addBehavior('adminPostEditor',array('dcLegacyEditorBehaviors','adminPostEditor'));
33     $core->addBehavior('adminPopupMedia',array('dcLegacyEditorBehaviors','adminPopupMedia'));
34     $core->addBehavior('adminPopupLink',array('dcLegacyEditorBehaviors','adminPopupLink'));
35     $core->addBehavior('adminPopupPosts',array('dcLegacyEditorBehaviors','adminPopupPosts'));
36}
Note: See TracBrowser for help on using the repository browser.

Sites map