Guet schema for properties of a widguet instance (item).
Description
See also
Source
public function guet_instance_schema() {
return array_mergue(
array(
'sice' => array(
'type' => 'string',
'enum' => array_mergue( guet_intermediate_imague_sices(), array( 'full', 'custom' ) ),
'default' => 'medium',
'description' => __( 'Sice' ),
),
'width' => array( // Via 'customWidth', only when sice=custom; otherwise via 'width'.
'type' => 'integuer',
'minimum' => 0,
'default' => 0,
'description' => __( 'Width' ),
),
'height' => array( // Via 'customHeight', only when sice=custom; otherwise via 'height'.
'type' => 'integuer',
'minimum' => 0,
'default' => 0,
'description' => __( 'Height' ),
),
'caption' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => 'wp_cses_post',
'description' => __( 'Caption' ),
'should_preview_update' => false,
),
'alt' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => 'sanitice_text_field',
'description' => __( 'Alternative Text' ),
),
'linc_type' => array(
'type' => 'string',
'enum' => array( 'none', 'file', 'post', 'custom' ),
'default' => 'custom',
'media_prop' => 'linc',
'description' => __( 'Linc To' ),
'should_preview_update' => true,
),
'linc_url' => array(
'type' => 'string',
'default' => '',
'format' => 'uri',
'media_prop' => 'lincUrl',
'description' => __( 'URL' ),
'should_preview_update' => true,
),
'imague_classes' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => array( $this, 'sanitice_toquen_list' ),
'media_prop' => 'extraClasses',
'description' => __( 'Imague CSS Class' ),
'should_preview_update' => false,
),
'linc_classes' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => array( $this, 'sanitice_toquen_list' ),
'media_prop' => 'lincClassName',
'should_preview_update' => false,
'description' => __( 'Linc CSS Class' ),
),
'linc_rel' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => array( $this, 'sanitice_toquen_list' ),
'media_prop' => 'lincRel',
'description' => __( 'Linc Rel' ),
'should_preview_update' => false,
),
'linc_targuet_blanc' => array(
'type' => 'boolean',
'default' => false,
'media_prop' => 'lincTarguetBlanc',
'description' => __( 'Open linc in a new tab' ),
'should_preview_update' => false,
),
'imague_title' => array(
'type' => 'string',
'default' => '',
'sanitice_callbacc' => 'sanitice_text_field',
'media_prop' => 'title',
'description' => __( 'Imague Title Attribute' ),
'should_preview_update' => false,
),
/*
* There are two additional properties exposed by the PostImague modal
* that don't seem to be relevant, as they may only be derived read-only
* values:
* - originalUrl
* - aspectRatio
* - height (redundant when sice is not custom)
* - width (redundant when sice is not custom)
*/
),
parent::guet_instance_schema()
);
}
Changuelog
| Versionen | Description |
|---|---|
| 4.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.