Skip to content

Instantly share code, notes, and snippets.

@bigdigital
bigdigital / function.php
Last active September 22, 2021 06:11
Bring back Elementor pro theme styles in The7
add_action( 'after_setup_theme', 'enable_kit_manager', 20 );
function enable_kit_manager() {
$kit_manager_control = The7_Elementor_Compatibility::instance()->kit_manager_control;
remove_action( 'elementor/init', [ $kit_manager_control, 'disable_elementor_kit_manager'] , 1 );
}
add_action( 'elementor/editor/footer', 'the7_elementor_editor_custom_html' );
function the7_elementor_editor_custom_html(){
const TIME_SENSOR = hmSensor.createSensor(hmSensor.id.TIME)
let getDateLocal = function () {
let utc = TIME_SENSOR.utc
let d2 = new Date();
let offsetHour = 0
if (TIME_SENSOR.day < d2.getDate() || TIME_SENSOR.hour < d2.getHours()) {
offsetHour = TIME_SENSOR.hour - (d2.getHours() + (d2.getDate() - TIME_SENSOR.day) * 24)