lib/Term.php
public function get_posts( $numberposts_or_args = 10, $post_type_or_class = 'any', $post_class = '' ) {
		if ( !strlen($post_class) ) {
				$post_class = $this->PostClass;
			}
		$default_tax_query = array(array(
			'field' => 'term_id',
			'terms' => $this->ID,
			'taxonomy' => $this->taxonomy,
		));
		if ( is_string( $numberposts_or_args) && strstr( $numberposts_or_args, '=') ) {
			$args     = $numberposts_or_args;
			$new_args = array();
			parse_str($args, $new_args);
			$args = $new_args;
			$args['tax_query'] = $default_tax_query;
			if ( !isset($args['post_type']) ) {
				$args['post_type'] = 'any';
			}
			if ( class_exists($post_type_or_class) ) {
				$post_class = $post_type_or_class;
			}
		} else if ( is_array( $numberposts_or_args) ) {
			//they sent us an array already baked
			$args = $numberposts_or_args;
			if ( !isset($args['tax_query']) ) {
				$args['tax_query'] = $default_tax_query;
			}
			if ( class_exists($post_type_or_class) ) {
				$post_class = $post_type_or_class;
			}
			if ( !isset($args['post_type']) ) {
				$args['post_type'] = 'any';
			}
		} else {
			$args = array(
				'numberposts' => $numberposts_or_args,
				'tax_query'   => $default_tax_query,
				'post_type'   => $post_type_or_class
			);
		}

		return Timber::get_posts($args, $post_class);
	}
public function get_posts( $numberposts_or_args = 10, $post_type_or_class = 'any', $post_class = '' ) {
		if ( !strlen($post_class) ) {
				$post_class = $this->PostClass;
			}
		$default_tax_query = array(array(
			'field' => 'term_id',
			'terms' => $this->ID,
			'taxonomy' => $this->taxonomy,
		));
		if ( is_string( $numberposts_or_args) && strstr( $numberposts_or_args, '=') ) {
			$args     = $numberposts_or_args;
			$new_args = array();
			parse_str($args, $new_args);
			$args = $new_args;
			$args['tax_query'] = $default_tax_query;
			if ( !isset($args['post_type']) ) {
				$args['post_type'] = 'any';
			}
			if ( class_exists($post_type_or_class) ) {
				$post_class = $post_type_or_class;
			}
		} else if ( is_array( $numberposts_or_args) ) {
			//they sent us an array already baked
			$args = $numberposts_or_args;
			if ( !isset($args['tax_query']) ) {
				$args['tax_query'] = $default_tax_query;
			}
			if ( class_exists($post_type_or_class) ) {
				$post_class = $post_type_or_class;
			}
			if ( !isset($args['post_type']) ) {
				$args['post_type'] = 'any';
			}
		} else {
			$args = array(
				'numberposts' => $numberposts_or_args,
				'tax_query'   => $default_tax_query,
				'post_type'   => $post_type_or_class
			);
		}

		return Timber::get_posts($args, $post_class);
	}
public function get_posts ( $ numberposts_or_args = 10 , $ post_type_or_class = 'any' , $ post_class = '' ) { if ( ! strlen ( $ post_class ) ) { $ post_class = $ this -> PostClass ; } $ default_tax_query = array ( array ( 'field' => 'term_id' , 'terms' => $ this -> ID , 'taxonomy' => $ this -> taxonomy , ) ) ; if ( is_string ( $ numberposts_or_args ) && strstr ( $ numberposts_or_args , '=' ) ) { $ args = $ numberposts_or_args ; $ new_args = array ( ) ; parse_str ( $ args , $ new_args ) ; $ args = $ new_args ; $ args [ 'tax_query' ] = $ default_tax_query ; if ( ! isset ( $ args [ 'post_type' ] ) ) { $ args [ 'post_type' ] = 'any' ; } if ( class_exists ( $ post_type_or_class ) ) { $ post_class = $ post_type_or_class ; } } else if ( is_array ( $ numberposts_or_args ) ) { //they sent us an array already baked $ args = $ numberposts_or_args ; if ( ! isset ( $ args [ 'tax_query' ] ) ) { $ args [ 'tax_query' ] = $ default_tax_query ; } if ( class_exists ( $ post_type_or_class ) ) { $ post_class = $ post_type_or_class ; } if ( ! isset ( $ args [ 'post_type' ] ) ) { $ args [ 'post_type' ] = 'any' ; } } else { $ args = array ( 'numberposts' => $ numberposts_or_args , 'tax_query' => $ default_tax_query , 'post_type' => $ post_type_or_class ) ; } return Timber :: get_posts ( $ args , $ post_class ) ; }
Get posts that have the current term assigned.

@internal
@param int|array $numberposts_or_args Optional. Either the number of posts or an array of
arguments for the post query that this method is going.
to perform. Default `10`.
@param string    $post_type_or_class  Optional. Either the post type to get or the name of
post class to use for the returned posts. Default
`any`.
@param string    $post_class          Optional. The name of the post class to use for the
returned posts. Default `Timber\Post`.
@return array|bool|null
Get posts that have the current term assigned .