Skip to content

Instantly share code, notes, and snippets.

@bobbydank
Created April 24, 2022 22:50
Show Gist options
  • Save bobbydank/38e8dfb9a980ea9c87adba69db72e117 to your computer and use it in GitHub Desktop.
Save bobbydank/38e8dfb9a980ea9c87adba69db72e117 to your computer and use it in GitHub Desktop.
Elementor - Fix deprecated schema errors
<?php
/**
* Plugin Name: Elementor Scheme Class Issue
*
* 1) Create wp-content/mu-plugins folder
* 2) Create php file (name doesn't matter)
* 3) Copy/Paste
**/
namespace Elementor;
\add_action(
'plugins_loaded',
function() {
if ( ! class_exists( 'Elementor\Scheme_Color' ) ) {
class Scheme_Color extends Core\Schemes\Color {}
}
}
);
\add_action(
'plugins_loaded',
function() {
if ( ! class_exists( 'Elementor\Scheme_Typography' ) ) {
class Scheme_Typography extends Core\Schemes\Typography {}
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment