Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Releases: alleyinteractive/wp-irving

0.5.0

09 Oct 19:18
Compare
Choose a tag to compare

Changelog

  • Limit Pico paywall to posts by default #279
  • Changes related to new @irvingjs/wordpress package #278
  • Ensure pre_get_posts fires for empty queries #277
  • Add support for body classes #273
  • Fix setting global WordPress properties #267
  • Update Travis config #275
  • Add support for nested site theme values #270
  • GTM: Escape the site path in the data layer #269
  • Add HTML encoding to menu name #268
  • Refactor site-info component #266
  • Add options for camel casing keys #265
  • Pico: Add support for using the staging widget URL #263
  • Add class_name and style as default configs #262
  • Add checkbox for Pico staging URLs #261

0.4.1

09 Oct 19:16
Compare
Choose a tag to compare

This is a security release to fix a potential XSS issue in the GTM integration if specially crafted URLs were used.

Changelog

  • Fix possible XSS issue with the GTM integration. #269

0.4.0

14 Sep 14:46
a6f4c4a
Compare
Choose a tag to compare

Changelog

  • Update social share component. #259
  • Add fragment property to post permalink component config. #258
  • Add support for a fallback image in the customizer. #257
  • Add initial data layer to GTM integrations. #255
  • Add banned usernames field for Coral. #256
  • Add allowed tiers input for Pico/Coral SSO to Irving Integrations settings page. #254
  • Allow user to set custom username through Pico/Coral integration. #241
  • Add image performance enhancements in irving/post-featured-image. #251
  • Add post_ids_to_skip config to the irving/post-list component. #250
  • Implement local WP username storage for Coral users. #249
  • Support item overrides in irving/post-list components. #247
  • Hydrate WordPress data for images. #244
  • Improvements to management, and block library support. #246
  • Ensure post previews do not use the homepage template. #248
  • Enqueue block library styles. #243
  • Add share links config to social sharing component. #242
  • Remove unnecessary second param for VIP cache purge filter. #240
  • Add support to the pagination component for post type archives. #239
  • Define component for Coral to be included in template JSON. #222
  • Allow use_context in templates. #223

0.3.0

26 Aug 20:20
Compare
Choose a tag to compare

Enhancements

  • Add: Integrations Manager
  • Add: Yoast schema set through integrations manager
  • Add: Pico integration
  • Add: Coral component
  • Add: Post meta component
  • Add: Interstitial support to the post-list component
  • Add: Term helper components
  • Add: Set base URL automatically in query-pagination component on term archive pages
  • Add: Jetpack site stats integration
  • Add: Google Tag Manager integration
  • Add: Back-end for handling SSO between Pico and Coral
  • Add: Coral comment count component
  • Add: Social links component

Fixes

  • Fix: Cache clearing redirect
  • Fix: Page title in the head component
  • Fix: Menu URL
  • Fix: Add permissions callbacks to REST API endpoints for WP 5.5
  • Fix: Duplicates in post list component.
  • Fix: Yoast integration data formatting
  • Fix: Byline component improvements
  • Fix: Safe Redirect Manager integration

0.3.0 RC1

25 Aug 22:00
Compare
Choose a tag to compare
0.3.0 RC1 Pre-release
Pre-release

Enhancements

  • Add: Integrations Manager
  • Add: Yoast schema set through integrations manager
  • Add: Pico integration
  • Add: Coral component
  • Add: Post meta component
  • Add: Interstitial support to the post-list component
  • Add: Term helper components
  • Add: Set base URL automatically in query-pagination component on term archive pages
  • Add: Jetpack site stats integration
  • Add: Google Tag Manager integration
  • Add: Back-end for handling SSO between Pico and Coral
  • Add: Coral comment count component
  • Add: Social links component

Fixes

  • Fix: Cache clearing redirect
  • Fix: Page title in the head component
  • Fix: Menu URL
  • Fix: Add permissions callbacks to REST API endpoints for WP 5.5
  • Fix: Duplicates in post list component.
  • Fix: Yoast integration data formatting
  • Fix: Byline component improvements

0.2.0

27 Jul 16:11
9baf4c9
Compare
Choose a tag to compare

What's new in Irving 0.2.0

This update includes major improvements to the way developers can build layouts for Irving sites using WordPress.

Introducing Irving Templates

WP-Irving now includes a new templating system that can be used to configure Irving layouts which automatically get injected with WordPress data. Templates are formatted as JSON files that define the structure of components that should be returned in default and page properties of a REST API response from the /irving/v1/components endpoint.

Ex: Template for defining the default page layout structure

{
    "defaults": [
        { "name": "template-parts/header" },
        { "name": "irving/body-wrapper" },
        { "name": "template-parts/footer" }
    ]
}

Ex: Template for a post page layout (i.e., single.json):

{
    "page": [
        {
            "name": "irving/body-wrapper",
            "children": [
                {
                    "name": "irving/post-title",
                    "theme": "heading",
                    "config": {
                        "tag": "h1"
                    }
                },
                { "name": "irving/post-featured-media" },
                { "name": "irving/post-byline" },
                { "name": "irving/post-timestamp" },
                { "name": "irving/post-content" }        
            ]
        }
    ]
}

Template hierarchy

Irving now automatically loads templates based on the site URL, using the template hierarchy familiar in traditional WordPress theme development. By default, WP-Irving will try to load template files from the current theme's templates directory. For example, a request for a post page would use a /templates/single.json file, if present. An archive page would load /templates/archive.json, etc.

Additionally, WP-Irving includes support for a special default.json template for defining components that should only be loaded on full page renders and don't change when navigating between pages.

The location where WP-Irving loads templates from can be filtered using the wp_irving_template_path hook,

Ex: Loading templates from a custom path.

add_filter(
	'wp_irving_template_path',
	get_stylesheet_directory() . '/my/custom/template/path'
);

Template parts

To make it easy to create repeatable template patterns, WP-Irving will automatically replace any objects in a template file named with a template-parts/{name} pattern with data in a name.json file in the theme's template-parts directory.

The location where template parts are loaded from can be filtered using the wp_irving_template_part_path hook.

Ex: Loading template parts from a custom path.

add_filter(
	'wp_irving_template_part_path', 
	get_stylesheet_directory() . '/my/custom/template-part/path'
);

Core component types

To aid in quickly creating layouts, the WP-Irving plugin now includes a set of registered component types, which can used in template files, that automatically pull in data from WordPress so you don't have to write a lot of back-end code to get your templates up and running. The full list of available component types can be found here: https://github.com/alleyinteractive/wp-irving/tree/master/inc/components/components.

Register custom component types

In addition to the core components, projects can create and register their own component types using the WP_Irving\Components\register_components() function.

Ex:

<?php
/**
 * Example component registration.
 */

WP_Irving\Components\register_component(
	'namespace/example-component',
	[
		// Define default configuration schema for the component.
		'config'            => [
			'property' => [
				'type'    => 'bool',
				'default' => false,
			],
		],
		'config_callback'   => function ( $config ) {

			/*
			 * Add custom logic that hydrates the component's 
			 * configuration properties with WP data.
			 */

			return $config;
		},
		'children_callback' => function ( $children, $config ) {

			/*
			 * Add custom logic that modifies the component's
			 * children array based on configuration properties.
			 */

			return $children;
		},
	]
);

You can also register components using the WP_Irving\Components\register_component_from_config() function and pass a path to a JSON file defining the component's schema (see examples of registering from JSON schema in the core components library).

Admin bar

This release includes support for the WP admin bar out of the box and includes helpful tools to clear cache from the admin bar. (#168, #203)

0.1.0

09 Jun 21:39
Compare
Choose a tag to compare

This is the initial tagged release of the WP-Irving plugin. To ensure backwards compatibility on projects already making use of this plugin, it is recommended that you use a stable tagged version of the plugin rather than the latest master branch of this plugin, which will continue to be used for active development and might contain compatibility breaks.