diff --git a/themes/jquery/functions.jquery.php b/themes/jquery/functions.jquery.php index 5339acbb..3ff779c6 100644 --- a/themes/jquery/functions.jquery.php +++ b/themes/jquery/functions.jquery.php @@ -96,4 +96,12 @@ function jq_page_links_for_category( $category ) { return $ret; } +function jq_get_github_url() { + global $post; + $source_path = get_post_meta( $post->ID, "source_path" )[0]; + $github_prefix = 'https://github.com/jquery/'.get_stylesheet().'/tree/master/'.$source_path; + + return $github_prefix; +} + ?> diff --git a/themes/jquery/page.php b/themes/jquery/page.php index d63acae4..158fb5f3 100755 --- a/themes/jquery/page.php +++ b/themes/jquery/page.php @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/themes/learn.jquery.com/page.php b/themes/learn.jquery.com/page.php index c6b09390..f855ba3d 100644 --- a/themes/learn.jquery.com/page.php +++ b/themes/learn.jquery.com/page.php @@ -11,7 +11,9 @@ - +