$file_content ) { $filename = tc_filename( $file_path ); if ( preg_match( $php_regex, $file_content, $matches ) ) { $this->error[] = sprintf( '' . __( 'REQUIRED', 'theme-check').': ' . __( 'You are not allowed to hide the admin bar.', 'theme-check' ), '' . $filename . ''); $ret = false; } } //Check CSS Files for #wpadminbar foreach ( $css_files as $file_path => $file_content ) { $filename = tc_filename( $file_path ); if ( preg_match( $css_regex, $file_content, $matches ) ) { $this->error[] = sprintf( '' . __( 'WARNING', 'theme-check').': ' . __( 'The theme is using `#wpadminbar`. Hiding the admin bar is not allowed.', 'theme-check' ), '' . $filename . ''); } } return $ret; } function getError() { return $this->error; } } $themechecks[] = new NoHiddenAdminBar;