PluginProbe
AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness / 3.2.2
AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness v3.2.2
3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 trunk 1.0 1.1 1.1.1 1.2 1.2.1 2 2.0.1 2.1 2.2 2.2.1 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 All 33 releases
accessibility-widget / accessibility-widget.php

accessibility-widget.php in AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness 3.2.2, at accessibility-widget.php

83 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://www.cookieyes.com/
12 * @since 1.6.6
13 * @package AccessibilityWidget
14 *
15 * @wordpress-plugin
16 * Plugin Name: AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness
17 * Plugin URI: https://www.cookieyes.com/accessibility-widget/
18 * Description: A simple way to make your website more accessible.
19 * Version: 3.2.2
20 * Author: CookieYes
21 * Author URI: https://www.cookieyes.com/
22 * License: GPLv3
23 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
24 * Text Domain: accessibility-widget
25 */
26
27 /*
28 Copyright 2025 AccessibilityWidget
29
30 This program is free software; you can redistribute it and/or modify
31 it under the terms of the GNU General Public License, version 2, as
32 published by the Free Software Foundation.
33
34 This program is distributed in the hope that it will be useful,
35 but WITHOUT ANY WARRANTY; without even the implied warranty of
36 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 GNU General Public License for more details.
38
39 You should have received a copy of the GNU General Public License
40 along with this program; if not, write to the Free Software
41 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
42 */
43
44 // If this file is called directly, abort.
45 if ( ! defined( 'WPINC' ) ) {
46 die;
47 }
48
49 define( 'CY_A11Y_VERSION', '3.2.2' );
50 define( 'CY_A11Y_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
51 define( 'CY_A11Y_PLUGIN_BASEPATH', plugin_dir_path( __FILE__ ) );
52 // Previous version settings (deprecated from 0.9 onwards).
53 define( 'CY_A11Y_PLUGIN_FILENAME', __FILE__ );
54 define( 'CY_A11Y_DEFAULT_LANGUAGE', cya11y_set_default_language() );
55
56
57 function cya11y_set_default_language() {
58 $default = get_option( 'WPLANG', 'en_US' );
59 if ( empty( $default ) || strlen( $default ) <= 1 ) {
60 $default = 'en';
61 }
62 return substr( $default, 0, 2 );
63 }
64
65 /**
66 * Check if plugin is in legacy version.
67 *
68 * @return boolean
69 */
70 function cya11y_is_legacy() {
71 if ( empty( get_option( 'cya11y_widget_settings', array() ) ) && ! empty( get_option( 'widget_accesstxt', '' ) ) ) {
72 return true;
73 } else {
74 return false;
75 }
76 }
77
78 if ( cya11y_is_legacy() ) {
79 require_once CY_A11Y_PLUGIN_BASEPATH . 'legacy/loader.php';
80 } else {
81 require_once CY_A11Y_PLUGIN_BASEPATH . 'lite/loader.php';
82 }
83