ab
This commit is contained in:
@@ -424,7 +424,13 @@ class ApiKernel
|
||||
$desc = (string)$this->val($this->in, ['description', 'desc'], null);
|
||||
$cat = (string)$this->val($this->in, ['category', 'cat'], null);
|
||||
$html = (string)$this->val($this->in, ['html', 'body', 'markup'], null);
|
||||
$json = $this->val($this->in, ['content_json', 'json', 'content', 'structure_json'], null);
|
||||
if ($kind === 'snippets' && ($html === null || $html === '')) {
|
||||
$html = (string)$this->val($this->in, ['content'], $html);
|
||||
}
|
||||
$jsonKeys = ($kind === 'snippets')
|
||||
? ['content_json', 'json', 'structure_json']
|
||||
: ['content_json', 'json', 'content', 'structure_json'];
|
||||
$json = $this->val($this->in, $jsonKeys, null);
|
||||
$settings = $this->val($this->in, ['settings_json', 'settings'], null);
|
||||
$templateId = $this->val($this->in, ['template_id', 'tpl_id'], null);
|
||||
$sectionId = $this->val($this->in, ['section_id', 'sec_id'], null);
|
||||
@@ -514,7 +520,13 @@ class ApiKernel
|
||||
$desc = $this->val($this->in, ['description', 'desc'], null);
|
||||
$cat = $this->val($this->in, ['category', 'cat'], null);
|
||||
$html = $this->val($this->in, ['html', 'body', 'markup'], null);
|
||||
$json = $this->val($this->in, ['content_json', 'json', 'content', 'structure_json'], null);
|
||||
if ($kind === 'snippets' && $html === null) {
|
||||
$html = $this->val($this->in, ['content'], null);
|
||||
}
|
||||
$jsonKeys = ($kind === 'snippets')
|
||||
? ['content_json', 'json', 'structure_json']
|
||||
: ['content_json', 'json', 'content', 'structure_json'];
|
||||
$json = $this->val($this->in, $jsonKeys, null);
|
||||
$settings = $this->val($this->in, ['settings_json', 'settings'], null);
|
||||
|
||||
if ($name !== null) $data[$nameCol] = (string)$name;
|
||||
|
||||
Reference in New Issue
Block a user