From d6f6c85a3190b4b6ed937ae7dcadb139486c0526 Mon Sep 17 00:00:00 2001 From: Martin Nestorov Date: Tue, 17 Oct 2023 14:30:50 +0300 Subject: [PATCH] Added the border size and border color from the options --- CHANGELOG.md | 5 ++++- styles.css | 1 + wp-sticky-footer-menu.php | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 289e6eb..fbb7cef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,4 +5,7 @@ ### 1.1 - Make the plugin translation-ready by following WordPress localization and internationalization best practices. -- Add the functionality for custom icon uploads. \ No newline at end of file +- Add the functionality for custom icon uploads. + +### 1.2 +- Added border size and border color from the options. \ No newline at end of file diff --git a/styles.css b/styles.css index 4c21306..6603849 100644 --- a/styles.css +++ b/styles.css @@ -2,6 +2,7 @@ position: fixed; bottom: 0; width: 100%; + border-top: 1px solid #000; background-color: #333; color: white; text-align: center; diff --git a/wp-sticky-footer-menu.php b/wp-sticky-footer-menu.php index f0b736a..57b7a98 100644 --- a/wp-sticky-footer-menu.php +++ b/wp-sticky-footer-menu.php @@ -3,7 +3,7 @@ * Plugin Name: MN - WordPress Sticky Footer Menu * Plugin URI: https://github.com/mnestorov/wp-sticky-footer-menu * Description: Adds a customizable sticky footer menu to selected pages. - * Version: 1.1 + * Version: 1.2 * Author: Martin Nestorov * Author URI: https://github.com/mnestorov * Text Domain: mn-wordpress-sticky-footer-menu @@ -85,6 +85,14 @@ function mn_render_settings_page() { + + + + + + + + @@ -99,6 +107,8 @@ function mn_register_settings() { register_setting('mn-settings-group', 'mn_bg_color'); register_setting('mn-settings-group', 'mn_text_color'); register_setting('mn-settings-group', 'mn_font_size'); + register_setting('mn-settings-group', 'mn_border_size'); + register_setting('mn-settings-group', 'mn_border_color'); // Handling file upload for menu icons if (!empty($_FILES['mn_menu_icons']['name'][0])) { @@ -131,10 +141,12 @@ function mn_render_footer_menu() { $bg_color = get_option('mn_bg_color', '#333'); $text_color = get_option('mn_text_color', '#fff'); $font_size = get_option('mn_font_size', '16px'); + $border_size = get_option('mn_border_size', '1px'); // Default border size to 1px + $border_color = get_option('mn_border_color', '#000'); // Default border color to black $menu_items = explode(';', get_option('mn_menu_items')); $menu_icons = explode(';', get_option('mn_menu_icons')); // Get menu icons from database - echo '