Ryan Kienstra

Results 131 comments of Ryan Kienstra

That's a good idea, it'll help remove the need for people to look at the documentation first.

Hi @5g4kQNpw, Thanks for bringing this up, and for using Block Lab. Where is `get_post_field("post_content",$id);` running, and is there a reason it can't run in the loop? I also see...

>I opened the issue for your reference, mostly. Thanks, I appreciate it. I also saw the issue once you brought it up, so it's helpful to know that. >Other than...

I think the first option to consider would be using a basic Gutenberg setup with: ```diff diff --git a/php/post-types/class-block-post.php b/php/post-types/class-block-post.php index e52a3fb..3a5cc81 100644 --- a/php/post-types/class-block-post.php +++ b/php/post-types/class-block-post.php @@ -214,7 +214,8...

Update: per the [comment below](https://github.com/getblocklab/block-lab/issues/469#issuecomment-555178725), it'd probably be better to disable block editing entirely. By calling something like: ```js wp.blocks.setDefaultBlockName( false ); ``` ...we could prevent users from being able...

It looks like it's possible to disable block editing, as that doesn't apply to this: ```js wp.data.dispatch( 'core/editor' ).updateEditorSettings( { richEditingEnabled: false } ) ``` ```css .editor-post-text-editor, [for="post-content-1"] { display:...

In the [PHP rendering function](https://github.com/getblocklab/block-lab/blob/9ebc88088cfee932a55bb9bb04571aca8f451ecc/php/post-types/class-block-post.php#L521) for the metabox circled above, it could simply output a container for the metabox, like ``, and maybe a JavaScript `const` with any needed data....

The metabox that's [rendered as above](https://github.com/getblocklab/block-lab/issues/469#issuecomment-555182287) can access and alter the post content directly. For example: ```js const content = 'Brand new content here'; wp.data.dispatch( 'core/editor' ).editPost( { content }...

This should ideally allow the meta box that was previously [rendered with PHP](https://github.com/getblocklab/block-lab/blob/9ebc88088cfee932a55bb9bb04571aca8f451ecc/php/post-types/class-block-post.php#L521) to be rendered with React, as [described above](https://github.com/getblocklab/block-lab/issues/469#issuecomment-555182287). Just like in the PHP rendering function, how it...