mezinster (@mezinster)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thanks. But it’s not exactly what i wanted to….

    This plugin disables display_name edition capability, and display_name displaying too…

    “user_login” displayed instead of “display_name”

    could anyone help me to fix that plugin to achieve the goal ?

    <?php

    /*

    Plugin Name: Disable Display Name

    Plugin URI: https://bbpress.org/plugins/topic/disable-display-name

    Description: Blocks the alternate Display Name functionality in bbPress 1.x to prevent spoofing other members and admin.

    Version: 0.0.2

    Author: _ck_

    Author URI: http://bbshowcase.org

    License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/

    Donate: http://bbshowcase.org/donate/

    */

    function disable_display_name($display_name=””, $id=0){$user = bb_get_user( bb_get_user_id( $id ) ); return $user->user_login;}

    add_filter(‘get_user_display_name’, ‘disable_display_name’,9,2);

    add_filter(‘get_post_author’, ‘disable_display_name’,9,2);

    function disable_display_name_keys($keys){unset($keys); return $keys;}

    add_filter(‘get_profile_info_keys’, ‘disable_display_name_keys’,9);

    ?>

Viewing 1 replies (of 1 total)