diff --git a/functions.php b/functions.php index 9b6e7b5..36a3813 100644 --- a/functions.php +++ b/functions.php @@ -13,6 +13,7 @@ "inc/lib/assets.php", "inc/lib/helpers.php", "inc/lib/clean.php", + "inc/lib/CustomizrTextEditor.php", "inc/shortcodes/copyright.php", "inc/shortcodes/social-icons.php", "inc/shortcodes/svg.php", diff --git a/inc/lib/CustomizrTextEditor.php b/inc/lib/CustomizrTextEditor.php new file mode 100644 index 0000000..26fdaf8 --- /dev/null +++ b/inc/lib/CustomizrTextEditor.php @@ -0,0 +1,75 @@ + + + get_link(), $output, 1 ); + }); + } +} \ No newline at end of file diff --git a/inc/theme-options/notifications.php b/inc/theme-options/notifications.php index 598268b..7498212 100644 --- a/inc/theme-options/notifications.php +++ b/inc/theme-options/notifications.php @@ -23,16 +23,16 @@ function notification_settings($wp_customize) { // Notification text $wp_customize->add_setting('notification_text', [ - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', + 'default' => '' ]); - $wp_customize->add_control('notification_text', [ + $wp_customize->add_control(new \Text_Editor_Custom_Control($wp_customize, 'notification_text', [ 'label' => __('Notification Text', 'tofino'), 'description' => __('Notification is shown until dismissed (at which point a cookie is set).', 'tofino'), + 'settings' => 'notification_text', 'section' => 'tofino_notification_settings', - 'type' => 'textarea' - ]); + 'priority' => 10 + ])); // Notification expires $wp_customize->add_setting('notification_expires', [ @@ -91,7 +91,7 @@ function notification($position) {