php 从Mai Pro(https://maipro.io)禁用粘性标题和缩小标题。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 从Mai Pro(https://maipro.io)禁用粘性标题和缩小标题。相关的知识,希望对你有一定的参考价值。

<?php

/**
 * Disable sticky header and shrink header from Mai Pro.
 *
 * @param   array  The existing body classes.
 *
 * @return  array  Modified classes.
 */
add_filter( 'body_class', 'prefix_disable_mai_sticky_shrink_header', 30 );
function prefix_disable_mai_sticky_shrink_header( $classes ) {
	// Bail if not the page we want to disable on.
	if ( ! is_page( 123 ) ) {
		return $classes;
	}
	// Remove the header classes from the array.
	$classes = array_diff( $classes, array( 'sticky-header', 'shrink-header' ) );
	// Return our classes.
	return $classes;
}

以上是关于php 从Mai Pro(https://maipro.io)禁用粘性标题和缩小标题。的主要内容,如果未能解决你的问题,请参考以下文章