\WP_Buoy_Helper

Helper class.

Summary

Methods
Properties
Constants
checkLocalPluginStatus()
getPluginDirectoryUrlBySlug()
getPluginInstallUrlBySlug()
getPluginSearchUrl()
maybe_network_admin_url()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
hasMenuItem()
No private properties found
N/A

Methods

checkLocalPluginStatus()

checkLocalPluginStatus() : array

Looks for locally installed plugins and suggests additional ones.

Returns

array —

Two-dimensional array whose keys are the plugin's status and values are the plugin slug to suggest.

getPluginDirectoryUrlBySlug()

getPluginDirectoryUrlBySlug(string  $slug) : string

Gets the URL to a plugin on the WordPress Plugin Directory.

Parameters

string $slug

Returns

string

getPluginInstallUrlBySlug()

getPluginInstallUrlBySlug(string  $slug) : string

Gets the URL to a local plugin installation page.

Parameters

string $slug

Returns

string

getPluginSearchUrl()

getPluginSearchUrl(string  $search) 

Returns a local plugin search URL.

Parameters

string $search

maybe_network_admin_url()

maybe_network_admin_url(  $url) : string

Returns the appropriate admin URL based on user privilege.

Parameters

$url

Returns

string

hasMenuItem()

hasMenuItem(string  $item) : boolean

Whether or not a given menu item is available to site admins.

This is only useful for checking whether the plugins menu item exists at the moment because that's the only one that can be toggled on a multisite network.

Parameters

string $item

Returns

boolean