-
-
Notifications
You must be signed in to change notification settings - Fork 5
Upgrade from v1 to v2
Jeffrey van Rossum edited this page May 12, 2022
·
1 revision
Version 2.0.0 is a pretty significant release, but the breaking changes have been kept to an absolute minimum.
- The liveblog is now fully rendered through JavaScript and uses a custom API endpoint to fetch the updates. This means it no longer is using admin-ajax.php requests.
- A liveblog may now be embedded on other pages using the ‘elb_liveblog’ shortcode. You may pass the ‘id’ or the ‘endpoint’ URL to fetch the liveblog you want to embed. A custom Gutenberg block for this might be added in a future release.
- When a change to an liveblog is entry is made (a typo fix for example), it will - without the user refreshing the page - automatically be updated. It will then also update the timestamp. The only exemption for now, applies to posts in which iframe’s are used (such as social media embeds) as this causes page position shifts.
- Every liveblog has its own custom API endpoint. This will might be useful if you, for example, would like to implement liveblogs in an external app.
- The styling of the meta box options has been improved.
- It is now possible to cache the liveblog using transient or object caching.
- You may now set a date(time)-format to be displayed with the liveblog entries. Human readable timestamps (for example: 5 minutes ago) will be updated without having to refresh the page.
The following will only apply if you have made use of the action/filter-hooks or functions that the plugin provides in your own code.
-
elb_before_liveblog
andelb_after_liveblog
action hooks remain but no longer receive the second posts array variable. It will now return an empty array, which will be removed in a future release. - The liveblog id parameter on the
elb_before_liveblog
andelb_after_liveblog
action hooks, will only be passed if the liveblog is in fact displayed on the actual liveblog post or when the id is passed through the shortcode. It will not be passed when the shortcode is used with the endpoint parameter.
- Several functions and properties in the ELB_Liveblog class are marked as deprecated and don’t have any function anymore. The probability that these functions are used outside of this plugin is very low, but if you do - you should stop using them as they will be removed in a future release and already have no practical function anymore. The __construct-function is now private.
- Deprecated properties
- liveblog_post_id
- showposts
- Deprecated functions
- theme_body_class
- get_posts
- post
- liveblog
- Init
- Deprecated properties