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

Add pods_shortcode_detect_from_current_post filter for more flexibility #5911

Merged
merged 1 commit into from Jan 6, 2021

Conversation

sc0ttkclark
Copy link
Member

Description

This allows Pods to not rely as much on in_the_loop() so the shortcode can be used in more flexible ways. This is needed for pods-framework/pods-beaver-builder-themer-add-on#112

Changelog text for these changes

  • Added: New filter pods_shortcode_detect_from_current_post allows you to override whether a shortcode should detect the post object outside of the loop (default is only when in_the_loop()).

PR Checklist

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.
  • My code includes automated tests for PHP and/or JS (if applicable).

This allows Pods to not rely as much on `in_the_loop()` so the shortcode can be used in more flexible ways. This is needed for pods-framework/pods-beaver-builder-themer-add-on#112
@sc0ttkclark sc0ttkclark added the Type: Enhancement Enhancements to features that already exist, but are not major additions label Jan 6, 2021
@sc0ttkclark sc0ttkclark added this to the Pods 2.7.26 milestone Jan 6, 2021
@sc0ttkclark sc0ttkclark self-assigned this Jan 6, 2021
@sc0ttkclark sc0ttkclark merged commit bfdf8f6 into release/2.7.26 Jan 6, 2021
@sc0ttkclark sc0ttkclark deleted the feature/filter-shortcode-in-the-loop branch January 6, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Enhancements to features that already exist, but are not major additions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants