Skip to content

Commit 425b269

Browse files
committed
plugins.jquery.com: Add conditionals around optional fields.
1 parent 1f1f0d6 commit 425b269

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

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

+11-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@
1616
<span class="inner-wrapper"><span class="icon-download-alt"></span>Download now</span>
1717
</a>
1818
<a class="other-link gh-fork" href="<?php echo jq_plugin_repo_url(); ?>"><span class="icon-github"></span>Fork on GitHub</a>
19-
<a class="other-link view-homepage" href="<?php echo jq_release_homepage(); ?>"><span class="icon-external-link"></span>View Homepage</a>
20-
<a class="other-link demo" href="<?php echo jq_release_demo(); ?>"><span class="icon-eye-open"></span>Try a Demo</a>
21-
<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>
19+
<?php if ( jq_release_homepage() ) : ?>
20+
<a class="other-link view-homepage" href="<?php echo jq_release_homepage(); ?>"><span class="icon-external-link"></span>View Homepage</a>
21+
<?php endif; ?>
22+
<?php if ( jq_release_demo() ) : ?>
23+
<a class="other-link demo" href="<?php echo jq_release_demo(); ?>"><span class="icon-eye-open"></span>Try a Demo</a>
24+
<?php endif; ?>
25+
<?php if ( jq_release_docs() ) : ?>
26+
<a class="other-link read-docs" href="<?php echo jq_release_docs(); ?>"><span class="icon-file"></span>Read the Docs</a>
27+
<?php endif; ?>
28+
<?php if ( jq_plugin_bugs_url() ): ?>
29+
<a class="other-link bugs" href="<?php echo jq_plugin_bugs_url(); ?>"><span class="icon-flag"></span>Bug Reports</a>
2430
<?php endif ?>
2531
</div>
2632
</div>

0 commit comments

Comments
 (0)