Changeset 13040
- Timestamp:
- 12/08/2023 05:58:26 AM (14 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php
r12934 r13040 520 520 // Output the self close button. 521 521 the_plugin_self_close_button(); 522 523 // Output the toggle preview button. 524 the_plugin_self_toggle_preview_button(); 522 525 } 523 526 … … 570 573 571 574 echo '<h4>' . esc_html__( 'Toggle Live Preview', 'wporg-plugins' ) . '</h4>'; 572 $preview_status = get_post_meta( $post->ID, '_ no_preview', true ) ? 'disabled' : 'enabled';575 $preview_status = get_post_meta( $post->ID, '_public_preview', true ) ? 'enabled' : 'disabled'; 573 576 if ( 'enabled' === $preview_status ) { 574 577 echo '<p>' . esc_html__( 'The Live Preview link to Playground is currently enabled. Use the toggle button to disable it.', 'wporg-plugins' ) . '</p>'; … … 577 580 } 578 581 579 echo '<div class="plugin-notice notice notice-warning notice-alt"><p>'; 580 _e( '<strong>Note:</strong> This only affects the availability of the Live Preview button on the plugin page. It does not prevent a plugin from running in the Playground.', 'wporg-plugins' ); 581 echo '</p></div>'; 582 $blueprints = get_post_meta( $post->ID, 'assets_blueprints', true ); 583 584 if ( !isset( $blueprints[ 'blueprint.json' ] ) ) { 585 echo '<div class="plugin-notice notice notice-error notice-alt"><p>'; 586 _e( '<strong>Note:</strong> Missing or invalid blueprint.json file.', 'wporg-plugins' ); 587 echo '</p></div>'; 588 } 582 589 583 590 if ( $toggle_link ) { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
r12999 r13040 42 42 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php esc_html_e( 'Download', 'wporg-plugins' ); ?></a> 43 43 <?php endif; ?> 44 <?php if ( current_user_can( 'plugin_admin_edit', $post ) && Template::is_preview_available() ) : ?> 44 <?php if ( Template::is_preview_available() ) : ?> 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( 'Live Preview', 'wporg-plugins' ); ?></a> 46 <?php elseif ( current_user_can( 'plugin_admin_edit', $post ) && Template::preview_link() ) : ?> 45 47 <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> 46 48 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.