Ticket #41316: 41316.19.diff
File 41316.19.diff, 4.1 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/dashboard.css
127 127 .try-gutenberg-panel h3 { 128 128 margin: 17px 0 0; 129 129 font-size: 16px; 130 line-height: 1.4em; 130 131 } 131 132 132 133 .welcome-panel li, -
src/wp-admin/includes/dashboard.php
1632 1632 1633 1633 if ( current_user_can( 'install_plugins' ) ) { 1634 1634 if ( empty( $plugins['gutenberg/gutenberg.php'] ) ) { 1635 $action = __( 'Install Gutenberg' ); 1636 $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=gutenberg' ), 'install-plugin_gutenberg' ); 1637 $classes = ' install-now'; 1635 if ( get_filesystem_method( array(), WP_PLUGIN_DIR ) === 'direct' ) { 1636 $action = __( 'Install Gutenberg' ); 1637 $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=gutenberg' ), 'install-plugin_gutenberg' ); 1638 $classes = ' install-now'; 1639 } 1638 1640 } else if ( is_plugin_inactive( 'gutenberg/gutenberg.php' ) ) { 1639 1641 $action = __( 'Activate Gutenberg' ); 1640 1642 $url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=gutenberg/gutenberg.php&from=try-gutenberg' ), 'activate-plugin_gutenberg/gutenberg.php' ); … … 1642 1644 } 1643 1645 1644 1646 if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) { 1645 $classic_action = __( 'Install the Classic Editor' ); 1646 $classic_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=classic-editor' ), 'install-plugin_classic-editor' ); 1647 $classic_classes = ' install-now'; 1647 if ( get_filesystem_method( array(), WP_PLUGIN_DIR ) === 'direct' ) { 1648 $classic_action = __( 'Install the Classic Editor' ); 1649 $classic_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=classic-editor' ), 'install-plugin_classic-editor' ); 1650 $classic_classes = ' install-now'; 1651 } 1648 1652 } else if ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) { 1649 1653 $classic_action = __( 'Activate the Classic Editor' ); 1650 1654 $classic_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php&from=try-gutenberg' ), 'activate-plugin_classic-editor/classic-editor.php' ); … … 1695 1699 </p> 1696 1700 </div> 1697 1701 1702 <div class="try-gutenberg-action"> 1698 1703 <?php if ( $action ) { ?> 1699 <div class="try-gutenberg-action"> 1700 <p><a class="button button-primary button-hero<?php echo $classes; ?>" href="<?php echo esc_url( $url ); ?>" data-name="<?php esc_attr_e( 'Gutenberg' ); ?>" data-slug="gutenberg"><?php echo $action; ?></a></p> 1701 <p> 1702 <?php 1703 printf( 1704 /* translators: Link to https://wordpress.org/gutenberg/ */ 1705 __( '<a href="%s">Learn more about Gutenberg</a>' ), 1706 __( 'https://wordpress.org/gutenberg/' ) 1707 ); 1708 ?> 1709 </p> 1710 </div> 1704 <p><a class="button button-primary button-hero<?php echo $classes; ?>" href="<?php echo esc_url( $url ); ?>" data-name="<?php esc_attr_e( 'Gutenberg' ); ?>" data-slug="gutenberg"><?php echo $action; ?></a></p> 1711 1705 <?php } ?> 1706 1707 <p> 1708 <?php 1709 printf( 1710 /* translators: Link to https://wordpress.org/gutenberg/ */ 1711 __( '<a href="%s">Learn more about Gutenberg</a>' ), 1712 __( 'https://wordpress.org/gutenberg/' ) 1713 ); 1714 ?> 1715 </p> 1716 1717 <?php 1718 /** 1719 * This action fires after the "Install Gutenberg" button is displayed. 1720 * 1721 * It allows hosts or site owners to add links to extra information about 1722 * Gutenberg, specific to their service. 1723 * 1724 * WARNING: This action will only exist in the 4.9.x series, it will not be 1725 * added to WordPress 5.0 and later. 1726 * 1727 * @since 4.9.8 1728 */ 1729 do_action( 'try_gutenberg_after_install_button' ); 1730 ?> 1731 </div> 1712 1732 </div> 1713 1733 1714 1734 <div class="try-gutenberg-panel-column plugin-card-classic-editor">