Changeset 33072 for trunk/src/wp-admin/my-sites.php
- Timestamp:
- 07/03/2015 08:46:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/my-sites.php
r32974 r33072 69 69 choose_primary_blog(); 70 70 /** 71 * Fires before the sites tableon the My Sites screen.71 * Fires before the sites list on the My Sites screen. 72 72 * 73 73 * @since 3.0.0 … … 76 76 ?> 77 77 <br clear="all" /> 78 < table class="widefat fixedstriped">78 <ul class="my-sites striped"> 79 79 <?php 80 80 /** … … 92 92 $settings_html = apply_filters( 'myblogs_options', '', 'global' ); 93 93 if ( $settings_html != '' ) { 94 echo '< tr><td><h3>' . __( 'Global Settings' ) . '</h3></td><td>';94 echo '<h3>' . __( 'Global Settings' ) . '</h3>'; 95 95 echo $settings_html; 96 echo '</td></tr>';97 96 } 98 97 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 }111 98 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>"; 134 114 }?> 135 </ table>115 </ul> 136 116 <input type="hidden" name="action" value="updateblogsettings" /> 137 117 <?php wp_nonce_field( 'update-my-sites' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.