Astra_Get_Global_Buttons::get_output_schema()

Get output schema.


Description


Return

(array)


Source

File: inc/abilities/customizer/globals/buttons/class-astra-get-global-buttons.php

	public function get_output_schema() {
		$button_schema = array(
			'type'        => 'object',
			'description' => __( 'Button settings object.', 'astra' ),
			'properties'  => array(
				'preset'                 => array(
					'type'        => 'string',
					'description' => __( 'Button preset style key.', 'astra' ),
				),
				'preset_label'           => array(
					'type'        => 'string',
					'description' => __( 'Human-readable preset label.', 'astra' ),
				),
				'text_color'             => array(
					'type'        => 'string',
					'description' => __( 'Button text color.', 'astra' ),
				),
				'text_hover_color'       => array(
					'type'        => 'string',
					'description' => __( 'Button text hover color.', 'astra' ),
				),
				'background_color'       => array(
					'type'        => 'string',
					'description' => __( 'Button background color.', 'astra' ),
				),
				'background_hover_color' => array(
					'type'        => 'string',
					'description' => __( 'Button background hover color.', 'astra' ),
				),
				'border_color'           => array(
					'type'        => 'string',
					'description' => __( 'Button border color.', 'astra' ),
				),
				'border_hover_color'     => array(
					'type'        => 'string',
					'description' => __( 'Button border hover color.', 'astra' ),
				),
				'padding'                => array(
					'type'        => 'object',
					'description' => __( 'Button padding values.', 'astra' ),
				),
				'border_width'           => array(
					'type'        => 'object',
					'description' => __( 'Button border width values.', 'astra' ),
				),
				'border_radius'          => array(
					'type'        => 'object',
					'description' => __( 'Button border radius values.', 'astra' ),
				),
			),
		);

		return $this->build_output_schema(
			array(
				'primary_button'    => $button_schema,
				'secondary_button'  => $button_schema,
				'available_presets' => array(
					'type'        => 'object',
					'description' => __( 'Available button preset options.', 'astra' ),
				),
			)
		);
	}

User Contributed Notes

You must log in before being able to contribute a note or feedback.