Make WordPress Core

Opened 13 years ago

Last modified 4 months ago

#25616 new enhancement

Add a content length filter to wp_dashboard_recent_drafts()

Reported by: tenpura Owned by:
Priority: normal Milestone:
Component: Administration Version:
Severity: normal Keywords: dev-feedback has-patch
Cc: Focuses:

Description

It would be nice to be able to change the length of the recent drafts content via a filter. The fixed value of 10 is too short for character count based users.

Attachments (1)

25616.diff​ (996 bytes ) - added by tenpura 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ocean90
13 years ago

  • Keywords 2nd-opinion added; i18n removed

I dont't think a filter is necessary here. We could increase the default value to 20.

#2 @chriscct7
11 years ago

  • Keywords needs-refresh dev-feedback added; has-patch 2nd-opinion removed

This ticket was mentioned in ​PR #12434 on ​WordPress/wordpress-develop by ​@abcd95.


4 months ago
#3

  • Keywords has-patch added; needs-refresh removed

Trac ticket: https://core.trac.wordpress.org/ticket/25616

This PR introduces the dashboard_recent_drafts_word_length filter to the "Recent Drafts" dashboard widget.

Previously, the draft preview length was implicitly hardcoded to 10 words via the _x('10', 'draft_length') translation context. This severely limited content spacing. It also provided no intuitive way for theme/plugin developers to easily customize this layout.

The new filter behaves similarly to the standard excerpt_length filter, allowing developers to cleanly and safely adjust the draft preview length for their specific site's needs.

Note: See TracTickets for help on using tickets.