Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_calendar_args

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2285       * @param array $args {
2286       *     Optional. Arguments for the `get_calendar` function.
2287       *
2288       *     @type bool   $initial   Whether to use initial calendar names. Default true.
2289       *     @type bool   $display   Whether to display the calendar output. Default true.
2290       *     @type string $post_type Optional. Post type. Default 'post'.
2291       * }
2292       * @return array The arguments for the `get_calendar` function.
2293       */
2294      $args = apply_filters( 'get_calendar_args', wp_parse_args( $args, $defaults ) );
2295
2296      if ( ! post_type_exists( $args['post_type'] ) ) {
2297           $args['post_type'] = 'post';
2298      }
2299
2300      $w = 0;
2301      if ( isset( $_GET['w'] ) ) {
2302           $w = (int) $_GET['w'];
2303      }