HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/SeoRevisions.php.tar
httpdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/SeoRevisions/SeoRevisions.php000064400000002271151547656250033671 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
namespace AIOSEO\Plugin\Common\SeoRevisions;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * SEO Revisions container class.
 *
 * @since 4.4.0
 */
class SeoRevisions {
	/**
	 * Returns the data for Vue.
	 *
	 * @since 4.4.0
	 *
	 * @return array The data.
	 */
	public function getVueDataCompare() {
		return [
			'currentUser' => $this->getVueDataCurrentUserMeta()
		];
	}

	/**
	 * Returns the data for Vue.
	 *
	 * @since 4.4.0
	 *
	 * @return array The data.
	 */
	public function getVueDataEdit() {
		return $this->getVueDataCompare();
	}

	/**
	 * Retrieve the current user info for usage on Vue UI.
	 *
	 * @since 4.4.0
	 *
	 * @return array Current logged-in user info.
	 */
	protected function getVueDataCurrentUserMeta() {
		$currentUserId = get_current_user_id();
		$avatarData    = get_avatar_data( $currentUserId, [
			'size'    => 32,
			'default' => 'mystery'
		] );

		return [
			'avatar'       => [
				'size' => absint( $avatarData['size'] ),
				'url'  => $avatarData['found_avatar'] ? esc_url( $avatarData['url'] ) : strval( get_avatar_url( 0, $avatarData ) )
			],
			'display_name' => get_the_author_meta( 'display_name', $currentUserId )
		];
	}
}