" . __( 'Settings', 'admin-help-docs' ) . ''; // Adds the link to the end of the array. array_unshift( $links, $settings_link ); // Return the links return $links; } // End settings_link() /** * Add links to the website and discord * * @param array $links * @return array */ public function plugin_row_meta( $links, $file ) { $text_domain = HELPDOCS_TEXTDOMAIN; if ( $text_domain . '/' . $text_domain . '.php' == $file ) { $guide_url = HELPDOCS_GUIDE_URL; $docs_url = HELPDOCS_DOCS_URL; $support_url = HELPDOCS_SUPPORT_URL; $plugin_name = HELPDOCS_NAME; $our_links = [ 'guide' => [ // translators: Link label for the plugin's user-facing guide. 'label' => __( 'How-To Guide', 'admin-help-docs' ), 'url' => $guide_url ], 'docs' => [ // translators: Link label for the plugin's developer documentation. 'label' => __( 'Developer Docs', 'admin-help-docs' ), 'url' => $docs_url ], 'support' => [ // translators: Link label for the plugin's support page. 'label' => __( 'Support', 'admin-help-docs' ), 'url' => $support_url ], ]; $row_meta = []; foreach ( $our_links as $key => $link ) { // translators: %1$s is the link label, %2$s is the plugin name. $aria_label = sprintf( __( '%1$s for %2$s', 'admin-help-docs' ), $link[ 'label' ], $plugin_name ); $row_meta[ $key ] = '' . esc_html( $link[ 'label' ] ) . ''; } // Add the links return array_merge( $links, $row_meta ); } // Return the links return (array) $links; } // End plugin_row_meta() }