Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Tweaking html_encode_agent to return a browser name. Making icons sty…
Browse files Browse the repository at this point in the history
…le also use text style
  • Loading branch information
Divya Manian committed Feb 24, 2012
1 parent e919064 commit 6662a8a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions handler.methods.php
Expand Up @@ -327,6 +327,10 @@ function html_encode_agent(&$agent_string = '', &$agent_array, $requested_style_
}

$html .= '<a class="caniuse-agt' . $anchor_classes. '" href="' . @$agent_array['url'] . '" rel="external" target="_blank">';

if ($requested_style_string !== 'icon') {
$html .= '<span class="caniuse-agt-ttl">' . @$agent_array['name'] . '</span>';
}

$html .= '</a>';

Expand Down Expand Up @@ -364,14 +368,11 @@ function html_encode(&$return_array = array(), $requested_style_string = '', $re
}

if ($requested_style_boolean) {

if($request_style_string == 'text') {

$styles = @file_get_contents('css/text.css');

} else if($request_style_string == 'icon') {

$styles = @file_get_contents('css/icon.css');

} else {

$styles = @file_get_contents('css/text.css') . @file_get_contents('css/icon.css');
Expand Down

0 comments on commit 6662a8a

Please sign in to comment.