Theme Test Drive - Version 2.9

Version Description

  • WordPress 4.1 refresh and compatibility
Download this release

Release Info

Developer freediver
Plugin Icon 128x128 Theme Test Drive
Version 2.9
Comparing to
See all releases

Code changes from version 2.8.4 to 2.9

Files changed (3) hide show
  1. i/mwp250_2.png +0 -0
  2. readme.txt +6 -4
  3. themedrive.php +29 -18
i/mwp250_2.png ADDED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: freediver
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
4
  Tags: theme, themes, admin, test
5
  Requires at least: 2.3
6
- Tested up to: 4.0
7
  Stable tag: trunk
8
 
9
  Safely test drive any theme as an administrator, while visitors use the default one.
@@ -18,12 +18,14 @@ Best part is you can even set the testing theme options (if it has them) in the
18
 
19
  You can also preview any theme by adding "?theme=xxx" to your blog URL. For example http://www.myblog.com/?theme=Default
20
 
21
- Plugin by Vladimir Prelovac.
22
-
23
- Managing Multiple WordPress sites? Check out <a href="https://managewp.com">ManageWP</a>.
24
 
25
  == Changelog ==
26
 
 
 
 
 
27
  = 2.8.4 =
28
  * Removed the versionc hecking code
29
  * WP 3.5.1 compatible
3
  Donate link: https://www.networkforgood.org/donation/MakeDonation.aspx?ORGID2=920155875
4
  Tags: theme, themes, admin, test
5
  Requires at least: 2.3
6
+ Tested up to: 4.2
7
  Stable tag: trunk
8
 
9
  Safely test drive any theme as an administrator, while visitors use the default one.
18
 
19
  You can also preview any theme by adding "?theme=xxx" to your blog URL. For example http://www.myblog.com/?theme=Default
20
 
21
+ Plugin by Vladimir Prelovac. Managing more than one WordPress sites? Check out <a href="https://managewp.com">ManageWP</a>.
 
 
22
 
23
  == Changelog ==
24
 
25
+ = 2.9 =
26
+ * WordPress 4.1 refresh and compatibility
27
+
28
+
29
  = 2.8.4 =
30
  * Removed the versionc hecking code
31
  * WP 3.5.1 compatible
themedrive.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive
5
  Description: Safely test drive any theme while visitors are using the default one. Includes instant theme preview via thumbnail.
6
  Author: Vladimir Prelovac
7
- Version: 2.8.4
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  To-Do:
@@ -15,9 +15,9 @@
15
 
16
  // // // PLUGIN CODE // // //
17
 
18
- $themedrive_localversion = "2.8.4";
19
 
20
- $wp_themedrive_plugin_url = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
21
 
22
  function themedrive_handle_theme($package)
23
  {
@@ -358,10 +358,10 @@
358
 
359
 
360
  $access_level = get_option('td_level');
361
- //if (empty($access_level))
362
- // $access_level = '10';
363
 
364
- $imgpath = $wp_themedrive_plugin_url . '/i';
365
  ?>
366
  <div class="wrap" >
367
  <h2>Theme Test Drive</h2>
@@ -370,8 +370,9 @@
370
 
371
  <div id="sideblock" style="float:right;width:270px;margin-left:10px;">
372
 
373
- <iframe width=270 height=800 frameborder="0" src="http://www.prelovac.com/plugin/news.php?id=5&utm_source=plugin&utm_medium=plugin&utm_campaign=Theme%2BTest%2BDrive"></iframe>
374
-
 
375
  </div>
376
 
377
  <div id="mainblock" style="width:710px">
@@ -400,16 +401,16 @@
400
  ?>
401
 
402
 
403
- <h3>Easy Theme Installation</h3>
404
-
405
- Enter the URL to the theme zip file and click Install theme.<br><br>
406
- <input style="border:1px solid #D1D1D1;width:400px;" name="install_theme" id="install_theme" value="" />
407
- <br>
408
- <input class="button" type="submit" name="theme_install" value="Install theme &raquo;" class="button-primary" />
409
- <br /><br />
410
- <h3>Usage</h3>
411
- <p>Select a theme to preview live on the site. Only administrator will be able to see the selected theme. </p>
412
- <p>Additionally you may add "?theme=xxx" to your blog url, where xxx is the theme name you want to test.</p>
413
  <?php
414
  themedrive_switcher();
415
  ?>
@@ -432,6 +433,16 @@ Alternatively, disabling this plug-in should also do the trick.
432
 
433
  </p>
434
 
 
 
 
 
 
 
 
 
 
 
435
  </form>
436
 
437
  </div>
4
  Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive
5
  Description: Safely test drive any theme while visitors are using the default one. Includes instant theme preview via thumbnail.
6
  Author: Vladimir Prelovac
7
+ Version: 2.9
8
  Author URI: http://www.prelovac.com/vladimir/
9
 
10
  To-Do:
15
 
16
  // // // PLUGIN CODE // // //
17
 
18
+ $themedrive_localversion = "2.9";
19
 
20
+ $wp_themedrive_plugin_url = trailingslashit(plugins_url(null, __FILE__));
21
 
22
  function themedrive_handle_theme($package)
23
  {
358
 
359
 
360
  $access_level = get_option('td_level');
361
+ if (empty($access_level))
362
+ $access_level = '10';
363
 
364
+ $imgpath = $wp_themedrive_plugin_url . 'i';
365
  ?>
366
  <div class="wrap" >
367
  <h2>Theme Test Drive</h2>
370
 
371
  <div id="sideblock" style="float:right;width:270px;margin-left:10px;">
372
 
373
+ <div class="ad">
374
+ <a href="https://managewp.com/?utm_source=Plugins&amp;utm_medium=Banner&amp;utm_content=mwp250_2&amp;utm_campaign=ThemeTestDrive" title="ManageWP.com - Manage your sites from one dashboard"><img src="<?php echo $imgpath ?>/mwp250_2.png" alt="ManageWP.com - Manage Multiple WordPress Sites"></a>
375
+ </div>
376
  </div>
377
 
378
  <div id="mainblock" style="width:710px">
401
  ?>
402
 
403
 
404
+
405
+ <h2>Usage</h2>
406
+ <ul>
407
+ <li>1. Select a theme to preview live on the site from the box below (lists all installed themes). </li>
408
+ <li>2. Enable Theme Test drive</li>
409
+ <li>3. Once you have customized the theme to my liking, disable Theme Test Drive and enable the theme in WordPress. It will keep all previous settings. (sometimes depending on the theme setting are not saved. I am still investigating this)</li>
410
+ </ul>
411
+ <p>Notes: Only administrator will be able to see the selected theme in Theme Test Drive. The site will show your normal theme to everyone else.</p>
412
+
413
+ <p>Additionally you may add "?theme=xxx" to your blog url, where xxx is the slug of the theme you want to test.</p>
414
  <?php
415
  themedrive_switcher();
416
  ?>
433
 
434
  </p>
435
 
436
+
437
+ <h2>Easy Theme Installation</h2>
438
+
439
+ Enter the URL to the theme zip file and click Install theme.<br><br>
440
+ <input style="border:1px solid #D1D1D1;width:400px;" name="install_theme" id="install_theme" value="" />
441
+ <br>
442
+ <input class="button" type="submit" name="theme_install" value="Install theme &raquo;" class="button-primary" />
443
+ <br /><br />
444
+
445
+
446
  </form>
447
 
448
  </div>