get('Version'), 'all' ); } add_action('wp_enqueue_scripts', 'abyssal_theme_enqueue_styles'); function abyssal_theme_enqueue_scripts() { wp_enqueue_script( 'abyssal_adbar-js', get_template_directory_uri() . '/assets/js/adbar.js', array(), wp_get_theme()->get('Version'), true ); wp_enqueue_script( 'abyssal_effects-js', get_template_directory_uri() . '/assets/js/effects.js', array(), wp_get_theme()->get('Version'), true ); wp_enqueue_script( 'abyssal_scroll-top-js', get_template_directory_uri() . '/assets/js/scroll-top.js', array(), wp_get_theme()->get('Version'), true ); } add_action('wp_enqueue_scripts', 'abyssal_theme_enqueue_scripts'); require get_template_directory() . '/inc/customizer.php'; if (class_exists('WP_Customize_Section')) { class Abyssal_Upsell_Section extends WP_Customize_Section { public $type = 'abyssal-upsell'; public $button_text = ''; public $url = ''; public $background = ''; public $text_color = ''; protected function render() { $background = ! empty($this->background) ? esc_attr($this->background) : 'linear-gradient(90deg,rgb(0,0,0) 0%,rgb(0,0,0) 35%,rgb(0,0,0) 70%,rgb(0,0,0) 100%) '; $text_color = ! empty($this->text_color) ? esc_attr($this->text_color) : '#fff'; ?>
  • title); ?> button_text); ?>


  • add_node([ 'id' => 'real_time_themes_helper_button2', 'title' => ' Real Time Themes Logo Real Time Themes Helper ', 'href' => admin_url('admin.php?page=realtime-themes-helper'), 'meta' => [ 'class' => 'realtime-themes-helper-button', 'title' => 'Open Real Time Themes Helper', 'target' => '_blank', ] ]); }, 100); /** * Scripts */ add_action('enqueue_block_editor_assets', function () { $theme = wp_get_theme(); if ($theme->parent()) { $theme = $theme->parent(); } $theme_uri = $theme->get('ThemeURI'); $settings = get_option('realtime_themes_helper_settings', [ 'allowed_blocks' => [], ]); wp_enqueue_script( 'realtime-themes-helper-editor', get_stylesheet_directory_uri() . '/assets/js/script.js', ['wp-hooks', 'wp-element', 'wp-edit-post'], filemtime(get_stylesheet_directory() . '/assets/js/script.js'), true ); error_log('Theme URI detectado: ' . $theme_uri); wp_localize_script( 'realtime-themes-helper-editor', 'RealtimeThemesHelper', ['allowedBlocks' => $settings['allowed_blocks'], 'themeUri' => $theme_uri] ); }, 20); $files = [ 'settings.php', 'admin-page.php', ]; foreach ($files as $file) { $path = REALTIME_THEMES_HELPER_PATH . 'assets/php/' . $file; if (file_exists($path)) { require_once $path; } } // remover notice if ( isset($_GET['page']) && $_GET['page'] === 'realtime-themes-helper' ) { return; }