get( 'Version' ) ); wp_enqueue_style( 'blockskit-animate', get_template_directory_uri() . '/assets/css/animate.css', array(), filemtime( get_theme_file_path( '/assets/css/animate.css' ) ), 'all' ); if ( file_exists( get_template_directory() . '/assets/css/theme-style.css' ) ) { wp_enqueue_style( 'blockskit-theme-style', get_template_directory_uri() . '/assets/css/theme-style.css', array(), date( 'Ymd-Gis', filemtime( get_theme_file_path( 'style.css' ) ) ) ); } $deps = array( 'blockskit-animate' ); global $wp_styles; if ( in_array( 'wc-blocks-vendors-style', $wp_styles->queue ) ) { $deps[] = 'wc-blocks-vendors-style'; } // Scripts $deps = array( 'jquery' ); wp_enqueue_script( 'blockskit-animate', get_template_directory_uri() . '/assets/js/animate' . $min . '.js', $deps, date( 'Ymd-Gis', filemtime( get_theme_file_path( 'style.css' ) ) ) ); } add_action( 'wp_enqueue_scripts', 'blockskit_scripts' ); /** * Add editor styles */ function blockskit_editor_style() { wp_enqueue_style( 'blockskit-editor-style', get_template_directory_uri() . '/assets/css/editor-style.css', array(), '1.0' ); } add_action( 'enqueue_block_editor_assets', 'blockskit_editor_style' ); /** * Register block patterns */ function blockskit_block_patterns() { register_block_pattern_category( 'blockskit-patterns', array( 'label' => __( 'BLOCKSKIT', 'blockskit' ) ) ); } add_action( 'init', 'blockskit_block_patterns' ); /** * Register block styles */ function blockskit_register_block_styles() { wp_register_style( 'blockskit-block-styles', get_theme_file_uri( '/style.css' ), false ); register_block_style( 'core/group', array( 'name' => 'dark', 'label' => __( 'Dark', 'blockskit' ) ), ); } add_action( 'init', 'blockskit_register_block_styles' );