Skip to:
Content

BuddyPress.org

Changeset 13529


Ignore:
Timestamp:
07/27/2023 11:01:08 AM (3 years ago)
Author:
imath
Message:

BP Nouveau: remove the Avatar style Customizer option

Letting the theme deal with avatar style, so that it's rendered consistently everywhere on the site, is a better option.

Props iamthewebb

Fixes 8273
Closes https://github.com/buddypress/buddypress/pull/141

Location:
trunk/src/bp-templates/bp-nouveau
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp_generic_and_typography.scss

    r12921 r13529  
    142142@include clearfix-element(".bp-wrap");
    143143
    144 // General site avatars round or square ?
    145 // User set
    146 .buddypress-wrap.round-avatars {
    147 
    148     .avatar {
    149         border-radius: 50%;
    150     }
    151 }
    152 
    153144// ====== BP Typographic Elements ======
    154145
  • trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css

    r13485 r13529  
    132132.bp-wrap:after {
    133133    clear: both;
    134 }
    135 
    136 .buddypress-wrap.round-avatars .avatar {
    137     border-radius: 50%;
    138134}
    139135
  • trunk/src/bp-templates/bp-nouveau/css/buddypress.css

    r13485 r13529  
    132132.bp-wrap:after {
    133133    clear: both;
    134 }
    135 
    136 .buddypress-wrap.round-avatars .avatar {
    137     border-radius: 50%;
    138134}
    139135
  • trunk/src/bp-templates/bp-nouveau/includes/customizer.php

    r13145 r13529  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    8383     */
    8484    $settings = apply_filters( 'bp_nouveau_customizer_settings', array(
    85         'bp_nouveau_appearance[avatar_style]' => array(
    86             'index'             => 'avatar_style',
    87             'capability'        => 'bp_moderate',
    88             'sanitize_callback' => 'absint',
    89             'transport'         => 'refresh',
    90             'type'              => 'option',
    91         ),
    9285        'bp_nouveau_appearance[user_front_page]' => array(
    9386            'index'             => 'user_front_page',
     
    228221
    229222    $controls = array(
    230         'bp_site_avatars' => array(
    231             'label'      => __( 'Use the round style for member and group avatars.', 'buddypress' ),
    232             'section'    => 'bp_nouveau_general_settings',
    233             'settings'   => 'bp_nouveau_appearance[avatar_style]',
    234             'type'       => 'checkbox',
    235         ),
    236223        'user_front_page' => array(
    237224            'label'      => __( 'Enable default front page for member profiles.', 'buddypress' ),
  • trunk/src/bp-templates/bp-nouveau/includes/functions.php

    r13464 r13529  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    641641function bp_nouveau_get_appearance_settings( $option = '' ) {
    642642    $default_args = array(
    643         'avatar_style'       => 0,
    644643        'global_alignment'   => 'alignwide',
    645644        'user_front_page'    => 0,
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r13504 r13529  
    15131513
    15141514        // Add classes according to site owners preferences. These are options set via Customizer.
    1515 
    1516         // These are general site wide Cust options falling outside component checks
    1517         $general_settings = bp_nouveau_get_temporary_setting( 'avatar_style', bp_nouveau_get_appearance_settings( 'avatar_style' ) );
    1518         if ( $general_settings ) {
    1519             $classes[] = 'round-avatars';
    1520         }
    15211515
    15221516        // Set via earlier switch for component check to provide correct option key.
Note: See TracChangeset for help on using the changeset viewer.