Opened 16 years ago
Closed 15 years ago
#16159 closed enhancement (fixed)
Default widgets "args" filters
| Reported by: | ramiy | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Widgets | Version: | 3.0.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description (last modified by )
Not all WordPress default widgets has arguments filter. For example, recentet-posts and recentet-comments has no arguments filte.
Current arg Filters:
- Pages widget - wp_list_pages( apply_filters( 'widget_pages_args', array(...) );
- Links widget - wp_list_bookmarks( apply_filters( 'widget_links_args', array(...) );
- Archives widget - wp_get_archives( apply_filters( 'widget_archives_args', array(...) );
- Tag Cloud widget - wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(...) );
New arg Filters:
- Recent Post widget -
new WP_Query( apply_filters( ''''widget_posts_args'''', array(...) );
- Recent Comments widget -
get_comments( apply_filters( ''''widget_comments_args'''', array(...) );
This way i can add new arg to recent-posts widget and recent-comments widget using simple filters (i dont like installing plugins, i prefer filters).
Attachments (2)
Change History (8)
#3
@
15 years ago
- Description modified (diff)
- Keywords has-patch, dev-feedback → has-patch dev-feedback
- Severity major → normal
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Would it also be useful to pass those filters the
$argsand/or$instancevariables?