Astra_Menu::astra_get_theme_changelog_feed_data()

Get Changelogs from API.


Description


Return

(array) $changelog_data Changelog Data.


Source

File: admin/includes/class-astra-menu.php

	public static function astra_get_theme_changelog_feed_data() {
		$changelog_data = array();
		$posts          = json_decode( wp_remote_retrieve_body( wp_remote_get( 'https://wpastra.com/wp-json/wp/v2/changelog?product=97&per_page=3' ) ) ); // Astra theme.

		if ( isset( $posts ) && is_array( $posts ) ) {
			foreach ( $posts as $post ) {
				$changelog_data[] = array(
					'title'       => $post->title->rendered,
					'date'        => gmdate( 'l F j, Y', strtotime( $post->date ) ),
					'description' => $post->content->rendered,
					'link'        => $post->link,
				);
			}
		}

		return $changelog_data;
	}

Changelog

Changelog
Version Description
4.0.0 Introduced.

User Contributed Notes

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