php 从WPCasa(WPCasa Madrid,WPCasa Oslo,WPCasa London)的房产搜索表中删除“优惠”

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 从WPCasa(WPCasa Madrid,WPCasa Oslo,WPCasa London)的房产搜索表中删除“优惠”相关的知识,希望对你有一定的参考价值。

<?php
/**
 *	Remove 'Offer' from property search form in WPCasa
 *  for Twitter's Bootstrap-based themes (WPCasa Madrid, WPCasa Oslo, WPCasa London)
 *
 *	@param	array	Registered search fields
 *	@uses	wpsight_details()
 *	@return	array
 */
add_filter( 'wpsight_get_search_fields', 'wpsight_get_search_fields_offer_remove' );

function wpsight_get_search_fields_offer_remove( $fields ) {
	
	// Unset offer
	unset( $fields['offer'] );
	
	/**
	 * As we removed a field, we need to adjust the width
	 * of the other fields in the same row.
	 */
	
	// Get listing details
	$details = wpsight_details();
	
	$details_1 = $details['details_1']['id'];
	$details_2 = $details['details_2']['id'];
	
	$fields['location']['class'] = 'col-xs-12 col-sm-3';
	$fields['listing-type']['class'] = 'col-xs-12 col-sm-3';
	$fields[ $details_1 ]['class'] = 'col-xs-12 col-sm-3';
	$fields[ $details_2 ]['class'] = 'col-xs-12 col-sm-3';
	
	return $fields;
	
}

以上是关于php 从WPCasa(WPCasa Madrid,WPCasa Oslo,WPCasa London)的房产搜索表中删除“优惠”的主要内容,如果未能解决你的问题,请参考以下文章

php 删除要约字段并重新设置剩余字段的空间(对于WPCasa Bahia)

css wpCasa:媒体查询

css wpCasa的自定义按钮CSS

html wpCasa:http://support.wpsight.com/topic/centering-table-in-credit-area/

如何在搜索表单上设置默认值?

使用PHP检查多维数组中是否存在键值