'number of visits' (sort by DESC)
function yourls_stats_countries_map( $countries ) {
yourls_do_action( 'stats_countries_map' );
// Echo static map. Will be hidden if JS
$map = array(
'cht' => 't',
'chs' => '440x220',
'chtm'=> 'world',
'chco'=> 'FFFFFF,88C0EB,2A85B3,1F669C',
'chld'=> join('' , array_keys( $countries ) ),
'chd' => 't:'. join(',' , $countries ),
'chf' => 'bg,s,EAF7FE'
);
$map_src = 'http://chart.apis.google.com/chart?' . http_build_query( $map );
//$map_src = yourls_match_current_protocol( $map_src, 'http://chart.apis.', 'https://www.' );
$static = "";
echo yourls_apply_filter( 'stats_countries_static', $static, $countries );
// Echo dynamic map. Will be hidden if no JS
$jsapi = yourls_match_current_protocol( 'http://www.google.com/jsapi' );
$dynamic = <<