' . esc_html__( 'A11y Enhancer: Local Font Awesome file (assets/css/font-awesome.min.css) not found. Using inline CSS fallback for icons. Please add Font Awesome 6.4.0 CSS to assets/css/ for full compliance.', 'a11y-enhancer' ) . '

'; } ); } // Inline CSS for critical Font Awesome icons wp_add_inline_style( 'a11y-enhancer-css', ' @font-face { font-family: "Font Awesome 6 Free"; font-style: normal; font-weight: 900; src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2") format("woff2"); } .fas { font-family: "Font Awesome 6 Free"; font-weight: 900; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; display: inline-block; font-style: normal; font-variant: normal; line-height: 1; text-rendering: auto; } .fa-universal-access:before { content: "\f29a"; } .fa-font:before { content: "\f031"; } .fa-text-height:before { content: "\f034"; } .fa-adjust:before { content: "\f042"; } .fa-assistive-listening-systems:before { content: "\f2a2"; } .fa-paragraph:before { content: "\f1dd"; } .fa-eye-slash:before { content: "\f070"; } .fa-underline:before { content: "\f0cd"; } .fa-undo:before { content: "\f0e2"; } .fa-arrows-alt-h:before { content: "\f337"; } .fa-times:before { content: "\f00d"; } ' ); } } add_action( 'wp_enqueue_scripts', 'a11y_enhancer_enqueue_assets' ); function a11y_enhancer_add_widget() { if ( is_admin() ) { return; } $enable_font = get_option( 'a11y_enhancer_enable_font', 1 ); $enable_contrast = get_option( 'a11y_enhancer_enable_contrast', 1 ); $enable_reader = get_option( 'a11y_enhancer_enable_reader', 1 ); $enable_spacing = get_option( 'a11y_enhancer_enable_spacing', 1 ); $enable_grayscale = get_option( 'a11y_enhancer_enable_grayscale', 1 ); $enable_underline = get_option( 'a11y_enhancer_enable_underline', 1 ); if ( $enable_font || $enable_contrast || $enable_reader || $enable_spacing || $enable_grayscale || $enable_underline ) { $position = get_option( 'a11y_enhancer_position', 'bottom-right' ); $default_style = 'position: fixed; z-index: 9999; padding: 10px; box-sizing: border-box; background: #2c2c2c; color: white; border: 2px solid black; border-radius: 4px; min-width: 200px; max-width: 300px;'; $mobile_style = 'min-width: 100px; max-width: 150px; padding: 5px;'; ?>
function( $value ) { $valid = array( 'bottom-right', 'bottom-left' ); return in_array( $value, $valid ) ? $value : 'bottom-right'; } ) ); // Sanitize checkbox settings register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_font', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_contrast', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_reader', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_spacing', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_grayscale', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); register_setting( 'a11y_enhancer_settings', 'a11y_enhancer_enable_underline', array( 'sanitize_callback' => function( $value ) { return absint( $value ); } ) ); add_settings_section( 'a11y_enhancer_main_section', __( 'A11y Enhancer Settings', 'a11y-enhancer' ), function() { echo '

' . esc_html__( 'Customize the accessibility widget position and features.', 'a11y-enhancer' ) . '

'; }, 'a11y_enhancer_settings' ); add_settings_field( 'a11y_enhancer_position', __( 'Widget Position', 'a11y-enhancer' ), function() { $position = get_option( 'a11y_enhancer_position', 'bottom-right' ); ?>




.

'any', 'posts_per_page' => 10, 'post_status' => 'publish' ); $posts = get_posts( $args ); echo '

' . esc_html__( 'Checking recent posts for missing image alt text:', 'a11y-enhancer' ) . '

'; echo ''; } ?>