packages/kirki-framework/core/src/Helper.php
public static function get_posts( $args ) {
		if ( is_string( $args ) ) {
			$args = add_query_arg(
				[
					'suppress_filters' => false,
				]
			);
		} elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
			$args['suppress_filters'] = false;
		}

		// Get the posts.
		// TODO: WordPress.VIP.RestrictedFunctions.get_posts_get_posts.
		$posts = get_posts( $args );

		// Properly format the array.
		$items = [];
		foreach ( $posts as $post ) {
			$items[ $post->ID ] = $post->post_title;
		}
		wp_reset_postdata();

		return $items;
	}
public static function get_posts( $args ) {
		if ( is_string( $args ) ) {
			$args = add_query_arg(
				[
					'suppress_filters' => false,
				]
			);
		} elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
			$args['suppress_filters'] = false;
		}

		// Get the posts.
		// TODO: WordPress.VIP.RestrictedFunctions.get_posts_get_posts.
		$posts = get_posts( $args );

		// Properly format the array.
		$items = [];
		foreach ( $posts as $post ) {
			$items[ $post->ID ] = $post->post_title;
		}
		wp_reset_postdata();

		return $items;
	}
public static function get_posts ( $ args ) { if ( is_string ( $ args ) ) { $ args = add_query_arg ( [ 'suppress_filters' => false , ] ) ; } elseif ( is_array ( $ args ) && ! isset ( $ args [ 'suppress_filters' ] ) ) { $ args [ 'suppress_filters' ] = false ; } // Get the posts. // TODO: WordPress.VIP.RestrictedFunctions.get_posts_get_posts. $ posts = get_posts ( $ args ) ; // Properly format the array. $ items = [ ] ; foreach ( $ posts as $ post ) { $ items [ $ post -> ID ] = $ post -> post_title ; } wp_reset_postdata ( ) ; return $ items ; }
Get an array of posts.

@static
@access public
@param array $args Define arguments for the get_posts function.
@return array
Get an array of posts .