-
Notifications
You must be signed in to change notification settings - Fork 843
Add icon and font parity with other Publish items #9005
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
Conversation
ebinnion
left a comment
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.
It looks like most, if not all, of these security issues existed before this PR. But, if we're touching the code, we should probably go ahead and fix them.
modules/publicize/ui.php
Outdated
| ?> | ||
| <div id="publicize" class="misc-pub-section misc-pub-section-last"> | ||
| <span id="publicize-title"> | ||
| <?php _e( 'Social Sharing:', 'jetpack' ); ?> |
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.
We should escape this translation by using esc_html_e().
modules/publicize/ui.php
Outdated
| <?php if ( 0 < count( $services ) ) : ?> | ||
| <?php list( $publicize_form, $active ) = $this->get_metabox_form_connected( $services ); ?> | ||
| <span id="publicize-defaults"><strong><?php echo join( '</strong>, <strong>', array_map( 'esc_html', $active ) ); ?></strong></span><br /> | ||
| <a href="#" id="publicize-form-edit"><?php _e( 'Edit', 'jetpack' ); ?></a> <a href="<?php echo admin_url( 'options-general.php?page=sharing' ); ?>" target="_blank"><?php _e( 'Settings', 'jetpack' ); ?></a><br /> |
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.
We should escape these translations as well with esc_html_e().
| <a href="#" id="publicize-form-edit"><?php _e( 'Edit', 'jetpack' ); ?></a> <a href="<?php echo admin_url( 'options-general.php?page=sharing' ); ?>" target="_blank"><?php _e( 'Settings', 'jetpack' ); ?></a><br /> | ||
| <?php else : ?> | ||
| <?php $publicize_form = $this->get_metabox_form_disconnected( $available_services ); ?> | ||
| <strong><?php echo __( 'Not Connected', 'jetpack' ); ?></strong> |
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.
We should escape this translation as well with esc_html_e().
modules/publicize/ui.php
Outdated
| <?php else : ?> | ||
| <?php $publicize_form = $this->get_metabox_form_disconnected( $available_services ); ?> | ||
| <strong><?php echo __( 'Not Connected', 'jetpack' ); ?></strong> | ||
| <a href="#" id="publicize-disconnected-form-show"><?php _e( 'Edit', 'jetpack' ); ?></a><br /> |
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.
Same here.
modules/publicize/ui.php
Outdated
|
|
||
| // If this one has already been publicized to, don't let it happen again | ||
| $disabled = ''; | ||
| if ( $done ) |
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.
We should probably use brackets for this if.
modules/publicize/ui.php
Outdated
| <div id="pub-connection-tests"></div> | ||
| <?php endif; ?> | ||
| <?php // #publicize-form | ||
| <a href="#" class="hide-if-no-js button" id="publicize-form-hide"><?php _e( 'OK', 'jetpack' ); ?></a> |
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.
We should escape this translation with esc_html_e().
modules/publicize/ui.php
Outdated
| <ul class="not-connected"> | ||
| <?php foreach ( $available_services as $service_name => $service ) : ?> | ||
| <li> | ||
| <a class="pub-service" data-service="<?php echo esc_attr( $service_name ); ?>" title="<?php echo esc_attr( sprintf( __( 'Connect and share your posts on %s', 'jetpack' ), $this->publicize->get_service_label( $service_name ) ) ); ?>" target="_blank" href="<?php echo $this->publicize->connect_url( $service_name ); ?>"> |
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.
We should probably esc href with esc_url().
modules/publicize/ui.php
Outdated
| </li> | ||
| <?php endforeach; ?> | ||
| </ul> | ||
| <a href="#" class="hide-if-no-js button" id="publicize-disconnected-form-hide"><?php _e( 'OK', 'jetpack' ); ?></a> |
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.
We should escape this translation with esc_html_e().
modules/publicize/ui.php
Outdated
| <?php _e( 'Social Sharing:', 'jetpack' ); ?> | ||
| <?php if ( 0 < count( $services ) ) : ?> | ||
| <?php list( $publicize_form, $active ) = $this->get_metabox_form_connected( $services ); ?> | ||
| <span id="publicize-defaults"><strong><?php echo join( '</strong>, <strong>', array_map( 'esc_html', $active ) ); ?></strong></span><br /> |
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 took me a little bit to grok. I'd probably change it to:
<span id="publicize-defaults">
<?php foreach ( $active as $item ) : ?>
<strong><?php echo esc_html( $item ); ?></strong>
<?php endforeach; ?>
</span>
modules/publicize/ui.php
Outdated
| <?php if ( 0 < count( $services ) ) : ?> | ||
| <?php list( $publicize_form, $active ) = $this->get_metabox_form_connected( $services ); ?> | ||
| <span id="publicize-defaults"><strong><?php echo join( '</strong>, <strong>', array_map( 'esc_html', $active ) ); ?></strong></span><br /> | ||
| <a href="#" id="publicize-form-edit"><?php _e( 'Edit', 'jetpack' ); ?></a> <a href="<?php echo admin_url( 'options-general.php?page=sharing' ); ?>" target="_blank"><?php _e( 'Settings', 'jetpack' ); ?></a><br /> |
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.
Also, the href should be escaped with esc_url().
|
I noticed that you've changed the label to "Social Sharing". If we're going to change that label here (which is probably the most-interacted-with place it exists), then we probably should think about changing it throughout our UI, documentation, etc, and being sure that "Social Sharing" (vs "Automated Sharing", or anything else) is exactly what we want. cc @richardmuscat @rickybanister It's probably best to leave it as Publicize as part of this changeset, but then that would be one more "brand name" we could get rid of out of Jetpack. |
|
@beaulebens I changed that label back Thank you both! |
keoshi
left a comment
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.
Looking good, ship it!
* Changelog 6.0: create base for changelog. * Add #8938 to changelog * Add #8962 to changelog * Add #8974 to changelog * Add #8975 to changelog * Add #8978 to changelog * Add #8867 to changelog * Add #8937 to changelog * Add #8961 to changelog * Add #8855 to changelog * Add #8944 to changelog * Add #8973 to changelog * Add #8977 to changelog * Add #8979 to changelog * Add #8980 to changelog * Add #8982 to changelog * Add #8983 to changelog * Add #8984 to changelog * Add #8986 to changelog * Add #9005 to changelog * Add #9010 to changelog * Add #9012 to changelog * Add #9021 to changelog * Add #9022 to changelog * Add #9056 to changelog * Add #9061 to changelog * Add #9079 to changelog * Add #9080 to changelog * Add #9088 to changelog * Add #9096 to changelog * Add #9097 to changelog * Add #9100 to changelog * Add #9107 to changelog * Add #8969 to changelog * Add #8993 to changelog * Add #9003 to changelog * Add #9031 to changelog * Add #8945 to changelog * Add #9052 to changelog * Add #9058 to changelog * Add #9066 to changelog * Add #9076 to changelog * Add #9053 to changelog * Add #9108 to changelog * Add #9135 to changelog * Add #9148 to changelog * Add #9125 to changelog * Add #9137 to changelog * Added testing instructions for 6.0. * Added IS testing instructions, huge props to @tiagonoronha. * Added #8498 to changelog. * Added #8954 to changelog. * Added #8985 to changelog. * add #9027 * add #9112 to changelog * add #9136 to changelog * add #9102 to changelog * add #9093 to changelog * add #9062 to changelog * add #9172 to changelog
Fixes #8919
Changes proposed in this Pull Request:
Testing instructions:
Screenshots
Not connected, closed:
Not connected, open:
Connected, closed:
Connected, open:
Proposed changelog entry for your changes:
Make styling of Publicize more consistent with wp-admin.