Changeset 43537 for branches/4.9/src/wp-admin/includes/dashboard.php
- Timestamp:
- 07/26/2018 03:05:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9/src/wp-admin/includes/dashboard.php
r43523 r43537 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' ); … … 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' ); … … 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 $learnmore = sprintf( 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 /** 1716 * Filters the "Learn more" link in the Try Gutenberg panel. 1717 * 1718 * It allows hosts or site owners to change the link, to provide extra 1719 * information about Gutenberg, specific to their service. 1720 * 1721 * WARNING: This filter will only exist in the 4.9.x series, it will not be 1722 * added to WordPress 5.0 and later. 1723 * 1724 * @since 4.9.8 1725 */ 1726 echo apply_filters( 'try_gutenberg_learn_more_link', $learnmore ); 1727 ?> 1728 </p> 1729 </div> 1712 1730 </div> 1713 1731
Note: See TracChangeset
for help on using the changeset viewer.