Skip to content

Releases: level-level/Clarkson-Core

1.1.2

11 Jun 13:47
76be321
Compare
Choose a tag to compare

Fix typehinting for Clarkson_Objects get_object() function.

1.1.1

11 Mar 10:45
2bab966
Compare
Choose a tag to compare
  • Change the priority of the clarkson_core_template_context filter from 10 to 5 to make sure Clarkson Core fills the context first.

0.4.6

11 Mar 10:43
b3b9efd
Compare
Choose a tag to compare
  • Change the priority of the clarkson_core_template_context filter from 10 to 5 to make sure Clarkson Core fills the context first.

0.4.5

08 Mar 15:07
2c344d9
Compare
Choose a tag to compare
  • Fixes an issue where the template path ended up being empty in Clarkson_Core_Templates->render_twig().

#216

0.4.4

08 Mar 12:28
5ebadfa
Compare
Choose a tag to compare
  • Extracts twig instantiation to seperate method to run it only once.
  • Introduce clarkson_core_template_context from Clarkson Core 1.0.
  • Fixes rendering of templates in symlinked folders while keeping the old WordPress template hierarchy fallback method intact.

#214

1.1.0

10 Dec 12:09
b59cdf3
Compare
Choose a tag to compare
  • Adds a new clarkson_core_block_context_{$name} hook to modify variables available in the twig render function of a block. (#213)

1.0.0

30 Nov 09:25
fa096a4
Compare
Choose a tag to compare

Clarkson Core 1.0.0 🎉

New/changed features

  • Now uses the actual WordPress template hierarchy, solving a lot of edge cases around template loading.
  • The twig environment is exposed through the new clarkson_twig_environment filter.
  • Normalises the Clarkson_User and Clarkson_Term object creation interfaces.
  • Minor docblock typehint improvements in Clarkson_Object.
  • Extends parameters available in Clarkson_Core_Gutenberg_Block_Type::clarkson_render_callback
  • Clarkson_Object has a new get_object() method.
  • Adds new clarkson_core_template_context filter.
  • Adds object as the first of objects to twig context.
  • There is now an object hierarchy:
    • Objects: \Clarkson_Core\WordPress_Object$post_type, \Clarkson_Core\WordPress_Object\base_object, \Clarkson_Core\WordPress_Object\Clarkson_Object
    • Terms: \Clarkson_Core\WordPress_Object$taxonomy, \Clarkson_Core\WordPress_Object\base_term, \Clarkson_Core\WordPress_Object\Clarkson_Term
    • Users: \Clarkson_Core\WordPress_Object\user, \Clarkson_Core\WordPress_Object\Clarkson_User
    • Templates: \Clarkson_Core\WordPress_Object$template, \Clarkson_Core\WordPress_Object\base_template, \Clarkson_Core\WordPress_Object\Clarkson_Template,
    • Post Types: \Clarkson_Core\WordPress_Object\post_type_$post_type, \Clarkson_Core\WordPress_Object\base_post_type, \Clarkson_Core\WordPress_Object\Clarkson_Post_Type
    • Blocks: \Gutenberg\Blocks$block_name, \Gutenberg\Blocks\base_block, Clarkson_Core\Gutenberg\Block_Type
  • Adds get_terms() method to mimic get_objects and get_users on Object factory.
  • Adds clarkson_term_types and clarkson_user_type filters to overwrite class lookup.
  • Adds Clarkson_Post_Type object. post_type is also automatically added to the template context on archive pages.
  • The twig environment is now only created once per request.
  • Clarkson_Object::get_many can now set it a variable to it's \WP_Query.
  • Adds a filter clarkson_core_{$post_type}_templates to manipulate templates per post type.
  • Adds ::get_many, ::get_one and ::get methods to Clarkson_Term and Clarkson_User.
  • Adds get_roles() method (returns role name as string) to Clarkson_User.
  • Adds get_role_objects() method (returns Clarkson_Role) to Clarkson_User.
  • The get_children() and get_attachments() methods on the Clarkson_Object now accepts a Post arguments parameter.

Backward incompatible changes:

  • Removes compatibility for WordPress < 4.7.
  • Removes 'page-' template file name compatibility.
  • Themes that relied on incorrect loading of template files may experience some incompatibility.
  • Removes Clarkson_Object::get_json, which was deprecated in 0.2.0.
  • The Clarkson_Term and Clarkson_User interfaces have changed, and you might now get an Exception, instead of an invalid object.
  • Removes deprecated features everywhere except for wordpress-objects/
  • Removes loading of user roles instead of a user object.
  • Removes deprecated construction of objects by id. Use ::get instead.
  • Objects, term and user creation calls (such as ::get and ::get_one) now return null instead of throwing an error when no valid result is found.
  • Updates twig from v1 to v3. See https://twig.symfony.com/doc/1.x/deprecated.html and https://twig.symfony.com/doc/2.x/deprecated.html
  • Updates required PHP version to 7.2.
  • Removes get_role() method from Clarkson_User because a user can have multiple roles. Replaced with get_roles() method, which returns an array of role names.
  • The get_children() and get_attachments() methods on the Clarkson_Object now return Clarkson_Object[] instead of WP_Post[].
  • Template objects are now standalone objects (Clarkson_Template), instead of extending Clarkson_Object.

1.0.0-rc5

05 Nov 09:55
d301a43
Compare
Choose a tag to compare
1.0.0-rc5 Pre-release
Pre-release
  • Fixes issue with non-absolute paths not being rendered.

1.0.0-rc4

05 Nov 09:40
8ab3805
Compare
Choose a tag to compare
1.0.0-rc4 Pre-release
Pre-release
  • Correctly renders templates in symlinked folders.

1.0.0-rc3

30 Oct 14:38
932dbd0
Compare
Choose a tag to compare
1.0.0-rc3 Pre-release
Pre-release
  • Fixes issue with symlinked wp-content folder. #200