1616add_action ('wp_enqueue_scripts ' , function () use ($ manifest ) {
1717 wp_enqueue_style ( 'main-style ' , THEME_URI . '/public ' . $ manifest ['/theme/theme.css ' ] );
1818 wp_enqueue_script ( 'main-script ' , THEME_URI . '/public ' . $ manifest ['/theme/theme.js ' ], [], false , true );
19+
20+ // Threaded comment reply styles.
21+ if ( is_singular () && comments_open () && get_option ( 'thread_comments ' ) ) {
22+ wp_enqueue_script ( 'comment-reply ' );
23+ }
1924});
2025
2126// Admin Assets
2429 wp_enqueue_script ( 'admin-script ' , THEME_URI . '/public ' . $ manifest ['/admin/admin.js ' ], [], false , true );
2530});
2631
27- // Supports
28- add_theme_support ( 'post-thumbnails ' );
29- add_theme_support ( 'title-tag ' );
32+ // Navigation
3033register_nav_menu ( 'main ' , 'Main Menu ' );
3134
32- // Templates
35+ // Comments
3336apply_filters ( 'comments_template ' , function () {
3437 return tr_views_path ('comments.php ' );
38+ });
39+
40+ // Clean Theme Setup
41+ add_action ('after_setup_theme ' , function () {
42+ // Add Supports
43+ add_theme_support ( 'automatic-feed-links ' );
44+ add_theme_support ( 'title-tag ' );
45+ add_theme_support ( 'align-wide ' );
46+ add_theme_support ('html5 ' , ['comment-form ' , 'comment-list ' , 'navigation-widgets ' , 'script ' , 'style ' , 'gallery ' , 'caption ' ]);
47+ add_theme_support ( 'responsive-embeds ' );
48+
49+ // Thumbnails
50+ add_theme_support ( 'post-thumbnails ' );
51+ set_post_thumbnail_size ( 1568 , 9999 );
52+
53+ // Remove EditURI link
54+ remove_action ( 'wp_head ' , 'rsd_link ' );
55+ // Remove windows live writer
56+ remove_action ( 'wp_head ' , 'wlwmanifest_link ' );
57+ // Remove WP version
58+ remove_action ( 'wp_head ' , 'wp_generator ' );
3559});
0 commit comments