-
-
Notifications
You must be signed in to change notification settings - Fork 6
Version 4 Migration
Changes should be covered using the doing_it_wrong
or deprecated
mechanisms built into WP core. Be sure to update to the latest V3 version first with WP_DEBUG
on and fix any notices.
PHP 7.4+ is now required to use this library.
WordPress Core 5.8+ is now recommended to use this library. Older versions may work but will not be tested against.
By default CMB2 stores the values for taxonomy based user fields via set_object_terms
. While this works in many cases, it has a potential to conflict with the posts table thus reducing database reliability. Going forward, any taxonomy fields registered for users will by default use the user meta API to handle data.
For existing fields using the object terms system call store_user_terms_in_meta( false )
when registering the fields.
The Theme\Styles
class has been completely removed in favor of using the Theme\Resources
class.
All the array_
prefix methods were deprecated back in version 3.6.0. They have now been removed from the Util\Array
class.
array_map_recursive
array_chunk_to_associative
array_merge_recursive
array_map_assoc
array_recursive_unset
-
array_flatten_assoc
You will find corresponding methods with the same name just not thearray_
prefix.
The Util\Autoloader
class has been modernized and simplified. The add
API remains the same but if you are doing something complex or custom with the Autoloader class, you'll likely need to modernize your usage as well.
Some properties have changed types to match modern versions of WordPress register_post_type
and register_taxonomy
.
strict_type
are enabled so errors should be obvious and simple to fix.
Some properties have been remove or made protected
in favor of using the available methods.
If you receive a fatal error for trying to access a protected
property, switch to the same named method.
All previous constants for for data types have been prepended with TYPE_
. This allows more reliable PHPStan scans.
- The name of
lipe/lib/util/cache/flush
hook was fixed. If you were using the oldlipe/lipe/util/cache/flush
, you'll need to update it.
The get_image_from_content
and image_scan
argument for the Util\Image_Resize
class has been removed with no alternative.
The Rest_Api\Query_Vars
class has been removed with no alternative.
The Theme\Pagination
class has been removed with no alternative.
The Post_Type\Custom_Post_Type_Extended
class has been removed with no alternative.
The Taxonomy\Taxonomy_Extended
class has been removed with no alternative.