Is this the only way to get the Legacy Image Insert function to work?
and is this another bug in 4.1.4?
If so.... this is a big one (at least for me)
Quote:
Originally Posted by kh99
You could remove the button by creating a plugin using hook location editor_toolbar_filter and this code:
Code:
$key = array_search('Attach', $toolbar[0]);
if ($key !== false)
{
unset($toolbar[0][$key]);
if ($toolbar[0][$key + 1] == '-')
unset($toolbar[0][$key + 1]);
$toolbar[0] = array_values($toolbar[0]);
}
or if you really want a duplicate of the image button you could do this:
Code:
$key = array_search('Attach', $toolbar[0]);
if ($key !== false)
{
$toolbar[0][$key] = 'Image';
}
BTW, this just changes the buttons in the editor, I'm not sure it actually prevents someone who knows what they're doing from uploding attachements, but it may be good enough for your purposes.
|