The WP ADA Compliance Check plugin includes the “wp_ada_compliance_change_the_content_callback” hook that can be used to change website content as the page loads. It supports a single parameter that is set to the page content. This filter is applied to the content after the WP ADA Compliance Check does its own filtering to allow you to over ride any changes that are made by the plugin. See below for a simple use example. Use of Simple HTML Dom which is built into the plugin or PHP DOM functions is suggested.
/**
* Filter content to correct additional issues
*/
function wp_ada_compliance_change_the_content_custom_filters($buffer){
// add custom filters here
$buffer = str_replace('test page 3
','test page 4
', $buffer);
return $buffer;
}
add_filter( 'wp_ada_compliance_change_the_content_callback', 'wp_ada_compliance_change_the_content_custom_filters', 10, 1 );