Make WordPress Core

Ticket #48325: 48325.3.patch

File 48325.3.patch, 1.4 KB (added by Mista-Flo, 3 years ago)

Fix display of separator

  • .gitignore

    diff --git a/.gitignore b/.gitignore
    index 01757f7a0b..d2dc245bb0 100644
    a b wp-tests-config.php 
    7777
    7878# Files for local environment config
    7979/docker-compose.override.yml
     80
     81.idea
  • src/wp-includes/media-template.php

    diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
    index 0a07b5619f..b035648199 100644
    a b function wp_print_media_templates() { 
    511511                        </div>
    512512
    513513                        <div class="actions">
    514                                 <a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
    515                                 <# if ( data.can.save ) { #> |
     514                                <?php if ( ! apply_filters( 'disable_attachment_page_link', false ) ) : ?>
     515                                        <# if ( data.link ) { #>
     516                                                <a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
     517                                                <span class="links-separator">|</span>
     518                                        <# } #>
     519                                <?php endif; ?>
     520                                <# if ( data.can.save ) { #>
    516521                                        <a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a>
     522                                        <span class="links-separator">|</span>
    517523                                <# } #>
    518                                 <# if ( ! data.uploading && data.can.remove ) { #> |
     524                                <# if ( ! data.uploading && data.can.remove ) { #>
    519525                                        <?php if ( MEDIA_TRASH ) : ?>
    520526                                                <# if ( 'trash' === data.status ) { #>
    521527                                                        <button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>