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

Link "Cache Stats" button in Admin Bar to the Cache Stats page #263

Closed
wants to merge 1 commit into from

Conversation

renzms
Copy link
Contributor

@renzms renzms commented Jun 21, 2016

@renzms
Copy link
Contributor Author

renzms commented Jun 21, 2016

screen shot 2016-06-22 at 7 08 44 am

@jaswsinc I've changed the Cache Stats link to: '.esc_attr(add_query_arg(urlencode_deep(['page' => GLOBAL_NS.'-stats']), network_admin_url('/admin.php'))).', like the ​_More Info_​ button.

The link is not clickable as is. But if you right click it and open in new tab it goes to the link.

Raam noted I may need to work on the JS too, any pointers on how to fix that?

@@ -231,7 +231,7 @@ public function adminBarMenu(\WP_Admin_Bar &$wp_admin_bar)
'id' => GLOBAL_NS.'-stats',

'title' => __('Cache Stats', SLUG_TD),
'href' => '#',
'href' => ''.esc_attr(add_query_arg(urlencode_deep(['page' => GLOBAL_NS.'-stats']), network_admin_url('/admin.php'))).'',
Copy link
Contributor

@jaswrks jaswrks Jun 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renzms You can make this a little cleaner by removing the two single-quotes; i.e., => ''.esc_attr( on the beginning and end of this string would only be needed if there was something inside them; e.g., => 'something'.esc_attr(. In this case there is not, so it can just be => esc_attr( ....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renzms You can make this a little cleaner by removing the two single-quotes; i.e., => ''.esc_attr( on the beginning and end of this string would only be needed if there was something inside them; e.g., => 'something'.esc_attr(. In this case there is not, so it can just be => esc_attr( ....

Thanks for tip!

@jaswrks
Copy link
Contributor

jaswrks commented Jun 24, 2016

Raam noted I may need to work on the JS too, any pointers on how to fix that?

Try commenting out this line and then minify the JS file and give it a shot.

@renzms
Copy link
Contributor Author

renzms commented Jun 25, 2016

Try commenting out this line and then minify the JS file and give it a shot.

@jaswsinc That worked! Thanks for all the tips!

@raamdev Tested and ready for review!

@raamdev
Copy link
Contributor

raamdev commented Jun 25, 2016

@renzms Tested and merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants