$num_tags = wp_count_terms('post_tag');
- $num_comm = wp_count_comments( );
+ $num_comm = wp_count_comments();
echo "\n\t".'<div class="table table_content">';
echo "\n\t".'<p class="sub">' . __('Content') . '</p>'."\n\t".'<table>';
$url = get_edit_post_link( $draft->ID );
$title = _draft_or_post_title( $draft->ID );
$item = "<h4><a href='$url' title='" . sprintf( __( 'Edit “%s”' ), esc_attr( $title ) ) . "'>" . esc_html($title) . "</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';
- if ( $the_content = preg_split( '#[\r\n\t ]#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
- $item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '</p>';
+ if ( $the_content = wp_trim_words( $draft->post_content, 10 ) )
+ $item .= '<p>' . $the_content . '</p>';
$list[] = $item;
}
?>
$publisher = "<strong>$publisher</strong>";
$content = $item->get_content();
- $content = wp_html_excerpt($content, 50) . ' ...';
+ $content = wp_html_excerpt( $content, 50, ' …' );
if ( $link )
/* translators: incoming links feed, %1$s is other person, %3$s is content */
}
/**
- * {@internal Missing Short Description}}
+ * Display primary dashboard RSS widget feed.
*
* @since 2.5.0
*
function wp_dashboard_plugins() {
wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(
- 'http://wordpress.org/extend/plugins/rss/browse/popular/',
- 'http://wordpress.org/extend/plugins/rss/browse/new/'
+ 'http://wordpress.org/plugins/rss/browse/popular/',
+ 'http://wordpress.org/plugins/rss/browse/new/'
) );
}
* @since 2.5.0
*/
function wp_dashboard_plugins_output() {
- $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' );
- $new = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' );
+ $popular = fetch_feed( 'http://wordpress.org/plugins/rss/browse/popular/' );
+ $new = fetch_feed( 'http://wordpress.org/plugins/rss/browse/new/' );
if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
$plugin_slugs = array_keys( get_plugins() );
$widget_options[$widget_id]['number'] = $number;
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) {
- $_POST['widget-rss'][$number] = stripslashes_deep( $_POST['widget-rss'][$number] );
+ $_POST['widget-rss'][$number] = wp_unslash( $_POST['widget-rss'][$number] );
$widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] );
// title is optional. If black, fill it if possible
if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) {
wp_widget_rss_form( $widget_options[$widget_id], $form_inputs );
}
-// Display File upload quota on dashboard
+/**
+ * Display file upload quota on dashboard.
+ *
+ * Runs on the activity_box_end hook in wp_dashboard_right_now().
+ *
+ * @since 3.0.0
+ *
+ * @return bool True if not multisite, user can't upload files, or the space check option is disabled.
+*/
function wp_dashboard_quota() {
if ( !is_multisite() || !current_user_can('upload_files') || get_site_option( 'upload_space_check_disabled' ) )
return true;