Browse Source

Additional CSS classes

widget
Lee Willis 12 years ago
parent
commit
f504641a2f
  1. 6
      github-embed.php

6
github-embed.php

@ -195,7 +195,7 @@ class github_embed {
$response->title = $repo->description; $response->title = $repo->description;
// @TODO This should all be templated // @TODO This should all be templated
$response->html = '<div class="github-embed">'; $response->html = '<div class="github-embed github-embed-repository">';
$response->html .= '<p><a href="'.esc_attr($repo->html_url).'" target="_blank"><strong>'.esc_html($repo->description)."</strong></a><br/>"; $response->html .= '<p><a href="'.esc_attr($repo->html_url).'" target="_blank"><strong>'.esc_html($repo->description)."</strong></a><br/>";
$response->html .= '<a href="'.esc_attr($repo->html_url).'" target="_blank">'.esc_html($repo->html_url)."</a><br/>"; $response->html .= '<a href="'.esc_attr($repo->html_url).'" target="_blank">'.esc_html($repo->html_url)."</a><br/>";
$response->html .= esc_html($repo->forks_count)." forks.<br/>"; $response->html .= esc_html($repo->forks_count)." forks.<br/>";
@ -263,9 +263,11 @@ class github_embed {
$response->title = $owner_info->name; $response->title = $owner_info->name;
// @TODO This should all be templated // @TODO This should all be templated
$response->html = '<p><a href="https://github.com/'.esc_attr($owner).'" target="_blank"><strong>'.esc_html($owner)."</strong></a><br/>"; $response->html = '<div class="github-embed github-embed-user">';
$response->html .= '<p><a href="https://github.com/'.esc_attr($owner).'" target="_blank"><strong>'.esc_html($owner)."</strong></a><br/>";
$response->html .= esc_html($owner_info->public_repos).' repositories, '; $response->html .= esc_html($owner_info->public_repos).' repositories, ';
$response->html .= esc_html($owner_info->followers).' followers.</p>'; $response->html .= esc_html($owner_info->followers).' followers.</p>';
$response->html .= '</div>';
header ( 'Content-Type: application/json' ); header ( 'Content-Type: application/json' );
echo json_encode ( $response ); echo json_encode ( $response );

Loading…
Cancel
Save