/home/u523506497/domains/mymelon.in/public_html/wp-includes UP
<?php
/**
* Core Abilities registration.
*
* @package WordPress
* @subpackage Abilities_API
* @since 6.9.0
*/
declare( strict_types = 1 );
/**
* Registers the core ability categories.
*
* @since 6.9.0
*/
function wp_register_core_ability_categories(): void {
wp_register_ability_category(
'site',
array(
'label' => __( 'Site' ),
'description' => __( 'Abilities that retrieve or modify site information and settings.' ),
)
);
wp_register_ability_category(
'user',
array(
'label' => __( 'User' ),
'description' => __( 'Abilities that retrieve or modify user information and settings.' ),
)
);
}
/**
* Registers the default core abilities.
*
* @since 6.9.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*/
function wp_register_core_abilities(): void {
$category_site = 'site';
$category_user = 'user';
$site_info_properties = array(
'name' => array(
'type' => 'string',
'title' => __( 'Site Title' ),
'description' => __( 'The site title.' ),
),
'description' => array(
'type' => 'string',
'title' => __( 'Tagline' ),
'description' => __( 'The site tagline.' ),
),
'url' => array(
'type' => 'string',
'title' => __( 'Site Address (URL)' ),
'description' => __( 'The public URL where visitors access the site. May differ from the WordPress installation URL.' ),
),
'wpurl' => array(
'type' => 'string',
'title' => __( 'WordPress Address (URL)' ),
'description' => __( 'The URL where WordPress core files are served. May differ from the public site URL.' ),
),
'admin_email' => array(
'type' => 'string',
'title' => __( 'Administration Email Address' ),
'description' => __( 'The site administrator email address.' ),
),
'charset' => array(
'type' => 'string',
'title' => __( 'Site Charset' ),
'description' => __( 'The site character encoding.' ),
),
'language' => array(
'type' => 'string',
'title' => __( 'Site Language' ),
'description' => __( 'The site locale in dash form (e.g. en-US).' ),
),
'version' => array(
'type' => 'string',
'title' => __( 'WordPress Version' ),
'description' => __( 'The WordPress core version running on this site.' ),
),
);
$site_info_fields = array_keys( $site_info_properties );
wp_register_ability(
'core/get-site-info',
array(
'label' => __( 'Get Site Information' ),
'description' => __( 'Returns site information configured in WordPress. By default returns all fields, or optionally a filtered subset.' ),
'category' => $category_site,
'input_schema' => array(
'type' => 'object',
'properties' => array(
'fields' => array(
'type' => 'array',
'items' => array(
'type' => 'string',
'enum' => $site_info_fields,
),
'description' => __( 'Optional: Limit response to specific fields. If omitted, all fields are returned.' ),
),
),
'additionalProperties' => false,
'default' => array(),
),
'output_schema' => array(
'type' => 'object',
'properties' => $site_info_properties,
'additionalProperties' => false,
),
'execute_callback' => static function ( $input = array() ) use ( $site_info_fields ): array {
$input = is_array( $input ) ? $input : array();
$requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $site_info_fields;
$result = array();
foreach ( $requested_fields as $field ) {
if ( 'language' === $field ) {
$result[ $field ] = str_replace( '_', '-', get_locale() );
} else {
$result[ $field ] = get_bloginfo( $field );
}
}
return $result;
},
'permission_callback' => static function (): bool {
return current_user_can( 'manage_options' );
},
'meta' => array(
'annotations' => array(
'readonly' => true,
'destructive' => false,
'idempotent' => true,
),
'public' => true,
),
)
);
$user_info_properties = array(
'id' => array(
'type' => 'integer',
'title' => __( 'User ID' ),
'description' => __( 'Unique identifier for the user.' ),
),
'display_name' => array(
'type' => 'string',
'title' => __( 'Display Name' ),
'description' => __( 'Public-facing name selected by the user.' ),
),
'user_nicename' => array(
'type' => 'string',
'title' => __( 'User Nicename' ),
'description' => __( 'URL-friendly slug for the user. Defaults to the username.' ),
),
'user_login' => array(
'type' => 'string',
'title' => __( 'Username' ),
'description' => __( 'Login identifier for the user. Cannot be changed once set.' ),
),
'roles' => array(
'type' => 'array',
'title' => __( 'Roles' ),
'description' => __( 'Roles assigned to the user, such as administrator, editor, author, contributor, or subscriber.' ),
'items' => array(
'type' => 'string',
),
),
'locale' => array(
'type' => 'string',
'title' => __( 'Language' ),
'description' => __( 'Locale code for the user, such as en_US.' ),
),
'first_name' => array(
'type' => 'string',
'title' => __( 'First Name' ),
'description' => __( 'Given name.' ),
),
'last_name' => array(
'type' => 'string',
'title' => __( 'Last Name' ),
'description' => __( 'Family name.' ),
),
'nickname' => array(
'type' => 'string',
'title' => __( 'Nickname' ),
'description' => __( 'Informal name. Defaults to the username.' ),
),
'description' => array(
'type' => 'string',
'title' => __( 'Biographical Info' ),
'description' => __( 'User-authored biography. May be empty.' ),
),
'user_url' => array(
'type' => 'string',
'title' => __( 'Website' ),
'description' => __( 'Personal website URL.' ),
),
);
$user_info_fields = array_keys( $user_info_properties );
wp_register_ability(
'core/get-user-info',
array(
'label' => __( 'Get User Information' ),
'description' => __( 'Returns profile details for the current authenticated user to support personalization, auditing, and access-aware behavior. By default returns all fields, or optionally a filtered subset.' ),
'category' => $category_user,
'input_schema' => array(
'type' => 'object',
'properties' => array(
'fields' => array(
'type' => 'array',
'items' => array(
'type' => 'string',
'enum' => $user_info_fields,
),
'description' => __( 'Optional: Limit response to specific fields. If omitted, all fields are returned.' ),
),
),
'additionalProperties' => false,
'default' => array(),
),
'output_schema' => array(
'type' => 'object',
'properties' => $user_info_properties,
'additionalProperties' => false,
),
'execute_callback' => static function ( $input = array() ) use ( $user_info_fields ): array {
$input = is_array( $input ) ? $input : array();
$requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $user_info_fields;
$current_user = wp_get_current_user();
$all = array(
'id' => $current_user->ID,
'display_name' => $current_user->display_name,
'user_nicename' => $current_user->user_nicename,
'user_login' => $current_user->user_login,
// Ensure roles are encoded as a JSON array, regardless of their array keys.
'roles' => array_values( $current_user->roles ),
'locale' => get_user_locale( $current_user ),
'first_name' => $current_user->first_name,
'last_name' => $current_user->last_name,
'nickname' => $current_user->nickname,
'description' => $current_user->description,
'user_url' => $current_user->user_url,
);
return array_intersect_key( $all, array_flip( $requested_fields ) );
},
'permission_callback' => static function (): bool {
return is_user_logged_in();
},
'meta' => array(
'annotations' => array(
'readonly' => true,
'destructive' => false,
'idempotent' => true,
),
'public' => true,
),
)
);
$environment_info_properties = array(
'environment' => array(
'type' => 'string',
'title' => __( 'Environment Type' ),
'description' => __( 'The site\'s runtime environment classification.' ),
'enum' => array( 'production', 'staging', 'development', 'local' ),
),
'php_version' => array(
'type' => 'string',
'title' => __( 'PHP Version' ),
'description' => __( 'The PHP runtime version executing WordPress.' ),
),
'db_server_info' => array(
'type' => 'string',
'title' => __( 'Database Server Info' ),
'description' => __( 'The database server vendor and version string reported by the driver.' ),
),
'wp_version' => array(
'type' => 'string',
'title' => __( 'WordPress Version' ),
'description' => __( 'The WordPress core version running on this site.' ),
),
);
$environment_info_fields = array_keys( $environment_info_properties );
wp_register_ability(
'core/get-environment-info',
array(
'label' => __( 'Get Environment Info' ),
'description' => __( 'Returns core details about the site\'s runtime context for diagnostics and compatibility (environment, PHP runtime, database server info, WordPress version). By default returns all fields, or optionally a filtered subset.' ),
'category' => $category_site,
'input_schema' => array(
'type' => 'object',
'properties' => array(
'fields' => array(
'type' => 'array',
'items' => array(
'type' => 'string',
'enum' => $environment_info_fields,
),
'description' => __( 'Optional: Limit response to specific fields. If omitted, all fields are returned.' ),
),
),
'additionalProperties' => false,
'default' => array(),
),
'output_schema' => array(
'type' => 'object',
'properties' => $environment_info_properties,
'additionalProperties' => false,
),
'execute_callback' => static function ( $input = array() ) use ( $environment_info_fields ): array {
global $wpdb;
/** @var array{ fields?: string[] } $input */
$input = is_array( $input ) ? $input : array();
$requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $environment_info_fields;
$db_server_info = '';
if ( method_exists( $wpdb, 'db_server_info' ) ) {
$db_server_info = $wpdb->db_server_info() ?? '';
}
$all = array(
'environment' => wp_get_environment_type(),
'php_version' => phpversion(),
'db_server_info' => $db_server_info,
'wp_version' => get_bloginfo( 'version' ),
);
return array_intersect_key( $all, array_flip( $requested_fields ) );
},
'permission_callback' => static function (): bool {
return current_user_can( 'manage_options' );
},
'meta' => array(
'annotations' => array(
'readonly' => true,
'destructive' => false,
'idempotent' => true,
),
'public' => true,
),
)
);
}
| ID3 | - | |
| IXR | - | |
| PHPMailer | - | |
| Requests | - | |
| SimplePie | - | |
| Text | - | |
| abilities-api | - | |
| abilities-api.php | 32800 | V |
| abilities.php | 11797 | V |
| admin-bar.php | 40067 | V |
| ai-client | - | |
| ai-client.php | 2549 | V |
| assets | - | |
| atomlib.php | 12181 | V |
| author-template.php | 19844 | V |
| block-bindings | - | |
| block-bindings.php | 7632 | V |
| block-editor.php | 28724 | V |
| block-i18n.json | 316 | V |
| block-patterns | - | |
| block-patterns.php | 15606 | V |
| block-supports | - | |
| block-template-utils.php | 63477 | V |
| block-template.php | 18257 | V |
| blocks | - | |
| blocks.php | 124205 | V |
| bookmark-template.php | 12768 | V |
| bookmark.php | 15427 | V |
| build | - | |
| cache-compat.php | 11021 | V |
| cache.php | 13486 | V |
| canonical.php | 34786 | V |
| capabilities.php | 43584 | V |
| category-template.php | 56990 | V |
| category.php | 12834 | V |
| certificates | - | |
| class-IXR.php | 2609 | V |
| class-avif-info.php | 30008 | V |
| class-feed.php | 539 | V |
| class-http.php | 367 | V |
| class-json.php | 171 | V |
| class-oembed.php | 401 | V |
| class-phpass.php | 6771 | V |
| class-phpmailer.php | 664 | V |
| class-pop3.php | 171 | V |
| class-requests.php | 2237 | V |
| class-simplepie.php | 453 | V |
| class-smtp.php | 457 | V |
| class-snoopy.php | 37715 | V |
| class-spl.php | 171 | V |
| class-walker-category-dropdown.php | 2469 | V |
| class-walker-category.php | 8477 | V |
| class-walker-comment.php | 14221 | V |
| class-walker-nav-menu.php | 12044 | V |
| class-walker-page-dropdown.php | 2710 | V |
| class-walker-page.php | 7612 | V |
| class-wp-admin-bar.php | 18002 | V |
| class-wp-ajax-response.php | 5288 | V |
| class-wp-application-passwords.php | 17099 | V |
| class-wp-block-bindings-registry.php | 8263 | V |
| class-wp-block-bindings-source.php | 2992 | V |
| class-wp-block-editor-context.php | 1350 | V |
| class-wp-block-list.php | 4713 | V |
| class-wp-block-metadata-registry.php | 11846 | V |
| class-wp-block-parser-block.php | 2555 | V |
| class-wp-block-parser-frame.php | 1994 | V |
| class-wp-block-parser.php | 11525 | V |
| class-wp-block-pattern-categories-registry.php | 4383 | V |
| class-wp-block-patterns-registry.php | 10265 | V |
| class-wp-block-processor.php | 69914 | V |
| class-wp-block-styles-registry.php | 6419 | V |
| class-wp-block-supports.php | 7578 | V |
| class-wp-block-template.php | 2111 | V |
| class-wp-block-templates-registry.php | 7080 | V |
| class-wp-block-type-registry.php | 5305 | V |
| class-wp-block-type.php | 17222 | V |
| class-wp-block.php | 28236 | V |
| class-wp-classic-to-block-menu-converter.php | 4026 | V |
| class-wp-comment-query.php | 49040 | V |
| class-wp-comment.php | 17249 | V |
| class-wp-connector-registry.php | 15181 | V |
| class-wp-customize-control.php | 26112 | V |
| class-wp-customize-manager.php | 202908 | V |
| class-wp-customize-nav-menus.php | 58034 | V |
| class-wp-customize-panel.php | 10703 | V |
| class-wp-customize-section.php | 11209 | V |
| class-wp-customize-setting.php | 29956 | V |
| class-wp-customize-widgets.php | 72596 | V |
| class-wp-date-query.php | 35970 | V |
| class-wp-dependencies.php | 17089 | V |
| class-wp-dependency.php | 2653 | V |
| class-wp-duotone.php | 40836 | V |
| class-wp-editor.php | 72228 | V |
| class-wp-embed.php | 15908 | V |
| class-wp-error.php | 7514 | V |
| class-wp-exception.php | 253 | V |
| class-wp-fatal-error-handler.php | 8150 | V |
| class-wp-feed-cache-transient.php | 3304 | V |
| class-wp-feed-cache.php | 969 | V |
| class-wp-filter-sentinel.php | 760 | V |
| class-wp-hook.php | 17584 | V |
| class-wp-http-cookie.php | 7269 | V |
| class-wp-http-curl.php | 13261 | V |
| class-wp-http-encoding.php | 6689 | V |
| class-wp-http-ixr-client.php | 3516 | V |
| class-wp-http-proxy.php | 5980 | V |
| class-wp-http-requests-hooks.php | 2022 | V |
| class-wp-http-requests-response.php | 4243 | V |
| class-wp-http-response.php | 2977 | V |
| class-wp-http-streams.php | 16764 | V |
| class-wp-http.php | 41641 | V |
| class-wp-icon-collections-registry.php | 5805 | V |
| class-wp-icons-registry.php | 9903 | V |
| class-wp-image-editor-gd.php | 20741 | V |
| class-wp-image-editor-imagick.php | 43454 | V |
| class-wp-image-editor.php | 17456 | V |
| class-wp-list-util.php | 7443 | V |
| class-wp-locale-switcher.php | 6776 | V |
| class-wp-locale.php | 16848 | V |
| class-wp-matchesmapregex.php | 1828 | V |
| class-wp-meta-query.php | 30507 | V |
| class-wp-metadata-lazyloader.php | 6833 | V |
| class-wp-navigation-fallback.php | 9193 | V |
| class-wp-network-query.php | 19989 | V |
| class-wp-network.php | 12411 | V |
| class-wp-object-cache.php | 17524 | V |
| class-wp-oembed-controller.php | 6905 | V |
| class-wp-oembed.php | 34372 | V |
| class-wp-paused-extensions-storage.php | 5067 | V |
| class-wp-phpmailer.php | 4348 | V |
| class-wp-plugin-dependencies.php | 25209 | V |
| class-wp-post-type-variable.php | 0 | V |
| class-wp-post-type.php | 30672 | V |
| class-wp-post.php | 8806 | V |
| class-wp-query.php | 164148 | V |
| class-wp-recovery-mode-cookie-service.php | 6877 | V |
| class-wp-recovery-mode-email-service.php | 11162 | V |
| class-wp-recovery-mode-key-service.php | 4914 | V |
| class-wp-recovery-mode-link-service.php | 3523 | V |
| class-wp-recovery-mode.php | 11460 | V |
| class-wp-rewrite.php | 63693 | V |
| class-wp-role.php | 2523 | V |
| class-wp-roles.php | 9326 | V |
| class-wp-script-modules.php | 40743 | V |
| class-wp-scripts.php | 36754 | V |
| class-wp-session-tokens.php | 7319 | V |
| class-wp-simplepie-file.php | 3552 | V |
| class-wp-simplepie-sanitize-kses.php | 1903 | V |
| class-wp-site-query.php | 31482 | V |
| class-wp-site.php | 7836 | V |
| class-wp-speculation-rules.php | 7884 | V |
| class-wp-styles.php | 13316 | V |
| class-wp-tax-query.php | 19577 | V |
| class-wp-taxonomy.php | 18559 | V |
| class-wp-term-query.php | 40751 | V |
| class-wp-term.php | 5263 | V |
| class-wp-text-diff-renderer-inline.php | 979 | V |
| class-wp-text-diff-renderer-table.php | 18925 | V |
| class-wp-textdomain-registry.php | 10481 | V |
| class-wp-theme-json-data.php | 1805 | V |
| class-wp-theme-json-resolver.php | 35692 | V |
| class-wp-theme-json-schema.php | 7367 | V |
| class-wp-theme-json.php | 222059 | V |
| class-wp-theme.php | 65811 | V |
| class-wp-token-map.php | 29032 | V |
| class-wp-url-pattern-prefixer.php | 4802 | V |
| class-wp-user-meta-session-tokens.php | 2954 | V |
| class-wp-user-query.php | 44102 | V |
| class-wp-user-request.php | 2342 | V |
| class-wp-user.php | 23189 | V |
| class-wp-view-config-data.php | 29427 | V |
| class-wp-walker.php | 13292 | V |
| class-wp-widget-factory.php | 4113 | V |
| class-wp-widget.php | 18452 | V |
| class-wp-xmlrpc-server.php | 217288 | V |
| class-wp.php | 26520 | V |
| class-wpdb.php | 121437 | V |
| class.wp-dependencies.php | 373 | V |
| class.wp-scripts.php | 343 | V |
| class.wp-styles.php | 338 | V |
| comment-template.php | 103211 | V |
| comment.php | 150630 | V |
| compat-utf8.php | 19386 | V |
| compat.php | 22479 | V |
| connectors.php | 32922 | V |
| cron.php | 46266 | V |
| css | - | |
| customize | - | |
| date.php | 400 | V |
| default-constants.php | 11365 | V |
| default-filters.php | 39500 | V |
| default-widgets.php | 2288 | V |
| deprecated.php | 193977 | V |
| embed-template.php | 338 | V |
| embed.php | 39215 | V |
| error-protection.php | 4092 | V |
| feed-atom-comments.php | 5504 | V |
| feed-atom.php | 3114 | V |
| feed-rdf.php | 2668 | V |
| feed-rss-core.php | 146 | V |
| feed-rss.php | 1189 | V |
| feed-rss2-comments.php | 4136 | V |
| feed-rss2.php | 3799 | V |
| feed.php | 25189 | V |
| fonts | - | |
| fonts.php | 9789 | V |
| formatting.php | 357678 | V |
| functions.php | 295481 | V |
| functions.wp-scripts.php | 20492 | V |
| functions.wp-styles.php | 8654 | V |
| general-template-get.php | 146 | V |
| general-template.php | 184198 | V |
| global-styles-and-settings.php | 20780 | V |
| html-api | - | |
| http.php | 28961 | V |
| https-detection.php | 5857 | V |
| https-migration.php | 4741 | V |
| icons.php | 6334 | V |
| images | - | |
| interactivity-api | - | |
| js | - | |
| json-schema.php | 7802 | V |
| kses.php | 88497 | V |
| l10n | - | |
| l10n.php | 71415 | V |
| link-template.php | 160143 | V |
| load.php | 56475 | V |
| locale.php | 162 | V |
| media-template.php | 65759 | V |
| media.php | 236804 | V |
| meta.php | 66739 | V |
| ms-blogs.php | 26324 | V |
| ms-default-constants.php | 4921 | V |
| ms-default-filters.php | 6636 | V |
| ms-deprecated.php | 21787 | V |
| ms-files.php | 2857 | V |
| ms-functions.php | 92530 | V |
| ms-load.php | 20055 | V |
| ms-network.php | 3782 | V |
| ms-settings.php | 4197 | V |
| ms-site.php | 41729 | V |
| nav-menu-template.php | 25983 | V |
| nav-menu.php | 44269 | V |
| option.php | 105246 | V |
| php-ai-client | - | |
| php-compat | - | |
| pluggable-deprecated.php | 6324 | V |
| pluggable.php | 127919 | V |
| plugin.php | 37123 | V |
| pomo | - | |
| post-formats.php | 7070 | V |
| post-template.php | 69129 | V |
| post-thumbnail-template.php | 10879 | V |
| post.php | 305215 | V |
| query.php | 37554 | V |
| registration-functions.php | 200 | V |
| registration.php | 200 | V |
| rest-api | - | |
| rest-api.php | 102951 | V |
| revision.php | 31241 | V |
| rewrite.php | 19567 | V |
| robots-template.php | 5185 | V |
| rss-functions.php | 277 | V |
| rss.php | 23203 | V |
| script-loader.php | 163550 | V |
| script-modules.php | 12311 | V |
| session.php | 258 | V |
| shortcodes-set.php | 0 | V |
| shortcodes.php | 24034 | V |
| sitemaps | - | |
| sitemaps.php | 3238 | V |
| sodium_compat | - | |
| speculative-loading.php | 11880 | V |
| spl-autoload-compat.php | 441 | V |
| style-engine | - | |
| style-engine.php | 8045 | V |
| taxonomy.php | 178307 | V |
| template-canvas.php | 544 | V |
| template-loader.php | 4267 | V |
| template.php | 38826 | V |
| theme-compat | - | |
| theme-i18n.json | 1892 | V |
| theme-previews.php | 2887 | V |
| theme-templates.php | 4060 | V |
| theme.json | 9480 | V |
| theme.php | 134913 | V |
| update.php | 38269 | V |
| user.php | 180301 | V |
| utf8.php | 6977 | V |
| vars.php | 6600 | V |
| version.php | 1103 | V |
| view-config.php | 19087 | V |
| view-transitions.php | 602 | V |
| widgets | - | |
| widgets.php | 70866 | V |
| wp-db.php | 445 | V |
| wp-diff.php | 792 | V |