Changeset 3373949
- Timestamp:
- 10/06/2025 08:03:21 PM (5 months ago)
- Location:
- alttext-ai/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
admin/class-atai-settings.php (modified) (2 diffs)
-
admin/partials/settings.php (modified) (1 diff)
-
atai.php (modified) (2 diffs)
-
changelog.txt (modified) (1 diff)
-
includes/class-atai.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
alttext-ai/trunk/README.txt
r3371885 r3373949 6 6 Requires at least: 4.7 7 7 Tested up to: 6.8 8 Stable tag: 1.10.1 28 Stable tag: 1.10.13 9 9 WC requires at least: 3.3 10 10 WC tested up to: 10.1 … … 70 70 == Changelog == 71 71 72 = 1.10.13 - 2025-10-06 = 73 * Fixed: Non-administrator users can now save settings when given permission to access the plugin 74 72 75 = 1.10.12 - 2025-10-02 = 73 76 * Improved: Better language detection for multilingual sites using WPML and Polylang -
alttext-ai/trunk/admin/class-atai-settings.php
r3359911 r3373949 196 196 197 197 /** 198 * Filter the capability required to save settings. 199 * 200 * @since 1.10.13 201 * @access public 202 * @param string $capability The default capability (manage_options). 203 * @return string The configured capability. 204 */ 205 public function filter_settings_capability( $capability ) { 206 return get_option( 'atai_admin_capability', 'manage_options' ); 207 } 208 209 /** 198 210 * Register setting group. 199 211 * … … 709 721 } 710 722 711 // Check user capabilities 712 if ( ! current_user_can( 'manage_options' ) ) { 723 // Check user capabilities using configured capability 724 $required_capability = get_option( 'atai_admin_capability', 'manage_options' ); 725 if ( ! current_user_can( $required_capability ) ) { 713 726 wp_send_json_error( __( 'Insufficient permissions.', 'alttext-ai' ) ); 714 727 } -
alttext-ai/trunk/admin/partials/settings.php
r3359911 r3373949 679 679 </select> 680 680 <p class="mt-1 text-sm text-gray-500"> 681 <?php esc_html_e( 'Control which user roles can access the AltText.ai menu .', 'alttext-ai' ); ?>681 <?php esc_html_e( 'Control which user roles can access the AltText.ai menu and save settings.', 'alttext-ai' ); ?> 682 682 </p> 683 683 </div> -
alttext-ai/trunk/atai.php
r3371885 r3373949 16 16 * Plugin URI: https://alttext.ai/product 17 17 * Description: Automatically generate image alt text with AltText.ai. 18 * Version: 1.10.1 218 * Version: 1.10.13 19 19 * Author: AltText.ai 20 20 * Author URI: https://alttext.ai … … 34 34 * Current plugin version. 35 35 */ 36 define( 'ATAI_VERSION', '1.10.1 2' );36 define( 'ATAI_VERSION', '1.10.13' ); 37 37 38 38 /** -
alttext-ai/trunk/changelog.txt
r3371885 r3373949 1 1 *** AltText.ai Changelog *** 2 3 2025-10-06 - version 1.10.13 4 * Fixed: Non-administrator users can now save settings when given permission to access the plugin 2 5 3 6 2025-10-02 - version 1.10.12 -
alttext-ai/trunk/includes/class-atai.php
r3337936 r3373949 199 199 200 200 $this->loader->add_filter( 'pre_update_option_atai_api_key', $settings, 'save_api_key', 10, 2 ); 201 $this->loader->add_filter( 'option_page_capability_atai-settings', $settings, 'filter_settings_capability' ); 201 202 202 203 // Attachment
Note: See TracChangeset
for help on using the changeset viewer.