# elementor/4.3.0-beta3/modules/mcp/abilities/utils/prompt-loader.php

Elementor Website Builder – more than just a page builder, version 4.3.0-beta3. 37 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.3.0-beta3/code/modules/mcp/abilities/utils/prompt-loader.php
- Raw: https://pluginprobe.com/plugins/elementor/4.3.0-beta3/raw/modules/mcp/abilities/utils/prompt-loader.php
- Modified: 2026-09-01T11:47:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.3.0-beta3/code/modules/mcp/abilities/utils/prompt-loader.php#L10-L20`.

```php
<?php

namespace Elementor\Modules\Mcp\Abilities\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Prompt_Loader {

	protected static function get_core_path(): string {
		return __DIR__ . '/../../static-resources/abilities/';
	}

	protected static function resolve_extra_path(): ?string {
		if ( ! defined( 'ELEMENTOR_PRO_PATH' ) ) {
			return null;
		}

		// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
		return rtrim( constant( 'ELEMENTOR_PRO_PATH' ), '/' ) . '/modules/mcp/static-resources-extra/abilities/';
	}

	public static function load( string $name ): string {
		$core_file  = static::get_core_path() . $name . '.md';
		$extra_path = static::resolve_extra_path();
		$extra_file = null !== $extra_path ? $extra_path . $name . '.md' : null;

		// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
		$content = file_exists( $core_file ) ? rtrim( (string) file_get_contents( $core_file ) ) : '';
		// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
		$extra = ( null !== $extra_file && file_exists( $extra_file ) ) ? rtrim( (string) file_get_contents( $extra_file ) ) : '';

		return implode( "\n\n", array_filter( [ $content, $extra ] ) );
	}
}

```
