Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/29/2015 11:02:46 PM (9 years ago)
Author:
imath
Message:

Introduce BuddyPress Cover Images functions and templates specific to the Members single items.

Props r-a-y

See #6570

File:
1 edited

Legend:

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

    r10140 r10157  
    228228        }
    229229
     230        // Change Cover image
     231        if ( bp_displayed_user_use_cover_image_header() ) {
     232            $sub_nav[] = array(
     233                'name'            => _x( 'Change Cover Image', 'Profile header sub menu', 'buddypress' ),
     234                'slug'            => 'change-cover-image',
     235                'parent_url'      => $profile_link,
     236                'parent_slug'     => $slug,
     237                'screen_function' => 'xprofile_screen_change_cover_image',
     238                'position'        => 40,
     239                'user_has_access' => $access
     240            );
     241        }
     242
    230243        // The Settings > Profile nav item can only be set up after
    231244        // the Settings component has run its own nav routine
     
    316329            }
    317330
     331            if ( bp_displayed_user_use_cover_image_header() ) {
     332                $wp_admin_nav[] = array(
     333                    'parent' => 'my-account-' . $this->id,
     334                    'id'     => 'my-account-' . $this->id . '-change-cover-image',
     335                    'title'  => _x( 'Change Cover Image', 'My Account Profile sub nav', 'buddypress' ),
     336                    'href'   => trailingslashit( $profile_link . 'change-cover-image' )
     337                );
     338            }
    318339        }
    319340
Note: See TracChangeset for help on using the changeset viewer.