瀏覽代碼

Blockbase: Hide WP.com stats smiley (#4137)

* Blockbase: Hide WP.com stats smiley
Co-authored-by: Jason Crist <jcrist@pbking.com>
Daniel Dudzic 4 年之前
父節點
當前提交
efd9b80774
共有 2 個文件被更改,包括 33 次插入0 次删除
  1. 14 0
      blockbase/inc/wpcom-style.css
  2. 19 0
      blockbase/inc/wpcom.php

+ 14 - 0
blockbase/inc/wpcom-style.css

@@ -0,0 +1,14 @@
+/**
+ * WP.com stylesheet for Blockbase
+ */
+
+/* Hide the stats smiley */
+img#wpstats {
+	position: absolute !important;
+	clip: rect(0, 0, 0, 0);
+	padding: 0 !important;
+	border: 0 !important;
+	height: 0 !important;
+	width: 0 !important;
+	overflow: hidden;
+}

+ 19 - 0
blockbase/inc/wpcom.php

@@ -0,0 +1,19 @@
+<?php
+/**
+ * WordPress.com-specific functions and definitions.
+ *
+ * This file is centrally included from `wp-content/mu-plugins/wpcom-theme-compat.php`.
+ *
+ * @package Blockbase
+ */
+
+
+/**
+ * Enqueue our WP.com styles for front-end.
+ * Loads after theme styles so we can add overrides.
+ */
+function blockbase_wpcom_scripts() {
+	wp_enqueue_style( 'blockbase-wpcom-style', get_template_directory_uri() . '/inc/wpcom-style.css', array( 'blockbase-ponyfill' ) );
+}
+add_action( 'wp_enqueue_scripts', 'blockbase_wpcom_scripts' );
+