Skip to content

Commit

Permalink
NUX: Change manage link, remove unecessary links, retina spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
dereksmart committed Aug 6, 2015
1 parent 79bbb75 commit 72037ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions views/admin/admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@
<div class="j-col j-lrg-4 main-col">
<div class="nux-in">

<h3 title="<?php esc_attr_e( 'Performance &amp; Security', 'jetpack' ); ?>"><a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Performance &amp; Security tools', 'jetpack' ); ?>" target="_blank"></a><?php _e( 'Performance &amp; Security', 'jetpack' ); ?></h3>
<h3 title="<?php esc_attr_e( 'Performance &amp; Security', 'jetpack' ); ?>">
<?php /* Leave out until better link is available
<a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Performance &amp; Security tools', 'jetpack' ); ?>" target="_blank"></a>
*/ ?>
<?php _e( 'Performance &amp; Security', 'jetpack' ); ?>
</h3>

<?php // The template container from landing-page-templates.php ?>
<div id="nux-performance-security"></div>
Expand All @@ -61,7 +66,12 @@
<div class="j-col j-lrg-4 main-col">
<div class="nux-in">

<h3 title="<?php esc_attr_e( 'Traffic Boosting Tools', 'jetpack' ); ?>"><a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Traffic Boosting tools', 'jetpack' ); ?>" target="_blank"></a><?php _e( 'Traffic Boosting Tools', 'jetpack' ); ?></h3>
<h3 title="<?php esc_attr_e( 'Traffic Boosting Tools', 'jetpack' ); ?>">
<?php /* Leave out until better link is available
<a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Traffic Boosting tools', 'jetpack' ); ?>" target="_blank"></a>
*/ ?>
<?php _e( 'Traffic Boosting Tools', 'jetpack' ); ?>
</h3>

<?php // The template container from landing-page-templates.php ?>
<div id="nux-traffic"></div>
Expand Down Expand Up @@ -114,7 +124,8 @@

<div class="j-row goto">
<div class="j-col j-lrg-12 j-md-12 j-sm-12">
<a href="http://www.wordpress.com/plugins" class="button button-primary" title="<?php esc_attr_e( 'Go to WordPress.com to try these features', 'jetpack' ); ?>"><?php _e( 'Go to WordPress.com', 'jetpack' ); ?></a>
<?php $url_parsed = parse_url( get_site_url() ); ?>

This comment has been minimized.

Copy link
@jeherve

jeherve Aug 8, 2015

Member

I think this will create problems for sites that have a path, or where WordPress is hosted in a subdirectory. I think it'd be best to start from get_home_url, include the path, and transform / into :: in the plugins URL, as that's the standard used on WordPress.com.

I took a stab at this in f240c24 and 1ad9076. Let me know if that sounds reasonable.

Ideally, I'd prefer not to have to do this at all, get the blog ID from Jetpack_Options::get_option( 'id' ) instead, and append the ID to the URL, but it appears that we can't use blog ID in plugins URLs at the moment.
I reported this internally here:
Automattic/calypso-pre-oss#8719

<a href="<?php echo esc_url( 'http://www.wordpress.com/plugins/' . $url_parsed['host'] ); ?>" class="button button-primary" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com to try these features', 'jetpack' ); ?>"><?php _e( 'Go to WordPress.com', 'jetpack' ); ?></a>
</div>
</div><?php // j-row ?>

Expand Down
2 changes: 1 addition & 1 deletion views/admin/landing-page-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<input class="is-compact form-toggle" type="checkbox" id="active-{{ data.module }}" />
<# } #>
<label class="form-toggle__label" for="active-{{ data.module }}">
<img class="module-spinner-{{ data.module }}" style="display: none;" src="<?php echo esc_url( admin_url( 'images/spinner.gif' ) ); ?>" alt=""/>
<img class="module-spinner-{{ data.module }}" style="display: none;" width="16" src="<?php echo esc_url( plugins_url( 'images/wpspin_light-2x.gif', JETPACK__PLUGIN_FILE) ); ?>" alt="Loading ..." />
<# if ( 'vaultpress' !== data.module ) { #>
<label class="plugin-action__label" for="active-{{ data.module }}">
<# if ( data.activated ) { #>
Expand Down

0 comments on commit 72037ee

Please sign in to comment.