Notice: bp_setup_current_user was called incorrectly [FIX]

Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /…/wp-includes/functions.php on line 3622

If you’re getting the above notice, you’re going to need to disable _doing_it_wrong for the bbp_setup_current_user() function, here’s how!

/**
 * Disables trigger_error for doing_it_wrong_trigger_error filter.
 *
 * @return boolean false disables the if condition to trigger the error display.
 */
function remove_bbp_setup_current_user_notice_filter() {
    return false; // Disable trigger_error.
}

/**
 * If bbp_setup_current_user() runs _doing_it_wrong(), disable trigger_error.
 *
 * @param  string $function The function, here we test for bbp_setup_current_user().
 * @param  string $message  The message (no modifications here).
 * @param  string $version  Version (not used here).
 */
function remove_bbp_setup_current_user_notice( $function, $message, $version ) {
    if( 'bbp_setup_current_user' === $function ) {

        // Filter trigger_error
        add_filter( 'doing_it_wrong_trigger_error', 'remove_bbp_setup_current_user_notice_filter' );
    }
}
add_action( 'doing_it_wrong_run', 'remove_bbp_setup_current_user_notice', 10, 3 );

How to fix issue where external drive (non-NTFS) is being mounted as Read Only

This is what I did anyhow…

Here my external disk is Sling and it has the proper permissions root:admin. Before it had root:wheel which wasn’t allowing me to write to the disk as I did before.

To get the right permissions I used sudo chown root:admin Sling/. I thought that this permission would only apply one time, but I ejected and re-mounted and it kept the permission.

Hopefully this helps.

Add Show / Hide Hidden Files Menu in OS X

Finder View of Hidden Files

If you’re like me you work with those (dot) folders and files quite often, but don’t really enjoy the clutter. Plus, you’re probably going to mess with them in Terminal most of the time.

We can use Automator (an app build into your Mac) to create a new Service and add Run Shell Script with the following code (make sure and save it) that will add a Menu item to the application’s menu (right next to the Apple logo). Just navigate to Services sub-menu.

Automator Setup

Where it's located when you save...

You can also add a quick Keyboard Shortcut to it by going to your Keyboard Preferences > Shortcuts.

Keyboard Shortcut

Load your .bash_profile (.bashrc) when you load Conque in Vim

I recently installed Conque in my Vim configuration and wasn’t able to load by .bash_profile when I launched bash. I was Googeling around trying to find a solution, but couldn’t find it.

Hope this helps someone.

nnoremap <Leader>tt :ConqueTermSplit bash --rcfile ~/.bash_profile<CR>

You can see this example in my .vimrc.after too.