<?php
namespace RemoveShortlink;

use WP_PowerSuite\Core\AbstractModule;

class Module extends AbstractModule {

	private const MODULE_ID = 'remove-shortlink';
	private const MODULE_VERSION = '1.0.0';

	public function getId(): string {
		return self::MODULE_ID;
	}

	public function getName(): string {
		return __( 'Remove Shortlink', 'wp-powersuite' );
	}

	public function getVersion(): string {
		return self::MODULE_VERSION;
	}

	public function getDescription(): string {
		return __( 'Removes the default shortlink meta tag from your pages for tidier markup.', 'wp-powersuite' );
	}

	public function getContext(): array {
		return [ 'admin', 'frontend' ];
	}

	protected function registerHooks(): void {
		remove_action( 'wp_head', 'wp_shortlink_wp_head', 10 );
		remove_action( 'template_redirect', 'wp_shortlink_header', 11 );
	}
}
