* Handles POST data, sets up filters.
*
* @since 2.5.0
+ *
+ * @global array $wp_registered_widgets
+ * @global array $wp_registered_widget_controls
+ * @global array $wp_dashboard_control_callbacks
*/
function wp_dashboard_setup() {
global $wp_registered_widgets, $wp_registered_widget_controls, $wp_dashboard_control_callbacks;
do_action( 'do_meta_boxes', $screen->id, 'side', '' );
}
+/**
+ *
+ * @global array $wp_dashboard_control_callbacks
+ *
+ * @param string $widget_id
+ * @param string $widget_name
+ * @param callback $callback
+ * @param callback $control_callback
+ * @param array $callback_args
+ */
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
$screen = get_current_screen();
global $wp_dashboard_control_callbacks;
add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args );
}
+/**
+ *
+ * @param type $dashboard
+ * @param type $meta_box
+ */
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
echo '<form method="post" class="dashboard-widget-control-form">';
wp_dashboard_trigger_widget_control( $meta_box['id'] );
<?php endif;
}
+/**
+ * @since 3.1.0
+ */
function wp_network_dashboard_right_now() {
$actions = array();
if ( current_user_can('create_sites') )
*
* @since 3.8.0
*
+ * @global int $post_ID
+ *
* @param string $error_msg Optional. Error message. Default false.
*/
function wp_dashboard_quick_press( $error_msg = false ) {
* Show recent drafts of the user on the dashboard.
*
* @since 2.7.0
+ *
+ * @param array $drafts
*/
function wp_dashboard_recent_drafts( $drafts = false ) {
if ( ! $drafts ) {
echo "</ul>\n</div>";
}
+/**
+ * @global object $comment
+ *
+ * @param object $comment
+ * @param bool $show_date
+ */
function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
$GLOBALS['comment'] =& $comment;
<?php if ( !$comment->comment_type || 'comment' == $comment->comment_type ) : ?>
- <div class="dashboard-comment-wrap">
+ <div class="dashboard-comment-wrap has-row-actions">
<h4 class="comment-meta">
<?php printf( /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */__( 'From %1$s on %2$s%3$s' ),
'<cite class="comment-author">' . get_comment_author_link() . '</cite>', $comment_post_link.' '.$comment_link, ' <span class="approve">' . __( '[Pending]' ) . '</span>' ); ?>
}
$type = esc_html( $type );
?>
- <div class="dashboard-comment-wrap">
+ <div class="dashboard-comment-wrap has-row-actions">
<?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?>
<h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link." ".$comment_link ); ?></h4>
<p class="comment-author"><?php comment_author_link(); ?></p>
$comments_query['status'] = 'approve';
while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) {
+ if ( ! is_array( $possible ) ) {
+ break;
+ }
foreach ( $possible as $comment ) {
if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) )
continue;
$check_urls = array( $widgets[$widget_id]['url'] );
}
- $cache_key = 'dash_' . md5( $widget_id );
+ $locale = get_locale();
+ $cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
if ( false !== ( $output = get_transient( $cache_key ) ) ) {
echo $output;
return true;
*
* @since 2.5.0
*
+ * @global array $wp_dashboard_control_callbacks
+ *
* @param int $widget_control_id Registered Widget ID.
*/
function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
</div>
<?php
}
-add_action( 'activity_box_end', 'wp_dashboard_quota' );
// Display Browser Nag Meta Box
function wp_dashboard_browser_nag() {
echo apply_filters( 'browse-happy-notice', $notice, $response );
}
+/**
+ * @since 3.2.0
+ *
+ * @param array $classes
+ * @return array
+ */
function dashboard_browser_nag_class( $classes ) {
$response = wp_check_browser_version();
*
* @since 3.2.0
*
+ * @global string $wp_version
+ *
* @return array|bool False on failure, array of browser data on success.
*/
function wp_check_browser_version() {