Version Description
- Bug fix: script registration/enqueuing mis-ordered, breaking toolbar.
Download this release
Release Info
Developer | joedolson |
Plugin | WP Accessibility |
Version | 1.7.3 |
Comparing to | |
See all releases |
Code changes from version 1.7.2 to 1.7.3
- readme.txt +5 -1
- wp-accessibility-toolbar.php +35 -27
- wp-accessibility.php +2 -2
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: title, accessibility, accessible, navigation, wcag, a11y, section508, focu
|
|
5 |
Requires at least: 3.4.2
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.5
|
8 |
-
Stable tag: 1.7.
|
9 |
Text Domain: wp-accessibility
|
10 |
License: GPLv2 or later
|
11 |
|
@@ -74,6 +74,10 @@ The plug-in is intended to help with deficiencies commonly found in themes and t
|
|
74 |
|
75 |
[Suggest a change!](https://github.com/joedolson/wp-accessibility/issues/)
|
76 |
|
|
|
|
|
|
|
|
|
77 |
= 1.7.2 =
|
78 |
|
79 |
* Add style to div.aligncenter to control width
|
5 |
Requires at least: 3.4.2
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.5
|
8 |
+
Stable tag: 1.7.3
|
9 |
Text Domain: wp-accessibility
|
10 |
License: GPLv2 or later
|
11 |
|
74 |
|
75 |
[Suggest a change!](https://github.com/joedolson/wp-accessibility/issues/)
|
76 |
|
77 |
+
= 1.7.3 =
|
78 |
+
|
79 |
+
* Bug fix: script registration/enqueuing mis-ordered, breaking toolbar.
|
80 |
+
|
81 |
= 1.7.2 =
|
82 |
|
83 |
* Add style to div.aligncenter to control width
|
wp-accessibility-toolbar.php
CHANGED
@@ -22,52 +22,60 @@ function wpa_register_toolbar_widget() {
|
|
22 |
register_widget( 'Wp_Accessibility_Toolbar' );
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
add_action( 'wp_enqueue_scripts', 'wpa_toolbar_enqueue_scripts' );
|
26 |
/**
|
27 |
* Enqueue Toolbar scripts dependent on options.
|
28 |
*/
|
29 |
function wpa_toolbar_enqueue_scripts() {
|
30 |
wp_enqueue_script( 'jquery' );
|
31 |
-
if ( 'on' === get_option( 'wpa_toolbar' )
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
wp_localize_script( 'wpa-toolbar', 'wpa', wpa_toolbar_js() );
|
36 |
-
}
|
37 |
-
wp_enqueue_script( 'ui-a11y.js' );
|
38 |
-
$plugin_path = plugins_url( 'wp-accessibility/toolbar/css/a11y-contrast.css' );
|
39 |
-
if ( file_exists( get_stylesheet_directory() . '/a11y-contrast.css' ) ) {
|
40 |
-
$plugin_path = get_stylesheet_directory_uri() . '/a11y-contrast.css';
|
41 |
-
}
|
42 |
-
wp_localize_script( 'ui-a11y.js', 'a11y_stylesheet_path', $plugin_path );
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
$fontsize_stylesheet = ( 'on' === get_option( 'wpa_alternate_fontsize' ) ) ? 'a11y-fontsize-alt' : 'a11y-fontsize';
|
48 |
$fontsize = apply_filters( 'wpa_fontsize_css', plugins_url( 'toolbar/css/' . $fontsize_stylesheet . '.css', __FILE__ ) );
|
49 |
wp_register_style( 'ui-fontsize.css', $fontsize );
|
|
|
|
|
50 |
$toolbar_size = get_option( 'wpa_toolbar_size' );
|
51 |
$toolbar_size = ( false === stripos( $toolbar_size, 'em' ) ) ? $toolbar_size . 'px' : $toolbar_size;
|
52 |
// Only enable styles when required by options.
|
53 |
if ( get_option( 'wpa_toolbar_size' ) && 'on' === get_option( 'wpa_toolbar' ) ) {
|
54 |
-
wp_add_inline_style( 'ui-a11y
|
55 |
}
|
56 |
-
if (
|
57 |
-
wp_enqueue_style( 'ui-a11y
|
58 |
wp_enqueue_style( 'ui-fontsize.css' );
|
59 |
}
|
60 |
}
|
61 |
|
62 |
-
add_action( 'wp_enqueue_scripts', 'wpa_register_scripts' );
|
63 |
-
/**
|
64 |
-
* Register jQuery scripts.
|
65 |
-
*/
|
66 |
-
function wpa_register_scripts() {
|
67 |
-
wp_register_script( 'wpa-toolbar', plugins_url( 'wp-accessibility/js/wpa-toolbar.js' ), array( 'jquery' ), '1.0', true );
|
68 |
-
wp_register_script( 'ui-a11y.js', plugins_url( 'wp-accessibility/toolbar/js/a11y.js' ), array( 'jquery' ), '1.0', true );
|
69 |
-
}
|
70 |
-
|
71 |
add_shortcode( 'wpa_toolbar', 'wpa_toolbar_shortcode' );
|
72 |
/**
|
73 |
* Output Toolbar shortcode
|
22 |
register_widget( 'Wp_Accessibility_Toolbar' );
|
23 |
}
|
24 |
|
25 |
+
add_action( 'wp_enqueue_scripts', 'wpa_register_scripts' );
|
26 |
+
/**
|
27 |
+
* Register jQuery scripts.
|
28 |
+
*/
|
29 |
+
function wpa_register_scripts() {
|
30 |
+
wp_register_script( 'wpa-toolbar', plugins_url( 'wp-accessibility/js/wpa-toolbar.js' ), array( 'jquery' ), '1.0', true );
|
31 |
+
wp_register_script( 'ui-a11y', plugins_url( 'wp-accessibility/toolbar/js/a11y.js' ), array( 'jquery' ), '1.0', true );
|
32 |
+
}
|
33 |
+
|
34 |
add_action( 'wp_enqueue_scripts', 'wpa_toolbar_enqueue_scripts' );
|
35 |
/**
|
36 |
* Enqueue Toolbar scripts dependent on options.
|
37 |
*/
|
38 |
function wpa_toolbar_enqueue_scripts() {
|
39 |
wp_enqueue_script( 'jquery' );
|
40 |
+
if ( 'on' === get_option( 'wpa_toolbar' ) ) {
|
41 |
+
// Enqueue Toolbar JS if enabled.
|
42 |
+
wp_enqueue_script( 'wpa-toolbar' );
|
43 |
+
wp_localize_script( 'wpa-toolbar', 'wpa', wpa_toolbar_js() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
+
wp_enqueue_script( 'ui-a11y' );
|
46 |
+
|
47 |
+
// High Contrast CSS.
|
48 |
+
$plugin_path = plugins_url( 'wp-accessibility/toolbar/css/a11y-contrast.css' );
|
49 |
+
if ( file_exists( get_stylesheet_directory() . '/a11y-contrast.css' ) ) {
|
50 |
+
$plugin_path = get_stylesheet_directory_uri() . '/a11y-contrast.css';
|
51 |
+
}
|
52 |
+
wp_localize_script( 'ui-a11y', 'a11y_stylesheet_path', $plugin_path );
|
53 |
+
|
54 |
+
// Font files for toolbar.
|
55 |
+
wp_register_style( 'ui-font', plugins_url( 'toolbar/fonts/css/a11y-toolbar.css', __FILE__ ) );
|
56 |
+
|
57 |
+
// Toolbar CSS.
|
58 |
+
$toolbar_styles = apply_filters( 'wpa_toolbar_css', plugins_url( 'toolbar/css/a11y.css', __FILE__ ) );
|
59 |
+
wp_register_style( 'ui-a11y', $toolbar_styles, array( 'ui-font' ) );
|
60 |
+
|
61 |
+
// Font resizing stylesheet.
|
62 |
$fontsize_stylesheet = ( 'on' === get_option( 'wpa_alternate_fontsize' ) ) ? 'a11y-fontsize-alt' : 'a11y-fontsize';
|
63 |
$fontsize = apply_filters( 'wpa_fontsize_css', plugins_url( 'toolbar/css/' . $fontsize_stylesheet . '.css', __FILE__ ) );
|
64 |
wp_register_style( 'ui-fontsize.css', $fontsize );
|
65 |
+
|
66 |
+
// Control toolbar font size.
|
67 |
$toolbar_size = get_option( 'wpa_toolbar_size' );
|
68 |
$toolbar_size = ( false === stripos( $toolbar_size, 'em' ) ) ? $toolbar_size . 'px' : $toolbar_size;
|
69 |
// Only enable styles when required by options.
|
70 |
if ( get_option( 'wpa_toolbar_size' ) && 'on' === get_option( 'wpa_toolbar' ) ) {
|
71 |
+
wp_add_inline_style( 'ui-a11y', '.a11y-toolbar ul li button { font-size: ' . $toolbar_size . ' !important; }' );
|
72 |
}
|
73 |
+
if ( $toolbar_styles && $fontsize ) {
|
74 |
+
wp_enqueue_style( 'ui-a11y' );
|
75 |
wp_enqueue_style( 'ui-fontsize.css' );
|
76 |
}
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
add_shortcode( 'wpa_toolbar', 'wpa_toolbar_shortcode' );
|
80 |
/**
|
81 |
* Output Toolbar shortcode
|
wp-accessibility.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
* Domain Path: /lang
|
18 |
* License: GPL-2.0+
|
19 |
* License URI: http://www.gnu.org/license/gpl-2.0.txt
|
20 |
-
* Version: 1.7.
|
21 |
*/
|
22 |
|
23 |
/*
|
@@ -69,7 +69,7 @@ function wpa_admin_menu() {
|
|
69 |
* Install on activation.
|
70 |
*/
|
71 |
function wpa_install() {
|
72 |
-
$wpa_version = '1.7.
|
73 |
if ( 'true' !== get_option( 'wpa_installed' ) ) {
|
74 |
add_option( 'rta_from_nav_menu', 'on' );
|
75 |
add_option( 'rta_from_page_lists', 'on' );
|
17 |
* Domain Path: /lang
|
18 |
* License: GPL-2.0+
|
19 |
* License URI: http://www.gnu.org/license/gpl-2.0.txt
|
20 |
+
* Version: 1.7.3
|
21 |
*/
|
22 |
|
23 |
/*
|
69 |
* Install on activation.
|
70 |
*/
|
71 |
function wpa_install() {
|
72 |
+
$wpa_version = '1.7.3';
|
73 |
if ( 'true' !== get_option( 'wpa_installed' ) ) {
|
74 |
add_option( 'rta_from_nav_menu', 'on' );
|
75 |
add_option( 'rta_from_page_lists', 'on' );
|