PluginProbe
AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness / 3.2.6
AccessiYes Accessibility Widget for ADA, EAA & WCAG Readiness v3.2.6
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.6, at accessibility-widget.php

95 lines 3.1 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.6
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 * Domain Path: /languages
26 */
27
28 /*
29 Copyright 2025 AccessibilityWidget
30
31 This program is free software; you can redistribute it and/or modify
32 it under the terms of the GNU General Public License, version 2, as
33 published by the Free Software Foundation.
34
35 This program is distributed in the hope that it will be useful,
36 but WITHOUT ANY WARRANTY; without even the implied warranty of
37 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 GNU General Public License for more details.
39
40 You should have received a copy of the GNU General Public License
41 along with this program; if not, write to the Free Software
42 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
43 */
44
45 // If this file is called directly, abort.
46 if ( ! defined( 'WPINC' ) ) {
47 die;
48 }
49
50 define( 'CY_A11Y_VERSION', '3.2.6' );
51 define( 'CY_A11Y_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
52 define( 'CY_A11Y_PLUGIN_BASEPATH', plugin_dir_path( __FILE__ ) );
53 // Previous version settings (deprecated from 0.9 onwards).
54 define( 'CY_A11Y_PLUGIN_FILENAME', __FILE__ );
55 define( 'CY_A11Y_DEFAULT_LANGUAGE', cya11y_set_default_language() );
56
57
58 /**
59 * Load the plugin textdomain so translations bundled in /languages (or added
60 * via Loco Translate, WPML, Poedit, etc.) are picked up. Language packs from
61 * translate.wordpress.org load automatically, but locally stored .mo files
62 * require this call.
63 */
64 function cya11y_load_textdomain() {
65 load_plugin_textdomain( 'accessibility-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
66 }
67 add_action( 'init', 'cya11y_load_textdomain' );
68
69 function cya11y_set_default_language() {
70 $default = get_option( 'WPLANG', 'en_US' );
71 if ( empty( $default ) || strlen( $default ) <= 1 ) {
72 $default = 'en';
73 }
74 return substr( $default, 0, 2 );
75 }
76
77 /**
78 * Check if plugin is in legacy version.
79 *
80 * @return boolean
81 */
82 function cya11y_is_legacy() {
83 if ( empty( get_option( 'cya11y_widget_settings', array() ) ) && ! empty( get_option( 'widget_accesstxt', '' ) ) ) {
84 return true;
85 } else {
86 return false;
87 }
88 }
89
90 if ( cya11y_is_legacy() ) {
91 require_once CY_A11Y_PLUGIN_BASEPATH . 'legacy/loader.php';
92 } else {
93 require_once CY_A11Y_PLUGIN_BASEPATH . 'lite/loader.php';
94 }
95