
Originally Posted by
mc12345678
A solution could be to create an admin/includes/auto_loader/config.EDITOR.php file that loads the "editor" into the array. I'm thinking just before 180 (ie. at 179) instead of loading it as a function.
So:
admin/includes/auto_loader/config.neweditor.php would contain:
Code:
<?php
$autoLoadConfig[179][] = array('autoType'=>'init_script',
'loadfile'=>DIR_WS_FUNCTIONS . 'extra_functions/editor_neweditor.php');
Otherwise it would seem that the idea is/has become that functions would not contain language defines in them... Don't know if that is case/expectation, but it is the sequence of loading that is currently in place.
Well "dumb" me... That won't exactly work, as the array will have already been loaded with the non-assigned constant, resulting in two listings in the dropdown, one with the "correct" text, the other not... Sigh.. So perhaps instead place the array data in a file in the functions folder instead of the functions/extra_functions folder with the auto_loader pointing to the functions folder and the new "function" that is adding the new editor to the list:
Code:
<?php
$autoLoadConfig[179][] = array('autoType'=>'init_script',
'loadfile'=>DIR_WS_FUNCTIONS . 'editor_neweditor.php');
With admin/includes/functions/editor_neweditor.php as:
Code:
<?php
$editors_list['NEWEDITOR'] = array('desc' => EDITOR_NEWEDITOR, 'handler' => 'neweditor.php', 'special_needs' => '');
and the define still in the languages directory as previously.. ( admin\includes\languages\english\extra_definitions\neweditor.php)
Code:
<?php
define('EDITOR_NEWEDITOR', 'New Editor');