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