diff --git a/action.php b/action.php index f122f66..39ea597 100644 --- a/action.php +++ b/action.php @@ -168,6 +168,9 @@ switch ($VARS['action']) { } foreach ($VARS['settings'] as $key => $value) { + if (is_array($value)) { + $value = json_encode($value); + } if ($database->has('settings', ["AND" => ["siteid" => $siteid, "key" => $key]])) { if ($value == "") { //echo "deleting $key => $value\n"; diff --git a/lang/en_us.php b/lang/en_us.php index feb9548..4bd8cc0 100644 --- a/lang/en_us.php +++ b/lang/en_us.php @@ -126,5 +126,6 @@ define("STRINGS", [ "in navbar" => "Add page to menu", "navbar title" => "Page title for menu", "navbar position" => "Menu position (drag to change position):", - "remove image" => "Remove image" + "remove image" => "Remove image", + "site footer links" => "Site Footer Links" ]); \ No newline at end of file diff --git a/lib/themefunctions.php b/lib/themefunctions.php index e5790e5..79ea35e 100644 --- a/lib/themefunctions.php +++ b/lib/themefunctions.php @@ -485,6 +485,17 @@ function get_fontawesome_css($echo = true) { } } +/** + * Return an array [[title, url], [title, url]] of links for the page footer + */ +function get_footer_urls() { + $links = json_decode(get_setting("footerlinks", false), true); + if (is_array($links)) { + return $links; + } + return []; +} + /** * Returns an array of social media URLs, with FontAwesome icon classes and labels. * @return array [["icon", "name", "url"]] diff --git a/pages/sitesettings.php b/pages/sitesettings.php index c18856f..36f772d 100644 --- a/pages/sitesettings.php +++ b/pages/sitesettings.php @@ -164,6 +164,7 @@ if (!is_empty($VARS['siteid'])) {