| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/KnowledgeBase/wp-content/plugins/aioseo-index-now/app/Utils/ |
Upload File : |
<?php
namespace AIOSEO\Plugin\Addon\IndexNow\Utils;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Contains helper functions.
*
* @since 1.0.0
*/
class Helpers {
/**
* Gets the data for Vue.
*
* @since 1.0.0
*
* @param string $page The current page.
* @return array The data.
*/
public function getVueData( $data = [], $page = null ) {
if ( 'settings' !== $page ) {
$data['indexNow'] = [];
return $data;
}
$data['indexNow'] = [
'options' => aioseoIndexNow()->options->all()
];
return $data;
}
/**
* Generates an API key to use with IndexNow.
*
* @since 1.0.0
*
* @return string The API key.
*/
public function generateApiKey() {
$newApiKey = wp_generate_uuid4();
$newApiKey = preg_replace( '[-]', '', $newApiKey );
return $newApiKey;
}
}