BP_Nouveau_Profile_Header_Customize_Control::render_content()

Render the control’s content.

Description

Source

File: bp-templates/bp-nouveau/includes/profile-header-customizer-controls.php

	public function render_content() {
		$id      = 'customize-control-profile-header';
		$hide    = false;
		$setting = "bp_nouveau_appearance[user_profile_actions_order]";

		$order           = bp_nouveau_get_user_profile_actions();
		$profile_buttons = bp_nouveau_customizer_user_profile_actions();

		uksort( $profile_buttons, function ( $key1, $key2 ) use ( $order ) {
			return ( array_search( $key1, $order ) > array_search( $key2, $order ) );
		} );

		?>

		<?php if ( isset( $guide ) && ! $hide ) : ?>
			<p class="description">
				<?php echo esc_html( $guide ); ?>
			</p>
		<?php endif; ?>

		<?php if ( ! empty( $profile_buttons ) ) : ?>
			<ul id="<?php echo esc_attr( $id ); ?>" class="ui-sortable <?php echo esc_attr( $id ); ?>"
			    style="margin-top: 0px; height: 500px; <?php echo ( $hide ) ? 'display:none;' : ''; ?>"
			    data-bp-type="<?php echo esc_attr( $this->type ); ?>">

				<?php
				$i = 0;
				foreach ( $profile_buttons as $key => $item ) :
					?>

					<li data-bp-nav="<?php echo esc_attr( $key ); ?>" class="<?php echo esc_attr( $key ); ?>">
						<div class="menu-item-bar">
							<div class="menu-item-handle ui-sortable-handle">
								<span class="item-title" aria-hidden="true">
									<span class="menu-item-title"><?php echo esc_html( $item ); ?></span>
								</span>
							</div>
						</div>
					</li>
				<?php

				endforeach; ?>

			</ul>
		<?php endif; ?>

		<?php
		if ( is_array( bp_nouveau_get_user_profile_actions() ) ) {
			$bp_user_profile_actions_order_value = implode( ',', bp_nouveau_get_user_profile_actions() );
		} else {
			$bp_user_profile_actions_order_value = bp_nouveau_get_user_profile_actions();
		}
		?>
		<input id="bp_user_profile_actions_order" type="hidden"
		       value="<?php echo $bp_user_profile_actions_order_value; ?>"
		       data-customize-setting-link="<?php echo esc_attr( $setting ); ?>"/>

		<?php
	}

Changelog

Changelog
Version Description
BuddyBoss 1.5.2 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.