array(), 'title' => '', ); } $enabled = Registry::enabled_ids( 'server' ); $ctx = new Server\Context( $doc, $url, $enabled ); $checks = array( new Server\Images(), new Server\Structure(), new Server\Links(), new Server\Forms(), new Server\Aria(), new Server\Media(), new Server\Content(), ); /** * Filter the list of server-pass rule objects. Each needs a run( Context $c ) method. * * @param object[] $checks Rule objects. * @param Server\Context $ctx Context (document, url, add()). */ $checks = apply_filters( 'a11ymate_server_checks', $checks, $ctx ); foreach ( $checks as $check ) { if ( is_object( $check ) && method_exists( $check, 'run' ) ) { $check->run( $ctx ); } } $title = ''; $titles = $ctx->q( '/html/head/title' ); if ( $titles ) { $title = Html::clean( $titles[0]->textContent ); } return array( 'findings' => $ctx->findings, 'title' => $title, ); } }