Child pages
  • UAPI Functions - WordPressInstanceManager::is_installable_addon_available
Skip to end of metadata
Go to start of metadata

Description

This function verifies that the RPM-based WordPress® cPAddon exists on the system.

Note:

You must install the WordPress Manager cPanel plugin to access this API function.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/WordPressInstanceManager/is_installable_addon_available


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Verify that the RPM-based WordPress cPAddon exists on the system.
 $instances = $cpanel->uapi(
    'WordPressInstanceManager', 'is_installable_addon_available',
	    array(
        )
);


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Verify that the RPM-based WordPress cPAddon exists on the system.
my $instances = $cpliveapi->uapi(
    'WordPressInstanceManager', 'is_installable_addon_available',
	    {
        }
);


Note:

For more information, read our Guide to the LiveAPI System.

 cPanel Template Toolkit
<!-- Verify that the RPM-based WordPress cPAddon exists on the system. -->
[% data = execute( 'WordPressInstanceManager', 'is_installable_addon_available'); %]


Note:

For more information, read our Guide to Template Toolkit documentation. 

 Command Line
uapi --user=username WordPressInstanceManager is_installable_addon_available


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 

 Output (JSON)
{
	"status": 1,
	"metadata": {},
	"messages": null,
	"errors": null,
	"data": 1
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample

data

BooleanWhether the RPM-based WordPress cPAddon exists on the server.
  • 1 — Exists.
  • 0 — Does not exist.
1