Changeset 588973
- Timestamp:
- 08/22/2012 07:18:42 PM (14 years ago)
- Location:
- no-more-admin
- Files:
-
- 2 edited
- 3 copied
-
tags/2.0 (copied) (copied from no-more-admin/trunk)
-
tags/2.0/no-more-admin.php (copied) (copied from no-more-admin/trunk/no-more-admin.php) (2 diffs)
-
tags/2.0/readme.txt (copied) (copied from no-more-admin/trunk/readme.txt) (3 diffs)
-
trunk/no-more-admin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
no-more-admin/tags/2.0/no-more-admin.php
r581339 r588973 4 4 Plugin URI: http://www.confusedthoughts.com 5 5 Description: This disables access to wp-admin to all users who are not admins. 6 Version: 1.07 Author: Lee Thompson 6 Version: 2.0 7 Author: Lee Thompson 8 8 Author URI: http://www.confusedthoughts.com 9 9 License: GPL2 … … 26 26 */ 27 27 28 $wpba_required_capability = 'edit_others_posts'; 29 $wpba_redirect_to = ''; 30 28 31 add_action('admin_init', 'no_more_dashboard'); 29 32 function no_more_dashboard() { 30 if (!current_user_can('manage_options') && $_SERVER['DOING_AJAX'] != '/wp-admin/admin-ajax.php') { 31 wp_redirect(site_url()); exit; 32 } 33 global $wpba_required_capability, $wpba_redirect_to; 34 if ( 35 stripos($_SERVER['REQUEST_URI'],'/wp-admin/') !== false 36 && 37 stripos($_SERVER['REQUEST_URI'],'async-upload.php') == false 38 && 39 stripos($_SERVER['REQUEST_URI'],'admin-ajax.php') == false 40 ) { 41 if (!current_user_can($wpba_required_capability)) { 42 if ($wpba_redirect_to == '') { $wpba_redirect_to = get_option('siteurl'); } 43 wp_redirect($wpba_redirect_to,302); 44 } 45 } 33 46 } 47 ?> 34 48 35 ?> -
no-more-admin/tags/2.0/readme.txt
r581339 r588973 5 5 Requires at least: 3.0 6 6 Tested up to: 3.4.1 7 Stable tag: 1.07 Stable tag: 2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 33 33 == Screenshots == 34 34 35 There are no screenshots, but you can test it [confusedthoughts](http://www.confusedthoughts.com ) here35 There are no screenshots, but you can test it [confusedthoughts](http://www.confusedthoughts.com/wp-admin) 36 36 37 37 == Changelog == … … 40 40 * Initial Release 41 41 42 = 2.0 = 43 * This version allows for the use of ajax call from the front end. Also compatable with Buddypress 44 42 45 == Upgrade Notice == 43 46 44 47 = 1.0 = 45 48 * Initial Release 49 50 = 2.0 = 51 * This version allows for the use of ajax call from the front end. Also compatable with Buddypress -
no-more-admin/trunk/no-more-admin.php
r581339 r588973 4 4 Plugin URI: http://www.confusedthoughts.com 5 5 Description: This disables access to wp-admin to all users who are not admins. 6 Version: 1.07 Author: Lee Thompson 6 Version: 2.0 7 Author: Lee Thompson 8 8 Author URI: http://www.confusedthoughts.com 9 9 License: GPL2 … … 26 26 */ 27 27 28 $wpba_required_capability = 'edit_others_posts'; 29 $wpba_redirect_to = ''; 30 28 31 add_action('admin_init', 'no_more_dashboard'); 29 32 function no_more_dashboard() { 30 if (!current_user_can('manage_options') && $_SERVER['DOING_AJAX'] != '/wp-admin/admin-ajax.php') { 31 wp_redirect(site_url()); exit; 32 } 33 global $wpba_required_capability, $wpba_redirect_to; 34 if ( 35 stripos($_SERVER['REQUEST_URI'],'/wp-admin/') !== false 36 && 37 stripos($_SERVER['REQUEST_URI'],'async-upload.php') == false 38 && 39 stripos($_SERVER['REQUEST_URI'],'admin-ajax.php') == false 40 ) { 41 if (!current_user_can($wpba_required_capability)) { 42 if ($wpba_redirect_to == '') { $wpba_redirect_to = get_option('siteurl'); } 43 wp_redirect($wpba_redirect_to,302); 44 } 45 } 33 46 } 47 ?> 34 48 35 ?> -
no-more-admin/trunk/readme.txt
r581339 r588973 5 5 Requires at least: 3.0 6 6 Tested up to: 3.4.1 7 Stable tag: 1.07 Stable tag: 2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 33 33 == Screenshots == 34 34 35 There are no screenshots, but you can test it [confusedthoughts](http://www.confusedthoughts.com ) here35 There are no screenshots, but you can test it [confusedthoughts](http://www.confusedthoughts.com/wp-admin) 36 36 37 37 == Changelog == … … 40 40 * Initial Release 41 41 42 = 2.0 = 43 * This version allows for the use of ajax call from the front end. Also compatable with Buddypress 44 42 45 == Upgrade Notice == 43 46 44 47 = 1.0 = 45 48 * Initial Release 49 50 = 2.0 = 51 * This version allows for the use of ajax call from the front end. Also compatable with Buddypress
Note: See TracChangeset
for help on using the changeset viewer.