Support

Account

Home Forums General Issues oEmbed

Solving

oEmbed

  • Hello:

    I am looking to get the oEmbeded variables for things such as “Embed Size” which has two possible fields “Width” and “height.”

    I am sure I am just thinking too hard on this, and the answer is simple. So if anyone can point me in the right direction or to the technical doc that is a bit more detailed than the general FAQ I would be grateful.

    Thank you,
    –BC

    PS I also did not know if this should be on a particular sub-forum. If is should and an admin would move it thank you.

  • Do you mean the width/height as set in the field settings or something else?

  • Hello:

    There are several fields built into the ACF oEmbed dialog. Those would include “Required, Embed Size (Width, Height), Wrapper attributes” I am sure there are more. That is what I remember off the top of my head.

    I was hoping to be able to grab the Embed Size if it is set by the data entry person.

    Thanks!
    BC

  • This is not something entered when editing content. The only thing that ACF stores is the URL.

    The only place this is added in when defining the field.

    You can get the settings of the field by using get_field_object()

  • Hello John:

    Thank you for the response, but I would have to argue that you can enter the information such as the fields named Required and Embed Size (width/height). I am trying to get the embed size width and the embed size height.

    Here is a link to the official documentation with a screenshot that has both fields: https://www.advancedcustomfields.com/wp-content/uploads/2014/04/acf-oembed-field-settings.png

    Perhaps I just was not being clear enough? If I can use the get_field_object() function, what are the parameters to get the height/width? I guess I should also figure out how to access the rest of the editable fields as well.

    I appreciate the help.

    –BC

  • To see the parameters available for any field type see this https://www.advancedcustomfields.com/resources/register-fields-via-php/

    For fields not covered there 1) Create a field of the type 2) Export the field group to PHP to see the parameters for the field type.

  • OMG, thank you! I will try this out and hopefully this will be the resolution.

    Thanks again John!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.