Description

This function returns the cPanel account's base theme.

 If you have modified the current theme, this function returns the name of the theme that you modified.

In cPanel & WHM version 66 and later, the /scripts/modify_accounts script allows you to modify the style and theme for many or all accounts on the server. For more information, read our The modify_accounts Script documentation. 

Examples


https://hostname.example.com:2083/cpsess##########/execute/Themes/get_theme_base

 

  $cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List the account's current theme.
$get_theme_base = $cpanel->uapi(
    'Themes', 'get_theme_base'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List the account's current theme.
my $get_theme_base = $cpliveapi->uapi(
    'Themes', 'get_theme_base',
);

 

 <!-- List the account's current theme. -->
[% data = execute( 'Themes', 'get_theme_base' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

 

uapi --user=username Themes get_theme_base

 {
    "messages": null,
    "errors": null,
    "status": 1,
    "metadata": {},
    "data": "paper_lantern"
}

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
datastringThe cPanel account's base theme.

The function returns only one of the following strings:

  • paper_lantern
  • unknown

    The function returns unknown when it cannot determine the base theme that you modified to create the custom theme.

paper_lantern