Make WordPress Core

Ticket #31685: 31685.2.diff

File 31685.2.diff, 3.6 KB (added by boonebgorges, 10 years ago)
  • src/wp-admin/css/common.css

    diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
    index 6a1e9d7..5a8db8a 100644
    div#widgets-right .widget-top:hover, 
    630630}
    631631
    632632.striped > tbody > :nth-child(odd),
     633ul.striped > :nth-child(odd),
    633634.alternate {
    634635        background-color: #f9f9f9;
    635636}
    img { 
    29752976        border-bottom: 1px solid #dfdfdf;
    29762977}
    29772978
     2979/* My Sites */
     2980.my-sites {
     2981        background: #fff;
     2982}
     2983
     2984.my-sites li {
     2985        display: block;
     2986        padding: 8px 10px;
     2987        margin: 0;
     2988}
     2989
     2990.my-sites li a {
     2991        text-decoration: none;
     2992}
     2993
    29782994/* =Media Queries
    29792995-------------------------------------------------------------- */
    29802996
  • src/wp-admin/my-sites.php

    diff --git src/wp-admin/my-sites.php src/wp-admin/my-sites.php
    index 743b847..7a84792 100644
    else : 
    6868        <?php
    6969        choose_primary_blog();
    7070        /**
    71          * Fires before the sites table on the My Sites screen.
     71         * Fires before the sites list on the My Sites screen.
    7272         *
    7373         * @since 3.0.0
    7474         */
    7575        do_action( 'myblogs_allblogs_options' );
    7676        ?>
    7777        <br clear="all" />
    78         <table class="widefat fixed striped">
     78        <ul class="my-sites striped">
    7979        <?php
    8080        /**
    8181         * Enable the Global Settings section on the My Sites screen.
    else : 
    9191         */
    9292        $settings_html = apply_filters( 'myblogs_options', '', 'global' );
    9393        if ( $settings_html != '' ) {
    94                 echo '<tr><td><h3>' . __( 'Global Settings' ) . '</h3></td><td>';
     94                echo '<h3>' . __( 'Global Settings' ) . '</h3>';
    9595                echo $settings_html;
    96                 echo '</td></tr>';
    9796        }
    9897        reset( $blogs );
    99         $num = count( $blogs );
    100         $cols = 1;
    101         if ( $num >= 20 )
    102                 $cols = 4;
    103         elseif ( $num >= 10 )
    104                 $cols = 2;
    105         $num_rows = ceil( $num / $cols );
    106         $split = 0;
    107         for ( $i = 1; $i <= $num_rows; $i++ ) {
    108                 $rows[] = array_slice( $blogs, $split, $cols );
    109                 $split = $split + $cols;
    110         }
    11198
    112         foreach ( $rows as $row ) {
    113                 echo "<tr>";
    114                 $i = 0;
    115                 foreach ( $row as $user_blog ) {
    116                         $s = $i == 3 ? '' : 'border-right: 1px solid #ccc;';
    117                         echo "<td style='$s'>";
    118                         echo "<h3>{$user_blog->blogname}</h3>";
    119                         /**
    120                          * Filter the row links displayed for each site on the My Sites screen.
    121                          *
    122                          * @since MU
    123                          *
    124                          * @param string $string    The HTML site link markup.
    125                          * @param object $user_blog An object containing the site data.
    126                          */
    127                         echo "<p>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
    128                         /** This filter is documented in wp-admin/my-sites.php */
    129                         echo apply_filters( 'myblogs_options', '', $user_blog );
    130                         echo "</td>";
    131                         $i++;
    132                 }
    133                 echo "</tr>";
     99        foreach ( $blogs as $user_blog ) {
     100                echo "<li>";
     101                echo "<h3>{$user_blog->blogname}</h3>";
     102                /**
     103                 * Filter the row links displayed for each site on the My Sites screen.
     104                 *
     105                 * @since MU
     106                 *
     107                 * @param string $string    The HTML site link markup.
     108                 * @param object $user_blog An object containing the site data.
     109                 */
     110                echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
     111                /** This filter is documented in wp-admin/my-sites.php */
     112                echo apply_filters( 'myblogs_options', '', $user_blog );
     113                echo "</li>";
    134114        }?>
    135         </table>
     115        </ul>
    136116        <input type="hidden" name="action" value="updateblogsettings" />
    137117        <?php wp_nonce_field( 'update-my-sites' ); ?>
    138118        <?php submit_button(); ?>