WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 67 | * @since Twenty Fourteen 1.0 |
| 68 | * |
| 69 | * @param array $args An array of standard parameters for widgets in this theme. |
| 70 | * @param array $instance An array of settings for this widget instance. |
| 71 | * @return void Echoes its output. |
| 72 | */ |
| 73 | public function widget( $args, $instance ) { |
| 74 | $format = $instance['format']; |
| 75 | $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); |
| 76 | $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $this->format_strings[ $format ] : $instance['title'], $instance, $this->id_base ); |
| 77 | |
| 78 | $ephemera = new WP_Query( array( |
| 79 | 'order' => 'DESC', |
| 80 | 'posts_per_page' => $number, |
| 81 | 'no_found_rows' => true, |
| 82 | 'post_status' => 'publish', |
| 83 | 'post__not_in' => get_option( 'sticky_posts' ), |
| 84 | 'tax_query' => array( |
| 85 | array( |