Skip to content

Commit

Permalink
prefix action namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveorevo committed Jul 19, 2023
1 parent ae4d637 commit c3b0167
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vscode.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public function __construct() {
global $hcpp;
$hcpp->vscode = $this;
$hcpp->add_action( 'priv_unsuspend_domain', [ $this, 'priv_unsuspend_domain' ] );
$hcpp->add_action( 'new_web_domain_ready', [ $this, 'new_web_domain_ready' ] );
$hcpp->add_action( 'hcpp_new_domain_ready', [ $this, 'hcpp_new_domain_ready' ] );
$hcpp->add_action( 'priv_delete_user', [ $this, 'priv_delete_user' ] );
$hcpp->add_action( 'invoke_plugin', [ $this, 'invoke_plugin' ] );
$hcpp->add_action( 'hcpp_invoke_plugin', [ $this, 'hcpp_invoke_plugin' ] );
$hcpp->add_action( 'render_page', [ $this, 'render_page' ] );
}

// Trigger setup and configuration when domain is created.
public function new_web_domain_ready( $args ) {
public function hcpp_new_domain_ready( $args ) {
global $hcpp;
$user = $args[0];
$domain = $args[1];
Expand All @@ -45,7 +45,7 @@ public function priv_unsuspend_domain( $args ) {
}

// Return requests for the VSCode Server token for the given user.
public function invoke_plugin( $args ) {
public function hcpp_invoke_plugin( $args ) {
if ( $args[0] !== 'vscode_get_token' ) return $args;
$user = $args[1];
echo file_get_contents( "/home/$user/.openvscode-server/data/token" );
Expand Down

0 comments on commit c3b0167

Please sign in to comment.