Changeset 786541
- Timestamp:
- 10/11/2013 06:41:10 PM (12 years ago)
- Location:
- dashboard/trunk
- Files:
-
- 6 edited
-
activity.php (modified) (6 diffs)
-
css/activity.css (modified) (1 diff)
-
css/dash-rwd.css (modified) (1 diff)
-
dashboard-override.php (modified) (3 diffs)
-
dashboard.php (modified) (1 diff)
-
wpnews.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dashboard/trunk/activity.php
r786433 r786541 12 12 echo '<div id="activity-widget">'; 13 13 14 dash_show_published_posts( array(14 $future_posts = dash_show_published_posts( array( 15 15 'display' => 2, 16 16 'max' => 5, … … 19 19 'id' => 'future-posts', 20 20 ) ); 21 dash_show_published_posts( array(21 $recent_posts = dash_show_published_posts( array( 22 22 'display' => 2, 23 23 'max' => 5, … … 26 26 'id' => 'published-posts', 27 27 ) ); 28 dash_comments(); 28 $recent_comments = dash_comments(); 29 30 if ( !$future_posts && !$recent_posts && !$recent_comments ) { 31 echo '<div class="no-activity">'; 32 echo '<p class="smiley"></p>'; 33 echo '<p>' . __( 'No activity yet!' ) . '</p>'; 34 echo '</div>'; 35 } 29 36 30 37 echo '</div>'; … … 73 80 echo '</div>'; 74 81 82 } else { 83 return false; 75 84 } 76 85 77 86 wp_reset_postdata(); 78 87 88 return true; 79 89 } 80 90 … … 103 113 } 104 114 105 echo '<div id="latest-comments" class="activity-block">'; 106 echo '<h4>' . __( 'Comments' ) . '</h4>'; 115 107 116 108 117 if ( $comments ) { 118 echo '<div id="latest-comments" class="activity-block">'; 119 echo '<h4>' . __( 'Comments' ) . '</h4>'; 120 109 121 echo '<div id="the-comment-list" data-wp-lists="list:comment">'; 110 122 foreach ( $comments as $comment ) … … 117 129 wp_comment_reply( -1, false, 'dashboard', false ); 118 130 wp_comment_trashnotice(); 131 132 echo '</div>'; 119 133 } else { 120 echo '<p>' . __( 'No comments yet.' ) . '</p>';134 return false; 121 135 } 122 123 echo '</div>'; 124 136 return true; 125 137 } 126 138 -
dashboard/trunk/css/activity.css
r786433 r786541 114 114 margin: 4px 0 0 0; 115 115 } 116 117 #dashboard_activity .no-activity { 118 overflow: hidden; 119 padding: 0 12px 12px; 120 text-align: center; 121 } 122 123 #dashboard_activity .no-activity p { 124 color: #999; 125 font-size: 16px; 126 } 127 128 #dashboard_activity .no-activity .smiley { 129 margin-top: 0; 130 } 131 132 #dashboard_activity .no-activity .smiley:before { 133 content: '\f328'; 134 font: normal 120px/1 'dashicons'; 135 speak: none; 136 display: block; 137 margin: 0 5px 0 0; 138 padding: 0; 139 text-indent: 0; 140 text-align: center; 141 position: relative; 142 -webkit-font-smoothing: antialiased; 143 text-decoration: none !important; 144 } -
dashboard/trunk/css/dash-rwd.css
r786433 r786541 67 67 } 68 68 69 #dashboard-widgets-wrap { 70 overflow: hidden; 71 } 72 69 73 #dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container { 70 74 border: none !important; -
dashboard/trunk/dashboard-override.php
r786069 r786541 27 27 if ( current_user_can( 'install_plugins' ) ) 28 28 wp_enqueue_script( 'plugin-install' ); 29 if ( current_user_can( 'upload_files' ) )30 wp_enqueue_script( 'media-upload' );31 29 add_thickbox(); 32 30 … … 107 105 108 106 <div class="wrap"> 109 <?php screen_icon(); ?>110 <h2><?php $words = array( 'Hola', 'Bonjour', 'Aloha', 'Ahoy There', "G'day", "It's Go Time", 'Break a Leg', 'Go For Broke' ); echo esc_html( $words[ mt_rand( 0, count( $words) -1 ) ] ); ?></h2>107 <?php screen_icon(); ?> 108 <h2><?php $words = array( 'Hola', 'Bonjour', 'Aloha', 'Ahoy There', "G'day", "It's Go Time", 'Break a Leg', 'Go For Broke' ); echo esc_html( $words[ mt_rand( 0, count( $words) -1 ) ] ); ?></h2> 111 109 112 <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :110 <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) : 113 111 $classes = 'welcome-panel'; 114 112 … … 134 132 ?> 135 133 </div> 136 <?php endif; ?>134 <?php endif; ?> 137 135 138 <div id="dashboard-widgets-wrap"> 139 140 <?php wp_dashboard(); ?> 141 142 <div class="clear"></div> 143 </div><!-- dashboard-widgets-wrap --> 136 <div id="dashboard-widgets-wrap"> 137 <?php wp_dashboard(); ?> 138 </div><!-- dashboard-widgets-wrap --> 144 139 145 140 </div><!-- wrap --> -
dashboard/trunk/dashboard.php
r785653 r786541 39 39 include $module; 40 40 } 41 41 42 $this->screen = 'dashboard'; 42 43 } -
dashboard/trunk/wpnews.php
r784802 r786541 3 3 // Add the WordPress News widget to the dashboard 4 4 add_action( 'wp_dashboard_setup', 'add_wpnews_dashboard_widget' ); 5 6 5 function add_wpnews_dashboard_widget() { 7 6 if ( is_blog_admin() ) 7 // Note it would be ideal to have this loaded by default in the right column 8 // Currently there is no way to set a $location arg in wp_add_dashboard_widget() 9 // Would love to add that in core when merging this in. 8 10 wp_add_dashboard_widget( 'dashboard_rss', __( 'WordPress News' ), 'wp_dashboard_rss', 'wp_dashboard_news_feed_control' ); 9 11 }
Note: See TracChangeset
for help on using the changeset viewer.