| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
| 2 |
<?php |
| 3 |
|
| 4 |
$success_message = ''; |
| 5 |
$error_message = ''; |
| 6 |
|
| 7 |
// ==================================================== |
| 8 |
// Include the file that contains all the info |
| 9 |
// ==================================================== |
| 10 |
include('settings.php'); |
| 11 |
|
| 12 |
// =============================================== |
| 13 |
// This will allow us to use the media uploader |
| 14 |
// =============================================== |
| 15 |
wp_enqueue_media(); |
| 16 |
|
| 17 |
// ======================================================================================================== |
| 18 |
// Update the data if it's changed |
| 19 |
// ======================================================================================================== |
| 20 |
|
| 21 |
if( isset($_POST['yydev_accessibility_nonce']) ) { |
| 22 |
|
| 23 |
if( wp_verify_nonce($_POST['yydev_accessibility_nonce'], 'yydev_accessibility_action') ) { |
| 24 |
|
| 25 |
// ---------------------------------------------- |
| 26 |
// getting all the values and clear data |
| 27 |
// ---------------------------------------------- |
| 28 |
|
| 29 |
$display_button_checkbox = yydev_accessibility_checkbox_isset('display_button_checkbox'); |
| 30 |
$background_color = sanitize_text_field( $_POST['background_color'] ); |
| 31 |
$button_width = intval( $_POST['button_width'] ); |
| 32 |
$button_height = intval( $_POST['button_height'] ); |
| 33 |
$button_movment = sanitize_text_field( $_POST['button_movment'] ); |
| 34 |
$horizontal_position = sanitize_text_field( $_POST['horizontal_position'] ); |
| 35 |
$horizontal_spacing = sanitize_text_field( $_POST['horizontal_spacing'] ); |
| 36 |
$vertical_position = sanitize_text_field( $_POST['vertical_position'] ); |
| 37 |
$vertical_spacing = sanitize_text_field( $_POST['vertical_spacing'] ); |
| 38 |
$icon_image_url = esc_url_raw( $_POST['icon_image_url'] ); |
| 39 |
$icon_svg_url = esc_url_raw( $_POST['icon_svg_url'] ); |
| 40 |
$icon_type = sanitize_text_field( $_POST['icon_type'] ); |
| 41 |
$icon_width = intval( $_POST['icon_width'] ); |
| 42 |
$icon_height = intval( $_POST['icon_height'] ); |
| 43 |
$hide_on_mobile_checkbox = yydev_accessibility_checkbox_isset('hide_on_mobile_checkbox'); |
| 44 |
$hide_on_desktop_checkbox = yydev_accessibility_checkbox_isset('hide_on_desktop_checkbox'); |
| 45 |
$mobile_width = intval( $_POST['mobile_width'] ); |
| 46 |
$mobile_button_position_checkbox = yydev_accessibility_checkbox_isset('mobile_button_position_checkbox'); |
| 47 |
$mobile_horizontal_position = sanitize_text_field( $_POST['mobile_horizontal_position'] ); |
| 48 |
$mobile_horizontal_spacing = sanitize_text_field( $_POST['mobile_horizontal_spacing'] ); |
| 49 |
$mobile_vertical_position = sanitize_text_field( $_POST['mobile_vertical_position'] ); |
| 50 |
$mobile_vertical_spacing = sanitize_text_field( $_POST['mobile_vertical_spacing'] ); |
| 51 |
$accessibility_page_checkbox = yydev_accessibility_checkbox_isset('accessibility_page_checkbox'); |
| 52 |
$accessibility_background_color = sanitize_text_field( $_POST['accessibility_background_color'] ); |
| 53 |
$accessibility_page_url = esc_url_raw( $_POST['accessibility_page_url'] ); |
| 54 |
$accessibility_page_text = sanitize_text_field( $_POST['accessibility_page_text'] ); |
| 55 |
$z_index = intval( $_POST['z_index'] ); |
| 56 |
|
| 57 |
$exclude_option = sanitize_text_field( $_POST['exclude_option'] ); |
| 58 |
$exclude_ids = sanitize_text_field( $_POST['exclude_ids'] ); |
| 59 |
|
| 60 |
// ---------------------------------------------- |
| 61 |
// insert the data into an array |
| 62 |
// ---------------------------------------------- |
| 63 |
|
| 64 |
$plugin_data_array = array( |
| 65 |
'display_button_checkbox' => $display_button_checkbox, |
| 66 |
'background_color' => $background_color, |
| 67 |
'button_width' => $button_width, |
| 68 |
'button_height' => $button_height, |
| 69 |
'button_movment' => $button_movment, |
| 70 |
'horizontal_position' => $horizontal_position, |
| 71 |
'horizontal_spacing' => $horizontal_spacing, |
| 72 |
'vertical_position' => $vertical_position, |
| 73 |
'vertical_spacing' => $vertical_spacing, |
| 74 |
'icon_image_url' => $icon_image_url, |
| 75 |
'icon_svg_url' => $icon_svg_url, |
| 76 |
'icon_type' => $icon_type, |
| 77 |
'icon_width' => $icon_width, |
| 78 |
'icon_height' => $icon_height, |
| 79 |
'hide_on_mobile_checkbox' => $hide_on_mobile_checkbox, |
| 80 |
'hide_on_desktop_checkbox' => $hide_on_desktop_checkbox, |
| 81 |
'mobile_width' => $mobile_width, |
| 82 |
'mobile_button_position_checkbox' => $mobile_button_position_checkbox, |
| 83 |
'mobile_horizontal_position' => $mobile_horizontal_position, |
| 84 |
'mobile_horizontal_spacing' => $mobile_horizontal_spacing, |
| 85 |
'mobile_vertical_position' => $mobile_vertical_position, |
| 86 |
'mobile_vertical_spacing' => $mobile_vertical_spacing, |
| 87 |
'accessibility_background_color' => $accessibility_background_color, |
| 88 |
'accessibility_page_url' => $accessibility_page_url, |
| 89 |
'accessibility_page_text' => $accessibility_page_text, |
| 90 |
'z_index' => $z_index, |
| 91 |
|
| 92 |
'exclude_option' => $exclude_option, |
| 93 |
'exclude_ids' => $exclude_ids, |
| 94 |
); // $creating_data_array = array( |
| 95 |
|
| 96 |
// ---------------------------------------------- |
| 97 |
// creating a value with all the array data |
| 98 |
// ---------------------------------------------- |
| 99 |
|
| 100 |
$array_key_name = ''; |
| 101 |
$array_item_value = ''; |
| 102 |
|
| 103 |
foreach($plugin_data_array as $key=>$item) { |
| 104 |
$array_key_name .= "####" . $key; |
| 105 |
$array_item_value .= "####" . $item; |
| 106 |
} // foreach($medical_form_array as $key=>$item) { |
| 107 |
|
| 108 |
// ---------------------------------------------- |
| 109 |
// inserting all the data to datbase |
| 110 |
// ---------------------------------------------- |
| 111 |
|
| 112 |
$plugin_data = $array_key_name . "***" . $array_item_value; |
| 113 |
$plugin_data = sanitize_text_field($plugin_data); |
| 114 |
|
| 115 |
// update optuon on the database into wp_options |
| 116 |
update_option($wp_options_name, $plugin_data); |
| 117 |
|
| 118 |
$success_message = "The data was updated successfully"; |
| 119 |
|
| 120 |
} else { // if( wp_verify_nonce($_POST['yydev_accessibility_nonce'], 'yydev_accessibility_action') ) { |
| 121 |
$error_message = "Form nonce was incorrect"; |
| 122 |
} // } else { // if( wp_verify_nonce($_POST['yydev_accessibility_nonce'], 'yydev_accessibility_action') ) { |
| 123 |
|
| 124 |
} // if( isset($_POST['yydev_accessibility_nonce']) ) { |
| 125 |
|
| 126 |
// ======================================================================================================== |
| 127 |
// Get all the data and ouput it into the page |
| 128 |
// ======================================================================================================== |
| 129 |
|
| 130 |
$getting_plugin_data = get_option($wp_options_name); |
| 131 |
|
| 132 |
if( !empty($getting_plugin_data) ) { |
| 133 |
|
| 134 |
// ---------------------------------------------- |
| 135 |
// breaking the string into to 2 variables. the array namd and vakue |
| 136 |
// ---------------------------------------------- |
| 137 |
|
| 138 |
$break_array = explode("***", $getting_plugin_data); |
| 139 |
|
| 140 |
$item_name = explode("####", $break_array[0]); |
| 141 |
$key_name = explode("####", $break_array[1]); |
| 142 |
|
| 143 |
$array_count = count($key_name); |
| 144 |
|
| 145 |
// ---------------------------------------------- |
| 146 |
// creating an organized array with all values |
| 147 |
// ---------------------------------------------- |
| 148 |
|
| 149 |
for($count_number = 0; $count_number < $array_count; $count_number++) { |
| 150 |
$plugin_data_array[ $item_name[$count_number] ] = $key_name[$count_number]; |
| 151 |
} // for($count_number = 0; $count_number < $array_count; $count_number++) { |
| 152 |
|
| 153 |
} // if( !empty($getting_plugin_data) ) { |
| 154 |
|
| 155 |
?> |
| 156 |
|
| 157 |
<div class="wrap yydev-accessibility"> |
| 158 |
|
| 159 |
<h2 class="display-inline">Accessibility Settings</h2> |
| 160 |
|
| 161 |
<?php yydev_accessibility_echo_message_if_exists(); ?> |
| 162 |
<?php yydev_accessibility_echo_success_message_if_exists($success_message); ?> |
| 163 |
<?php yydev_accessibility_echo_error_message_if_exists($error_message); ?> |
| 164 |
|
| 165 |
<p>Below you will be able to edit and make change to the accessibility icon output:</p> |
| 166 |
<p style="background:#e6e6e6;padding:10px;"><b>Note: You can stop changes to elements on the site by adding the class <span style="color:#47a3ff">no-accessibility</span> to it</b></p> |
| 167 |
|
| 168 |
<div class="insert-new"> |
| 169 |
|
| 170 |
<form class="edit-form-data" method="POST" action=""> |
| 171 |
|
| 172 |
<br /> |
| 173 |
<h2> Basic Settings: </h2> |
| 174 |
|
| 175 |
<div class="yydev_accessibility_line"> |
| 176 |
<input type="checkbox" id="display_button_checkbox" class="checkbox" name="display_button_checkbox" value="1" <?php if($plugin_data_array['display_button_checkbox'] == 1) {echo "checked";} ?> /> |
| 177 |
<label for="display_button_checkbox">Display button on the site (when unselected the button won't show up)</label> |
| 178 |
</div><!--yydev_accessibility_line--> |
| 179 |
|
| 180 |
<div class="yydev_accessibility_line"> |
| 181 |
<label for="background_color">Background color hex: </label> |
| 182 |
<input type="text" id="background_color" class="input-very-short" name="background_color" value="<?php echo yydev_accessibility_html_output($plugin_data_array['background_color']); ?>" /> |
| 183 |
<small>Example: #09547c</small> |
| 184 |
</div><!--yydev_accessibility_line--> |
| 185 |
|
| 186 |
|
| 187 |
<div class="yydev_accessibility_line"> |
| 188 |
<label for="button_width">Button Width: </label> |
| 189 |
<input type="text" id="button_width" class="input-very-short" name="button_width" value="<?php echo yydev_accessibility_html_output($plugin_data_array['button_width']); ?>" /> PX |
| 190 |
</div><!--yydev_accessibility_line--> |
| 191 |
|
| 192 |
<div class="yydev_accessibility_line"> |
| 193 |
<label for="button_height">Button Height: </label> |
| 194 |
<input type="text" id="button_height" class="input-very-short" name="button_height" value="<?php echo yydev_accessibility_html_output($plugin_data_array['button_height']); ?>" /> PX |
| 195 |
</div><!--yydev_accessibility_line--> |
| 196 |
|
| 197 |
<div class="yydev_accessibility_line"> |
| 198 |
<label for="button_movment">Button Movment (Static/Fixed): </label> |
| 199 |
|
| 200 |
<select name="button_movment"> |
| 201 |
<option value="absolute" <?php if($plugin_data_array['button_movment'] == "absolute") {echo "selected";} ?> >Static</option> |
| 202 |
<option value="fixed" <?php if ($plugin_data_array['button_movment'] == "fixed") {echo "selected";} ?> >Fixed</option> |
| 203 |
</select> |
| 204 |
|
| 205 |
</div><!--yydev_accessibility_line--> |
| 206 |
|
| 207 |
<div class="yydev_accessibility_line"> |
| 208 |
<label for="horizontal_position">Horizontal Position: </label> |
| 209 |
|
| 210 |
<select name="horizontal_position"> |
| 211 |
<option value="left" <?php if($plugin_data_array['horizontal_position'] == "left") {echo "selected";} ?> >Left</option> |
| 212 |
<option value="right" <?php if ($plugin_data_array['horizontal_position'] == "right") {echo "selected";} ?> >Right</option> |
| 213 |
</select> |
| 214 |
|
| 215 |
<label for="horizontal_spacing">Horizontal Spacing: </label> |
| 216 |
<input type="text" id="horizontal_spacing" class="input-very-short" name="horizontal_spacing" value="<?php echo yydev_accessibility_html_output($plugin_data_array['horizontal_spacing']); ?>" /> |
| 217 |
<small>Examples: 10px, 50%</small> |
| 218 |
</div><!--yydev_accessibility_line--> |
| 219 |
|
| 220 |
|
| 221 |
<div class="yydev_accessibility_line"> |
| 222 |
<label for="vertical_position">Vertical Position: </label> |
| 223 |
|
| 224 |
<select name="vertical_position"> |
| 225 |
<option value="top" <?php if($plugin_data_array['vertical_position'] == "top") {echo "selected";} ?> >Top</option> |
| 226 |
<option value="bottom" <?php if ($plugin_data_array['vertical_position'] == "bottom") {echo "selected";} ?> >Bottom</option> |
| 227 |
</select> |
| 228 |
|
| 229 |
<label for="vertical_spacing">Vertical Spacing: </label> |
| 230 |
<input type="text" id="vertical_spacing" class="input-very-short" name="vertical_spacing" value="<?php echo $plugin_data_array['vertical_spacing']; ?>" /> |
| 231 |
<small>Examples: 10px, 50%</small> |
| 232 |
</div><!--yydev_accessibility_line--> |
| 233 |
|
| 234 |
<div class="yydev_accessibility_line"> |
| 235 |
<label for="z_index">Z-index: </label> |
| 236 |
<input type="text" id="z_index" class="input-very-short" name="z_index" value="<?php echo yydev_accessibility_html_output($plugin_data_array['z_index']); ?>" /> |
| 237 |
<small>Choose bigger number if there are element in front the button</small> |
| 238 |
</div><!--yydev_accessibility_line--> |
| 239 |
|
| 240 |
<?php |
| 241 |
// Handle backward compatibility for new fields |
| 242 |
$current_icon_type = isset($plugin_data_array['icon_type']) ? $plugin_data_array['icon_type'] : 'image'; |
| 243 |
$current_icon_width = isset($plugin_data_array['icon_width']) && !empty($plugin_data_array['icon_width']) ? $plugin_data_array['icon_width'] : '30'; |
| 244 |
$current_icon_height = isset($plugin_data_array['icon_height']) && !empty($plugin_data_array['icon_height']) ? $plugin_data_array['icon_height'] : '30'; |
| 245 |
$current_icon_image_url = isset($plugin_data_array['icon_image_url']) ? $plugin_data_array['icon_image_url'] : ''; |
| 246 |
$current_icon_svg_url = isset($plugin_data_array['icon_svg_url']) ? $plugin_data_array['icon_svg_url'] : ''; |
| 247 |
?> |
| 248 |
|
| 249 |
<div class="yydev_accessibility_line"> |
| 250 |
<label for="icon_type">Icon Type: </label> |
| 251 |
<select name="icon_type" id="icon_type" style="width:400px;"> |
| 252 |
<option value="image" <?php if($current_icon_type == "image" || empty($current_icon_type)) {echo "selected";} ?> >Regular Image Icon</option> |
| 253 |
<option value="svg" <?php if($current_icon_type == "svg") {echo "selected";} ?> >SVG Icon (Require wordpress support to upload svg)</option> |
| 254 |
</select> |
| 255 |
</div><!--yydev_accessibility_line--> |
| 256 |
|
| 257 |
<div class="yydev_accessibility_line" id="image_url_section"> |
| 258 |
<img class="yydev_light_img_bg" style="background:<?php echo esc_attr($plugin_data_array['background_color']); ?>" src="<?php echo yydev_accessibility_html_output($current_icon_image_url); ?>" alt="" /> |
| 259 |
<label for="icon_image_url">Custom Image Icon Url: </label> |
| 260 |
<input type="text" id="icon_image_url" class="input-very-long yydev_image_input" name="icon_image_url" value="<?php echo esc_url($current_icon_image_url); ?>" /> |
| 261 |
<input type="button" name="yydev_upload_image" class="yydev_upload_image button-secondary" value="Choose Image..." /> |
| 262 |
|
| 263 |
<div class="clear"></div> |
| 264 |
</div><!--yydev_accessibility_line--> |
| 265 |
|
| 266 |
<?php |
| 267 |
// Set default SVG URL if empty for both preview and input field |
| 268 |
$default_svg_url = plugins_url('images/accessibility-icon.svg', dirname(__FILE__)); |
| 269 |
$current_svg_value = !empty($current_icon_svg_url) ? $current_icon_svg_url : $default_svg_url; |
| 270 |
?> |
| 271 |
<div class="yydev_accessibility_line" id="svg_url_section" style="<?php echo ($current_icon_type != 'svg' ? 'display:none;' : ''); ?>"> |
| 272 |
<img class="yydev_light_svg_bg" style="background:<?php echo esc_attr($plugin_data_array['background_color']); ?>; width:<?php echo intval($current_icon_width); ?>px; height:<?php echo intval($current_icon_height); ?>px; object-fit:contain;" src="<?php echo esc_url($current_svg_value); ?>" alt="" /> |
| 273 |
<br /> |
| 274 |
<label for="icon_svg_url">Custom SVG Icon Url: </label> |
| 275 |
<br /> |
| 276 |
<input type="text" id="icon_svg_url" class="input-very-long yydev_svg_input" name="icon_svg_url" value="<?php echo esc_url($current_svg_value); ?>" /> |
| 277 |
<input type="button" name="yydev_upload_svg" class="yydev_upload_svg button-secondary" value="Choose SVG..." /> |
| 278 |
|
| 279 |
<div class="clear"></div> |
| 280 |
</div><!--yydev_accessibility_line--> |
| 281 |
|
| 282 |
<div class="yydev_accessibility_line" id="icon_size_section" style="<?php echo ($current_icon_type != 'svg' ? 'display:none;' : ''); ?>"> |
| 283 |
<label for="icon_width">SVG Width: </label> |
| 284 |
<input type="text" id="icon_width" class="input-very-short" name="icon_width" value="<?php echo yydev_accessibility_html_output($current_icon_width); ?>" /> PX |
| 285 |
<br /> |
| 286 |
<label for="icon_height">SVG Height: </label> |
| 287 |
<input type="text" id="icon_height" class="input-very-short" name="icon_height" value="<?php echo yydev_accessibility_html_output($current_icon_height); ?>" /> PX |
| 288 |
</div><!--yydev_accessibility_line--> |
| 289 |
|
| 290 |
<small> |
| 291 |
Default Image URL: <?php echo plugins_url('images/accessibility-icon.png', dirname(__FILE__)); ?> |
| 292 |
<br /> |
| 293 |
Default SVG URL: <?php echo plugins_url('images/accessibility-icon.svg', dirname(__FILE__)); ?> |
| 294 |
</small> |
| 295 |
|
| 296 |
<br /><br /> |
| 297 |
|
| 298 |
|
| 299 |
<br /> |
| 300 |
<h2> Mobile Settings: </h2> |
| 301 |
|
| 302 |
<div class="yydev_accessibility_line"> |
| 303 |
<input type="checkbox" id="hide_on_mobile_checkbox" class="checkbox" name="hide_on_mobile_checkbox" value="1" <?php if($plugin_data_array['hide_on_mobile_checkbox'] == 1) {echo "checked";} ?> /> |
| 304 |
<label for="hide_on_mobile_checkbox">Hide the button on mobile (display button only on desktop)</label> |
| 305 |
</div><!--yydev_accessibility_line--> |
| 306 |
|
| 307 |
<div class="yydev_accessibility_line"> |
| 308 |
<input type="checkbox" id="hide_on_desktop_checkbox" class="checkbox" name="hide_on_desktop_checkbox" value="1" <?php if($plugin_data_array['hide_on_desktop_checkbox'] == 1) {echo "checked";} ?> /> |
| 309 |
<label for="hide_on_desktop_checkbox">Hide the button on desktop (display button only on mobile)</label> |
| 310 |
</div><!--yydev_accessibility_line--> |
| 311 |
|
| 312 |
<div class="yydev_accessibility_line"> |
| 313 |
<label for="mobile_width">Mobile screen width (will effect the option selected above): </label> |
| 314 |
<input type="text" id="mobile_width" class="input-very-short" name="mobile_width" value="<?php echo yydev_accessibility_html_output($plugin_data_array['mobile_width']); ?>" /> PX |
| 315 |
</div><!--yydev_accessibility_line--> |
| 316 |
|
| 317 |
|
| 318 |
<br /> |
| 319 |
<h2> Mobile Positioning: </h2> |
| 320 |
|
| 321 |
|
| 322 |
<div class="yydev_accessibility_line"> |
| 323 |
<input type="checkbox" id="mobile_button_position_checkbox" class="checkbox" name="mobile_button_position_checkbox" value="1" <?php if($plugin_data_array['mobile_button_position_checkbox'] == 1) {echo "checked";} ?> /> |
| 324 |
<label for="mobile_button_position_checkbox">Choose different button positioning on mobile</label> |
| 325 |
</div><!--yydev_accessibility_line--> |
| 326 |
|
| 327 |
<div class="yydev_accessibility_line"> |
| 328 |
<label for="mobile_horizontal_position">Horizontal Position: </label> |
| 329 |
|
| 330 |
<select name="mobile_horizontal_position"> |
| 331 |
<option value="left" <?php if($plugin_data_array['mobile_horizontal_position'] == "left") {echo "selected";} ?> >Left</option> |
| 332 |
<option value="right" <?php if ($plugin_data_array['mobile_horizontal_position'] == "right") {echo "selected";} ?> >Right</option> |
| 333 |
</select> |
| 334 |
|
| 335 |
<label for="mobile_horizontal_spacing">Horizontal Spacing: </label> |
| 336 |
<input type="text" id="mobile_horizontal_spacing" class="input-very-short" name="mobile_horizontal_spacing" value="<?php echo yydev_accessibility_html_output($plugin_data_array['mobile_horizontal_spacing']); ?>" /> |
| 337 |
<small>Examples: 10px, 50%</small> |
| 338 |
</div><!--yydev_accessibility_line--> |
| 339 |
|
| 340 |
|
| 341 |
<div class="yydev_accessibility_line"> |
| 342 |
<label for="mobile_vertical_position">Vertical Position: </label> |
| 343 |
|
| 344 |
<select name="mobile_vertical_position"> |
| 345 |
<option value="top" <?php if($plugin_data_array['mobile_vertical_position'] == "top") {echo "selected";} ?> >Top</option> |
| 346 |
<option value="bottom" <?php if ($plugin_data_array['mobile_vertical_position'] == "bottom") {echo "selected";} ?> >Bottom</option> |
| 347 |
</select> |
| 348 |
|
| 349 |
<label for="mobile_vertical_spacing">Vertical Spacing: </label> |
| 350 |
<input type="text" id="mobile_vertical_spacing" class="input-very-short" name="mobile_vertical_spacing" value="<?php echo yydev_accessibility_html_output($plugin_data_array['mobile_vertical_spacing']); ?>" /> |
| 351 |
<small>Examples: 10px, 50%</small> |
| 352 |
</div><!--yydev_accessibility_line--> |
| 353 |
|
| 354 |
|
| 355 |
<br /> |
| 356 |
<h2> Accessibility Page: </h2> |
| 357 |
|
| 358 |
<div class="yydev_accessibility_line"> |
| 359 |
<label for="accessibility_page_text">Accessibility Page Text: </label> |
| 360 |
<input type="text" id="accessibility_page_text" class="input-short" name="accessibility_page_text" value="<?php echo yydev_accessibility_html_output($plugin_data_array['accessibility_page_text']); ?>" /> |
| 361 |
</div><!--yydev_accessibility_line--> |
| 362 |
|
| 363 |
<div class="yydev_accessibility_line"> |
| 364 |
<label for="accessibility_page_url">Accessibility Page URL: </label> |
| 365 |
<input type="text" id="accessibility_page_url" class="input-very-long" name="accessibility_page_url" value="<?php echo yydev_accessibility_html_output($plugin_data_array['accessibility_page_url']); ?>" /> |
| 366 |
<small>The site page with the accessibility statement</small> |
| 367 |
</div><!--yydev_accessibility_line--> |
| 368 |
|
| 369 |
<div class="yydev_accessibility_line"> |
| 370 |
<label for="accessibility_background_color">Accessibility Page Background color hex: </label> |
| 371 |
<input type="text" id="accessibility_background_color" class="input-very-short" name="accessibility_background_color" value="<?php echo yydev_accessibility_html_output($plugin_data_array['accessibility_background_color']); ?>" /> |
| 372 |
<small>Example: #09547c</small> |
| 373 |
</div><!--yydev_accessibility_line--> |
| 374 |
|
| 375 |
|
| 376 |
<br /> |
| 377 |
<h2> Include/Exclude Pages By ID: </h2> |
| 378 |
|
| 379 |
<p> Insert the pages ID and separate them by comma. You can use <a target="_blank" href="https://wordpress.org/plugins/show-posts-and-pages-id/">Show Pages IDs</a> plugin for help. |
| 380 |
<br /><br /> |
| 381 |
Example <small>(one page)</small>: 14 |
| 382 |
<br /> Example <small>(multiple pages)</small>: 14, 16, 23 </p> |
| 383 |
|
| 384 |
<div class="yydev_accessibility_line"> |
| 385 |
|
| 386 |
<label for="exclude_option">Include/Exclude Option: </label> |
| 387 |
|
| 388 |
<select name="exclude_option" id='exclude_option'> |
| 389 |
<option value="none" <?php if($plugin_data_array['exclude_option'] == "none") {echo "selected";} ?> >Not Active (Default)</option> |
| 390 |
<option value="exclude" <?php if($plugin_data_array['exclude_option'] == "exclude") {echo "selected";} ?> >Exclude Pages By ID</option> |
| 391 |
<option value="include" <?php if ($plugin_data_array['exclude_option'] == "include") {echo "selected";} ?> >Include Only On Pages</option> |
| 392 |
</select> |
| 393 |
|
| 394 |
<input type="text" id="exclude_ids" class="input-short" name="exclude_ids" value="<?php echo yydev_accessibility_html_output($plugin_data_array['exclude_ids']); ?>" /> |
| 395 |
|
| 396 |
</div><!--yydev_accessibility_line--> |
| 397 |
|
| 398 |
<br /> |
| 399 |
|
| 400 |
<?php |
| 401 |
// creating nonce to make sure the form was submitted correctly from the right page |
| 402 |
wp_nonce_field( 'yydev_accessibility_action', 'yydev_accessibility_nonce' ); |
| 403 |
?> |
| 404 |
|
| 405 |
<input type="submit" class="edit-form-data yydev-tags-submit" name="insert_accessibility" value="Submit Changes" /> |
| 406 |
|
| 407 |
</form> |
| 408 |
|
| 409 |
<br /><br /><br /> |
| 410 |
<span id="footer-thankyou-code">This plugin was create by <a target="_blank" href="https://www.yydevelopment.com">YYDevelopment</a>. If you liked the plugin please give it a <a target="_blank" href="https://wordpress.org/plugins/yydevelopment-accessibility/#reviews">5 stars review</a>. |
| 411 |
If you want to help support this FREE plugin <a target="_blank" href="https://www.yydevelopment.com/coffee-break/?plugin=yydevelopment-accessibility">buy us a coffee</a>.</span> |
| 412 |
</span> |
| 413 |
</div><!--wrap--> |