Making WordPress.org


Ignore:
Timestamp:
12/04/2023 04:42:52 AM (2 years ago)
Author:
tellyworth
Message:

Plugins: improved Test Preview button

This uses the new Playground blueprint-url param to pass the blueprint rather than a URL fragment.

Also, opens the preview in a new tab, as per suggestions.

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

    r12976 r12999  
    4343            <?php endif; ?>
    4444            <?php if ( current_user_can( 'plugin_admin_edit', $post ) && Template::is_preview_available() ) : ?>
    45                 <a class="plugin-preview button download-button button-large" href="<?php echo esc_html( Template::preview_link() ); ?>"><?php esc_html_e( 'Test Preview', 'wporg-plugins' ); ?></a>
     45                <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>
    4646            <?php endif; ?>
    4747        </div>
Note: See TracChangeset for help on using the changeset viewer.