Make WordPress Core

Ticket #29989: 29989.diff

File 29989.diff, 5.7 KB (added by wonderboymusic, 8 years ago)
  • src/wp-admin/css/edit.css

     
    12871287        transition-timing-function: ease-in-out;
    12881288}
    12891289
     1290.button-split-wrap {
     1291        display: none;
     1292}
     1293
    12901294/* =Media Queries
    12911295-------------------------------------------------------------- */
    12921296
     
    15741578                padding: 0 10px 0 10px;
    15751579        }
    15761580}
     1581
     1582@media only screen and (max-width: 480px) {
     1583
     1584        #edit-slug-box {
     1585                padding: 0;
     1586                min-height: 0;
     1587        }
     1588
     1589        .edit-slug-box:after { /* clearfix */
     1590                content: "";
     1591                display: table;
     1592                clear: both;
     1593        }
     1594
     1595        .edit-slug-box strong,
     1596        #sample-permalink {
     1597                display: none;
     1598        }
     1599
     1600        .edit-slug-buttons,
     1601        .view-post-btn {
     1602                vertical-align: middle;
     1603        }
     1604
     1605        .edit-slug-buttons {
     1606                float: left;
     1607        }
     1608
     1609        .view-post-btn {
     1610                float: right;
     1611        }
     1612
     1613        .edit-slug-buttons .edit-slug.button {
     1614                margin-bottom: 0;
     1615        }
     1616
     1617        #wp-content-editor-tools {
     1618                padding-top: 0;
     1619        }
     1620
     1621        .wp-media-buttons {
     1622                margin: 1em 0;
     1623        }
     1624
     1625        .wp-media-buttons .button {
     1626                display: block;
     1627                text-align: center;
     1628        }
     1629
     1630        .button-split-wrap {
     1631                display: block;
     1632        }
     1633
     1634        #insert-media-button {
     1635                display: none;
     1636        }
     1637
     1638        .button-split-wrap:after {
     1639                content: "";
     1640                display: table;
     1641                clear: both;
     1642        }
     1643
     1644        .button-split-wrap .button {
     1645                display: inline-block;
     1646                line-height: 2em;
     1647        }
     1648
     1649        .button.button-split-main {
     1650                float: left;
     1651                width: 85%;
     1652                border-right: none;
     1653                border-top-right-radius: 0;
     1654                border-bottom-right-radius: 0;
     1655        }
     1656
     1657        .button.button-split-side {
     1658                float: right;
     1659                width: 15%;
     1660                border-top-left-radius: 0;
     1661                border-bottom-left-radius: 0;
     1662        }
     1663
     1664        .button-split-side:before {
     1665                content: '\f140';
     1666                display: inline-block;
     1667                position: relative;
     1668                top: 0.2em;
     1669                font-family: 'dashicons';
     1670                font-size: 20px;
     1671                line-height: 0.5em;
     1672                color: #888;
     1673                speak: none;
     1674                -webkit-font-smoothing: antialiased;
     1675                -moz-osx-font-smoothing: grayscale;
     1676        }
     1677}
     1678 No newline at end of file
  • src/wp-admin/edit-form-advanced.php

     
    582582if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) {
    583583        $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
    584584?>
    585         <div id="edit-slug-box" class="hide-if-no-js">
     585        <div id="edit-slug-box" class="edit-slug-box hide-if-no-js">
    586586        <?php
    587587                if ( $has_sample_permalink )
    588588                        echo $sample_permalink_html;
  • src/wp-admin/includes/post.php

     
    13241324                $return =  '<strong>' . __( 'Permalink:' ) . "</strong>\n";
    13251325                $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
    13261326                $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    1327                 $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __( 'Edit' ) . "</a></span>\n";
     1327                $return .= '<span id="edit-slug-buttons" class="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small button-link hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __( 'Edit' ) . "</a></span>\n";
    13281328                $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    13291329        }
    13301330
     
    13321332                if ( 'draft' == $post->post_status || 'pending' == $post->post_status ) {
    13331333                        $draft_link = set_url_scheme( get_permalink( $post->ID ) );
    13341334                        $preview_link = get_preview_post_link( $post, array(), $draft_link );
    1335                         $return .= "<span id='view-post-btn'><a href='" . esc_url( $preview_link ) . "' class='button button-small' target='wp-preview-{$post->ID}'>$view_post</a></span>\n";
     1335                        $return .= '<span id="view-post-btn" class="view-post-btn"><a href="' . esc_url( $preview_link ) . '" class="button button-small button-link" target="wp-preview-' . $post->ID . '">' . $view_post . "</a></span>\n";
    13361336                } else {
    13371337                        if ( 'publish' === $post->post_status ) {
    13381338                                // View Post button should always go to the saved permalink.
  • src/wp-includes/class-wp-editor.php

     
    219219                                 *
    220220                                 * @param string $editor_id Unique editor identifier, e.g. 'content'.
    221221                                 */
    222                                 do_action( 'media_buttons', $editor_id );
    223                                 echo "</div>\n";
     222                                do_action( 'media_buttons', $editor_id ); ?>
     223                                <div class="button-split-wrap">
     224                                        <button class="button button-split-main insert-media add_media" data-editor="content" title="Add Media">
     225                                                <span class="wp-media-buttons-icon"></span> Add Media
     226                                        </button>
     227                                        <button class="button button-split-side"></button>
     228                                </div>
     229                                <?php echo "</div>\n";
    224230                        }
    225231
    226232                        echo '<div class="wp-editor-tabs">' . $buttons . "</div>\n";
  • src/wp-includes/css/editor.css

     
    17091709        }
    17101710}
    17111711
     1712@media screen and ( max-width: 480px ) {
     1713        .wp-media-buttons,
     1714        .wp-editor-tabs {
     1715                float: none;
     1716        }
     1717
     1718        .wp-media-buttons .button {
     1719                margin-right: 0;
     1720        }
     1721
     1722        button.wp-switch-editor {
     1723                display: block;
     1724                width: 42.3%;
     1725                margin: 0;
     1726                padding: 2.4% 3.5%;
     1727        }
     1728}
     1729
    17121730/* =Overlay Body
    17131731-------------------------------------------------------------- */
    17141732