Child pages
  • WHM API 1 Functions - load_style
Skip to end of metadata
Go to start of metadata

Description

This function retrieves the server's custom style. You can set the custom style through WHM's Customization  interface (Home >> cPanel >> Customization) or with WHM API 1's  save_style  function.

Notes:

  • In cPanel & WHM version 58 to 11.48, WHM's Customization interface (Home >> cPanel >> Customization) was the Branding interface (Home >> cPanel >> Branding).
  • In cPanel & WHM version 11.48 and earlier, WHM's Branding interface (Home >> cPanel >> Branding) was the Customize Paper Lantern interface (Home >> cPanel >> Customize Paper Lantern). 

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/load_style?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/load_style?api.version=1
 Command Line
whmapi1 load_style


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "metadata":{  
      "result":1,
      "reason":"Ok",
      "version":1,
      "command":"load_style"
   },
   "data":{  
      "help_url":"http://example.com/help/",
      "favicon":"favicon.ico",
      "company_name":"Example Company",
      "branding_dir":"/var/cpanel/customizations/brand",
      "documentation_url":"http://example.com/documentation/",
      "webmail_logo":"webmail.png",
      "company_logo":"logo.png"
   }
}
 Output (XML)
<result>
    <data>
        <favicon>/var/cpanel/customizations/brand</favicon>
        <company_name>Example Company</company_name>
        <branding_dir/var/cpanel/customizations/brand</branding_dir>
        <webmail_logo>webmail.png</webmail_logo>
        <company_logo>logo.png</company_logo>
        <documentation_url>http://example.com/documentation/</documentation_url>
        <help_url>http://example.com/help/</help_url>
    </data>
    <metadata>
        <version>1</version>
        <reason>Ok</reason>
        <result>1</result>
        <command>load_style</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
company_name
stringThe company name.
  • A valid string.
  • A blank value, if no custom company name exists.
Example Corporation
help_urlstringThe reseller's help system URL.
  • A valid URL.
  • A blank value, if no help system URL exists.
http://example.com/help/
documentation_urlstringThe reseller's documentation URL.
  • A valid URL.
  • A blank value, if no documentation URL exists.
http://example.com/documentation/
style_dirstringThe style information's location.
  • /var/cpanel/customizations/brand — The directory for root-enabled users' branding.
  • /home/username/var/cpanel/reseller/brand — The directory for reseller branding.
/var/cpanel/customizations/brand
company_logostringThe filename for the logo that displays in the cPanel interface.
  • logo.png
  • logo.svg

    Note:

    We added support for SVG logos in cPanel & WHM version 60.

  • A blank value, if no custom logo exists.
logo.png
webmail_logostring

The filename for the logo that displays in the Webmail interface.

Note:

We added this return in cPanel & WHM version 60. 


  • webmail.png
  • webmail.svg
  • A blank value, if no custom logo exists.
webmail.png
faviconstringThe favicon file's name.
  • favicon.png
  • A blank value, if no custom favicon exists.
favicon.png