BP_RankMath_Title

BP_RankMath_Title Error.

Description

Source

File: bp-core/compatibility/bp-rankmath-plugin-helpers.php

class BP_RankMath_Title implements IPaper {

	/**
	 * Retrieves the SEO title.
	 *
	 * @return string
	 */
	public function title() {
		if ( bp_is_user() ) {
			$title = get_user_meta( bp_displayed_user_id(), 'first_name', true );
			if ( empty( $title )) {
				$title = get_user_meta( bp_displayed_user_id(), 'nickname', true );
			}
		} else {
			$title = isset( buddypress()->groups->current_group->name ) ? buddypress()->groups->current_group->name : __( 'Social Group', 'buddyboss' );
		}

		return $title . ' - ' . bp_get_site_name();
	}

	/**
	 * Retrieves the SEO description.
	 *
	 * @return string
	 */
	public function description() {
		return isset( buddypress()->groups->current_group->description ) ? buddypress()->groups->current_group->description : '';
	}

	/**
	 * Retrieves the robots.
	 *
	 * @return string
	 */
	public function robots() {
		return array();
	}

	/**
	 * Retrieves the canonical URL.
	 *
	 * @return array
	 */
	public function canonical() {
		return array();
	}

	/**
	 * Retrieves meta keywords.
	 *
	 * @return string
	 */
	public function keywords() {
		return array();
	}
}

Methods

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.