Skip to content

Commit c5b3b26

Browse files
gnarfscottgonzalez
authored andcommitted
plugins.jquery.com: Add link to bug reports.
1 parent db6ec39 commit c5b3b26

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

themes/plugins.jquery.com/functions.php

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ function jq_plugin_repo_url() {
1414
return jq_plugin_meta( array( "key" => "repo_url" ) );
1515
}
1616

17+
function jq_plugin_bugs_url() {
18+
$manifest = jq_plugin_manifest();
19+
if ( empty( $manifest->bugs ) ) {
20+
return false;
21+
}
22+
return is_string( $manifest->bugs ) ? $manifest->bugs : $manifest->bugs->url;
23+
}
24+
1725
function jq_plugin_watchers() {
1826
return jq_plugin_meta( array( "key" => "watchers" ) );
1927
}

themes/plugins.jquery.com/sidebar-jquery_plugin.php

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<a class="other-link view-homepage" href="<?php echo jq_release_homepage(); ?>"><span class="icon-external-link"></span>View Homepage</a>
2020
<a class="other-link demo" href="<?php echo jq_release_demo(); ?>"><span class="icon-eye-open"></span>Try a Demo</a>
2121
<a class="other-link read-docs" href="<?php echo jq_release_docs(); ?>"><span class="icon-file"></span>Read the Docs</a>
22+
<?php if (jq_plugin_bugs_url()): ?>
23+
<a class="other-link bugs" href="<?php echo jq_plugin_bugs_url(); ?>"><span class="icon-flag"></span>Bug Reports</a>
24+
<?php endif ?>
2225
</div>
2326
</div>
2427
</aside>

0 commit comments

Comments
 (0)