migrated from os_ to xxp_ fields
This commit is contained in:
parent
bd29254d9a
commit
0b4b3047c4
|
@ -15,14 +15,14 @@
|
|||
// define the filter fields
|
||||
// array of filters (field key => field name)
|
||||
$GLOBALS['my_query_filters_ajut'] = array(
|
||||
'fundtarget' => 'os_fund_target',
|
||||
'fundsource' => 'os_fund_source',
|
||||
'fundfield' => 'os_fund_field'
|
||||
'fundtarget' => 'xxp_fund_target',
|
||||
'fundsource' => 'xxp_fund_source',
|
||||
'fundfield' => 'xxp_fund_field'
|
||||
);
|
||||
$GLOBALS['my_query_filters_ajut_dates'] = array(
|
||||
'fundapplybegin' => 'os_fund_apply_begin',
|
||||
'fundapplyend' => 'os_fund_apply_end'
|
||||
//'fundcall' => 'os_fund_call',
|
||||
'fundapplybegin' => 'xxp_fund_apply_begin',
|
||||
'fundapplyend' => 'xxp_fund_apply_end'
|
||||
//'fundcall' => 'xxp_fund_call',
|
||||
);
|
||||
|
||||
// action
|
||||
|
@ -51,12 +51,12 @@ if ( ! function_exists('my_pre_get_posts_ajuts') ){
|
|||
$meta_query[] = array('relation' => 'OR');
|
||||
|
||||
// get the values for this filter
|
||||
// eg: http://domain.tdl/ajut/?os_fund_target=autonoma,entitat-publica
|
||||
// eg: http://domain.tdl/ajut/?xxp_fund_target=autonoma,entitat-publica
|
||||
$filtervalues= explode(',', $_GET[ $fieldname ]);
|
||||
|
||||
// loop retreived values from checkboxes and filter them with REGEXP
|
||||
// http://domain.tdl/ajut/?os_fund_target=autonoma&os_fund_field=circi
|
||||
// http://domain.tdl/ajut/?os_fund_target=autonoma,entitat-publica&os_fund_field=dansa
|
||||
// http://domain.tdl/ajut/?xxp_fund_target=autonoma&xxp_fund_field=circi
|
||||
// http://domain.tdl/ajut/?xxp_fund_target=autonoma,entitat-publica&xxp_fund_field=dansa
|
||||
foreach( $filtervalues as $filteredvalue )
|
||||
{
|
||||
// they are array based fields
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
// define the filter fields
|
||||
// array of filters (field key => field name)
|
||||
$GLOBALS['my_query_filters_convo'] = array(
|
||||
'convofield' => 'os_convo_field', //disciplines
|
||||
'convoterritory' => 'os_convo_territory', //territori
|
||||
'convoservice' => 'os_convo_service', //serveis
|
||||
'convocenter' => 'os_convo_center' //centre
|
||||
'convofield' => 'xxp_convo_field', //disciplines
|
||||
'convoterritory' => 'xxp_convo_territory', //territori
|
||||
'convoservice' => 'xxp_convo_service', //serveis
|
||||
'convocenter' => 'xxp_convo_center' //centre
|
||||
|
||||
);
|
||||
$GLOBALS['my_query_filters_convo_dates'] = array(
|
||||
'convoapplybegin' => 'os_convo_apply_begin',
|
||||
'convoapplyend' => 'os_convo_apply_end'
|
||||
//'convocall' => 'os_convo_call',
|
||||
'convoapplybegin' => 'xxp_convo_apply_begin',
|
||||
'convoapplyend' => 'xxp_convo_apply_end'
|
||||
//'convocall' => 'xxp_convo_call',
|
||||
);
|
||||
|
||||
// action
|
||||
|
@ -53,12 +53,12 @@ if ( ! function_exists( 'my_pre_get_posts_convos' ) ){
|
|||
$meta_query[] = array('relation' => 'OR');
|
||||
|
||||
// get the values for this filter
|
||||
// eg: http://domain.tdl/convo/?os_convo_target=autonoma,entitat-publica
|
||||
// eg: http://domain.tdl/convo/?xxp_convo_target=autonoma,entitat-publica
|
||||
$filtervalues= explode(',', $_GET[ $fieldname ]);
|
||||
|
||||
// loop retreived values from checkboxes and filter them with REGEXP
|
||||
// http://domain.tdl/convo/?os_convo_target=autonoma&os_convo_field=circi
|
||||
// http://domain.tdl/convo/?os_convo_target=autonoma,entitat-publica&os_convo_field=dansa
|
||||
// http://domain.tdl/convo/?xxp_convo_target=autonoma&xxp_convo_field=circi
|
||||
// http://domain.tdl/convo/?xxp_convo_target=autonoma,entitat-publica&xxp_convo_field=dansa
|
||||
foreach( $filtervalues as $filteredvalue )
|
||||
{
|
||||
// they are array based fields
|
||||
|
|
Loading…
Reference in New Issue