wp-includes/abilities.php:42Registers the default core abilities.
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 ) {Introduced in 6.9.0. One change between 6.9.7 and 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
void to none.verified against sourcesrc/wp-includes/abilities.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.