Making WordPress.org

Changeset 13046


Ignore:
Timestamp:
12/11/2023 05:37:57 AM (3 years ago)
Author:
tellyworth
Message:

Plugin Directory: fix confirmation dialog for preview toggle

Props mujuonly.
See #7251.

File:
1 edited

Legend:

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

    r13040 r13046  
    586586                _e( '<strong>Note:</strong> Missing or invalid blueprint.json file.', 'wporg-plugins' );
    587587                echo '</p></div>';
    588         }
    589 
    590         if ( $toggle_link ) {
     588        } elseif ( $toggle_link ) {
     589
     590                echo '<div class="plugin-notice notice notice-warning notice-alt"><p>';
     591                if ( 'enabled' === $preview_status ) {
     592                        _e( 'This will disable the Preview button for public users.', 'wporg-plugins' );
     593                } else {
     594                        _e( 'This will enable the Preview button for public users.', 'wporg-plugins' );
     595                }
     596
     597                echo '</p></div>';
     598
    591599                echo '<form method="POST" action="' . esc_url( $toggle_link ) . '" onsubmit="return confirm( jQuery(this).prev(\'.notice\').text() );">';
    592600                // Translators: %s is the plugin name, as defined by the plugin itself.
Note: See TracChangeset for help on using the changeset viewer.