Skip to content

Instantly share code, notes, and snippets.

@wpmu-authors
Created February 8, 2021 13:28
Show Gist options
  • Save wpmu-authors/7a4c867a7b70b9526ae96359c98d26aa to your computer and use it in GitHub Desktop.
Save wpmu-authors/7a4c867a7b70b9526ae96359c98d26aa to your computer and use it in GitHub Desktop.
example.php
function register_my_dashboard_widget() {
global $wp_meta_boxes;
wp_add_dashboard_widget(
'my_dashboard_widget',
'Publication Schedule',
'my_dashboard_widget_display'
);
$dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
$my_widget = array( 'my_dashboard_widget' => $dashboard['my_dashboard_widget'] );
unset( $dashboard['my_dashboard_widget'] );
$sorted_dashboard = array_merge( $my_widget, $dashboard );
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
}
add_action( 'wp_dashboard_setup', 'register_my_dashboard_widget' );
function my_dashboard_widget_display() {
?>
<p>
Don't forget that there are three slots for publication each day. <strong>8am, 1pm and 6pm</strong> EDT. Posts must be finalized 12 hours before their publication time. This includes final checks and proofreading.
</p>
<p>
For particularly time-sensitive posts please contact the editor in chief to make sure the required time does not conflict with any ongoing projects.
</p>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment