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

Cannot use get_post_gallery() WordPress function #9677

Open
Oxibug opened this Issue Sep 6, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@Oxibug

Oxibug commented Sep 6, 2018

Describe the bug
Firstly Many Thanks for the great project BUT I need to share with you some flexibility issues, I contact you before about filter {post_gallery} and I successfully modified your gallery style but I fall in another issue that I cannot read the post content's galleries with functions { get_post_gallery() - get_post_galleries() } and I noticed that a complete class destroyed because I cannot get the post's galleries IDs.

I test everything in the project and main and most things that the user {blogger for example} use like {Gallery, Audio and Video} and all of 'em have flexibility issues.

1. Gallery
I need to remove the first gallery from the post content and use it as a post banner in the Homepage that I already do with {get_post_gallery()} function beside {the_content} filter .. Now the users must see all galleries embedded inside post content in the Homepage's items.

2. Audio and Video
I still can use {get_media_embedded_in_content()} function to get all Audios and Videos inside the post content BUT you used {<video>} tag instead of {[video]} WordPress shortcode to display videos so we cannot style the videos buttons and seek bar whereas the {[video]} shortcode using {mejs} so it gives us the ability to style everything when the audio or video inside content or in any other place.

So Have you create a complete blogger posts have {Galleries, Audios and Videos} and see what will the Homepage like? There's no flexibility like old WordPress, if I used Gutenberg I MUST use an image as post thumb and use post excerpt instead of using a {filtered content}, I cannot get the first gallery from the post content and use it as a post thumb, I cannot remove galleries from the post content in the Homepage, I cannot use the {video} as post thumb unless using a RegEX to get src and perform a {do_shortcode} for that source so I can style my video items (a lot of unnecessary work).

Actually I appreciate your work but I need some features like WordPress already has, They think about everything very well and made helper functions like {get_post_gallery() and get_media_embedded_in_content()}, If they used {divs} for gallery and {<video>} tags there's no way to use those functions and the users won't understand the differences.

Thanks for the GREAT project and hope you help me with functions because my all projects suspended because of these issues.

Expected behavior

Screenshots

Desktop (please complete the following information):

  • Chrome

Additional context

  • Gutenberg v3.7.0
@BinaryMoon

This comment has been minimized.

BinaryMoon commented Sep 23, 2018

Related: #5797

@BinaryMoon

This comment has been minimized.

BinaryMoon commented Sep 23, 2018

Had this problem myself today so made a polyfill that fixes the issue (for my use case at least):
https://gist.github.com/BinaryMoon/cd1eb239d4a14ba3ab45b756e4c64828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment