esc_html__( 'Primary Menu', 'authenticblog' ), ) ); /* * 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', ) ); // 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' ); /* * Add theme support for cutom background color. */ $args = array( 'default-color' => '#ffffff', ); add_theme_support( 'custom-background', $args ); /* * Enable support for Post Thumbnails. * See https://codex.wordpress.org/Function_Reference/add_theme_support */ add_theme_support( 'post-thumbnails' ); add_image_size('authenticblog-blog-thumbnails', 1000, 500, true); /* * Add theme support for Gutenberg custom-editor */ add_theme_support( 'align-wide' ); add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'light-grayish-magenta', 'authenticblog' ), 'slug' => 'light-grayish-magenta', 'color' => '#d0a5db', ), array( 'name' => __( 'very-light-gray', 'authenticblog' ), 'slug' => 'very-light-gray', 'color' => '#eee', ), array( 'name' => __( 'very-dark-gray', 'authenticblog' ), 'slug' => 'very-dark-gray', 'color' => '#444', ), ) ); add_theme_support( 'editor-font-sizes', array( array( 'name' => __( 'small', 'authenticblog' ), 'shortName' => __( 'S', 'authenticblog' ), 'size' => 12, 'slug' => 'small' ), array( 'name' => __( 'regular', 'authenticblog' ), 'shortName' => __( 'M', 'authenticblog' ), 'size' => 16, 'slug' => 'regular' ), array( 'name' => __( 'large', 'authenticblog' ), 'shortName' => __( 'L', 'authenticblog' ), 'size' => 36, 'slug' => 'large' ), array( 'name' => __( 'larger', 'authenticblog' ), 'shortName' => __( 'XL', 'authenticblog' ), 'size' => 50, 'slug' => 'larger' ) ) ); } endif; // authenticblog_setup add_action( 'after_setup_theme', 'authenticblog_setup' ); /** * Enqueue scripts and styles. */ function authenticblog_scripts() { wp_enqueue_style( 'authenticblog-bootstrap', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'authenticblog_css', get_template_directory_uri() . '/css/style.css'); wp_enqueue_style( 'authenticblog-style', get_stylesheet_uri() ); wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family=Lato', false ); wp_enqueue_script( 'authenticblog-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '20120206', true ); wp_enqueue_script( 'authenticblog-fitvids-js', get_template_directory_uri() . '/js/fitvids.js', array('jquery'), '1.1', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'authenticblog_scripts' ); function authenticblog_styles(){ wp_enqueue_style( 'gutenberg-editor-styles', get_template_directory_uri() . '/css/style-editor.css' ); } add_action('enqueue_block_editor_assets', 'authenticblog_styles'); function authenticblog_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'authenticblog' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); } add_action( 'widgets_init', 'authenticblog_widgets_init' ); //widgets if ( function_exists('register_sidebar') ) //about register_sidebar(array( 'name' => __( 'About', 'authenticblog'), 'id' => 'about', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', )); //search register_sidebar(array( 'name'=> __('search', 'authenticblog'), 'id' => 'search', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', )); //remove dots from the excerp function custom_excerpt_more( $more ) { return '';//you can change this to whatever you want } add_filter( 'excerpt_more', 'custom_excerpt_more' ); /* Add Placehoder in comment Form Field (Comment) */ add_filter( 'comment_form_defaults', 'authenticblog_textarea_placeholder' ); function authenticblog_textarea_placeholder( $fields ) { $fields['comment_field'] = str_replace( '<textarea', '<textarea placeholder="Your thoughts.."', $fields['comment_field'] ); return $fields; } //custom-editor-style function my_theme_add_editor_styles() { add_editor_style( 'custom-editor-style.css' ); } add_action( 'admin_init', 'my_theme_add_editor_styles' );