publishpress / PublishPress-Blocks

PublishPress Blocks adds the missing blocks and configuration you need to build professional websites. Take the control of the new Gutenberg editor with user edition profile configuration and 20+ new blocks and options.
15 stars 8 forks source link

Update to new Series key #1278

Closed htmgarcia closed 1 year ago

htmgarcia commented 1 year ago

The goal is to make it possible to switch to and from multiple series without the need edit series posts and to achieve that, I made changes for both multiple and single series to be using same part key and I believe part series part is part of your integration. Previous part key is _series_part for single series while _seriespart{series_id} for multiple series but that's changing in coming series update and both single and multiple series will be using _seriespart{series_id} part key. For example, to get a part key for a post with series term ID 2, the function will be get_post_meta($post->ID, '_seriespart' $series_id, true); Here's also a sample function to check if the site is using upgraded series part key if (function_exists('publishpress_multi_series_supported') && publishpress_multi_series_supported()) { //User already upgraded and is using new part key } else { // User is still using old part key }