Astra_Addon_Admin_Loader::astra_get_addon_changelog_feed_data()
Get Changelogs from API.
Description
Return
(array) $changelog_data Changelog Data.
Source
File: admin/core/class-astra-addon-admin-loader.php
public static function astra_get_addon_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=98&per_page=3' ) ) ); // Astra Pro.
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. |