-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Move Featured Media UI to Featured Image Metabox #1285
Move Featured Media UI to Featured Image Metabox #1285
Conversation
@rclations same issue here :/ I'm not able to check out this branch to review because it's on your fork. Can you move that branch over here so I can do some final review/cleanup before merging? |
@aschweigert can you access it now? I just checked the new "allow edits from maintainers" feature |
also add some missing translation strings
ok, this lgtm, a couple to-do items before merging:
|
96536c6
to
9e2bfdf
Compare
0614227
to
99c43d3
Compare
should be all set, but @aschweigert or @benlk, could you give this a quick review before I merge? |
@jackbrighton we'll need docs coverage for this since we're moving peoples' button. Let's make sure that gets done before we ship 0.5.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found source of bugs in #1322 with non-image featured media.
return; | ||
switch( $featured_media['type'] ) { | ||
case 'video': | ||
$template_slug = 'video'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partials/hero-featured-video
is not a file that exists.
This line should use $template_slug = 'embed'
, to match the old code:
if (in_array($featured_media['type'], array('embed-code', 'video'))) {
$ret = largo_get_featured_embed_hero($post->ID,$classes);
@@ -157,109 +132,51 @@ function largo_get_featured_image_hero($post = null, $classes = '') { | |||
'the_post' => $the_post |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're adding partials/hero-featured-embed.php
to the list of things that get rendered with this context, then $featured_media
and $gallery_ids
need to be passed in this array if that's appropriate to the rendering.
The code changes in this PR included a lot of things that weren't mentioned in the pull request's description. |
fixes #698
The Problem
Proposed Solution
The featured media metabox was removed so we could build our own button with additional options for featured video, embed, gallery, etc.
This PR adds a new featured media metabox and moves the "Set Featured Media" button there.