Making WordPress.org


Ignore:
Timestamp:
12/15/2023 03:08:48 AM (9 months ago)
Author:
tellyworth
Message:

Plugin Directory: fix button text for Test Preview

Props @jeffpaul.
See #7251.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r13040 r13061  
    4444            <?php if ( Template::is_preview_available() ) : ?>
    4545                <a class="plugin-preview button download-button button-large" target="_blank" href="<?php echo esc_attr( add_query_arg( array( 'preview' => 1 ), get_the_permalink() ) ); ?>"><?php esc_html_e( 'Live Preview', 'wporg-plugins' ); ?></a>
    46             <?php elseif ( current_user_can( 'plugin_admin_edit', $post ) && Template::preview_link() ) : ?>
     46            <?php elseif ( Template::preview_link() && Template::is_preview_available( $post, 'edit' ) ) : ?>
    4747                <a class="plugin-preview button download-button button-large" target="_blank" href="<?php echo esc_attr( add_query_arg( array( 'preview' => 1 ), get_the_permalink() ) ); ?>"><?php esc_html_e( 'Test Preview', 'wporg-plugins' ); ?></a>
    4848            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.