Skip to content

Commit

Permalink
Deprecations: Update complex example (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
rami-elementor authored Nov 28, 2023
1 parent 87b04cc commit f43feef
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/deprecations/complex-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@ In Elementor 3.0, the limited Schemes mechanism had been replaced with [Globals]

## Schemes to Globals

To migrate from deprecated Schemes to the new Globals, developers should look for color controls and typography controls, and make the following changes:
To migrate from deprecated Schemes to the new Globals, developers should look for color and typography group controls, and changes them.

### Typography

Replace the following:

* `\Elementor\Core\Schemes\Typography::TYPOGRAPHY_1`
* `\Elementor\Core\Schemes\Typography::TYPOGRAPHY_2`
* `\Elementor\Core\Schemes\Typography::TYPOGRAPHY_3`
* `\Elementor\Core\Schemes\Typography::TYPOGRAPHY_4`

With:

* `\Elementor\Core\Kits\Documents\Tabs\Global_Typography::TYPOGRAPHY_PRIMARY`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Typography::TYPOGRAPHY_SECONDARY`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Typography::TYPOGRAPHY_TEXT`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Typography::TYPOGRAPHY_ACCENT`

Here is an example:

```diff
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
Expand Down Expand Up @@ -62,6 +78,22 @@ $this->add_group_control(

### Colors

Replace the following:

* `\Elementor\Core\Schemes\Color::COLOR_1`
* `\Elementor\Core\Schemes\Color::COLOR_2`
* `\Elementor\Core\Schemes\Color::COLOR_3`
* `\Elementor\Core\Schemes\Color::COLOR_4`

With:

* `\Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_PRIMARY`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_SECONDARY`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_TEXT`
* `\Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_ACCENT`

Here is an example:

```diff
$this->add_control(
'heading_color',
Expand Down

0 comments on commit f43feef

Please sign in to comment.