WordPress.org

Make WordPress Core

Ticket #19570: 19570-icons.patch

File 19570-icons.patch, 3.2 KB (added by rachelbaker, 5 years ago)

Adding icons to Post Format UI tabs

  • wp-admin/css/wp-admin.css

     
    52885288        color: #464646;
    52895289}
    52905290
     5291.nav-tab-icon {
     5292        float: left;
     5293        display: block;
     5294        margin: 4px 4px 0 0;
     5295        overflow: hidden;
     5296}
     5297
     5298.icon-aside {
     5299  background: url('../images/post-formats-icons.png') -64px 0px no-repeat;
     5300  width: 15px;
     5301  height: 15px;
     5302}
     5303
     5304.icon-audio {
     5305  background: url('../images/post-formats-icons.png') -23px 0px no-repeat;
     5306  width: 17px;
     5307  height: 16px;
     5308}
     5309
     5310.icon-chat {
     5311  background: url('../images/post-formats-icons.png') 0px -20px no-repeat;
     5312  width: 16px;
     5313  height: 16px;
     5314}
     5315
     5316.icon-gallery {
     5317  background: url('../images/post-formats-icons.png') 0px -40px no-repeat;
     5318  width: 17px;
     5319  height: 14px;
     5320}
     5321
     5322.icon-image {
     5323  background: url('../images/post-formats-icons.png') -44px 0px no-repeat;
     5324  width: 16px;
     5325  height: 16px;
     5326}
     5327
     5328.icon-link {
     5329  background: url('../images/post-formats-icons.png') 0px 0px no-repeat;
     5330  width: 19px;
     5331  height: 16px;
     5332}
     5333
     5334.icon-quote {
     5335  background: url('../images/post-formats-icons.png') -21px -40px no-repeat;
     5336  width: 16px;
     5337  height: 14px;
     5338}
     5339
     5340.icon-standard {
     5341  background: url('../images/post-formats-icons.png') -64px -19px no-repeat;
     5342  width: 12px;
     5343  height: 16px;
     5344}
     5345
     5346.icon-status {
     5347  background: url('../images/post-formats-icons.png') -20px -20px no-repeat;
     5348  width: 16px;
     5349  height: 16px;
     5350}
     5351
     5352.icon-video {
     5353  background: url('../images/post-formats-icons.png') -44px -20px no-repeat;
     5354  width: 15px;
     5355  height: 16px;
     5356}
     5357
    52915358h2.nav-tab-wrapper, h3.nav-tab-wrapper {
    52925359        border-bottom-width: 1px;
    52935360        border-bottom-style: solid;
  • wp-admin/edit-form-advanced.php

     
    338338        echo '<h2 class="nav-tab-wrapper post-format-select">';
    339339
    340340        foreach ( $all_post_formats as $slug => $label ) {
     341                $icon = '<div class="nav-tab-icon icon-' . $slug . '"></div>';
     342
    341343                if ( $post_format == $slug )
    342                         $class = 'nav-tab nav-tab-active';
     344                        $class = 'nav-tab nav-tab-'. $slug . ' nav-tab-active';
    343345                else
    344                         $class = 'nav-tab';
     346                        $class = 'nav-tab nav-tab-'. $slug;
    345347
    346                 echo '<a class="' . $class . '" href="?format=' . $slug . '" data-wp-format="' . $slug . '">' . $label . '</a>';
     348                echo '<a class="' . $class . '" href="?format=' . $slug . '" data-wp-format="' . $slug . '">' . $icon . $label . '</a>';
    347349        }
    348350
    349351        echo '</h2>';
  • wp-admin/images/post-formats-icons.png

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream