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' ); add_image_size( 'appsetter-postview-large', 1560, 715, true); add_image_size( 'appsetter-frontpage-featured', 731, 508, true ); add_image_size( 'appsetter-frontpage-list', 446, 256, true ); add_image_size( 'appsetter-frontpage-mini', 351, 240, true ); add_image_size( 'appsetter-sidebar-wide', 311, 140, true ); add_image_size( 'appsetter-thumb-square', 140, 140, array( 'center', 'center' )); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'appsetter' ), ) ); register_nav_menus( array( 'canvas2' => esc_html__( 'Canvas2', 'appsetter' ), ) ); /* * 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', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'appsetter_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'appsetter_setup' ); if ( ! function_exists( 'appsetter_custom_excerpt_length' ) ) : function appsetter_custom_excerpt_length( $length ) { return 24; } add_filter( 'excerpt_length', 'appsetter_custom_excerpt_length', 999 ); endif; function appsetter_custom_logo_setup() { $defaults = array( 'height' => 32, 'width' => 32, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ); add_theme_support( 'custom-logo', $defaults ); } add_action( 'after_setup_theme', 'appsetter_custom_logo_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 appsetter_content_width() { $GLOBALS['content_width'] = apply_filters( 'appsetter_content_width', 640 ); } add_action( 'after_setup_theme', 'appsetter_content_width', 0 ); function appsetter_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'appsetter' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer', 'appsetter' ), 'id' => 'footer-1', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer1', 'appsetter' ), 'id' => 'footer-2', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer2', 'appsetter' ), 'id' => 'footer-3', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer3', 'appsetter' ), 'id' => 'footer-4', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer4', 'appsetter' ), 'id' => 'footer-5', 'description' => esc_html__( 'Add widgets here.', 'appsetter' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'appsetter_widgets_init' ); /** * Enqueue scripts and styles. */ function appsetter_scripts() { wp_enqueue_style( 'appsetter-skeleton', get_template_directory_uri() . '/css/bootstrap.css'); wp_enqueue_style( 'appsetter-slidebars', get_template_directory_uri() . '/css/slidebars.css'); wp_enqueue_style( 'appsetter-awesome', get_template_directory_uri() . '/css/font-awesome.css' ); wp_enqueue_style( 'appsetter-style', get_stylesheet_uri() ); wp_enqueue_style( 'work-sans-font', get_template_directory_uri() . '/css/google.fonts.css' ); wp_enqueue_script( 'appsetter-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script( 'appsetter-skeleton-js', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '20151215', true ); wp_enqueue_script( 'appsetter-slidebars', get_template_directory_uri() . '/js/slidebars.js', array(), '20151215', true ); wp_enqueue_script( 'appsetter-slidebars-init', get_template_directory_uri() . '/js/slidebars-init.js', array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'appsetter_scripts' ); /** * Custom footer credits */ require get_template_directory() . '/inc/footer-credits.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.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; if ( ! function_exists( 'appsetter_posted_on_name' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function appsetter_posted_on_name() { global $post; $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author)); $user_description = get_the_author_meta( 'user_description', $post->post_author ); $user_mail = get_the_author_meta('user_email', $post->post_author); $user_link = get_the_author_meta('url', $post->post_author); $byline = sprintf( '' ); echo '' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'appsetter_author_meta' ) ) : function appsetter_author_meta( $content ) { global $post; if ( is_single() && isset( $post->post_author ) ) { $display_name = get_the_author_meta( 'display_name', $post->post_author ); if ( empty( $display_name ) ) $display_name = get_the_author_meta( 'nickname', $post->post_author ); $user_description = get_the_author_meta( 'user_description', $post->post_author ); $user_website = get_the_author_meta('url', $post->post_author); $user_mailadd = get_the_author_meta('user_email', $post->post_author); $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author)); if ( ! empty( $display_name ) ) $author_details = '

' . $display_name . '

'; if ( ! empty( $user_description ) ) $author_details .= '

' . get_avatar( get_the_author_meta('user_email') , 90 ) . nl2br( $user_description ). '

'; $author_details .= ''; } else { $author_details .= '

'; } $content = $content . ''; } return $content; } endif; function appsetter_new_excerpt_more( $more ) { return ''; } add_filter('excerpt_more', 'appsetter_new_excerpt_more'); function appsetter_theme_add_editor_styles() { add_editor_style( 'custom-editor-style.css' ); } add_action( 'admin_init', 'appsetter_theme_add_editor_styles' );