60, 'width' => 200, 'flex-width' => true, 'flex-height' => true, ]); add_theme_support('html5', ['search-form', 'comment-form', 'gallery', 'caption']); add_theme_support('automatic-feed-links'); add_theme_support('align-wide'); add_theme_support('responsive-embeds'); add_theme_support('wp-block-styles'); // Recommended supports add_theme_support('custom-header', [ 'default-image' => '', 'width' => 1600, 'height' => 400, 'flex-height' => true, 'flex-width' => true, ]); add_theme_support('custom-background', [ 'default-color' => 'f8fafc', 'default-image' => '', ]); add_theme_support('editor-styles'); add_editor_style('style.css'); // Navigation register_nav_menus(['primary' => __('Primary Menu', 'appybix')]); } add_action('after_setup_theme', 'appybix_setup'); // ---------------------------- // Enqueue Styles & Scripts // ---------------------------- function appybix_scripts() { // Google Fonts wp_enqueue_style('appybix-google-fonts', 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap', [], null); // Main stylesheet wp_enqueue_style('appybix-style', get_stylesheet_uri(), [], wp_get_theme()->get('Version')); // jQuery + main JS wp_enqueue_script('jquery'); wp_enqueue_script('appybix-main', get_template_directory_uri() . '/assets/js/main.js', ['jquery'], null, true); // Dynamic Theme Color CSS + recommended .bypostauthor $theme_color = esc_attr(get_theme_mod('theme_color', '#16a34a')); $custom_css = " h1,h2,h3,.btn-get-apk { background: {$theme_color}; color: #fff; padding: 0.3rem 0.6rem; border-radius: 6px; } .btn-get-apk { display: inline-block; text-decoration: none; } .bypostauthor { font-weight: bold; } "; wp_add_inline_style('appybix-style', $custom_css); // Comment reply script if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'appybix_scripts'); // ---------------------------- // Widgets // ---------------------------- function appybix_widgets_init() { register_sidebar([ 'name' => __('Sidebar','appybix'), 'id' => 'sidebar-1', 'before_widget' => '
', 'before_title' => '