{
},
});
};
+
const handlePositionChange = (event) => {
updateExactPosition(
mode,
@@ -92,6 +96,7 @@ const PositionControl = ({ type, disabled, mode }) => {
},
});
};
+
const handlePositionDirection = (event) => {
updateExactPosition(
mode,
@@ -110,6 +115,7 @@ const PositionControl = ({ type, disabled, mode }) => {
},
});
};
+
return (
{
>
{units[unitsIndex]}
+
+
);
diff --git a/modules/settings/components/settings-pointer.php b/modules/settings/components/settings-pointer.php
index f2f3273..fda85aa 100644
--- a/modules/settings/components/settings-pointer.php
+++ b/modules/settings/components/settings-pointer.php
@@ -25,7 +25,7 @@ public function admin_print_script() {
wp_enqueue_style( 'wp-pointer' );
wp_enqueue_script( 'wp-util' );
- $pointer_content = '' . esc_html__( 'One Click Accessibility', 'pojo-accessibility' ) . '
';
+ $pointer_content = '' . esc_html__( 'Web accessibility', 'pojo-accessibility' ) . '
';
$pointer_content .= '' . esc_html__( "Start setting up and customizing your site's accessibility widget.", 'pojo-accessibility' ) . '
';
$pointer_content .= sprintf(
@@ -54,8 +54,7 @@ public function admin_print_script() {
}
jQuery( document ).ready( function( $ ) {
- //TODO: Update page URL
- $( '#toplevel_page_accessibility-settings-2' ).pointer( {
+ $( '#toplevel_page_accessibility-settings' ).pointer( {
content: '',
pointerClass: 'ea11y-settings-pointer',
position: {
@@ -78,10 +77,9 @@ public function admin_print_script() {
}
false,
'exactPosition' => [
'horizontal' => [
- 'direction' => 'to-left',
+ 'direction' => 'left',
'value' => 10,
'unit' => 'px',
],
'vertical' => [
- 'direction' => 'higher',
+ 'direction' => 'top',
'value' => 10,
'unit' => 'px',
],
@@ -224,12 +224,12 @@ private function set_default_settings() : void {
'enableExactPosition' => false,
'exactPosition' => [
'horizontal' => [
- 'direction' => 'to-right',
+ 'direction' => 'right',
'value' => 10,
'unit' => 'px',
],
'vertical' => [
- 'direction' => 'lower',
+ 'direction' => 'bottom',
'value' => 10,
'unit' => 'px',
],
diff --git a/modules/widget/module.php b/modules/widget/module.php
index 955230f..0bac945 100644
--- a/modules/widget/module.php
+++ b/modules/widget/module.php
@@ -51,7 +51,6 @@ public function enqueue_accessibility_widget () : void {
'iconSettings' => get_option( 'ea11y_widget_icon_settings' ),
'toolsSettings' => get_option( 'ea11y_widget_menu_settings' ),
'accessibilityStatementURL' => $this->get_accessibility_statement_url(),
- 'widgetIconURL' => $this->get_widget_icon_url(),
]
);
}
@@ -64,35 +63,17 @@ public static function get_widget_url() : string {
return apply_filters( 'ea11y_widget_url', '' ); // TODO: add public url
}
- /**
- * Get widget icon URL
- * @return string
- */
- public function get_widget_icon_url() : string {
- $option = get_option( 'ea11y_widget_icon_settings' );
-
- if ( ! $option ) {
- return 'person';
- }
-
- $slug = 'person';
-
- if ( $option['style']['icon'] ) {
- $slug = $option['style']['icon'];
- }
-
- return EA11Y_ASSETS_URL . 'images/widget-icon-' . $slug . '.svg';
- }
-
/**
* Get accessibility statement URL
* @return string
*/
public function get_accessibility_statement_url() : string {
$option = get_option( 'ea11y_accessibility_statement_data' );
+
if ( ! empty( $option ) && ! $option['hideLink'] ) {
return $option['link'];
}
+
return '';
}
@@ -126,7 +107,6 @@ public function enqueue_accessibility_widget_admin ( $hook ) : void {
'preview' => true,
'previewContainer' => '#ea11y-widget-preview--container',
'apiKey' => $plan_data->public_api_key,
- 'widgetIconURL' => $this->get_widget_icon_url(),
'accessibilityStatementURL' => $this->get_accessibility_statement_url(),
]
);