to output valid HTML5. */ add_theme_support('html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', )); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support('post-formats', array( 'image', 'video', 'gallery', 'audio', )); // Set up the WordPress core custom background feature. add_theme_support('custom-background', apply_filters('advance_blog_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ))); /** * Add theme support for gutenberg block * */ add_theme_support( 'align-wide' ); add_theme_support( 'responsive-embeds' ); add_theme_support( 'wp-block-styles' ); } endif; add_action('after_setup_theme', 'advance_blog_setup'); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function advance_blog_content_width() { $GLOBALS['content_width'] = apply_filters('advance_blog_content_width', 640); } add_action('after_setup_theme', 'advance_blog_content_width', 0); /** * Return early if Custom Logos are not available. * * @todo Remove after WP 4.7 */ function advance_blog_the_custom_logo() { if (!function_exists('the_custom_logo')) { return; } else { the_custom_logo(); } } /** * Enqueue scripts and styles. */ function advance_blog_scripts() { wp_enqueue_style('slick', get_template_directory_uri() . '/assets/lib/slick/css/slick.min.css'); wp_enqueue_style('magnific-popup', get_template_directory_uri().'/assets/lib/magnific-popup/magnific-popup.css'); wp_enqueue_style('advance-blog-style', get_stylesheet_uri()); wp_style_add_data( 'advance-blog-style', 'rtl', 'replace' ); $fonts_url = advance_blog_fonts_url(); if (!empty($fonts_url)) { wp_enqueue_style('advance-blog-google-fonts', $fonts_url, array(), null); } wp_enqueue_script('slick', get_template_directory_uri() . '/assets/lib/slick/js/slick.min.js', array('jquery'), '', 1); wp_enqueue_script('jquery-match-height', get_template_directory_uri() . '/assets/lib/jquery-match-height/jquery.matchHeight.min.js', array('jquery'), '', 1); wp_enqueue_script('magnific-popup', get_template_directory_uri().'/assets/lib/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), '', true); wp_enqueue_script('advance-blog-main', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), '', 1); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } wp_localize_script( 'advance-blog-main', 'advance_blog_main', array( 'next_svg' => advance_blog_the_theme_svg('arrow-right',true), 'prev_svg' => advance_blog_the_theme_svg('arrow-left',true), 'arrow_down' => advance_blog_the_theme_svg('chevron-down',true), ) ); } add_action('wp_enqueue_scripts', 'advance_blog_scripts'); /** * Enqueue admin scripts and styles. */ function advance_blog_admin_scripts() { $current_screen = get_current_screen(); if( $current_screen->id === "widgets" ) { // Enqueue Script Only On Widget Page. wp_enqueue_media(); wp_enqueue_script('advance-blog-widget', get_template_directory_uri() . '/assets/js/widget.js', array('jquery'), '', 1); } wp_enqueue_style('admin-style', get_template_directory_uri() . '/assets/css/admin-style.css'); } add_action('admin_enqueue_scripts', 'advance_blog_admin_scripts'); if ( is_admin() ) { require_once get_template_directory() . '/inc/dashboard/class-dashboard.php'; new Wpinterface_Dashboard(); } require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load added-functions file. */ require get_template_directory() . '/inc/added-functions.php'; /** * Load metabox file. */ require get_template_directory() . '/inc/meta-box.php'; /** * Tgmpa plugin activation. */ require get_template_directory().'/assets/lib/tgm/tgm.php'; require get_template_directory() . '/inc/class-svg-icons.php'; require get_template_directory() . '/inc/widgets/widget.php'; XML-RPC server accepts POST requests only.