Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2016 08:19:44 PM (8 years ago)
Author:
djpaul
Message:

xprofile: don't auto-link the Name field to a search.

Display names ought to be almost always unique. Performing a member
directory search on the default "Name" field (auto-linked) is only
going to retrieve the member whose profile you were on when you clicked
the search link.

Removing this hardcoded exception allows site administrators to choose
whether this field is auto-linked via the existing wp-admin Extended
Profiles metaboxes.

Fixes #6955

Props slaFFik

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r10652 r10657  
    419419
    420420                // Save autolink settings.
    421                 if ( 1 != $field_id ) {
    422                     if ( isset( $_POST['do_autolink'] ) && 'on' === wp_unslash( $_POST['do_autolink'] ) ) {
    423                         bp_xprofile_update_field_meta( $field_id, 'do_autolink', 'on' );
    424                     } else {
    425                         bp_xprofile_update_field_meta( $field_id, 'do_autolink', 'off' );
    426                     }
     421                if ( isset( $_POST['do_autolink'] ) && 'on' === wp_unslash( $_POST['do_autolink'] ) ) {
     422                    bp_xprofile_update_field_meta( $field_id, 'do_autolink', 'on' );
     423                } else {
     424                    bp_xprofile_update_field_meta( $field_id, 'do_autolink', 'off' );
    427425                }
    428426
Note: See TracChangeset for help on using the changeset viewer.