Browse Source

no wysiwyg

windhamdavid 9 months ago
parent
commit
b9cdecb8e4
1 changed files with 15 additions and 19 deletions
  1. 15 19
      functions.php

+ 15 - 19
functions.php

@@ -22,9 +22,11 @@ add_action( 'admin_init', 'srh_notice_settings_init' );
 function srh_notice_settings_init() { 
 	register_setting('srh_notices', 'srh_notice_settings');
 	register_setting('srh_notices', 'srh_notice_message');
+	register_setting('srh_notices', 'srh_notice_message_body');
 	add_settings_section('srh_notice_active_section', 'Notifications', 'srh_notice_settings_section_callback', 'srh_notices');
 	add_settings_field('srh_notice_select_field_0', 'Notifications Active', 'srh_notice_select_field_0_render', 'srh_notices', 'srh_notice_active_section' );
-	add_settings_field('srh_notice_message', 'Notification Message', 'srh_notice_message_render', 'srh_notices', 'srh_notice_active_section');
+	add_settings_field('srh_notice_message', 'Notification Title', 'srh_notice_message_render', 'srh_notices', 'srh_notice_active_section');
+	add_settings_field('srh_notice_message_body', 'Notification Message', 'srh_notice_message_body_render', 'srh_notices', 'srh_notice_active_section');
 }
 function srh_notice_settings_section_callback(  ) { 
 	echo __( 'This form sets a Notification Message for All Pages', 'wordpress' );
@@ -36,28 +38,16 @@ function srh_notice_select_field_0_render() {
 		<option value='2' <?php selected( $options['srh_notice_select_field_0'], 2 ); ?>>No</option>
 	</select>	
 <?php }
+
 function srh_notice_message_render() {
-	$srh_notice_message = get_option( 'srh_notice_message' );
-	$settings = array( 
-		'quicktags' => array( 'buttons' => 'strong,em,del,ul,ol,li,close' ),
-	);
-	echo wp_editor( 
-		$srh_notice_message, 
-		'srh_notice_message', 
-		array(
-			'textarea_name' => 'srh_notice_message',
-			'media_buttons' => false,
-			'teeny' => true,
-			'quicktags' => array( 'buttons' => 'strong,em,del,ul,ol,li' ),
-			'tinymce' => array( 
-				'content_css' => get_template_directory_uri() . '/css/layout.css',
-	        ) 
-		)  
-	);
+	echo '<input name="srh_notice_message" id="srh_notice_message" type="text" size="70" value="' . get_option( 'srh_notice_message' ) . '" />';
+}
+function srh_notice_message_body_render() {
+	echo '<textarea name="srh_notice_message_body" id="srh_notice_message_body" rows="5" cols="70" value="" >' . get_option( 'srh_notice_message_body' ) . '</textarea>';
 }
 function srh_notice_options_page() { ?>
 	<div class="wrap">
-		<h1>Self Regional (.org)</h1>
+		<h1>Self Regional - Sitewide Notifications</h1>
 		<form action='options.php' method='post'>	
 			<?php 
 				settings_fields('srh_notices');
@@ -70,7 +60,13 @@ function srh_notice_options_page() { ?>
 function srh_notice_display_message() {
 	echo '<div class="container" style="padding-top: 20px;"><div class="post-entry post-entry-type-page"><div class="entry-content-wrapper clearfix">';
 	echo '<article class="iconbox iconbox_top main_color avia-builder-el-0 avia-builder-el-no-sibling "><div class="iconbox_content">';
+	echo '<header class="entry-content-header"><div class="iconbox_icon heading-color " style="background-color: #ed9600;" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"></div>';
+	echo '<h3 class="iconbox_content_title " style="color: #ed9600;">';
 	echo get_option('srh_notice_message');
+	echo '</h3></header>';
+	echo '<div class="iconbox_content_container ">';
+	echo get_option('srh_notice_message_body');
+	echo '</div>';
 	echo '</div></article>';
 	echo '</div></div></div>';
 }