Skip to content

Commit 4326df7

Browse files
authored
Merge pull request #1219 from crstauf/fix-772
Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer.
2 parents b2f889a + 9d0ff8d commit 4326df7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

classes/ActionScheduler_AdminView.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ public function add_help_tabs() {
251251
}
252252

253253
$as_version = ActionScheduler_Versions::instance()->latest_version();
254+
$as_source = ActionScheduler_Versions::instance()->active_source();
255+
254256
$screen->add_help_tab(
255257
array(
256258
'id' => 'action_scheduler_about',
@@ -261,6 +263,11 @@ public function add_help_tabs() {
261263
'<p>' .
262264
__( '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' ) .
263265
'</p>' .
266+
'<h3>' . esc_html__( 'Source', 'action-scheduler' ) . '</h3>' .
267+
'<p>' .
268+
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' ) .
269+
'</p>' .
270+
'<p><code>' . esc_html( $as_source ) . '</code></p>' .
264271
'<h3>' . esc_html__( 'WP CLI', 'action-scheduler' ) . '</h3>' .
265272
'<p>' .
266273
sprintf(

classes/ActionScheduler_Versions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,8 @@ public static function initialize_latest_version() {
8686
$self = self::instance();
8787
call_user_func( $self->latest_version_callback() );
8888
}
89+
90+
public function active_source() {
91+
return trailingslashit( dirname( __DIR__ ) );
92+
}
8993
}

0 commit comments

Comments
 (0)