Changeset 1113798
- Timestamp:
- 03/16/2015 10:49:03 AM (11 years ago)
- Location:
- dovetail/trunk
- Files:
-
- 2 edited
-
FP-members.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dovetail/trunk/FP-members.php
r1092520 r1113798 5 5 require_once 'classes/registration-actions.php'; 6 6 require_once 'classes/class.shortcodes.php'; 7 require_once dirname( __FILE__ ).'/../../../wp-includes/pluggable.php';8 7 9 8 /** … … 15 14 * Description: Dovetail adds basic yet beautiful membership tools to your WordPress website. Use and enjoy. 16 15 * Author: Rigorous & Factory Pattern 17 * Version: 1.2. 516 * Version: 1.2.6 18 17 * Author URI: https://rigorous-digital.co.uk/author/admin 19 18 */ … … 57 56 //add_filter( 'registration_redirect', 'fp_registration_pay' ); 58 57 59 /* Show admin bar only for admins and editors */ 60 if ( !current_user_can('edit_posts') ) { 61 add_filter('show_admin_bar', '__return_false'); 62 } 58 add_action( 'plugins_loaded', 'dovetail_hide_adminbar' ); 63 59 64 60 // Add the links to the admin bar … … 68 64 69 65 $shortcodes = new FP_Shortcodes(); 66 } 67 68 function dovetail_hide_adminbar() { 69 /* Show admin bar only for admins and editors */ 70 if ( !current_user_can('administrator') ) { 71 add_filter('show_admin_bar', '__return_false'); 72 } 70 73 } 71 74 … … 84 87 include_once( plugin_dir_path( __FILE__ ) . 'classes/class.role-editor.php'); 85 88 89 /* 86 90 // Ban non-admins from viewing the admin area 87 if ( ( !current_user_can( ' manage_options' ) ) && ( defined( 'DOING_AJAX' ) == false ) ) {91 if ( ( !current_user_can( 'administrator' ) ) && ( defined( 'DOING_AJAX' ) == false ) ) { 88 92 wp_redirect( home_url() ); 89 93 exit; 90 94 } 95 */ 91 96 } 92 97 -
dovetail/trunk/readme.txt
r1092520 r1113798 52 52 == Changelog == 53 53 54 = 1.2.6 = 55 56 * Refactored code so that pluggable isn't included anymore. This was causing some issues with other plugins that needed to replace pluggable functions. 57 54 58 = 1.2.5 = 55 59
Note: See TracChangeset
for help on using the changeset viewer.