Skip to content

Commit

Permalink
Link to Tools page
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaydsouza committed Feb 19, 2024
1 parent ecbe6e9 commit 3fff8ce
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions includes/admin/settings/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public function __construct() {

add_action( 'wp_ajax_nopriv_' . self::$prefix . '_tag_search', array( $this, 'tags_search' ) );
add_action( 'wp_ajax_' . self::$prefix . '_tag_search', array( $this, 'tags_search' ) );
add_action( 'crp_settings_page_header', array( $this, 'settings_page_header' ) );
}

/**
Expand Down Expand Up @@ -1396,4 +1397,20 @@ public static function tags_search() {
echo wp_json_encode( $results );
wp_die();
}

/**
* Add a link to the Tools page from the settings page.
*
* @since 3.5.0
*/
public static function settings_page_header() {
?>
<p>
<a class="crp_button" href="<?php echo admin_url( 'tools.php?page=crp_tools_page' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>">
<?php esc_html_e( 'Visit the Tools page', 'autoclose' ); ?>
</a>
</p>

<?php
}
}

0 comments on commit 3fff8ce

Please sign in to comment.