Files
wp-multisite-waas/inc/api/schemas/site-create.php
David Stone d88e50df38 Prep Plugin for release on WordPress.org (#23)
* Update translation text domain
* Escape everything that should be escaped.
* Add nonce checks where needed.
* Sanitize all inputs.
* Apply Code style changes across the codebase.
* Correct many deprecation notices.
* Optimize load order of many filters.
* Add Proper Build script
* Use emojii flags
* Fix i18n deprecation  notice for translating too early
* Put all scripts in footer and load async
2025-04-14 11:36:46 -06:00

166 lines
5.2 KiB
PHP

<?php
/**
* Schema for site@create.
*
* @package WP_Ultimo\API\Schemas
* @since 2.0.11
*/
// Exit if accessed directly
defined('ABSPATH') || exit;
/**
* Schema for site@create.
*
* @since 2.0.11
* @internal last-generated in 2022-12
* @generated class generated by our build scripts, do not change!
*
* @since 2.0.11
*/
return [
'categories' => [
'description' => __('The categories this site belongs to.', 'wp-multisite-waas'),
'type' => 'array',
'required' => false,
],
'featured_image_id' => [
'description' => __('The ID of the feature image of the site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'site_id' => [
'description' => __('The network ID for this site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => true,
],
'title' => [
'description' => __('The site title.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'name' => [
'description' => __('The site name.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'description' => [
'description' => __('A description for the site, usually a short text.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'domain' => [
'description' => __("The site domain. You don't need to put http or https in front of your domain in this field. e.g: example.com.", 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'path' => [
'description' => __('Path of the site. Used when in sub-directory mode.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'registered' => [
'description' => __('Date when the site was registered.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'last_updated' => [
'description' => __('Date of the last update on this site.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'active' => [
'description' => __('Holds the ID of the customer that owns this site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'public' => [
'description' => __('Set true if this site is a public one, false if not.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'archived' => [
'description' => __('Is this an archived site.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'mature' => [
'description' => __('Is this a site with mature content.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'spam' => [
'description' => __('Is this an spam site.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'deleted' => [
'description' => __('Is this site deleted.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'lang_id' => [
'description' => __('The ID of the language being used on this site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'customer_id' => [
'description' => __('The ID of the customer that owns this site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => true,
],
'membership_id' => [
'description' => __('The ID of the membership associated with this site, if any.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => true,
],
'template_id' => [
'description' => __('The ID of the templated used to create this site.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'type' => [
'description' => __('The type of this particular site. Can be default, site_template, customer_owned, pending, external, main or other values added by third-party add-ons.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
'enum' => [
'default',
'site_template',
'customer_owned',
'pending',
'external',
'main',
],
],
'signup_options' => [
'description' => __('Keeps signup options for the site.', 'wp-multisite-waas'),
'type' => 'array',
'required' => false,
],
'signup_meta' => [
'description' => __('Keeps signup meta for the site.', 'wp-multisite-waas'),
'type' => 'array',
'required' => false,
],
'date_created' => [
'description' => __('Model creation date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'date_modified' => [
'description' => __('Model last modification date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'migrated_from_id' => [
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'skip_validation' => [
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
];