File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ class Ghost {
1717 public function __construct () {
1818 global $ hcpp ;
1919 $ hcpp ->ghost = $ this ;
20- $ hcpp ->ghost ->version = basename ( readlink ('/opt/ghost/current ' ) );
2120 $ hcpp ->add_action ( 'hcpp_invoke_plugin ' , [ $ this , 'setup ' ] );
2221 $ hcpp ->add_action ( 'hcpp_render_body ' , [ $ this , 'hcpp_render_body ' ] );
2322 }
@@ -182,7 +181,8 @@ public function hcpp_render_body( $args ) {
182181
183182 // Fill out version on app listing page
184183 if ( $ args ['page ' ] == 'list_webapps ' ) {
185- $ args ['content ' ] = str_replace ( '%ghost_version% ' , $ hcpp ->ghost ->version , $ args ['content ' ] );
184+ $ version = shell_exec ( 'basename $(readlink /opt/ghost/current) ' );
185+ $ args ['content ' ] = str_replace ( '%ghost_version% ' , $ version , $ args ['content ' ] );
186186 return $ args ;
187187 }
188188
You can’t perform that action at this time.
0 commit comments