ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/niphet/public_html/wp-content/plugins/deepseek/src/Admin.php
<?php

namespace AiBuddy;

class Admin {
	private string $plugin_slug;

	public function __construct( $plugin_slug ) {
		$this->plugin_slug = $plugin_slug;

		if ( is_admin() ) {
			( new Compatability() )->check();

			if ( AuthGate::authorized() ) {
				//add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
			}
		}
	}

	public static function plugin_actions( $links, $plugin_info, $slug ): array {
		return array_merge(
			$links,
			array(
				'settings' =>
					sprintf(
						__( '<a href="admin.php?page=%s_settings">Settings</a>', $plugin_info['TextDomain'] ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain
						$slug,
					),
			),
		);
	}

	public function post_row_actions( $actions, $post ) {
		if ( 'post' === $post->post_type ) {
			$actions['ai_titles'] = sprintf(
				'<a class="%s-link-title" href="#" data-id="%s" data-title="%s">' .
				'<span class="dashicons dashicons-update"></span> Generate Titles</a>',
				$this->plugin_slug,
				$post->ID,
				$post->post_title
			);
		}

		return $actions;
	}
}