Skip to:
Content

bbPress.org

Changeset 4235


Ignore:
Timestamp:
10/01/2012 10:29:55 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Settings:

  • Simplify role translation in bbp_admin_setting_callback_global_access().
  • Prevents repeatedly reassigning new value to existing $default_role variable.
  • See: r4234.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbp-admin/bbp-settings.php

    r4234 r4235  
    491491        $wp_roles = new WP_Roles();
    492492
    493     $default_role = get_option( 'default_role', 'subscriber' );
    494     $default_role = $wp_roles->role_names[ $default_role ];
    495     $default_role = translate_user_role( $default_role ); ?>
     493    $default_role = $wp_roles->role_names[ get_option( 'default_role', 'subscriber' ) ]; ?>
    496494
    497495    <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( false ) ); ?> />
    498     <label for="_bbp_allow_global_access"><?php printf( __( 'Automatically assign "%s" role to new, registered visitors.', 'bbpress' ), $default_role ); ?></label>
     496    <label for="_bbp_allow_global_access"><?php printf( __( 'Automatically assign "%s" role to new, registered visitors.', 'bbpress' ), translate_user_role( $default_role ) ); ?></label>
    499497
    500498<?php
Note: See TracChangeset for help on using the changeset viewer.