php Jetpack共享按钮。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Jetpack共享按钮。相关的知识,希望对你有一定的参考价值。

/*
Jetpack Sharing
---------------------------------------------------------------------------------------------------- */

.content div.sharedaddy div.sd-block {
	border: none;
	padding: 0;
}

.content div.sharedaddy .sd-content {
	float: left;
	margin-bottom: 32px;
}

.content div.sharedaddy a.sd-button {
	border: none !important;
	box-shadow: none;
}

.content .sd-social-icon-text a.sd-button > span, a.sd-button > span {
	opacity: 1;
	padding: 6px 12px;
}

.content a.sd-button > span {
	background-image: none !important;
	background: #111;
	border: none;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.content a.sd-button:hover > span {
	background: #1dbec0;
}

.sd-content .sd-button span.share-count {
	color: #cdf593 !important;
	font-size: 100% !important;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Add Jetpack share buttons above post
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );

add_filter( 'the_content', 'sp_share_buttons_above_post', 19 );
add_filter( 'the_excerpt', 'sp_share_buttons_above_post', 19 );

function sp_share_buttons_above_post( $content = '' ) {
	if ( function_exists( 'sharing_display' ) ) {
		return sharing_display() . $content;
	}
	else {
		return $content;
	}
}

以上是关于php Jetpack共享按钮。的主要内容,如果未能解决你的问题,请参考以下文章

php 共享按钮没有插件或javascript - 分享

php Magento 2:自定义共享和打印按钮phtml

Jetpack导航。改变每个片段的工具栏按钮

php 删除Jetpack css

Android jetpack compose中的按钮长按监听器

php 移动Jetpack Share for Genesis