wp_dashboard_recent_comments_control [ WordPress Function ]
wp_dashboard_recent_comments_control ( No parameters )
| Defined at: |
|
Benzer Fonksiyonlar: _wp_dashboard_recent_comments_row, wp_dashboard_recent_comments, wp_dashboard_rss_control, wp_dashboard_secondary_control, wp_dashboard_incoming_links_control
The recent comments dashboard widget control.
Source
<?php
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>';
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- PHPXRef 0.7 : WordPress : Detail view of dashboard.php
wp_dashboard_recent_comments_control() ...
phpxref.ftwr.co.uk - PHPXRef 0.7 : WordPress : /wp-admin/includes/dashboard.php source
... 'wp_dashboard_recent_comments_control' ); 55 } 56 57 // Incoming Links Widget 58 if ( is_blog_admin() && current_user_can('publish_posts') ) { 59 if ( ! isset( ...
phpxref.ftwr.co.uk - dashboard.php - PHP Cross Reference of WordPress Source - Yoast
wp_dashboard_recent_comments_control() ...
xref.yoast.com - Docs for page dashboard.php
since: 2.5.0. void wp_dashboard_recent_comments (). wp_dashboard_recent_comments_control (line 736). The recent comments dashboard widget control.
phpdoc.wordpress.org