Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only show publish promo to users that can publish

In our no-results template, there's no point in displaying a "publish your first post" promo to users that don't have the ability to publish posts since they can't act on it.
  • Loading branch information...
commit f00245be92d0cba86ace02176b016a55a8538a96 1 parent 7fef5cd
@mjangda mjangda authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  no-results.php
View
2  no-results.php
@@ -15,7 +15,7 @@
</header><!-- .entry-header -->
<div class="entry-content">
- <?php if ( is_home() ) : ?>
+ <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), admin_url( 'post-new.php' ) ); ?></p>
Please sign in to comment.
Something went wrong with that request. Please try again.