*/ namespace RankMath\Image_Seo; use RankMath\KB; use RankMath\Traits\Hooker; use RankMath\Helpers\Arr; defined( 'ABSPATH' ) || exit; /** * Admin class. */ class Admin { use Hooker; /** * Constructor. */ public function __construct() { $this->action( 'rank_math/settings/general', 'register_tab' ); } /** * Add the Images tab in the General Settings. * * @param array $tabs Original tabs array. * @return array New tabs array. */ public function register_tab( $tabs ) { Arr::insert( $tabs, [ 'images' => [ 'icon' => 'rm-icon rm-icon-images', 'title' => esc_html__( 'Images', 'rank-math' ), /* translators: Link to kb article */ 'desc' => sprintf( esc_html__( 'SEO options related to featured images and media appearing in your post content. %s.', 'rank-math' ), '' . esc_html__( 'Learn more', 'rank-math' ) . '' ), 'file' => dirname( __FILE__ ) . '/options.php', ], ], 3 ); return $tabs; } }