for posts and comments. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'besty-full-width', 1038, 576, true ); add_image_size( 'besty-thumbnail', 374, 254, true ); register_nav_menus( array( 'primary' => __( 'Top primary menu', 'besty' ), ) ); /* * 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', ) ); add_theme_support( 'custom-background', apply_filters( 'besty_custom_background_args', array( 'default-color' => 'fafafa', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'besty_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // besty_setup add_action( 'after_setup_theme', 'besty_setup' ); /** * Register Istok Web Google font for besty. */ function besty_font_url() { $besty_font_url = ''; /* * Translators: If there are characters in your language that are not supported * by Istok Web, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Istok Web: on or off', 'besty' ) ) { $besty_font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); } return $besty_font_url; } /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own besty_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * */ if ( ! function_exists( 'besty_comment' ) ) : function besty_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • comment_approved==1) { global $post; ?>
  • id="li-comment-">
  • __('Main Sidebar','besty'), 'id' => 'main_sidebar', 'class' => 'nav-list', 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'besty_widgets_init' ); function besty_add_ie_html5_shim () { echo ''; } add_action('wp_head', 'besty_add_ie_html5_shim'); add_filter( 'comment_form_default_fields', 'besty_comment_placeholders' ); /** * Change default fields, add placeholder and change type attributes. * * @param array $fields * @return array */ function besty_comment_placeholders( $fields ) { $fields['author'] = str_replace( '', ''. _x( 'Comment', 'comment form placeholder', 'besty' ) . ''. '', $fields['comment_field'] ); return $fields; } /*** Enqueue css and js files ***/ require get_template_directory() . '/functions/enqueue-files.php'; /*** Theme Default Setup ***/ require get_template_directory() . '/functions/theme-default-setup.php'; /*** Latest Posts Widgets ***/ require get_template_directory() . '/functions/besty-latest-posts.php'; /*** Theme Option ***/ require get_template_directory() . '/theme-options/besty.php'; /*** Custom Header ***/ require get_template_directory() . '/functions/custom-header.php'; /*** TGM ***/ require get_template_directory() . '/functions/tgm-plugins.php';