Files
roi-theme/wp-content/plugins/seo-by-rank-math/includes/modules/image-seo/class-admin.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

57 lines
1.2 KiB
PHP
Executable File

<?php
/**
* The admin-side functionality of the Image SEO module.
*
* @since 1.0
* @package RankMath
* @subpackage RankMath\Image_Seo
* @author Rank Math <support@rankmath.com>
*/
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' ), '<a href="' . KB::get( 'image-settings', 'Options Panel Images Tab' ) . '" target="_blank">' . esc_html__( 'Learn more', 'rank-math' ) . '</a>' ),
'file' => __DIR__ . '/options.php',
],
],
3
);
return $tabs;
}
}