for posts and comments. add_theme_support( 'automatic-feed-links' ); // Featured image add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'advent-full-width', 1038, 576, true ); add_image_size('headertop-logo', 155, 155, true); register_nav_menus( array( 'primary' => __( 'Top primary menu', 'advent' ), ) ); // Switch default core markup for search form, comment form, and commen, to output valid HTML5. add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); // Add support for featured content. add_theme_support('featured-content', array( 'featured_content_filter' => 'advent_get_featured_posts', 'max_posts' => 6, )); add_theme_support( 'custom-header', apply_filters( 'advent_custom_header_args', array( 'uploads' => true, 'flex-height' => true, 'default-text-color' => '#000', 'header-text' => true, 'height' => '120', 'width' => '1260' ) ) ); add_theme_support( 'custom-background', apply_filters( 'advent_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false'); add_editor_style('css/editor-style.css'); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'advent_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false' ); /* slug setup */ add_theme_support( 'custom-logo'); add_theme_support( 'title-tag' ); /* height width automaticly adjust for home slider */ add_image_size( 'advent-home-thumbnail-image', 250, 180, true ); } endif; // advent_setup add_action( 'after_setup_theme', 'advent_setup' ); /** * Register OpenSans Google font for advent. */ function advent_font_url() { $advent_font_url = ''; /* * Translators: If there are characters in your language that are not supported * by OpenSans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'OpenSans font: on or off', 'advent' ) ) { $advent_font_url = add_query_arg( 'family', urlencode( 'OpenSans:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css?family=Open+Sans" ); } return $advent_font_url; } /* Set size of characher in excerpt */ function advent_excerpt_length( $length ) { return 63; } add_filter( 'excerpt_length', 'advent_excerpt_length', 999 ); /* readmore button if more content */ function advent_excerpt_more() { return '...
'; } add_filter("excerpt_more", "advent_excerpt_more"); /* * Comments placeholder function * **/ add_filter( 'comment_form_default_fields', 'advent_comment_placeholders' ); function advent_comment_placeholders( $fields ) { $fields['author'] = str_replace( 'get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $advent_image_url )); return $advent_attachment[0]; } add_action( 'admin_menu', 'advent_admin_menu'); function advent_admin_menu( ) { add_theme_page( __('Pro Feature','advent'), __('Advent Pro','advent'), 'manage_options', 'advent-pro-buynow', 'advent_buy_now', 300 ); } function advent_buy_now(){ ?>