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

Include current `$post` with `wp_enqueue_media()` #735

Merged

Conversation

Projects
None yet
2 participants
@jeremyfelt
Copy link
Contributor

commented Apr 25, 2017

If editing a post (post type), this allows additional settings to be enqueued for media handling. Specifically, this allows the auto embed of content from a URL such as YouTube, which does not work at this time.

If editing a user, term, etc... $post will be null, which is the default argument in wp_enqueue_media(), resulting in no change.

There's a chance that the disable of auto-embed content is intentional. In that case I can find another workaround by filtering the settings. :)

Include current `$post` with `wp_enqueue_media()`
If editing a post (post type), this allows additional settings to
be enqueued for media handling. Specifically, this allows the auto
embed of content from a URL such as YouTube.

If editing a user, term, etc... `$post` will be `null`, which is
the default argument in `wp_enqueue_media()`, resulting in no change.
@codecov

This comment has been minimized.

Copy link

commented Apr 25, 2017

Codecov Report

Merging #735 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##               dev    #735   +/-   ##
=======================================
  Coverage     13.2%   13.2%           
  Complexity    2479    2479           
=======================================
  Files           69      69           
  Lines        12576   12576           
=======================================
  Hits          1661    1661           
  Misses       10915   10915
@greatislander

This comment has been minimized.

Copy link
Collaborator

commented Apr 25, 2017

@jeremyfelt Our bundled version of https://github.com/Automattic/custom-metadata/ only has a couple modifications (you can diff to see them) and this isn't one of them. I don't think upstream is accepting PRs these days so happy to merge this.

@greatislander greatislander merged commit 8e7110e into pressbooks:dev Apr 25, 2017

4 checks passed

codecov/patch Coverage not affected when comparing 7cf6756...3ab91dd
Details
codecov/project 13.2% remains the same compared to 7cf6756
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound No violations found. Woof!

@greatislander greatislander self-assigned this Apr 25, 2017

@greatislander greatislander added this to the 3.9.9 milestone Apr 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.