-
Notifications
You must be signed in to change notification settings - Fork 798
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
Facebook widget: hide-cta and small-header #13744
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
This is an automated check which relies on |
modules/widgets/facebook-likebox.php
Outdated
'stream' => '', | ||
'cover' => 'true', | ||
'hide_cta' => '', | ||
'small_header' => '', |
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.
Need to fix issues with spacing (in multiple places) to make it better formatted. Will do that after initial review by someone! :)
add esc_html_e instead of _e Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>
codestor4, Your synced wpcom patch D33973-code has been updated. |
This PR has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this PR has clear testing instructions, is it up to date with master, and it is still valid. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
codestor4, Your synced wpcom patch D33973-code has been updated. |
codestor4, Your synced wpcom patch D33973-code has been updated. |
The latest change added a filter |
$like_args['show_faces'] = (bool) $like_args['show_faces'] ? 'true' : 'false'; | ||
$like_args['stream'] = (bool) $like_args['stream'] ? 'timeline' : 'false'; | ||
$like_args['cover'] = (bool) $like_args['cover'] ? 'false' : 'true'; | ||
$like_args['small_header'] = (bool) $like_args['small_header'] ? 'true' : 'false'; |
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.
What's the current default value for this header? If I update Jetpack, will my header change unless I go to the widget options and toggle this new option?
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.
Fixed this by adding a value of true
to small_header
to get_default_args
function. I think that's what you wanted here but let me know if I'm wrong 😅
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.
I think it should default to false
, since that's the default value in the Page Plugin. The idea is for the widget to look the same when folks will update Jetpack, so the large header has to stay until you decide to have a smaller header instead.
codestor4, Your synced wpcom patch D33973-code has been updated. |
$like_args['show_faces'] = (bool) $like_args['show_faces'] ? 'true' : 'false'; | ||
$like_args['stream'] = (bool) $like_args['stream'] ? 'timeline' : 'false'; | ||
$like_args['cover'] = (bool) $like_args['cover'] ? 'false' : 'true'; | ||
$like_args['small_header'] = (bool) $like_args['small_header'] ? 'true' : 'false'; |
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.
I think it should default to false
, since that's the default value in the Page Plugin. The idea is for the widget to look the same when folks will update Jetpack, so the large header has to stay until you decide to have a smaller header instead.
modules/widgets/facebook-likebox.php
Outdated
* | ||
* @param bool True value hides the call to action button | ||
*/ | ||
$hide_cta = apply_filters( 'jetpack_facebook_likebox_hide_cta', true ); |
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.
I would default to false
here as well, for the same reasons as above.
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.
Oh right. Sorry, I checked now and the default is indeed false for both small_header
and hide_cta
- https://developers.facebook.com/docs/plugins/page-plugin/ I'll make this change now.
codestor4, Your synced wpcom patch D33973-code has been updated. |
codestor4, Your synced wpcom patch D33973-code has been updated. |
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.
Thanks for these updates. This looks good to me now.
codestor4, Your synced wpcom patch D33973-code has been updated. |
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.
This should be good to go now!
r204387-wpcom |
* Initial changelog entry * Changelog: add #14904 * Changelog: add #14910 * Changelog: add #14913 * Changelog: add #14916 * Changelog: add #14922 * Changelog: add #14924 * Changelog: add #14925 * Changelog: add #14928 * Changelog: add #14840 * Changelog: add #14841 * Changelog: add #14842 * Changelog: add #14826 * Changelog: add #14835 * Changelog: add #14859 * Changelog: add #14884 * Changelog: add #14888 * Changelog: add #14817 * Changelog: add #14814 * Changelog: add #14819 * Changelog;: add #14797 * Changelog: add #14798 * Changelog: add #14802 * Changelog: add #13676 * Changelog: add #13744 * Changelog: add #13777 * Changelog: add #14446 * Changelog: add #14739 * Changelog: add #14770 * Changelog: add #14784 * Changelog: add #14897 * Changelog: add #14898 * Changelog: add #14968 * Changelog: add #14985 * Changelog: add #15044 * Changelog: add #15052 * Update to remove Podcast since it remains in Beta * Changelog: add #14803 * Changelog: add #15028 * Changelog: add #15065 * Changelog:add #14886 * Changelog: add #15118 * Changelog: add #14990 * Changelog: add #14528 * Changelog: add #15120 * Changelog: add #15126 * Changelog: add #15049 * Chanegelog: add #14852 * Changelog: add #15090 * Changelog: add #15138 * Changelog: add #15124 * Changelog:add #15055 * Changelog: add #15017 * Changelog: add #15109 * Changelog: add #15145 * Changelog:add #15096 * Changelog:add #15153 * Changelog: add #15133 * Changelog: add #14960 * Changelog: add #15127 * Changelog: add #15056 * Copy current changelog to changelog archive. * Clarify changelog description
Changes proposed in this Pull Request:
Fixes #9270
Testing instructions:
data-hide-cta="false" data-small-header="false"
hide call to action
andshow small header
options.data-hide-cta="true" data-small-header="true"
in the element inspector.Proposed changelog entry for your changes:
Screenshot:
Other notes:
The third functionality
adapt-container-width
is covered by this #9889 issue and this #13740 PR.