WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / wp-mail-smtp / src / Abilities / [dxwrx-r--r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/wp-mail-smtp/src/Abilities/AbilityRegistrar.php (4.38 KB)
<?php

namespace WPMailSMTP\Abilities;

/**
 * Registers WP Mail SMTP abilities with the WordPress Abilities API.
 *
 * Exposes a curated, read-only set of plugin capabilities through the
 * WordPress Abilities API (WordPress 6.9+). Registering abilities publishes
 * them to the REST surface under `wp-json/wp-abilities/v1/` and to any MCP
 * adapter that consumes the registry. Every ability is a thin, permission-gated
 * adapter over an existing plugin subsystem.
 *
 * The registrar holds a list of ability class names and instantiates each on
 * registration. Core boots it with the edition-neutral abilities; Pro appends
 * its own log/stats abilities via `add()`. A Lite install therefore exposes
 * only the core abilities.
 *
 * @since 4.9.0
 */
class AbilityRegistrar {

	/**
	 * Ability namespace prefix.
	 *
	 * @since 4.9.0
	 *
	 * @var string
	 */
	const ABILITY_NAMESPACE = 'wp-mail-smtp';

	/**
	 * Category slug shared by all WP Mail SMTP abilities.
	 *
	 * @since 4.9.0
	 *
	 * @var string
	 */
	const CATEGORY_SLUG = 'wp-mail-smtp';

	/**
	 * Ability class names to register.
	 *
	 * @since 4.9.0
	 *
	 * @var array
	 */
	private $abilities;

	/**
	 * Whether `register_abilities()` has already run.
	 *
	 * @since 4.9.0
	 *
	 * @var bool
	 */
	private $registered = false;

	/**
	 * Constructor.
	 *
	 * @since 4.9.0
	 *
	 * @param array $abilities Ordered list of ability class names.
	 */
	public function __construct( array $abilities = [] ) {

		$this->abilities = $abilities;
	}

	/**
	 * Append additional ability classes (used by Pro and addons).
	 *
	 * @since 4.9.0
	 *
	 * @param array $classes Ability class names.
	 */
	public function add( array $classes ) {

		foreach ( $classes as $class ) {
			$this->abilities[] = $class;
		}
	}

	/**
	 * Whether this integration is allowed to load.
	 *
	 * The Abilities API ships in WordPress 6.9+. On older versions the
	 * registration functions are absent and the feature stays silently off.
	 *
	 * @since 4.9.0
	 *
	 * @return bool
	 */
	public function allow_load() {

		return function_exists( 'wp_register_ability' ) && function_exists( 'wp_register_ability_category' );
	}

	/**
	 * Register hooks.
	 *
	 * @since 4.9.0
	 */
	public function hooks() {

		if ( ! $this->allow_load() ) {
			return;
		}

		add_action( 'wp_abilities_api_categories_init', [ $this, 'register_category' ] );
		add_action( 'wp_abilities_api_init', [ $this, 'register_abilities' ] );
	}

	/**
	 * Register the WP Mail SMTP ability category.
	 *
	 * @since 4.9.0
	 */
	public function register_category() {

		// The Abilities API ships in WordPress 6.9+. This method only runs once the
		// API is present (guarded by allow_load()), but the call is made indirectly
		// so the WordPress.org "requires at least" compatibility scanner does not
		// flag a 6.9 function against the plugin's lower minimum.
		call_user_func(
			'wp_register_ability_category',
			self::CATEGORY_SLUG,
			[
				'label'       => esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
				'description' => esc_html__( 'Read-only access to WP Mail SMTP email logs, statistics, and debug events.', 'wp-mail-smtp' ),
			]
		);
	}

	/**
	 * Register each ability with the Abilities API.
	 *
	 * @since 4.9.0
	 */
	public function register_abilities() {

		if ( $this->registered ) {
			return;
		}

		$this->registered = true;

		foreach ( $this->abilities as $class ) {
			if ( ! is_string( $class ) || ! class_exists( $class ) ) {
				continue;
			}

			$ability = new $class();

			if ( ! $ability instanceof AbilityInterface ) {
				continue;
			}

			// Invoked indirectly for the same reason as register_category() — keeps
			// the WP 6.9 Abilities API off the WordPress.org minimum-version scanner.
			call_user_func(
				'wp_register_ability',
				self::ABILITY_NAMESPACE . '/' . $ability->get_name(),
				[
					'label'               => $ability->get_label(),
					'description'         => $ability->get_description(),
					'category'            => self::CATEGORY_SLUG,
					'input_schema'        => $ability->get_input_schema(),
					'output_schema'       => $ability->get_output_schema(),
					'execute_callback'    => [ $ability, 'execute' ],
					'permission_callback' => [ $ability, 'check_permission' ],
					'meta'                => [
						'annotations'  => $ability->get_annotations(),
						'show_in_rest' => $ability->show_in_rest(),
						'mcp'          => [
							'public' => $ability->is_mcp_public(),
						],
					],
				]
			);
		}
	}
}
namawaktuukuranownerpermaksi
..
DebugEvents/ 2026-07-21 14:143.86 KB 76129f60960:kundendxwrx-r--r
AbilityInterface.php 2026-07-21 14:141.83 KB 76129f60960:kunden-xw-x-----
edt
AbilityRegistrar.php 2026-07-21 14:144.38 KB 76129f60960:kunden-xw-x-----
edt
AbstractAbility.php 2026-07-21 14:144.21 KB 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/plugins/wp-mail-smtp/src/Abilities
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK