' . esc_attr( $text ) . ''; array_unshift( $links, $settings_link ); return $links; } public static function footer_text( $footer_text ) { $screen = get_current_screen(); if ( isset( $screen->id ) && $screen->id === 'wow-plugins_page_' . WOW_Plugin::SLUG ) { $text = sprintf( /* translators: 1: Rating link (URL), 2: Plugin name */ __( 'Thank you for using %2$s! Please rate us', 'floating-button' ), esc_url( WOW_Plugin::info('url') ), esc_attr( WOW_Plugin::info('name') ) ); return str_replace( '', '', $footer_text ) . ' | ' . $text . ''; } return $footer_text; } public static function add_admin_page(): void { $parent = 'wow-company'; $title = WOW_Plugin::info('name') . ' version ' . WOW_Plugin::info('version'); $menu_title = WOW_Plugin::info('name'); $capability = 'manage_options'; $slug = WOW_Plugin::SLUG; add_submenu_page( $parent, $title, $menu_title, $capability, $slug, [ __CLASS__, 'plugin_page' ] ); } public static function plugin_page(): void { do_action( WOW_Plugin::PREFIX . '_admin_page' ); } public static function admin_scripts( $hook ): void { $page = 'wow-plugins_page_' . WOW_Plugin::SLUG; if ( $page !== $hook ) { return; } do_action( WOW_Plugin::PREFIX . '_admin_load_styles_scripts' ); } }