Changing upload dir in a plugin regardless of post type

Typo: ‘ not is ‘

You have a weired Editor. You’re simply using the wrong type of quotes:

  • should be "
  • should be '

Here’s the changed function:

function wpse43013_custom_upload_directory( $args ) 
{
    // If the parent_base is "members", upload to plugin directory
    if ( 'members' === get_current_screen()->parent_base )
        return wp_parse_args( $args, array_fill_keys(
             array( 'path', 'url', 'basedir', 'baseurl' )
            ,plugin_dir_path( __FILE__ ).'uploads'
        ) );

    return $args;
}
add_filter( 'upload_dir', 'wpse43013_custom_upload_directory' );

Debug

Normally that should throw an error. Be sure that you have set WP_DEBUG set to TRUE inside your wp-config.php file when testing code inside a development environment.

define( 'WP_DEBUG', true );

On production sites you could also enable the error log (don’t do this constantly and disable error display so errors are gracefully logged and not displayed to your users.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

See the editing wp-config page for more info on defining configuration constants.