LLMS_Post_Handler::get_posts( $type = 'post' )


Source Source

File: includes/class.llms.post.handler.php

	public static function get_posts( $type = 'post' ) {

		$args      = array(
			'posts_per_page'   => 1000,
			'post_type'        => $type,
			'nopaging'         => true,
			'post_status'      => 'publish',
			'orderby'          => 'post_title',
			'order'            => 'ASC',
			'suppress_filters' => true,
		);
		$postslist = get_posts( $args );

		if ( ! empty( $postslist ) ) {

			foreach ( $postslist as $key => $value ) {
				$value->edit_url = get_edit_post_link( $value->ID, false );
			}
		}

		return $postslist;

	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.