Skip to content

Commit

Permalink
refactor for hcpp_render_body, hcpp_render_panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveorevo committed Aug 16, 2023
1 parent 03c4414 commit 90c0c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodered.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct() {
global $hcpp;
$hcpp->nodered = $this;
$hcpp->add_action( 'hcpp_invoke_plugin', array( $this, 'setup' ) );
$hcpp->add_action( 'hcpp_render_page', array( $this, 'hcpp_render_page' ) );
$hcpp->add_action( 'hcpp_render_body', array( $this, 'hcpp_render_body' ) );
}

// Install Node-RED based on the given user options
Expand Down Expand Up @@ -86,7 +86,7 @@ public function setup( $args ) {
}

// Custom install page
public function hcpp_render_page( $args ) {
public function hcpp_render_body( $args ) {
global $hcpp;
if ( $args['page'] !== 'setup_webapp') return $args;
if ( strpos( $_SERVER['REQUEST_URI'], '?app=NodeRED' ) === false ) return $args;
Expand Down

0 comments on commit 90c0c94

Please sign in to comment.