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; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |