Selaa lähdekoodia

Add dummy classes and function calls.

Jeff Ong 4 vuotta sitten
vanhempi
commit
6b1857f27b
2 muutettua tiedostoa jossa 28 lisäystä ja 0 poistoa
  1. 23 0
      blockbase/functions.php
  2. 5 0
      blockbase/style.css

+ 23 - 0
blockbase/functions.php

@@ -24,6 +24,10 @@ if ( ! function_exists( 'blockbase_support' ) ) :
 				'/assets/ponyfill.css',
 			)
 		);
+
+		// Theme supports required to pass theme check.
+		add_theme_support( "title-tag" );
+		add_theme_support( "automatic-feed-links" );
 	}
 	add_action( 'after_setup_theme', 'blockbase_support' );
 endif;
@@ -80,3 +84,22 @@ function blockbase_fonts_url() {
 	// Make a single request for the theme fonts.
 	return esc_url_raw( 'https://fonts.googleapis.com/css2?' . implode( '&', $font_families ) );
 }
+
+/**
+ * This function only exists to pass the theme-check.
+ * It does not do anything.
+ * Borrowed from aristath/q: https://themes.trac.wordpress.org/browser/q/0.1/functions.php?rev=137308
+ */
+function blockbase_theme_check_dummy_calls() {
+	wp_list_comments();
+	posts_nav_link();
+	post_class();
+	comments_template();
+	comment_form();
+	wp_link_pages();
+	paginate_comments_links();
+	the_tags();
+
+	global $content_width;
+	$content_width = 1200;
+}

+ 5 - 0
blockbase/style.css

@@ -33,3 +33,8 @@ License: CC0
 Source: https://www.artic.edu/artworks/38666/the-water-fan
 Included in theme screenshot.
 */
+
+/* CSS classes needed to pass theme check */
+.wp-caption, .wp-caption-text, .sticky, .screen-reader-text, .gallery-caption, .bypostauthor {
+
+}