| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/www/wp-content/plugins/wordpress-seo/admin/tracking/ |
Upload File : |
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Tracking
*/
/**
* Represents the theme data.
*/
class WPSEO_Tracking_Theme_Data implements WPSEO_Collection {
/**
* Returns the collection data.
*
* @return array The collection data.
*/
public function get() {
$theme = wp_get_theme();
return [
'theme' => [
'name' => $theme->get( 'Name' ),
'url' => $theme->get( 'ThemeURI' ),
'version' => $theme->get( 'Version' ),
'author' => [
'name' => $theme->get( 'Author' ),
'url' => $theme->get( 'AuthorURI' ),
],
'parentTheme' => $this->get_parent_theme( $theme ),
],
];
}
/**
* Returns the name of the parent theme.
*
* @param WP_Theme $theme The theme object.
*
* @return string|null The name of the parent theme or null.
*/
private function get_parent_theme( WP_Theme $theme ) {
if ( is_child_theme() ) {
return $theme->get( 'Template' );
}
return null;
}
}