Changeset 3417090
- Timestamp:
- 12/11/2025 08:03:32 AM (4 months ago)
- File:
-
- 1 edited
-
bettercx-widget/trunk/bettercx-widget.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bettercx-widget/trunk/bettercx-widget.php
r3417078 r3417090 495 495 496 496 add_settings_field( 497 'is_attachments_disabled', 498 __('Disable Attachments', 'bettercx-widget'), 499 array($this, 'is_attachments_disabled_field_callback'), 500 'bettercx-widget', 501 'bettercx_widget_advanced' 502 ); 503 504 add_settings_field( 497 505 'custom_css', 498 506 __('Custom CSS', 'bettercx-widget'), … … 583 591 $sanitized['widget_enabled'] = isset($input['widget_enabled']) ? (bool) $input['widget_enabled'] : true; 584 592 $sanitized['logged_in_only'] = isset($input['logged_in_only']) ? (bool) $input['logged_in_only'] : false; 593 $sanitized['is_attachments_disabled'] = isset($input['is_attachments_disabled']) ? (bool) $input['is_attachments_disabled'] : false; 585 594 586 595 if (isset($input['custom_css'])) { … … 625 634 'base_url' => $this->settings['base_url'], 626 635 'ai_service_url' => $this->settings['ai_service_url'], 636 'is_attachments_disabled' => $this->settings['is_attachments_disabled'] ? 'true' : 'false', 627 637 'class_name' => '', 628 638 'style' => '', … … 723 733 'base-url' => true, 724 734 'ai-service-url' => true, 735 'is-attachments-disabled' => true, 725 736 'class' => true, 726 737 'style' => true, … … 1065 1076 <p class="description"> 1066 1077 <?php esc_html_e('When enabled, the widget will only be displayed to users who are logged into WordPress. This is useful for member-only sites or applications with authentication.', 'bettercx-widget'); ?> 1078 </p> 1079 <?php 1080 } 1081 1082 public function is_attachments_disabled_field_callback() { 1083 $value = isset($this->settings['is_attachments_disabled']) ? (bool) $this->settings['is_attachments_disabled'] : false; 1084 ?> 1085 <label> 1086 <input type="checkbox" name="bettercx_widget_settings[is_attachments_disabled]" value="1" <?php checked($value, true); ?> /> 1087 <?php esc_html_e('Hide attachment uploads in the chat composer', 'bettercx-widget'); ?> 1088 </label> 1089 <p class="description"> 1090 <?php esc_html_e('When enabled, users will not see the image upload button in the widget composer.', 'bettercx-widget'); ?> 1067 1091 </p> 1068 1092 <?php
Note: See TracChangeset
for help on using the changeset viewer.