Skip to content

Commit

Permalink
Handle empty strings in toolbar attach point option
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 28, 2022
1 parent f5e530a commit a50fd66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-accessibility-toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function wpa_toolbar_html( $type = 'widget', $control = 'button' ) {
* Generate Toolbar variables for localization in JS.
*/
function wpa_toolbar_js() {
$default = ( false !== (bool) get_option( 'wpa_toolbar_default' ) ) ? get_option( 'wpa_toolbar_default' ) : 'body';
$default = ( false !== (bool) trim( get_option( 'wpa_toolbar_default' ) ) ) ? get_option( 'wpa_toolbar_default' ) : 'body';
$location = apply_filters( 'wpa_move_toolbar', $default );
$is_rtl = ( is_rtl() ) ? 'rtl' : 'ltr';
$is_right = ( 'on' === get_option( 'wpa_toolbar_right' ) ) ? 'right' : 'left';
Expand Down

0 comments on commit a50fd66

Please sign in to comment.