Skip to content

Commit

Permalink
Merge pull request #1219 from crstauf/fix-772
Browse files Browse the repository at this point in the history
Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer.
  • Loading branch information
barryhughes authored Dec 9, 2024
2 parents b2f889a + 9d0ff8d commit 4326df7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions classes/ActionScheduler_AdminView.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ public function add_help_tabs() {
}

$as_version = ActionScheduler_Versions::instance()->latest_version();
$as_source = ActionScheduler_Versions::instance()->active_source();

$screen->add_help_tab(
array(
'id' => 'action_scheduler_about',
Expand All @@ -261,6 +263,11 @@ public function add_help_tabs() {
'<p>' .
__( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'action-scheduler' ) .
'</p>' .
'<h3>' . esc_html__( 'Source', 'action-scheduler' ) . '</h3>' .
'<p>' .
esc_html__( 'Action Scheduler is currently being loaded from the following location. This can be useful when debugging, or if requested by the support team.', 'action-scheduler' ) .
'</p>' .
'<p><code>' . esc_html( $as_source ) . '</code></p>' .
'<h3>' . esc_html__( 'WP CLI', 'action-scheduler' ) . '</h3>' .
'<p>' .
sprintf(
Expand Down
4 changes: 4 additions & 0 deletions classes/ActionScheduler_Versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,8 @@ public static function initialize_latest_version() {
$self = self::instance();
call_user_func( $self->latest_version_callback() );
}

public function active_source() {
return trailingslashit( dirname( __DIR__ ) );
}
}

0 comments on commit 4326df7

Please sign in to comment.