parent()->get('Version')); wp_enqueue_style( 'aster-gym-trainer-style', get_stylesheet_uri(), array( $aster_gym_trainer_parentcss ), $aster_gym_trainer_theme->get('Version')); wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); } add_action( 'wp_enqueue_scripts', 'aster_gym_trainer_enqueue_styles' ); if ( ! function_exists( 'aster_gym_trainer_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function aster_gym_trainer_setup() { // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', 'woocommerce', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'aster_gym_trainer_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); /** * Add theme support for gutenberg block. */ add_theme_support( 'align-wide' ); add_theme_support( 'responsive-embeds' ); } endif; add_action( 'after_setup_theme', 'aster_gym_trainer_setup' ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function aster_gym_trainer_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'aster-gym-trainer' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'aster-gym-trainer' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title"><span>', 'after_title' => '</span></h2>', ) ); // Regsiter 4 footer widgets. register_sidebars( 4, array( /* translators: %d: Footer Widget count. */ 'name' => esc_html__( 'Footer Widget %d', 'aster-gym-trainer' ), 'id' => 'footer-widget', 'description' => esc_html__( 'Add widgets here.', 'aster-gym-trainer' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h6 class="widget-title"><span>', 'after_title' => '</span></h6>', ) ); } add_action( 'widgets_init', 'aster_gym_trainer_widgets_init' ); function aster_gym_trainer_output_footer_copyright_content() { $theme_data = wp_get_theme(); $search = array( '[the-year]', '[site-link]' ); $replace = array( date( 'Y' ) ); /* translators: 1: Year, 2: Site Title with home URL. */ $copyright_default = sprintf( esc_html_x( 'Copyright © %1$s %2$s', '1: Year, 2: Site Title with home URL', 'aster-gym-trainer' ), '[the-year]', '[site-link]' ); $copyright_text = get_theme_mod( 'dark_fitness_footer_copyright_text', $copyright_default ); $copyright_text = str_replace( $search, $replace, $copyright_text ); $copyright_text .= esc_html( $theme_data->get( 'Name' ) ) . ' ' . esc_html__( 'by', 'aster-gym-trainer' ) . ' <a target="_blank" href="' . esc_url( $theme_data->get( 'ThemeURI' ) ) . '">' . esc_html( ucwords( $theme_data->get( 'Author' ) ) ) . '</a>'; /* translators: %s: WordPress.org URL */ $copyright_text .= sprintf( esc_html__( ' | Powered by %s', 'aster-gym-trainer' ), '<a href="' . esc_url( __( 'https://wordpress.org/', 'aster-gym-trainer' ) ) . '" target="_blank">WordPress</a>. ' ); ?> <span><?php echo wp_kses_post( $copyright_text ); ?></span> <?php } add_action( 'aster_gym_trainer_footer_copyright', 'aster_gym_trainer_output_footer_copyright_content' );