Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Twenty Twenty Blocks] Try adding early Block Patterns support to the Twenty Twenty Blocks theme #35

Merged
merged 3 commits into from Apr 8, 2020

Conversation

melchoyce
Copy link
Collaborator

@melchoyce melchoyce commented Apr 8, 2020

This includes one new pattern, based on the Exhibitions grid on https://2020.wordpress.net/.

image

…heme

This includes one new pattern, based on the Exhibitions grid on https://2020.wordpress.net/.
@melchoyce melchoyce requested review from kjellr and jffng Apr 8, 2020
* Register Block Patterns.
*/

register_pattern (
Copy link
Collaborator

@jffng jffng Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wrap this function call to be safe / avoid errors if the user is running an older version of Gutenberg.

if ( function_exists( 'register_pattern' ) ) {
  register_pattern (
    ...
  )
}

Copy link
Collaborator Author

@melchoyce melchoyce Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed an update!

@kjellr
Copy link
Collaborator

@kjellr kjellr commented Apr 8, 2020

Looks great! Once this incorporates @jffng's suggestion above, I think it's ready to go. 👍

kjellr
kjellr approved these changes Apr 8, 2020
Copy link
Collaborator

@kjellr kjellr left a comment

Left a really minor note, but once that's changed, this is ready to go!

twentytwenty-blocks/functions.php Outdated Show resolved Hide resolved
@kjellr kjellr added the enhancement label Apr 8, 2020
@melchoyce melchoyce merged commit 10e8583 into master Apr 8, 2020
@kjellr kjellr deleted the try/twentytwenty-blocks-patterns branch Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants