Skip to content

Instantly share code, notes, and snippets.

@ulziibat-n
Last active September 10, 2019 10:56
Show Gist options
  • Save ulziibat-n/3f2f0f5d7dc946205673967b615d27b1 to your computer and use it in GitHub Desktop.
Save ulziibat-n/3f2f0f5d7dc946205673967b615d27b1 to your computer and use it in GitHub Desktop.
Elementor Controls snippets for VS Code
{
"elementor control slider": {
"prefix": [
"elementor",
"control",
"slider"
],
"body": [
"$this->add_control(",
" '${1:value}',",
" [",
" 'label' => __( '${2:Name}', 'elementive' ),",
" 'type' => Controls_Manager::SLIDER,",
" 'size_units' => [ 'px', '%' ],",
" 'range' => [",
" 'px' => [",
" 'min' => 0,",
" 'max' => 1000,",
" 'step' => 5,",
" ],",
" '%' => [",
" 'min' => 0,",
" 'max' => 100,",
" ],",
" ],",
" 'default' => [",
" 'unit' => '%',",
" 'size' => 50,",
" ],",
" 'selectors' => [",
" '{{WRAPPER}} .${3:selector}' => 'width: {{SIZE}}{{UNIT}};',",
" ],",
" ]",
");",
],
"description": "Elementor control slider."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment