Skip to content

Commit 586e803

Browse files
authored
Merge pull request #1032 from Automattic/release/3.6.0
Release 3.6.0
2 parents 68fc80d + ff11e4a commit 586e803

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4175
-184
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.6.0] - 2024-04-22
9+
10+
### Added
11+
* Blocks for Co-Authors #997
12+
13+
### Fixed
14+
* Improve alignment in author-selection component #990
15+
* Fix admin notice positions #1002
16+
* UI: Add capability check to Add New button #1003
17+
* i18n: set script translations and refresh language files #1007
18+
19+
### Maintenance
20+
* Docs: Consolidate and refresh README.md #992
21+
* Refresh package.json #993
22+
* NPM: Add version-bump-prompt #994
23+
* Fix/general code tidy #995
24+
* Composer: Use 4-space tab indentation #999
25+
* Improve tests structure #1000
26+
* Extract iterator class from template-tags.php #1005
27+
* Add supported_post_types() method #1006
28+
* Tests improvements #1008
29+
* Bump postcss from 8.4.19 to 8.4.31 #1009
30+
* Create co-authors-plus-da_DK.po #1013
31+
* Increase minimum supported PHP version to 7.4 #954
32+
* Increase minimum supported WordPress version to 5.7 #955
33+
834
## [3.5.15] - 2023-08-28
935

1036
### Fixed
@@ -462,6 +488,7 @@ Props to the many people who helped make this release possible: [catchmyfame](ht
462488
**1.1.0 (Apr. 14, 2009)**
463489
* Initial beta release.
464490

491+
[3.6.0]: https://github.com/automattic/co-authors-plus/compare/3.5.15...3.6.0
465492
[3.5.15]: https://github.com/automattic/co-authors-plus/compare/3.5.14...3.5.15
466493
[3.5.14]: https://github.com/automattic/co-authors-plus/compare/3.5.13...3.5.14
467494
[3.5.13]: https://github.com/automattic/co-authors-plus/compare/3.5.12...3.5.13

README.md

+86-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Co-Authors Plus
22

3-
Stable tag: 3.5.15
3+
Stable tag: 3.6.0
44
Requires at least: 4.1
5-
Tested up to: 6.3
5+
Tested up to: 6.5
66
Requires PHP: 5.6
77
License: GPLv2 or later
88
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -68,3 +68,87 @@ Yes! Guest authors can be disabled entirely through a filter. Having the followi
6868
## Change Log
6969

7070
[View the change log](https://github.com/Automattic/Co-Authors-Plus/blob/master/CHANGELOG.md).
71+
72+
## Blocks
73+
74+
### Co-Authors
75+
76+
Use this block to create a repeating template that displays the co-authors of a post. By default it contains the Co-Author Name block, but you can add any other block you want to the template. If you choose another Co-Author block like avatar, biography or image it will automatically be supplied the author `context` that it needs. This works similarly to creating a Post Template in a Query Loop block.
77+
78+
The Co-Authors Block supports two layouts:
79+
80+
#### Inline Layout
81+
82+
Use the inline layout to display co-authors in a list on a single wrapping line.
83+
84+
You can control the characters displayed before, between and after co-authors in the list using the block settings, or change the defaults using the following server-side filters:
85+
86+
```
87+
coauthors_default_before
88+
coauthors_default_between
89+
coauthors_default_between_last
90+
coauthors_default_after
91+
```
92+
93+
#### Block Layout
94+
95+
Use the block layout to display co-authors in a vertical stack. While using the block layout you can use block spacing settings to control the vertical space between co-authors.
96+
97+
Then you can create your own layout using blocks like group, row or stack and it will be applied to each co-author, similar to applying a layout to each post in a query loop.
98+
99+
### Co-Author Name
100+
101+
This block displays a co-author's `Display Name` and optionally turns it into a link to their author archive.
102+
103+
Using the block's advanced settings you can select which HTML element is used to output the name. This is useful in contexts such as an author archive where you might want their name to be a heading.
104+
105+
### Co-Author Avatar
106+
107+
Like the post author avatar, or comment author avatar, this block displays a small scale square image of a co-author and utilizes the Gravatar default avatars as configured in your site's discussion options.
108+
109+
To customize the available sizes, use the [rest_avatar_sizes](https://developer.wordpress.org/reference/hooks/rest_avatar_sizes/) filter.
110+
111+
### Co-Author Biography
112+
113+
This block outputs the biographical information for a co-author based on either their user or guest author data.
114+
115+
The content is wrapped in paragraph elements using `wpautop` and is escaped using `wp_kses_post`.
116+
117+
### Co-Author Featured Image
118+
119+
This block requires the use of Guest Authors. Because guest author avatars are uploaded to the WordPress media library, there are more options for displaying these images.
120+
121+
This block utilizes the image sizes configured in your theme and your site's media settings to present a guest author's avatar at a larger scale or higher resolution. It does not support Gravatars.
122+
123+
## Block Context
124+
125+
### Post, Page, Query Loop
126+
127+
By default, all blocks receive the post context. The job of the Co-Authors Block is to use this context to find the relevant authors and provide context to its inner blocks.
128+
129+
### Author Archive
130+
131+
If you want to display data about the author on their own archive, use the individual co-author blocks directly without wrapping them in the Co-Authors Block. During requests for an author archive the correct context is derived from the `author_name` query variable and provided to all blocks that declare their use of the context `co-authors-plus/author`.
132+
133+
### Extending
134+
135+
If you make a custom block and want to use the author context, add `co-authors-plus/author` to the `usesContext` property in your block.json file.
136+
137+
Example:
138+
```json
139+
{
140+
"usesContext": ["co-authors-plus/author"]
141+
}
142+
```
143+
144+
## Block Example Data
145+
146+
When working with Full Site Editing, or in the post editor before the authors are loaded, example data is used. The example data provided with the co-author blocks resembles a response to the `/coauthors/v1/coauthors/:user-nicename` REST API endpoint.
147+
148+
### Extending
149+
150+
If you have written a plugin that modifies the REST API response, you can similarly modify the example data either on the server-side using the filter `coauthors_blocks_store_data` or the client-side using the filter `co-authors-plus.author-placeholder`.
151+
152+
## Block Non-support
153+
154+
To declare a lack of support for Co-Author Plus blocks on your site, use the filter `coauthors_plus_support_blocks` to return `false`.

build/blocks-store/index.asset.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array('wp-data', 'wp-hooks'), 'version' => '82f1cda3f1d3fbb0136c');

build/blocks-store/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"$schema": "https://schemas.wp.org/trunk/block.json",
3+
"apiVersion": 3,
4+
"name": "co-authors-plus/avatar",
5+
"version": "1.0.0",
6+
"title": "Co-Author Avatar",
7+
"category": "theme",
8+
"description": "Displays a small scale version of a co-author's avatar. Utilizes fallbacks from Gravatar so everyone has an avatar.",
9+
"keywords": [
10+
"coauthors"
11+
],
12+
"supports": {
13+
"html": false,
14+
"__experimentalBorder": {
15+
"color": true,
16+
"radius": true,
17+
"width": true,
18+
"__experimentalSelector": "img, .block-editor-media-placeholder",
19+
"__experimentalSkipSerialization": true,
20+
"__experimentalDefaultControls": {
21+
"color": false,
22+
"radius": false,
23+
"width": false
24+
}
25+
},
26+
"spacing": {
27+
"margin": true,
28+
"padding": true,
29+
"__experimentalDefaultControls": {
30+
"margin": false,
31+
"padding": false
32+
}
33+
}
34+
},
35+
"usesContext": [
36+
"co-authors-plus/author",
37+
"co-authors-plus/layout"
38+
],
39+
"attributes": {
40+
"size": {
41+
"type": "number",
42+
"default": 24
43+
},
44+
"isLink": {
45+
"type": "boolean",
46+
"default": false
47+
},
48+
"rel": {
49+
"type": "string"
50+
},
51+
"verticalAlign": {
52+
"type": "string"
53+
},
54+
"align": {
55+
"type": "string"
56+
}
57+
},
58+
"textdomain": "co-authors-plus",
59+
"editorScript": "file:./index.js",
60+
"style": "file:./style-index.css"
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'b6b841ac8f86f7358245');

build/blocks/block-coauthor-avatar/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/blocks/block-coauthor-avatar/style-index.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"$schema": "https://schemas.wp.org/trunk/block.json",
3+
"apiVersion": 3,
4+
"name": "co-authors-plus/description",
5+
"version": "1.0.0",
6+
"title": "Co-Author Biography",
7+
"category": "theme",
8+
"description": "Displays a co-author's biographical description.",
9+
"keywords": [
10+
"coauthors",
11+
"description",
12+
"bio",
13+
"biography"
14+
],
15+
"supports": {
16+
"html": false,
17+
"color": {
18+
"link": true,
19+
"text": true,
20+
"background": true,
21+
"__experimentalDefaultControls": {}
22+
},
23+
"typography": {
24+
"fontSize": true,
25+
"lineHeight": true,
26+
"__experimentalFontFamily": true,
27+
"__experimentalTextDecoration": true,
28+
"__experimentalFontStyle": true,
29+
"__experimentalFontWeight": true,
30+
"__experimentalLetterSpacing": true,
31+
"__experimentalTextTransform": true,
32+
"__experimentalDefaultControls": {}
33+
},
34+
"spacing": {
35+
"margin": true,
36+
"padding": true,
37+
"__experimentalDefaultControls": {
38+
"margin": false,
39+
"padding": false
40+
}
41+
}
42+
},
43+
"usesContext": [
44+
"co-authors-plus/author"
45+
],
46+
"attributes": {
47+
"textAlign": {
48+
"type": "string"
49+
}
50+
},
51+
"textdomain": "co-authors-plus",
52+
"editorScript": "file:./index.js",
53+
"editorStyle": "file:./index.css"
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd61297f0bd62592218f0');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.wp-block-co-authors-plus-description a{pointer-events:none}

build/blocks/block-coauthor-description/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)