Det här tillägget har inte testats med någon av de 3 senaste huvudversionerna av WordPress. Det kanske inte längre underhålls och kan ha kompatibilitetsproblem när det används tillsammans med nyare versioner av WordPress.

Responsive Page Tester

Beskrivning

Similar functionality has been developed for the Theme Customizer API and was merged into WordPress core as of version 4.5. This plugin will automatically deactivate when you install WordPress 4.5.

When viewing the front end of the site, a ”Responsive” button is added to the WordPress Toolbar. Clicking that will toggle an overlay with your website presented in various sizes for easy responsive design testing.

This can be useful both during theme development, and when writing content to verify it will be presented properly.

This plugin is a heavily modified version of Matt Kersley’s Responsive Design Testing.

Skärmdumpar

  • Responsive Tester button in the WordPress Toolbar
  • Responsive Tester overlay - mobile sizes
  • Responsive Tester overlay - iPad sizes
  • Options
  • Width only setting
  • One Size Fits All option

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ’Plugins’ menu in WordPress
  3. View any front end page and click the Responsive button in the WordPress Toolbar.

Vanliga frågor

The plugin keeps deactivating itself.

As of WordPress 4.5, functionality similar to this plugin’s exists in core through the Theme Customizer API. The plugin will automatically deactivate itself. You are encouraged to use the core feature instead.

Can I add or remove screen sizes to the tester?

Yes you can! In version 2.0, we added a filter that makes it very easy to add or delete screen sizes from the Responsive Page Tester.

function mythemename_filter_rpt_sizes( $sizes ) {
    //Add a size
    $sizes['1024x600'] = array( 'width' => 1024, 'height' => 600, 'description' => '(Galaxy tablet)' );

    //Remove a size
    unset( $sizes['240x320'] );

    //Return our filtered sizes
    return $sizes;
}
add_filter( 'rpt_screen_sizes', 'mythemename_filter_rpt_sizes' );
I don’t have a WordPress Toolbar on my front end pages.

There is a setting on your profile edit screen labeled ”Toolbar”. This needs to be checked for you to see the WordPress Toolbar on the front end of your website.

If this is checked, and you still are not seeing the Toolbar, then your theme or another plugin is hiding it.

My site does not change in the different sized iframes

If the site presentation does not change to fit the width of the iframes, it can be one of two things.

  1. Your theme is not a responsive WordPress theme. Perhaps try one from the WordPress Theme Directory that is!
  2. You are using a browser that does not support media queries. While media query support is pretty extensive, Internet Explorer did not add support until version 9.0.
Will this perform any HiDPI screen responsiveness?

No, it will not. This plugin does not actually do anything to make your site responsive. It merely presents it to you in different iframes to show you how it will show up. If you want to add some HiDPI support, maybe check out @desrosj’s Simple WP Retina plugin.

Recensioner

3 september 2016 1 svar
After installing this plugin I had lots of errors appearing on my screen when I wanted to activate it. I then decided to de-activate and delete the plugin. Each time I went to delete this SINGLE plugin, I'd get a message asking me to confirm that I wanted to delete ALL my plugins. Obviously this was not the case. Now I have this untrustworthy plugin on my dashboard and would like to have it either work properly or be deleted all together without affecting my other plugins.
Läs alla 10 betyg

Bidragsgivare och utvecklare

”Responsive Page Tester” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

Översätt ”Responsive Page Tester” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

3.0

2.0

  • Added the rpt_screen_sizes filter allowing devs to add or take out sizes.
  • Cleaned up the JavaScript & CSS.
  • Converted JavaScript to use the jQueryUI framework.
  • Adjusted the CSS so theme styles are less likely to hijack the tester’s styling.
  • Redid the toolbar interface.
  • You can now use the ESC key to close the Responsive Page Tester.
  • Added a dropdown menu to the WordPress Toolbar menu item for quick size selecting.

1.0

  • Hej världen!
  • Allows you to test your site in different device sizes to ensure it displays properly