| @@ 7-48 (lines=42) @@ | ||
| 4 | * See: https://jetpack.com/ |
|
| 5 | */ |
|
| 6 | ||
| 7 | function twentynineteen_jetpack_setup() { |
|
| 8 | ||
| 9 | /** |
|
| 10 | * Add theme support for Infinite Scroll. |
|
| 11 | */ |
|
| 12 | add_theme_support( 'infinite-scroll', array( |
|
| 13 | 'type' => 'click', |
|
| 14 | 'container' => 'main', |
|
| 15 | 'render' => 'twentynineteen_infinite_scroll_render', |
|
| 16 | 'footer' => 'page', |
|
| 17 | ) ); |
|
| 18 | ||
| 19 | /** |
|
| 20 | * Add theme support for Responsive Videos. |
|
| 21 | */ |
|
| 22 | add_theme_support( 'jetpack-responsive-videos' ); |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Add theme support for geo-location. |
|
| 26 | */ |
|
| 27 | add_theme_support( 'jetpack-geo-location' ); |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Add theme support for Content Options. |
|
| 31 | */ |
|
| 32 | add_theme_support( 'jetpack-content-options', array( |
|
| 33 | 'blog-display' => array( 'content', 'excerpt' ), |
|
| 34 | 'post-details' => array( |
|
| 35 | 'stylesheet' => 'twentynineteen-style', |
|
| 36 | 'date' => '.posted-on', |
|
| 37 | 'categories' => '.cat-links', |
|
| 38 | 'tags' => '.tags-links', |
|
| 39 | 'author' => '.byline', |
|
| 40 | 'comment' => '.comments-link', |
|
| 41 | ), |
|
| 42 | 'featured-images' => array( |
|
| 43 | 'archive' => true, |
|
| 44 | 'post' => true, |
|
| 45 | 'page' => true, |
|
| 46 | ), |
|
| 47 | ) ); |
|
| 48 | } |
|
| 49 | add_action( 'after_setup_theme', 'twentynineteen_jetpack_setup' ); |
|
| 50 | ||
| 51 | /** |
|
| @@ 16-61 (lines=46) @@ | ||
| 13 | * See: https://jetpack.com/support/responsive-videos/ |
|
| 14 | * See: https://jetpack.com/support/content-options/ |
|
| 15 | */ |
|
| 16 | function twentytwenty_jetpack_setup() { |
|
| 17 | /** |
|
| 18 | * Add theme support for Infinite Scroll. |
|
| 19 | */ |
|
| 20 | add_theme_support( |
|
| 21 | 'infinite-scroll', |
|
| 22 | array( |
|
| 23 | 'type' => 'click', |
|
| 24 | 'container' => 'site-content', |
|
| 25 | 'render' => 'twentytwenty_infinite_scroll_render', |
|
| 26 | 'footer' => 'site-content', |
|
| 27 | 'footer_widgets' => array( |
|
| 28 | 'sidebar-1', |
|
| 29 | 'sidebar-2', |
|
| 30 | ), |
|
| 31 | ) |
|
| 32 | ); |
|
| 33 | ||
| 34 | // Add theme support for Content Options. |
|
| 35 | add_theme_support( |
|
| 36 | 'jetpack-content-options', |
|
| 37 | array( |
|
| 38 | 'post-details' => array( |
|
| 39 | 'stylesheet' => 'twentytwenty-style', |
|
| 40 | 'date' => '.post-date', |
|
| 41 | 'categories' => '.entry-categories', |
|
| 42 | 'tags' => '.post-tags', |
|
| 43 | 'author' => '.post-author', |
|
| 44 | ), |
|
| 45 | 'featured-images' => array( |
|
| 46 | 'archive' => true, |
|
| 47 | 'post' => true, |
|
| 48 | 'page' => true, |
|
| 49 | 'fallback' => false, |
|
| 50 | ), |
|
| 51 | ) |
|
| 52 | ); |
|
| 53 | ||
| 54 | // Social Menu. |
|
| 55 | add_theme_support( 'jetpack-social-menu', 'svg' ); |
|
| 56 | ||
| 57 | /** |
|
| 58 | * Add theme support for geo-location. |
|
| 59 | */ |
|
| 60 | add_theme_support( 'jetpack-geo-location' ); |
|
| 61 | } |
|
| 62 | add_action( 'after_setup_theme', 'twentytwenty_jetpack_setup' ); |
|
| 63 | ||
| 64 | /** |
|