Astra_Addon_Base_Configs::prepare_box_shadow_tab( string $_section, string $_prefix, int $priority = 90, array $context = array() )
Prepare Box Shadow options.
Description
Parameters
- $_section
-
(string) (Required) section id.
- $_prefix
-
(string) (Required) Control Prefix.
- $priority
-
(int) (Optional) Priority.
Default value: 90
- $context
-
(array) (Optional) Context array. Since 4.11.0.
Default value: array()
Return
(array)
Source
File: classes/builder/type/base/configurations/class-astra-addon-base-configs.php
public static function prepare_box_shadow_tab( $_section, $_prefix, $priority = 90 ) {
$configs = array(
// Option Group: Box shadow Group.
array(
'name' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]',
'type' => 'control',
'control' => 'ast-settings-group',
'title' => __( 'Box Shadow', 'astra-addon' ),
'section' => $_section,
'transport' => 'postMessage',
'priority' => $priority,
'context' => astra_addon_builder_helper()->design_tab,
),
/**
* Option: box shadow
*/
array(
'name' => $_prefix . '-box-shadow-control',
'default' => astra_get_option( $_prefix . '-box-shadow-control' ),
'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]',
'type' => 'sub-control',
'transport' => 'postMessage',
'control' => 'ast-box-shadow',
'section' => $_section,
'sanitize_callback' => array( 'Astra_Addon_Customizer', 'sanitize_box_shadow' ),
'priority' => 1,
'title' => __( 'Value', 'astra-addon' ),
'choices' => array(
'x' => __( 'X', 'astra-addon' ),
'y' => __( 'Y', 'astra-addon' ),
'blur' => __( 'Blur', 'astra-addon' ),
'spread' => __( 'Spread', 'astra-addon' ),
),
'context' => astra_addon_builder_helper()->general_tab,
),
array(
'name' => $_prefix . '-box-shadow-position',
'default' => astra_get_option( $_prefix . '-box-shadow-position' ),
'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]',
'type' => 'sub-control',
'section' => $_section,
'transport' => 'postMessage',
'control' => 'ast-select',
'title' => __( 'Position', 'astra-addon' ),
'choices' => array(
'outline' => __( 'Outline', 'astra-addon' ),
'inset' => __( 'Inset', 'astra-addon' ),
),
'priority' => 2,
'context' => astra_addon_builder_helper()->general_tab,
),
array(
'name' => $_prefix . '-box-shadow-color',
'default' => astra_get_option( $_prefix . '-box-shadow-color' ),
'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]',
'type' => 'sub-control',
'section' => $_section,
'transport' => 'postMessage',
'control' => 'ast-color',
'title' => __( 'Color', 'astra-addon' ),
'rgba' => true,
'priority' => 3,
'context' => astra_addon_builder_helper()->general_tab,
),
);
return $configs;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |