Changeset 1071035
- Timestamp:
- 01/19/2015 01:31:06 PM (11 years ago)
- Location:
- userswitcher
- Files:
-
- 4 edited
-
readme.txt (modified) (1 diff)
-
style.css (modified) (3 diffs)
-
switch.js (modified) (1 diff)
-
userSwitcher.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
userswitcher/readme.txt
r1069673 r1071035 11 11 == Description == 12 12 13 userSwitcher allows you to switch to a between user roles or account without the hassle of logging in/out. It allows you to experience and know what you're users does within your site.13 userSwitcher allows you to switch between user account without the hassle of logging in/out. It allows you to experience and know what you're users does within your site. 14 14 15 15 == Installation == -
userswitcher/style.css
r1069862 r1071035 1 .switch-bg { 2 background: rgb(111,207,202); 3 background: -moz-linear-gradient(top, rgba(111,207,202,1) 0%, rgba(55,168,163,1) 100%); 4 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(111,207,202,1)), color-stop(100%,rgba(55,168,163,1))); 5 background: -webkit-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%); 6 background: -o-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%); 7 background: -ms-linear-gradient(top, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%); 8 background: linear-gradient(to bottom, rgba(111,207,202,1) 0%,rgba(55,168,163,1) 100%); 9 } 1 10 #switcher-form { 2 11 position: absolute; 3 12 border: 1px #ddd solid; 4 background: #000;5 13 margin: 0; 6 14 z-index: 999; 7 background: #000 url(arrow_switch_right.png) no-repeat left center; 8 padding: 4px 5px 4px 35px; 9 vertical-align: middle; 15 left:0; 16 padding: 1px 0; 10 17 cursor: pointer; 11 18 height: 30px; 12 width: auto; 19 width: 120px; 20 text-indent: 0; 13 21 } 14 22 #switcher-form select, 15 23 #wpadminbar #switcher-form select { 16 24 position: relative; 17 margin:0; 25 font-size: 14px; 26 padding: 0; 27 -moz-border-radius: 0; 28 border-radius: 0; 18 29 display: table; 19 30 vertical-align: middle; 20 top:0;21 padding-left:0;22 padding-right:0;23 -moz-border-radius: 0;24 border-radius: 0;25 font-size: 14px;26 border: 1px #ddd solid;27 31 width: 0; 28 32 overflow: hidden; … … 33 37 -moz-transform: translate3d(0,0,0); 34 38 transform: translate3d(0,0,0); 39 margin: 0 0 0 110px; 35 40 cursor: pointer; 41 border:0; 42 outline: none; 36 43 } 37 44 #switcher-form option { … … 41 48 #switcher-form .switch-icon { 42 49 position: absolute; 43 top:0; 44 left: 0; 45 width: 30px; 50 left:0; 46 51 height: 100%; 52 padding-left: 30px; 53 padding-right:5px; 54 color: #333; 55 line-height: 28px; 56 background: url(arrow_switch_right.png) no-repeat left center; 47 57 } 48 58 #switcher-form.switch-fixed { 49 59 position: fixed; 50 right:0;60 left:0; 51 61 bottom:0; 62 } 63 #switcher-form.switch-fixed select { 64 margin-left: 115px; 52 65 } 53 66 #switcher-form.switch-admin { -
userswitcher/switch.js
r1069868 r1071035 3 3 toggleSwitcher = function(){ 4 4 var target = $(this), form = target.parents('form').first(), box = form.find('select'); 5 is_open = box.width() > 40;6 box.css({width: is_open ? 0 : 200 });5 is_open = box.width() > 20; 6 box.css({width: is_open ? 0 : 120 }); 7 7 }; 8 8 -
userswitcher/userSwitcher.php
r1069868 r1071035 2 2 /** 3 3 * Plugin Name: userSwitcher 4 * Plugin URI: http://irenemitchell.com/userswitcher 4 5 * Description: Experience what you're user experienced and know what they can do to your site without logging in/out. 5 6 * Version: 1.0 6 7 * Author: Irene A. Mitchell 8 * Author URI: http://irenemitchell.com 7 9 * License: GPLv2 or later 8 10 **/ … … 104 106 ?> 105 107 <script type="text/template" id="switcher-template"> 106 <form method="post" action="<?php _e(admin_url()); ?>options.php" id="switcher-form">108 <form method="post" action="<?php _e(admin_url()); ?>options.php" class="switch-bg" id="switcher-form"> 107 109 <input type="hidden" name="option_page" value="<?php _e( esc_attr( 'user_switcher' ) ); ?>" /> 108 110 <input type="hidden" name="action" value="update" /> 109 111 <?php wp_nonce_field("user_switcher-options");?> 110 <span class="switch-icon"> </span>112 <span class="switch-icon">userSwitcher</span> 111 113 <select tabindex="1" name="user_switcher[<?php _e($this->current_switcher); ?>]"> 112 114 <option value="guest" <?php selected('guest', $this->user_switcher); ?>>Guest</option>
Note: See TracChangeset
for help on using the changeset viewer.