wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_dashboard_site_activity › WordPress Function
Seit3.8.0
Veraltetn/v
› wp_dashboard_site_activity ( Keine Parameter )
| Definiert in: |
|
| Codex: |
Outputs the Activity widget.
Callback function for {@see 'dashboard_activity'}.Ähnliche Funktionen: wp_dashboard_site_health, wp_dashboard_empty, wp_dashboard_setup, wp_dashboard_secondary, wp_dashboard_primary
Quellcode
function wp_dashboard_site_activity() {
echo '<div id="activity-widget">';
$future_posts = wp_dashboard_recent_posts(
array(
'max' => 5,
'status' => 'future',
'order' => 'ASC',
'title' => __( 'Publishing Soon' ),
'id' => 'future-posts',
)
);
$recent_posts = wp_dashboard_recent_posts(
array(
'max' => 5,
'status' => 'publish',
'order' => 'DESC',
'title' => __( 'Recently Published' ),
'id' => 'published-posts',
)
);
$recent_comments = wp_dashboard_recent_comments();
if ( ! $future_posts && ! $recent_posts && ! $recent_comments ) {
echo '<div class="no-activity">';
echo '<p>' . __( 'No activity yet!' ) . '</p>';
echo '</div>';
}
echo '</div>';
}