Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Admin/API
File: Leaderboards.php
'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ),
[500] Fix | Delete
'type' => 'integer',
[501] Fix | Delete
'default' => 5,
[502] Fix | Delete
'minimum' => 1,
[503] Fix | Delete
'maximum' => 20,
[504] Fix | Delete
'sanitize_callback' => 'absint',
[505] Fix | Delete
'validate_callback' => 'rest_validate_request_arg',
[506] Fix | Delete
);
[507] Fix | Delete
$params['after'] = array(
[508] Fix | Delete
'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ),
[509] Fix | Delete
'type' => 'string',
[510] Fix | Delete
'format' => 'date-time',
[511] Fix | Delete
'validate_callback' => 'rest_validate_request_arg',
[512] Fix | Delete
);
[513] Fix | Delete
$params['before'] = array(
[514] Fix | Delete
'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ),
[515] Fix | Delete
'type' => 'string',
[516] Fix | Delete
'format' => 'date-time',
[517] Fix | Delete
'validate_callback' => 'rest_validate_request_arg',
[518] Fix | Delete
);
[519] Fix | Delete
$params['persisted_query'] = array(
[520] Fix | Delete
'description' => __( 'URL query to persist across links.', 'woocommerce' ),
[521] Fix | Delete
'type' => 'string',
[522] Fix | Delete
'validate_callback' => 'rest_validate_request_arg',
[523] Fix | Delete
);
[524] Fix | Delete
return $params;
[525] Fix | Delete
}
[526] Fix | Delete
[527] Fix | Delete
/**
[528] Fix | Delete
* Get the schema, conforming to JSON Schema.
[529] Fix | Delete
*
[530] Fix | Delete
* @return array
[531] Fix | Delete
*/
[532] Fix | Delete
public function get_item_schema() {
[533] Fix | Delete
$schema = array(
[534] Fix | Delete
'$schema' => 'http://json-schema.org/draft-04/schema#',
[535] Fix | Delete
'title' => 'leaderboard',
[536] Fix | Delete
'type' => 'object',
[537] Fix | Delete
'properties' => array(
[538] Fix | Delete
'id' => array(
[539] Fix | Delete
'type' => 'string',
[540] Fix | Delete
'description' => __( 'Leaderboard ID.', 'woocommerce' ),
[541] Fix | Delete
'context' => array( 'view' ),
[542] Fix | Delete
'readonly' => true,
[543] Fix | Delete
),
[544] Fix | Delete
'label' => array(
[545] Fix | Delete
'type' => 'string',
[546] Fix | Delete
'description' => __( 'Displayed title for the leaderboard.', 'woocommerce' ),
[547] Fix | Delete
'context' => array( 'view' ),
[548] Fix | Delete
'readonly' => true,
[549] Fix | Delete
),
[550] Fix | Delete
'headers' => array(
[551] Fix | Delete
'type' => 'array',
[552] Fix | Delete
'description' => __( 'Table headers.', 'woocommerce' ),
[553] Fix | Delete
'context' => array( 'view' ),
[554] Fix | Delete
'readonly' => true,
[555] Fix | Delete
'items' => array(
[556] Fix | Delete
'type' => 'array',
[557] Fix | Delete
'properties' => array(
[558] Fix | Delete
'label' => array(
[559] Fix | Delete
'description' => __( 'Table column header.', 'woocommerce' ),
[560] Fix | Delete
'type' => 'string',
[561] Fix | Delete
'context' => array( 'view', 'edit' ),
[562] Fix | Delete
'readonly' => true,
[563] Fix | Delete
),
[564] Fix | Delete
),
[565] Fix | Delete
),
[566] Fix | Delete
),
[567] Fix | Delete
'rows' => array(
[568] Fix | Delete
'type' => 'array',
[569] Fix | Delete
'description' => __( 'Table rows.', 'woocommerce' ),
[570] Fix | Delete
'context' => array( 'view' ),
[571] Fix | Delete
'readonly' => true,
[572] Fix | Delete
'items' => array(
[573] Fix | Delete
'type' => 'array',
[574] Fix | Delete
'properties' => array(
[575] Fix | Delete
'display' => array(
[576] Fix | Delete
'description' => __( 'Table cell display.', 'woocommerce' ),
[577] Fix | Delete
'type' => 'string',
[578] Fix | Delete
'context' => array( 'view', 'edit' ),
[579] Fix | Delete
'readonly' => true,
[580] Fix | Delete
),
[581] Fix | Delete
'value' => array(
[582] Fix | Delete
'description' => __( 'Table cell value.', 'woocommerce' ),
[583] Fix | Delete
'type' => 'string',
[584] Fix | Delete
'context' => array( 'view', 'edit' ),
[585] Fix | Delete
'readonly' => true,
[586] Fix | Delete
),
[587] Fix | Delete
'format' => array(
[588] Fix | Delete
'description' => __( 'Table cell format.', 'woocommerce' ),
[589] Fix | Delete
'type' => 'string',
[590] Fix | Delete
'context' => array( 'view' ),
[591] Fix | Delete
'enum' => array( 'currency', 'number' ),
[592] Fix | Delete
'readonly' => true,
[593] Fix | Delete
'required' => false,
[594] Fix | Delete
),
[595] Fix | Delete
),
[596] Fix | Delete
),
[597] Fix | Delete
),
[598] Fix | Delete
),
[599] Fix | Delete
);
[600] Fix | Delete
[601] Fix | Delete
return $this->add_additional_fields_schema( $schema );
[602] Fix | Delete
}
[603] Fix | Delete
[604] Fix | Delete
/**
[605] Fix | Delete
* Get schema for the list of allowed leaderboards.
[606] Fix | Delete
*
[607] Fix | Delete
* @return array $schema
[608] Fix | Delete
*/
[609] Fix | Delete
public function get_public_allowed_item_schema() {
[610] Fix | Delete
$schema = $this->get_public_item_schema();
[611] Fix | Delete
unset( $schema['properties']['rows'] );
[612] Fix | Delete
return $schema;
[613] Fix | Delete
}
[614] Fix | Delete
}
[615] Fix | Delete
[616] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function