get_defined_tab( $tab ), WP::admin_url( 'admin.php?page=' . Area::SLUG . '-' . $this->slug ) ); } /** * Get the current tab. * * @since 1.5.0 * * @return string Current tab. */ public function get_current_tab() { if ( empty( $_GET['tab'] ) ) { // phpcs:ignore return $this->slug; } return $this->get_defined_tab( $_GET['tab'] ); // phpcs:ignore } /** * Get the defined or default tab. * * @since 1.5.0 * * @param string $tab Tab to check. * * @return string Defined tab. Fallback to default one if it doesn't exist. */ protected function get_defined_tab( $tab ) { $tab = \sanitize_key( $tab ); return \in_array( $tab, $this->tabs, true ) ? $tab : $this->slug; } /** * Get label for a tab. * Process only those that exists. * Defaults to "About Us". * * @since 1.5.0 * * @param string $tab Tab to get label for. * * @return string */ public function get_label( $tab = '' ) { switch ( $this->get_defined_tab( $tab ) ) { case 'versus': $label = \sprintf( /* translators: %s - plugin current license type. */ \esc_html__( '%s vs Pro', 'wp-mail-smtp' ), \ucfirst( \wp_mail_smtp()->get_license_type() ) ); break; case 'about': default: $label = \esc_html__( 'About Us', 'wp-mail-smtp' ); break; } return $label; } /** * @inheritdoc */ public function get_title() { return $this->get_label( $this->get_current_tab() ); } /** * Display About page content based on the current tab. * * @since 1.5.0 */ public function display() { ?>
WPForms, the largest WordPress resource site, WPBeginner, the most popular lead-generation software, OptinMonster, the best WordPress analytics plugin, MonsterInsights, and the most powerful WordPress contest plugin, RafflePress.', 'wp-mail-smtp' ), array( 'a' => array( 'href' => array(), 'rel' => array(), 'target' => array(), ), ) ), 'https://wpforms.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp', 'https://www.wpbeginner.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp', 'https://optinmonster.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp', 'https://www.monsterinsights.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp', 'https://rafflepress.com/?utm_source=wpmailsmtpplugin&utm_medium=pluginaboutpage&utm_campaign=aboutwpmailsmtp' ); ?>
', $current['text'] ); ?> |
', $pro['text'] ); ?> |