1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 16:46:50 +02:00

Frontend inline-editing preference added.

This commit is contained in:
Cameron
2016-06-09 16:44:40 -07:00
parent 7fdb27510f
commit a4203b72c7
6 changed files with 29 additions and 6 deletions

View File

@@ -99,6 +99,7 @@ class e_parse_shortcode
protected $wrapperDebugDone = array(); // Flag to avoid repetition of debug info.
protected $sc_style = array(); // Former $sc_style global variable. Internally used - performance reasons
protected $editableCodes = array(); // Array of editable shortcode data.
protected $editableActive = false;
function __construct()
{
@@ -111,6 +112,13 @@ class e_parse_shortcode
$this->loadPluginSCFiles();
//$this->loadCoreShortcodes(); DEPRECATED
$editableActivePref = e107::getPref('inline_editing',255);
if(check_class($editableActivePref))
{
$this->editableActive = true;
}
}
/**
@@ -1420,6 +1428,12 @@ class e_parse_shortcode
*/
private function makeEditable($text, $code)
{
if($this->editableActive === false)
{
return $text; // unchanged.
}
$lcode = strtolower($code);
if(empty($code)