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

AltoFocus: Remove custom [flexslider_gallery] shortcode #35

Closed
allancole opened this issue Mar 8, 2018 · 2 comments
Closed

AltoFocus: Remove custom [flexslider_gallery] shortcode #35

allancole opened this issue Mar 8, 2018 · 2 comments
Assignees
Labels
[Type] Enhancement New feature or request
Milestone

Comments

@allancole
Copy link
Contributor

Nothing is actually broken here, but while submitting this theme to wporg, I got a warning about this custom shortcode that is not allowed in the theme. This custom [flexslider_gallery] shortcode is used to replace slideshow galleries (specifically) with a full-width flexslider slideshow that appears above the post title on single posts.

After looking into this, it appears the same functionality can be achieved using a filter on post_gallery. A filter is a much safer approach and less code is required to achieve the exact same result.

I should note that the custom [flexslider_gallery] shortcode is not publicly mentioned anywhere, since only the theme use it to replace the default [gallery] shortcode when the slideshow type is selected. No users would know it even exists without digging into the code. Removing it in favor of a more wporg-friendly filter will not cause any disruption for wpcom users.

@allancole allancole added [Type] Enhancement New feature or request needs patch labels Mar 8, 2018
@allancole allancole added this to the AltoFocus milestone Mar 8, 2018
@allancole allancole self-assigned this Mar 8, 2018
allancole added a commit that referenced this issue Mar 8, 2018
…a post_gallery filter that provides the same functionality; Helps pass wporg theme submission checks; See: #35
@allancole
Copy link
Contributor Author

Just pushed a commit that should fix this. ^^

To test the fix, first create a gallery with the default shortcode: [gallery ids="123,124,125"] and you should see the standard gallery output in the_content below the post title.

Then, create a slideshow gallery like: [gallery ids="123,124,125" type="slideshow"] and confirm that the gallery gets removed from the_content and placed above the post title as a full-screen flexslider slideshow gallery.

@allancole
Copy link
Contributor Author

Fixed in: 6d101a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant