[wp-trac] [WordPress Trac] #16159: Default widgets "args" filters
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 20 11:29:21 UTC 2012
#16159: Default widgets "args" filters
------------------------------------+-----------------------------
Reporter: ramiy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Widgets | Version: 3.0.4
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+-----------------------------
Changes (by scribu):
* keywords: has-patch, dev-feedback => has-patch dev-feedback
* severity: major => normal
Old description:
> 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:__
>
> * '''Rrecentet Post widdet''' - new WP_Query( apply_filters(
> ''''widget_posts_args'''', array(...) );
>
> * '''Recentet Comments widdet''' - get_comments( apply_filters(
> ''''widget_comments_args'''', array(...) );
>
> This way i can add new arg to recentet-posts widget and recentet-comments
> widget using simple filters (i dont like installing plugins, i prefer
> filters).
New description:
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).
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16159#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list