Skip to content

Commit a8da4fa

Browse files
committed
removed console.log, fixed function name
1 parent fec6885 commit a8da4fa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

a11y-add-on-for-facetwp.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: A11y Add-on for FacetWP
44
* Plugin URI: https://github.com/devcollaborative/A11y-Add-on-for-FacetWP
5-
* Description: Adds better a11y support to FacetWP plugin
5+
* Description: Adds better a11y support to FacetWP plugin. Disable FacetWP's native "Load a11y support"
66
* Version: 1.0
77
* Requires at least: 6.4
88
* Requires PHP: 8
@@ -54,6 +54,7 @@ function a11y_addon_facet_assets() {
5454
* @link https://facetwp.com/documentation/developers/output/facetwp_facet_html/
5555
*/
5656
function a11y_addon_add_facet_class( $output, $params ){
57+
5758
if ( 'dropdown' == $params['facet']['type'] ) {
5859
$output = str_replace( 'facetwp-dropdown', 'facetwp-dropdown a11y-addon-filter', $output );
5960
}
@@ -203,8 +204,6 @@ function remove_underscores( name ) {
203204
var facet_name = $facet.attr('data-name');
204205
var facet_type = $facet.attr('data-type');
205206

206-
console.log(facet_name);
207-
208207
if ( facet_name && facet_type ) {
209208
// Don't label the pagination or reset
210209
if ( facet_name.match(/pagination/g) ||
@@ -265,7 +264,7 @@ function a11y_addon_disable_auto_refresh() {
265264
add_action( 'facetwp_scripts', 'a11y_addon_disable_auto_refresh', 100 );
266265

267266
// Customize icon for prev/next pagination links.
268-
function fwp_facetwp_facet_pager_link($html, $params) {
267+
function a11y_addon_facetwp_facet_pager_link($html, $params) {
269268
if ( 'next' == $params['extra_class'] ) {
270269
$icon = 'Next <svg class="icon" aria-hidden="true"><use xlink:href="#caret-right"/></svg></svg>';
271270
$html = str_replace( 'Next', $icon, $html );

0 commit comments

Comments
 (0)