Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add active source to Help drawer #1219

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__( 'Because Action Scheduler can be included as a library in plugins and themes, the code block below indicates from where Action Scheduler is being loaded.', 'action-scheduler' ) .
crstauf marked this conversation as resolved.
Show resolved Hide resolved
'</p>' .
'<p><code>' . $as_source . '</code></p>' .
crstauf marked this conversation as resolved.
Show resolved Hide resolved
'<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__ ) );
}
}
Loading