Property | Type | Description | |
---|---|---|---|
$basename | string | Ex: plugin-name/plugin-name.php | |
$directory | string | Absolute path to the main plugin directory. | |
$file | string | Absolute path to the main plugin file. | |
$slug | string | Plugin identifier. | |
$url | string | URL to the main plugin directory. |
Method | Description | |
---|---|---|
get_basename ( ) : string | Retrieve the relative path to the main plugin file from the plugin directory. | |
get_directory ( ) : string | Retrieve the plugin directory. | |
get_file ( ) : string | Retrieve the absolute path for the main plugin file. | |
get_path ( string $path = '' ) : string | Retrieve the path to a file in the plugin. | |
get_slug ( ) : string | Retrieve the plugin indentifier. | |
get_url ( string $path = '' ) : string | Retrieve the URL for a file in the plugin. | |
register_hooks ( object $provider ) | Register a hook provider. | |
set_basename ( string $basename ) : string | Set the plugin basename. | |
set_directory ( string $directory ) | Set the plugin's directory. | |
set_file ( string $file ) | Set the path to the main plugin file. | |
set_slug ( string $slug ) | Set the plugin identifier. | |
set_url ( string $url ) | Set the URL for plugin directory root. |
public get_basename ( ) : string | ||
return | string |
public get_directory ( ) : string | ||
return | string |
public register_hooks ( object $provider ) | ||
$provider | object | Hook provider. |
public set_basename ( string $basename ) : string | ||
$basename | string | Relative path from the main plugin directory. |
return | string |
public set_directory ( string $directory ) | ||
$directory | string | Absolute path to the main plugin directory. |
protected string $basename | ||
return | string |
protected string $directory | ||
return | string |
protected string $file | ||
return | string |