'https://cdn.ampproject.org/v0/amp-form-0.1.js',
'amp-sidebar' => 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js',
//'amp-analytics' => 'https://cdn.ampproject.org/v0/amp-analytics-0.1.js',
//'amp-accordion' => 'https://cdn.ampproject.org/v0/amp-accordion-0.1.js',
//'amp-carousel' => 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js',
//'amp-install-serviceworker' => 'https://cdn.ampproject.org/v0/amp-install-serviceworker-0.1.js',
);
$wp_amp_theme_extra_scripts = '';
if ( ! isset( $content_width ) ) {
$content_width = 660;
}
if ( is_admin() ) {
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.
} else {
header('AMP-Access-Control-Allow-Source-Origin:'.site_url());
}
include_once get_template_directory() . '/theme-customize.php';
if ( ! function_exists( 'wp_amp_theme_setup' ) ) :
function wp_amp_theme_setup() {
load_theme_textdomain( 'wp-amp-theme' );
// 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( 'post-thumbnails' );
set_post_thumbnail_size( 825, 510, true );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'header-left' => __( 'Header Left', 'wp-amp-theme' ),
'footer' => __( 'Footer', 'wp-amp-theme' ),
) );
/*
* 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'
) );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
) );
add_theme_support( 'custom-logo', array(
'height' => 248,
'width' => 248,
'flex-height' => true,
) );
/**
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'editor-style.css') );
}
endif; // wp_amp_theme_setup
add_action( 'after_setup_theme', 'wp_amp_theme_setup' );
/**
* Register widget area.
*
* @since 1.0.0
*
* @link https://codex.wordpress.org/Function_Reference/register_sidebar
*/
function wp_amp_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar Area', 'wp-amp-theme' ),
'id' => 'sidebar_amp',
'description' => __( 'Add widgets here to appear in your sidebar.', 'wp-amp-theme' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Header Right', 'wp-amp-theme' ),
'id' => 'header_rigth_amp',
'description' => __( 'Add widgets here to appear in your header.', 'wp-amp-theme' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
) );
}
add_action( 'widgets_init', 'wp_amp_widgets_init' );
require get_template_directory() . '/includes/template_tags.php';
require get_template_directory() . '/includes/compatibilities.php';
require get_template_directory() . '/includes/converter.php';
require get_template_directory() . '/includes/theme_amp.php';
require get_template_directory() . '/includes/tools.php';
require get_template_directory() . '/includes/header_navwalker.php';
?>