Plugin Directory

Changeset 1113798


Ignore:
Timestamp:
03/16/2015 10:49:03 AM (11 years ago)
Author:
rigorousrich
Message:

Refactored code so that pluggable isn't included anymore

Location:
dovetail/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dovetail/trunk/FP-members.php

    r1092520 r1113798  
    55    require_once 'classes/registration-actions.php';
    66    require_once 'classes/class.shortcodes.php';
    7     require_once dirname( __FILE__ ).'/../../../wp-includes/pluggable.php';
    87
    98    /**
     
    1514     *  Description: Dovetail adds basic yet beautiful membership tools to your WordPress website. Use and enjoy.
    1615     *  Author: Rigorous & Factory Pattern
    17      *  Version: 1.2.5
     16     *  Version: 1.2.6
    1817     *  Author URI: https://rigorous-digital.co.uk/author/admin
    1918     */
     
    5756                //add_filter( 'registration_redirect', 'fp_registration_pay' );
    5857
    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' );
    6359
    6460                // Add the links to the admin bar
     
    6864
    6965                $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                }
    7073            }
    7174
     
    8487                include_once( plugin_dir_path( __FILE__ ) . 'classes/class.role-editor.php');
    8588
     89                /*
    8690                // 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 ) ) {
    8892                    wp_redirect( home_url() );
    8993                    exit;
    9094                }
     95                */
    9196            }
    9297
  • dovetail/trunk/readme.txt

    r1092520 r1113798  
    5252== Changelog ==
    5353
     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
    5458= 1.2.5 =
    5559
Note: See TracChangeset for help on using the changeset viewer.