# Nghiên cứu cách lấy dữ liệu và ghi dữ liệu của widget text (ok)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MHyGDY0HFv590Xyw%2F1.png?alt=media\&token=abcc88a1-eec8-461e-83f2-c12a0c80ab1e)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MMKhbUNHQuI525-1%2F2.png?alt=media\&token=bae9c36c-9e7f-48b3-a002-3e6a1de095ee)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MP5j66n_yIUS2d0D%2F3.png?alt=media\&token=7a405e20-13f8-4be6-875b-b4ae5e17120b)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MRSKAgJYXOy9GDb-%2F4.png?alt=media\&token=561bcca7-4d46-4027-a3d2-5c1ca475f5cd)

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MUA2KCUcvTwlztLj%2F5.png?alt=media\&token=32fb3121-e8fb-4e7c-a97e-785ffeffc625)

Dư liệu được ghi vào bảng wp\_options&#x20;

![](https://2370029328-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWPtKFbhw0XehxVuoiZ%2F-M84LyddBV3B06IB_iK_%2F-M84MWLNWQMWeH7Ma2kw%2F6.png?alt=media\&token=245844a6-54d9-49a8-bcd8-16e768e11018)

Trong file js\_composer\include\classes\shortcodes\vc-column.php

```
	echo '<pre>';
		var_export($this->settings);
	echo '</pre>';
	Result: 
```

```
<?php
[
  'name'            => 'Column',
  'icon'            => 'icon-wpb-row',
  'is_container'    => true,
  'content_element' => false,
  'description'     => 'Place content elements inside the column',
  'params'          => [
    0 => [
      'type'        => 'checkbox',
      'heading'     => 'Use video background?',
      'param_name'  => 'video_bg',
      'description' => 'If checked, video will be used as row background.',
      'value'       =>
      [
        'Yes' => 'yes',
      ],
    ],
    1 =>
    [
      'type'        => 'textfield',
      'heading'     => 'YouTube link',
      'param_name'  => 'video_bg_url',
      'value'       => 'https://www.youtube.com/watch?v=lMJXxhRFO1k',
      'description' => 'Add YouTube link.',
      'dependency'  => [
        'element'   => 'video_bg',
        'not_empty' => true,
      ],
    ],
    2 =>
    [
      'type'        => 'dropdown',
      'heading'     => 'Parallax',
      'param_name'  => 'video_bg_parallax',
      'value'       =>
      [
        'None'      => '',
        'Simple'    => 'content-moving',
        'With fade' => 'content-moving-fade',
      ],
      'description' => 'Add parallax type background for row.',
      'dependency'  => [
        'element'   => 'video_bg',
        'not_empty' => true,
      ],
    ],
    3 =>
    [
      'type'        => 'dropdown',
      'heading'     => 'Parallax',
      'param_name'  => 'parallax',
      'value'       =>
      [
        'None'      => '',
        'Simple'    => 'content-moving',
        'With fade' => 'content-moving-fade',
      ],
      'description' => 'Add parallax type background for row (Note: If no image is specified, parallax will use background image from Design Options).',
      'dependency'  =>
      [
        'element'  => 'video_bg',
        'is_empty' => true,
      ],
    ],
    4 => [
      'type'        => 'attach_image',
      'heading'     => 'Image',
      'param_name'  => 'parallax_image',
      'value'       => '',
      'description' => 'Select image from media library.',
      'dependency'  =>
      [
        'element'   => 'parallax',
        'not_empty' => true,
      ],
    ],
    5 =>
    [
      'type'        => 'textfield',
      'heading'     => 'Parallax speed',
      'param_name'  => 'parallax_speed_video',
      'value'       => '1.5',
      'description' => 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)',
      'dependency'  => [
        'element'   => 'video_bg_parallax',
        'not_empty' => true,
      ],
    ],
    6 =>
    [
      'type'        => 'textfield',
      'heading'     => 'Parallax speed',
      'param_name'  => 'parallax_speed_bg',
      'value'       => '1.5',
      'description' => 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)',
      'dependency'  =>
      [
        'element'   => 'parallax',
        'not_empty' => true,
      ],
    ],
    7 =>
    [
      'type'        => 'animation_style',
      'heading'     => 'CSS Animation',
      'param_name'  => 'css_animation',
      'admin_label' => false,
      'value'       => '',
      'settings'    =>
      [
        'type'   => 'in',
        'custom' =>
        [
          0 => [
            'label'  => 'Default',
            'values' =>
            [
              'Top to bottom'      => 'top-to-bottom',
              'Bottom to top'      => 'bottom-to-top',
              'Left to right'      => 'left-to-right',
              'Right to left'      => 'right-to-left',
              'Appear from center' => 'appear',
            ],
          ],
        ],
      ],
      'description' => 'Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).',
    ],
    8 =>
    [
      'type'        => 'el_id',
      'heading'     => 'Element ID',
      'param_name'  => 'el_id',
      'description' => 'Enter element ID (Note: make sure it is unique and valid according to w3c specification).',
    ],
    9 =>
    [
      'type'        => 'textfield',
      'heading'     => 'Extra class name',
      'param_name'  => 'el_class',
      'description' => 'Style particular content element differently - add a class name and refer to it in custom CSS.',
    ],
    10 =>
    [
      'type'       => 'css_editor',
      'heading'    => 'CSS box',
      'param_name' => 'css',
      'group'      => 'Design Options',
    ],
    11 =>
    [
      'type'        => 'dropdown',
      'heading'     => 'Width',
      'param_name'  => 'width',
      'value'       =>
      [
        '1 column - 1/12'    => '1/12',
        '2 columns - 1/6'    => '1/6',
        '3 columns - 1/4'    => '1/4',
        '4 columns - 1/3'    => '1/3',
        '5 columns - 5/12'   => '5/12',
        '6 columns - 1/2'    => '1/2',
        '7 columns - 7/12'   => '7/12',
        '8 columns - 2/3'    => '2/3',
        '9 columns - 3/4'    => '3/4',
        '10 columns - 5/6'   => '5/6',
        '11 columns - 11/12' => '11/12',
        '12 columns - 1/1'   => '1/1',
        '20% - 1/5'          => '1/5',
        '40% - 2/5'          => '2/5',
        '60% - 3/5'          => '3/5',
        '80% - 4/5'          => '4/5',
      ],
      'group'       => 'Responsive Options',
      'description' => 'Select column width.',
      'std'         => '1/1',
    ],
    12 =>
    [
      'type'        => 'column_offset',
      'heading'     => 'Responsiveness',
      'param_name'  => 'offset',
      'group'       => 'Responsive Options',
      'description' => 'Adjust column for different screen sizes. Control width, offset and visibility settings.',
    ],
  ],
  'js_view'         => 'VcColumnView',
  'base'            => 'vc_column',
  '_category_ids'   => [],
]
```
