Make WordPress Core

Ticket #55557: 55557-permalink-tags.diff

File 55557-permalink-tags.diff, 2.1 KB (added by kebbet, 3 years ago)

Patch for permalink structure tags.

  • src/wp-admin/css/forms.css

    diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css
    index 6349c1e864..5cd5e918ab 100644
    a b table.form-table td .updated p { 
    10691069        vertical-align: middle;
    10701070}
    10711071
    1072 .form-table.permalink-structure .available-structure-tags li {
    1073         float: left;
    1074         margin-right: 5px;
     1072.form-table.permalink-structure .available-structure-tag-buttons {
     1073        display: flex;
     1074        flex-wrap: wrap;
     1075        margin-top: 6px;
     1076}
     1077
     1078.form-table.permalink-structure button:not(:last-child) {
     1079        margin-right: 8px;
     1080}
     1081
     1082.form-table.permalink-structure button {
     1083        margin-top: 8px;
    10751084}
    10761085
    10771086/*------------------------------------------------------------------------------
  • src/wp-admin/options-permalink.php

    diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php
    index 87191625c7..3d2ae4a955 100644
    a b $structures = array( 
    311311                                if ( ! empty( $available_tags ) ) :
    312312                                        ?>
    313313                                        <p><?php _e( 'Available tags:' ); ?></p>
    314                                         <ul role="list">
     314                                        <div class="available-structure-tag-buttons" role="list">
    315315                                                <?php
    316316                                                foreach ( $available_tags as $tag => $explanation ) {
    317317                                                        ?>
    318                                                         <li>
    319                                                                 <button type="button"
    320                                                                                 class="button button-secondary"
    321                                                                                 aria-label="<?php echo esc_attr( sprintf( $explanation, $tag ) ); ?>"
    322                                                                                 data-added="<?php echo esc_attr( sprintf( $structure_tag_added, $tag ) ); ?>"
    323                                                                                 data-used="<?php echo esc_attr( sprintf( $structure_tag_already_used, $tag ) ); ?>">
    324                                                                         <?php echo '%' . $tag . '%'; ?>
    325                                                                 </button>
    326                                                         </li>
     318                                                        <button type="button"
     319                                                                        class="button button-secondary"
     320                                                                        aria-label="<?php echo esc_attr( sprintf( $explanation, $tag ) ); ?>"
     321                                                                        data-added="<?php echo esc_attr( sprintf( $structure_tag_added, $tag ) ); ?>"
     322                                                                        data-used="<?php echo esc_attr( sprintf( $structure_tag_already_used, $tag ) ); ?>">
     323                                                                <?php echo '%' . $tag . '%'; ?>
     324                                                        </button>
    327325                                                        <?php
    328326                                                }
    329327                                                ?>
    330                                         </ul>
     328                                        </div>
    331329                                <?php endif; ?>
    332330                        </div>
    333331                </td>