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

Rest API Exposure #16422

Closed
CHEWX opened this issue Jul 4, 2019 · 2 comments
Closed

Rest API Exposure #16422

CHEWX opened this issue Jul 4, 2019 · 2 comments
Labels
REST API Interaction Related to REST API [Type] Enhancement A suggestion for improvement.

Comments

@CHEWX
Copy link

CHEWX commented Jul 4, 2019

Describe the bug
Using core blocks such as core/image, firstly this is not exposed to the Rest API. So If I was to expose using parse_blocks() and rest_prepare_cpt_project there is no way to get the caption?

Expected behavior
To have access to captions as an attribute like images.

Screenshots

Array
(
    [blockName] => core/image
    [attrs] => Array
        (
            [id] => 16
        )

    [innerBlocks] => Array
        (
        )

    [innerHTML] => 
<figure class="wp-block-image"><img src="http://wordpress.test/wp-content/uploads/2019/07/image-1-1024x730.jpg" alt="" class="wp-image-16"/><figcaption>This is a caption</figcaption></figure>

    [innerContent] => Array
        (
            [0] => 
<figure class="wp-block-image"><img src="http://wordpress.test/wp-content/uploads/2019/07/image-1-1024x730.jpg" alt="" class="wp-image-16"/><figcaption>This is a caption</figcaption></figure>

        )

)

Desktop (please complete the following information):
All.

Smartphone (please complete the following information):
All.

@swissspidy swissspidy added REST API Interaction Related to REST API [Type] Enhancement A suggestion for improvement. labels Jul 4, 2019
@skorasaurus
Copy link
Member

skorasaurus commented Dec 14, 2020

this may be fulfilled in #2649

@mtias
Copy link
Member

mtias commented Jul 13, 2021

@mtias mtias closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REST API Interaction Related to REST API [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants