Changeset 1090494
- Timestamp:
- 02/15/2015 01:22:16 PM (11 years ago)
- Location:
- no-login/trunk
- Files:
-
- 3 edited
-
nologin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
screenshot-1.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
no-login/trunk/nologin.php
r892400 r1090494 5 5 Description: Never authenticate, you're always the admin. Obviously for test sites! 6 6 Author: Ozh 7 Version: 1. 0.27 Version: 1.1 8 8 Author URI: http://planetozh.com/ 9 9 */ 10 10 11 /**/12 11 if (!function_exists('wp_validate_auth_cookie')) { 13 function wp_validate_auth_cookie() {14 return 1;15 }16 add_action( 'admin_enqueue_scripts', 'ozh_nologin_enqueue' );17 add_action( 'admin_notices', 'ozh_nologin_warn');12 function wp_validate_auth_cookie() { 13 return 1; 14 } 15 add_action( 'admin_head', 'ozh_nologin_admin_css' ); 16 add_action( 'wp_before_admin_bar_render', 'ozh_nologin_custom_toolbar', 999 ); 18 17 } 19 18 20 function ozh_nologin_enqueue() { 21 wp_enqueue_script('jquery'); 19 20 function ozh_nologin_admin_css() { 21 echo ' 22 <style> 23 #wp-admin-bar-debug-bar-no-login > .ab-item { 24 color:red; 25 font-weight:bolder; 26 background-color: #ffa; 27 background: rgb(254,252,234); 28 background: -moz-linear-gradient(top, rgb(254,252,234) 0%, rgb(241,218,54) 100%); 29 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(254,252,234)), color-stop(100%,rgb(241,218,54))); 30 background: -webkit-linear-gradient(top, rgb(254,252,234) 0%,rgb(241,218,54) 100%); 31 background: -o-linear-gradient(top, rgb(254,252,234) 0%,rgb(241,218,54) 100%); 32 background: -ms-linear-gradient(top, rgb(254,252,234) 0%,rgb(241,218,54) 100%); 33 background: linear-gradient(to bottom, rgb(254,252,234) 0%,rgb(241,218,54) 100%); 34 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#fefcea", endColorstr="#f1da36",GradientType=0 ); 35 } 36 37 #wp-admin-bar-debug-bar-no-login .ab-submenu .ab-item{ 38 color:#ffa; 39 background:red; 40 } 41 42 #wp-admin-bar-debug-bar-no-login > .ab-item:before { 43 content: "\f348"; 44 color:red; 45 display: inline-block; 46 -webkit-font-smoothing: antialiased; 47 } 48 </style> 49 '; 22 50 } 23 51 24 function ozh_nologin_warn() { 25 echo '<div class="updated fade" id="ozh_nologin" style="background:#ff0;text-align:center;color: red;"><p><strong>No Login <u>activated</u> - anybody gets admin rights!</strong> <span onclick="javascript:jQuery(this).parent().parent().slideToggle(200)" style="cursor:pointer">[dismiss]</span> </p></div>'; 52 function ozh_nologin_custom_toolbar() { 53 global $wp_admin_bar; 54 55 $args = array( 56 'id' => 'debug-bar-no-login', 57 'title' => 'No Login Mode !', 58 ); 59 $wp_admin_bar->add_menu( $args ); 60 61 $args = array( 62 'id' => 'debug-bar-no-login-child', 63 'parent' => 'debug-bar-no-login', 64 'title' => 'Everybody gets admin rights. Do not use on live sites!', 65 ); 66 $wp_admin_bar->add_menu( $args ); 67 26 68 } 27 69 -
no-login/trunk/readme.txt
r641604 r1090494 3 3 Tags: ozh, login, auth, admin, nologin 4 4 Contributors: ozh 5 Requires at least: 2.05 Requires at least: 3.3 6 6 Tested up to: 9.9 7 7 Stable tag: trunk
Note: See TracChangeset
for help on using the changeset viewer.