wp_dashboard_recent_comments_control

The timeline below displays how wordpress function wp_dashboard_recent_comments_control has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.4

/**
 * Deprecated dashboard recent comments control.
 *
 * @deprecated 3.8.0
 */
function wp_dashboard_recent_comments_control()
{
}

WordPress Version: 3.8

function wp_dashboard_recent_comments_control()
{
}

WordPress Version: 3.7

/**
 * The recent comments dashboard widget control.
 *
 * @since 3.0.0
 */
function wp_dashboard_recent_comments_control()
{
    if (!$widget_options = get_option('dashboard_widget_options')) {
        $widget_options = array();
    }
    if (!isset($widget_options['dashboard_recent_comments'])) {
        $widget_options['dashboard_recent_comments'] = array();
    }
    if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-recent-comments'])) {
        $number = absint($_POST['widget-recent-comments']['items']);
        $widget_options['dashboard_recent_comments']['items'] = $number;
        update_option('dashboard_widget_options', $widget_options);
    }
    $number = isset($widget_options['dashboard_recent_comments']['items']) ? (int) $widget_options['dashboard_recent_comments']['items'] : '';
    echo '<p><label for="comments-number">' . __('Number of comments to show:') . '</label>';
    echo '<input id="comments-number" name="widget-recent-comments[items]" type="text" value="' . $number . '" size="3" /></p>';
}