Skip to content
Open
Changes from all commits
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
13 changes: 13 additions & 0 deletions includes/class-wp-job-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function __construct() {
add_action( 'plugins_loaded', [ $this, 'include_admin_files' ] );

// Filters.
add_filter( 'plugin_action_links_' . JOB_MANAGER_PLUGIN_BASENAME, [ $this, 'plugin_action_links' ] );
add_filter( 'wp_privacy_personal_data_exporters', [ 'WP_Job_Manager_Data_Exporter', 'register_wpjm_user_data_exporter' ] );
add_filter( 'allowed_redirect_hosts', [ $this, 'add_to_allowed_redirect_hosts' ] );

Expand All @@ -158,6 +159,18 @@ public function add_to_allowed_redirect_hosts( $hosts ) {
return $hosts;
}

/**
* Adds a Settings link to the plugin action links on the Plugins screen.
*
* @param array $links Existing plugin action links.
* @return array Plugin action links with Settings prepended.
*/
public function plugin_action_links( $links ) {
$settings_link = '<a href="' . esc_url( admin_url( 'edit.php?post_type=job_listing&page=job-manager-settings#settings-general' ) ) . '">' . esc_html__( 'Settings', 'wp-job-manager' ) . '</a>';
array_unshift( $links, $settings_link );
return $links;
}

/**
* Performs plugin activation steps.
*/
Expand Down
Loading