| <?php |
| |
| |
| |
|
|
| |
| if ( ! defined( 'ABSPATH' ) ) { |
| exit; |
| } |
|
|
| |
| if ( ! defined( 'ASTRA_THEME_VERSION' ) ) { |
| define( 'ASTRA_THEME_VERSION', '4.6.3' ); |
| } |
| define( 'ASTRA_THEME_DIR', trailingslashit( get_template_directory() ) ); |
| define( 'ASTRA_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) ); |
|
|
| |
| require_once ASTRA_THEME_DIR . 'inc/class-astra-theme.php'; |
|
|
| |
| if ( class_exists( 'Astra_Theme' ) ) { |
| Astra_Theme::get_instance(); |
| } |
|
|
| |
| |
| |
|
|
| |
| |
| |
| function usedcarbuyers_ai_scripts() { |
| |
| if ( is_page_template( 'template-usedcarbuyers.php' ) || is_page_template( 'template-home-usedcarbuyers.php' ) ) { |
| |
| |
| wp_enqueue_script( 'tailwind', 'https://cdn.tailwindcss.com', array(), null, false ); |
| |
| |
| wp_enqueue_script( 'feather-icons', 'https://unpkg.com/feather-icons', array(), null, true ); |
| |
| |
| wp_enqueue_style( 'usedcarbuyers-ai-styles', get_stylesheet_directory_uri() . '/style-usedcarbuyers.css', array(), '1.0.0' ); |
| |
| |
| wp_enqueue_script( 'usedcarbuyers-ai-scripts', get_stylesheet_directory_uri() . '/script-usedcarbuyers.js', array( 'feather-icons' ), '1.0.0', true ); |
| |
| |
| $tailwind_config = ' |
| tailwind.config = { |
| theme: { |
| extend: { |
| colors: { |
| primary: "#1e40af", |
| secondary: "#f59e0b", |
| accent: "#dc2626", |
| dark: "#0f172a", |
| light: "#f8fafc" |
| }, |
| animation: { |
| "float": "float 6s ease-in-out infinite", |
| "glow": "glow 2s ease-in-out infinite alternate", |
| "slide-in": "slideIn 0.5s ease-out" |
| }, |
| keyframes: { |
| float: { |
| "0%, 100%": { transform: "translateY(0)" }, |
| "50%": { transform: "translateY(-20px)" } |
| }, |
| glow: { |
| "0%": { boxShadow: "0 0 20px #3b82f6" }, |
| "100%": { boxShadow: "0 0 30px #1e40af, 0 0 40px #1d4ed8" } |
| }, |
| slideIn: { |
| "0%": { transform: "translateY(100px)", opacity: "0" }, |
| "100%": { transform: "translateY(0)", opacity: "1" } |
| } |
| } |
| } |
| } |
| }'; |
| wp_add_inline_script( 'tailwind', $tailwind_config ); |
| } |
| } |
| add_action( 'wp_enqueue_scripts', 'usedcarbuyers_ai_scripts', 20 ); |
|
|
| |
| |
| |
| function usedcarbuyers_ai_feather_init() { |
| if ( is_page_template( 'template-usedcarbuyers.php' ) || is_page_template( 'template-home-usedcarbuyers.php' ) ) { |
| echo '<script>if(typeof feather !== "undefined") { feather.replace(); }</script>'; |
| } |
| } |
| add_action( 'wp_footer', 'usedcarbuyers_ai_feather_init', 99 ); |
|
|
| |
| |
| |