@@ -31,15 +31,8 @@ class Admin {
3131 */
3232 public function __construct () {
3333
34- // add plugin page row action links
35- add_filter ( 'plugin_action_links_wp-php-console/wp-php-console.php ' , static function ( $ actions ) {
36- return array_merge ( [
37- '<a href=" ' . esc_url ( admin_url () ) . '"> ' . esc_html__ ( 'Settings ' , 'wp-php-console ' ) . '</a> ' ,
38- '<a href=" ' . esc_url ( Plugin::get_project_page_url () ) . '"> ' . esc_html__ ( 'GitHub ' , 'wp-php-console ' ) . '</a> ' ,
39- '<a href=" ' . esc_url ( Plugin::get_support_page_url () ) . '"> ' . esc_html__ ( 'Support ' , 'wp-php-console ' ) . '</a> ' ,
40- '<a href=" ' . esc_url ( Plugin::get_reviews_page_url () ) . '"> ' . esc_html__ ( 'Review ' , 'wp-php-console ' ) . '</a> ' ,
41- ], $ actions );
42- } );
34+ self ::add_plugin_page_row_action_links ();
35+ self ::output_admin_notices ();
4336
4437 // init settings page
4538 if ( ! defined ( 'DOING_AJAX ' ) ) {
@@ -74,4 +67,22 @@ private static function output_admin_notices() {
7467 }
7568
7669
70+ /**
71+ * Adds plugin page row action links.
72+ *
73+ * @since 1.6.0
74+ */
75+ private static function add_plugin_page_row_action_links () {
76+
77+ add_filter ( 'plugin_action_links_wp-php-console/wp-php-console.php ' , static function ( $ actions ) {
78+ return array_merge ( [
79+ '<a href=" ' . esc_url ( admin_url () ) . '"> ' . esc_html__ ( 'Settings ' , 'wp-php-console ' ) . '</a> ' ,
80+ '<a href=" ' . esc_url ( Plugin::get_project_page_url () ) . '"> ' . esc_html__ ( 'GitHub ' , 'wp-php-console ' ) . '</a> ' ,
81+ '<a href=" ' . esc_url ( Plugin::get_support_page_url () ) . '"> ' . esc_html__ ( 'Support ' , 'wp-php-console ' ) . '</a> ' ,
82+ '<a href=" ' . esc_url ( Plugin::get_reviews_page_url () ) . '"> ' . esc_html__ ( 'Review ' , 'wp-php-console ' ) . '</a> ' ,
83+ ], $ actions );
84+ } );
85+ }
86+
87+
7788}
0 commit comments